2007-07-15 [colin] 2.10.0cvs28
[claws.git] / src / mainwindow.c
index 1c2e834ad598ecfcf4f0e4bcd450111aac2b97ad..6fa82e6cec9708625dff4aac483678b9b82ef63c 100644 (file)
@@ -190,10 +190,11 @@ static void toggle_toolbar_cb      (MainWindow    *mainwin,
 static void toggle_statusbar_cb         (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
+#ifndef MAEMO
 static void set_layout_cb       (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
-
+#endif
 static void addressbook_open_cb        (MainWindow     *mainwin,
                                 guint           action,
                                 GtkWidget      *widget);
@@ -564,6 +565,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/Set displayed _columns/in _Message list..."),NULL, set_summary_display_item_cb, 0, NULL},
 
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
+#ifndef MAEMO
        {N_("/_View/La_yout"),                  NULL, NULL, 0, "<Branch>"},
        {N_("/_View/Layout/_Standard"),         NULL, set_layout_cb, NORMAL_LAYOUT, "<RadioItem>"},
        {N_("/_View/Layout/_Three columns"),    NULL, set_layout_cb, VERTICAL_LAYOUT, "/View/Layout/Standard"},
@@ -571,6 +573,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/Layout/W_ide message list"),NULL, set_layout_cb, WIDE_MSGLIST_LAYOUT, "/View/Layout/Standard"},
        {N_("/_View/Layout/S_mall screen"),     NULL, set_layout_cb, SMALL_LAYOUT, "/View/Layout/Standard"},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
+#endif
        {N_("/_View/_Sort"),                    NULL, NULL, 0, "<Branch>"},
        {N_("/_View/_Sort/by _number"),         NULL, sort_summary_cb, SORT_BY_NUMBER, "<RadioItem>"},
        {N_("/_View/_Sort/by S_ize"),           NULL, sort_summary_cb, SORT_BY_SIZE, "/View/Sort/by number"},
@@ -1319,7 +1322,9 @@ MainWindow *main_window_create()
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "mainwindow");
        gtk_window_set_title(GTK_WINDOW(window), PROG_VERSION);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-
+#ifdef MAEMO
+       prefs_common.layout_mode = SMALL_LAYOUT;
+#endif
        if (!geometry.min_height) {
                geometry.min_width = 320;
                geometry.min_height = 200;
@@ -1378,6 +1383,7 @@ MainWindow *main_window_create()
        }
        /* link window to mainwin->window to avoid gdk warnings */
        mainwin->window       = window;
+       mainwin_list = g_list_append(mainwin_list, mainwin);
        
 #ifdef MAEMO
        mainwin->toolbar = toolbar_create(TOOLBAR_MAIN, 
@@ -1431,10 +1437,11 @@ MainWindow *main_window_create()
        statusbar = statusbar_create();
        gtk_box_pack_start(GTK_BOX(hbox_stat), statusbar, TRUE, TRUE, 0);
 
+#ifndef MAEMO
        progressbar = gtk_progress_bar_new();
        gtk_widget_set_size_request(progressbar, 120, 1);
        gtk_box_pack_start(GTK_BOX(hbox_stat), progressbar, FALSE, FALSE, 0);
-
+#endif
        online_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_ONLINE);
        offline_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_OFFLINE);
        online_switch = gtk_button_new ();
@@ -1522,7 +1529,9 @@ MainWindow *main_window_create()
        mainwin->vbox_body      = vbox_body;
        mainwin->hbox_stat      = hbox_stat;
        mainwin->statusbar      = statusbar;
+#ifndef MAEMO
        mainwin->progressbar    = progressbar;
+#endif
        mainwin->statuslabel    = statuslabel;
        mainwin->online_switch  = online_switch;
        mainwin->online_pixmap  = online_pixmap;
@@ -1682,8 +1691,6 @@ MainWindow *main_window_create()
        if (!hand_cursor)
                hand_cursor = gdk_cursor_new(GDK_HAND2);
 
-       mainwin_list = g_list_append(mainwin_list, mainwin);
-
        /* init work_offline */
        if (prefs_common.work_offline)
                online_switch_clicked (GTK_BUTTON(online_switch), mainwin);
@@ -3115,6 +3122,7 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), active); \
 }
 
+#ifndef MAEMO
        switch (prefs_common.layout_mode) {
        case NORMAL_LAYOUT:
                SET_CHECK_MENU_ACTIVE("/View/Layout/Standard", TRUE);
@@ -3132,6 +3140,7 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
                SET_CHECK_MENU_ACTIVE("/View/Layout/Small screen", TRUE);
                break;
        }
+#endif
 #undef SET_CHECK_MENU_ACTIVE
 
        if (folderwin) {
@@ -3375,6 +3384,7 @@ static void toggle_statusbar_cb(MainWindow *mainwin, guint action,
        }
 }
 
+#ifndef MAEMO
 static void set_layout_cb(MainWindow *mainwin, guint action,
                               GtkWidget *widget)
 {
@@ -3408,6 +3418,7 @@ static void set_layout_cb(MainWindow *mainwin, guint action,
        summary_relayout(mainwin->summaryview); 
        summary_update_unread(mainwin->summaryview, NULL);
 }
+#endif
 
 void main_window_toggle_work_offline (MainWindow *mainwin, gboolean offline,
                                        gboolean ask_sync)