summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec8a35d)
raw | patch | inline | side by side (parent: ec8a35d)
author | Jon A. Cruz <jon@joncruz.org> | |
Wed, 6 Jan 2010 09:44:56 +0000 (01:44 -0800) | ||
committer | Jon A. Cruz <jon@joncruz.org> | |
Wed, 6 Jan 2010 09:44:56 +0000 (01:44 -0800) |
src/widgets/toolbox.cpp | patch | blob | history |
index 44ad5a6ce013b6a9aef7327b2d23b54087b01da1..49cbbe0104366ab731e62b2ad3793504cc1fba71 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
static Glib::RefPtr<Gtk::ActionGroup> create_or_fetch_actions( SPDesktop* desktop );
-static void toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop, SetupFunction setup_func, UpdateFunction update_func, sigc::connection*);
+static void toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop, SetupFunction setup_func, UpdateFunction update_func);
static void setup_tool_toolbox (GtkWidget *toolbox, SPDesktop *desktop);
static void update_tool_toolbox (SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox);
{
GtkWidget *tb = gtk_vbox_new(FALSE, 0);
+ g_object_set_data(G_OBJECT(tb), "MarkForChild", const_cast<gchar *>("MarkForChild"));
+
return toolboxNewCommon( tb, GTK_POS_LEFT );
}
toolbox_set_desktop(toolbox,
desktop,
setup_tool_toolbox,
- update_tool_toolbox,
- static_cast<sigc::connection*>(g_object_get_data(G_OBJECT(toolbox),
- "event_context_connection")));
+ update_tool_toolbox);
}
void
sp_aux_toolbox_set_desktop(GtkWidget *toolbox, SPDesktop *desktop)
{
- toolbox_set_desktop(gtk_bin_get_child(GTK_BIN(toolbox)),
+ toolbox_set_desktop(toolbox,
desktop,
setup_aux_toolbox,
- update_aux_toolbox,
- static_cast<sigc::connection*>(g_object_get_data(G_OBJECT(toolbox),
- "event_context_connection")));
+ update_aux_toolbox);
}
void
toolbox_set_desktop(toolbox,
desktop,
setup_commands_toolbox,
- update_commands_toolbox,
- static_cast<sigc::connection*>(g_object_get_data(G_OBJECT(toolbox),
- "event_context_connection")));
+ update_commands_toolbox);
}
void
toolbox_set_desktop(toolbox,
desktop,
setup_snap_toolbox,
- update_snap_toolbox,
- static_cast<sigc::connection*>(g_object_get_data(G_OBJECT(toolbox),
- "event_context_connection")));
+ update_snap_toolbox);
}
static void
-toolbox_set_desktop(GtkWidget *toolbox, SPDesktop *desktop, SetupFunction setup_func, UpdateFunction update_func, sigc::connection *conn)
+toolbox_set_desktop(GtkWidget *toolbox, SPDesktop *desktop, SetupFunction setup_func, UpdateFunction update_func)
{
+ sigc::connection *conn = static_cast<sigc::connection*>(g_object_get_data(G_OBJECT(toolbox),
+ "event_context_connection"));
+ {
+ GtkWidget* child = gtk_bin_get_child(GTK_BIN(toolbox));
+ if (g_object_get_data(G_OBJECT(child), "MarkForChild")) {
+ toolbox = child;
+ }
+ }
gpointer ptr = g_object_get_data(G_OBJECT(toolbox), "desktop");
SPDesktop *old_desktop = static_cast<SPDesktop*>(ptr);