aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/cal-search-bar.c6
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-browser.c26
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-search-bar.c7
6 files changed, 52 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index a873c137c2..01b50fe115 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-24 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #402487
+
+ * gui/cal-search-bar.c: (notify_e_cal_view_contains):
+ Memory leak fix.
+
2008-01-22 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #337046
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index d82d0e7ce6..fdaa0ff791 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -412,12 +412,12 @@ notify_e_cal_view_contains (CalSearchBar *cal_search, const char *field, const c
if (!text)
return; /* This is an error in the UTF8 conversion, not an empty string! */
- if (text && *text) {
+ if (text && *text)
sexp = g_strdup_printf ("(contains? \"%s\" \"%s\")", field, text);
- g_free (text);
- } else
+ else
sexp = g_strdup ("(contains? \"summary\" \"\")"); /* Show all */
+ g_free (text);
/* Apply the selected view on search */
if (view && *view){
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3c1d1685c4..c7006a72ea 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
2008-01-24 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #402487
+
+ * em-folder-browser.c: (emfb_search_search_activated),
+ (generate_viewoption_menu): Memory leak fix.
+
+2008-01-24 Milan Crha <mcrha@redhat.com>
+
** Part of bug #511488
* mail-vfolder.h:
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 0ef7be078b..83c905d928 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -336,8 +336,9 @@ generate_viewoption_menu (GtkWidget *emfv)
g_object_set_data (G_OBJECT (menu_item), "EsbItemId",
GINT_TO_POINTER (VIEW_LABEL + (VIEW_ITEMS_MASK + 1) * i));
- g_object_set_data (G_OBJECT (menu_item), "LabelTag",
- g_strdup (strncmp (label->tag, "$Label", 6) == 0 ? label->tag + 6 : label->tag));
+ g_object_set_data_full (G_OBJECT (menu_item), "LabelTag",
+ g_strdup (strncmp (label->tag, "$Label", 6) == 0 ? label->tag + 6 : label->tag),
+ g_free);
}
gtk_widget_show (menu_item);
@@ -1033,7 +1034,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
EFilterBar *efb = (EFilterBar *)esb;
- char *search_state, *view_sexp, *folder_uri=NULL;
+ char *search_state = NULL, *view_sexp, *folder_uri=NULL;
char *word = NULL, *storeuri = NULL, *search_word = NULL;
gint id, i;
CamelFolder *folder;
@@ -1058,6 +1059,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
} else {
em_format_html_display_search_close (emfb->view.preview);
}
+ g_free (word);
return;
break;
@@ -1075,9 +1077,13 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
}
g_signal_emit (emfb, folder_browser_signals [ACCOUNT_SEARCH_CLEARED], 0);
gtk_widget_set_sensitive (esb->scopeoption, TRUE);
+ g_free (word);
+ word = NULL;
break;
}
+ g_free (word);
+ word = NULL;
g_object_get (esb, "query", &search_word, NULL);
if (efb->account_search_vf && !strcmp (search_word, ((CamelVeeFolder *) efb->account_search_vf)->expression) ) {
break;
@@ -1127,9 +1133,14 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
}
g_signal_emit (emfb, folder_browser_signals [ACCOUNT_SEARCH_CLEARED], 0);
gtk_widget_set_sensitive (esb->scopeoption, TRUE);
+ g_free (word);
+ word = NULL;
break;
}
+ g_free (word);
+ word = NULL;
+
g_object_get (esb, "query", &search_word, NULL);
if (search_word && efb->all_account_search_vf && !strcmp (search_word, ((CamelVeeFolder *) efb->all_account_search_vf)->expression) ) {
@@ -1192,11 +1203,19 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
g_object_get (esb, "state", &search_state, NULL);
camel_object_meta_set (emfv->folder, "evolution:search_state", search_state);
camel_object_state_write (emfv->folder);
+ g_free (search_state);
+
+ if (search_word) {
+ g_free (search_word);
+ search_word = NULL;
+ }
/* Merge the view and search expresion*/
view_sexp = get_view_query (esb, emfv->folder, emfv->folder_uri);
g_object_get (esb, "query", &search_word, NULL);
+ word = search_word;
+
if (search_word && *search_word)
search_word = g_strconcat ("(and ", view_sexp, search_word, " )", NULL);
else
@@ -1204,6 +1223,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
message_list_set_search(emfb->view.list, search_word);
+ g_free (word);
g_free (search_word);
g_free (view_sexp);
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 029e2c20f6..812fcc80d8 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-24 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #402487
+
+ * e-search-bar.c: (search_now_verb_cb), (scopeoption_changed_cb):
+ Memory leak fix.
+
2008-01-24 Srinivasa Ragavan <sragavan@novell.com>
* e-multi-config-dialog.c: (canvas_realize),
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 0365938507..fa2813da5d 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -205,7 +205,7 @@ search_now_verb_cb (BonoboUIComponent *ui_component,
{
ESearchBar *esb;
GtkStyle *style = gtk_widget_get_default_style ();
- const char *text;
+ char *text;
esb = E_SEARCH_BAR (data);
text = e_search_bar_get_text (esb);
@@ -222,6 +222,7 @@ search_now_verb_cb (BonoboUIComponent *ui_component,
gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
}
+ g_free (text);
emit_search_activated (esb);
}
@@ -530,7 +531,7 @@ entry_key_press_cb (GtkWidget *widget,
static void
scopeoption_changed_cb (GtkWidget *option_menu, ESearchBar *search_bar)
{
- const gchar *text = NULL;
+ char *text = NULL;
text = e_search_bar_get_text (search_bar);
if (!(text && *text))
@@ -538,6 +539,8 @@ scopeoption_changed_cb (GtkWidget *option_menu, ESearchBar *search_bar)
if(!search_bar->block_search)
emit_query_changed (search_bar);
+
+ g_free (text);
}
#endif