diff options
author | Chris Toshok <toshok@ximian.com> | 2003-02-04 08:13:38 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-02-04 08:13:38 +0800 |
commit | 3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff (patch) | |
tree | c34a42bf6f77779ee72a0395f88114e837368bee /addressbook | |
parent | 742bc235c0a29798db53c58a71e09bdb0a8764b1 (diff) | |
download | gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.tar gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.tar.gz gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.tar.bz2 gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.tar.lz gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.tar.xz gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.tar.zst gsoc2013-evolution-3b2bc2c2447068b3c1a8d31aaa90e21b2b8f79ff.zip |
[ pull forward Jack Jia's fix for #34900 ] use a weak ref for the file
2003-02-03 Chris Toshok <toshok@ximian.com>
[ pull forward Jack Jia's fix for #34900 ]
* gui/contact-editor/e-contact-save-as.c (e_contact_save_as): use
a weak ref for the file selector.
(e_contact_list_save_as): same.
(destroy_it): rewrite this as a weak ref notify function.
(close_it): remove frees of the info (it's freed in the weak ref
function).
(save_it): same.
svn path=/trunk/; revision=19722
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 11 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-save-as.c | 13 |
2 files changed, 15 insertions, 9 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 05385eea62..50caffc8a9 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,16 @@ 2003-02-03 Chris Toshok <toshok@ximian.com> + [ pull forward Jack Jia's fix for #34900 ] + * gui/contact-editor/e-contact-save-as.c (e_contact_save_as): use + a weak ref for the file selector. + (e_contact_list_save_as): same. + (destroy_it): rewrite this as a weak ref notify function. + (close_it): remove frees of the info (it's freed in the weak ref + function). + (save_it): same. + +2003-02-03 Chris Toshok <toshok@ximian.com> + * gui/component/addressbook-component.c (remove_folder): pull forward Jack Jia's fix for #33672, but convert it to use unlink instead of the gnome-vfs stuff. diff --git a/addressbook/gui/contact-editor/e-contact-save-as.c b/addressbook/gui/contact-editor/e-contact-save-as.c index 48abe98813..2478eadeb1 100644 --- a/addressbook/gui/contact-editor/e-contact-save-as.c +++ b/addressbook/gui/contact-editor/e-contact-save-as.c @@ -76,22 +76,19 @@ save_it(GtkWidget *widget, SaveAsInfo *info) return; } - g_free (info->vcard); gtk_widget_destroy(GTK_WIDGET(info->filesel)); - g_free(info); } static void close_it(GtkWidget *widget, SaveAsInfo *info) { - g_free (info->vcard); gtk_widget_destroy (GTK_WIDGET (info->filesel)); - g_free (info); } static void -delete_it(GtkWidget *widget, SaveAsInfo *info) +destroy_it(void *data, GObject *where_the_object_was) { + SaveAsInfo *info = data; g_free (info->vcard); g_free (info); } @@ -143,8 +140,7 @@ e_contact_save_as(char *title, ECard *card, GtkWindow *parent_window) G_CALLBACK (save_it), info); g_signal_connect(filesel->cancel_button, "clicked", G_CALLBACK (close_it), info); - g_signal_connect(filesel, "delete_event", - G_CALLBACK (delete_it), info); + g_object_weak_ref (G_OBJECT (filesel), destroy_it, info); if (parent_window) { gtk_window_set_transient_for (GTK_WINDOW (filesel), @@ -186,8 +182,7 @@ e_contact_list_save_as(char *title, GList *list, GtkWindow *parent_window) G_CALLBACK (save_it), info); g_signal_connect(filesel->cancel_button, "clicked", G_CALLBACK (close_it), info); - g_signal_connect(filesel, "delete_event", - G_CALLBACK (delete_it), info); + g_object_weak_ref (G_OBJECT (filesel), destroy_it, info); if (parent_window) { gtk_window_set_transient_for (GTK_WINDOW (filesel), |