summaryrefslogtreecommitdiffstats
path: root/webservice.c
diff options
context:
space:
mode:
authorGravatar Sergey Starosek <sergey.starosek@gmail.com>2013-05-16 14:31:40 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-16 08:38:58 -0700
commitb202b5a2ac2830524895e75fbb6d5b6b6142caf1 (patch)
tree6c1778ace5450a3f7655e24a221c1f435adbd1ca /webservice.c
parentd6f279a4155aca1652598dfd4be299c6353d206a (diff)
downloadsubsurface-b202b5a2ac2830524895e75fbb6d5b6b6142caf1.tar.gz
"Enter" button activates default OK response.
Implemented for the following dialogs: Preferences, Select Tags, Select Events, Renumber, Upload to divelogs.de Not shure whether this is appropriare for Print and Planner dialogs. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'webservice.c')
-rw-r--r--webservice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/webservice.c b/webservice.c
index f17d89623..49b2ea1d4 100644
--- a/webservice.c
+++ b/webservice.c
@@ -336,7 +336,7 @@ static gboolean divelogde_dialog(const char **user, const char **pass)
gtk_container_add(GTK_CONTAINER(frame_user), uid);
gtk_entry_set_max_length(GTK_ENTRY(uid), 40);
gtk_entry_set_text(GTK_ENTRY(uid), *user ?: "");
-
+ gtk_entry_set_activates_default(GTK_ENTRY(uid), TRUE);
frame_pass = gtk_frame_new(_("Password"));
gtk_box_pack_start(GTK_BOX(vbox), frame_pass, FALSE, TRUE, 6);
@@ -344,6 +344,8 @@ static gboolean divelogde_dialog(const char **user, const char **pass)
gtk_container_add(GTK_CONTAINER(frame_pass), pwd);
gtk_entry_set_max_length(GTK_ENTRY(pwd), 40);
gtk_entry_set_text(GTK_ENTRY(pwd), *pass ?: "");
+ gtk_entry_set_activates_default(GTK_ENTRY(pwd), TRUE);
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
gtk_widget_show_all(dialog);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {