+2007-04-14 [colin] 2.8.1cvs99
+
+ * src/message_search.c
+ * src/prefs_display_header.c
+ * src/summary_search.c
+ * src/gtk/combobox.c
+ Fix allocations
+
2007-04-14 [wwp] 2.8.1cvs98
* src/gtk/combobox.c
( cvs diff -u -r 1.3.12.24 -r 1.3.12.25 src/message_search.c; cvs diff -u -r 1.16.2.24 -r 1.16.2.25 src/prefs_display_header.c; cvs diff -u -r 1.15.2.45 -r 1.15.2.46 src/summary_search.c; ) > 2.8.1cvs96.patchset
( cvs diff -u -r 1.1.2.65 -r 1.1.2.66 src/gtk/quicksearch.c; ) > 2.8.1cvs97.patchset
( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/gtk/combobox.c; cvs diff -u -r 1.3.12.25 -r 1.3.12.26 src/message_search.c; cvs diff -u -r 1.15.2.46 -r 1.15.2.47 src/summary_search.c; cvs diff -u -r 1.16.2.25 -r 1.16.2.26 src/prefs_display_header.c; ) > 2.8.1cvs98.patchset
+( cvs diff -u -r 1.3.12.26 -r 1.3.12.27 src/message_search.c; cvs diff -u -r 1.16.2.26 -r 1.16.2.27 src/prefs_display_header.c; cvs diff -u -r 1.15.2.47 -r 1.15.2.48 src/summary_search.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/combobox.c; ) > 2.8.1cvs99.patchset
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=98
+EXTRA_VERSION=99
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
/* if current text is in list, get prev or next one */
if (keyval == GDK_Up) {
- const gchar *text = gtk_combo_box_get_active_text(combobox);
+ gchar *text = gtk_combo_box_get_active_text(combobox);
if (!text)
- text = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(combobox)));
+ text = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(combobox))),0,-1);
valid = gtkut_tree_model_text_iter_prev(model, &iter, text);
+ g_free(text);
} else
if (keyval == GDK_Down)
valid = gtk_tree_model_iter_next(model, &iter);
body_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.body_entry));
if (!body_str)
- body_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.body_entry)));
+ body_str = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.body_entry))),0,-1);
if (!body_str || *body_str == '\0') return;
/* add to history */
search_window.is_searching = FALSE;
message_hide_stop_button();
+ g_free(body_str);
}
static void body_changed(void)
entry_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(dispheader.hdr_combo));
if (!entry_text)
- entry_text = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(dispheader.hdr_combo)));
+ entry_text = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(dispheader.hdr_combo))),0,-1);
if (!entry_text || entry_text[0] == '\0') {
alertpanel_error(_("Header name is not set."));
return;
dp->name, dp);
prefs_display_header_set_list();
+
+ g_free(entry_text);
}
static void prefs_display_header_register_cb(GtkButton *btn,
}
adv_condition = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.adv_condition_entry));
if (!adv_condition)
- adv_condition = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.adv_condition_entry)));
+ adv_condition = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.adv_condition_entry))),0,-1);
if (adv_condition && adv_condition[0] != '\0') {
/* add to history */
if (!is_fast)
interval = 100;
/* TODO: check for condition parsing error and show an error dialog */
+ g_free(adv_condition);
} else {
/* TODO: warn if no search condition? (or make buttons enabled only when
at least one search condition has been set */
body_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.body_entry));
if (!from_str)
- from_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.from_entry)));
+ from_str = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.from_entry))),0,-1);
if (!to_str)
- to_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.to_entry)));
+ to_str = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.to_entry))),0,-1);
if (!subject_str)
- subject_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.subject_entry)));
+ subject_str = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.subject_entry))),0,-1);
if (!body_str)
- body_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.body_entry)));
+ body_str = gtk_editable_get_chars(
+ GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.body_entry))),0,-1);
if (!from_str || !to_str || !subject_str || !body_str) {
/* TODO: warn if no search criteria? (or make buttons enabled only when
GTK_EVENTS_FLUSH();
}
+ g_free(from_str);
+ g_free(to_str);
+ g_free(subject_str);
+ g_free(body_str);
+
search_window.is_searching = FALSE;
summary_hide_stop_button();
main_window_cursor_normal(summaryview->mainwin);