[evolution-patches] Shell patch (#43216)
- From: Ettore Perazzoli <ettore ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Shell patch (#43216)
- Date: 17 May 2003 20:43:24 -0400
A case of g_object_weak_ref() without g_object_weak_unref(). ("Oops!")
-- Ettore
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1275
diff -u -p -r1.1275 ChangeLog
--- ChangeLog 15 May 2003 18:19:16 -0000 1.1275
+++ ChangeLog 18 May 2003 00:37:45 -0000
@@ -1,3 +1,17 @@
+2003-05-17 Ettore Perazzoli <ettore ximian com>
+
+ [#43216]
+
+ * 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.
+
+2003-05-17 Ettore Perazzoli <ettore ximian com>
+
+ * e-storage-set-view.c (e_storage_set_view_set_show_checkboxes):
+ Reallocate the "expansions" member of ETreeState as well, to avoid
+ a memory error. [#43119]
+
2003-05-15 Ettore Perazzoli <ettore ximian com>
* e-shell.c (parse_default_uri): Protect against the component
Index: e-shell-folder-creation-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-folder-creation-dialog.c,v
retrieving revision 1.50
diff -u -p -r1.50 e-shell-folder-creation-dialog.c
--- e-shell-folder-creation-dialog.c 8 May 2003 19:36:47 -0000 1.50
+++ e-shell-folder-creation-dialog.c 18 May 2003 00:37:47 -0000
@@ -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_
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]