]> Pileus Git - ~andy/gtk/commitdiff
fix implicit branch creation, we need the *real* parent path for this and
authorTim Janik <timj@gtk.org>
Tue, 23 Feb 1999 19:42:53 +0000 (19:42 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 23 Feb 1999 19:42:53 +0000 (19:42 +0000)
Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>

        * 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
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkitemfactory.c

index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 0e570a46f952b70aa0322953794a222a060d7b6d..07fa20702fe9830ab0c9fe0bdfcb28e0836060ee 100644 (file)
@@ -1,3 +1,10 @@
+Tue Feb 23 17:52:37 1999  Tim Janik  <timj@gtk.org>
+
+       * 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  <pavel@artax.karlin.mff.cuni.cz>
 
        * gtk/gtkentry.c (gtk_entry_finalize): trivial bugfix
index 72f5b859d46c9ff28a6ce01585712013039555bb..027b6314c5dcb3c0a43a5b606d702c5920a127f7 100644 (file)
@@ -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 = "<Branch>";
 
       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);