diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-06-18 13:28:09 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-06-18 13:28:09 +0800 |
commit | 70b5e473c89cb4397ebaa365bcf39e60abce49fe (patch) | |
tree | ce4ff140c2868a5e65ae2114b3e963835ec7b57c /widgets/misc | |
parent | 68b50c270671de5d3e854ff949efcd66f4c2f745 (diff) | |
download | gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.gz gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.zst gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.zip |
Fix for bug #448223 from Gilles Dartiguelongue
svn path=/trunk/; revision=33700
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/ChangeLog | 7 | ||||
-rw-r--r-- | widgets/misc/e-search-bar.c | 34 |
2 files changed, 12 insertions, 29 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b1c18f534a..363db5cd05 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2007-06-18 Srinivasa Ragavan <sragavan@novell.com> + + ** Fix for bug #448223 from Gilles Dartiguelongue + + * e-search-bar.c: (set_option), (e_search_bar_set_viewoption), + (e_search_bar_set_scopeoption): + 2007-06-15 Milan Crha <mcrha@redhat.com> ** Fix for bug #257118 diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 81f1e36fda..4b8d459911 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -52,8 +52,10 @@ #include "e-icon-entry.h" #include "e-search-bar.h" +#include "e-util/e-util.h" #include "e-util/e-util-marshal.h" #include "e-util/e-icon-factory.h" + enum { QUERY_CHANGED, @@ -452,32 +454,6 @@ scopeitem_activated_cb(GtkWidget *widget, ESearchBar *esb) esb->block_search = FALSE; } -static char * -string_without_underscores (const char *s) -{ - char *new_string; - const char *sp; - char *dp; - - new_string = g_malloc (strlen (s) + 1); - - dp = new_string; - for (sp = s; *sp != '\0'; sp ++) { - if (*sp != '_') { - *dp = *sp; - dp ++; - } else if (sp[1] == '_') { - /* Translate "__" in "_". */ - *dp = '_'; - dp ++; - sp ++; - } - } - *dp = 0; - - return new_string; -} - static void option_activated_cb (GtkWidget *widget, ESearchBar *esb) @@ -722,7 +698,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items) if (items[i].text) { char *str; - str = string_without_underscores (_(items[i].text)); + str = e_str_without_underscores (_(items[i].text)); switch (items[i].type) { case ESB_ITEMTYPE_NORMAL: item = gtk_menu_item_new_with_label (str); @@ -1180,7 +1156,7 @@ e_search_bar_set_viewoption (ESearchBar *search_bar, int option_id, ESearchBarIt for (i = 0; subitems[i].id != -1; ++i) { if (subitems[i].text) { char *str = NULL; - str = string_without_underscores (subitems[i].text); + str = e_str_without_underscores (subitems[i].text); menu_item = gtk_menu_item_new_with_label (str); g_free (str); } else { @@ -1229,7 +1205,7 @@ e_search_bar_set_scopeoption (ESearchBar *search_bar, ESearchBarItem *scopeitems for (i = 0; scopeitems[i].id != -1; ++i) { if (scopeitems[i].text) { char *str; - str = string_without_underscores (_(scopeitems[i].text)); + str = e_str_without_underscores (_(scopeitems[i].text)); menu_item = gtk_menu_item_new_with_label (str); g_object_set_data_full (G_OBJECT (menu_item), "string",str, g_free); } else { |