[sylpheed-jp:11105] [PATCH] Sylpheed/bugtrack/85 メール内容を表示した際のシグナ ルをプラグイン向けに発行する
HAYASHI Kentaro <[email protected]> Fri, 15 Apr 2011 00:54:44 +0900
| Newsgroups | gmane.mail.sylpheed.general.japanese |
|---|---|
| Message-ID | <[email protected]> |
林といいます。 WikiにあるBTSに要望を出していた #85についてですが、パッチを作成してみました。 メール内容を表示した際のシグナルをプラグイン向けに発行して欲しい http://sylpheed.sraoss.jp/wiki/index.php?Sylpheed%2Fbugtrack%2F85 問題なければ取りこんでいただけると幸いです。 -- HAYASHI Kentaro <[email protected]> _______________________________________________ Sylpheed-jp mailing list [email protected] http://www.sraoss.jp/mailman/listinfo/sylpheed-jp
messageview-show.diff
(application/octet-stream, 1.8 KB)
Index: messageview.c
===================================================================
--- messageview.c (rW 2867)
+++ messageview.c (ìÆRs[)
@@ -533,6 +533,8 @@
if (messageview->new_window)
messageview_set_menu_state(messageview);
+ syl_plugin_signal_emit("messageview-show", msginfo, all_headers);
+
g_free(file);
return 0;
Index: plugin-marshal.list
===================================================================
--- plugin-marshal.list (rW 2867)
+++ plugin-marshal.list (ìÆRs[)
@@ -1,2 +1,3 @@
VOID:POINTER
VOID:POINTER,POINTER,STRING,STRING,POINTER
+VOID:POINTER,BOOLEAN
Index: plugin.c
===================================================================
--- plugin.c (rW 2867)
+++ plugin.c (ìÆRs[)
@@ -36,6 +36,7 @@
COMPOSE_CREATED,
COMPOSE_DESTROY,
TEXTVIEW_MENU_POPUP,
+ MESSAGEVIEW_SHOW,
LAST_SIGNAL
};
@@ -172,6 +173,18 @@
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_POINTER);
+ plugin_signals[MESSAGEVIEW_SHOW] =
+ g_signal_new("messageview-show",
+ G_TYPE_FROM_CLASS(gobject_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(SylPluginClass,
+ messageview_show),
+ NULL, NULL,
+ syl_plugin_marshal_VOID__POINTER_BOOLEAN,
+ G_TYPE_NONE,
+ 2,
+ G_TYPE_POINTER,
+ G_TYPE_BOOLEAN);
}
void syl_plugin_signal_connect(const gchar *name, GCallback callback,
Index: plugin.h
===================================================================
--- plugin.h (rW 2867)
+++ plugin.h (ìÆRs[)
@@ -71,6 +71,7 @@
const gchar *uri,
const gchar *selected_text,
MsgInfo *msginfo);
+ void (* messageview_show) (GObject *obj, MsgInfo *msginfo, gboolean all_headers);
};
struct _SylPluginInfo