X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-main-window.c;h=65fa35f9ea796d659a15fb8b9a8f9f791f055ed3;hp=59532f80eac650472d5e6c176d81c17c7786d299;hb=3e7a3b4e5759d63285d8795435b2ceedaf63b216;hpb=da38136b9bfda1875a680a5e0bbb404b2c367d7d diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index 59532f8..65fa35f 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -39,13 +39,13 @@ #include #include + #include "modest-widget-memory.h" #include "modest-window-priv.h" #include "modest-main-window-ui.h" #include "modest-account-mgr.h" #include "modest-conf.h" - -#include "modest-maemo-utils.h" +#include #include "modest-tny-platform-factory.h" #include "modest-tny-msg.h" #include "modest-mail-operation.h" @@ -279,30 +279,6 @@ on_delete_event (GtkWidget *widget, GdkEvent *event, ModestMainWindow *self) return FALSE; } -static GtkWidget * -menubar_to_menu (GtkUIManager *ui_manager) -{ - GtkWidget *main_menu; - GtkWidget *menubar; - GList *iter; - - /* Create new main menu */ - main_menu = gtk_menu_new(); - - /* Get the menubar from the UI manager */ - menubar = gtk_ui_manager_get_widget (ui_manager, "/MenuBar"); - - iter = gtk_container_get_children (GTK_CONTAINER (menubar)); - while (iter) { - GtkWidget *menu; - - menu = GTK_WIDGET (iter->data); - gtk_widget_reparent(menu, main_menu); - - iter = g_list_next (iter); - } - return main_menu; -} static GtkWidget* get_toolbar (ModestMainWindow *self) @@ -441,7 +417,7 @@ modest_main_window_new (void) hildon_window_add_toolbar (HILDON_WINDOW (self), GTK_TOOLBAR (parent_priv->toolbar)); /* Menubar */ - parent_priv->menubar = menubar_to_menu (parent_priv->ui_manager); + parent_priv->menubar = modest_maemo_utils_menubar_to_menu (parent_priv->ui_manager); hildon_window_set_menu (HILDON_WINDOW (self), GTK_MENU (parent_priv->menubar)); /* folder view */