From 70b5e473c89cb4397ebaa365bcf39e60abce49fe Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 18 Jun 2007 05:28:09 +0000 Subject: Fix for bug #448223 from Gilles Dartiguelongue svn path=/trunk/; revision=33700 --- calendar/ChangeLog | 6 ++++++ calendar/gui/cal-search-bar.c | 35 ++++------------------------------- 2 files changed, 10 insertions(+), 31 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 03552d6f68..ba7fdfcc0e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2007-06-18 Srinivasa Ragavan + + ** Fix for bug #448223 from Gilles Dartiguelongue + + * gui/cal-search-bar.c: (generate_viewoption_menu): + 2007-06-11 Milan Crha ** Fix for bug #325882 diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index 75e0d819ad..fb11626789 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -35,11 +35,13 @@ #include #include #include + #include "cal-search-bar.h" + +#include "e-util/e-util.h" #include "e-util/e-error.h" #include "e-util/e-util-private.h" - typedef struct CALSearchBarItem { ESearchBarItem search; const char *image; @@ -532,35 +534,6 @@ cal_search_bar_search_activated (ESearchBar *search) regen_query (cal_search); } - - - -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 GtkWidget * generate_viewoption_menu (CALSearchBarItem *subitems) { @@ -572,7 +545,7 @@ generate_viewoption_menu (CALSearchBarItem *subitems) for (i = 0; subitems[i].search.id != -1; ++i) { if (subitems[i].search.text) { char *str = NULL; - str = string_without_underscores (subitems[i].search.text); + str = e_str_without_underscores (subitems[i].search.text); menu_item = gtk_image_menu_item_new_with_label (str); /* if (subitems[i].image) gtk_image_menu_item_set_image (menu_item, e_icon_factory_get_image (subitems[i].image, E_ICON_SIZE_MENU));*/ -- cgit v1.2.3