From fc35b678523bc01e1475345a9e339f52eb5637a1 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 27 Aug 2010 16:00:03 +0200 Subject: fix accelerator conflict with the Cancel button (#623164) --- libempathy-gtk/empathy-account-widget.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 9696f48d8..6755ddbf6 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1735,8 +1735,16 @@ do_constructed (GObject *obj) if (!priv->simple) { GtkWidget *hbox = gtk_hbox_new (TRUE, 3); + GtkWidget *image; + + /* We can't use the stock button as its accelerator ('C') clashes with + * the Close button. */ + priv->cancel_button = gtk_button_new (); + gtk_button_set_label (GTK_BUTTON (priv->cancel_button), _("Ca_ncel")); + gtk_button_set_use_underline (GTK_BUTTON (priv->cancel_button), TRUE); - priv->cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + image = gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON); + gtk_button_set_image (GTK_BUTTON (priv->cancel_button), image); priv->apply_button = gtk_button_new (); set_apply_button (self); -- cgit v1.2.3