[almanah] UI: Setting default action for Message Dialogs
- From: Álvaro Peña <alvaropg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [almanah] UI: Setting default action for Message Dialogs
- Date: Mon, 15 Jun 2015 10:49:23 +0000 (UTC)
commit 3b007e9ea1ce083da1dc85ce034e72db0cb3e657
Author: Álvaro Peña <alvaropg gmail com>
Date: Mon Jun 15 12:45:31 2015 +0200
UI: Setting default action for Message Dialogs
Setting the default action (afirmative) in the message dialogs
about the edition or deletion of a diary entries.
See https://developer.gnome.org/hig/stable/dialogs.html.en
src/main-window.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/main-window.c b/src/main-window.c
index 31c0e00..d8c9431 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -575,6 +575,7 @@ almanah_main_window_save_current_entry (AlmanahMainWindow *self, gboolean prompt
_("_Cancel"), GTK_RESPONSE_REJECT,
_("_Edit"), GTK_RESPONSE_ACCEPT,
NULL);
+ 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) {
@@ -605,6 +606,7 @@ almanah_main_window_save_current_entry (AlmanahMainWindow *self, gboolean prompt
_("_Cancel"), GTK_RESPONSE_REJECT,
_("_Delete"), GTK_RESPONSE_ACCEPT,
NULL);
+ 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]