Improve dialog
This commit is contained in:
parent
1e3406285e
commit
450937a257
|
@ -7,6 +7,7 @@ InputBox::InputBox(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &re
|
|||
{
|
||||
// Get Widgets
|
||||
ref_builder->get_widget("entry_name", entry_name);
|
||||
entry_name->signal_activate().connect(sigc::mem_fun(*this, &InputBox::entry_activated));
|
||||
}
|
||||
|
||||
void InputBox::on_response(int response_id){
|
||||
|
@ -57,6 +58,11 @@ void InputBox::set_game_time(int time){
|
|||
game_time = time;
|
||||
}
|
||||
|
||||
void InputBox::entry_activated(){
|
||||
// Default response
|
||||
response(Gtk::RESPONSE_OK);
|
||||
}
|
||||
|
||||
InputBox *InputBox::create(Gtk::Window &parent)
|
||||
{
|
||||
// Create a inputbox object
|
||||
|
|
|
@ -28,4 +28,7 @@ class InputBox : public Gtk::Dialog{
|
|||
|
||||
// Child widget
|
||||
Gtk::Entry *entry_name;
|
||||
|
||||
// Signal Handlers
|
||||
void entry_activated();
|
||||
};
|
Loading…
Reference in New Issue