talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 2c6262672b1e351adcb325dc26ddf516683904e2
parent 0bc0c3f1722e65e5e285ee525878bf8323305973
Author: Holger Berndt <hb@claws-mail.org>
Date:   Sun, 20 Dec 2009 14:06:10 +0000

2009-12-20 [holger]	3.7.3cvs43

	* src/prefs_toolbar.c
	* src/prefs_toolbar.h
	* src/toolbar.c
		Pass window struct to caller

Diffstat:
MChangeLog | 7+++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/prefs_toolbar.c | 8++++----
Msrc/prefs_toolbar.h | 3++-
Msrc/toolbar.c | 2+-
6 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-20 [holger] 3.7.3cvs43 + + * src/prefs_toolbar.c + * src/prefs_toolbar.h + * src/toolbar.c + Pass window struct to caller + 2009-12-20 [holger] 3.7.3cvs42 * src/compose.c diff --git a/PATCHSETS b/PATCHSETS @@ -3916,3 +3916,4 @@ ( cvs diff -u -r 1.5.2.25 -r 1.5.2.26 src/statusbar.c; ) > 3.7.3cvs40.patchset ( cvs diff -u -r 1.30.2.58 -r 1.30.2.59 src/prefs_toolbar.c; cvs diff -u -r 1.5.2.7 -r 1.5.2.8 src/prefs_toolbar.h; cvs diff -u -r 1.43.2.111 -r 1.43.2.112 src/toolbar.c; ) > 3.7.3cvs41.patchset ( cvs diff -u -r 1.382.2.537 -r 1.382.2.538 src/compose.c; cvs diff -u -r 1.50.2.57 -r 1.50.2.58 src/compose.h; ) > 3.7.3cvs42.patchset +( cvs diff -u -r 1.30.2.59 -r 1.30.2.60 src/prefs_toolbar.c; cvs diff -u -r 1.5.2.8 -r 1.5.2.9 src/prefs_toolbar.h; cvs diff -u -r 1.43.2.112 -r 1.43.2.113 src/toolbar.c; ) > 3.7.3cvs43.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=3 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=42 +EXTRA_VERSION=43 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c @@ -1095,7 +1095,7 @@ void prefs_toolbar_unregister_plugin_item(ToolbarType toolbar_type, const gchar toolbar_unregister_plugin_item_real(*hash, plugin_name, item_name); } -static void prefs_toolbar_execute_plugin_item_real(GHashTable *hash, const gchar *id) +static void prefs_toolbar_execute_plugin_item_real(gpointer parent, GHashTable *hash, const gchar *id) { ToolbarPluginItem *value; GSList *walk; @@ -1128,15 +1128,15 @@ static void prefs_toolbar_execute_plugin_item_real(GHashTable *hash, const gchar return; } - value->cb(value->item_name, value->cb_data); + value->cb(parent, value->item_name, value->cb_data); } -void prefs_toolbar_execute_plugin_item(ToolbarType toolbar_type, const gchar *id) +void prefs_toolbar_execute_plugin_item(gpointer parent, ToolbarType toolbar_type, const gchar *id) { GHashTable **hash; hash = get_plugin_hash_from_toolbar_type(toolbar_type); if(hash) - prefs_toolbar_execute_plugin_item_real(*hash, id); + prefs_toolbar_execute_plugin_item_real(parent, *hash, id); } static void destroy_plugin_item_hash_value(ToolbarPluginItem *item) diff --git a/src/prefs_toolbar.h b/src/prefs_toolbar.h @@ -23,7 +23,8 @@ void prefs_toolbar_init (void); void prefs_toolbar_done (void); -typedef void (*ToolbarPluginCallback)(const gchar *item_name, gpointer data); +/* parent is a MainWindow, Compose, or MessageView, depending on the ToolbarType during registration */ +typedef void (*ToolbarPluginCallback)(gpointer parent, const gchar *item_name, gpointer data); void prefs_toolbar_register_plugin_item(ToolbarType toolbar_type, const gchar *plugin_name, const gchar *item_name, ToolbarPluginCallback cb, gpointer cb_data); void prefs_toolbar_unregister_plugin_item(ToolbarType toolbar_type, const gchar *plugin_name, const gchar *item_name); diff --git a/src/toolbar.c b/src/toolbar.c @@ -1624,7 +1624,7 @@ static void toolbar_actions_execute_cb(GtkWidget *widget, gpointer data) static void toolbar_plugins_execute_cb(GtkWidget *widget, gpointer data) { ToolbarItem *toolbar_item = data; - prefs_toolbar_execute_plugin_item(toolbar_item->type, toolbar_item->text); + prefs_toolbar_execute_plugin_item(toolbar_item->parent, toolbar_item->type, toolbar_item->text); } static MainWindow *get_mainwin(gpointer data)