From 401d5cd43d5a981e137c448fdcef00d000f7d1f3 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Tue, 3 Jul 2001 22:24:37 +0000 Subject: Prevent crashing while we work this out. 001-07-03 Peter Williams * filter-source.c (get_widget): Prevent crashing while we work this out. * filter-rule.c (get_widget): Don't try to gtk_widget_grab_default with a widget that can't be the default. Altough it should be able to.... svn path=/trunk/; revision=10771 --- filter/ChangeLog | 8 ++++++++ filter/filter-rule.c | 3 ++- filter/filter-source.c | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 68ff9bb901..aeb69d9ecd 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,11 @@ +2001-07-03 Peter Williams + + * filter-source.c (get_widget): Prevent crashing while we work this out. + + * filter-rule.c (get_widget): Don't try to gtk_widget_grab_default + with a widget that can't be the default. Altough it should be able + to.... + 2001-07-02 Sam Creasey * filter-int.c: Added an integer type for filtering values. used for size. diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 06dacb9349..68c15acd83 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -632,7 +632,8 @@ get_widget (FilterRule *fr, struct _RuleContext *f) /* FIXME: do we want the following code in the future? */ /*gtk_editable_select_region (GTK_EDITABLE (name), 0, -1);*/ gtk_widget_grab_focus (GTK_WIDGET (name)); - gtk_widget_grab_default (GTK_WIDGET (name)); + /* Why does GTK say we can't grab the default?? */ + /*gtk_widget_grab_default (GTK_WIDGET (name));*/ } else { e_utf8_gtk_entry_set_text (GTK_ENTRY (name), fr->name); } diff --git a/filter/filter-source.c b/filter/filter-source.c index 83428fe09c..dff970b9a5 100644 --- a/filter/filter-source.c +++ b/filter/filter-source.c @@ -275,7 +275,11 @@ get_widget (FilterElement *fe) } else { gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), 0); g_free (fs->priv->current_url); - fs->priv->current_url = g_strdup (first->url); + + if (first) + fs->priv->current_url = g_strdup (first->url); + else + fs->priv->current_url = NULL; } return omenu; -- cgit