+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
( 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
MICRO_VERSION=3
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=42
+EXTRA_VERSION=43
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
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;
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)
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);
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)