[gimp] app: add a label to GimpOperationTool's aux input button
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add a label to GimpOperationTool's aux input button
- Date: Tue, 17 Sep 2013 18:08:44 +0000 (UTC)
commit 74c54464c39ca724be329dc9aee8001da22c1088
Author: Michael Natterer <mitch gimp org>
Date: Tue Sep 17 20:06:37 2013 +0200
app: add a label to GimpOperationTool's aux input button
and don't pack it expanding.
app/tools/gimpoperationtool.c | 29 ++++++++++++++++++++++-------
app/tools/gimpoperationtool.h | 1 +
2 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/app/tools/gimpoperationtool.c b/app/tools/gimpoperationtool.c
index 1b07895..bca524b 100644
--- a/app/tools/gimpoperationtool.c
+++ b/app/tools/gimpoperationtool.c
@@ -253,11 +253,11 @@ gimp_operation_tool_dialog (GimpImageMapTool *image_map_tool)
FALSE, FALSE, 0);
gtk_widget_show (tool->options_box);
- if (tool->aux_input_button)
+ if (tool->aux_input_box)
{
- gtk_box_pack_start (GTK_BOX (tool->options_box), tool->aux_input_button,
+ gtk_box_pack_start (GTK_BOX (tool->options_box), tool->aux_input_box,
FALSE, FALSE, 0);
- gtk_widget_show (tool->aux_input_button);
+ gtk_widget_show (tool->aux_input_box);
}
if (tool->options_table)
@@ -511,10 +511,11 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
else
GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->settings_name = NULL; /* XXX hack */
- if (tool->aux_input_button)
+ if (tool->aux_input_box)
{
- gtk_widget_destroy (tool->aux_input_button);
+ gtk_widget_destroy (tool->aux_input_box);
tool->aux_input_button = NULL;
+ tool->aux_input_box = NULL;
}
if (tool->options_table)
@@ -532,6 +533,7 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
if (gegl_node_has_pad (im_tool->operation, "aux"))
{
GimpContext *context;
+ GtkWidget *label;
tool->aux_input = gegl_node_new_child (NULL,
"operation", "gegl:buffer-source",
@@ -542,14 +544,27 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
context = GIMP_CONTEXT (GIMP_TOOL_GET_OPTIONS (tool));
+ tool->aux_input_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+
+ label = gtk_label_new_with_mnemonic (_("_Aux Input"));
+ gtk_box_pack_start (GTK_BOX (tool->aux_input_box), label,
+ FALSE, FALSE, 0);
+ gtk_widget_show (label);
+
tool->aux_input_button =
gimp_pickable_button_new (context, GIMP_VIEW_SIZE_LARGE, 1);
+ gtk_box_pack_start (GTK_BOX (tool->aux_input_box),
+ tool->aux_input_button, FALSE, FALSE, 0);
+ gtk_widget_show (tool->aux_input_button);
+
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label),
+ tool->aux_input_button);
if (tool->options_box)
{
- gtk_box_pack_start (GTK_BOX (tool->options_box), tool->aux_input_button,
+ gtk_box_pack_start (GTK_BOX (tool->options_box), tool->aux_input_box,
FALSE, FALSE, 0);
- gtk_widget_show (tool->aux_input_button);
+ gtk_widget_show (tool->aux_input_box);
}
g_signal_connect_object (tool->aux_input_button, "notify::pickable",
diff --git a/app/tools/gimpoperationtool.h b/app/tools/gimpoperationtool.h
index 1f2ac26..d4eb609 100644
--- a/app/tools/gimpoperationtool.h
+++ b/app/tools/gimpoperationtool.h
@@ -45,6 +45,7 @@ struct _GimpOperationTool
/* dialog */
GtkWidget *options_box;
GtkWidget *options_table;
+ GtkWidget *aux_input_box;
GtkWidget *aux_input_button;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]