gimp r24907 - in trunk: . app/tools
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r24907 - in trunk: . app/tools
- Date: Mon, 18 Feb 2008 15:31:24 +0000 (GMT)
Author: mitch
Date: Mon Feb 18 15:31:23 2008
New Revision: 24907
URL: http://svn.gnome.org/viewvc/gimp?rev=24907&view=rev
Log:
2008-02-18 Michael Natterer <mitch gimp org>
* app/tools/gimpimagemaptool.c (gimp_image_map_tool_initialize):
don't create the recent settings menu if the tool did not set a
config object.
* app/tools/gimpgegltool.[ch]: pack the operation's settings in a
frame and add a label when there is no operation selected.
Modified:
trunk/ChangeLog
trunk/app/tools/gimpgegltool.c
trunk/app/tools/gimpgegltool.h
trunk/app/tools/gimpimagemaptool.c
Modified: trunk/app/tools/gimpgegltool.c
==============================================================================
--- trunk/app/tools/gimpgegltool.c (original)
+++ trunk/app/tools/gimpgegltool.c Mon Feb 18 15:31:23 2008
@@ -278,10 +278,18 @@
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
/* The options vbox */
- tool->options_box = gtk_vbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), tool->options_box,
+ tool->options_frame = gimp_frame_new (_("Operation Settings"));
+ gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), tool->options_frame,
FALSE, FALSE, 0);
- gtk_widget_show (tool->options_box);
+ gtk_widget_show (tool->options_frame);
+
+ tool->options_table = gtk_label_new ("Select an operation from the list above");
+ gimp_label_set_attributes (GTK_LABEL (tool->options_table),
+ PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
+ -1);
+ gtk_misc_set_padding (GTK_MISC (tool->options_table), 0, 4);
+ gtk_container_add (GTK_CONTAINER (tool->options_frame), tool->options_table);
+ gtk_widget_show (tool->options_table);
}
static void
@@ -660,7 +668,7 @@
if (tool->options_table)
{
- gtk_container_remove (GTK_CONTAINER (tool->options_box),
+ gtk_container_remove (GTK_CONTAINER (tool->options_frame),
tool->options_table);
tool->options_table = NULL;
}
@@ -675,8 +683,8 @@
gimp_prop_table_new (G_OBJECT (tool->config),
G_TYPE_FROM_INSTANCE (tool->config),
GIMP_CONTEXT (GIMP_TOOL_GET_OPTIONS (tool)));
- gtk_box_pack_start (GTK_BOX (tool->options_box), tool->options_table,
- FALSE, FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (tool->options_frame),
+ tool->options_table);
gtk_widget_show (tool->options_table);
}
Modified: trunk/app/tools/gimpgegltool.h
==============================================================================
--- trunk/app/tools/gimpgegltool.h (original)
+++ trunk/app/tools/gimpgegltool.h Mon Feb 18 15:31:23 2008
@@ -43,7 +43,7 @@
/* dialog */
GtkWidget *operation_combo;
- GtkWidget *options_box;
+ GtkWidget *options_frame;
GtkWidget *options_table;
};
Modified: trunk/app/tools/gimpimagemaptool.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool.c (original)
+++ trunk/app/tools/gimpimagemaptool.c Mon Feb 18 15:31:23 2008
@@ -289,9 +289,6 @@
GimpImageMapToolClass *klass;
GtkWidget *shell;
GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkWidget *combo;
GtkWidget *toggle;
const gchar *stock_id;
@@ -324,26 +321,34 @@
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell)->vbox), vbox);
- hbox = gtk_hbox_new (FALSE, 4);
- gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox,
- FALSE, FALSE, 0);
- gtk_widget_show (hbox);
-
- label = gtk_label_new (_("Recent Settings:"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_widget_show (label);
-
- combo = gimp_container_combo_box_new (klass->recent_settings,
- GIMP_CONTEXT (tool_info->tool_options),
- 16, 0);
- gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
- gtk_widget_show (combo);
-
- gimp_help_set_help_data (combo, _("Pick a setting from the list"), NULL);
-
- g_signal_connect_after (combo, "select-item",
- G_CALLBACK (gimp_image_map_tool_recent_selected),
- image_map_tool);
+ if (image_map_tool->config)
+ {
+ GtkWidget *hbox;
+ GtkWidget *label;
+ GtkWidget *combo;
+
+ hbox = gtk_hbox_new (FALSE, 4);
+ gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox,
+ FALSE, FALSE, 0);
+ gtk_widget_show (hbox);
+
+ label = gtk_label_new (_("Recent Settings:"));
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
+
+ combo = gimp_container_combo_box_new (klass->recent_settings,
+ GIMP_CONTEXT (tool_info->tool_options),
+ 16, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
+ gtk_widget_show (combo);
+
+ gimp_help_set_help_data (combo, _("Pick a setting from the list"),
+ NULL);
+
+ g_signal_connect_after (combo, "select-item",
+ G_CALLBACK (gimp_image_map_tool_recent_selected),
+ image_map_tool);
+ }
/* The preview toggle */
toggle = gimp_prop_check_button_new (G_OBJECT (tool_info->tool_options),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]