2007-03-28 [colin] 2.8.1cvs59
authorColin Leroy <colin@colino.net>
Wed, 28 Mar 2007 16:22:52 +0000 (16:22 +0000)
committerColin Leroy <colin@colino.net>
Wed, 28 Mar 2007 16:22:52 +0000 (16:22 +0000)
* src/mainwindow.c
Fix a layout issue when presenting
mainwindow in Small screen layout
* src/toolbar.c
* src/toolbar.h
Add a "Go to folder list" button for
mainwindow, and make it default in
the Maemo build

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/toolbar.c
src/toolbar.h

index 9ba37c8bc55d823c4b4634c37a185e1c7bf8ba61..9584b29c5dadd846b465578005dc0dea267ba5bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-03-28 [colin]     2.8.1cvs59
+
+       * src/mainwindow.c
+               Fix a layout issue when presenting
+               mainwindow in Small screen layout
+       * src/toolbar.c
+       * src/toolbar.h
+               Add a "Go to folder list" button for
+               mainwindow, and make it default in
+               the Maemo build
+
 2007-03-28 [colin]     2.8.1cvs58
 
        * src/compose.c
index da56afbbcdfcb9e7d5ba28d869172e729644f3f1..4b657a72a19f87c1675a814fc3f514c72a994196 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.364 -r 1.382.2.365 src/compose.c;  ) > 2.8.1cvs56.patchset
 ( cvs diff -u -r 1.382.2.365 -r 1.382.2.366 src/compose.c;  cvs diff -u -r 1.207.2.155 -r 1.207.2.156 src/folderview.c;  cvs diff -u -r 1.395.2.292 -r 1.395.2.293 src/summaryview.c;  ) > 2.8.1cvs57.patchset
 ( cvs diff -u -r 1.382.2.366 -r 1.382.2.367 src/compose.c;  ) > 2.8.1cvs58.patchset
+( cvs diff -u -r 1.274.2.181 -r 1.274.2.182 src/mainwindow.c;  cvs diff -u -r 1.43.2.63 -r 1.43.2.64 src/toolbar.c;  cvs diff -u -r 1.19.2.16 -r 1.19.2.17 src/toolbar.h;  ) > 2.8.1cvs59.patchset
index 732e4c92383fe1c87251641f9eb2ec81241034bf..4254d365f7ce1b12a4a0b7d0b075cf39460e0b8d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=58
+EXTRA_VERSION=59
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index b8a3b4eeb0c0f577e695fbcfd9151e211262d1ab..928375e55483013c06974a0f04ae759965c85ad2 100644 (file)
@@ -2653,6 +2653,13 @@ void main_window_popup(MainWindow *mainwin)
                main_window_show(mainwin);
 
        gtkut_window_popup(mainwin->window);
+       if (prefs_common.layout_mode == SMALL_LAYOUT) {
+               if (mainwin->in_folder) {
+                       mainwindow_enter_folder(mainwin);
+               } else {
+                       mainwindow_exit_folder(mainwin);
+               }
+       }
 }
 
 void main_window_show(MainWindow *mainwin)
index 3ba07a90bf7470f28ee36a1acb2078acdf730527..2a21006433fdee6514acbf7ea0e5cbb297005370 100644 (file)
@@ -187,6 +187,7 @@ struct {
        { "A_IGNORE_THREAD",    N_("Ignore thread")                        },
        { "A_PRINT",            N_("Print")                                },
        { "A_LEARN_SPAM",       N_("Learn Spam or Ham")                    },
+       { "A_GO_FOLDERS",       N_("Go to folder list")                    },
 
        { "A_SEND",             N_("Send Message")                         },
        { "A_SENDL",            N_("Put into queue folder and send later") },
@@ -323,7 +324,8 @@ GList *toolbar_get_action_items(ToolbarType source)
                                        A_REPLY_ALL,     A_REPLY_ML,      A_OPEN_MAIL,  A_FORWARD, 
                                        A_TRASH , A_DELETE_REAL,       A_EXECUTE,       A_GOTO_PREV, 
                                        A_GOTO_NEXT,    A_IGNORE_THREAD,  A_PRINT,
-                                       A_ADDRBOOK,     A_LEARN_SPAM, A_SYL_ACTIONS, A_CANCEL_INC };
+                                       A_ADDRBOOK,     A_LEARN_SPAM, A_GO_FOLDERS, 
+                                       A_SYL_ACTIONS, A_CANCEL_INC };
 
                for (i = 0; i < sizeof main_items / sizeof main_items[0]; i++)  {
                        items = g_list_append(items, gettext(toolbar_text[main_items[i]].descr));
@@ -403,7 +405,11 @@ static void toolbar_set_default_main(void)
                gint icon;
                gchar *text;
        } default_toolbar[] = {
-               { A_RECEIVE_ALL,   STOCK_PIXMAP_MAIL_RECEIVE_ALL,     _("Get Mail") },
+#ifdef MAEMO
+               { A_GO_FOLDERS,    STOCK_PIXMAP_DIR_OPEN,             _("Folders") },
+               { A_SEPARATOR,     0,                                 ("")         }, 
+#endif
+               { A_RECEIVE_ALL,   STOCK_PIXMAP_MAIL_RECEIVE_ALL,     _("Get Mail")},
                { A_SEPARATOR,     0,                                 ("")         }, 
                { A_SEND_QUEUED,   STOCK_PIXMAP_MAIL_SEND_QUEUE,      _("Send")    },
                { A_COMPOSE_EMAIL, STOCK_PIXMAP_MAIL_COMPOSE,
@@ -1467,6 +1473,23 @@ static MainWindow *get_mainwin(gpointer data)
        return mainwin;
 }
 
+static void toolbar_go_folders_cb(GtkWidget *widget, gpointer data)
+{
+       ToolbarItem *toolbar_item = (ToolbarItem*)data;
+       MainWindow *mainwin = NULL;
+       switch(toolbar_item->type) {
+       case TOOLBAR_MAIN:
+               mainwin = (MainWindow*)toolbar_item->parent;
+               break;
+       default:
+               g_warning("wrong toolbar type\n");
+               return;
+       }
+
+       gtk_widget_grab_focus(mainwin->folderview->ctree);
+       mainwindow_exit_folder(mainwin);
+}
+
 static void toolbar_buttons_cb(GtkWidget   *widget, 
                               ToolbarItem *item)
 {
@@ -1494,6 +1517,7 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
                { A_IGNORE_THREAD,      toolbar_ignore_thread_cb        },
                { A_PRINT,              toolbar_print_cb                },
                { A_LEARN_SPAM,         toolbar_learn_cb                },
+               { A_GO_FOLDERS,         toolbar_go_folders_cb           },
 
                { A_SEND,               toolbar_send_cb                 },
                { A_SENDL,              toolbar_send_later_cb           },
@@ -1600,6 +1624,12 @@ Toolbar *toolbar_create(ToolbarType       type,
                
                switch (toolbar_item->index) {
 
+               case A_GO_FOLDERS:
+                       toolbar_data->folders_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            toolbar_data->folders_btn,
+                                          _("Go to folder list"), NULL);
+                       break;
                case A_RECEIVE_ALL:
                        toolbar_data->getall_btn = item;
                        gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
@@ -2191,6 +2221,7 @@ void toolbar_comp_set_sensitive(gpointer data, gboolean sensitive)
 void toolbar_init(Toolbar * toolbar) {
 
        toolbar->toolbar                = NULL;
+       toolbar->folders_btn            = NULL;
        toolbar->get_btn                = NULL;
        toolbar->getall_btn             = NULL;
        toolbar->getall_combo           = NULL;
index 8eda03cc2134d30816fe38274e65d8c5026e060b..7b05c0dd9c895e7781e04275a2f35f9202b78557 100644 (file)
@@ -49,6 +49,7 @@ typedef enum
 struct _Toolbar {
        GtkWidget *toolbar;
 
+       GtkWidget *folders_btn;
        GtkWidget *get_btn;
        GtkWidget *getall_btn;
        ComboButton *getall_combo;
@@ -172,6 +173,7 @@ enum {
        A_IGNORE_THREAD,
        A_PRINT,
        A_LEARN_SPAM,
+       A_GO_FOLDERS,
 
        /* compose toolbar */
        A_SEND,