diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/ChangeLog | 7 | ||||
-rw-r--r-- | widgets/misc/e-search-bar.c | 22 |
2 files changed, 21 insertions, 8 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index e3e8103e9f..034634b80e 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2007-10-26 Tobias Mueller <tobiasmue@svn.gnome.org> + + ** Workaround for bug #395272 + + * e-search-bar.c: + Minor code cleanups and value checking + 2007-10-22 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #417999 diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index e64694cd32..4cc488f8f1 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -1570,17 +1570,23 @@ e_search_bar_get_text (ESearchBar *search_bar) void e_search_bar_scope_enable (ESearchBar *esb, int did, gboolean state) { GtkWidget *widget=NULL; - GList *l = GTK_MENU_SHELL (esb->scopeoption_menu)->children; - int row = -1, i = 0, id; + GList *l ; + int id; + gpointer *pointer; + g_return_if_fail (esb != NULL); + g_return_if_fail (E_IS_SEARCH_BAR (esb)); + + l = GTK_MENU_SHELL (esb->scopeoption_menu)->children; while (l) { - id = GPOINTER_TO_INT (g_object_get_data (l->data, "EsbItemId")); - if (id == did) { - row = i; - widget = l->data; - break; + pointer = g_object_get_data (l->data, "EsbItemId"); + if (pointer) { + id = GPOINTER_TO_INT (pointer); + if (id == did) { + widget = l->data; + break; + } } - i++; l = l->next; } |