diff options
author | neoraider <devnull@localhost> | 2007-12-05 23:02:03 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-12-05 23:02:03 +0100 |
commit | d82c597917d8ef5866c7a83d0c101f423a2ac05d (patch) | |
tree | 7df4f557e2d020de09a0d0b349960a7c81fe5853 /SidebarManager.cpp | |
parent | beb34f184adcea0f8a902f49109f9ffa7951e6ba (diff) | |
download | zoomedit-d82c597917d8ef5866c7a83d0c101f423a2ac05d.tar zoomedit-d82c597917d8ef5866c7a83d0c101f423a2ac05d.zip |
zoomedit: Fixed some bugs.
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 b3bbaa7..0eb1f7b 100644 --- a/SidebarManager.cpp +++ b/SidebarManager.cpp @@ -1,10 +1,12 @@ #include "SidebarManager.h" +#include "Window.h" -SidebarManager::SidebarManager(EditManager *editor) - : sidebarToolbox(editor), sidebarView(editor), sidebarAdd(editor), toolAddPolygon(editor) +SidebarManager::SidebarManager(Window *window) + : sidebarToolbox(window), sidebarView(&window->getEditManager()), + sidebarAdd(&window->getEditManager()), toolAddPolygon(&window->getEditManager()) { - this->editor = editor; + this->editor = &window->getEditManager(); activeSidebar = NULL; sidebar = gtk_vbox_new(FALSE, 0); @@ -12,14 +14,19 @@ SidebarManager::SidebarManager(EditManager *editor) gtk_box_pack_start(GTK_BOX(sidebar), sidebarToolbox.getWidget(), FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(sidebar), gtk_hseparator_new(), FALSE, FALSE, 5); + + toolLabel = gtk_label_new(sidebarToolbox.getActiveTool()->getName()); + + gtk_box_pack_start(GTK_BOX(sidebar), toolLabel, FALSE, FALSE, 0); + 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_box_pack_start_defaults(GTK_BOX(sidebar), scrolledWindow); gtk_widget_show(scrolledWindow); viewport = gtk_viewport_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(scrolledWindow), viewport); - gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE); sidebarToolbox.addTool(&toolAddPolygon); @@ -50,6 +57,8 @@ void SidebarManager::update() { activeSidebar = newSidebar; } + gtk_label_set_text(GTK_LABEL(toolLabel), sidebarToolbox.getActiveTool()->getName()); + sidebarToolbox.update(); activeSidebar->update(); } |