Index: appwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/appwindow.c,v
retrieving revision 1.34
diff -u -r1.34 appwindow.c
--- appwindow.c	12 Oct 2005 13:23:10 -0000	1.34
+++ appwindow.c	8 Feb 2006 19:24:44 -0000
@@ -196,6 +196,7 @@
     "_Quit", "<control>Q",                     /* label, accelerator */     
     "Quit",                                    /* tooltip */
     G_CALLBACK (activate_action) },
+  { "EmptyMenuItem", NULL, "_Empty menu item"},/* name, stock id, label */
   { "About", NULL,                             /* name, stock id */
     "_About", "<control>A",                    /* label, accelerator */     
     "About",                                   /* tooltip */  
@@ -278,6 +279,7 @@
 "        <menuitem action='Oval'/>"
 "      </menu>"
 "      <menuitem action='Bold'/>"
+"      <menu action='EmptyMenuItem'/>"
 "    </menu>"
 "    <menu action='HelpMenu'>"
 "      <menuitem action='About'/>"
@@ -433,6 +435,8 @@
       GtkTextBuffer *buffer;
       GtkActionGroup *action_group;
       GtkAction *open_action;
+      GtkAction *empty_action;
+      GValue value = {0, };
       GtkUIManager *merge;
       GError *error = NULL;
 
@@ -483,6 +487,10 @@
 					  SHAPE_SQUARE,
 					  G_CALLBACK (activate_radio_action), 
 					  NULL);
+      empty_action = gtk_action_group_get_action (action_group, "EmptyMenuItem");
+      g_value_init (&value, G_TYPE_BOOLEAN);
+      g_value_set_boolean (&value, FALSE);
+      g_object_set_property (G_OBJECT (empty_action), "hide-if-empty", &value);
 
       merge = gtk_ui_manager_new ();
       g_object_set_data_full (G_OBJECT (window), "ui-manager", merge, 
