[gimp] Bug 694028 - statusbar cancel button for plug-ins is hard to discover
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 694028 - statusbar cancel button for plug-ins is hard to discover
- Date: Mon, 18 Mar 2013 00:28:33 +0000 (UTC)
commit 64438c1b4e0e70c2c3943a8cb7c03f26061ccffd
Author: Michael Natterer <mitch gimp org>
Date: Mon Mar 18 01:26:44 2013 +0100
Bug 694028 - statusbar cancel button for plug-ins is hard to discover
Add the word "Cancel" next to the cancel icon, the button is only
visible during a plug-in progress anyway, so no space is wasted.
app/display/gimpstatusbar.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
index 97686c8..2fd8b78 100644
--- a/app/display/gimpstatusbar.c
+++ b/app/display/gimpstatusbar.c
@@ -156,7 +156,9 @@ static void
gimp_statusbar_init (GimpStatusbar *statusbar)
{
GtkWidget *hbox;
+ GtkWidget *hbox2;
GtkWidget *image;
+ GtkWidget *label;
GimpUnitStore *store;
GList *children;
@@ -239,19 +241,31 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
gtk_box_pack_start (GTK_BOX (hbox), statusbar->progressbar, TRUE, TRUE, 0);
/* don't show the progress bar */
+ /* construct the cancel button's contents manually because we
+ * always want image and label regardless of settings, and we want
+ * a menu size image.
+ */
statusbar->cancel_button = gtk_button_new ();
gtk_widget_set_can_focus (statusbar->cancel_button, FALSE);
gtk_button_set_relief (GTK_BUTTON (statusbar->cancel_button),
GTK_RELIEF_NONE);
gtk_widget_set_sensitive (statusbar->cancel_button, FALSE);
- gtk_box_pack_start (GTK_BOX (hbox),
- statusbar->cancel_button, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (hbox),
+ statusbar->cancel_button, FALSE, FALSE, 0);
/* don't show the cancel button */
+ hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_container_add (GTK_CONTAINER (statusbar->cancel_button), hbox2);
+ gtk_widget_show (hbox2);
+
image = gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_MENU);
- gtk_container_add (GTK_CONTAINER (statusbar->cancel_button), image);
+ gtk_box_pack_start (GTK_BOX (hbox2), image, FALSE, FALSE, 2);
gtk_widget_show (image);
+ label = gtk_label_new ("Cancel");
+ gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 2);
+ gtk_widget_show (label);
+
g_signal_connect (statusbar->cancel_button, "clicked",
G_CALLBACK (gimp_statusbar_progress_canceled),
statusbar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]