From 5caa6ff4dfb7b538555d60fa2732272bf8b9828b Mon Sep 17 00:00:00 2001 From: gustav_b Date: Thu, 22 Nov 2007 00:14:41 +0000 Subject: The dialog to panel refactoring: * Made the current dialogs subclass the Panel class instead of the Dialog class. * Extended the Panel class with some functionality that the dialogs relied on. * Added a PanelDialog class which is a dialog container for a single panel with the dialog behavior as a template parameter. (* Fixed coding style for the Panel and Dialog class) For details, see http://www.nabble.com/Re%3A-Dockable-dialogs%2C-todo-list-p12728194.html http://www.nabble.com/Re%3A-Inkscape-overcomes-Xara-in-Google-Trends-p13126622.html (bzr r4126) --- src/ui/widget/dock-item.cpp | 60 --------------------------------------------- 1 file changed, 60 deletions(-) (limited to 'src/ui/widget/dock-item.cpp') diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index f3fba93bf..6390eca50 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -32,21 +32,6 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l _window (NULL), _dock_item_action_area (NULL) { - /* Add a "signal_response" signal to the GdlDockItem, make sure it is - * only done once for the class. - */ - static guint response_signal = 0; - - if (response_signal == 0) { - response_signal = g_signal_new ("signal_response", - GDL_TYPE_DOCK_ITEM, - G_SIGNAL_RUN_FIRST, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); - } - GdlDockItemBehavior gdl_dock_behavior = (prefs_get_int_attribute_limited ("options.dock", "cancenterdock", 1, 0, 1) == 0 ? @@ -228,20 +213,6 @@ DockItem::getPlacement() const return (Placement)placement; } - -void -DockItem::addButton(Gtk::Button* button, int /*response_id*/) -{ - // Create a button box for the response buttons if it's the first button to be added - if (!_dock_item_action_area) { - _dock_item_action_area = new Gtk::HButtonBox(Gtk::BUTTONBOX_END, 6); - _dock_item_box.pack_end(*_dock_item_action_area, Gtk::PACK_SHRINK, 0); - _dock_item_action_area->set_border_width(6); - } - - _dock_item_action_area->pack_start(*button); -} - void DockItem::hide() { @@ -326,13 +297,6 @@ DockItem::signal_delete_event() &_signal_delete_event_proxy); } -Glib::SignalProxy1 -DockItem::signal_response() -{ - return Glib::SignalProxy1(Glib::wrap(GTK_WIDGET(_gdl_dock_item)), - &_signal_response_proxy); -} - Glib::SignalProxy0 DockItem::signal_drag_begin() { @@ -476,14 +440,6 @@ DockItem::_signal_delete_event_proxy = }; -const Glib::SignalProxyInfo -DockItem::_signal_response_proxy = -{ - "signal_response", - (GCallback) &_signal_response_callback, - (GCallback) &_signal_response_callback -}; - const Glib::SignalProxyInfo DockItem::_signal_drag_begin_proxy = { @@ -530,22 +486,6 @@ DockItem::_signal_delete_event_callback(GtkWidget *self, GdkEventAny *event, voi return RType(); } -void -DockItem::_signal_response_callback(GtkWidget *self, gint response_id, void *data) -{ - using namespace Gtk; - typedef sigc::slot SlotType; - - if (Glib::ObjectBase::_get_current_wrapper((GObject *) self)) { - try { - if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) - (*static_cast(slot))(response_id); - } catch(...) { - Glib::exception_handlers_invoke(); - } - } -} - void DockItem::_signal_drag_end_callback(GtkWidget *self, gboolean cancelled, void *data) { -- cgit v1.2.3