[empathy/gnome-2-34] individual_view_remove_dialog_show: set a mnemonic on the 'Delete and Block' button



commit 525107a21db785a0105c68393a148dc1bfaacc4c
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Mar 14 14:20:29 2011 +0100

    individual_view_remove_dialog_show: set a mnemonic on the 'Delete and Block' button

 libempathy-gtk/empathy-individual-view.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 34bb7f3..f455cd7 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -2236,8 +2236,19 @@ individual_view_remove_dialog_show (GtkWindow *parent,
       GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", message);
 
   if (block_button)
-    gtk_dialog_add_button (GTK_DIALOG (dialog),
-        _("Remove and Block"), GTK_RESPONSE_REJECT);
+    {
+      GtkWidget *button;
+
+      /* gtk_dialog_add_button() doesn't allow us to pass a string with a
+       * mnemonic so we have to create the button manually. */
+      button = gtk_button_new_with_mnemonic (
+          _("Delete and _Block"));
+
+      gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button,
+          GTK_RESPONSE_REJECT);
+
+      gtk_widget_show (button);
+    }
 
   gtk_dialog_add_buttons (GTK_DIALOG (dialog),
       GTK_STOCK_CANCEL, GTK_RESPONSE_NO,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]