aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-18 13:28:09 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-18 13:28:09 +0800
commit70b5e473c89cb4397ebaa365bcf39e60abce49fe (patch)
treece4ff140c2868a5e65ae2114b3e963835ec7b57c /calendar
parent68b50c270671de5d3e854ff949efcd66f4c2f745 (diff)
downloadgsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar
gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.gz
gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.bz2
gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.lz
gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.xz
gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.tar.zst
gsoc2013-evolution-70b5e473c89cb4397ebaa365bcf39e60abce49fe.zip
Fix for bug #448223 from Gilles Dartiguelongue
svn path=/trunk/; revision=33700
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/cal-search-bar.c35
2 files changed, 10 insertions, 31 deletions
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 <sragavan@novell.com>
+
+ ** Fix for bug #448223 from Gilles Dartiguelongue
+
+ * gui/cal-search-bar.c: (generate_viewoption_menu):
+
2007-06-11 Milan Crha <mcrha@redhat.com>
** 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 <e-util/e-icon-factory.h>
#include <libedataserver/e-categories.h>
#include <filter/rule-editor.h>
+
#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));*/