diff --git a/src/gui/dialog/GotoDialog.cpp b/src/gui/dialog/GotoDialog.cpp index 63e5cbce..f9cf5484 100644 --- a/src/gui/dialog/GotoDialog.cpp +++ b/src/gui/dialog/GotoDialog.cpp @@ -16,10 +16,12 @@ auto GotoDialog::getSelectedPage() const -> int void GotoDialog::show(GtkWindow* parent) { gtk_window_set_transient_for(GTK_WINDOW(this->window), parent); + gtk_entry_set_activates_default(GTK_ENTRY(get("spinPage")), TRUE); + int returnCode = gtk_dialog_run(GTK_DIALOG(this->window)); - gtk_widget_hide(this->window); + gtk_widget_hide(this->window); - if (returnCode == 2) + if (returnCode == GTK_RESPONSE_OK) { this->selectedPage = gtk_spin_button_get_value(GTK_SPIN_BUTTON(get("spinPage"))); } diff --git a/ui/goto.glade b/ui/goto.glade index cf990fc3..c7e09b49 100644 --- a/ui/goto.glade +++ b/ui/goto.glade @@ -13,7 +13,6 @@ 5 Go to Page False - True True dialog @@ -32,12 +31,12 @@ False end - - gtk-close - False + + gtk-cancel + gotocancelbutton True True - True + False True @@ -47,14 +46,15 @@ - + gtk-ok - False + gotookbutton True True + True + True True True - False @@ -114,8 +114,8 @@ - button1 - button2 + gotocancelbutton + gotookbutton