summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-07-21 06:27:12 +0000
committerTim Janik <timj@src.gnome.org>1999-07-21 06:27:12 +0000
commit32e24f9f32f6322880bcaacabec36b4c38a5dba3 (patch)
tree04fff280bafa64ab6ea070ccfcb86c925cfd0e1c
parentf50fed40981e8d2783be743dfc4149bba01e7343 (diff)
downloadgdk-pixbuf-32e24f9f32f6322880bcaacabec36b4c38a5dba3.tar.gz
special case option menus here as they are not derived from menu shell,
Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org> * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case option menus here as they are not derived from menu shell, assure that the option menu has a menu we can add items to.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-06
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkitemfactory.c11
8 files changed, 53 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 41ccfe2c1..d36ac966d 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c
index f24989fbf..9745f0778 100644
--- a/gtk/gtkitemfactory.c
+++ b/gtk/gtkitemfactory.c
@@ -981,6 +981,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
gpointer callback_data,
guint callback_type)
{
+ GtkOptionMenu *option_menu = NULL;
GtkWidget *parent;
GtkWidget *widget;
GSList *radio_group;
@@ -1077,6 +1078,14 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
}
g_free (parent_path);
+ if (GTK_IS_OPTION_MENU (parent))
+ {
+ option_menu = GTK_OPTION_MENU (parent);
+ if (!option_menu->menu)
+ gtk_option_menu_set_menu (option_menu, gtk_widget_new (GTK_TYPE_MENU, NULL));
+ parent = option_menu->menu;
+ }
+
g_return_if_fail (GTK_IS_CONTAINER (parent));
widget = gtk_widget_new (type,
@@ -1085,6 +1094,8 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
type_id != quark_type_title),
"GtkWidget::parent", parent,
NULL);
+ if (option_menu && !option_menu->menu_item)
+ gtk_option_menu_set_history (option_menu, 0);
if (type == GTK_TYPE_RADIO_MENU_ITEM)
gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (widget), radio_group);