aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter/ChangeLog8
-rw-r--r--filter/filter-rule.c3
-rw-r--r--filter/filter-source.c6
3 files changed, 15 insertions, 2 deletions
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 <peterw@ximian.com>
+
+ * 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 <sammy@oh.verio.com>
* 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;