diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/plugin.c | 14 | ||||
-rw-r--r-- | src/plugin.h | 1 | ||||
-rw-r--r-- | src/summaryview.c | 3 |
4 files changed, 20 insertions, 0 deletions
@@ -1159,6 +1159,8 @@ static void plugin_init(void) mainwin->folderview->news_factory); syl_plugin_add_symbol("summaryview", mainwin->summaryview); + syl_plugin_add_symbol("summaryview_popup_factory", + mainwin->summaryview->popupfactory); ADD_SYM(summary_select_by_msgnum); ADD_SYM(summary_select_by_msginfo); diff --git a/src/plugin.c b/src/plugin.c index e428898c..85da3f10 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -31,6 +31,7 @@ enum { PLUGIN_LOAD, PLUGIN_UNLOAD, FOLDERVIEW_MENU_POPUP, + SUMMARYVIEW_MENU_POPUP, COMPOSE_CREATED, COMPOSE_DESTROY, LAST_SIGNAL @@ -107,6 +108,17 @@ static void syl_plugin_class_init(SylPluginClass *klass) G_TYPE_NONE, 1, G_TYPE_POINTER); + plugin_signals[SUMMARYVIEW_MENU_POPUP] = + g_signal_new("summaryview-menu-popup", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET(SylPluginClass, + summaryview_menu_popup), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); plugin_signals[COMPOSE_CREATED] = g_signal_new("compose-created", G_TYPE_FROM_CLASS(gobject_class), @@ -433,6 +445,8 @@ static GtkItemFactory *get_item_factory(const gchar *path) ifactory = syl_plugin_lookup_symbol("folderview_imap_popup_factory"); else if (strncmp(path, "<NewsFolder>", 12) == 0) ifactory = syl_plugin_lookup_symbol("folderview_news_popup_factory"); + else if (strncmp(path, "<SummaryView>", 13) == 0) + ifactory = syl_plugin_lookup_symbol("summaryview_popup_factory"); else ifactory = syl_plugin_lookup_symbol("main_window_menu_factory"); diff --git a/src/plugin.h b/src/plugin.h index 5ec55af5..6632f8e5 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -60,6 +60,7 @@ struct _SylPluginClass void (* plugin_unload) (GObject *obj, GModule *module); void (* folderview_menu_popup) (GObject *obj, gpointer ifactory); + void (* summaryview_menu_popup) (GObject *obj, gpointer ifactory); void (* compose_created) (GObject *obj, gpointer compose); void (* compose_destroy) (GObject *obj, gpointer compose); diff --git a/src/summaryview.c b/src/summaryview.c index b7bedbe2..b703b847 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -84,6 +84,7 @@ #include "colorlabel.h" #include "inc.h" #include "imap.h" +#include "plugin.h" #define STATUSBAR_PUSH(mainwin, str) \ { \ @@ -5645,6 +5646,8 @@ static gboolean summary_button_pressed(GtkWidget *treeview, return TRUE; } else if (event->button == 3) { /* right clicked */ + syl_plugin_signal_emit("summaryview-menu-popup", + summaryview->popupfactory); gtk_menu_popup(GTK_MENU(summaryview->popupmenu), NULL, NULL, NULL, NULL, event->button, event->time); if (is_selected) { |