From 4ab941838f7cf450a42a6ccca9b46c14250ef4de Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Fri, 17 Aug 2001 21:18:01 +0000 Subject: Don't allow nonroot nodes to be selected svn path=/trunk/; revision=12178 --- my-evolution/ChangeLog | 6 ++++++ my-evolution/e-summary-preferences.c | 10 ++++++++++ 2 files changed, 16 insertions(+) (limited to 'my-evolution') diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 0f7af6e894..e02bbbd53b 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,9 @@ +2001-08-17 Iain Holmes + + * e-summary-preferences.c (weather_all_select_row_cb): Unselect the + row if it isn't a leaf node. + (weather_add_clicked_cb): Return if location == NULL. + 2001-08-15 Iain Holmes * e-summary.c (e_summary_draw): Use the US format for dates (Yeeech) diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c index 5cd7099d36..da4f6176f4 100644 --- a/my-evolution/e-summary-preferences.c +++ b/my-evolution/e-summary-preferences.c @@ -917,6 +917,14 @@ weather_all_select_row_cb (GtkCTree *ctree, int column, PropertyData *pd) { + ESummaryWeatherLocation *location; + + location = gtk_ctree_node_get_row_data (GTK_CTREE (pd->weather->all), row); + if (location == NULL) { + gtk_ctree_unselect (ctree, row); + return; + } + gtk_widget_set_sensitive (pd->weather->add, TRUE); pd->weather->selected_node = row; } @@ -965,6 +973,8 @@ weather_add_clicked_cb (GtkButton *button, location = gtk_ctree_node_get_row_data (GTK_CTREE (pd->weather->all), pd->weather->selected_node); + g_return_if_fail (location != NULL); + for (p = pd->summary->preferences->stations; p; p = p->next) { if (strcmp (location->code, p->data) == 0) { return; /* Already have it */ -- cgit