[evolution-patches] 73375, changing server type -> crash
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 73375, changing server type -> crash
- Date: Mon, 14 Mar 2005 17:49:21 +0800
this may fix the problem, if it doesn't it does fix a problem.
? e-util/em.diff
? e-util/printf.txt
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.529
diff -u -p -r1.529 ChangeLog
--- e-util/ChangeLog 4 Mar 2005 03:07:18 -0000 1.529
+++ e-util/ChangeLog 14 Mar 2005 08:56:09 -0000
@@ -1,3 +1,11 @@
+2005-03-14 Not Zed <NotZed Ximian com>
+
+ ** See bug #73375
+
+ * e-config.c (ec_rebuild): ref-count the config so we keep the
+ 'widget node' around until we are really done with destroying.
+ (ec_widget_destroyed): do the unref.
+
2005-03-01 Not Zed <NotZed Ximian com>
* *.c: Remove/disable debug.
Index: e-util/e-config.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-config.c,v
retrieving revision 1.18
diff -u -p -r1.18 e-config.c
--- e-util/e-config.c 21 Feb 2005 06:36:55 -0000 1.18
+++ e-util/e-config.c 14 Mar 2005 08:56:09 -0000
@@ -412,6 +412,13 @@ ec_druid_next(GnomeDruidPage *page, Gnom
}
static void
+ec_widget_destroyed(GtkWidget *widget, struct _widget_node *wn)
+{
+ wn->widget = NULL;
+ g_object_unref(wn->config);
+}
+
+static void
ec_rebuild(EConfig *emp)
{
struct _EConfigPrivate *p = emp->priv;
@@ -621,8 +628,10 @@ ec_rebuild(EConfig *emp)
section = NULL;
sectionnode = NULL;
wn->widget = page;
- if (page)
- g_signal_connect(page, "destroy", G_CALLBACK(gtk_widget_destroyed), &wn->widget);
+ if (page) {
+ g_object_ref(emp);
+ g_signal_connect(page, "destroy", G_CALLBACK(ec_widget_destroyed), wn);
+ }
break; }
case E_CONFIG_SECTION:
case E_CONFIG_SECTION_TABLE:
@@ -699,8 +708,10 @@ ec_rebuild(EConfig *emp)
sectionno++;
wn->widget = section;
- if (section)
- g_signal_connect(section, "destroy", G_CALLBACK(gtk_widget_destroyed), &wn->widget);
+ if (section) {
+ g_object_ref(emp);
+ g_signal_connect(section, "destroy", G_CALLBACK(ec_widget_destroyed), wn);
+ }
sectionnode = wn;
break;
case E_CONFIG_ITEM:
@@ -732,7 +743,8 @@ ec_rebuild(EConfig *emp)
wn->widget = w;
if (w) {
- g_signal_connect(w, "destroy", G_CALLBACK(gtk_widget_destroyed), &wn->widget);
+ g_object_ref(emp);
+ g_signal_connect(w, "destroy", G_CALLBACK(ec_widget_destroyed), wn);
itemno++;
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]