gimp r26800 - in trunk: . app/config app/widgets
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26800 - in trunk: . app/config app/widgets
- Date: Thu, 28 Aug 2008 14:30:47 +0000 (UTC)
Author: neo
Date: Thu Aug 28 14:30:47 2008
New Revision: 26800
URL: http://svn.gnome.org/viewvc/gimp?rev=26800&view=rev
Log:
2008-08-28 Sven Neumann <sven gimp org>
* app/config/gimpguiconfig.[ch]: allow to disable the Wilber
image
shown at the top of the toolbox.
* app/widgets/gimptoolbox.c: honor the new gimprc option.
* app/config/gimprc-blurbs.h: document the old and new toolbox
preferences.
Modified:
trunk/ChangeLog
trunk/app/config/gimpguiconfig.c
trunk/app/config/gimpguiconfig.h
trunk/app/config/gimprc-blurbs.h
trunk/app/widgets/gimptoolbox.c
Modified: trunk/app/config/gimpguiconfig.c
==============================================================================
--- trunk/app/config/gimpguiconfig.c (original)
+++ trunk/app/config/gimpguiconfig.c Thu Aug 28 14:30:47 2008
@@ -70,6 +70,7 @@
PROP_TOOLBOX_COLOR_AREA,
PROP_TOOLBOX_FOO_AREA,
PROP_TOOLBOX_IMAGE_AREA,
+ PROP_TOOLBOX_WILBER,
PROP_THEME_PATH,
PROP_THEME,
PROP_USE_HELP,
@@ -196,6 +197,11 @@
TOOLBOX_IMAGE_AREA_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
+ GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_WILBER,
+ "toolbox-wilber",
+ TOOLBOX_WILBER_BLURB,
+ TRUE,
+ GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_data_path ("themes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_THEME_PATH,
"theme-path", THEME_PATH_BLURB,
@@ -347,7 +353,10 @@
case PROP_TOOLBOX_IMAGE_AREA:
gui_config->toolbox_image_area = g_value_get_boolean (value);
break;
- case PROP_THEME_PATH:
+ case PROP_TOOLBOX_WILBER:
+ gui_config->toolbox_wilber = g_value_get_boolean (value);
+ break;
+ case PROP_THEME_PATH:
g_free (gui_config->theme_path);
gui_config->theme_path = g_value_dup_string (value);
break;
@@ -462,6 +471,9 @@
case PROP_TOOLBOX_IMAGE_AREA:
g_value_set_boolean (value, gui_config->toolbox_image_area);
break;
+ case PROP_TOOLBOX_WILBER:
+ g_value_set_boolean (value, gui_config->toolbox_wilber);
+ break;
case PROP_THEME_PATH:
g_value_set_string (value, gui_config->theme_path);
break;
Modified: trunk/app/config/gimpguiconfig.h
==============================================================================
--- trunk/app/config/gimpguiconfig.h (original)
+++ trunk/app/config/gimpguiconfig.h Thu Aug 28 14:30:47 2008
@@ -58,6 +58,7 @@
gboolean toolbox_color_area;
gboolean toolbox_foo_area;
gboolean toolbox_image_area;
+ gboolean toolbox_wilber;
gchar *theme_path;
gchar *theme;
gboolean use_help;
Modified: trunk/app/config/gimprc-blurbs.h
==============================================================================
--- trunk/app/config/gimprc-blurbs.h (original)
+++ trunk/app/config/gimprc-blurbs.h Thu Aug 28 14:30:47 2008
@@ -386,9 +386,17 @@
"work on images that wouldn't fit into memory otherwise. If you have a " \
"lot of RAM, you may want to set this to a higher value.")
-#define TOOLBOX_COLOR_AREA_BLURB NULL
-#define TOOLBOX_FOO_AREA_BLURB NULL
-#define TOOLBOX_IMAGE_AREA_BLURB NULL
+#define TOOLBOX_COLOR_AREA_BLURB \
+N_("Show the current foreground and background colors in the toolbox.")
+
+#define TOOLBOX_FOO_AREA_BLURB \
+N_("Show the currently selected brush, pattern and gradient in the toolbox.")
+
+#define TOOLBOX_IMAGE_AREA_BLURB \
+N_("Show the currently active image in the toolbox.")
+
+#define TOOLBOX_WILBER_BLURB \
+"Show the GIMP mascot at the top of the toolbox."
#define TOOLBOX_WINDOW_HINT_BLURB \
N_("The window type hint that is set on the toolbox. This may affect " \
Modified: trunk/app/widgets/gimptoolbox.c
==============================================================================
--- trunk/app/widgets/gimptoolbox.c (original)
+++ trunk/app/widgets/gimptoolbox.c Thu Aug 28 14:30:47 2008
@@ -97,34 +97,38 @@
static GtkWidget * toolbox_create_image_area (GimpToolbox *toolbox,
GimpContext *context);
-static void toolbox_area_notify (GimpGuiConfig *config,
- GParamSpec *pspec,
- GtkWidget *area);
-static void toolbox_tool_changed (GimpContext *context,
- GimpToolInfo *tool_info,
- gpointer data);
-
-static void toolbox_tool_reorder (GimpContainer *container,
- GimpToolInfo *tool_info,
- gint index,
- GtkWidget *wrap_box);
-static void toolbox_tool_visible_notify (GimpToolInfo *tool_info,
- GParamSpec *pspec,
- GtkWidget *button);
-
-static void toolbox_tool_button_toggled (GtkWidget *widget,
- GimpToolInfo *tool_info);
-static gboolean toolbox_tool_button_press (GtkWidget *widget,
- GdkEventButton *bevent,
- GimpToolbox *toolbox);
-
-static gboolean toolbox_check_device (GtkWidget *widget,
- GdkEvent *event,
- Gimp *gimp);
-
-static void toolbox_paste_received (GtkClipboard *clipboard,
- const gchar *text,
- gpointer data);
+static void toolbox_area_notify (GimpGuiConfig *config,
+ GParamSpec *pspec,
+ GtkWidget *area);
+static void toolbox_wilber_notify (GimpGuiConfig *config,
+ GParamSpec *pspec,
+ GtkWidget *wilber);
+
+static void toolbox_tool_changed (GimpContext *context,
+ GimpToolInfo *tool_info,
+ gpointer data);
+
+static void toolbox_tool_reorder (GimpContainer *container,
+ GimpToolInfo *tool_info,
+ gint index,
+ GtkWidget *wrap_box);
+static void toolbox_tool_visible_notify (GimpToolInfo *tool_info,
+ GParamSpec *pspec,
+ GtkWidget *button);
+
+static void toolbox_tool_button_toggled (GtkWidget *widget,
+ GimpToolInfo *tool_info);
+static gboolean toolbox_tool_button_press (GtkWidget *widget,
+ GdkEventButton *bevent,
+ GimpToolbox *toolbox);
+
+static gboolean toolbox_check_device (GtkWidget *widget,
+ GdkEvent *event,
+ Gimp *gimp);
+
+static void toolbox_paste_received (GtkClipboard *clipboard,
+ const gchar *text,
+ gpointer data);
G_DEFINE_TYPE (GimpToolbox, gimp_toolbox, GIMP_TYPE_IMAGE_DOCK)
@@ -210,11 +214,17 @@
gtk_frame_set_shadow_type (GTK_FRAME (toolbox->header), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (toolbox->vbox), toolbox->header,
FALSE, FALSE, 0);
- gtk_widget_show (toolbox->header);
+
+ if (config->toolbox_wilber)
+ gtk_widget_show (toolbox->header);
gimp_help_set_help_data (toolbox->header,
_("Drop image files here to open them"), NULL);
+ g_signal_connect_object (config, "notify::toolbox-wilber",
+ G_CALLBACK (toolbox_wilber_notify),
+ toolbox->header, 0);
+
toolbox->tool_wbox = gtk_hwrap_box_new (FALSE);
gtk_wrap_box_set_justify (GTK_WRAP_BOX (toolbox->tool_wbox), GTK_JUSTIFY_TOP);
gtk_wrap_box_set_line_justify (GTK_WRAP_BOX (toolbox->tool_wbox),
@@ -498,7 +508,8 @@
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
- if (gdk_rectangle_intersect (&event->area,
+ if (GTK_WIDGET_VISIBLE (toolbox->header) &&
+ gdk_rectangle_intersect (&event->area,
&toolbox->header->allocation,
&clip_rect))
{
@@ -586,7 +597,8 @@
gtk_widget_set_size_request (toolbox->header,
-1,
- button_requisition.height * PANGO_SCALE_SMALL);
+ button_requisition.height *
+ PANGO_SCALE_SMALL);
border_width = gtk_container_get_border_width (GTK_CONTAINER (main_vbox));
@@ -832,6 +844,17 @@
}
static void
+toolbox_wilber_notify (GimpGuiConfig *config,
+ GParamSpec *pspec,
+ GtkWidget *wilber)
+{
+ gboolean visible;
+
+ g_object_get (config, pspec->name, &visible, NULL);
+ g_object_set (wilber, "visible", visible, NULL);
+}
+
+static void
toolbox_tool_changed (GimpContext *context,
GimpToolInfo *tool_info,
gpointer data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]