From 7b1235632df2b854ddfa2d614f63c65e206a81d5 Mon Sep 17 00:00:00 2001 From: camel Date: Mon, 9 Mar 2009 21:24:02 +0000 Subject: [PATCH] Corrected 'Centre Map' bug in station list view git-svn-id: svn+ssh://garage/var/lib/gforge/svnroot/maemo-mapper/trunk@253 6c538b50-5814-0410-93ad-8bdf4c0149d1 --- src/aprs_display.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/aprs_display.c b/src/aprs_display.c index dc15993..7e9b926 100644 --- a/src/aprs_display.c +++ b/src/aprs_display.c @@ -880,18 +880,18 @@ void list_stations() _("Comment"), renderer, "text", STATION_COMMENT, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); - - selected_station.dialog = dialog; - selected_station.tree_view = list; - selected_station.call_sign = NULL; - selected_station.column_index = STATION_CALLSIGN; - - g_signal_connect(G_OBJECT(btn_panto), "clicked", - G_CALLBACK(panto_station), &selected_station); } + selected_station.dialog = dialog; + selected_station.tree_view = list; + selected_station.call_sign = NULL; + selected_station.column_index = STATION_CALLSIGN; + + g_signal_connect(G_OBJECT(btn_panto), "clicked", + G_CALLBACK(panto_station), &selected_station); + gtk_tree_view_set_model(GTK_TREE_VIEW(list), GTK_TREE_MODEL(store)); g_object_unref(G_OBJECT(store)); @@ -910,15 +910,15 @@ void list_stations() gtk_tree_view_get_selection(GTK_TREE_VIEW(list)), NULL, &iter)) { + gchar * callsign = NULL; + gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, + STATION_CALLSIGN, &(callsign), + -1); + // Find the callsign p_station = n_first; while(p_station != NULL) { - gchar * callsign = NULL; - gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, - STATION_CALLSIGN, &(callsign), - -1); - if(strcmp(p_station->call_sign,callsign) == 0) { ShowAprsStationPopup(p_station); @@ -931,6 +931,16 @@ void list_stations() } } + + + // Setup event again + selected_station.dialog = dialog; + selected_station.tree_view = list; + selected_station.call_sign = NULL; + selected_station.column_index = STATION_CALLSIGN; + + g_signal_connect(G_OBJECT(btn_panto), "clicked", + G_CALLBACK(panto_station), &selected_station); -- 2.44.0