Modified ButtonBar::append to be universal for all widgets
This commit is contained in:
parent
3769719f7e
commit
d3d703e200
2 changed files with 5 additions and 14 deletions
|
|
@ -35,9 +35,9 @@ ButtonBar::ButtonBar()
|
|||
}
|
||||
|
||||
void
|
||||
ButtonBar::append(SeparatorToolItem &seperator)
|
||||
ButtonBar::append(Widget &widget)
|
||||
{
|
||||
pack_start(seperator, PACK_SHRINK);
|
||||
pack_start(widget, Gtk::PACK_SHRINK);
|
||||
}
|
||||
|
||||
} // widgets
|
||||
|
|
|
|||
|
|
@ -43,13 +43,10 @@ public:
|
|||
ButtonBar();
|
||||
|
||||
/**
|
||||
* Append a button to the button bar.
|
||||
* @param button The button to append.
|
||||
* Append a widget to the button bar.
|
||||
* @param widget The button to append.
|
||||
**/
|
||||
template<class T> void append(MiniWrapper<T>& button)
|
||||
{
|
||||
pack_start(button, Gtk::PACK_SHRINK);
|
||||
}
|
||||
void append(Widget &widget);
|
||||
|
||||
/**
|
||||
* Append a button to the button bar, and connect a click event.
|
||||
|
|
@ -62,12 +59,6 @@ public:
|
|||
button.signal_clicked().connect(clicked_slot);
|
||||
append(button);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a sererator item.
|
||||
* @param seperator The seperator to append.
|
||||
**/
|
||||
void append(Gtk::SeparatorToolItem &seperator);
|
||||
};
|
||||
|
||||
} // gui
|
||||
|
|
|
|||
Loading…
Reference in a new issue