Use compact menu as the main menu when building for Maemo

This commit is contained in:
Christian Dywan 2009-10-12 13:02:39 +02:00
parent c3217c6365
commit 641553d312

View file

@ -2813,11 +2813,13 @@ _action_compact_menu_populate_popup (GtkAction* action,
{ "Print" }, { "Print" },
{ "PrivateBrowsing" }, { "PrivateBrowsing" },
{ NULL }, { NULL },
#if !HAVE_HILDON
{ "Bookmarkbar" }, { "Bookmarkbar" },
{ "Panel" }, { "Panel" },
{ "Statusbar" }, { "Statusbar" },
{ NULL }, { NULL },
{ "-" }, { "-" },
#endif
{ "ClearPrivateData" }, { "ClearPrivateData" },
{ "Fullscreen" }, { "Fullscreen" },
{ "Preferences" }, { "Preferences" },
@ -5302,15 +5304,8 @@ midori_browser_init (MidoriBrowser* browser)
/* Create the menubar */ /* Create the menubar */
browser->menubar = gtk_ui_manager_get_widget (ui_manager, "/menubar"); browser->menubar = gtk_ui_manager_get_widget (ui_manager, "/menubar");
#if HAVE_HILDON #if HAVE_HILDON
menu = gtk_menu_new (); browser->menubar = gtk_menu_new ();
children = gtk_container_get_children (GTK_CONTAINER (browser->menubar)); _action_compact_menu_populate_popup (NULL, browser->menubar, browser);
while (children)
{
menuitem = GTK_WIDGET (children->data);
gtk_widget_reparent (menuitem, menu);
children = g_list_next (children);
}
browser->menubar = menu;
hildon_window_set_menu (HILDON_WINDOW (browser), GTK_MENU (browser->menubar)); hildon_window_set_menu (HILDON_WINDOW (browser), GTK_MENU (browser->menubar));
hildon_program_add_window (hildon_program_get_instance (), hildon_program_add_window (hildon_program_get_instance (),
HILDON_WINDOW (browser)); HILDON_WINDOW (browser));