From 26ffb00362cb61b5a73bc86db64de45ae234ccbe Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 23 Feb 1999 19:42:53 +0000 Subject: [PATCH] fix implicit branch creation, we need the *real* parent path for this and Tue Feb 23 17:52:37 1999 Tim Janik * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit branch creation, we need the *real* parent path for this and gtk_item_factory_parse_path() only returns the parent path with "_?" stripped off. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkitemfactory.c | 9 ++++++++- 8 files changed, 57 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0e570a46f..07fa20702 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 0e570a46f..07fa20702 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0e570a46f..07fa20702 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0e570a46f..07fa20702 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0e570a46f..07fa20702 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0e570a46f..07fa20702 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0e570a46f..07fa20702 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Tue Feb 23 17:52:37 1999 Tim Janik + + * gtk/gtkitemfactory.c (gtk_item_factory_create_item): fix implicit + branch creation, we need the *real* parent path for this and + gtk_item_factory_parse_path() only returns the parent path with "_?" + stripped off. + 1999-02-23 Pavel Machek * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index 72f5b859d..027b6314c 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -1024,16 +1024,23 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, if (!parent) { GtkItemFactoryEntry pentry; + gchar *ppath, *p; - pentry.path = parent_path; + ppath = g_strdup (entry->path); + p = strrchr (ppath, '/'); + g_return_if_fail (p != NULL); + *p = 0; + pentry.path = ppath; pentry.accelerator = NULL; pentry.callback = NULL; pentry.callback_action = 0; pentry.item_type = ""; gtk_item_factory_create_item (ifactory, &pentry, NULL, 1); + g_free (ppath); parent = gtk_item_factory_get_widget (ifactory, parent_path); + g_return_if_fail (parent != NULL); } g_free (parent_path); -- 2.43.2