Commit 9fe8e849 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/actions/view-actions.c added actions & callbacks to configure the

2004-06-22  Michael Natterer  <mitch@gimp.org>

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]: added actions & callbacks to
	configure the canvas padding color.

	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: added the actions' help IDs and menu entries.

	* app/display/display-enums.h: added /*< skip >*/'ed enum value
	GIMP_CANVAS_PADDING_MODE_RESET.

	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.[ch]: removed the canvas padding
	button and its popup menu (fixes bug #142996). Instead, added a
	toggle button which allows to zoom the image when the window is
	resized (as known from sodipodi, except it doesn't work as nice
	yet :-) improvements to the algorithm are welcome).
	Cleaned up the GimpDisplayShell struct a bit and renamed some
	of its members.

	* libgimpwidgets/gimpstock.[ch]
	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-zoom-follow-window-12.png: added new
	icon for the new display toggle button.
parent afeaf96d
2004-06-22 Michael Natterer <mitch@gimp.org>
* app/actions/view-actions.c
* app/actions/view-commands.[ch]: added actions & callbacks to
configure the canvas padding color.
* app/widgets/gimphelp-ids.h
* menus/image-menu.xml.in: added the actions' help IDs and menu entries.
* app/display/display-enums.h: added /*< skip >*/'ed enum value
GIMP_CANVAS_PADDING_MODE_RESET.
* app/display/gimpdisplayshell-appearance.c
* app/display/gimpdisplayshell-callbacks.[ch]
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell.[ch]: removed the canvas padding
button and its popup menu (fixes bug #142996). Instead, added a
toggle button which allows to zoom the image when the window is
resized (as known from sodipodi, except it doesn't work as nice
yet :-) improvements to the algorithm are welcome).
Cleaned up the GimpDisplayShell struct a bit and renamed some
of its members.
* libgimpwidgets/gimpstock.[ch]
* themes/Default/images/Makefile.am
* themes/Default/images/stock-zoom-follow-window-12.png: added new
icon for the new display toggle button.
2004-06-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpclonetool.c (gimp_clone_tool_draw): chain up
......
......@@ -20,6 +20,7 @@
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
......@@ -32,11 +33,13 @@
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayoptions.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-appearance.h"
#include "display/gimpdisplayshell-render.h"
#include "display/gimpdisplayshell-selection.h"
#include "view-actions.h"
......@@ -47,14 +50,18 @@
/* local function prototypes */
static void view_actions_set_zoom (GimpActionGroup *group,
GimpDisplayShell *shell);
static void view_actions_set_zoom (GimpActionGroup *group,
GimpDisplayShell *shell);
static void view_actions_check_type_notify (GimpDisplayConfig *config,
GParamSpec *pspec,
GimpActionGroup *group);
static GimpActionEntry view_actions[] =
{
{ "view-menu", NULL, N_("_View") },
{ "view-zoom-menu", NULL, N_("_Zoom") },
{ "view-menu", NULL, N_("_View") },
{ "view-zoom-menu", NULL, N_("_Zoom") },
{ "view-padding-color-menu", NULL, N_("_Padding Color") },
{ "view-new", GTK_STOCK_NEW,
N_("_New View"), "", NULL,
......@@ -240,6 +247,34 @@ static GimpRadioActionEntry view_zoom_actions[] =
GIMP_HELP_VIEW_ZOOM_OTHER }
};
static GimpEnumActionEntry view_padding_color_actions[] =
{
{ "view-padding-color-theme", NULL,
N_("From _Theme"), NULL, NULL,
GIMP_CANVAS_PADDING_MODE_DEFAULT,
GIMP_HELP_VIEW_PADDING_COLOR },
{ "view-padding-color-light-check", NULL,
N_("_Light Check Color"), NULL, NULL,
GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK,
GIMP_HELP_VIEW_PADDING_COLOR },
{ "view-padding-color-dark-check", NULL,
N_("_Dark Check Color"), NULL, NULL,
GIMP_CANVAS_PADDING_MODE_DARK_CHECK,
GIMP_HELP_VIEW_PADDING_COLOR },
{ "view-padding-color-custom", GTK_STOCK_SELECT_COLOR,
N_("Select _Custom Color..."), NULL, NULL,
GIMP_CANVAS_PADDING_MODE_CUSTOM,
GIMP_HELP_VIEW_PADDING_COLOR },
{ "view-padding-color-prefs", GIMP_STOCK_RESET,
N_("As in _Preferences"), NULL, NULL,
GIMP_CANVAS_PADDING_MODE_RESET,
GIMP_HELP_VIEW_PADDING_COLOR }
};
void
view_actions_setup (GimpActionGroup *group)
......@@ -260,6 +295,11 @@ view_actions_setup (GimpActionGroup *group)
10000,
G_CALLBACK (view_zoom_cmd_callback));
gimp_action_group_add_enum_actions (group,
view_padding_color_actions,
G_N_ELEMENTS (view_padding_color_actions),
G_CALLBACK (view_padding_color_cmd_callback));
/* connect "activate" of view-zoom-other manually so it can be
* selected even if it's the active item of the radio group
*/
......@@ -268,6 +308,12 @@ view_actions_setup (GimpActionGroup *group)
g_signal_connect (action, "activate",
G_CALLBACK (view_zoom_other_cmd_callback),
group->user_data);
g_signal_connect_object (group->gimp->config, "notify::check-type",
G_CALLBACK (view_actions_check_type_notify),
group, 0);
view_actions_check_type_notify (GIMP_DISPLAY_CONFIG (group->gimp->config),
NULL, group);
}
void
......@@ -312,6 +358,8 @@ view_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_label (group, action, (label))
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE)
SET_SENSITIVE ("view-new", gdisp);
SET_SENSITIVE ("view-close", gdisp);
......@@ -351,6 +399,23 @@ view_actions_update (GimpActionGroup *group,
SET_ACTIVE ("view-show-grid", gdisp && options->show_grid);
SET_ACTIVE ("view-snap-to-grid", gdisp && shell->snap_to_grid);
if (gdisp)
{
SET_COLOR ("view-padding-color-menu", &options->padding_color);
if (shell->canvas)
{
GimpRGB color;
gtk_widget_ensure_style (shell->canvas);
gimp_rgb_set_gdk_color (&color,
shell->canvas->style->bg + GTK_STATE_NORMAL);
gimp_rgb_set_alpha (&color, GIMP_OPACITY_OPAQUE);
SET_COLOR ("view-padding-color-theme", &color);
}
}
SET_SENSITIVE ("view-show-menubar", gdisp);
SET_ACTIVE ("view-show-menubar", gdisp && options->show_menubar);
SET_SENSITIVE ("view-show-rulers", gdisp);
......@@ -369,6 +434,7 @@ view_actions_update (GimpActionGroup *group,
#undef SET_VISIBLE
#undef SET_LABEL
#undef SET_SENSITIVE
#undef SET_COLOR
}
......@@ -423,3 +489,27 @@ view_actions_set_zoom (GimpActionGroup *group,
/* flag as dirty */
shell->other_scale = - fabs (shell->other_scale);
}
static void
view_actions_check_type_notify (GimpDisplayConfig *config,
GParamSpec *pspec,
GimpActionGroup *group)
{
GimpRGB color;
gimp_rgba_set_uchar (&color,
render_blend_light_check[0],
render_blend_light_check[1],
render_blend_light_check[2],
255);
gimp_action_group_set_action_color (group, "view-padding-color-light-check",
&color, FALSE);
gimp_rgba_set_uchar (&color,
render_blend_dark_check[0],
render_blend_dark_check[1],
render_blend_dark_check[2],
255);
gimp_action_group_set_action_color (group, "view-padding-color-dark-check",
&color, FALSE);
}
......@@ -32,6 +32,7 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
#include "display/gimpdisplayoptions.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-appearance.h"
#include "display/gimpdisplayshell-filter-dialog.h"
......@@ -42,6 +43,7 @@
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpuimanager.h"
#include "gui/color-notebook.h"
#include "gui/dialogs.h"
#include "gui/info-dialog.h"
#include "gui/info-window.h"
......@@ -49,10 +51,12 @@
#include "actions.h"
#include "view-commands.h"
#include "gimp-intl.h"
#define SET_ACTIVE(manager,group_name,action_name,active) \
#define SET_ACTIVE(manager,action_name,active) \
{ GimpActionGroup *group = \
gimp_ui_manager_get_action_group (manager, group_name); \
gimp_ui_manager_get_action_group (manager, "view"); \
gimp_action_group_set_action_active (group, action_name, active); }
#define IS_ACTIVE_DISPLAY(gdisp) \
......@@ -187,11 +191,11 @@ view_dot_for_dot_cmd_callback (GtkAction *action,
{
gimp_display_shell_scale_set_dot_for_dot (shell, active);
SET_ACTIVE (shell->menubar_manager, "view", "view-dot-for-dot",
SET_ACTIVE (shell->menubar_manager, "view-dot-for-dot",
shell->dot_for_dot);
if (IS_ACTIVE_DISPLAY (gdisp))
SET_ACTIVE (shell->popup_manager, "view", "view-dot-for-dot",
SET_ACTIVE (shell->popup_manager, "view-dot-for-dot",
shell->dot_for_dot);
}
}
......@@ -422,6 +426,126 @@ view_snap_to_grid_cmd_callback (GtkAction *action,
gimp_display_shell_set_snap_to_grid (shell, active);
}
static void
view_padding_color_callback (ColorNotebook *cnb,
const GimpRGB *color,
ColorNotebookState state,
gpointer data)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data);
GimpDisplayOptions *options;
gboolean fullscreen;
fullscreen = gimp_display_shell_get_fullscreen (shell);
if (fullscreen)
options = shell->fullscreen_options;
else
options = shell->options;
switch (state)
{
case COLOR_NOTEBOOK_OK:
options->padding_mode_set = TRUE;
gimp_display_shell_set_padding (shell, GIMP_CANVAS_PADDING_MODE_CUSTOM,
color);
/* fallthru */
case COLOR_NOTEBOOK_CANCEL:
g_object_set_data (G_OBJECT (shell), "padding-color-notebook", NULL);
break;
default:
break;
}
}
void
view_padding_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpDisplay *gdisp;
GimpDisplayShell *shell;
GimpDisplayOptions *options;
gboolean fullscreen;
return_if_no_display (gdisp, data);
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
fullscreen = gimp_display_shell_get_fullscreen (shell);
if (fullscreen)
options = shell->fullscreen_options;
else
options = shell->options;
switch ((GimpCanvasPaddingMode) value)
{
case GIMP_CANVAS_PADDING_MODE_DEFAULT:
case GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK:
case GIMP_CANVAS_PADDING_MODE_DARK_CHECK:
g_object_set_data (G_OBJECT (shell), "padding-color-notebook", NULL);
options->padding_mode_set = TRUE;
gimp_display_shell_set_padding (shell, (GimpCanvasPaddingMode) value,
&options->padding_color);
break;
case GIMP_CANVAS_PADDING_MODE_CUSTOM:
{
ColorNotebook *color_notebook;
color_notebook = g_object_get_data (G_OBJECT (shell),
"padding-color-notebook");
if (! color_notebook)
{
color_notebook = color_notebook_new (GIMP_VIEWABLE (gdisp->gimage),
_("Set Canvas Padding Color"),
GTK_STOCK_SELECT_COLOR,
NULL,
gdisp->shell,
NULL, NULL,
&options->padding_color,
view_padding_color_callback,
shell,
FALSE, FALSE);
g_object_set_data_full (G_OBJECT (shell), "padding-color-notebook",
color_notebook,
(GDestroyNotify) color_notebook_free);
}
color_notebook_show (color_notebook);
}
break;
case GIMP_CANVAS_PADDING_MODE_RESET:
g_object_set_data (G_OBJECT (shell), "padding-color-notebook", NULL);
{
GimpDisplayConfig *config;
GimpDisplayOptions *default_options;
config = GIMP_DISPLAY_CONFIG (gdisp->gimage->gimp->config);
options->padding_mode_set = FALSE;
if (fullscreen)
default_options = config->default_fullscreen_view;
else
default_options = config->default_view;
gimp_display_shell_set_padding (shell,
default_options->padding_mode,
&default_options->padding_color);
}
break;
}
}
void
view_shrink_wrap_cmd_callback (GtkAction *action,
gpointer data)
......@@ -452,11 +576,11 @@ view_fullscreen_cmd_callback (GtkAction *action,
if (active != fullscreen)
{
SET_ACTIVE (shell->menubar_manager, "view", "view-fullscreen",
SET_ACTIVE (shell->menubar_manager, "view-fullscreen",
fullscreen);
if (IS_ACTIVE_DISPLAY (gdisp))
SET_ACTIVE (shell->popup_manager, "view", "view-fullscreen",
SET_ACTIVE (shell->popup_manager, "view-fullscreen",
fullscreen);
}
}
......
......@@ -66,6 +66,9 @@ void view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_grid_cmd_callback (GtkAction *action,
gpointer data);
void view_padding_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void view_shrink_wrap_cmd_callback (GtkAction *action,
gpointer data);
......
......@@ -41,7 +41,8 @@ typedef enum
GIMP_CANVAS_PADDING_MODE_DEFAULT, /*< desc="From Theme" >*/
GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, /*< desc="Light Check Color" >*/
GIMP_CANVAS_PADDING_MODE_DARK_CHECK, /*< desc="Dark Check Color" >*/
GIMP_CANVAS_PADDING_MODE_CUSTOM /*< desc="Custom Color" >*/
GIMP_CANVAS_PADDING_MODE_CUSTOM, /*< desc="Custom Color" >*/
GIMP_CANVAS_PADDING_MODE_RESET = -1 /*< skip >*/
} GimpCanvasPaddingMode;
......
......@@ -47,11 +47,16 @@
(gimp_display_shell_get_fullscreen (shell) ? \
shell->fullscreen_options : shell->options)
#define SET_ACTIVE(manager,group_name,action_name,active) \
#define SET_ACTIVE(manager,action_name,active) \
{ GimpActionGroup *group = \
gimp_ui_manager_get_action_group (manager, group_name); \
gimp_ui_manager_get_action_group (manager, "view"); \
gimp_action_group_set_action_active (group, action_name, active); }
#define SET_COLOR(manager,action_name,color) \
{ GimpActionGroup *group = \
gimp_ui_manager_get_action_group (manager, "view"); \
gimp_action_group_set_action_color (group, action_name, color, FALSE); }
#define IS_ACTIVE_DISPLAY(shell) \
((shell)->gdisp == \
gimp_context_get_display (gimp_get_user_context \
......@@ -94,7 +99,7 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
g_object_set (options, "show-menubar", show, NULL);
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
vbox = GTK_CONTAINER (shell->qmask_button->parent->parent);
if (show)
gtk_widget_show (shell->menubar);
......@@ -106,10 +111,10 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
else
gtk_container_set_border_width (vbox, 0);
SET_ACTIVE (shell->menubar_manager, "view", "view-show-menubar", show);
SET_ACTIVE (shell->menubar_manager, "view-show-menubar", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-menubar", show);
SET_ACTIVE (shell->popup_manager, "view-show-menubar", show);
}
gboolean
......@@ -137,7 +142,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
if (show)
{
gtk_widget_show (shell->origin);
gtk_widget_show (shell->origin_button);
gtk_widget_show (shell->hrule);
gtk_widget_show (shell->vrule);
......@@ -146,7 +151,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
}
else
{
gtk_widget_hide (shell->origin);
gtk_widget_hide (shell->origin_button);
gtk_widget_hide (shell->hrule);
gtk_widget_hide (shell->vrule);
......@@ -154,10 +159,10 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
gtk_table_set_row_spacing (table, 0, 0);
}
SET_ACTIVE (shell->menubar_manager, "view", "view-show-rulers", show);
SET_ACTIVE (shell->menubar_manager, "view-show-rulers", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-rulers", show);
SET_ACTIVE (shell->popup_manager, "view-show-rulers", show);
}
gboolean
......@@ -190,8 +195,8 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
gtk_widget_show (shell->nav_ebox);
gtk_widget_show (shell->hsb);
gtk_widget_show (shell->vsb);
gtk_widget_show (shell->qmask);
gtk_widget_show (shell->padding_button);
gtk_widget_show (shell->qmask_button);
gtk_widget_show (shell->zoom_button);
gtk_box_set_spacing (hbox, 1);
gtk_box_set_spacing (vbox, 1);
......@@ -201,17 +206,17 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
gtk_widget_hide (shell->nav_ebox);
gtk_widget_hide (shell->hsb);
gtk_widget_hide (shell->vsb);
gtk_widget_hide (shell->qmask);
gtk_widget_hide (shell->padding_button);
gtk_widget_hide (shell->qmask_button);
gtk_widget_hide (shell->zoom_button);
gtk_box_set_spacing (hbox, 0);
gtk_box_set_spacing (vbox, 0);
}
SET_ACTIVE (shell->menubar_manager, "view", "view-show-scrollbars", show);
SET_ACTIVE (shell->menubar_manager, "view-show-scrollbars", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-scrollbars", show);
SET_ACTIVE (shell->popup_manager, "view-show-scrollbars", show);
}
gboolean
......@@ -235,7 +240,7 @@ gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
g_object_set (options, "show-statusbar", show, NULL);
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
vbox = GTK_CONTAINER (shell->qmask_button->parent->parent);
if (show)
gtk_widget_show (shell->statusbar);
......@@ -247,10 +252,10 @@ gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
else
gtk_container_set_border_width (vbox, 0);
SET_ACTIVE (shell->menubar_manager, "view", "view-show-statusbar", show);
SET_ACTIVE (shell->menubar_manager, "view-show-statusbar", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-statusbar", show);
SET_ACTIVE (shell->popup_manager, "view-show-statusbar", show);
}
gboolean
......@@ -276,10 +281,10 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
if (shell->select)
gimp_display_shell_selection_set_hidden (shell->select, ! show);
SET_ACTIVE (shell->menubar_manager, "view", "view-show-selection", show);
SET_ACTIVE (shell->menubar_manager, "view-show-selection", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-selection", show);
SET_ACTIVE (shell->popup_manager, "view-show-selection", show);
}
gboolean
......@@ -305,10 +310,10 @@ gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
if (shell->select)
gimp_display_shell_selection_layer_set_hidden (shell->select, ! show);
SET_ACTIVE (shell->menubar_manager, "view", "view-show-layer-boundary", show);
SET_ACTIVE (shell->menubar_manager, "view-show-layer-boundary", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-layer-boundary", show);
SET_ACTIVE (shell->popup_manager, "view-show-layer-boundary", show);
}
gboolean
......@@ -351,10 +356,10 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
if (shell->gdisp->gimage->grid)
gimp_display_shell_expose_full (shell);
SET_ACTIVE (shell->menubar_manager, "view", "view-show-grid", show);
SET_ACTIVE (shell->menubar_manager, "view-show-grid", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-grid", show);
SET_ACTIVE (shell->popup_manager, "view-show-grid", show);
}
gboolean
......@@ -375,10 +380,10 @@ gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell,
{
shell->snap_to_grid = snap ? TRUE : FALSE;
SET_ACTIVE (shell->menubar_manager, "view", "view-snap-to-grid", snap);
SET_ACTIVE (shell->menubar_manager, "view-snap-to-grid", snap);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-snap-to-grid", snap);
SET_ACTIVE (shell->popup_manager, "view-snap-to-grid", snap);
}
}
......@@ -405,10 +410,10 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
if (shell->gdisp->gimage->guides)
gimp_display_shell_expose_full (shell);
SET_ACTIVE (shell->menubar_manager, "view", "view-show-guides", show);
SET_ACTIVE (shell->menubar_manager, "view-show-guides", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-show-guides", show);
SET_ACTIVE (shell->popup_manager, "view-show-guides", show);
}
gboolean
......@@ -429,10 +434,10 @@ gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell,
{
shell->snap_to_guides = snap ? TRUE : FALSE;
SET_ACTIVE (shell->menubar_manager, "view", "view-snap-to-guides", snap);
SET_ACTIVE (shell->menubar_manager, "view-snap-to-guides", snap);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view", "view-snap-to-guides", snap);
SET_ACTIVE (shell->popup_manager, "view-snap-to-guides", snap);
}
}
......@@ -484,6 +489,7 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
break;
case GIMP_CANVAS_PADDING_MODE_CUSTOM:
case GIMP_CANVAS_PADDING_MODE_RESET:
break;
}
......@@ -494,19 +500,12 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
gimp_canvas_set_bg_color (GIMP_CANVAS (shell->canvas), &color);
if (shell->padding_button)
{
g_signal_handlers_block_by_func (shell->padding_button,
gimp_display_shell_color_button_changed,
shell);
gimp_color_button_set_color (GIMP_COLOR_BUTTON (shell->padding_button),