House Cleaning

This commit is contained in:
Michael R. Fisher 2011-10-16 22:07:26 -05:00 committed by Ichthyostega
parent 2d8805c554
commit d42d917b4c
3 changed files with 15 additions and 15 deletions

View file

@ -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<void>
sigc::signal<void>&
Panel::signal_hide_panel()
{
return hidePanelSignal;

View file

@ -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

View file

@ -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);