diff --git a/src/gui/panels/panel.cpp b/src/gui/panels/panel.cpp index 2ba98931d..e4f2b1bee 100644 --- a/src/gui/panels/panel.cpp +++ b/src/gui/panels/panel.cpp @@ -48,8 +48,6 @@ Panel::Panel(workspace::PanelManager &panel_manager, g_object_set_property (G_OBJECT (dockItem.gobj()), "long-name", val.gobj()); /* Set the grip handle */ - FIXME("Implement interpanel docking. Try using the dockItem.signal_dock(). Signal Handler will switch the grip depending on dock position. For iconify and interpanel docking, it needs to be a plain label"); - /* @todo This code causes a crash on panel iconify and interpanel docking */ GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP( gdl_dock_item_get_grip(dockItem.gobj())); gdl_dock_item_grip_show_handle(grip); @@ -103,24 +101,24 @@ Panel::is_shown() const void Panel::iconify() { - // //REQUIRE(dockItem != NULL); - // gdl_dock_item_iconify_item(dockItem); dockItem.iconify_item(); } bool Panel::is_iconified() const { - // REQUIRE(dockItem); - TODO("Port to Gdlmm"); - return GDL_DOCK_ITEM_ICONIFIED(dockItem.gobj()); + /** Gdlmm as of v1.30.0 does not have + * a facility for checking the whether + * a dock item is iconified or not + */ + GdlDockItem *item = dockItem.gobj(); + REQUIRE(item != NULL); + return GDL_DOCK_ITEM_ICONIFIED (item); } void Panel::lock(bool lock) { - // //REQUIRE(dockItem != NULL); - if(lock) dockItem.lock(); else dockItem.unlock(); } @@ -156,7 +154,7 @@ Panel::get_controller() return panelManager.get_workspace_window().get_controller(); } -sigc::signal +sigc::signal& Panel::signal_hide_panel() { return hidePanelSignal; diff --git a/src/gui/widgets/panel-bar.cpp b/src/gui/widgets/panel-bar.cpp index 7aeccb160..2328eef81 100644 --- a/src/gui/widgets/panel-bar.cpp +++ b/src/gui/widgets/panel-bar.cpp @@ -50,7 +50,7 @@ PanelBar::PanelBar(panels::Panel &owner_panel, const gchar *stock_id) : panelButton.unset_flags(CAN_FOCUS); panelButton.show(); pack_start(panelButton, PACK_SHRINK); - + setup_panel_button(); } @@ -93,12 +93,14 @@ PanelBar::setup_panel_button() void PanelBar::on_realize() { + FIXME("Somehow the Gdk window causes lumiera to crash when docking to CENTER or iconifying a panel"); set_flags(Gtk::NO_WINDOW); - + // Call base class: Gtk::Container::on_realize(); // Create the GdkWindow: + GdkWindowAttr attributes; memset(&attributes, 0, sizeof(attributes)); @@ -124,6 +126,7 @@ PanelBar::on_realize() unset_flags(Gtk::NO_WINDOW); unset_bg(STATE_NORMAL); + } void diff --git a/src/gui/workspace/panel-manager.cpp b/src/gui/workspace/panel-manager.cpp index cc479b78b..b985aba28 100644 --- a/src/gui/workspace/panel-manager.cpp +++ b/src/gui/workspace/panel-manager.cpp @@ -73,7 +73,6 @@ PanelManager::~PanelManager() void PanelManager::setup_dock() { - REQUIRE(dockPlaceholders[0] == NULL && dockPlaceholders[1] == NULL && dockPlaceholders[2] == NULL && dockPlaceholders[3] == NULL); dockPlaceholders[0] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( @@ -258,8 +257,8 @@ PanelManager::create_panel_by_index( panel->show_all(); // Connect event handlers - panel->signal_hide_panel().connect(bind( - mem_fun(*this, &PanelManager::on_panel_shown), panel)); + panel->signal_hide_panel().connect(sigc::bind( + sigc::mem_fun(*this, &PanelManager::on_panel_shown), panel)); // Add the panel to the list panels.push_back(panel);