From f68ef51327afc9c49b9cf0c71666fca8c3a806a9 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 19 May 2003 19:41:05 +0000 Subject: Removed "forced_upgrade" unused variable. (show_development_warning): Put * main.c: Removed "forced_upgrade" unused variable. (show_development_warning): Put in a DEVELOPMENT_WARNING cpp conditional. (warning_dialog_response_callback): Likewise. (view_map_callback): Likewise. (new_view_created_callback): Likewise. (idle_cb) [DEVELOPMENT_WARNING]: Do not connect new_view_created_callback() to the "new_view" shell signal anymore. * Makefile.am (install-evolution) [DEFAULT_BINARY]: Make a symbolic link from evolution to evolution-$(BASE_VERSION). * e-shell-folder-creation-dialog.c (dialog_data_destroy): g_object_weak_unref shell and dialog if they are not NULL. (dialog_destroy_notify): Set ->dialog to NULL in all cases. svn path=/trunk/; revision=21267 --- shell/e-shell-folder-creation-dialog.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'shell/e-shell-folder-creation-dialog.c') diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c index 4f2afc819e..1a4afb1403 100644 --- a/shell/e-shell-folder-creation-dialog.c +++ b/shell/e-shell-folder-creation-dialog.c @@ -51,6 +51,10 @@ #define GLADE_FILE_NAME EVOLUTION_GLADEDIR "/e-shell-folder-creation-dialog.glade" +/* Forward declarations for the weak references. */ +static void dialog_destroy_notify (void *data, GObject *where_the_dialog_was); +static void shell_destroy_notify (void *data, GObject *where_the_shell_was); + /* Data for the callbacks. */ struct _DialogData { GtkWidget *dialog; @@ -77,6 +81,12 @@ dialog_data_destroy (DialogData *dialog_data) e_free_string_list (dialog_data->folder_types); g_free (dialog_data->folder_path); + if (dialog_data->dialog != NULL) + g_object_weak_unref (G_OBJECT (dialog_data->dialog), dialog_destroy_notify, dialog_data); + + if (dialog_data->shell != NULL) + g_object_weak_unref (G_OBJECT (dialog_data->shell), shell_destroy_notify, dialog_data); + g_free (dialog_data); } @@ -217,12 +227,12 @@ dialog_destroy_notify (void *data, DialogData *dialog_data; dialog_data = (DialogData *) data; + dialog_data->dialog = NULL; if (dialog_data->creation_in_progress) { /* If the dialog has been closed before we are done creating the folder, the dialog_data will be freed after the creation is completed. */ - dialog_data->dialog = NULL; dialog_data->folder_name_entry = NULL; dialog_data->storage_set_view = NULL; dialog_data->folder_type_option_menu = NULL; -- cgit v1.2.3