]> err.no Git - mapper/commitdiff
Connect click switching only if combined mode is requested.
authorKaj-Michael Lang <milang@tal.org>
Tue, 30 Oct 2007 18:59:09 +0000 (20:59 +0200)
committerKaj-Michael Lang <milang@tal.org>
Tue, 30 Oct 2007 18:59:09 +0000 (20:59 +0200)
src/gtkgps.c

index ad90a690adaf600f99a20dd14247bd68c74c4650..06660ce894459a32b8a9c2cb9e8b4ab1668acc6d 100644 (file)
@@ -137,7 +137,12 @@ gps=gtk_type_new(gtk_gps_get_type ());
 gps->display_mode=display_mode;
 gps->data=data;
 widget=GTK_WIDGET(gps);
-g_signal_connect(G_OBJECT(widget), "button_press_event", G_CALLBACK(gtk_gps_cb_button_press), NULL);
+
+/* Allow switching if mode is combined */
+if (display_mode==GTK_GPS_MODE_COMBINED) {
+       g_signal_connect(G_OBJECT(widget), "button_press_event", G_CALLBACK(gtk_gps_cb_button_press), NULL);
+       display_mode=GTK_GPS_MODE_SKY;
+}
 
 gps->context=gtk_widget_get_pango_context(widget);
 gps->layout=pango_layout_new(gps->context);