From: Kaj-Michael Lang Date: Tue, 30 Oct 2007 18:59:09 +0000 (+0200) Subject: Connect click switching only if combined mode is requested. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4e87b8e042308b84f195f7802059cbcab31a6ed;p=mapper Connect click switching only if combined mode is requested. --- diff --git a/src/gtkgps.c b/src/gtkgps.c index ad90a69..06660ce 100644 --- a/src/gtkgps.c +++ b/src/gtkgps.c @@ -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);