mirror of https://github.com/GNOME/gimp.git
allow to disable the Wilber image shown at the top of the toolbox.
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. svn path=/trunk/; revision=26800
This commit is contained in:
parent
b19d4b85c3
commit
176fb24579
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
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.
|
||||
|
||||
2008-08-28 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimprectangletool.c: some tiny formatting fixes.
|
||||
|
|
|
@ -70,6 +70,7 @@ enum
|
|||
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 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|||
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 @@ gimp_gui_config_set_property (GObject *object,
|
|||
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 @@ gimp_gui_config_get_property (GObject *object,
|
|||
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;
|
||||
|
|
|
@ -58,6 +58,7 @@ struct _GimpGuiConfig
|
|||
gboolean toolbox_color_area;
|
||||
gboolean toolbox_foo_area;
|
||||
gboolean toolbox_image_area;
|
||||
gboolean toolbox_wilber;
|
||||
gchar *theme_path;
|
||||
gchar *theme;
|
||||
gboolean use_help;
|
||||
|
|
|
@ -386,9 +386,17 @@ N_("When the amount of pixel data exceeds this limit, GIMP will start to " \
|
|||
"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 " \
|
||||
|
|
|
@ -97,34 +97,38 @@ static GtkWidget * toolbox_create_foo_area (GimpToolbox *toolbox,
|
|||
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_area_notify (GimpGuiConfig *config,
|
||||
GParamSpec *pspec,
|
||||
GtkWidget *area);
|
||||
static void toolbox_wilber_notify (GimpGuiConfig *config,
|
||||
GParamSpec *pspec,
|
||||
GtkWidget *wilber);
|
||||
|
||||
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_changed (GimpContext *context,
|
||||
GimpToolInfo *tool_info,
|
||||
gpointer data);
|
||||
|
||||
static void toolbox_tool_button_toggled (GtkWidget *widget,
|
||||
GimpToolInfo *tool_info);
|
||||
static gboolean toolbox_tool_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpToolbox *toolbox);
|
||||
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 gboolean toolbox_check_device (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
Gimp *gimp);
|
||||
static void toolbox_tool_button_toggled (GtkWidget *widget,
|
||||
GimpToolInfo *tool_info);
|
||||
static gboolean toolbox_tool_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpToolbox *toolbox);
|
||||
|
||||
static void toolbox_paste_received (GtkClipboard *clipboard,
|
||||
const gchar *text,
|
||||
gpointer data);
|
||||
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 @@ gimp_toolbox_constructor (GType type,
|
|||
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 @@ gimp_toolbox_expose_event (GtkWidget *widget,
|
|||
|
||||
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 @@ gimp_toolbox_set_geometry (GimpToolbox *toolbox)
|
|||
|
||||
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));
|
||||
|
||||
|
@ -831,6 +843,17 @@ toolbox_area_notify (GimpGuiConfig *config,
|
|||
g_object_set (area, "visible", visible, NULL);
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue