diff options
author | neoraider <devnull@localhost> | 2007-12-04 22:35:01 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-12-04 22:35:01 +0100 |
commit | d389dce3ef4f1342a2f91926a9dcd02b452c6045 (patch) | |
tree | c3a7a88afd02cb3cdc88a987e227badcc6095b0c /SidebarManager.cpp | |
parent | ecf40f86dfa6aa623bf31494125f3702f9fa0298 (diff) | |
download | zoomedit-d389dce3ef4f1342a2f91926a9dcd02b452c6045.tar zoomedit-d389dce3ef4f1342a2f91926a9dcd02b452c6045.zip |
zoomedit: Got SidebarToolbox working.
Diffstat (limited to 'SidebarManager.cpp')
-rw-r--r-- | SidebarManager.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
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(); } |