aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/libsylpheed-plugin-0.def2
-rw-r--r--src/main.c1
-rw-r--r--src/plugin.c15
-rw-r--r--src/plugin.h4
5 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f6475c65..5c4e7275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-17
+
+ * src/plugin.[ch]
+ src/main.c
+ src/libsylpheed-plugin-0.def: made syl_plugin_lookup_symbol()
+ public. Added syl_plugin_main_window_get_statusbar().
+
2009-06-12
* plugin/test/Makefile.am: do not install automatically (added make
diff --git a/src/libsylpheed-plugin-0.def b/src/libsylpheed-plugin-0.def
index af7f91cd..24fbfea6 100644
--- a/src/libsylpheed-plugin-0.def
+++ b/src/libsylpheed-plugin-0.def
@@ -39,3 +39,5 @@ EXPORTS
syl_plugin_menu_set_sensitive_all @ 37
syl_plugin_menu_set_active @ 38
syl_plugin_manage_window_get_focus_window @ 39
+ syl_plugin_main_window_get_statusbar @ 40
+ syl_plugin_lookup_symbol @ 41
diff --git a/src/main.c b/src/main.c
index 50e7cc0a..d012c90b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1023,6 +1023,7 @@ static void plugin_init(void)
syl_plugin_add_symbol("app_will_exit", app_will_exit);
syl_plugin_add_symbol("main_window_menu_factory",
mainwin->menu_factory);
+ syl_plugin_add_symbol("main_window_statusbar", mainwin->statusbar);
syl_plugin_add_symbol("folderview", mainwin->folderview);
syl_plugin_add_symbol("folderview_get_selected_item",
diff --git a/src/plugin.c b/src/plugin.c
index 062200ff..69270ecf 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -34,8 +34,6 @@ enum {
LAST_SIGNAL
};
-#define syl_plugin_lookup_symbol(name) g_hash_table_lookup(sym_table, name)
-
#define SAFE_CALL(func_ptr) { if (func_ptr) func_ptr(); }
#define SAFE_CALL_RET(func_ptr) (func_ptr ? func_ptr() : NULL)
#define SAFE_CALL_ARG1(func_ptr, arg1) { if (func_ptr) func_ptr(arg1); }
@@ -312,6 +310,11 @@ gint syl_plugin_add_symbol(const gchar *name, gpointer sym)
return 0;
}
+gpointer syl_plugin_lookup_symbol(const gchar *name)
+{
+ return g_hash_table_lookup(sym_table, name);
+}
+
const gchar *syl_plugin_get_prog_version(void)
{
gpointer sym;
@@ -336,6 +339,14 @@ void syl_plugin_main_window_popup(gpointer mainwin)
SAFE_CALL_ARG1(func, mainwin);
}
+GtkWidget *syl_plugin_main_window_get_statusbar(void)
+{
+ gpointer widget;
+
+ widget = syl_plugin_lookup_symbol("main_window_statusbar");
+ return GTK_WIDGET(widget);
+}
+
void syl_plugin_app_will_exit(gboolean force)
{
void (*func)(gboolean);
diff --git a/src/plugin.h b/src/plugin.h
index 6a120731..177a8463 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -93,7 +93,8 @@ GSList *syl_plugin_get_module_list (void);
SylPluginInfo *syl_plugin_get_info (GModule *module);
gboolean syl_plugin_check_version (GModule *module);
-gint syl_plugin_add_symbol (const gchar *name, gpointer sym);
+gint syl_plugin_add_symbol (const gchar *name, gpointer sym);
+gpointer syl_plugin_lookup_symbol (const gchar *name);
/* Interfaces which should be implemented by plug-ins
void plugin_load(void);
@@ -108,6 +109,7 @@ const gchar *syl_plugin_get_prog_version (void);
gpointer syl_plugin_main_window_get (void);
void syl_plugin_main_window_popup (gpointer mainwin);
+GtkWidget *syl_plugin_main_window_get_statusbar (void);
void syl_plugin_app_will_exit (gboolean force);