2008-07-24 [colin] 3.5.0cvs32
authorColin Leroy <colin@colino.net>
Thu, 24 Jul 2008 16:59:35 +0000 (16:59 +0000)
committerColin Leroy <colin@colino.net>
Thu, 24 Jul 2008 16:59:35 +0000 (16:59 +0000)
* src/mimeview.c
Fix a gtk warning on clear
* src/mainwindow.c
* src/summaryview.c
* src/summaryview.h
Switch the message list popup menu to
GtkUIManager

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/mimeview.c
src/summaryview.c
src/summaryview.h

index e2e92b7..58a757c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-07-24 [colin]     3.5.0cvs32
+
+       * src/mimeview.c
+               Fix a gtk warning on clear
+       * src/mainwindow.c
+       * src/summaryview.c
+       * src/summaryview.h
+               Switch the message list popup menu to
+               GtkUIManager
+
 2008-07-23 [colin]     3.5.0cvs31
 
        * src/plugins/pgpcore/pgp_viewer.c
index 4c182e8..631b7fd 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.202 -r 1.207.2.203 src/folderview.c;  cvs diff -u -r 1.1.2.58 -r 1.1.2.59 src/imap_gtk.c;  cvs diff -u -r 1.2.2.26 -r 1.2.2.27 src/news_gtk.c;  ) > 3.5.0cvs29.patchset
 ( cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/plugins/trayicon/libeggtrayicon/eggtrayicon.c;  ) > 3.5.0cvs30.patchset
 ( cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/plugins/pgpcore/pgp_viewer.c;  cvs diff -u -r 1.1.2.51 -r 1.1.2.52 src/plugins/pgpcore/sgpgme.c;  ) > 3.5.0cvs31.patchset
+( cvs diff -u -r 1.274.2.255 -r 1.274.2.256 src/mainwindow.c;  cvs diff -u -r 1.83.2.135 -r 1.83.2.136 src/mimeview.c;  cvs diff -u -r 1.395.2.374 -r 1.395.2.375 src/summaryview.c;  cvs diff -u -r 1.68.2.47 -r 1.68.2.48 src/summaryview.h;  ) > 3.5.0cvs32.patchset
index b5ef48d..b2251f6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=31
+EXTRA_VERSION=32
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8ca8082..81757ac 100644 (file)
@@ -1920,12 +1920,10 @@ MainWindow *main_window_create()
                        G_CALLBACK(main_window_accel_activate), mainwin);
                         
        
-       ADD_MENU_ACCEL_GROUP_TO_WINDOW(summaryview->popupmenu, mainwin->window);
+/*     ADD_MENU_ACCEL_GROUP_TO_WINDOW(summaryview->popupmenu, mainwin->window);
        
-       /* connect the accelerators for equivalent 
-          menu items in different menus             */
        menu_connect_identical_items();
-
+*/
 #ifndef GENERIC_UMPC
        gtk_window_iconify(GTK_WINDOW(mainwin->window));
 #endif
index bbd7781..f2e3b6d 100644 (file)
@@ -2336,7 +2336,6 @@ static void icon_list_clear (MimeView *mimeview)
        for (; child != NULL; child = g_list_next(child)) {
                gtkut_container_remove(GTK_CONTAINER(mimeview->icon_vbox), 
                                       GTK_WIDGET(child->data));
-               gtk_widget_destroy(GTK_WIDGET(child->data));
        }
        g_list_free(child);
        mimeview->icon_count = 0;
index 4d75bfb..05cf06f 100644 (file)
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkpixmap.h>
-#include <gtk/gtkctree.h>
-#include <gtk/gtkcontainer.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktext.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkitemfactory.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkstyle.h>
-#include <gtk/gtkarrow.h>
-#include <gtk/gtkeventbox.h>
-#include <gtk/gtkstatusbar.h>
-#include <gtk/gtkmenuitem.h>
+#include <gtk/gtk.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -455,90 +439,156 @@ GtkTargetEntry summary_drag_types[2] =
        {"claws-mail/internal", GTK_TARGET_SAME_APP, TARGET_DUMMY}
 };
 
-static GtkItemFactoryEntry summary_popup_entries[] =
+#define DO_ACTION(name, act) {                                         \
+       if(!strcmp(name, a_name)) {                                     \
+               act;                                                    \
+       }                                                               \
+}
+
+static void summary_menu_cb(GtkAction *action, gpointer data)
 {
-       {N_("/_Reply"),                 "<control>R", summary_reply_cb, COMPOSE_REPLY, NULL},
+       SummaryView *summaryview = (SummaryView *)data;
+       const gchar *a_name = gtk_action_get_name(action);
+       
+       DO_ACTION("SummaryViewPopup/Reply", summary_reply_cb(summaryview, COMPOSE_REPLY, NULL));
+#ifndef GENERIC_UMPC
+       DO_ACTION("SummaryViewPopup/ReplyTo/All", summary_reply_cb(summaryview, COMPOSE_REPLY_TO_ALL, NULL));
+       DO_ACTION("SummaryViewPopup/ReplyTo/Sender", summary_reply_cb(summaryview, COMPOSE_REPLY_TO_SENDER, NULL));
+       DO_ACTION("SummaryViewPopup/ReplyTo/MailingList", summary_reply_cb(summaryview, COMPOSE_REPLY_TO_LIST, NULL));
+#endif
+       DO_ACTION("SummaryViewPopup/Forward", summary_reply_cb(summaryview, COMPOSE_FORWARD_INLINE, NULL));
+#ifndef GENERIC_UMPC
+       DO_ACTION("SummaryViewPopup/ForwardAsAtt", summary_reply_cb(summaryview, COMPOSE_FORWARD_AS_ATTACH, NULL));
+       DO_ACTION("SummaryViewPopup/Redirect", summary_reply_cb(summaryview, COMPOSE_REDIRECT, NULL));
+#endif
+       DO_ACTION("SummaryViewPopup/Move", summary_move_to(summaryview));
+       DO_ACTION("SummaryViewPopup/Copy", summary_copy_to(summaryview));
+       DO_ACTION("SummaryViewPopup/Trash", summary_delete_trash(summaryview));
 #ifndef GENERIC_UMPC
-       {N_("/Repl_y to"),              NULL, NULL,             0, "<Branch>"},
-       {N_("/Repl_y to/_all"),         "<shift><control>R", summary_reply_cb,  COMPOSE_REPLY_TO_ALL, NULL},
-       {N_("/Repl_y to/_sender"),      NULL, summary_reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
-       {N_("/Repl_y to/mailing _list"),
-                                       "<control>L", summary_reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
-       {"/---",                        NULL, NULL,             0, "<Separator>"},
+       DO_ACTION("SummaryViewPopup/Delete", summary_delete(summaryview));
 #endif
-       {N_("/_Forward"),               "<control><alt>F", summary_reply_cb, COMPOSE_FORWARD_INLINE, NULL},
+       DO_ACTION("SummaryViewPopup/Mark/Mark", summary_mark(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/Unmark", summary_unmark(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/MarkUnread", summary_mark_as_unread(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/MarkRead", summary_mark_as_read(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/MarkAllRead", summary_mark_all_read(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/IgnoreThread", summary_ignore_thread(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/UnignoreThread", summary_unignore_thread(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/WatchThread", summary_watch_thread(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/UnwatchThread", summary_unwatch_thread(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/MarkSpam", summary_mark_as_spam(summaryview, 1, NULL));
+       DO_ACTION("SummaryViewPopup/Mark/MarkHam", summary_mark_as_spam(summaryview, 0, NULL));
+       DO_ACTION("SummaryViewPopup/Mark/Lock", summary_msgs_lock(summaryview));
+       DO_ACTION("SummaryViewPopup/Mark/Unlock", summary_msgs_unlock(summaryview));
 #ifndef GENERIC_UMPC
-       {N_("/For_ward as attachment"), NULL, summary_reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
-       {N_("/Redirect"),               NULL, summary_reply_cb, COMPOSE_REDIRECT, NULL},
+       DO_ACTION("SummaryViewPopup/AddSenderToAB", summary_add_address_cb(summaryview, 0, 0)); 
 #endif
-       {"/---",                        NULL, NULL,             0, "<Separator>"},
-       {N_("/M_ove..."),               "<control>O", summary_move_to,  0, NULL},
-       {N_("/_Copy..."),               "<shift><control>O", summary_copy_to,   0, NULL},
-       {N_("/Move to _trash"),         "<control>D", summary_delete_trash,     0, NULL},
+       DO_ACTION("SummaryViewPopup/CreateFilterRule/Automatically", summary_create_filter_cb(summaryview, FILTER_BY_AUTO, NULL)); 
+       DO_ACTION("SummaryViewPopup/CreateFilterRule/ByFrom", summary_create_filter_cb(summaryview, FILTER_BY_FROM, NULL)); 
+       DO_ACTION("SummaryViewPopup/CreateFilterRule/ByTo", summary_create_filter_cb(summaryview, FILTER_BY_TO, NULL)); 
+       DO_ACTION("SummaryViewPopup/CreateFilterRule/BySubject", summary_create_filter_cb(summaryview, FILTER_BY_SUBJECT, NULL)); 
 #ifndef GENERIC_UMPC
-       {N_("/_Delete..."),             NULL, summary_delete, 0, NULL},
+       DO_ACTION("SummaryViewPopup/CreateProcessingRule/Automatically", summary_create_processing_cb(summaryview, FILTER_BY_AUTO, NULL)); 
+       DO_ACTION("SummaryViewPopup/CreateProcessingRule/ByFrom", summary_create_processing_cb(summaryview, FILTER_BY_FROM, NULL)); 
+       DO_ACTION("SummaryViewPopup/CreateProcessingRule/ByTo", summary_create_processing_cb(summaryview, FILTER_BY_TO, NULL)); 
+       DO_ACTION("SummaryViewPopup/CreateProcessingRule/BySubject", summary_create_processing_cb(summaryview, FILTER_BY_SUBJECT, NULL)); 
 #endif
-       {"/---",                        NULL, NULL,             0, "<Separator>"},
-       {N_("/_Mark"),                  NULL, NULL,             0, "<Branch>"},
-       {N_("/_Mark/_Mark"),            NULL, summary_mark,     0, NULL},
-       {N_("/_Mark/_Unmark"),          NULL, summary_unmark,   0, NULL},
-       {N_("/_Mark/---"),              NULL, NULL,             0, "<Separator>"},
-       {N_("/_Mark/Mark as unr_ead"),  NULL, summary_mark_as_unread, 0, NULL},
-       {N_("/_Mark/Mark as rea_d"),    NULL, summary_mark_as_read, 0, NULL},
-       {N_("/_Mark/Mark all read"),    NULL, summary_mark_all_read, 0, NULL},
-       {N_("/_Mark/Ignore thread"),    NULL, summary_ignore_thread, 0, NULL},
-       {N_("/_Mark/Unignore thread"),  NULL, summary_unignore_thread, 0, NULL},
-       {N_("/_Mark/Watch thread"),     NULL, summary_watch_thread, 0, NULL},
-       {N_("/_Mark/Unwatch thread"),   NULL, summary_unwatch_thread, 0, NULL},
-       {N_("/_Mark/---"),              NULL, NULL, 0, "<Separator>"},
-       {N_("/_Mark/Mark as _spam"),    NULL, summary_mark_as_spam, 1, NULL},
-       {N_("/_Mark/Mark as _ham"),     NULL, summary_mark_as_spam, 0, NULL},
-       {N_("/_Mark/---"),              NULL, NULL, 0, "<Separator>"},
-       {N_("/_Mark/Lock"),             NULL, summary_msgs_lock, 0, NULL},
-       {N_("/_Mark/Unlock"),           NULL, summary_msgs_unlock, 0, NULL},
-       {N_("/Color la_bel"),           NULL, NULL,             0, NULL},
-       {N_("/Ta_gs"),                  NULL, NULL,             0, NULL},
-
-       {"/---",                        NULL, NULL,             0, "<Separator>"},
+       DO_ACTION("SummaryViewPopup/View/OpenInNewWindow", summary_open_msg(summaryview)); 
+       DO_ACTION("SummaryViewPopup/View/MessageSource", summary_view_source(summaryview)); 
+       DO_ACTION("SummaryViewPopup/SaveAs", summary_save_as(summaryview)); 
 #ifndef GENERIC_UMPC
-       {N_("/Add sender to address boo_k"),
-                                       NULL, summary_add_address_cb, 0, NULL},
+       DO_ACTION("SummaryViewPopup/Print", summary_print(summaryview)); 
 #endif
-       {N_("/Create f_ilter rule"),    NULL, NULL,             0, "<Branch>"},
-       {N_("/Create f_ilter rule/_Automatically"),
-                                       NULL, summary_create_filter_cb, FILTER_BY_AUTO, NULL},
-       {N_("/Create f_ilter rule/by _From"),
-                                       NULL, summary_create_filter_cb, FILTER_BY_FROM, NULL},
-       {N_("/Create f_ilter rule/by _To"),
-                                       NULL, summary_create_filter_cb, FILTER_BY_TO, NULL},
-       {N_("/Create f_ilter rule/by _Subject"),
-                                       NULL, summary_create_filter_cb, FILTER_BY_SUBJECT, NULL},
 #ifndef GENERIC_UMPC
-       {N_("/Create processing rule"), NULL, NULL,             0, "<Branch>"},
-       {N_("/Create processing rule/_Automatically"),
-                                       NULL, summary_create_processing_cb, FILTER_BY_AUTO, NULL},
-       {N_("/Create processing rule/by _From"),
-                                       NULL, summary_create_processing_cb, FILTER_BY_FROM, NULL},
-       {N_("/Create processing rule/by _To"),
-                                       NULL, summary_create_processing_cb, FILTER_BY_TO, NULL},
-       {N_("/Create processing rule/by _Subject"),
-                                       NULL, summary_create_processing_cb, FILTER_BY_SUBJECT, NULL},
+       DO_ACTION("SummaryViewPopup/View/AllHeaders", summary_show_all_header_cb(summaryview, 0, 0)); 
 #endif
-       {"/---",                        NULL, NULL,             0, "<Separator>"},
-       {N_("/_View"),                  NULL, NULL,             0, "<Branch>"},
-       {N_("/_View/Open in new _window"),
-                                       "<control><alt>N", summary_open_msg,    0, NULL},
-       {N_("/_View/Message _source"),  "<control>U", summary_view_source, 0, NULL},
+}
+
+static GtkActionEntry summary_popup_entries[] =
+{
+       {"SummaryViewPopup",                            NULL, "SummaryViewPopup" },
+       {"SummaryViewPopup/Reply",                      NULL, N_("_Reply"), "<control>R", NULL, G_CALLBACK(summary_menu_cb) },
+#ifndef GENERIC_UMPC
+       {"SummaryViewPopup/ReplyTo",                    NULL, "Repl_y to" },
+       {"SummaryViewPopup/ReplyTo/All",                NULL, N_("_all"), "<shift><control>R", NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/ReplyTo/Sender",             NULL, N_("_sender"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/ReplyTo/MailingList",        NULL, N_("_mailing list"), "<control>L", NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/---",                        NULL, "---", NULL, NULL, NULL },
+#endif
+
+       {"SummaryViewPopup/Forward",                    NULL, N_("_Forward"), "<control><alt>F", NULL, G_CALLBACK(summary_menu_cb) }, /* inline */
 #ifndef GENERIC_UMPC
-       {N_("/_View/All _headers"),     "<control>H", summary_show_all_header_cb, 0, "<ToggleItem>"},
+       {"SummaryViewPopup/ForwardAsAtt",               NULL, N_("For_ward as attachment"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, /* as attach */
+       {"SummaryViewPopup/Redirect",                   NULL, N_("Redirect"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
 #endif
-       {"/---",                        NULL, NULL,             0, "<Separator>"},
-       {N_("/_Save as..."),            "<control>S", summary_save_as,   0, NULL},
+       /* separation */
+       {"SummaryViewPopup/Move",                       NULL, N_("M_ove..."), "<control>O", NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/Copy",                       NULL, N_("_Copy..."), "<shift><control>O", NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/Trash",                      NULL, N_("Move to _trash"), "<control>D", NULL, G_CALLBACK(summary_menu_cb) }, 
 #ifndef GENERIC_UMPC
-       {N_("/_Print..."),              "<control>P", summary_print,   0, NULL},
+       {"SummaryViewPopup/Delete",                     NULL, N_("_Delete..."), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+#endif
+       /* separation */
+       {"SummaryViewPopup/Mark",                       NULL, "_Mark" },
+       {"SummaryViewPopup/Mark/Mark",                  NULL, N_("_Mark"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/Unmark",                NULL, N_("_Unmark"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/---",                   NULL, "---", NULL, NULL, NULL },
+
+       {"SummaryViewPopup/Mark/MarkUnread",            NULL, N_("Mark as unr_ead"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/MarkRead",              NULL, N_("Mark as rea_d"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/MarkAllRead",           NULL, N_("Mark all read"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/IgnoreThread",          NULL, N_("Ignore thread"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/UnignoreThread",        NULL, N_("Unignore thread"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/WatchThread",           NULL, N_("Watch thread"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/UnwatchThread",         NULL, N_("Unwatch thread"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       /* separation */
+
+       {"SummaryViewPopup/Mark/MarkSpam",              NULL, N_("Mark as spam"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/MarkHam",               NULL, N_("Mark as ham"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       /* separation */
+
+       {"SummaryViewPopup/Mark/Lock",                  NULL, N_("Lock"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+       {"SummaryViewPopup/Mark/Unlock",                NULL, N_("Unlock"), NULL, NULL, G_CALLBACK(summary_menu_cb) },
+
+       {"SummaryViewPopup/ColorLabel",                 NULL, "Color la_bel" },
+       {"SummaryViewPopup/Tags",                       NULL, "Ta_gs" },
+
+       /* separation */
+#ifndef GENERIC_UMPC
+       {"SummaryViewPopup/AddSenderToAB",                      NULL, N_("Add sender to address boo_k"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+#endif
+       {"SummaryViewPopup/CreateFilterRule",                   NULL, "Create f_ilter rule" },
+       {"SummaryViewPopup/CreateFilterRule/Automatically",     NULL, N_("_Automatically"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/CreateFilterRule/ByFrom",            NULL, N_("By _From"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/CreateFilterRule/ByTo",              NULL, N_("By _To"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/CreateFilterRule/BySubject",         NULL, N_("By _Subject"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+
+#ifndef GENERIC_UMPC
+       {"SummaryViewPopup/CreateProcessingRule",                       NULL, "Create processing rule" },
+       {"SummaryViewPopup/CreateProcessingRule/Automatically", NULL, N_("_Automatically"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/CreateProcessingRule/ByFrom",                NULL, N_("By _From"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/CreateProcessingRule/ByTo",          NULL, N_("By _To"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/CreateProcessingRule/BySubject",             NULL, N_("By _Subject"), NULL, NULL, G_CALLBACK(summary_menu_cb) }, 
+
+#endif
+       /* separation */
+       {"SummaryViewPopup/View",                       NULL, "_View" },
+       {"SummaryViewPopup/View/OpenInNewWindow",       NULL, N_("Open in new _window"), "<control><alt>N", NULL, G_CALLBACK(summary_menu_cb) }, 
+       {"SummaryViewPopup/View/MessageSource",         NULL, N_("Message _source"), "<control>U", NULL, G_CALLBACK(summary_menu_cb) }, 
+       /* separation */
+       {"SummaryViewPopup/SaveAs",                     NULL, N_("_Save as..."), "<control>S", NULL, G_CALLBACK(summary_menu_cb) }, 
+#ifndef GENERIC_UMPC
+       {"SummaryViewPopup/Print",                      NULL, N_("Print..."), "<control>P", NULL, G_CALLBACK(summary_menu_cb) }, 
 #endif
 };  /* see also list in menu_connect_identical_items() in menu.c if this changes */
 
+#ifndef GENERIC_UMPC
+static GtkToggleActionEntry summary_popup_toggleentries[] =
+{
+       {"SummaryViewPopup/View/AllHeaders",            NULL, N_("All _headers"), "<control>H", NULL, G_CALLBACK(summary_menu_cb) }, 
+};
+#endif
+
 static const gchar *const col_label[N_SUMMARY_COLS] = {
        "",             /* S_COL_MARK    */
        N_("S"),        /* S_COL_STATUS  */
@@ -624,11 +674,9 @@ SummaryView *summary_create(void)
        GtkWidget *multiple_sel_togbtn;
 #endif
        GtkWidget *toggle_arrow;
-       GtkWidget *popupmenu;
        GtkWidget *toggle_search;
-       GtkItemFactory *popupfactory;
-       gint n_entries;
        QuickSearch *quicksearch;
+       GtkUIManager *gui_manager = gtkut_ui_manager();
        CLAWS_TIP_DECL();
 
        debug_print("Creating summary view...\n");
@@ -754,11 +802,100 @@ SummaryView *summary_create(void)
                          G_CALLBACK(tog_searchbar_cb), summaryview);
 
        /* create popup menu */
-       n_entries = sizeof(summary_popup_entries) /
-               sizeof(summary_popup_entries[0]);
-       popupmenu = menu_create_items(summary_popup_entries, n_entries,
-                                     "<SummaryView>", &popupfactory,
-                                     summaryview);
+       summaryview->action_group = gtk_action_group_new("SummaryViewPopup");
+       gtk_action_group_add_actions(summaryview->action_group, summary_popup_entries,
+                       G_N_ELEMENTS(summary_popup_entries), (gpointer)summaryview);
+#ifndef GENERIC_UMPC
+       gtk_action_group_add_toggle_actions(summaryview->action_group, summary_popup_toggleentries,
+                       G_N_ELEMENTS(summary_popup_toggleentries), (gpointer)summaryview);
+#endif
+       gtk_ui_manager_insert_action_group(gtkut_ui_manager(), summaryview->action_group, 0);
+
+       MENUITEM_ADDUI("/Menus", "SummaryViewPopup", "SummaryViewPopup", GTK_UI_MANAGER_MENU)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Reply", "SummaryViewPopup/Reply", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "ReplyTo", "SummaryViewPopup/ReplyTo", GTK_UI_MANAGER_MENU)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Separator1", "SummaryViewPopup/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Forward", "SummaryViewPopup/Forward", GTK_UI_MANAGER_MENUITEM)
+#ifndef GENERIC_UMPC
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "ForwardAsAtt", "SummaryViewPopup/ForwardAsAtt", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Redirect", "SummaryViewPopup/Redirect", GTK_UI_MANAGER_MENUITEM)
+#endif
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Separator2", "SummaryViewPopup/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Move", "SummaryViewPopup/Move", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Copy", "SummaryViewPopup/Copy", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Trash", "SummaryViewPopup/Trash", GTK_UI_MANAGER_MENUITEM)
+#ifndef GENERIC_UMPC
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Delete", "SummaryViewPopup/Delete", GTK_UI_MANAGER_MENUITEM)
+#endif
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Separator3", "SummaryViewPopup/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Mark", "SummaryViewPopup/Mark", GTK_UI_MANAGER_MENU)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "ColorLabel", "SummaryViewPopup/ColorLabel", GTK_UI_MANAGER_MENU)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Tags", "SummaryViewPopup/Tags", GTK_UI_MANAGER_MENU)
+
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Separator4", "SummaryViewPopup/---", GTK_UI_MANAGER_SEPARATOR)
+#ifndef GENERIC_UMPC
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "AddSenderToAB", "SummaryViewPopup/AddSenderToAB", GTK_UI_MANAGER_MENUITEM)
+#endif
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "CreateFilterRule", "SummaryViewPopup/CreateFilterRule", GTK_UI_MANAGER_MENU)
+#ifndef GENERIC_UMPC
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "CreateProcessingRule", "SummaryViewPopup/CreateProcessingRule", GTK_UI_MANAGER_MENU)
+#endif
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Separator5", "SummaryViewPopup/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "View", "SummaryViewPopup/View", GTK_UI_MANAGER_MENU)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "SaveAs", "SummaryViewPopup/SaveAs", GTK_UI_MANAGER_MENUITEM)
+#ifndef GENERIC_UMPC
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Print", "SummaryViewPopup/Print", GTK_UI_MANAGER_MENUITEM)
+#endif
+       /* last separator, for plugins */
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup", "Separator6", "SummaryViewPopup/---", GTK_UI_MANAGER_SEPARATOR)
+
+       /* submenus - replyto */
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/ReplyTo", "All", "SummaryViewPopup/ReplyTo/All", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/ReplyTo", "Sender", "SummaryViewPopup/ReplyTo/Sender", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/ReplyTo", "MailingList", "SummaryViewPopup/ReplyTo/MailingList", GTK_UI_MANAGER_MENUITEM)
+
+       /* submenus - mark */
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Mark", "SummaryViewPopup/Mark/Mark", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Unmark", "SummaryViewPopup/Mark/Unmark", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Separator1", "SummaryViewPopup/Mark/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "MarkUnread", "SummaryViewPopup/Mark/MarkUnread", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "MarkRead", "SummaryViewPopup/Mark/MarkRead", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "MarkAllRead", "SummaryViewPopup/Mark/MarkAllRead", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "IgnoreThread", "SummaryViewPopup/Mark/IgnoreThread", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "UnignoreThread", "SummaryViewPopup/Mark/UnignoreThread", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "WatchThread", "SummaryViewPopup/Mark/WatchThread", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "UnwatchThread", "SummaryViewPopup/Mark/UnwatchThread", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Separator2", "SummaryViewPopup/Mark/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "MarkSpam", "SummaryViewPopup/Mark/MarkSpam", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "MarkHam", "SummaryViewPopup/Mark/MarkHam", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Separator3", "SummaryViewPopup/Mark/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Lock", "SummaryViewPopup/Mark/Lock", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/Mark", "Unlock", "SummaryViewPopup/Mark/Unlock", GTK_UI_MANAGER_MENUITEM)
+
+       /* submenus - colorlabel and tags are dynamic */
+       /* submenus - createfilterrule */
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateFilterRule", "Automatically", "SummaryViewPopup/CreateFilterRule/Automatically", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateFilterRule", "ByFrom", "SummaryViewPopup/CreateFilterRule/ByFrom", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateFilterRule", "ByTo", "SummaryViewPopup/CreateFilterRule/ByTo", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateFilterRule", "BySubject", "SummaryViewPopup/CreateFilterRule/BySubject", GTK_UI_MANAGER_MENUITEM)
+               
+#ifndef GENERIC_UMPC
+       /* submenus - createprocessingrule */
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateProcessingRule", "Automatically", "SummaryViewPopup/CreateProcessingRule/Automatically", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateProcessingRule", "ByFrom", "SummaryViewPopup/CreateProcessingRule/ByFrom", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateProcessingRule", "ByTo", "SummaryViewPopup/CreateProcessingRule/ByTo", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/CreateProcessingRule", "BySubject", "SummaryViewPopup/CreateProcessingRule/BySubject", GTK_UI_MANAGER_MENUITEM)
+#endif
+               
+       /* submenus - view */
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/View", "OpenInNewWindow", "SummaryViewPopup/View/OpenInNewWindow", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/View", "MessageSource", "SummaryViewPopup/View/MessageSource", GTK_UI_MANAGER_MENUITEM)
+#ifndef GENERIC_UMPC
+       MENUITEM_ADDUI("/Menus/SummaryViewPopup/View", "AllHeaders", "SummaryViewPopup/View/AllHeaders", GTK_UI_MANAGER_MENUITEM)
+#endif         
+       summaryview->popupmenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(
+                               gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/SummaryViewPopup")) );
+
 
        summaryview->vbox = vbox;
        summaryview->scrolledwin = scrolledwin;
@@ -777,8 +914,6 @@ SummaryView *summary_create(void)
        summaryview->multiple_sel_togbtn = multiple_sel_togbtn;
 #endif
        summaryview->toggle_search = toggle_search;
-       summaryview->popupmenu = popupmenu;
-       summaryview->popupfactory = popupfactory;
        summaryview->lock_count = 0;
        summaryview->msginfo_update_callback_id =
                hooks_register_hook(MSGINFO_UPDATE_HOOKLIST, summary_update_msg, (gpointer) summaryview);
@@ -1634,7 +1769,6 @@ GSList *summary_get_selected_msg_list(SummaryView *summaryview)
 
 void summary_set_menu_sensitive(SummaryView *summaryview)
 {
-       GtkItemFactory *ifactory = summaryview->popupfactory;
        SensitiveCond state;
        gboolean sensitive;
 #ifndef GENERIC_UMPC
@@ -1646,58 +1780,61 @@ void summary_set_menu_sensitive(SummaryView *summaryview)
                gchar *const entry;
                SensitiveCond cond;
        } entry[] = {
-               {"/Reply"                       , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/Reply"                       , M_HAVE_ACCOUNT|M_TARGET_EXIST},
 #ifndef GENERIC_UMPC
-               {"/Reply to"                    , M_HAVE_ACCOUNT|M_TARGET_EXIST},
-               {"/Reply to/all"                , M_HAVE_ACCOUNT|M_TARGET_EXIST},
-               {"/Reply to/sender"             , M_HAVE_ACCOUNT|M_TARGET_EXIST},
-               {"/Reply to/mailing list"       , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/ReplyTo"                     , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/ReplyTo/All"         , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/ReplyTo/Sender"             , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/ReplyTo/MailingList"       , M_HAVE_ACCOUNT|M_TARGET_EXIST},
 #endif
 
-               {"/Forward"                     , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/Forward"                     , M_HAVE_ACCOUNT|M_TARGET_EXIST},
 #ifndef GENERIC_UMPC
-               {"/Forward as attachment"       , M_HAVE_ACCOUNT|M_TARGET_EXIST},
-               {"/Redirect"                    , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/ForwardAsAtt"        , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+               {"SummaryViewPopup/Redirect"                    , M_HAVE_ACCOUNT|M_TARGET_EXIST},
 #endif
 
-               {"/Move..."                     , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
-               {"/Copy..."                     , M_TARGET_EXIST|M_EXEC},
-               {"/Move to trash"               , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
+               {"SummaryViewPopup/Move"                        , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
+               {"SummaryViewPopup/Copy"                        , M_TARGET_EXIST|M_EXEC},
+               {"SummaryViewPopup/Trash"               , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
 #ifndef GENERIC_UMPC
-               {"/Delete..."                   , M_TARGET_EXIST|M_ALLOW_DELETE},
+               {"SummaryViewPopup/Delete"                      , M_TARGET_EXIST|M_ALLOW_DELETE},
 #endif
 
-               {"/Mark"                        , M_TARGET_EXIST},
-               {"/Mark/Mark"                   , M_TARGET_EXIST},
-               {"/Mark/Unmark"                 , M_TARGET_EXIST},
-               {"/Mark/Mark as unread"         , M_TARGET_EXIST},
-               {"/Mark/Mark all read"          , M_TARGET_EXIST},
-               {"/Mark/Ignore thread"          , M_TARGET_EXIST},
-               {"/Mark/Unignore thread"        , M_TARGET_EXIST},
-               {"/Mark/Lock"                   , M_TARGET_EXIST},
-               {"/Mark/Unlock"                 , M_TARGET_EXIST},
-               {"/Mark/Mark as spam"           , M_TARGET_EXIST|M_CAN_LEARN_SPAM},
-               {"/Mark/Mark as ham"            , M_TARGET_EXIST|M_CAN_LEARN_SPAM},
-               {"/Color label"                 , M_TARGET_EXIST},
-               {"/Tags"                        , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark"                        , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/Mark"                   , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/Unmark"                 , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/MarkUnread"     , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/MarkRead"       , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/MarkAllRead"    , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/IgnoreThread"           , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/UnignoreThread"         , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/WatchThread"            , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/UnwatchThread"          , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/Unlock"                 , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/Lock"                   , M_TARGET_EXIST},
+               {"SummaryViewPopup/Mark/MarkSpam"               , M_TARGET_EXIST|M_CAN_LEARN_SPAM},
+               {"SummaryViewPopup/Mark/MarkHam"                , M_TARGET_EXIST|M_CAN_LEARN_SPAM},
+               {"SummaryViewPopup/ColorLabel"                  , M_TARGET_EXIST},
+               {"SummaryViewPopup/Tags"                        , M_TARGET_EXIST},
 
 #ifndef GENERIC_UMPC
-               {"/Add sender to address book"  , M_SINGLE_TARGET_EXIST},
+               {"SummaryViewPopup/AddSenderToAB"       , M_SINGLE_TARGET_EXIST},
 #endif
-               {"/Create filter rule"          , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
+               {"SummaryViewPopup/CreateFilterRule"            , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
 #ifndef GENERIC_UMPC
-               {"/Create processing rule"      , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
+               {"SummaryViewPopup/CreateProcessingRule"        , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
 #endif
 
-               {"/View"                        , M_SINGLE_TARGET_EXIST},
-               {"/View/Open in new window"     , M_SINGLE_TARGET_EXIST},
-               {"/View/Message source"         , M_SINGLE_TARGET_EXIST},
+               {"SummaryViewPopup/View"                        , M_SINGLE_TARGET_EXIST},
+               {"SummaryViewPopup/View/OpenInNewWindow"     , M_SINGLE_TARGET_EXIST},
+               {"SummaryViewPopup/View/MessageSource"          , M_SINGLE_TARGET_EXIST},
 #ifndef GENERIC_UMPC
-               {"/View/All headers"            , M_SINGLE_TARGET_EXIST},
+               {"SummaryViewPopup/View/AllHeaders"             , M_SINGLE_TARGET_EXIST},
 #endif
-               {"/Save as..."                  , M_TARGET_EXIST},
+               {"SummaryViewPopup/SaveAs"                      , M_TARGET_EXIST},
 #ifndef GENERIC_UMPC
-               {"/Print..."                    , M_TARGET_EXIST},
+               {"SummaryViewPopup/Print"                       , M_TARGET_EXIST},
 #endif
                {NULL, 0}
        };
@@ -1708,13 +1845,12 @@ void summary_set_menu_sensitive(SummaryView *summaryview)
 
        for (i = 0; entry[i].entry != NULL; i++) {
                sensitive = ((entry[i].cond & state) == entry[i].cond);
-               menu_set_sensitive(ifactory, entry[i].entry, sensitive);
+               cm_menu_set_sensitive(entry[i].entry, sensitive);
        }
 
-
        summary_lock(summaryview);
 #ifndef GENERIC_UMPC
-       menuitem = gtk_item_factory_get_widget(ifactory, "/View/All headers");
+       menuitem = gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/SummaryViewPopup/View/AllHeaders");
        if (summaryview->messageview 
        &&  summaryview->messageview->mimeview
        &&  summaryview->messageview->mimeview->textview)
@@ -5603,8 +5739,7 @@ static void summary_colorlabel_menu_create(SummaryView *summaryview, gboolean re
        GtkWidget *item;
        gint i;
 
-       label_menuitem = gtk_item_factory_get_item(summaryview->popupfactory,
-                                                  "/Color label");
+       label_menuitem = gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/SummaryViewPopup/ColorLabel");
        g_signal_connect(G_OBJECT(label_menuitem), "activate",
                         G_CALLBACK(summary_colorlabel_menu_item_activate_item_cb),
                           summaryview);
@@ -5625,11 +5760,6 @@ static void summary_colorlabel_menu_create(SummaryView *summaryview, gboolean re
        g_object_set_data(G_OBJECT(item), "summaryview", summaryview);
        gtk_widget_show(item);
 
-       gtk_widget_add_accelerator(item, "activate", 
-                                  summaryview->popupfactory->accel_group, 
-                                  GDK_0, GDK_CONTROL_MASK,
-                                  GTK_ACCEL_LOCKED | GTK_ACCEL_VISIBLE);
-
        item = gtk_menu_item_new();
        gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
        gtk_widget_show(item);
@@ -5741,7 +5871,6 @@ static void summary_tags_menu_item_activate_item_cb(GtkMenuItem *menu_item,
        /* reset "dont_toggle" state */
        g_object_set_data(G_OBJECT(menu), "dont_toggle",
                          GINT_TO_POINTER(0));
-
 }
 
 void summaryview_destroy(SummaryView *summaryview)
@@ -5786,6 +5915,7 @@ static gint summary_tag_cmp_list(gconstpointer a, gconstpointer b)
 
 static void summary_tags_menu_create(SummaryView *summaryview, gboolean refresh)
 {
+
        GtkWidget *label_menuitem;
        GtkWidget *menu;
        GtkWidget *item;
@@ -5794,8 +5924,7 @@ static void summary_tags_menu_create(SummaryView *summaryview, gboolean refresh)
        gboolean existing_tags = FALSE;
 
        cur = orig = g_slist_sort(cur, summary_tag_cmp_list);
-       label_menuitem = gtk_item_factory_get_item(summaryview->popupfactory,
-                                                  "/Tags");
+       label_menuitem = gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/SummaryViewPopup/Tags");
        g_signal_connect(G_OBJECT(label_menuitem), "activate",
                         G_CALLBACK(summary_tags_menu_item_activate_item_cb),
                           summaryview);
@@ -5829,10 +5958,6 @@ static void summary_tags_menu_create(SummaryView *summaryview, gboolean refresh)
        }
 
        item = gtk_menu_item_new_with_label(_("Apply tags..."));
-       gtk_widget_add_accelerator(item, "activate", 
-                  summaryview->popupfactory->accel_group, 
-                  GDK_T, GDK_CONTROL_MASK|GDK_SHIFT_MASK,
-                  GTK_ACCEL_LOCKED | GTK_ACCEL_VISIBLE);
        gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
        g_signal_connect(G_OBJECT(item), "activate",
                         G_CALLBACK(summary_tags_menu_item_apply_tags_activate_cb),
@@ -5852,8 +5977,10 @@ static gboolean summary_popup_menu(GtkWidget *widget, gpointer data)
        SummaryView *summaryview = (SummaryView *)data;
        summaryview->display_msg = messageview_is_visible(summaryview->messageview);
 
-       gtk_menu_popup(GTK_MENU(summaryview->popupmenu), NULL, NULL,
-                      NULL, NULL, 0, gtk_get_current_event_time());
+       gtk_menu_popup(GTK_MENU(summaryview->popupmenu), 
+                      NULL, NULL, NULL, NULL, 
+                      3, gtk_get_current_event_time());
+
        return TRUE;
 }
 
@@ -6671,10 +6798,13 @@ static void summary_reply_cb(SummaryView *summaryview, guint action,
 static void summary_show_all_header_cb(SummaryView *summaryview,
                                       guint action, GtkWidget *widget)
 {
+       GtkWidget *menuitem = gtk_ui_manager_get_widget(gtkut_ui_manager(), "/Menus/SummaryViewPopup/View/AllHeaders");
+       if (!menuitem)
+               return;
        summaryview->messageview->all_headers =
-                       GTK_CHECK_MENU_ITEM(widget)->active;
+                       GTK_CHECK_MENU_ITEM(menuitem)->active;
        summary_display_msg_selected(summaryview,
-                                    GTK_CHECK_MENU_ITEM(widget)->active);
+                                    GTK_CHECK_MENU_ITEM(menuitem)->active);
 }
 
 static void summary_add_address_cb(SummaryView *summaryview,
index 6b1837c..50af10e 100644 (file)
 
 #include <glib.h>
 #include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkitemfactory.h>
-#include <gtk/gtkctree.h>
-#include <gtk/gtkdnd.h>
+#include <gtk/gtk.h>
 
 typedef struct _SummaryView            SummaryView;
 typedef struct _SummaryColumnState     SummaryColumnState;
@@ -113,7 +110,7 @@ struct _SummaryView
        GtkWidget *colorlabel_menu;
        GtkWidget *tags_menu;
 
-       GtkItemFactory *popupfactory;
+       GtkActionGroup *action_group;
 
        GtkWidget *window;