diff options
-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), |