mirror of https://github.com/GNOME/gimp.git
app/config/gimprc-blurbs.h added separate properties for the fullscreen
2003-07-18 Michael Natterer <mitch@gimp.org> * app/config/gimprc-blurbs.h * app/config/gimpdisplayconfig.[ch]: added separate properties for the fullscreen appearance of the display (menubar, rulers, scrollbars, statusbar and padding). Default to everything invisible and black padding. * app/display/gimpdisplayshell.[ch]: renamed struct GimpDisplayShellVisibility to GimpDisplayShellAppearance and added the canvas padding stuff. * app/display/gimpdisplayshell-appearance.[ch]: made gimp_display_shell_set_padding() fullscreen-aware. Added gimp_display_shell_get_padding(). * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-handlers.c * app/gui/image-menu.c: changed addordingly. * app/gui/preferences-dialog.c: added the new options and moved the display appearance stuff to its own page. Minor cleanups.
This commit is contained in:
parent
7c4d375aa9
commit
bc77f1e3ff
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
|||
2003-07-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/config/gimprc-blurbs.h
|
||||
* app/config/gimpdisplayconfig.[ch]: added separate properties for
|
||||
the fullscreen appearance of the display (menubar, rulers,
|
||||
scrollbars, statusbar and padding). Default to everything
|
||||
invisible and black padding.
|
||||
|
||||
* app/display/gimpdisplayshell.[ch]: renamed struct
|
||||
GimpDisplayShellVisibility to GimpDisplayShellAppearance and added
|
||||
the canvas padding stuff.
|
||||
|
||||
* app/display/gimpdisplayshell-appearance.[ch]: made
|
||||
gimp_display_shell_set_padding() fullscreen-aware. Added
|
||||
gimp_display_shell_get_padding().
|
||||
|
||||
* app/display/gimpdisplayshell-callbacks.c
|
||||
* app/display/gimpdisplayshell-handlers.c
|
||||
* app/gui/image-menu.c: changed addordingly.
|
||||
|
||||
* app/gui/preferences-dialog.c: added the new options and moved
|
||||
the display appearance stuff to its own page. Minor cleanups.
|
||||
|
||||
2003-07-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/vectors/Makefile.am
|
||||
|
|
|
@ -67,23 +67,29 @@ enum
|
|||
PROP_CURSOR_UPDATING,
|
||||
PROP_IMAGE_TITLE_FORMAT,
|
||||
PROP_IMAGE_STATUS_FORMAT,
|
||||
PROP_SHOW_MENUBAR,
|
||||
PROP_SHOW_RULERS,
|
||||
PROP_SHOW_SCROLLBARS,
|
||||
PROP_SHOW_STATUSBAR,
|
||||
PROP_CONFIRM_ON_CLOSE,
|
||||
PROP_MONITOR_XRESOLUTION,
|
||||
PROP_MONITOR_YRESOLUTION,
|
||||
PROP_MONITOR_RES_FROM_GDK,
|
||||
PROP_NAV_PREVIEW_SIZE,
|
||||
PROP_SHOW_MENUBAR,
|
||||
PROP_SHOW_RULERS,
|
||||
PROP_SHOW_SCROLLBARS,
|
||||
PROP_SHOW_STATUSBAR,
|
||||
PROP_CANVAS_PADDING_MODE,
|
||||
PROP_CANVAS_PADDING_COLOR
|
||||
PROP_CANVAS_PADDING_COLOR,
|
||||
PROP_FS_SHOW_MENUBAR,
|
||||
PROP_FS_SHOW_RULERS,
|
||||
PROP_FS_SHOW_SCROLLBARS,
|
||||
PROP_FS_SHOW_STATUSBAR,
|
||||
PROP_FS_CANVAS_PADDING_MODE,
|
||||
PROP_FS_CANVAS_PADDING_COLOR
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
GType
|
||||
gimp_display_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
|
@ -103,8 +109,8 @@ gimp_display_config_get_type (void)
|
|||
NULL /* instance_init */
|
||||
};
|
||||
|
||||
config_type = g_type_register_static (GIMP_TYPE_CORE_CONFIG,
|
||||
"GimpDisplayConfig",
|
||||
config_type = g_type_register_static (GIMP_TYPE_CORE_CONFIG,
|
||||
"GimpDisplayConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
|
@ -116,6 +122,7 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
|||
{
|
||||
GObjectClass *object_class;
|
||||
GimpRGB white;
|
||||
GimpRGB black;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
|
@ -126,6 +133,7 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
|||
object_class->get_property = gimp_display_config_get_property;
|
||||
|
||||
gimp_rgba_set (&white, 1.0, 1.0, 1.0, 1.0);
|
||||
gimp_rgba_set (&black, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_MARCHING_ANTS_SPEED,
|
||||
"marching-ants-speed",
|
||||
|
@ -179,22 +187,6 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
|||
IMAGE_STATUS_FORMAT_BLURB,
|
||||
DEFAULT_IMAGE_STATUS_FORMAT,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR,
|
||||
"show-menubar", SHOW_MENUBAR_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS,
|
||||
"show-rulers", SHOW_RULERS_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS,
|
||||
"show-scrollbars", SHOW_SCROLLBARS_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
|
||||
"show-statusbar", SHOW_STATUSBAR_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONFIRM_ON_CLOSE,
|
||||
"confirm-on-close", CONFIRM_ON_CLOSE_BLURB,
|
||||
TRUE,
|
||||
|
@ -220,6 +212,23 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
|||
GIMP_TYPE_PREVIEW_SIZE,
|
||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
||||
0);
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR,
|
||||
"show-menubar", SHOW_MENUBAR_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS,
|
||||
"show-rulers", SHOW_RULERS_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS,
|
||||
"show-scrollbars", SHOW_SCROLLBARS_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
|
||||
"show-statusbar", SHOW_STATUSBAR_BLURB,
|
||||
TRUE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CANVAS_PADDING_MODE,
|
||||
"canvas-padding-mode",
|
||||
CANVAS_PADDING_MODE_BLURB,
|
||||
|
@ -231,6 +240,38 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
|||
CANVAS_PADDING_COLOR_BLURB,
|
||||
&white,
|
||||
0);
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_MENUBAR,
|
||||
"fullscreen-show-menubar",
|
||||
FS_SHOW_MENUBAR_BLURB,
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_RULERS,
|
||||
"fullscreen-show-rulers",
|
||||
FS_SHOW_RULERS_BLURB,
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_SCROLLBARS,
|
||||
"fullscreen-show-scrollbars",
|
||||
FS_SHOW_SCROLLBARS_BLURB,
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_STATUSBAR,
|
||||
"fullscreen-show-statusbar",
|
||||
FS_SHOW_STATUSBAR_BLURB,
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_FS_CANVAS_PADDING_MODE,
|
||||
"fullscreen-canvas-padding-mode",
|
||||
FS_CANVAS_PADDING_MODE_BLURB,
|
||||
GIMP_TYPE_DISPLAY_PADDING_MODE,
|
||||
GIMP_DISPLAY_PADDING_MODE_CUSTOM,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_COLOR (object_class, PROP_FS_CANVAS_PADDING_COLOR,
|
||||
"fullscreen-canvas-padding-color",
|
||||
FS_CANVAS_PADDING_COLOR_BLURB,
|
||||
&black,
|
||||
0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -239,7 +280,7 @@ gimp_display_config_finalize (GObject *object)
|
|||
GimpDisplayConfig *display_config;
|
||||
|
||||
display_config = GIMP_DISPLAY_CONFIG (object);
|
||||
|
||||
|
||||
g_free (display_config->image_title_format);
|
||||
g_free (display_config->image_status_format);
|
||||
|
||||
|
@ -293,18 +334,6 @@ gimp_display_config_set_property (GObject *object,
|
|||
g_free (display_config->image_status_format);
|
||||
display_config->image_status_format = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_SHOW_MENUBAR:
|
||||
display_config->show_menubar = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_RULERS:
|
||||
display_config->show_rulers = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_SCROLLBARS:
|
||||
display_config->show_scrollbars = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_STATUSBAR:
|
||||
display_config->show_statusbar = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_CONFIRM_ON_CLOSE:
|
||||
display_config->confirm_on_close = g_value_get_boolean (value);
|
||||
break;
|
||||
|
@ -320,6 +349,19 @@ gimp_display_config_set_property (GObject *object,
|
|||
case PROP_NAV_PREVIEW_SIZE:
|
||||
display_config->nav_preview_size = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
case PROP_SHOW_MENUBAR:
|
||||
display_config->show_menubar = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_RULERS:
|
||||
display_config->show_rulers = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_SCROLLBARS:
|
||||
display_config->show_scrollbars = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_STATUSBAR:
|
||||
display_config->show_statusbar = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_CANVAS_PADDING_MODE:
|
||||
display_config->canvas_padding_mode = g_value_get_enum (value);
|
||||
break;
|
||||
|
@ -327,6 +369,25 @@ gimp_display_config_set_property (GObject *object,
|
|||
display_config->canvas_padding_color = *(GimpRGB *) g_value_get_boxed (value);
|
||||
break;
|
||||
|
||||
case PROP_FS_SHOW_MENUBAR:
|
||||
display_config->fs_show_menubar = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_FS_SHOW_RULERS:
|
||||
display_config->fs_show_rulers = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_FS_SHOW_SCROLLBARS:
|
||||
display_config->fs_show_scrollbars = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_FS_SHOW_STATUSBAR:
|
||||
display_config->fs_show_statusbar = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_FS_CANVAS_PADDING_MODE:
|
||||
display_config->fs_canvas_padding_mode = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_FS_CANVAS_PADDING_COLOR:
|
||||
display_config->fs_canvas_padding_color = *(GimpRGB *) g_value_get_boxed (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
@ -378,18 +439,6 @@ gimp_display_config_get_property (GObject *object,
|
|||
case PROP_IMAGE_STATUS_FORMAT:
|
||||
g_value_set_string (value, display_config->image_status_format);
|
||||
break;
|
||||
case PROP_SHOW_MENUBAR:
|
||||
g_value_set_boolean (value, display_config->show_menubar);
|
||||
break;
|
||||
case PROP_SHOW_RULERS:
|
||||
g_value_set_boolean (value, display_config->show_rulers);
|
||||
break;
|
||||
case PROP_SHOW_SCROLLBARS:
|
||||
g_value_set_boolean (value, display_config->show_scrollbars);
|
||||
break;
|
||||
case PROP_SHOW_STATUSBAR:
|
||||
g_value_set_boolean (value, display_config->show_statusbar);
|
||||
break;
|
||||
case PROP_CONFIRM_ON_CLOSE:
|
||||
g_value_set_boolean (value, display_config->confirm_on_close);
|
||||
break;
|
||||
|
@ -405,6 +454,19 @@ gimp_display_config_get_property (GObject *object,
|
|||
case PROP_NAV_PREVIEW_SIZE:
|
||||
g_value_set_enum (value, display_config->nav_preview_size);
|
||||
break;
|
||||
|
||||
case PROP_SHOW_MENUBAR:
|
||||
g_value_set_boolean (value, display_config->show_menubar);
|
||||
break;
|
||||
case PROP_SHOW_RULERS:
|
||||
g_value_set_boolean (value, display_config->show_rulers);
|
||||
break;
|
||||
case PROP_SHOW_SCROLLBARS:
|
||||
g_value_set_boolean (value, display_config->show_scrollbars);
|
||||
break;
|
||||
case PROP_SHOW_STATUSBAR:
|
||||
g_value_set_boolean (value, display_config->show_statusbar);
|
||||
break;
|
||||
case PROP_CANVAS_PADDING_MODE:
|
||||
g_value_set_enum (value, display_config->canvas_padding_mode);
|
||||
break;
|
||||
|
@ -412,6 +474,25 @@ gimp_display_config_get_property (GObject *object,
|
|||
g_value_set_boxed (value, &display_config->canvas_padding_color);
|
||||
break;
|
||||
|
||||
case PROP_FS_SHOW_MENUBAR:
|
||||
g_value_set_boolean (value, display_config->fs_show_menubar);
|
||||
break;
|
||||
case PROP_FS_SHOW_RULERS:
|
||||
g_value_set_boolean (value, display_config->fs_show_rulers);
|
||||
break;
|
||||
case PROP_FS_SHOW_SCROLLBARS:
|
||||
g_value_set_boolean (value, display_config->fs_show_scrollbars);
|
||||
break;
|
||||
case PROP_FS_SHOW_STATUSBAR:
|
||||
g_value_set_boolean (value, display_config->fs_show_statusbar);
|
||||
break;
|
||||
case PROP_FS_CANVAS_PADDING_MODE:
|
||||
g_value_set_enum (value, display_config->fs_canvas_padding_mode);
|
||||
break;
|
||||
case PROP_FS_CANVAS_PADDING_COLOR:
|
||||
g_value_set_boxed (value, &display_config->fs_canvas_padding_color);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
|
|
@ -51,17 +51,25 @@ struct _GimpDisplayConfig
|
|||
gboolean cursor_updating;
|
||||
gchar *image_title_format;
|
||||
gchar *image_status_format;
|
||||
gboolean show_menubar;
|
||||
gboolean show_rulers;
|
||||
gboolean show_scrollbars;
|
||||
gboolean show_statusbar;
|
||||
gboolean confirm_on_close;
|
||||
gdouble monitor_xres;
|
||||
gdouble monitor_yres;
|
||||
gboolean monitor_res_from_gdk;
|
||||
GimpPreviewSize nav_preview_size;
|
||||
|
||||
gboolean show_menubar;
|
||||
gboolean show_rulers;
|
||||
gboolean show_scrollbars;
|
||||
gboolean show_statusbar;
|
||||
GimpDisplayPaddingMode canvas_padding_mode;
|
||||
GimpRGB canvas_padding_color;
|
||||
|
||||
gboolean fs_show_menubar;
|
||||
gboolean fs_show_rulers;
|
||||
gboolean fs_show_scrollbars;
|
||||
gboolean fs_show_statusbar;
|
||||
GimpDisplayPaddingMode fs_canvas_padding_mode;
|
||||
GimpRGB fs_canvas_padding_color;
|
||||
};
|
||||
|
||||
struct _GimpDisplayConfigClass
|
||||
|
|
|
@ -19,6 +19,13 @@ N_("Specifies how the area around the image should be drawn.")
|
|||
N_("Sets the canvas padding color used if the padding mode is set to " \
|
||||
"custom color.")
|
||||
|
||||
#define FS_CANVAS_PADDING_MODE_BLURB \
|
||||
N_("Specifies how the area around the image should be drawn.")
|
||||
|
||||
#define FS_CANVAS_PADDING_COLOR_BLURB \
|
||||
N_("Sets the canvas padding color used if the padding mode is set to " \
|
||||
"custom color.")
|
||||
|
||||
#define COLORMAP_CYCLING_BLURB \
|
||||
N_("Specify that marching ants for selected regions will be drawn with " \
|
||||
"colormap cycling as opposed to be drawn as animated lines. This color " \
|
||||
|
@ -254,6 +261,22 @@ N_("When enabled, the scrollbars are visible by default. This can also be " \
|
|||
N_("When enabled, the statusbar is visible by default. This can also be " \
|
||||
"toggled with the \"View->Show Statusbar\" command.")
|
||||
|
||||
#define FS_SHOW_MENUBAR_BLURB \
|
||||
N_("When enabled, the menubar is visible by default. This can also be " \
|
||||
"toggled with the \"View->Show Menubar\" command.")
|
||||
|
||||
#define FS_SHOW_RULERS_BLURB \
|
||||
N_("When enabled, the rulers are visible by default. This can also be " \
|
||||
"toggled with the \"View->Show Rulers\" command.")
|
||||
|
||||
#define FS_SHOW_SCROLLBARS_BLURB \
|
||||
N_("When enabled, the scrollbars are visible by default. This can also be " \
|
||||
"toggled with the \"View->Show Scrollbars\" command.")
|
||||
|
||||
#define FS_SHOW_STATUSBAR_BLURB \
|
||||
N_("When enabled, the statusbar is visible by default. This can also be " \
|
||||
"toggled with the \"View->Show Statusbar\" command.")
|
||||
|
||||
#define SHOW_TIPS_BLURB \
|
||||
N_("Enable to display a handy GIMP tip on startup.")
|
||||
|
||||
|
@ -293,7 +316,7 @@ N_("Sets the temporary storage directory. Files will appear here " \
|
|||
"best if this directory not be one that is shared by other users.")
|
||||
|
||||
#define THEME_BLURB \
|
||||
"The name of the theme to use."
|
||||
"The name of the theme to use."
|
||||
|
||||
#define THEME_PATH_BLURB \
|
||||
"Sets the theme search path."
|
||||
|
|
|
@ -430,7 +430,7 @@ prefs_input_devices_dialog (GtkWidget *widget)
|
|||
gtk_window_set_transient_for (GTK_WINDOW (input_dialog),
|
||||
GTK_WINDOW (prefs_dialog));
|
||||
gtk_window_set_destroy_with_parent (GTK_WINDOW (input_dialog), TRUE);
|
||||
|
||||
|
||||
gtk_widget_hide (GTK_INPUT_DIALOG (input_dialog)->save_button);
|
||||
|
||||
g_signal_connect_swapped (GTK_INPUT_DIALOG (input_dialog)->close_button,
|
||||
|
@ -1154,7 +1154,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
&top_iter,
|
||||
page_index++);
|
||||
|
||||
/* General */
|
||||
/* Previews */
|
||||
vbox2 = prefs_frame_new (_("Previews"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "layer-previews",
|
||||
|
@ -1365,7 +1365,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
||||
button = gtk_button_new_with_label (_("Save Input Device Settings Now"));
|
||||
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
@ -1390,50 +1390,18 @@ prefs_dialog_new (Gimp *gimp,
|
|||
&child_iter,
|
||||
page_index++);
|
||||
|
||||
/* Appearance */
|
||||
vbox2 = prefs_frame_new (_("Appearance"), GTK_CONTAINER (vbox), FALSE);
|
||||
/* General */
|
||||
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "default-dot-for-dot",
|
||||
_("Use \"_Dot for Dot\" by default"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-menubar",
|
||||
_("Show Menubar"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-rulers",
|
||||
_("Show _Rulers"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-scrollbars",
|
||||
_("Show Scrollbars"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-statusbar",
|
||||
_("Show S_tatusbar"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_boolean_option_menu_add (config, "initial-zoom-to-fit",
|
||||
_("Fit to Window"),
|
||||
"1:1",
|
||||
_("Inital Zoom Ratio:"),
|
||||
GTK_TABLE (table), 0);
|
||||
prefs_spin_button_add (config, "marching-ants-speed", 10.0, 100.0, 0,
|
||||
_("Marching _Ants Speed:"),
|
||||
GTK_TABLE (table), 1);
|
||||
|
||||
/* Canvas Padding Color */
|
||||
vbox2 = prefs_frame_new (_("Canvas Padding Color"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (config, "canvas-padding-mode", 0, 0,
|
||||
_("Padding Mode:"),
|
||||
GTK_TABLE (table), 0);
|
||||
button = prefs_color_button_add (config, "canvas-padding-color",
|
||||
_("Custom Color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1);
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
||||
gimp_get_user_context (gimp));
|
||||
GTK_TABLE (table), 0);
|
||||
|
||||
/* Zoom & Resize Behavior */
|
||||
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
|
||||
|
@ -1446,6 +1414,14 @@ prefs_dialog_new (Gimp *gimp,
|
|||
_("Resize Window on Image _Size Change"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_boolean_option_menu_add (config, "initial-zoom-to-fit",
|
||||
_("Fit to Window"),
|
||||
"1:1",
|
||||
_("Inital Zoom Ratio:"),
|
||||
GTK_TABLE (table), 0);
|
||||
|
||||
/* Pointer Movement Feedback */
|
||||
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
@ -1464,6 +1440,79 @@ prefs_dialog_new (Gimp *gimp,
|
|||
GTK_TABLE (table), 0);
|
||||
|
||||
|
||||
/********************************************/
|
||||
/* Interface / Image Windows / Appearance */
|
||||
/********************************************/
|
||||
vbox = prefs_notebook_append_page (gimp,
|
||||
GTK_NOTEBOOK (notebook),
|
||||
_("Image Window Appearance"),
|
||||
"image-windows.png",
|
||||
GTK_TREE_STORE (tree),
|
||||
_("Appearance"),
|
||||
"dialogs/preferences/image_windows.html",
|
||||
&child_iter,
|
||||
&grandchild_iter,
|
||||
page_index++);
|
||||
|
||||
/* Normal Mode */
|
||||
vbox2 = prefs_frame_new (_("Default Appearance in Normal Mode"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "show-menubar",
|
||||
_("Show Menubar"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-rulers",
|
||||
_("Show _Rulers"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-scrollbars",
|
||||
_("Show Scrollbars"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-statusbar",
|
||||
_("Show S_tatusbar"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (config, "canvas-padding-mode", 0, 0,
|
||||
_("Canvas Padding Mode:"),
|
||||
GTK_TABLE (table), 0);
|
||||
button = prefs_color_button_add (config, "canvas-padding-color",
|
||||
_("Custom Padding Color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1);
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
/* Fullscreen Mode */
|
||||
vbox2 = prefs_frame_new (_("Default Appearance in Fullscreen Mode"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "fullscreen-show-menubar",
|
||||
_("Show Menubar"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "fullscreen-show-rulers",
|
||||
_("Show _Rulers"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "fullscreen-show-scrollbars",
|
||||
_("Show Scrollbars"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "fullscreen-show-statusbar",
|
||||
_("Show S_tatusbar"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (config, "fullscreen-canvas-padding-mode", 0, 0,
|
||||
_("Canvas Padding Mode:"),
|
||||
GTK_TABLE (table), 0);
|
||||
button = prefs_color_button_add (config, "fullscreen-canvas-padding-color",
|
||||
_("Custom Padding Color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1);
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* Interface / Image Windows / Image Title & Statusbar Format */
|
||||
/****************************************************************/
|
||||
|
@ -1697,7 +1746,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
|
||||
|
||||
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate"));
|
||||
gtk_misc_set_padding (GTK_MISC (GTK_BIN (calibrate_button)->child), 4, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
|
||||
|
|
|
@ -38,88 +38,11 @@
|
|||
#include "gimpdisplayshell-render.h"
|
||||
|
||||
|
||||
#define GET_VISIBILITY(shell) \
|
||||
#define GET_APPEARANCE(shell) \
|
||||
(gimp_display_shell_get_fullscreen (shell) ? \
|
||||
&shell->fullscreen_visibility : &shell->visibility)
|
||||
&shell->fullscreen_appearance : &shell->appearance)
|
||||
|
||||
|
||||
void
|
||||
gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||
GimpDisplayPaddingMode padding_mode,
|
||||
GimpRGB *padding_color)
|
||||
{
|
||||
guchar r, g, b;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (padding_color != NULL);
|
||||
|
||||
shell->padding_mode = padding_mode;
|
||||
|
||||
switch (shell->padding_mode)
|
||||
{
|
||||
case GIMP_DISPLAY_PADDING_MODE_DEFAULT:
|
||||
if (shell->canvas)
|
||||
{
|
||||
gtk_widget_ensure_style (shell->canvas);
|
||||
|
||||
r = shell->canvas->style->bg[GTK_STATE_NORMAL].red >> 8;
|
||||
g = shell->canvas->style->bg[GTK_STATE_NORMAL].green >> 8;
|
||||
b = shell->canvas->style->bg[GTK_STATE_NORMAL].blue >> 8;
|
||||
|
||||
gimp_rgb_set_uchar (&shell->padding_color, r, g, b);
|
||||
}
|
||||
break;
|
||||
|
||||
case GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK:
|
||||
gimp_rgb_set_uchar (&shell->padding_color,
|
||||
render_blend_light_check[0],
|
||||
render_blend_light_check[1],
|
||||
render_blend_light_check[2]);
|
||||
break;
|
||||
|
||||
case GIMP_DISPLAY_PADDING_MODE_DARK_CHECK:
|
||||
gimp_rgb_set_uchar (&shell->padding_color,
|
||||
render_blend_dark_check[0],
|
||||
render_blend_dark_check[1],
|
||||
render_blend_dark_check[2]);
|
||||
break;
|
||||
|
||||
case GIMP_DISPLAY_PADDING_MODE_CUSTOM:
|
||||
shell->padding_color = *padding_color;
|
||||
break;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_REALIZED (shell->canvas))
|
||||
{
|
||||
GdkColormap *colormap;
|
||||
GdkColor color;
|
||||
|
||||
gimp_rgb_get_gdk_color (&shell->padding_color, &color);
|
||||
|
||||
colormap = gdk_drawable_get_colormap (shell->canvas->window);
|
||||
g_return_if_fail (colormap != NULL);
|
||||
gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);
|
||||
|
||||
gdk_window_set_background (shell->canvas->window, &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),
|
||||
&shell->padding_color);
|
||||
|
||||
g_signal_handlers_unblock_by_func (shell->padding_button,
|
||||
gimp_display_shell_color_button_changed,
|
||||
shell);
|
||||
}
|
||||
|
||||
gimp_display_shell_expose_full (shell);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
|
||||
gboolean fullscreen)
|
||||
|
@ -147,15 +70,15 @@ void
|
|||
gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->selection)
|
||||
if (show != appearance->selection)
|
||||
{
|
||||
visibility->selection = show ? TRUE : FALSE;
|
||||
appearance->selection = show ? TRUE : FALSE;
|
||||
|
||||
if (shell->select)
|
||||
gimp_display_shell_selection_set_hidden (shell->select, ! show);
|
||||
|
@ -172,22 +95,22 @@ gimp_display_shell_get_show_selection (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->selection;
|
||||
return GET_APPEARANCE (shell)->selection;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->active_layer)
|
||||
if (show != appearance->active_layer)
|
||||
{
|
||||
visibility->active_layer = show ? TRUE : FALSE;
|
||||
appearance->active_layer = show ? TRUE : FALSE;
|
||||
|
||||
if (shell->select)
|
||||
gimp_display_shell_selection_layer_set_hidden (shell->select, ! show);
|
||||
|
@ -204,22 +127,22 @@ gimp_display_shell_get_show_layer (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->active_layer;
|
||||
return GET_APPEARANCE (shell)->active_layer;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->grid)
|
||||
if (show != appearance->grid)
|
||||
{
|
||||
visibility->grid = show ? TRUE : FALSE;
|
||||
appearance->grid = show ? TRUE : FALSE;
|
||||
|
||||
if (shell->gdisp->gimage->grid)
|
||||
gimp_display_shell_expose_full (shell);
|
||||
|
@ -236,7 +159,7 @@ gimp_display_shell_get_show_grid (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->grid;
|
||||
return GET_APPEARANCE (shell)->grid;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -268,15 +191,15 @@ void
|
|||
gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->guides)
|
||||
if (show != appearance->guides)
|
||||
{
|
||||
visibility->guides = show ? TRUE : FALSE;
|
||||
appearance->guides = show ? TRUE : FALSE;
|
||||
|
||||
if (shell->gdisp->gimage->guides)
|
||||
gimp_display_shell_expose_full (shell);
|
||||
|
@ -293,20 +216,20 @@ gimp_display_shell_get_show_guides (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->guides;
|
||||
return GET_APPEARANCE (shell)->guides;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->menubar)
|
||||
if (show != appearance->menubar)
|
||||
{
|
||||
GtkWidget *menubar;
|
||||
GtkContainer *vbox;
|
||||
|
@ -319,9 +242,9 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
|
|||
else
|
||||
gtk_widget_hide (menubar);
|
||||
|
||||
visibility->menubar = show ? TRUE : FALSE;
|
||||
appearance->menubar = show ? TRUE : FALSE;
|
||||
|
||||
if (visibility->menubar || visibility->statusbar)
|
||||
if (appearance->menubar || appearance->statusbar)
|
||||
gtk_container_set_border_width (vbox, 2);
|
||||
else
|
||||
gtk_container_set_border_width (vbox, 0);
|
||||
|
@ -338,20 +261,20 @@ gimp_display_shell_get_show_menubar (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->menubar;
|
||||
return GET_APPEARANCE (shell)->menubar;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->rulers)
|
||||
if (show != appearance->rulers)
|
||||
{
|
||||
GtkTable *table;
|
||||
|
||||
|
@ -376,7 +299,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
|
|||
gtk_table_set_row_spacing (table, 0, 0);
|
||||
}
|
||||
|
||||
visibility->rulers = show ? TRUE : FALSE;
|
||||
appearance->rulers = show ? TRUE : FALSE;
|
||||
|
||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||
"/View/Show Rulers", show);
|
||||
|
@ -390,20 +313,20 @@ gimp_display_shell_get_show_rulers (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->rulers;
|
||||
return GET_APPEARANCE (shell)->rulers;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->scrollbars)
|
||||
if (show != appearance->scrollbars)
|
||||
{
|
||||
GtkBox *hbox;
|
||||
GtkBox *vbox;
|
||||
|
@ -434,7 +357,7 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
|
|||
gtk_box_set_spacing (vbox, 0);
|
||||
}
|
||||
|
||||
visibility->scrollbars = show ? TRUE : FALSE;
|
||||
appearance->scrollbars = show ? TRUE : FALSE;
|
||||
|
||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||
"/View/Show Scrollbars", show);
|
||||
|
@ -448,20 +371,20 @@ gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->scrollbars;
|
||||
return GET_APPEARANCE (shell)->scrollbars;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
|
||||
gboolean show)
|
||||
{
|
||||
GimpDisplayShellVisibility *visibility;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
visibility = GET_VISIBILITY (shell);
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (show != visibility->statusbar)
|
||||
if (show != appearance->statusbar)
|
||||
{
|
||||
GtkContainer *vbox;
|
||||
|
||||
|
@ -472,9 +395,9 @@ gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
|
|||
else
|
||||
gtk_widget_hide (shell->statusbar);
|
||||
|
||||
visibility->statusbar = show ? TRUE : FALSE;
|
||||
appearance->statusbar = show ? TRUE : FALSE;
|
||||
|
||||
if (visibility->menubar || visibility->statusbar)
|
||||
if (appearance->menubar || appearance->statusbar)
|
||||
gtk_container_set_border_width (vbox, 2);
|
||||
else
|
||||
gtk_container_set_border_width (vbox, 0);
|
||||
|
@ -491,5 +414,103 @@ gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
return GET_VISIBILITY (shell)->statusbar;
|
||||
return GET_APPEARANCE (shell)->statusbar;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||
GimpDisplayPaddingMode padding_mode,
|
||||
const GimpRGB *padding_color)
|
||||
{
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
guchar r, g, b;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (padding_color != NULL);
|
||||
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
appearance->padding_mode = padding_mode;
|
||||
|
||||
switch (appearance->padding_mode)
|
||||
{
|
||||
case GIMP_DISPLAY_PADDING_MODE_DEFAULT:
|
||||
if (shell->canvas)
|
||||
{
|
||||
gtk_widget_ensure_style (shell->canvas);
|
||||
|
||||
r = shell->canvas->style->bg[GTK_STATE_NORMAL].red >> 8;
|
||||
g = shell->canvas->style->bg[GTK_STATE_NORMAL].green >> 8;
|
||||
b = shell->canvas->style->bg[GTK_STATE_NORMAL].blue >> 8;
|
||||
|
||||
gimp_rgb_set_uchar (&appearance->padding_color, r, g, b);
|
||||
}
|
||||
break;
|
||||
|
||||
case GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK:
|
||||
gimp_rgb_set_uchar (&appearance->padding_color,
|
||||
render_blend_light_check[0],
|
||||
render_blend_light_check[1],
|
||||
render_blend_light_check[2]);
|
||||
break;
|
||||
|
||||
case GIMP_DISPLAY_PADDING_MODE_DARK_CHECK:
|
||||
gimp_rgb_set_uchar (&appearance->padding_color,
|
||||
render_blend_dark_check[0],
|
||||
render_blend_dark_check[1],
|
||||
render_blend_dark_check[2]);
|
||||
break;
|
||||
|
||||
case GIMP_DISPLAY_PADDING_MODE_CUSTOM:
|
||||
appearance->padding_color = *padding_color;
|
||||
break;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_REALIZED (shell->canvas))
|
||||
{
|
||||
GdkColormap *colormap;
|
||||
GdkColor color;
|
||||
|
||||
gimp_rgb_get_gdk_color (&appearance->padding_color, &color);
|
||||
|
||||
colormap = gdk_drawable_get_colormap (shell->canvas->window);
|
||||
g_return_if_fail (colormap != NULL);
|
||||
gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);
|
||||
|
||||
gdk_window_set_background (shell->canvas->window, &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),
|
||||
&appearance->padding_color);
|
||||
|
||||
g_signal_handlers_unblock_by_func (shell->padding_button,
|
||||
gimp_display_shell_color_button_changed,
|
||||
shell);
|
||||
}
|
||||
|
||||
gimp_display_shell_expose_full (shell);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_get_padding (GimpDisplayShell *shell,
|
||||
GimpDisplayPaddingMode *padding_mode,
|
||||
GimpRGB *padding_color)
|
||||
{
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
|
||||
appearance = GET_APPEARANCE (shell);
|
||||
|
||||
if (padding_mode)
|
||||
*padding_mode = appearance->padding_mode;
|
||||
|
||||
if (padding_color)
|
||||
*padding_color = appearance->padding_color;
|
||||
}
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
#define __GIMP_DISPLAY_SHELL_APPEARANCE_H__
|
||||
|
||||
|
||||
void gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||
GimpDisplayPaddingMode mode,
|
||||
GimpRGB *color);
|
||||
|
||||
void gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
|
||||
gboolean fullscreen);
|
||||
gboolean gimp_display_shell_get_fullscreen (GimpDisplayShell *shell);
|
||||
|
@ -64,5 +60,12 @@ void gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
|
|||
gboolean show);
|
||||
gboolean gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||
GimpDisplayPaddingMode mode,
|
||||
const GimpRGB *color);
|
||||
void gimp_display_shell_get_padding (GimpDisplayShell *shell,
|
||||
GimpDisplayPaddingMode *mode,
|
||||
GimpRGB *color);
|
||||
|
||||
|
||||
#endif /* __GIMP_DISPLAY_SHELL_APPEARANCE_H__ */
|
||||
|
|
|
@ -123,7 +123,7 @@ gimp_display_shell_events (GtkWidget *widget,
|
|||
return TRUE;
|
||||
|
||||
kevent = (GdkEventKey *) event;
|
||||
|
||||
|
||||
/* do not process any key events while BUTTON1 is down. We do this
|
||||
* so tools keep the modifier state they were in when BUTTON1 was
|
||||
* pressed and to prevent accelerators from being invoked.
|
||||
|
@ -182,8 +182,9 @@ gimp_display_shell_events (GtkWidget *widget,
|
|||
case GDK_WINDOW_STATE:
|
||||
{
|
||||
GdkEventWindowState *sevent;
|
||||
GimpDisplayShellVisibility visibility;
|
||||
GimpDisplayShellAppearance appearance;
|
||||
gboolean fullscreen;
|
||||
gboolean padding_mode_set;
|
||||
|
||||
sevent = (GdkEventWindowState *) event;
|
||||
|
||||
|
@ -196,23 +197,33 @@ gimp_display_shell_events (GtkWidget *widget,
|
|||
|
||||
if (fullscreen)
|
||||
{
|
||||
visibility = shell->fullscreen_visibility;
|
||||
shell->fullscreen_visibility = shell->visibility;
|
||||
padding_mode_set = shell->fullscreen_appearance.padding_mode_set;
|
||||
|
||||
appearance = shell->fullscreen_appearance;
|
||||
shell->fullscreen_appearance = shell->appearance;
|
||||
|
||||
shell->fullscreen_appearance.padding_mode_set = padding_mode_set;
|
||||
}
|
||||
else
|
||||
{
|
||||
visibility = shell->visibility;
|
||||
shell->visibility = shell->fullscreen_visibility;
|
||||
padding_mode_set = shell->appearance.padding_mode_set;
|
||||
|
||||
appearance = shell->appearance;
|
||||
shell->appearance = shell->fullscreen_appearance;
|
||||
|
||||
shell->appearance.padding_mode_set = padding_mode_set;
|
||||
}
|
||||
|
||||
gimp_display_shell_set_show_selection (shell, visibility.selection);
|
||||
gimp_display_shell_set_show_layer (shell, visibility.active_layer);
|
||||
gimp_display_shell_set_show_guides (shell, visibility.guides);
|
||||
gimp_display_shell_set_show_grid (shell, visibility.grid);
|
||||
gimp_display_shell_set_show_menubar (shell, visibility.menubar);
|
||||
gimp_display_shell_set_show_rulers (shell, visibility.rulers);
|
||||
gimp_display_shell_set_show_scrollbars (shell, visibility.scrollbars);
|
||||
gimp_display_shell_set_show_statusbar (shell, visibility.statusbar);
|
||||
gimp_display_shell_set_show_selection (shell, appearance.selection);
|
||||
gimp_display_shell_set_show_layer (shell, appearance.active_layer);
|
||||
gimp_display_shell_set_show_guides (shell, appearance.guides);
|
||||
gimp_display_shell_set_show_grid (shell, appearance.grid);
|
||||
gimp_display_shell_set_show_menubar (shell, appearance.menubar);
|
||||
gimp_display_shell_set_show_rulers (shell, appearance.rulers);
|
||||
gimp_display_shell_set_show_scrollbars (shell, appearance.scrollbars);
|
||||
gimp_display_shell_set_show_statusbar (shell, appearance.statusbar);
|
||||
gimp_display_shell_set_padding (shell, appearance.padding_mode,
|
||||
&appearance.padding_color);
|
||||
|
||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||
"/View/Fullscreen", fullscreen);
|
||||
|
@ -240,17 +251,18 @@ void
|
|||
gimp_display_shell_canvas_realize (GtkWidget *canvas,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpDisplayConfig *config;
|
||||
GimpDisplay *gdisp;
|
||||
GimpDisplayConfig *config;
|
||||
GimpDisplay *gdisp;
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
GimpRGB padding_color;
|
||||
|
||||
gdisp = shell->gdisp;
|
||||
config = GIMP_DISPLAY_CONFIG (gdisp->gimage->gimp->config);
|
||||
|
||||
gtk_widget_grab_focus (shell->canvas);
|
||||
|
||||
gimp_display_shell_set_padding (shell,
|
||||
shell->padding_mode,
|
||||
&shell->padding_color);
|
||||
gimp_display_shell_get_padding (shell, &padding_mode, &padding_color);
|
||||
gimp_display_shell_set_padding (shell, padding_mode, &padding_color);
|
||||
|
||||
gimp_statusbar_resize_cursor (GIMP_STATUSBAR (shell->statusbar));
|
||||
|
||||
|
@ -840,7 +852,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* Ask for the pointer position, but ignore it except for cursor
|
||||
* handling, so motion events sync with the button press/release events
|
||||
* handling, so motion events sync with the button press/release events
|
||||
*/
|
||||
if (mevent->is_hint)
|
||||
{
|
||||
|
@ -1328,7 +1340,10 @@ gimp_display_shell_color_button_changed (GtkWidget *widget,
|
|||
{
|
||||
GimpRGB color;
|
||||
|
||||
shell->padding_mode_set = TRUE;
|
||||
if (gimp_display_shell_get_fullscreen (shell))
|
||||
shell->fullscreen_appearance.padding_mode_set = TRUE;
|
||||
else
|
||||
shell->appearance.padding_mode_set = TRUE;
|
||||
|
||||
gimp_color_button_get_color (GIMP_COLOR_BUTTON (widget), &color);
|
||||
|
||||
|
@ -1337,40 +1352,51 @@ gimp_display_shell_color_button_changed (GtkWidget *widget,
|
|||
&color);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_color_button_menu_callback (gpointer callback_data,
|
||||
guint callback_action,
|
||||
void
|
||||
gimp_display_shell_color_button_menu_callback (gpointer callback_data,
|
||||
guint callback_action,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
GimpDisplayShellAppearance *appearance;
|
||||
GimpDisplayShell *shell;
|
||||
gboolean fullscreen;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (callback_data);
|
||||
|
||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||
|
||||
if (fullscreen)
|
||||
appearance = &shell->fullscreen_appearance;
|
||||
else
|
||||
appearance = &shell->appearance;
|
||||
|
||||
if (callback_action == GIMP_DISPLAY_PADDING_MODE_CUSTOM)
|
||||
{
|
||||
gtk_button_clicked (GTK_BUTTON (shell->padding_button));
|
||||
}
|
||||
else if (callback_action == 0xffff)
|
||||
{
|
||||
GimpDisplayConfig *config;
|
||||
|
||||
config = GIMP_DISPLAY_CONFIG (shell->gdisp->gimage->gimp->config);
|
||||
|
||||
appearance->padding_mode_set = FALSE;
|
||||
|
||||
if (fullscreen)
|
||||
gimp_display_shell_set_padding (shell,
|
||||
config->fs_canvas_padding_mode,
|
||||
&config->fs_canvas_padding_color);
|
||||
else
|
||||
gimp_display_shell_set_padding (shell,
|
||||
config->canvas_padding_mode,
|
||||
&config->canvas_padding_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (callback_action == 0xffff)
|
||||
{
|
||||
GimpDisplayConfig *config;
|
||||
appearance->padding_mode_set = TRUE;
|
||||
|
||||
config = GIMP_DISPLAY_CONFIG (shell->gdisp->gimage->gimp->config);
|
||||
|
||||
shell->padding_mode_set = FALSE;
|
||||
|
||||
gimp_display_shell_set_padding (shell,
|
||||
config->canvas_padding_mode,
|
||||
&config->canvas_padding_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
shell->padding_mode_set = TRUE;
|
||||
|
||||
gimp_display_shell_set_padding (shell, callback_action,
|
||||
&shell->padding_color);
|
||||
}
|
||||
gimp_display_shell_set_padding (shell, callback_action,
|
||||
&appearance->padding_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -248,9 +248,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
|||
shell->cursor_y = 0;
|
||||
|
||||
shell->padding_button = NULL;
|
||||
shell->padding_mode = GIMP_DISPLAY_PADDING_MODE_DEFAULT;
|
||||
shell->padding_mode_set = FALSE;
|
||||
gimp_rgba_set (&shell->padding_color, 1.0, 1.0, 1.0, 1.0);
|
||||
shell->nav_ebox = NULL;
|
||||
|
||||
shell->warning_dialog = NULL;
|
||||
shell->info_dialog = NULL;
|
||||
|
@ -266,23 +264,30 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
|||
|
||||
shell->window_state = 0;
|
||||
|
||||
shell->visibility.selection = TRUE;
|
||||
shell->visibility.active_layer = TRUE;
|
||||
shell->visibility.guides = TRUE;
|
||||
shell->visibility.grid = TRUE;
|
||||
shell->visibility.menubar = FALSE;
|
||||
shell->visibility.rulers = TRUE;
|
||||
shell->visibility.scrollbars = TRUE;
|
||||
shell->visibility.statusbar = TRUE;
|
||||
shell->appearance.selection = TRUE;
|
||||
shell->appearance.active_layer = TRUE;
|
||||
shell->appearance.guides = TRUE;
|
||||
shell->appearance.grid = TRUE;
|
||||
shell->appearance.menubar = TRUE;
|
||||
shell->appearance.rulers = TRUE;
|
||||
shell->appearance.scrollbars = TRUE;
|
||||
shell->appearance.statusbar = TRUE;
|
||||
shell->appearance.padding_mode = GIMP_DISPLAY_PADDING_MODE_DEFAULT;
|
||||
gimp_rgba_set (&shell->appearance.padding_color, 1.0, 1.0, 1.0, 1.0);
|
||||
shell->appearance.padding_mode_set = FALSE;
|
||||
|
||||
shell->fullscreen_visibility.selection = TRUE;
|
||||
shell->fullscreen_visibility.active_layer = TRUE;
|
||||
shell->fullscreen_visibility.guides = TRUE;
|
||||
shell->fullscreen_visibility.grid = TRUE;
|
||||
shell->fullscreen_visibility.menubar = FALSE;
|
||||
shell->fullscreen_visibility.rulers = FALSE;
|
||||
shell->fullscreen_visibility.scrollbars = FALSE;
|
||||
shell->fullscreen_visibility.statusbar = FALSE;
|
||||
shell->fullscreen_appearance.selection = TRUE;
|
||||
shell->fullscreen_appearance.active_layer = TRUE;
|
||||
shell->fullscreen_appearance.guides = TRUE;
|
||||
shell->fullscreen_appearance.grid = TRUE;
|
||||
shell->fullscreen_appearance.menubar = FALSE;
|
||||
shell->fullscreen_appearance.rulers = FALSE;
|
||||
shell->fullscreen_appearance.scrollbars = FALSE;
|
||||
shell->fullscreen_appearance.statusbar = FALSE;
|
||||
shell->fullscreen_appearance.padding_mode = GIMP_DISPLAY_PADDING_MODE_CUSTOM;
|
||||
gimp_rgba_set (&shell->fullscreen_appearance.padding_color,
|
||||
0.0, 0.0, 0.0, 1.0);
|
||||
shell->fullscreen_appearance.padding_mode_set = FALSE;
|
||||
|
||||
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
|
||||
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
|
||||
|
@ -507,10 +512,19 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
shell->dot_for_dot = config->default_dot_for_dot;
|
||||
|
||||
shell->visibility.menubar = config->show_menubar;
|
||||
shell->visibility.rulers = config->show_rulers;
|
||||
shell->visibility.scrollbars = config->show_scrollbars;
|
||||
shell->visibility.statusbar = config->show_statusbar;
|
||||
shell->appearance.menubar = config->show_menubar;
|
||||
shell->appearance.rulers = config->show_rulers;
|
||||
shell->appearance.scrollbars = config->show_scrollbars;
|
||||
shell->appearance.statusbar = config->show_statusbar;
|
||||
shell->appearance.padding_mode = config->canvas_padding_mode;
|
||||
shell->appearance.padding_color = config->canvas_padding_color;
|
||||
|
||||
shell->fullscreen_appearance.menubar = config->fs_show_menubar;
|
||||
shell->fullscreen_appearance.rulers = config->fs_show_rulers;
|
||||
shell->fullscreen_appearance.scrollbars = config->fs_show_scrollbars;
|
||||
shell->fullscreen_appearance.statusbar = config->fs_show_statusbar;
|
||||
shell->fullscreen_appearance.padding_mode = config->fs_canvas_padding_mode;
|
||||
shell->fullscreen_appearance.padding_color = config->fs_canvas_padding_color;
|
||||
|
||||
/* adjust the initial scale -- so that window fits on screen the 75%
|
||||
* value is the same as in gimp_display_shell_shrink_wrap. It
|
||||
|
@ -525,7 +539,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
n_width = SCALEX (shell, image_width);
|
||||
n_height = SCALEX (shell, image_height);
|
||||
|
||||
if (config->initial_zoom_to_fit)
|
||||
if (config->initial_zoom_to_fit)
|
||||
{
|
||||
/* Limit to the size of the screen... */
|
||||
while (n_width > s_width || n_height > s_height)
|
||||
|
@ -536,7 +550,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
if (scalesrc < 0xFF)
|
||||
scalesrc++;
|
||||
|
||||
n_width = (image_width *
|
||||
n_width = (image_width *
|
||||
(scaledest * SCREEN_XRES (shell)) /
|
||||
(scalesrc * gdisp->gimage->xresolution));
|
||||
|
||||
|
@ -547,12 +561,12 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
if (scaledest == 1 && scalesrc == 0xFF)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set up size like above, but do not zoom to fit.
|
||||
/* Set up size like above, but do not zoom to fit.
|
||||
Useful when working on large images. */
|
||||
|
||||
|
||||
if (n_width > s_width)
|
||||
n_width = s_width;
|
||||
|
||||
|
@ -602,12 +616,12 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
* | | | +-- hruler
|
||||
* | | | +-- vruler
|
||||
* | | | +-- canvas
|
||||
* | | |
|
||||
* | | |
|
||||
* | | +-- right_vbox
|
||||
* | | |
|
||||
* | | +-- padding_button
|
||||
* | | +-- vscrollbar
|
||||
* | |
|
||||
* | |
|
||||
* | +-- lower_hbox
|
||||
* | |
|
||||
* | +-- qmask
|
||||
|
@ -628,7 +642,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
|
||||
|
||||
if (shell->visibility.menubar)
|
||||
if (shell->appearance.menubar)
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
/* active display callback */
|
||||
|
@ -762,7 +776,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
/* create the contents of the right_vbox *********************************/
|
||||
shell->padding_button = gimp_color_panel_new (_("Set Canvas Padding Color"),
|
||||
&shell->padding_color,
|
||||
&shell->appearance.padding_color,
|
||||
GIMP_COLOR_AREA_FLAT,
|
||||
15, 15);
|
||||
GTK_WIDGET_UNSET_FLAGS (shell->padding_button, GTK_CAN_FOCUS);
|
||||
|
@ -836,7 +850,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
shell->nav_ebox = gtk_event_box_new ();
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_NAVIGATION, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (shell->nav_ebox), image);
|
||||
gtk_container_add (GTK_CONTAINER (shell->nav_ebox), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
g_signal_connect (shell->nav_ebox, "button_press_event",
|
||||
|
@ -879,7 +893,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
/* show everything *******************************************************/
|
||||
|
||||
if (shell->visibility.rulers)
|
||||
if (shell->appearance.rulers)
|
||||
{
|
||||
gtk_widget_show (shell->origin);
|
||||
gtk_widget_show (shell->hrule);
|
||||
|
@ -888,7 +902,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
gtk_widget_show (shell->canvas);
|
||||
|
||||
if (shell->visibility.scrollbars)
|
||||
if (shell->appearance.scrollbars)
|
||||
{
|
||||
gtk_widget_show (shell->vsb);
|
||||
gtk_widget_show (shell->hsb);
|
||||
|
@ -897,7 +911,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
gtk_widget_show (shell->nav_ebox);
|
||||
}
|
||||
|
||||
if (shell->visibility.statusbar)
|
||||
if (shell->appearance.statusbar)
|
||||
gtk_widget_show (shell->statusbar);
|
||||
|
||||
gtk_widget_show (main_vbox);
|
||||
|
@ -993,7 +1007,7 @@ gimp_display_shell_snap_coords (GimpDisplayShell *shell,
|
|||
{
|
||||
snap_to_guides = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (gimp_display_shell_get_show_grid (shell) &&
|
||||
gimp_display_shell_get_snap_to_grid (shell) &&
|
||||
shell->gdisp->gimage->grid)
|
||||
|
@ -1625,8 +1639,8 @@ gimp_display_shell_shrink_wrap (GimpDisplayShell *shell)
|
|||
|
||||
if (resize)
|
||||
{
|
||||
if (width < shell->statusbar->requisition.width)
|
||||
width = shell->statusbar->requisition.width;
|
||||
if (width < shell->statusbar->requisition.width)
|
||||
width = shell->statusbar->requisition.width;
|
||||
|
||||
gtk_window_resize (GTK_WINDOW (shell),
|
||||
width + border_x,
|
||||
|
|
|
@ -27,19 +27,23 @@
|
|||
#include "gui/gui-types.h"
|
||||
|
||||
|
||||
typedef struct _GimpDisplayShellVisibility GimpDisplayShellVisibility;
|
||||
typedef struct _GimpDisplayShellAppearance GimpDisplayShellAppearance;
|
||||
|
||||
struct _GimpDisplayShellVisibility
|
||||
struct _GimpDisplayShellAppearance
|
||||
{
|
||||
gboolean selection;
|
||||
gboolean active_layer;
|
||||
gboolean guides;
|
||||
gboolean grid;
|
||||
gboolean selection;
|
||||
gboolean active_layer;
|
||||
gboolean guides;
|
||||
gboolean grid;
|
||||
|
||||
gboolean menubar;
|
||||
gboolean rulers;
|
||||
gboolean scrollbars;
|
||||
gboolean statusbar;
|
||||
gboolean menubar;
|
||||
gboolean rulers;
|
||||
gboolean scrollbars;
|
||||
gboolean statusbar;
|
||||
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
GimpRGB padding_color;
|
||||
gboolean padding_mode_set;
|
||||
};
|
||||
|
||||
|
||||
|
@ -147,10 +151,6 @@ struct _GimpDisplayShell
|
|||
gint cursor_y; /* software cursor Y value */
|
||||
|
||||
GtkWidget *padding_button; /* GimpColorPanel in the NE corner */
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
gboolean padding_mode_set;
|
||||
GimpRGB padding_color; /* color of the empty around the image */
|
||||
|
||||
GtkWidget *nav_ebox; /* GtkEventBox on the SE corner */
|
||||
|
||||
GtkWidget *warning_dialog; /* close warning dialog */
|
||||
|
@ -168,8 +168,8 @@ struct _GimpDisplayShell
|
|||
|
||||
GdkWindowState window_state; /* for fullscreen display */
|
||||
|
||||
GimpDisplayShellVisibility visibility;
|
||||
GimpDisplayShellVisibility fullscreen_visibility;
|
||||
GimpDisplayShellAppearance appearance;
|
||||
GimpDisplayShellAppearance fullscreen_appearance;
|
||||
};
|
||||
|
||||
struct _GimpDisplayShellClass
|
||||
|
|
|
@ -112,9 +112,6 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
|||
|
||||
display_config = GIMP_DISPLAY_CONFIG (gimage->gimp->config);
|
||||
|
||||
shell->padding_mode = display_config->canvas_padding_mode;
|
||||
shell->padding_color = display_config->canvas_padding_color;
|
||||
|
||||
g_signal_connect (gimage, "clean",
|
||||
G_CALLBACK (gimp_display_shell_clean_dirty_handler),
|
||||
shell);
|
||||
|
@ -192,6 +189,14 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
|||
"notify::canvas-padding-color",
|
||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||
shell);
|
||||
g_signal_connect (gimage->gimp->config,
|
||||
"notify::fullscreen-canvas-padding-mode",
|
||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||
shell);
|
||||
g_signal_connect (gimage->gimp->config,
|
||||
"notify::fullscreen-canvas-padding-color",
|
||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||
shell);
|
||||
g_signal_connect (gimage->gimp->config,
|
||||
"notify::marching-ants-speed",
|
||||
G_CALLBACK (gimp_display_shell_ants_speed_notify_handler),
|
||||
|
@ -405,13 +410,16 @@ gimp_display_shell_check_notify_handler (GObject *config,
|
|||
GParamSpec *param_spec,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
switch (shell->padding_mode)
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
GimpRGB padding_color;
|
||||
|
||||
gimp_display_shell_get_padding (shell, &padding_mode, &padding_color);
|
||||
|
||||
switch (padding_mode)
|
||||
{
|
||||
case GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK:
|
||||
case GIMP_DISPLAY_PADDING_MODE_DARK_CHECK:
|
||||
gimp_display_shell_set_padding (shell,
|
||||
shell->padding_mode,
|
||||
&shell->padding_color);
|
||||
gimp_display_shell_set_padding (shell, padding_mode, &padding_color);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -474,17 +482,48 @@ gimp_display_shell_padding_notify_handler (GObject *config,
|
|||
GParamSpec *param_spec,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpDisplayConfig *display_config;
|
||||
gboolean fullscreen;
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
GimpRGB padding_color;
|
||||
|
||||
display_config = GIMP_DISPLAY_CONFIG (config);
|
||||
|
||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||
|
||||
/* if the user did not set the padding mode for this display explicitely */
|
||||
if (! shell->padding_mode_set)
|
||||
if (! shell->fullscreen_appearance.padding_mode_set)
|
||||
{
|
||||
GimpDisplayConfig *display_config;
|
||||
padding_mode = display_config->fs_canvas_padding_mode;
|
||||
padding_color = display_config->fs_canvas_padding_color;
|
||||
|
||||
display_config = GIMP_DISPLAY_CONFIG (config);
|
||||
|
||||
gimp_display_shell_set_padding (shell,
|
||||
display_config->canvas_padding_mode,
|
||||
&display_config->canvas_padding_color);
|
||||
if (fullscreen)
|
||||
{
|
||||
gimp_display_shell_set_padding (shell, padding_mode, &padding_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
shell->fullscreen_appearance.padding_mode = padding_mode;
|
||||
shell->fullscreen_appearance.padding_color = padding_color;
|
||||
}
|
||||
}
|
||||
|
||||
/* if the user did not set the padding mode for this display explicitely */
|
||||
if (! shell->appearance.padding_mode_set)
|
||||
{
|
||||
padding_mode = display_config->canvas_padding_mode;
|
||||
padding_color = display_config->canvas_padding_color;
|
||||
|
||||
if (fullscreen)
|
||||
{
|
||||
shell->appearance.padding_mode = padding_mode;
|
||||
shell->appearance.padding_color = padding_color;
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_display_shell_set_padding (shell, padding_mode, &padding_color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -248,9 +248,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
|||
shell->cursor_y = 0;
|
||||
|
||||
shell->padding_button = NULL;
|
||||
shell->padding_mode = GIMP_DISPLAY_PADDING_MODE_DEFAULT;
|
||||
shell->padding_mode_set = FALSE;
|
||||
gimp_rgba_set (&shell->padding_color, 1.0, 1.0, 1.0, 1.0);
|
||||
shell->nav_ebox = NULL;
|
||||
|
||||
shell->warning_dialog = NULL;
|
||||
shell->info_dialog = NULL;
|
||||
|
@ -266,23 +264,30 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
|||
|
||||
shell->window_state = 0;
|
||||
|
||||
shell->visibility.selection = TRUE;
|
||||
shell->visibility.active_layer = TRUE;
|
||||
shell->visibility.guides = TRUE;
|
||||
shell->visibility.grid = TRUE;
|
||||
shell->visibility.menubar = FALSE;
|
||||
shell->visibility.rulers = TRUE;
|
||||
shell->visibility.scrollbars = TRUE;
|
||||
shell->visibility.statusbar = TRUE;
|
||||
shell->appearance.selection = TRUE;
|
||||
shell->appearance.active_layer = TRUE;
|
||||
shell->appearance.guides = TRUE;
|
||||
shell->appearance.grid = TRUE;
|
||||
shell->appearance.menubar = TRUE;
|
||||
shell->appearance.rulers = TRUE;
|
||||
shell->appearance.scrollbars = TRUE;
|
||||
shell->appearance.statusbar = TRUE;
|
||||
shell->appearance.padding_mode = GIMP_DISPLAY_PADDING_MODE_DEFAULT;
|
||||
gimp_rgba_set (&shell->appearance.padding_color, 1.0, 1.0, 1.0, 1.0);
|
||||
shell->appearance.padding_mode_set = FALSE;
|
||||
|
||||
shell->fullscreen_visibility.selection = TRUE;
|
||||
shell->fullscreen_visibility.active_layer = TRUE;
|
||||
shell->fullscreen_visibility.guides = TRUE;
|
||||
shell->fullscreen_visibility.grid = TRUE;
|
||||
shell->fullscreen_visibility.menubar = FALSE;
|
||||
shell->fullscreen_visibility.rulers = FALSE;
|
||||
shell->fullscreen_visibility.scrollbars = FALSE;
|
||||
shell->fullscreen_visibility.statusbar = FALSE;
|
||||
shell->fullscreen_appearance.selection = TRUE;
|
||||
shell->fullscreen_appearance.active_layer = TRUE;
|
||||
shell->fullscreen_appearance.guides = TRUE;
|
||||
shell->fullscreen_appearance.grid = TRUE;
|
||||
shell->fullscreen_appearance.menubar = FALSE;
|
||||
shell->fullscreen_appearance.rulers = FALSE;
|
||||
shell->fullscreen_appearance.scrollbars = FALSE;
|
||||
shell->fullscreen_appearance.statusbar = FALSE;
|
||||
shell->fullscreen_appearance.padding_mode = GIMP_DISPLAY_PADDING_MODE_CUSTOM;
|
||||
gimp_rgba_set (&shell->fullscreen_appearance.padding_color,
|
||||
0.0, 0.0, 0.0, 1.0);
|
||||
shell->fullscreen_appearance.padding_mode_set = FALSE;
|
||||
|
||||
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
|
||||
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
|
||||
|
@ -507,10 +512,19 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
shell->dot_for_dot = config->default_dot_for_dot;
|
||||
|
||||
shell->visibility.menubar = config->show_menubar;
|
||||
shell->visibility.rulers = config->show_rulers;
|
||||
shell->visibility.scrollbars = config->show_scrollbars;
|
||||
shell->visibility.statusbar = config->show_statusbar;
|
||||
shell->appearance.menubar = config->show_menubar;
|
||||
shell->appearance.rulers = config->show_rulers;
|
||||
shell->appearance.scrollbars = config->show_scrollbars;
|
||||
shell->appearance.statusbar = config->show_statusbar;
|
||||
shell->appearance.padding_mode = config->canvas_padding_mode;
|
||||
shell->appearance.padding_color = config->canvas_padding_color;
|
||||
|
||||
shell->fullscreen_appearance.menubar = config->fs_show_menubar;
|
||||
shell->fullscreen_appearance.rulers = config->fs_show_rulers;
|
||||
shell->fullscreen_appearance.scrollbars = config->fs_show_scrollbars;
|
||||
shell->fullscreen_appearance.statusbar = config->fs_show_statusbar;
|
||||
shell->fullscreen_appearance.padding_mode = config->fs_canvas_padding_mode;
|
||||
shell->fullscreen_appearance.padding_color = config->fs_canvas_padding_color;
|
||||
|
||||
/* adjust the initial scale -- so that window fits on screen the 75%
|
||||
* value is the same as in gimp_display_shell_shrink_wrap. It
|
||||
|
@ -525,7 +539,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
n_width = SCALEX (shell, image_width);
|
||||
n_height = SCALEX (shell, image_height);
|
||||
|
||||
if (config->initial_zoom_to_fit)
|
||||
if (config->initial_zoom_to_fit)
|
||||
{
|
||||
/* Limit to the size of the screen... */
|
||||
while (n_width > s_width || n_height > s_height)
|
||||
|
@ -536,7 +550,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
if (scalesrc < 0xFF)
|
||||
scalesrc++;
|
||||
|
||||
n_width = (image_width *
|
||||
n_width = (image_width *
|
||||
(scaledest * SCREEN_XRES (shell)) /
|
||||
(scalesrc * gdisp->gimage->xresolution));
|
||||
|
||||
|
@ -547,12 +561,12 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
if (scaledest == 1 && scalesrc == 0xFF)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set up size like above, but do not zoom to fit.
|
||||
/* Set up size like above, but do not zoom to fit.
|
||||
Useful when working on large images. */
|
||||
|
||||
|
||||
if (n_width > s_width)
|
||||
n_width = s_width;
|
||||
|
||||
|
@ -602,12 +616,12 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
* | | | +-- hruler
|
||||
* | | | +-- vruler
|
||||
* | | | +-- canvas
|
||||
* | | |
|
||||
* | | |
|
||||
* | | +-- right_vbox
|
||||
* | | |
|
||||
* | | +-- padding_button
|
||||
* | | +-- vscrollbar
|
||||
* | |
|
||||
* | |
|
||||
* | +-- lower_hbox
|
||||
* | |
|
||||
* | +-- qmask
|
||||
|
@ -628,7 +642,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
|
||||
|
||||
if (shell->visibility.menubar)
|
||||
if (shell->appearance.menubar)
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
/* active display callback */
|
||||
|
@ -762,7 +776,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
/* create the contents of the right_vbox *********************************/
|
||||
shell->padding_button = gimp_color_panel_new (_("Set Canvas Padding Color"),
|
||||
&shell->padding_color,
|
||||
&shell->appearance.padding_color,
|
||||
GIMP_COLOR_AREA_FLAT,
|
||||
15, 15);
|
||||
GTK_WIDGET_UNSET_FLAGS (shell->padding_button, GTK_CAN_FOCUS);
|
||||
|
@ -836,7 +850,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
shell->nav_ebox = gtk_event_box_new ();
|
||||
|
||||
image = gtk_image_new_from_stock (GIMP_STOCK_NAVIGATION, GTK_ICON_SIZE_MENU);
|
||||
gtk_container_add (GTK_CONTAINER (shell->nav_ebox), image);
|
||||
gtk_container_add (GTK_CONTAINER (shell->nav_ebox), image);
|
||||
gtk_widget_show (image);
|
||||
|
||||
g_signal_connect (shell->nav_ebox, "button_press_event",
|
||||
|
@ -879,7 +893,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
/* show everything *******************************************************/
|
||||
|
||||
if (shell->visibility.rulers)
|
||||
if (shell->appearance.rulers)
|
||||
{
|
||||
gtk_widget_show (shell->origin);
|
||||
gtk_widget_show (shell->hrule);
|
||||
|
@ -888,7 +902,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
|
||||
gtk_widget_show (shell->canvas);
|
||||
|
||||
if (shell->visibility.scrollbars)
|
||||
if (shell->appearance.scrollbars)
|
||||
{
|
||||
gtk_widget_show (shell->vsb);
|
||||
gtk_widget_show (shell->hsb);
|
||||
|
@ -897,7 +911,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
gtk_widget_show (shell->nav_ebox);
|
||||
}
|
||||
|
||||
if (shell->visibility.statusbar)
|
||||
if (shell->appearance.statusbar)
|
||||
gtk_widget_show (shell->statusbar);
|
||||
|
||||
gtk_widget_show (main_vbox);
|
||||
|
@ -993,7 +1007,7 @@ gimp_display_shell_snap_coords (GimpDisplayShell *shell,
|
|||
{
|
||||
snap_to_guides = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (gimp_display_shell_get_show_grid (shell) &&
|
||||
gimp_display_shell_get_snap_to_grid (shell) &&
|
||||
shell->gdisp->gimage->grid)
|
||||
|
@ -1625,8 +1639,8 @@ gimp_display_shell_shrink_wrap (GimpDisplayShell *shell)
|
|||
|
||||
if (resize)
|
||||
{
|
||||
if (width < shell->statusbar->requisition.width)
|
||||
width = shell->statusbar->requisition.width;
|
||||
if (width < shell->statusbar->requisition.width)
|
||||
width = shell->statusbar->requisition.width;
|
||||
|
||||
gtk_window_resize (GTK_WINDOW (shell),
|
||||
width + border_x,
|
||||
|
|
|
@ -27,19 +27,23 @@
|
|||
#include "gui/gui-types.h"
|
||||
|
||||
|
||||
typedef struct _GimpDisplayShellVisibility GimpDisplayShellVisibility;
|
||||
typedef struct _GimpDisplayShellAppearance GimpDisplayShellAppearance;
|
||||
|
||||
struct _GimpDisplayShellVisibility
|
||||
struct _GimpDisplayShellAppearance
|
||||
{
|
||||
gboolean selection;
|
||||
gboolean active_layer;
|
||||
gboolean guides;
|
||||
gboolean grid;
|
||||
gboolean selection;
|
||||
gboolean active_layer;
|
||||
gboolean guides;
|
||||
gboolean grid;
|
||||
|
||||
gboolean menubar;
|
||||
gboolean rulers;
|
||||
gboolean scrollbars;
|
||||
gboolean statusbar;
|
||||
gboolean menubar;
|
||||
gboolean rulers;
|
||||
gboolean scrollbars;
|
||||
gboolean statusbar;
|
||||
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
GimpRGB padding_color;
|
||||
gboolean padding_mode_set;
|
||||
};
|
||||
|
||||
|
||||
|
@ -147,10 +151,6 @@ struct _GimpDisplayShell
|
|||
gint cursor_y; /* software cursor Y value */
|
||||
|
||||
GtkWidget *padding_button; /* GimpColorPanel in the NE corner */
|
||||
GimpDisplayPaddingMode padding_mode;
|
||||
gboolean padding_mode_set;
|
||||
GimpRGB padding_color; /* color of the empty around the image */
|
||||
|
||||
GtkWidget *nav_ebox; /* GtkEventBox on the SE corner */
|
||||
|
||||
GtkWidget *warning_dialog; /* close warning dialog */
|
||||
|
@ -168,8 +168,8 @@ struct _GimpDisplayShell
|
|||
|
||||
GdkWindowState window_state; /* for fullscreen display */
|
||||
|
||||
GimpDisplayShellVisibility visibility;
|
||||
GimpDisplayShellVisibility fullscreen_visibility;
|
||||
GimpDisplayShellAppearance appearance;
|
||||
GimpDisplayShellAppearance fullscreen_appearance;
|
||||
};
|
||||
|
||||
struct _GimpDisplayShellClass
|
||||
|
|
|
@ -243,7 +243,7 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
MENU_SEPARATOR ("/Edit/---"),
|
||||
|
||||
/* <Image>/Select */
|
||||
|
||||
|
||||
MENU_BRANCH (N_("/_Select")),
|
||||
|
||||
{ { N_("/Select/_All"), "<control>A",
|
||||
|
@ -649,42 +649,42 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_COLOR_BALANCE },
|
||||
"gimp-color-balance-tool",
|
||||
"tools/color_balance.html", NULL },
|
||||
"tools/color_balance.html", NULL },
|
||||
{ { N_("/Layer/Colors/Hue-_Saturation..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_HUE_SATURATION },
|
||||
"gimp-hue-saturation-tool",
|
||||
"tools/hue_saturation.html", NULL },
|
||||
"tools/hue_saturation.html", NULL },
|
||||
{ { N_("/Layer/Colors/Colori_ze..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_COLORIZE },
|
||||
"gimp-colorize-tool",
|
||||
"tools/colorize.html", NULL },
|
||||
"tools/colorize.html", NULL },
|
||||
{ { N_("/Layer/Colors/B_rightness-Contrast..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_BRIGHTNESS_CONTRAST },
|
||||
"gimp-brightness-contrast-tool",
|
||||
"tools/brightness-contrast.html", NULL },
|
||||
"tools/brightness-contrast.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Threshold..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_THRESHOLD },
|
||||
"gimp-threshold-tool",
|
||||
"tools/threshold.html", NULL },
|
||||
"tools/threshold.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Levels..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_LEVELS },
|
||||
"gimp-levels-tool",
|
||||
"tools/levels.html", NULL },
|
||||
"tools/levels.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Curves..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_CURVES },
|
||||
"gimp-curves-tool",
|
||||
"tools/curves.html", NULL },
|
||||
"tools/curves.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Posterize..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_POSTERIZE },
|
||||
"gimp-posterize-tool",
|
||||
"tools/posterize.html", NULL },
|
||||
"tools/posterize.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/Layer/Colors/---"),
|
||||
|
||||
|
@ -714,7 +714,7 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_HISTOGRAM },
|
||||
"gimp-histogram-tool",
|
||||
"tools/histogram.html", NULL },
|
||||
"tools/histogram.html", NULL },
|
||||
|
||||
/* <Image>/Layer/Mask */
|
||||
|
||||
|
@ -786,12 +786,12 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
drawable_rotate_cmd_callback, GIMP_ROTATE_180,
|
||||
"<StockItem>", GIMP_STOCK_ROTATE_180 },
|
||||
NULL,
|
||||
"layers/rotate_layer.html", NULL },
|
||||
"layers/rotate_layer.html", NULL },
|
||||
{ { N_("/Layer/Transform/_Arbitrary Rotation..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_ROTATE },
|
||||
"gimp-rotate-tool",
|
||||
"layers/rotate_layer.html", NULL },
|
||||
"layers/rotate_layer.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/Layer/Transform/---"),
|
||||
|
||||
|
@ -1257,8 +1257,8 @@ image_menu_update (GtkItemFactory *item_factory,
|
|||
gint lind = -1;
|
||||
gint lnum = -1;
|
||||
gboolean fullscreen = FALSE;
|
||||
GimpDisplayShellVisibility *visibility = NULL;
|
||||
|
||||
GimpDisplayShellAppearance *appearance = NULL;
|
||||
|
||||
gimp = GIMP_ITEM_FACTORY (item_factory)->gimp;
|
||||
|
||||
if (data)
|
||||
|
@ -1305,9 +1305,9 @@ image_menu_update (GtkItemFactory *item_factory,
|
|||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||
|
||||
if (fullscreen)
|
||||
visibility = &shell->fullscreen_visibility;
|
||||
appearance = &shell->fullscreen_appearance;
|
||||
else
|
||||
visibility = &shell->visibility;
|
||||
appearance = &shell->appearance;
|
||||
}
|
||||
|
||||
gimp_context_get_foreground (gimp_get_user_context (gimp), &fg);
|
||||
|
@ -1427,27 +1427,27 @@ image_menu_update (GtkItemFactory *item_factory,
|
|||
SET_SENSITIVE ("/View/Display Filters...", gdisp);
|
||||
|
||||
SET_SENSITIVE ("/View/Show Selection", gdisp);
|
||||
SET_ACTIVE ("/View/Show Selection", gdisp && visibility->selection);
|
||||
SET_ACTIVE ("/View/Show Selection", gdisp && appearance->selection);
|
||||
SET_SENSITIVE ("/View/Show Layer Boundary", gdisp);
|
||||
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && visibility->active_layer);
|
||||
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && appearance->active_layer);
|
||||
SET_SENSITIVE ("/View/Show Guides", gdisp);
|
||||
SET_ACTIVE ("/View/Show Guides", gdisp && visibility->guides);
|
||||
SET_ACTIVE ("/View/Show Guides", gdisp && appearance->guides);
|
||||
SET_SENSITIVE ("/View/Snap to Guides", gdisp);
|
||||
SET_ACTIVE ("/View/Snap to Guides", gdisp && shell->snap_to_guides);
|
||||
|
||||
SET_SENSITIVE ("/View/Show Grid", gdisp);
|
||||
SET_ACTIVE ("/View/Show Grid", gdisp && visibility->grid);
|
||||
SET_ACTIVE ("/View/Show Grid", gdisp && appearance->grid);
|
||||
SET_SENSITIVE ("/View/Snap to Grid", gdisp);
|
||||
SET_ACTIVE ("/View/Snap to Grid", gdisp && shell->snap_to_grid);
|
||||
|
||||
SET_SENSITIVE ("/View/Show Menubar", gdisp);
|
||||
SET_ACTIVE ("/View/Show Menubar", gdisp && visibility->menubar);
|
||||
SET_ACTIVE ("/View/Show Menubar", gdisp && appearance->menubar);
|
||||
SET_SENSITIVE ("/View/Show Rulers", gdisp);
|
||||
SET_ACTIVE ("/View/Show Rulers", gdisp && visibility->rulers);
|
||||
SET_ACTIVE ("/View/Show Rulers", gdisp && appearance->rulers);
|
||||
SET_SENSITIVE ("/View/Show Scrollbars", gdisp);
|
||||
SET_ACTIVE ("/View/Show Scrollbars", gdisp && visibility->scrollbars);
|
||||
SET_ACTIVE ("/View/Show Scrollbars", gdisp && appearance->scrollbars);
|
||||
SET_SENSITIVE ("/View/Show Statusbar", gdisp);
|
||||
SET_ACTIVE ("/View/Show Statusbar", gdisp && visibility->statusbar);
|
||||
SET_ACTIVE ("/View/Show Statusbar", gdisp && appearance->statusbar);
|
||||
|
||||
SET_SENSITIVE ("/View/Shrink Wrap", gdisp);
|
||||
|
||||
|
@ -1571,7 +1571,7 @@ image_menu_set_zoom (GtkItemFactory *item_factory,
|
|||
|
||||
scalesrc = SCALESRC (shell);
|
||||
scaledest = SCALEDEST (shell);
|
||||
|
||||
|
||||
if (scaledest == 1)
|
||||
{
|
||||
switch (scalesrc)
|
||||
|
@ -1600,7 +1600,7 @@ image_menu_set_zoom (GtkItemFactory *item_factory,
|
|||
|
||||
label = g_strdup_printf (_("Other (%d:%d) ..."), scaledest, scalesrc);
|
||||
gimp_item_factory_set_label (item_factory, menu, label);
|
||||
g_free (label);
|
||||
g_free (label);
|
||||
|
||||
shell->other_scale = shell->scale;
|
||||
}
|
||||
|
|
|
@ -430,7 +430,7 @@ prefs_input_devices_dialog (GtkWidget *widget)
|
|||
gtk_window_set_transient_for (GTK_WINDOW (input_dialog),
|
||||
GTK_WINDOW (prefs_dialog));
|
||||
gtk_window_set_destroy_with_parent (GTK_WINDOW (input_dialog), TRUE);
|
||||
|
||||
|
||||
gtk_widget_hide (GTK_INPUT_DIALOG (input_dialog)->save_button);
|
||||
|
||||
g_signal_connect_swapped (GTK_INPUT_DIALOG (input_dialog)->close_button,
|
||||
|
@ -1154,7 +1154,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
&top_iter,
|
||||
page_index++);
|
||||
|
||||
/* General */
|
||||
/* Previews */
|
||||
vbox2 = prefs_frame_new (_("Previews"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "layer-previews",
|
||||
|
@ -1365,7 +1365,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
||||
button = gtk_button_new_with_label (_("Save Input Device Settings Now"));
|
||||
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
@ -1390,50 +1390,18 @@ prefs_dialog_new (Gimp *gimp,
|
|||
&child_iter,
|
||||
page_index++);
|
||||
|
||||
/* Appearance */
|
||||
vbox2 = prefs_frame_new (_("Appearance"), GTK_CONTAINER (vbox), FALSE);
|
||||
/* General */
|
||||
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "default-dot-for-dot",
|
||||
_("Use \"_Dot for Dot\" by default"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-menubar",
|
||||
_("Show Menubar"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-rulers",
|
||||
_("Show _Rulers"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-scrollbars",
|
||||
_("Show Scrollbars"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-statusbar",
|
||||
_("Show S_tatusbar"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_boolean_option_menu_add (config, "initial-zoom-to-fit",
|
||||
_("Fit to Window"),
|
||||
"1:1",
|
||||
_("Inital Zoom Ratio:"),
|
||||
GTK_TABLE (table), 0);
|
||||
prefs_spin_button_add (config, "marching-ants-speed", 10.0, 100.0, 0,
|
||||
_("Marching _Ants Speed:"),
|
||||
GTK_TABLE (table), 1);
|
||||
|
||||
/* Canvas Padding Color */
|
||||
vbox2 = prefs_frame_new (_("Canvas Padding Color"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (config, "canvas-padding-mode", 0, 0,
|
||||
_("Padding Mode:"),
|
||||
GTK_TABLE (table), 0);
|
||||
button = prefs_color_button_add (config, "canvas-padding-color",
|
||||
_("Custom Color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1);
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
||||
gimp_get_user_context (gimp));
|
||||
GTK_TABLE (table), 0);
|
||||
|
||||
/* Zoom & Resize Behavior */
|
||||
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
|
||||
|
@ -1446,6 +1414,14 @@ prefs_dialog_new (Gimp *gimp,
|
|||
_("Resize Window on Image _Size Change"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_boolean_option_menu_add (config, "initial-zoom-to-fit",
|
||||
_("Fit to Window"),
|
||||
"1:1",
|
||||
_("Inital Zoom Ratio:"),
|
||||
GTK_TABLE (table), 0);
|
||||
|
||||
/* Pointer Movement Feedback */
|
||||
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
@ -1464,6 +1440,79 @@ prefs_dialog_new (Gimp *gimp,
|
|||
GTK_TABLE (table), 0);
|
||||
|
||||
|
||||
/********************************************/
|
||||
/* Interface / Image Windows / Appearance */
|
||||
/********************************************/
|
||||
vbox = prefs_notebook_append_page (gimp,
|
||||
GTK_NOTEBOOK (notebook),
|
||||
_("Image Window Appearance"),
|
||||
"image-windows.png",
|
||||
GTK_TREE_STORE (tree),
|
||||
_("Appearance"),
|
||||
"dialogs/preferences/image_windows.html",
|
||||
&child_iter,
|
||||
&grandchild_iter,
|
||||
page_index++);
|
||||
|
||||
/* Normal Mode */
|
||||
vbox2 = prefs_frame_new (_("Default Appearance in Normal Mode"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "show-menubar",
|
||||
_("Show Menubar"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-rulers",
|
||||
_("Show _Rulers"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-scrollbars",
|
||||
_("Show Scrollbars"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-statusbar",
|
||||
_("Show S_tatusbar"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (config, "canvas-padding-mode", 0, 0,
|
||||
_("Canvas Padding Mode:"),
|
||||
GTK_TABLE (table), 0);
|
||||
button = prefs_color_button_add (config, "canvas-padding-color",
|
||||
_("Custom Padding Color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1);
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
/* Fullscreen Mode */
|
||||
vbox2 = prefs_frame_new (_("Default Appearance in Fullscreen Mode"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (config, "fullscreen-show-menubar",
|
||||
_("Show Menubar"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "fullscreen-show-rulers",
|
||||
_("Show _Rulers"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "fullscreen-show-scrollbars",
|
||||
_("Show Scrollbars"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "fullscreen-show-statusbar",
|
||||
_("Show S_tatusbar"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (config, "fullscreen-canvas-padding-mode", 0, 0,
|
||||
_("Canvas Padding Mode:"),
|
||||
GTK_TABLE (table), 0);
|
||||
button = prefs_color_button_add (config, "fullscreen-canvas-padding-color",
|
||||
_("Custom Padding Color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1);
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* Interface / Image Windows / Image Title & Statusbar Format */
|
||||
/****************************************************************/
|
||||
|
@ -1697,7 +1746,7 @@ prefs_dialog_new (Gimp *gimp,
|
|||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
|
||||
|
||||
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate"));
|
||||
gtk_misc_set_padding (GTK_MISC (GTK_BIN (calibrate_button)->child), 4, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
|
||||
|
|
|
@ -243,7 +243,7 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
MENU_SEPARATOR ("/Edit/---"),
|
||||
|
||||
/* <Image>/Select */
|
||||
|
||||
|
||||
MENU_BRANCH (N_("/_Select")),
|
||||
|
||||
{ { N_("/Select/_All"), "<control>A",
|
||||
|
@ -649,42 +649,42 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_COLOR_BALANCE },
|
||||
"gimp-color-balance-tool",
|
||||
"tools/color_balance.html", NULL },
|
||||
"tools/color_balance.html", NULL },
|
||||
{ { N_("/Layer/Colors/Hue-_Saturation..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_HUE_SATURATION },
|
||||
"gimp-hue-saturation-tool",
|
||||
"tools/hue_saturation.html", NULL },
|
||||
"tools/hue_saturation.html", NULL },
|
||||
{ { N_("/Layer/Colors/Colori_ze..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_COLORIZE },
|
||||
"gimp-colorize-tool",
|
||||
"tools/colorize.html", NULL },
|
||||
"tools/colorize.html", NULL },
|
||||
{ { N_("/Layer/Colors/B_rightness-Contrast..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_BRIGHTNESS_CONTRAST },
|
||||
"gimp-brightness-contrast-tool",
|
||||
"tools/brightness-contrast.html", NULL },
|
||||
"tools/brightness-contrast.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Threshold..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_THRESHOLD },
|
||||
"gimp-threshold-tool",
|
||||
"tools/threshold.html", NULL },
|
||||
"tools/threshold.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Levels..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_LEVELS },
|
||||
"gimp-levels-tool",
|
||||
"tools/levels.html", NULL },
|
||||
"tools/levels.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Curves..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_CURVES },
|
||||
"gimp-curves-tool",
|
||||
"tools/curves.html", NULL },
|
||||
"tools/curves.html", NULL },
|
||||
{ { N_("/Layer/Colors/_Posterize..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_POSTERIZE },
|
||||
"gimp-posterize-tool",
|
||||
"tools/posterize.html", NULL },
|
||||
"tools/posterize.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/Layer/Colors/---"),
|
||||
|
||||
|
@ -714,7 +714,7 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_HISTOGRAM },
|
||||
"gimp-histogram-tool",
|
||||
"tools/histogram.html", NULL },
|
||||
"tools/histogram.html", NULL },
|
||||
|
||||
/* <Image>/Layer/Mask */
|
||||
|
||||
|
@ -786,12 +786,12 @@ GimpItemFactoryEntry image_menu_entries[] =
|
|||
drawable_rotate_cmd_callback, GIMP_ROTATE_180,
|
||||
"<StockItem>", GIMP_STOCK_ROTATE_180 },
|
||||
NULL,
|
||||
"layers/rotate_layer.html", NULL },
|
||||
"layers/rotate_layer.html", NULL },
|
||||
{ { N_("/Layer/Transform/_Arbitrary Rotation..."), NULL,
|
||||
tools_select_cmd_callback, 0,
|
||||
"<StockItem>", GIMP_STOCK_TOOL_ROTATE },
|
||||
"gimp-rotate-tool",
|
||||
"layers/rotate_layer.html", NULL },
|
||||
"layers/rotate_layer.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/Layer/Transform/---"),
|
||||
|
||||
|
@ -1257,8 +1257,8 @@ image_menu_update (GtkItemFactory *item_factory,
|
|||
gint lind = -1;
|
||||
gint lnum = -1;
|
||||
gboolean fullscreen = FALSE;
|
||||
GimpDisplayShellVisibility *visibility = NULL;
|
||||
|
||||
GimpDisplayShellAppearance *appearance = NULL;
|
||||
|
||||
gimp = GIMP_ITEM_FACTORY (item_factory)->gimp;
|
||||
|
||||
if (data)
|
||||
|
@ -1305,9 +1305,9 @@ image_menu_update (GtkItemFactory *item_factory,
|
|||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||
|
||||
if (fullscreen)
|
||||
visibility = &shell->fullscreen_visibility;
|
||||
appearance = &shell->fullscreen_appearance;
|
||||
else
|
||||
visibility = &shell->visibility;
|
||||
appearance = &shell->appearance;
|
||||
}
|
||||
|
||||
gimp_context_get_foreground (gimp_get_user_context (gimp), &fg);
|
||||
|
@ -1427,27 +1427,27 @@ image_menu_update (GtkItemFactory *item_factory,
|
|||
SET_SENSITIVE ("/View/Display Filters...", gdisp);
|
||||
|
||||
SET_SENSITIVE ("/View/Show Selection", gdisp);
|
||||
SET_ACTIVE ("/View/Show Selection", gdisp && visibility->selection);
|
||||
SET_ACTIVE ("/View/Show Selection", gdisp && appearance->selection);
|
||||
SET_SENSITIVE ("/View/Show Layer Boundary", gdisp);
|
||||
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && visibility->active_layer);
|
||||
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && appearance->active_layer);
|
||||
SET_SENSITIVE ("/View/Show Guides", gdisp);
|
||||
SET_ACTIVE ("/View/Show Guides", gdisp && visibility->guides);
|
||||
SET_ACTIVE ("/View/Show Guides", gdisp && appearance->guides);
|
||||
SET_SENSITIVE ("/View/Snap to Guides", gdisp);
|
||||
SET_ACTIVE ("/View/Snap to Guides", gdisp && shell->snap_to_guides);
|
||||
|
||||
SET_SENSITIVE ("/View/Show Grid", gdisp);
|
||||
SET_ACTIVE ("/View/Show Grid", gdisp && visibility->grid);
|
||||
SET_ACTIVE ("/View/Show Grid", gdisp && appearance->grid);
|
||||
SET_SENSITIVE ("/View/Snap to Grid", gdisp);
|
||||
SET_ACTIVE ("/View/Snap to Grid", gdisp && shell->snap_to_grid);
|
||||
|
||||
SET_SENSITIVE ("/View/Show Menubar", gdisp);
|
||||
SET_ACTIVE ("/View/Show Menubar", gdisp && visibility->menubar);
|
||||
SET_ACTIVE ("/View/Show Menubar", gdisp && appearance->menubar);
|
||||
SET_SENSITIVE ("/View/Show Rulers", gdisp);
|
||||
SET_ACTIVE ("/View/Show Rulers", gdisp && visibility->rulers);
|
||||
SET_ACTIVE ("/View/Show Rulers", gdisp && appearance->rulers);
|
||||
SET_SENSITIVE ("/View/Show Scrollbars", gdisp);
|
||||
SET_ACTIVE ("/View/Show Scrollbars", gdisp && visibility->scrollbars);
|
||||
SET_ACTIVE ("/View/Show Scrollbars", gdisp && appearance->scrollbars);
|
||||
SET_SENSITIVE ("/View/Show Statusbar", gdisp);
|
||||
SET_ACTIVE ("/View/Show Statusbar", gdisp && visibility->statusbar);
|
||||
SET_ACTIVE ("/View/Show Statusbar", gdisp && appearance->statusbar);
|
||||
|
||||
SET_SENSITIVE ("/View/Shrink Wrap", gdisp);
|
||||
|
||||
|
@ -1571,7 +1571,7 @@ image_menu_set_zoom (GtkItemFactory *item_factory,
|
|||
|
||||
scalesrc = SCALESRC (shell);
|
||||
scaledest = SCALEDEST (shell);
|
||||
|
||||
|
||||
if (scaledest == 1)
|
||||
{
|
||||
switch (scalesrc)
|
||||
|
@ -1600,7 +1600,7 @@ image_menu_set_zoom (GtkItemFactory *item_factory,
|
|||
|
||||
label = g_strdup_printf (_("Other (%d:%d) ..."), scaledest, scalesrc);
|
||||
gimp_item_factory_set_label (item_factory, menu, label);
|
||||
g_free (label);
|
||||
g_free (label);
|
||||
|
||||
shell->other_scale = shell->scale;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue