Tidied up some loose ends on panel switching
This commit is contained in:
parent
8b3b6a263f
commit
a40642fd0e
5 changed files with 10 additions and 67 deletions
|
|
@ -31,56 +31,19 @@ using namespace Gtk;
|
|||
namespace gui {
|
||||
namespace panels {
|
||||
|
||||
/*Panel::Panel(workspace::WorkspaceWindow &workspace_window,
|
||||
const gchar *name, const gchar *long_name,
|
||||
GdlDockItemBehavior behavior) :
|
||||
workspace(workspace_window),
|
||||
panelBar(*this, long_name)
|
||||
{
|
||||
REQUIRE(name != NULL);
|
||||
REQUIRE(long_name != NULL);
|
||||
|
||||
dock_item = (GdlDockItem*)gdl_dock_item_new (
|
||||
name, long_name, behavior);
|
||||
internal_setup();
|
||||
|
||||
ENSURE(dock_item != NULL);
|
||||
}
|
||||
|
||||
Panel::Panel(workspace::WorkspaceWindow &workspace_window,
|
||||
const gchar *name, const gchar *long_name, const gchar *stock_id,
|
||||
GdlDockItemBehavior behavior) :
|
||||
workspace(workspace_window),
|
||||
panelBar(*this, stock_id)
|
||||
{
|
||||
REQUIRE(name != NULL);
|
||||
REQUIRE(long_name != NULL);
|
||||
REQUIRE(stock_id != NULL);
|
||||
|
||||
dock_item = (GdlDockItem*)gdl_dock_item_new_with_stock (
|
||||
name, long_name, stock_id, behavior);
|
||||
g_object_ref(dock_item);
|
||||
internal_setup();
|
||||
|
||||
ENSURE(dock_item != NULL);
|
||||
}*/
|
||||
|
||||
Panel::Panel(workspace::PanelManager &panel_manager,
|
||||
GdlDockItem *dock_item, const gchar *stock_id) :
|
||||
GdlDockItem *dock_item, const gchar* long_name,
|
||||
const gchar *stock_id) :
|
||||
panelManager(panel_manager),
|
||||
dockItem(dock_item),
|
||||
panelBar(*this, stock_id)
|
||||
{
|
||||
REQUIRE(dockItem);
|
||||
g_object_ref(dockItem);
|
||||
|
||||
// Set the dock item title
|
||||
StockItem stock_item;
|
||||
REQUIRE(StockItem::lookup(Gtk::StockID(stock_id), stock_item));
|
||||
|
||||
|
||||
Glib::Value<std::string> val;
|
||||
val.init(val.value_type());
|
||||
val.set(stock_item.get_label());
|
||||
val.set(long_name);
|
||||
g_object_set_property (G_OBJECT (dockItem), "long-name", val.gobj());
|
||||
|
||||
// Set the grip handle
|
||||
|
|
|
|||
|
|
@ -46,37 +46,17 @@ namespace panels {
|
|||
class Panel : public Gtk::VBox
|
||||
{
|
||||
protected:
|
||||
/**
|
||||
* Constructs a panel object
|
||||
* @param workspace_window The window that owns this panel.
|
||||
* @param name The internal name of this panel
|
||||
* @param long_name The name to display on the caption
|
||||
* @param behavior The GDL behaviour of this item
|
||||
*/
|
||||
//Panel(workspace::WorkspaceWindow &workspace_window,
|
||||
// const gchar *name, const gchar *long_name,
|
||||
// GdlDockItemBehavior behavior = GDL_DOCK_ITEM_BEH_NORMAL);
|
||||
|
||||
/**
|
||||
* Constructs a panel object with a stock item for a caption
|
||||
* @param owner_window The window that owns this panel.
|
||||
* @param name The internal name of this panel
|
||||
* @param long_name The name to display on the caption
|
||||
* @param stock_id The id of the stock item to display on the caption
|
||||
* @param behavior The GDL behaviour of this item
|
||||
*/
|
||||
//Panel(workspace::WorkspaceWindow &owner_window,
|
||||
// const gchar *name, const gchar *long_name, const gchar *stock_id,
|
||||
// GdlDockItemBehavior behavior = GDL_DOCK_ITEM_BEH_NORMAL);
|
||||
|
||||
/**
|
||||
* Contructor.
|
||||
* @param panel_manager The owner panel manager widget.
|
||||
* @param dock_item The GdlDockItem that will host this panel.
|
||||
* @param long_name This title of the panel
|
||||
* @param stock_id The stock_id of this panel.
|
||||
**/
|
||||
Panel(workspace::PanelManager &panel_manager,
|
||||
GdlDockItem *dock_item, const gchar *stock_id);
|
||||
GdlDockItem *dock_item, const gchar* long_name,
|
||||
const gchar *stock_id);
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace panels {
|
|||
|
||||
ResourcesPanel::ResourcesPanel(workspace::PanelManager &panel_manager,
|
||||
GdlDockItem *dock_item) :
|
||||
Panel(panel_manager, dock_item, get_stock_id())
|
||||
Panel(panel_manager, dock_item, get_title(), get_stock_id())
|
||||
{
|
||||
notebook.append_page(media, _("Media"));
|
||||
notebook.append_page(clips, _("Clips"));
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const int TimelinePanel::ZoomToolSteps = 2; // 2 seems comfortable
|
|||
|
||||
TimelinePanel::TimelinePanel(workspace::PanelManager &panel_manager,
|
||||
GdlDockItem *dock_item) :
|
||||
Panel(panel_manager, dock_item, get_stock_id()),
|
||||
Panel(panel_manager, dock_item, get_title(), get_stock_id()),
|
||||
timeIndicator(),
|
||||
timeIndicatorButton(),
|
||||
previousButton(Stock::MEDIA_PREVIOUS),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace panels {
|
|||
|
||||
ViewerPanel::ViewerPanel(workspace::PanelManager &panel_manager,
|
||||
GdlDockItem *dock_item) :
|
||||
Panel(panel_manager, dock_item, get_stock_id())
|
||||
Panel(panel_manager, dock_item, get_title(), get_stock_id())
|
||||
{
|
||||
//----- Pack in the Widgets -----//
|
||||
pack_start(display, PACK_EXPAND_WIDGET);
|
||||
|
|
|
|||
Loading…
Reference in a new issue