diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-08-18 05:18:01 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-08-18 05:18:01 +0800 |
commit | 4ab941838f7cf450a42a6ccca9b46c14250ef4de (patch) | |
tree | ab705389659dbce999362af0d7ee89d6ae07faaa /my-evolution | |
parent | d398be6895584ef4d52ad2cf9f8bef6a639f4d38 (diff) | |
download | gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar.gz gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar.bz2 gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar.lz gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar.xz gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar.zst gsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.zip |
Don't allow nonroot nodes to be selected
svn path=/trunk/; revision=12178
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 6 | ||||
-rw-r--r-- | my-evolution/e-summary-preferences.c | 10 |
2 files changed, 16 insertions, 0 deletions
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 <iain@ximian.com> + + * 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 <iain@ximian.com> * 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 */ |