aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorTobias Mueller <tobiasmue@svn.gnome.org>2007-10-26 23:03:18 +0800
committerTobias Mueller <tobiasmue@src.gnome.org>2007-10-26 23:03:18 +0800
commite11e3bcb05a986af6e8cb2895b57c9f61a583d86 (patch)
treeea5df37654b213979200cbc2cd68ace71a31570e /widgets/misc
parent7384a973eab03ef037ef359e6b4e27caae395210 (diff)
downloadgsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.tar
gsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.tar.gz
gsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.tar.bz2
gsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.tar.lz
gsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.tar.xz
gsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.tar.zst
gsoc2013-evolution-e11e3bcb05a986af6e8cb2895b57c9f61a583d86.zip
** Workaround for bug #395272
2007-10-26 Tobias Mueller <tobiasmue@svn.gnome.org> ** Workaround for bug #395272 * e-search-bar.c: Minor code cleanups and value checking svn path=/trunk/; revision=34437
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-search-bar.c22
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;
}