aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-07-06 09:39:50 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-07-06 09:39:50 +0000
commit23e83b928ce25b3aca609fb41e65a7c231c97f18 (patch)
treeaf264d3a2d9e213f603dcfb35c7adcdb67a29d6c /src
parent99bac05ea5d0dc7a7aefdfe1e6066c31170824cb (diff)
added plug-in APIs to get selected messages on summary.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2602 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
-rw-r--r--src/plugin.c42
-rw-r--r--src/plugin.h4
3 files changed, 49 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 97667b18..df7cec6c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1171,6 +1171,9 @@ static void plugin_init(void)
ADD_SYM(summary_write_lock);
ADD_SYM(summary_write_unlock);
ADD_SYM(summary_is_write_locked);
+ ADD_SYM(summary_get_selection_type);
+ ADD_SYM(summary_get_selected_msg_list);
+ ADD_SYM(summary_get_msg_list);
ADD_SYM(messageview_create_with_new_window);
ADD_SYM(messageview_show);
diff --git a/src/plugin.c b/src/plugin.c
index 85da3f10..3e83a221 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -821,6 +821,48 @@ gboolean syl_plugin_summary_is_write_locked(void)
return FALSE;
}
+gint syl_plugin_summary_get_selection_type(void)
+{
+ gint (*func)(gpointer);
+ gpointer summary;
+
+ summary = syl_plugin_summary_view_get();
+ if (summary) {
+ GETFUNC("summary_get_selection_type");
+ return SAFE_CALL_ARG1_RET_VAL(func, summary, 0);
+ }
+
+ return 0;
+}
+
+GSList *syl_plugin_summary_get_selected_msg_list(void)
+{
+ GSList * (*func)(gpointer);
+ gpointer summary;
+
+ summary = syl_plugin_summary_view_get();
+ if (summary) {
+ GETFUNC("summary_get_selected_msg_list");
+ return SAFE_CALL_ARG1_RET(func, summary);
+ }
+
+ return NULL;
+}
+
+GSList *syl_plugin_summary_get_msg_list(void)
+{
+ GSList * (*func)(gpointer);
+ gpointer summary;
+
+ summary = syl_plugin_summary_view_get();
+ if (summary) {
+ GETFUNC("summary_get_msg_list");
+ return SAFE_CALL_ARG1_RET(func, summary);
+ }
+
+ return NULL;
+}
+
gpointer syl_plugin_messageview_create_with_new_window(void)
{
gpointer (*func)(void);
diff --git a/src/plugin.h b/src/plugin.h
index 6632f8e5..f7c29ed2 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -176,6 +176,10 @@ void syl_plugin_summary_write_lock (void);
void syl_plugin_summary_write_unlock (void);
gboolean syl_plugin_summary_is_write_locked (void);
+gint syl_plugin_summary_get_selection_type (void);
+GSList *syl_plugin_summary_get_selected_msg_list(void);
+GSList *syl_plugin_summary_get_msg_list (void);
+
/* MessageView */
gpointer syl_plugin_messageview_create_with_new_window
(void);