[Xfce4-commits] <orage:master> 4.9.4.0 Fixed bug 9017 improve 'delete' confirmation message
Juha
noreply at xfce.org
Thu Feb 7 13:16:01 CET 2013
Updating branch refs/heads/master
to e9af2cb15ff2f02ea282e3df75148e515c6bc040 (commit)
from 9cd5285a18a68edf68e76992fcb13fa8a8d67dbb (commit)
commit e9af2cb15ff2f02ea282e3df75148e515c6bc040
Author: Juha <juha at xfce.org>
Date: Thu Feb 7 14:14:03 2013 +0200
4.9.4.0 Fixed bug 9017 improve 'delete' confirmation message
Changed warning dialog to use customer buttons. Added more text to
buttons hoping that they are clearer now.
src/appointment.c | 8 ++++++--
src/event-list.c | 5 ++++-
src/functions.c | 7 +++++--
src/functions.h | 3 ++-
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/appointment.c b/src/appointment.c
index e8dcfce..7860cae 100644
--- a/src/appointment.c
+++ b/src/appointment.c
@@ -738,7 +738,9 @@ static gboolean appWindow_check_and_close(appt_win *apptw)
if (apptw->appointment_changed == TRUE) {
result = orage_warning_dialog(GTK_WINDOW(apptw->Window)
, _("The appointment information has been modified.")
- , _("Do you want to continue?"));
+ , _("Do you want to continue?")
+ , _("No, do not leave")
+ , _("Yes, ignore modifications and leave"));
if (result == GTK_RESPONSE_YES) {
app_free_memory(apptw);
@@ -1192,7 +1194,9 @@ static void delete_xfical_from_appt_win(appt_win *apptw)
result = orage_warning_dialog(GTK_WINDOW(apptw->Window)
, _("This appointment will be permanently removed.")
- , _("Do you want to continue?"));
+ , _("Do you want to continue?")
+ , _("No, cancel the removal")
+ , _("Yes, remove it"));
if (result == GTK_RESPONSE_YES) {
if (!apptw->appointment_add) {
diff --git a/src/event-list.c b/src/event-list.c
index 86632c1..fc67019 100644
--- a/src/event-list.c
+++ b/src/event-list.c
@@ -919,7 +919,10 @@ static void delete_appointment(el_win *el)
result = orage_warning_dialog(GTK_WINDOW(el->Window)
, _("You will permanently remove all\nselected appointments.")
- , _("Do you want to continue?"));
+ , _("Do you want to continue?")
+ , _("No, cancel the removal")
+ , _("Yes, remove them"));
+
if (result == GTK_RESPONSE_YES) {
if (!xfical_file_open(TRUE))
return;
diff --git a/src/functions.c b/src/functions.c
index bc06c37..f0f401e 100644
--- a/src/functions.c
+++ b/src/functions.c
@@ -1119,7 +1119,8 @@ gint orage_info_dialog(GtkWindow *parent
}
gint orage_warning_dialog(GtkWindow *parent
- , char *primary_text, char *secondary_text)
+ , char *primary_text, char *secondary_text
+ , char *no_text, char *yes_text)
{
GtkWidget *dialog;
gint result;
@@ -1127,11 +1128,13 @@ gint orage_warning_dialog(GtkWindow *parent
dialog = gtk_message_dialog_new(parent
, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT
, GTK_MESSAGE_WARNING
- , GTK_BUTTONS_YES_NO
+ , GTK_BUTTONS_NONE
, "%s", primary_text);
if (secondary_text)
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog)
, "%s", secondary_text);
+ gtk_dialog_add_buttons(GTK_DIALOG(dialog)
+ , no_text, GTK_RESPONSE_NO, yes_text, GTK_RESPONSE_YES, NULL);
result = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
return(result);
diff --git a/src/functions.h b/src/functions.h
index 73d707e..edeffe8 100644
--- a/src/functions.h
+++ b/src/functions.h
@@ -134,7 +134,8 @@ void orage_rc_del_item(OrageRc *orc, char *key);
gint orage_info_dialog(GtkWindow *parent
, char *primary_text, char *secondary_text);
gint orage_warning_dialog(GtkWindow *parent
- , char *primary_text, char *secondary_text);
+ , char *primary_text, char *secondary_text
+ , char *no_text, char *yes_text);
gint orage_error_dialog(GtkWindow *parent
, char *primary_text, char *secondary_text);
GtkWidget *orage_create_framebox_with_content(const gchar *title
More information about the Xfce4-commits
mailing list