sync with sylpheed 0.6.0cvs4
[claws.git] / src / mainwindow.c
index a2dc3ac6c4aa5f42097be163813c1feb30552aaf..658d28319979413a07149d3b792bb6b094d297de 100644 (file)
@@ -76,6 +76,7 @@
 #include "about.h"
 #include "manual.h"
 #include "prefs_templates.h"
+#include "version.h"
 
 #define AC_LABEL_WIDTH 240
 
@@ -325,6 +326,16 @@ static void prev_marked_cb  (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
 
+static void next_labeled_cb     (MainWindow    *mainwin,
+                                 guint          action,
+                                 GtkWidget     *widget);
+
+
+static void prev_labeled_cb     (MainWindow    *mainwin,
+                                 guint          action,
+                                 GtkWidget     *widget);
+
+
 static void goto_folder_cb      (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
@@ -536,6 +547,8 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Summary/N_ext unread message"),  NULL, next_unread_cb, 0, NULL},
        {N_("/_Summary/Prev marked message"),   NULL, prev_marked_cb, 0, NULL},
        {N_("/_Summary/Next marked message"),   NULL, next_marked_cb, 0, NULL},
+       {N_("/_Summary/Prev labeled message"),  NULL, prev_labeled_cb, 0, NULL},
+       {N_("/_Summary/Next labeled message"),  NULL, next_labeled_cb, 0, NULL},
        {N_("/_Summary/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Summary/_Go to other folder"),   "<alt>G", goto_folder_cb, 0, NULL},
        {N_("/_Summary/---"),                   NULL, NULL, 0, "<Separator>"},
@@ -627,8 +640,11 @@ MainWindow *main_window_create(SeparateType type)
                           GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
                           GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+
        gtk_widget_realize(window);
 
+       gtkut_widget_set_app_icon(window);
+
        vbox = gtk_vbox_new(FALSE, 0);
        gtk_widget_show(vbox);
        gtk_container_add(GTK_CONTAINER(window), vbox);
@@ -819,6 +835,7 @@ MainWindow *main_window_create(SeparateType type)
                                 prefs_common.mainwin_y);
        gtk_widget_set_usize(window, prefs_common.mainwin_width,
                             prefs_common.mainwin_height);
+                            
        gtk_widget_show(mainwin->window);
 
        /* initialize views */
@@ -828,6 +845,7 @@ MainWindow *main_window_create(SeparateType type)
        header_window_init(mainwin->headerwin);
        log_window_init(mainwin->logwin);
 
+
        mainwin->lock_count = 0;
        mainwin->cursor_count = 0;
 
@@ -1284,14 +1302,16 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/Message/Re-edit", M_ALLOW_REEDIT},
 
                {"/Summary/Delete duplicated messages", M_MSG_EXIST|M_EXEC|M_UNLOCKED},
-               {"/Summary/Filter messages"    , M_MSG_EXIST|M_EXEC|M_UNLOCKED},
-               {"/Summary/Execute"            , M_MSG_EXIST|M_UNLOCKED},
-               {"/Summary/Prev message"       , M_MSG_EXIST},
-               {"/Summary/Next message"       , M_MSG_EXIST},
-               {"/Summary/Prev marked message", M_MSG_EXIST},
-               {"/Summary/Next marked message", M_MSG_EXIST},
-               {"/Summary/Next unread message", M_MSG_EXIST},
-               {"/Summary/Sort"               , M_MSG_EXIST},
+               {"/Summary/Filter messages"     , M_MSG_EXIST|M_EXEC|M_UNLOCKED},
+               {"/Summary/Execute"             , M_MSG_EXIST|M_UNLOCKED},
+               {"/Summary/Prev message"        , M_MSG_EXIST},
+               {"/Summary/Next message"        , M_MSG_EXIST},
+               {"/Summary/Prev marked message" , M_MSG_EXIST},
+               {"/Summary/Next marked message" , M_MSG_EXIST},
+               {"/Summary/Prev labeled message", M_MSG_EXIST},
+               {"/Summary/Next labeled message", M_MSG_EXIST},
+               {"/Summary/Next unread message" , M_MSG_EXIST},
+               {"/Summary/Sort"                , M_MSG_EXIST},
 
                {"/Configuration", M_UNLOCKED},
 
@@ -2252,7 +2272,7 @@ static void send_queue_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
        GList *list;
 
        if (procmsg_send_queue() < 0)
-               alertpanel_error(_("Sending queued message failed."));
+               alertpanel_error(_("Some errors occurred while sending queued messages."));
 
        statusbar_pop_all();
 
@@ -2596,6 +2616,18 @@ static void prev_marked_cb(MainWindow *mainwin, guint action,
        summary_select_prev_marked(mainwin->summaryview);
 }
 
+static void next_labeled_cb(MainWindow *mainwin, guint action,
+                          GtkWidget *widget)
+{
+       summary_select_next_labeled(mainwin->summaryview);
+}
+
+static void prev_labeled_cb(MainWindow *mainwin, guint action,
+                          GtkWidget *widget)
+{
+       summary_select_prev_labeled(mainwin->summaryview);
+}
+
 static void goto_folder_cb(MainWindow *mainwin, guint action,
                           GtkWidget *widget)
 {