From d389dce3ef4f1342a2f91926a9dcd02b452c6045 Mon Sep 17 00:00:00 2001 From: neoraider Date: Tue, 4 Dec 2007 21:35:01 +0000 Subject: zoomedit: Got SidebarToolbox working. --- SidebarManager.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'SidebarManager.cpp') diff --git a/SidebarManager.cpp b/SidebarManager.cpp index 86e70d0..a0bfb81 100644 --- a/SidebarManager.cpp +++ b/SidebarManager.cpp @@ -2,19 +2,27 @@ SidebarManager::SidebarManager(EditManager *editor) - : sidebarView(editor), sidebarAdd(editor) + : sidebarView(editor), sidebarAdd(editor), tool(editor) { this->editor = editor; activeSidebar = NULL; - sidebar = gtk_scrolled_window_new(NULL, NULL); - g_object_ref_sink(G_OBJECT(sidebar)); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sidebar), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + sidebar = gtk_vbox_new(FALSE, 0); + g_object_ref_sink(G_OBJECT(sidebar)); + + gtk_box_pack_start_defaults(GTK_BOX(sidebar), sidebarToolbox.getWidget()); + + scrolledWindow = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_box_pack_end_defaults(GTK_BOX(sidebar), scrolledWindow); + gtk_widget_show(scrolledWindow); viewport = gtk_viewport_new(NULL, NULL); - gtk_container_add(GTK_CONTAINER(sidebar), viewport); + gtk_container_add(GTK_CONTAINER(scrolledWindow), viewport); gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE); + sidebarToolbox.addTool(&tool); + gtk_widget_show(sidebar); } @@ -42,5 +50,6 @@ void SidebarManager::update() { activeSidebar = newSidebar; } + sidebarToolbox.update(); activeSidebar->update(); } -- cgit v1.2.3