evolution sensitivity race ...
- From: Michael Meeks <michael ximian com>
- To: Alex Larsson <alexl redhat com>, Ettore Perazzoli <ettore ximian com>
- Cc: bonobo <gnome-components-list gnome org>
- Subject: evolution sensitivity race ...
- Date: 21 Jan 2002 12:00:50 +0000
Hi Guys,
I think this patch fixes it; at least I've been running it for a while
without issues - I think the previous property sets were not creating a
new node owned by the right component - and thus the old component could
be overwriting the new sensitivity settings on a folder switch.
I'll do a release tomorrow with this if no-one shouts.
Regards,
Michael.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.1156
diff -u -p -u -r1.1156 ChangeLog
--- ChangeLog 2002/01/10 14:03:36 1.1156
+++ ChangeLog 2002/01/21 11:55:05
@@ -1,3 +1,16 @@
+2002-01-21 Michael Meeks <michael ximian com>
+
+ * bonobo/bonobo-ui-engine.c
+ (get_parent_path): impl.
+ (bonobo_ui_engine_xml_set_prop): re-write to preserve
+ ordering and component ownership information.
+
+2002-01-10 Michael Meeks <michael ximian com>
+
+ * bonobo/bonobo-ui-sync-menu.c (radio_group_destroy):
+ kill bogus g_slist_free on a GtkWidget, this seems to
+ never get called.
+
2002-01-10 Michael Meeks <michael ximian com>
* Version 1.0.18
Index: bonobo/bonobo-ui-engine.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-ui-engine.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 bonobo-ui-engine.c
--- bonobo/bonobo-ui-engine.c 2001/12/18 15:37:56 1.19
+++ bonobo/bonobo-ui-engine.c 2002/01/21 11:55:06
@@ -1188,6 +1188,27 @@ bonobo_ui_engine_object_get (BonoboUIEng
return BONOBO_UI_ERROR_OK;
}
+static char *
+get_parent_path (const char *path)
+{
+ int i, last_slash = 0;
+ char *ret;
+
+ for (i = 0; path [i]; i++) {
+ if (path [i] == '/')
+ last_slash = i;
+ }
+
+ if (!last_slash)
+ return NULL;
+
+ ret = g_malloc (last_slash + 1);
+ memcpy (ret, path, last_slash);
+ ret [last_slash] = '\0';
+
+ return ret;
+}
+
/**
* bonobo_ui_engine_xml_set_prop:
* @engine: the engine
@@ -1208,20 +1229,26 @@ bonobo_ui_engine_xml_set_prop (BonoboUIE
const char *value,
const char *component)
{
- BonoboUINode *node;
+ char *parent_path;
+ BonoboUINode *copy;
+ BonoboUINode *original;
g_return_val_if_fail (BONOBO_IS_UI_ENGINE (engine),
BONOBO_UI_ERROR_BAD_PARAM);
- node = bonobo_ui_engine_get_path (engine, path);
+ original = bonobo_ui_engine_get_path (engine, path);
- if (!node)
+ if (!original)
return BONOBO_UI_ERROR_INVALID_PATH;
- bonobo_ui_node_set_attr (node, property, value);
- bonobo_ui_xml_set_dirty (engine->priv->tree, node);
-
- bonobo_ui_engine_update (engine);
+ copy = bonobo_ui_node_new (bonobo_ui_node_get_name (original));
+ bonobo_ui_node_copy_attrs (original, copy);
+ bonobo_ui_node_set_attr (copy, property, value);
+
+ parent_path = get_parent_path (path);
+ bonobo_ui_engine_xml_merge_tree (
+ engine, parent_path, copy, component);
+ g_free (parent_path);
return BONOBO_UI_ERROR_OK;
}
Index: bonobo/bonobo-ui-node.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-ui-node.c,v
retrieving revision 1.18
diff -u -p -u -r1.18 bonobo-ui-node.c
--- bonobo/bonobo-ui-node.c 2001/12/15 15:13:29 1.18
+++ bonobo/bonobo-ui-node.c 2002/01/21 11:55:06
@@ -515,8 +515,7 @@ bonobo_ui_node_transparent (BonoboUINode
if (!strcmp (XML_NODE (node)->name, "placeholder"))
ret = TRUE;
else if (!strcmp (XML_NODE (node)->name, "menu"))
- ret = TRUE; /* Odd - Nautilus depends on this
- * for it's root window bits; hmm. */
+ ret = TRUE;
} else if (!n->properties->next) {
if (!strcmp (n->properties->name, "name"))
Index: bonobo/bonobo-ui-sync-menu.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-ui-sync-menu.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 bonobo-ui-sync-menu.c
--- bonobo/bonobo-ui-sync-menu.c 2002/01/10 14:03:38 1.12
+++ bonobo/bonobo-ui-sync-menu.c 2002/01/21 11:55:06
@@ -775,7 +775,6 @@ radio_group_destroy (gpointer key,
gpointer user_data)
{
g_free (key);
- g_slist_free (value);
return TRUE;
}
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]