diff --git a/src/gui/workspace/panel-manager.cpp b/src/gui/workspace/panel-manager.cpp index a2f1fb5e7..faa1068da 100644 --- a/src/gui/workspace/panel-manager.cpp +++ b/src/gui/workspace/panel-manager.cpp @@ -121,10 +121,10 @@ PanelManager::get_workspace_window() } void PanelManager::switch_panel(panels::Panel &old_panel, - int new_panel_description_index) + const int description_index) { - REQUIRE(new_panel_description_index >= 0 && - new_panel_description_index < get_panel_description_count()); + REQUIRE(description_index >= 0 && + description_index < get_panel_description_count()); // Get the dock item GdlDockItem *dock_item = old_panel.get_dock_item(); @@ -143,8 +143,7 @@ void PanelManager::switch_panel(panels::Panel &old_panel, // Create the new panel shared_ptr new_panel( - panelDescriptionList[new_panel_description_index].create( - *this, dock_item)); + panelDescriptionList[description_index].create(*this, dock_item)); g_object_unref(dock_item); panels.push_back(new_panel); diff --git a/src/gui/workspace/panel-manager.hpp b/src/gui/workspace/panel-manager.hpp index 4928cf8ae..354c11fdf 100644 --- a/src/gui/workspace/panel-manager.hpp +++ b/src/gui/workspace/panel-manager.hpp @@ -86,11 +86,11 @@ public: * Switches a panel from one type to another, without touching the * underlying GdlDockItem. * @param old_panel The panel which will be transofrmed to a new type. - * @param new_panel_description_index The index of the panel - * description that will be instantiated. + * @param description_index The index of the panel description that + * will be instantiated. **/ void switch_panel(panels::Panel &old_panel, - int new_panel_description_index); + const int description_index); /** * Splits a panel into two panels of the same type. @@ -112,7 +112,7 @@ public: * @param index The index of the panel to retrieve. * @return Returns the stock id of a panel at this index. **/ - static const gchar* get_panel_stock_id(int index); + static const gchar* get_panel_stock_id(const int index); private: