aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-preferences.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-08-18 05:18:01 +0800
committerIain Holmes <iain@src.gnome.org>2001-08-18 05:18:01 +0800
commit4ab941838f7cf450a42a6ccca9b46c14250ef4de (patch)
treeab705389659dbce999362af0d7ee89d6ae07faaa /my-evolution/e-summary-preferences.c
parentd398be6895584ef4d52ad2cf9f8bef6a639f4d38 (diff)
downloadgsoc2013-evolution-4ab941838f7cf450a42a6ccca9b46c14250ef4de.tar.gz
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/e-summary-preferences.c')
-rw-r--r--my-evolution/e-summary-preferences.c10
1 files changed, 10 insertions, 0 deletions
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 */