aboutsummaryrefslogtreecommitdiff
path: root/src/plugin.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-05-31 09:12:47 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-05-31 09:12:47 +0000
commitc6d0596a556e392d56c2edf525798464ae3640fa (patch)
tree599f4e92a97c8935db858a14b454c05aea0d2f62 /src/plugin.c
parent3dc9b18af690611442f591bc4badc7d86b241117 (diff)
added some functions for FolderView.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2554 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c
index e382bfd2..2193f405 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -36,6 +36,8 @@ enum {
LAST_SIGNAL
};
+#define GETFUNC(sym) { func = syl_plugin_lookup_symbol(sym); }
+
#define SAFE_CALL(func_ptr) { if (func_ptr) func_ptr(); }
#define SAFE_CALL_RET(func_ptr) (func_ptr ? func_ptr() : NULL)
#define SAFE_CALL_RET_VAL(func_ptr, retval) \
@@ -562,6 +564,50 @@ FolderItem *syl_plugin_folderview_get_selected_item(void)
return NULL;
}
+gint syl_plugin_folderview_check_new(Folder *folder)
+{
+ gint (*func)(Folder *);
+ GETFUNC("folderview_check_new");
+ return SAFE_CALL_ARG1_RET_VAL(func, folder, FALSE);
+}
+
+gint syl_plugin_folderview_check_new_item(FolderItem *item)
+{
+ gint (*func)(FolderItem *);
+ GETFUNC("folderview_check_new_item");
+ return SAFE_CALL_ARG1_RET_VAL(func, item, FALSE);
+}
+
+gint syl_plugin_folderview_check_new_all(void)
+{
+ gint (*func)(void);
+ GETFUNC("folderview_check_new_all");
+ return SAFE_CALL_RET_VAL(func, FALSE);
+}
+
+void syl_plugin_folderview_update_item(FolderItem *item,
+ gboolean update_summary)
+{
+ void (*func)(FolderItem *, gboolean);
+ GETFUNC("folderview_update_item");
+ SAFE_CALL_ARG2(func, item, update_summary);
+}
+
+void syl_plugin_folderview_update_item_foreach(GHashTable *table,
+ gboolean update_summary)
+{
+ void (*func)(GHashTable *, gboolean);
+ GETFUNC("folderview_update_item_foreach");
+ SAFE_CALL_ARG2(func, table, update_summary);
+}
+
+void syl_plugin_folderview_update_all_updated(gboolean update_summary)
+{
+ void (*func)(gboolean);
+ GETFUNC("folderview_update_all_updated");
+ SAFE_CALL_ARG1(func, update_summary);
+}
+
gpointer syl_plugin_summary_view_get(void)
{
gpointer sym;