From ee50f55fa6d7819135a13b37c11dbb255a2bbfec Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Tue, 17 Mar 2009 21:35:29 +0000 Subject: [PATCH] Moved panel handles into GDL --- src/gui/panels/panel.cpp | 1 + src/gui/widgets/panel-bar.cpp | 37 ----------------------------------- src/gui/widgets/panel-bar.hpp | 19 +----------------- 3 files changed, 2 insertions(+), 55 deletions(-) diff --git a/src/gui/panels/panel.cpp b/src/gui/panels/panel.cpp index 6b287ae7f..727a057a0 100644 --- a/src/gui/panels/panel.cpp +++ b/src/gui/panels/panel.cpp @@ -97,6 +97,7 @@ Panel::internal_setup() GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP( gdl_dock_item_get_grip(dock_item)); + gdl_dock_item_grip_show_handle(grip); gdl_dock_item_grip_set_label(grip, ((Widget&)panelBar).gobj()); gtk_container_add ((GtkContainer*)dock_item, (GtkWidget*)gobj()); diff --git a/src/gui/widgets/panel-bar.cpp b/src/gui/widgets/panel-bar.cpp index 6243bd16c..1042be5c9 100644 --- a/src/gui/widgets/panel-bar.cpp +++ b/src/gui/widgets/panel-bar.cpp @@ -44,42 +44,5 @@ PanelBar::PanelBar(const gchar *stock_id) : pack_start(panelButton, PACK_SHRINK); } -bool -PanelBar::on_expose_event(GdkEventExpose* event) -{ - HBox::on_expose_event(event); - - RefPtr style = get_style(); - REQUIRE(style); - - const Allocation allocation(get_allocation()); - const Gdk::Rectangle rect( - allocation.get_x() - DragHandleSize, allocation.get_y(), - DragHandleSize, allocation.get_height()); - - style->paint_handle(get_window(), STATE_NORMAL, SHADOW_NONE, - rect, *this, "handlebox", rect.get_x(), rect.get_y(), - rect.get_width(), rect.get_height(), ORIENTATION_VERTICAL); - - return true; -} - -void -PanelBar::on_size_allocate(Gtk::Allocation& allocation) -{ - allocation.set_x(allocation.get_x() + DragHandleSize); - HBox::on_size_allocate(allocation); -} - -void -PanelBar::on_size_request(Gtk::Requisition* requisition) -{ - REQUIRE(requisition); - - HBox::on_size_request(requisition); - - requisition->width += DragHandleSize; -} - } // widgets } // gui diff --git a/src/gui/widgets/panel-bar.hpp b/src/gui/widgets/panel-bar.hpp index 2289ba088..b8d837fec 100644 --- a/src/gui/widgets/panel-bar.hpp +++ b/src/gui/widgets/panel-bar.hpp @@ -45,24 +45,7 @@ public: * panel. **/ PanelBar(const gchar *stock_id); - -private: - - /** - * An override to intercept expose events. - **/ - bool on_expose_event(GdkEventExpose* event); - - /** - * An override to intercept size allocate events. - **/ - void on_size_allocate(Gtk::Allocation& allocation); - - /** - * An override to intercept size request events. - **/ - void on_size_request(Gtk::Requisition* requisition); - + private: /**