Fix memory leak.
2001-10-20 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-completion.c (name_style_query): Fix memory leak. * gui/widgets/e-addressbook-view.c (jump_to_letter): Free our string vector letter_v when we are done with it. * gui/contact-editor/e-contact-quick-add.c (edit_card): Unref our QuickAdd structure. * gui/component/e-address-popup.c (e_address_popup_construct): Unref our style after we are done with it. svn path=/trunk/; revision=13835
This commit is contained in:

committed by
Jon Trowbridge

parent
17a415bd21
commit
872eec784e
@ -1,3 +1,17 @@
|
|||||||
|
2001-10-20 Jon Trowbridge <trow@ximian.com>
|
||||||
|
|
||||||
|
* gui/component/select-names/e-select-names-completion.c
|
||||||
|
(name_style_query): Fix memory leak.
|
||||||
|
|
||||||
|
* gui/widgets/e-addressbook-view.c (jump_to_letter): Free our
|
||||||
|
string vector letter_v when we are done with it.
|
||||||
|
|
||||||
|
* gui/contact-editor/e-contact-quick-add.c (edit_card): Unref our
|
||||||
|
QuickAdd structure.
|
||||||
|
|
||||||
|
* gui/component/e-address-popup.c (e_address_popup_construct):
|
||||||
|
Unref our style after we are done with it.
|
||||||
|
|
||||||
2001-10-20 Jon Trowbridge <trow@ximian.com>
|
2001-10-20 Jon Trowbridge <trow@ximian.com>
|
||||||
|
|
||||||
* backend/ebook/e-book.c (activate_factories_for_uri): We
|
* backend/ebook/e-book.c (activate_factories_for_uri): We
|
||||||
|
@ -849,6 +849,7 @@ e_address_popup_construct (EAddressPopup *pop)
|
|||||||
GtkStyle *style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (name_holder)));
|
GtkStyle *style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (name_holder)));
|
||||||
style->bg[0] = color;
|
style->bg[0] = color;
|
||||||
gtk_widget_set_style (GTK_WIDGET (name_holder), style);
|
gtk_widget_set_style (GTK_WIDGET (name_holder), style);
|
||||||
|
gtk_style_unref (style);
|
||||||
}
|
}
|
||||||
|
|
||||||
pop->generic_view = gtk_frame_new (NULL);
|
pop->generic_view = gtk_frame_new (NULL);
|
||||||
|
@ -230,9 +230,12 @@ name_style_query (ESelectNamesCompletion *comp, const gchar *field)
|
|||||||
|
|
||||||
strv = g_strsplit (cpy, " ", 0);
|
strv = g_strsplit (cpy, " ", 0);
|
||||||
for (i=0; strv[i]; ++i) {
|
for (i=0; strv[i]; ++i) {
|
||||||
|
gchar *old;
|
||||||
++count;
|
++count;
|
||||||
g_strstrip (strv[i]);
|
g_strstrip (strv[i]);
|
||||||
strv[i] = g_strdup_printf ("(contains \"%s\" \"%s\")", field, strv[i]);
|
old = strv[i];
|
||||||
|
strv[i] = g_strdup_printf ("(contains \"%s\" \"%s\")", field, old);
|
||||||
|
g_free (old);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
|
@ -219,6 +219,7 @@ static void
|
|||||||
edit_card (QuickAdd *qa)
|
edit_card (QuickAdd *qa)
|
||||||
{
|
{
|
||||||
e_book_use_local_address_book (ce_have_book, qa);
|
e_book_use_local_address_book (ce_have_book, qa);
|
||||||
|
quick_add_unref (qa);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -482,6 +482,7 @@ jump_to_letter(GtkWidget *button, LetterClosure *closure)
|
|||||||
}
|
}
|
||||||
g_string_append (gstr, "))");
|
g_string_append (gstr, "))");
|
||||||
query = gstr->str;
|
query = gstr->str;
|
||||||
|
g_strfreev (letter_v);
|
||||||
g_string_free (gstr, FALSE);
|
g_string_free (gstr, FALSE);
|
||||||
} else {
|
} else {
|
||||||
char s1[6 + 1], s2[6 + 1];
|
char s1[6 + 1], s2[6 + 1];
|
||||||
|
Reference in New Issue
Block a user