--- gdm-2.19.3/gui/greeter/greeter_canvas_item.c.orig	2007-07-17 09:00:49.714861000 +0900
+++ gdm-2.19.3/gui/greeter/greeter_canvas_item.c	2007-07-17 14:03:51.665954000 +0900
@@ -146,10 +146,11 @@ menubar_done (GtkMenuShell *menushell, g
 }
 
 static GtkWidget *
-make_menubar (void)
+make_menubar (gchar *button_id)
 {
 	GtkWidget *w, *menu;
 	GtkWidget *menubar = gtk_menu_bar_new ();
+	GreeterItemInfo *item = greeter_lookup_id (button_id);
 
 	/* FIXME: add translatable string here */
 	w = gtk_menu_item_new_with_label ("Menu");
@@ -159,25 +160,31 @@ make_menubar (void)
 	menu = gtk_menu_new ();
 	gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), menu);
 
-	w = gtk_image_menu_item_new_with_mnemonic (_("Select _Language..."));
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (w), 
-		gtk_image_new_from_icon_name ("preferences-desktop-locale", GTK_ICON_SIZE_MENU));
-
-	gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
-	gtk_widget_show (GTK_WIDGET (w));
-	g_signal_connect (G_OBJECT (w), "activate",
-			  G_CALLBACK (activate_button),
-			  "language_button");
-
-	w = gtk_image_menu_item_new_with_mnemonic (_("Select _Session..."));
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (w), 
-		gtk_image_new_from_icon_name ("user-desktop", GTK_ICON_SIZE_MENU));
-
-	gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
-	gtk_widget_show (GTK_WIDGET (w));
-	g_signal_connect (G_OBJECT (w), "activate",
-			  G_CALLBACK (activate_button),
-			  "session_button");
+	if (item && item->lang_menu)
+	  {
+	    w = gtk_image_menu_item_new_with_mnemonic (_("Select _Language..."));
+	    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (w), 
+		    gtk_image_new_from_icon_name ("preferences-desktop-locale", GTK_ICON_SIZE_MENU));
+
+	    gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
+	    gtk_widget_show (GTK_WIDGET (w));
+	    g_signal_connect (G_OBJECT (w), "activate",
+			      G_CALLBACK (activate_button),
+			      "language_button");
+	  }
+
+	if (item && item->session_menu)
+	  {
+	    w = gtk_image_menu_item_new_with_mnemonic (_("Select _Session..."));
+	    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (w), 
+		    gtk_image_new_from_icon_name ("user-desktop", GTK_ICON_SIZE_MENU));
+
+	    gtk_menu_shell_append (GTK_MENU_SHELL (menu), w);
+	    gtk_widget_show (GTK_WIDGET (w));
+	    g_signal_connect (G_OBJECT (w), "activate",
+			      G_CALLBACK (activate_button),
+			      "session_button");
+	  }
 
 	greeter_system_append_system_menu (menu);
 
@@ -284,6 +291,7 @@ greeter_item_create_canvas_item (Greeter
   GtkTooltips *tooltips;
   char *num_locale;
   GdkColor c;
+  const gchar *button_id = "options_button";
 
   if (item->item != NULL)
     return;
@@ -479,7 +487,7 @@ greeter_item_create_canvas_item (Greeter
 	     * should probably be done in the pam item setup thingie.
 	     * but this is really widget kind of thing.  I dunno where
 	     * this belongs but it's a hack here. */
-	    item->data.text.menubar = make_menubar ();
+	    item->data.text.menubar = make_menubar (button_id);
 
 	    gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (canvas)),
 				   GNOME_TYPE_CANVAS_WIDGET,
@@ -490,7 +498,7 @@ greeter_item_create_canvas_item (Greeter
 				   "width", (double)rect.width,
 				   NULL);
 
-	    greeter_item_register_action_callback ("options_button",
+	    greeter_item_register_action_callback (button_id,
 						   (ActionFunc)greeter_options_handler,
 						   item->data.text.menubar);
 	    
--- gdm-2.19.3/gui/greeter/greeter_item.c.orig	2007-07-17 09:23:30.737196000 +0900
+++ gdm-2.19.3/gui/greeter/greeter_item.c	2007-07-17 14:02:44.869893000 +0900
@@ -82,6 +82,8 @@ greeter_item_info_new (GreeterItemInfo *
   info->canvasbutton = FALSE;
   info->gtkbutton    = FALSE;
   info->background   = FALSE;
+  info->lang_menu    = TRUE;
+  info->session_menu = TRUE;
 
   if (GREETER_ITEM_TYPE_IS_TEXT (info))
     {
--- gdm-2.19.3/gui/greeter/greeter_item.h.orig	2007-07-17 09:04:58.600902000 +0900
+++ gdm-2.19.3/gui/greeter/greeter_item.h	2007-07-17 13:49:09.674843000 +0900
@@ -127,6 +127,10 @@ struct _GreeterItemInfo {
   /* item is used to draw background */
   guint background:1;
 
+  /* is shown menu items in Options Button */
+  guint lang_menu:1;
+  guint session_menu:1;
+
   /* geometry handling: */
   guint has_requisition:1;
   GtkRequisition requisition;
--- gdm-2.19.3/gui/greeter/greeter_parser.c.orig	2007-07-17 09:59:57.573409000 +0900
+++ gdm-2.19.3/gui/greeter/greeter_parser.c	2007-07-17 14:07:43.730782000 +0900
@@ -44,12 +44,20 @@
 /* FIXME: hack */
 extern GreeterItemInfo *welcome_string_info;
 
+typedef enum _GreeterMenuName GreeterMenuName;
+
 /* evil globals */
 static char *file_search_path = NULL;
 static GList *button_stack = NULL;
 
 static GHashTable *pixbuf_hash = NULL;
 
+static  enum _GreeterMenuName {
+    GREETER_MENU_TYPE_NONE,
+    GREETER_MENU_TYPE_LANG,
+    GREETER_MENU_TYPE_SESSION,
+};
+
 GHashTable *item_hash = NULL;
 GList *custom_items = NULL;
 
@@ -452,6 +460,76 @@ parse_stock (xmlNodePtr node,
     }
 }
 
+static gboolean
+parse_menu (xmlNodePtr       node,
+	    GreeterItemInfo *info,
+	    GError         **error)
+{
+  xmlChar *prop;
+  GreeterMenuName name = GREETER_MENU_TYPE_NONE;
+  gboolean show = TRUE;
+
+  prop = xmlGetProp (node,(const xmlChar *) "name");
+  if (prop)
+    {
+      if (strcmp ((char *) prop, "lang_menu") == 0)
+	{
+	  name = GREETER_MENU_TYPE_LANG;
+	}
+      else if (strcmp ((char *) prop, "session_menu") == 0)
+	{
+	  name = GREETER_MENU_TYPE_SESSION;
+	}
+      else
+	{
+	  g_set_error (error,
+		       GREETER_PARSER_ERROR,
+		       GREETER_PARSER_ERROR_BAD_SPEC,
+		       "bad button spec %s", prop);
+	  xmlFree (prop);
+	  return FALSE;
+	}
+      xmlFree (prop);
+    }
+
+  prop = xmlGetProp (node,(const xmlChar *) "show");
+  if (prop)
+    {
+      if (strcmp ((char *) prop, "true") == 0)
+	{
+	  show = TRUE;
+	}
+      else if (strcmp ((char *) prop, "false") == 0)
+	{
+	  show = FALSE;
+	}
+      else
+	{
+	  g_set_error (error,
+		       GREETER_PARSER_ERROR,
+		       GREETER_PARSER_ERROR_BAD_SPEC,
+		       "bad button spec %s", prop);
+	  xmlFree (prop);
+	  return FALSE;
+	}
+      xmlFree (prop);
+    }
+
+  switch (name)
+    {
+    case GREETER_MENU_TYPE_LANG:
+      info->lang_menu = show;
+      break;
+    case GREETER_MENU_TYPE_SESSION:
+      info->session_menu = show;
+      break;
+    default:
+      break;
+    }
+
+  return TRUE;
+}
+
 static void
 do_font_size_reduction (GreeterItemInfo *info)
 {
@@ -534,6 +612,11 @@ parse_gtkbutton (xmlNodePtr node,
 	  if G_UNLIKELY (!parse_stock (child, info, &translated_text, &translation_score, error))
 	    return FALSE;
 	}
+      else if (strcmp ((char *) child->name, "menu") == 0)
+	{
+	  if G_UNLIKELY (!parse_menu (child, info, error))
+	    return FALSE;
+	}
 
       child = child->next;
     }
--- gdm-2.19.3/gui/greeter/themes/circles/circles.xml.orig	2007-07-17 09:35:28.988718000 +0900
+++ gdm-2.19.3/gui/greeter/themes/circles/circles.xml	2007-07-17 14:34:20.421286000 +0900
@@ -16,9 +16,12 @@
           <item type="button" id="options_button" button="true">
             <pos y="5" width="80" height="50"/>
             <stock type="options"/>
+            <menu name="lang_menu" show="false"/>
+            <menu name="session_menu" show="false"/>
           </item>
-          <item type="list" id="language" combo="true">
+          <item type="button" id="language_button" button="true">
             <pos  x="25" y="10" height="40" width="300"/>
+            <stock type="language"/>
           </item>
           <item type="list" id="session" combo="true">
             <pos x="50" y="10" height="40" width="300"/>
--- gdm-2.19.3/gui/greeter/themes/happygnome-list/happygnome.xml.orig	2007-07-17 09:35:28.988755000 +0900
+++ gdm-2.19.3/gui/greeter/themes/happygnome-list/happygnome.xml	2007-07-17 14:34:56.442442000 +0900
@@ -16,9 +16,12 @@
           <item type="button" id="options_button">
             <pos width="100" height="50" />
             <stock type="options"/>
+            <menu name="lang_menu" show="false"/>
+            <menu name="session_menu" show="false"/>
           </item>
-          <item type="list" id="language" combo="true">
+          <item type="button" id="language_button" button="true">
             <pos  x="25" y="5" height="40" width="300"/>
+            <stock type="language"/>
           </item>
           <item type="list" id="session" combo="true">
             <pos x="50" y="5" height="40" width="300"/>
--- gdm-2.19.3/gui/greeter/themes/happygnome/happygnome.xml.orig	2007-07-17 09:35:28.988784000 +0900
+++ gdm-2.19.3/gui/greeter/themes/happygnome/happygnome.xml	2007-07-17 14:35:54.596896000 +0900
@@ -16,9 +16,12 @@
           <item type="button" id="options_button">
             <pos width="100" height="50" />
             <stock type="options"/>
+            <menu name="lang_menu" show="false"/>
+            <menu name="session_menu" show="false"/>
           </item>
-          <item type="list" id="language" combo="true">
+          <item type="button" id="language_button" button="true">
             <pos  x="25" y="5" height="40" width="300"/>
+            <stock type="language"/>
           </item>
           <item type="list" id="session" combo="true">
             <pos x="50" y="5" height="40" width="300"/>
