mirror of https://github.com/GNOME/gimp.git
app/display/Makefile.am new files that implement a GimpConfig object with
2003-10-22 Sven Neumann <sven@gimp.org> * app/display/Makefile.am * app/display/gimpdisplayoptions.[ch]: new files that implement a GimpConfig object with GimpDisplayShell and GimpCanvas options. Actually two classes, one for the normal view, a derived one with different default values for fullscreen mode. * app/display/display-enums.[ch]: renamed GimpDisplayPadding enum to GimpCanvasPadding. * app/config/config-types.h: added the GimpDisplayOptions typedef. * app/config/gimprc-blurbs.h * app/config/gimpdisplayconfig.[ch]: replaced a bunch of properties with two instances of GimpDisplayOptions. * app/display/gimpdisplayshell.[ch]: replaced the GimpDisplayShellAppearance struct with GimpDisplayOptions. * app/display/gimpdisplayshell-appearance.[ch] * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-handlers.[ch] * app/gui/image-menu.c: changed accordingly. * app/gui/preferences-dialog.c: added a convenience function that creates a view on a GimpDisplayOptions object. Not all values are configurable here yet. * docs/gimprc-1.3.5.in * etc/gimprc: regenerated to document the gimprc format changes.
This commit is contained in:
parent
49fd45e277
commit
e3480536f3
32
ChangeLog
32
ChangeLog
|
@ -1,3 +1,35 @@
|
||||||
|
2003-10-22 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/display/Makefile.am
|
||||||
|
* app/display/gimpdisplayoptions.[ch]: new files that implement
|
||||||
|
a GimpConfig object with GimpDisplayShell and GimpCanvas options.
|
||||||
|
Actually two classes, one for the normal view, a derived one with
|
||||||
|
different default values for fullscreen mode.
|
||||||
|
|
||||||
|
* app/display/display-enums.[ch]: renamed GimpDisplayPadding enum
|
||||||
|
to GimpCanvasPadding.
|
||||||
|
|
||||||
|
* app/config/config-types.h: added the GimpDisplayOptions typedef.
|
||||||
|
|
||||||
|
* app/config/gimprc-blurbs.h
|
||||||
|
* app/config/gimpdisplayconfig.[ch]: replaced a bunch of properties
|
||||||
|
with two instances of GimpDisplayOptions.
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell.[ch]: replaced the
|
||||||
|
GimpDisplayShellAppearance struct with GimpDisplayOptions.
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-appearance.[ch]
|
||||||
|
* app/display/gimpdisplayshell-callbacks.c
|
||||||
|
* app/display/gimpdisplayshell-handlers.[ch]
|
||||||
|
* app/gui/image-menu.c: changed accordingly.
|
||||||
|
|
||||||
|
* app/gui/preferences-dialog.c: added a convenience function that
|
||||||
|
creates a view on a GimpDisplayOptions object. Not all values are
|
||||||
|
configurable here yet.
|
||||||
|
|
||||||
|
* docs/gimprc-1.3.5.in
|
||||||
|
* etc/gimprc: regenerated to document the gimprc format changes.
|
||||||
|
|
||||||
2003-10-22 Sven Neumann <sven@gimp.org>
|
2003-10-22 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimpwidgets-utils.[ch]: added new function
|
* app/widgets/gimpwidgets-utils.[ch]: added new function
|
||||||
|
|
|
@ -36,6 +36,7 @@ typedef struct _GimpRc GimpRc;
|
||||||
typedef struct _GimpConfigWriter GimpConfigWriter;
|
typedef struct _GimpConfigWriter GimpConfigWriter;
|
||||||
typedef struct _GimpXmlParser GimpXmlParser;
|
typedef struct _GimpXmlParser GimpXmlParser;
|
||||||
|
|
||||||
|
typedef struct _GimpDisplayOptions GimpDisplayOptions;
|
||||||
typedef struct _GimpGrid GimpGrid;
|
typedef struct _GimpGrid GimpGrid;
|
||||||
typedef struct _GimpTemplate GimpTemplate;
|
typedef struct _GimpTemplate GimpTemplate;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
|
|
||||||
#include "config-types.h"
|
#include "config-types.h"
|
||||||
|
|
||||||
|
#include "display/display-enums.h"
|
||||||
|
#include "display/gimpdisplayoptions.h"
|
||||||
|
|
||||||
|
#include "gimpconfig.h"
|
||||||
#include "gimpconfig-params.h"
|
#include "gimpconfig-params.h"
|
||||||
#include "gimpconfig-types.h"
|
#include "gimpconfig-types.h"
|
||||||
#include "gimpconfig-utils.h"
|
#include "gimpconfig-utils.h"
|
||||||
|
@ -39,6 +43,7 @@
|
||||||
|
|
||||||
|
|
||||||
static void gimp_display_config_class_init (GimpDisplayConfigClass *klass);
|
static void gimp_display_config_class_init (GimpDisplayConfigClass *klass);
|
||||||
|
static void gimp_display_config_init (GimpDisplayConfig *config);
|
||||||
static void gimp_display_config_finalize (GObject *object);
|
static void gimp_display_config_finalize (GObject *object);
|
||||||
static void gimp_display_config_set_property (GObject *object,
|
static void gimp_display_config_set_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
|
@ -49,10 +54,18 @@ static void gimp_display_config_get_property (GObject *object,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
|
||||||
|
static void gimp_display_config_view_notify (GObject *object,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer data);
|
||||||
|
static void gimp_display_config_fullscreen_notify (GObject *object,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
#define DEFAULT_IMAGE_TITLE_FORMAT "%f-%p.%i (%t, %L) %z%%"
|
#define DEFAULT_IMAGE_TITLE_FORMAT "%f-%p.%i (%t, %L) %z%%"
|
||||||
#define DEFAULT_IMAGE_STATUS_FORMAT "%n (%m)"
|
#define DEFAULT_IMAGE_STATUS_FORMAT "%n (%m)"
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
@ -73,18 +86,8 @@ enum
|
||||||
PROP_MONITOR_YRESOLUTION,
|
PROP_MONITOR_YRESOLUTION,
|
||||||
PROP_MONITOR_RES_FROM_GDK,
|
PROP_MONITOR_RES_FROM_GDK,
|
||||||
PROP_NAV_PREVIEW_SIZE,
|
PROP_NAV_PREVIEW_SIZE,
|
||||||
PROP_SHOW_MENUBAR,
|
PROP_DEFAULT_VIEW,
|
||||||
PROP_SHOW_RULERS,
|
PROP_DEFAULT_FULLSCREEN_VIEW
|
||||||
PROP_SHOW_SCROLLBARS,
|
|
||||||
PROP_SHOW_STATUSBAR,
|
|
||||||
PROP_CANVAS_PADDING_MODE,
|
|
||||||
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;
|
static GObjectClass *parent_class = NULL;
|
||||||
|
@ -107,7 +110,7 @@ gimp_display_config_get_type (void)
|
||||||
NULL, /* class_data */
|
NULL, /* class_data */
|
||||||
sizeof (GimpDisplayConfig),
|
sizeof (GimpDisplayConfig),
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
NULL /* instance_init */
|
(GInstanceInitFunc) gimp_display_config_init
|
||||||
};
|
};
|
||||||
|
|
||||||
config_type = g_type_register_static (GIMP_TYPE_CORE_CONFIG,
|
config_type = g_type_register_static (GIMP_TYPE_CORE_CONFIG,
|
||||||
|
@ -218,77 +221,50 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
||||||
GIMP_PREVIEW_SIZE_MEDIUM,
|
GIMP_PREVIEW_SIZE_MEDIUM,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR,
|
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_VIEW,
|
||||||
"show-menubar", SHOW_MENUBAR_BLURB,
|
"default-view",
|
||||||
TRUE,
|
DEFAULT_VIEW_BLURB,
|
||||||
0);
|
GIMP_TYPE_DISPLAY_OPTIONS,
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS,
|
GIMP_PARAM_AGGREGATE);
|
||||||
"show-rulers", SHOW_RULERS_BLURB,
|
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_FULLSCREEN_VIEW,
|
||||||
TRUE,
|
"default-fullscreen-view",
|
||||||
0);
|
DEFAULT_FULLSCREEN_VIEW_BLURB,
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS,
|
GIMP_TYPE_DISPLAY_OPTIONS,
|
||||||
"show-scrollbars", SHOW_SCROLLBARS_BLURB,
|
GIMP_PARAM_AGGREGATE);
|
||||||
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,
|
|
||||||
GIMP_TYPE_DISPLAY_PADDING_MODE,
|
|
||||||
GIMP_DISPLAY_PADDING_MODE_DEFAULT,
|
|
||||||
0);
|
|
||||||
GIMP_CONFIG_INSTALL_PROP_COLOR (object_class, PROP_CANVAS_PADDING_COLOR,
|
|
||||||
"canvas-padding-color",
|
|
||||||
CANVAS_PADDING_COLOR_BLURB,
|
|
||||||
&white,
|
|
||||||
0);
|
|
||||||
|
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_MENUBAR,
|
static void
|
||||||
"fullscreen-show-menubar",
|
gimp_display_config_init (GimpDisplayConfig *config)
|
||||||
FS_SHOW_MENUBAR_BLURB,
|
{
|
||||||
FALSE,
|
config->default_view =
|
||||||
0);
|
g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_RULERS,
|
|
||||||
"fullscreen-show-rulers",
|
g_signal_connect (config->default_view, "notify",
|
||||||
FS_SHOW_RULERS_BLURB,
|
G_CALLBACK (gimp_display_config_view_notify),
|
||||||
FALSE,
|
config);
|
||||||
0);
|
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_SCROLLBARS,
|
config->default_fullscreen_view =
|
||||||
"fullscreen-show-scrollbars",
|
g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
|
||||||
FS_SHOW_SCROLLBARS_BLURB,
|
|
||||||
FALSE,
|
g_signal_connect (config->default_fullscreen_view, "notify",
|
||||||
0);
|
G_CALLBACK (gimp_display_config_fullscreen_notify),
|
||||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FS_SHOW_STATUSBAR,
|
config);
|
||||||
"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
|
static void
|
||||||
gimp_display_config_finalize (GObject *object)
|
gimp_display_config_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *display_config;
|
GimpDisplayConfig *display_config = GIMP_DISPLAY_CONFIG (object);
|
||||||
|
|
||||||
display_config = GIMP_DISPLAY_CONFIG (object);
|
|
||||||
|
|
||||||
g_free (display_config->image_title_format);
|
g_free (display_config->image_title_format);
|
||||||
g_free (display_config->image_status_format);
|
g_free (display_config->image_status_format);
|
||||||
|
|
||||||
|
if (display_config->default_view)
|
||||||
|
g_object_unref (display_config->default_view);
|
||||||
|
|
||||||
|
if (display_config->default_fullscreen_view)
|
||||||
|
g_object_unref (display_config->default_fullscreen_view);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,9 +274,7 @@ gimp_display_config_set_property (GObject *object,
|
||||||
const GValue *value,
|
const GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *display_config;
|
GimpDisplayConfig *display_config = GIMP_DISPLAY_CONFIG (object);
|
||||||
|
|
||||||
display_config = GIMP_DISPLAY_CONFIG (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
|
@ -357,43 +331,15 @@ gimp_display_config_set_property (GObject *object,
|
||||||
case PROP_NAV_PREVIEW_SIZE:
|
case PROP_NAV_PREVIEW_SIZE:
|
||||||
display_config->nav_preview_size = g_value_get_enum (value);
|
display_config->nav_preview_size = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
|
case PROP_DEFAULT_VIEW:
|
||||||
case PROP_SHOW_MENUBAR:
|
if (g_value_get_object (value))
|
||||||
display_config->show_menubar = g_value_get_boolean (value);
|
gimp_config_sync (GIMP_CONFIG (g_value_get_object (value)),
|
||||||
|
GIMP_CONFIG (display_config->default_view), 0);
|
||||||
break;
|
break;
|
||||||
case PROP_SHOW_RULERS:
|
case PROP_DEFAULT_FULLSCREEN_VIEW:
|
||||||
display_config->show_rulers = g_value_get_boolean (value);
|
if (g_value_get_object (value))
|
||||||
break;
|
gimp_config_sync (GIMP_CONFIG (g_value_get_object (value)),
|
||||||
case PROP_SHOW_SCROLLBARS:
|
GIMP_CONFIG (display_config->default_fullscreen_view), 0);
|
||||||
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;
|
|
||||||
case PROP_CANVAS_PADDING_COLOR:
|
|
||||||
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -408,9 +354,7 @@ gimp_display_config_get_property (GObject *object,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *display_config;
|
GimpDisplayConfig *display_config = GIMP_DISPLAY_CONFIG (object);
|
||||||
|
|
||||||
display_config = GIMP_DISPLAY_CONFIG (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
|
@ -465,43 +409,11 @@ gimp_display_config_get_property (GObject *object,
|
||||||
case PROP_NAV_PREVIEW_SIZE:
|
case PROP_NAV_PREVIEW_SIZE:
|
||||||
g_value_set_enum (value, display_config->nav_preview_size);
|
g_value_set_enum (value, display_config->nav_preview_size);
|
||||||
break;
|
break;
|
||||||
|
case PROP_DEFAULT_VIEW:
|
||||||
case PROP_SHOW_MENUBAR:
|
g_value_set_object (value, display_config->default_view);
|
||||||
g_value_set_boolean (value, display_config->show_menubar);
|
|
||||||
break;
|
break;
|
||||||
case PROP_SHOW_RULERS:
|
case PROP_DEFAULT_FULLSCREEN_VIEW:
|
||||||
g_value_set_boolean (value, display_config->show_rulers);
|
g_value_set_object (value, display_config->default_fullscreen_view);
|
||||||
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;
|
|
||||||
case PROP_CANVAS_PADDING_COLOR:
|
|
||||||
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -509,3 +421,19 @@ gimp_display_config_get_property (GObject *object,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_config_view_notify (GObject *object,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
g_object_notify (G_OBJECT (data), "default-view");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_config_fullscreen_notify (GObject *object,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
g_object_notify (G_OBJECT (data), "default-fullscreen-view");
|
||||||
|
}
|
||||||
|
|
|
@ -57,20 +57,8 @@ struct _GimpDisplayConfig
|
||||||
gdouble monitor_yres;
|
gdouble monitor_yres;
|
||||||
gboolean monitor_res_from_gdk;
|
gboolean monitor_res_from_gdk;
|
||||||
GimpPreviewSize nav_preview_size;
|
GimpPreviewSize nav_preview_size;
|
||||||
|
GimpDisplayOptions *default_view;
|
||||||
gboolean show_menubar;
|
GimpDisplayOptions *default_fullscreen_view;
|
||||||
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
|
struct _GimpDisplayConfigClass
|
||||||
|
|
|
@ -79,6 +79,12 @@ N_("Tools such as fuzzy-select and bucket fill find regions based on a " \
|
||||||
"intensity from the original is greater than a specified threshold. " \
|
"intensity from the original is greater than a specified threshold. " \
|
||||||
"This value represents the default threshold.")
|
"This value represents the default threshold.")
|
||||||
|
|
||||||
|
#define DEFAULT_VIEW_BLURB \
|
||||||
|
"Sets the default settings for the image view."
|
||||||
|
|
||||||
|
#define DEFAULT_FULLSCREEN_VIEW_BLURB \
|
||||||
|
"Sets the default settings used when an image is viewed in fullscreen mode."
|
||||||
|
|
||||||
#define ENVIRON_PATH_BLURB \
|
#define ENVIRON_PATH_BLURB \
|
||||||
"Sets the environ search path."
|
"Sets the environ search path."
|
||||||
|
|
||||||
|
|
|
@ -573,7 +573,7 @@ prefs_format_string_select_callback (GtkTreeSelection *sel,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
prefs_frame_new (gchar *label,
|
prefs_frame_new (const gchar *label,
|
||||||
GtkContainer *parent,
|
GtkContainer *parent,
|
||||||
gboolean expand)
|
gboolean expand)
|
||||||
{
|
{
|
||||||
|
@ -812,6 +812,41 @@ prefs_memsize_entry_add (GObject *config,
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
prefs_display_options_frame_add (Gimp *gimp,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *label,
|
||||||
|
GtkContainer *parent)
|
||||||
|
{
|
||||||
|
GtkBox *box;
|
||||||
|
GtkWidget *table;
|
||||||
|
GtkWidget *button;
|
||||||
|
|
||||||
|
box = GTK_BOX (prefs_frame_new (label, parent, FALSE));
|
||||||
|
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-menubar", _("Show Menubar"), box);
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-rulers", _("Show _Rulers"), box);
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-scrollbars", _("Show Scrollbars"), box);
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-statusbar", _("Show S_tatusbar"), box);
|
||||||
|
|
||||||
|
table = prefs_table_new (2, GTK_CONTAINER (box), FALSE);
|
||||||
|
|
||||||
|
prefs_enum_option_menu_add (object, "padding-mode", 0, 0,
|
||||||
|
_("Canvas Padding Mode:"), GTK_TABLE (table), 0);
|
||||||
|
|
||||||
|
button = prefs_color_button_add (object, "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));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prefs_help_func (const gchar *help_id,
|
prefs_help_func (const gchar *help_id,
|
||||||
gpointer help_data)
|
gpointer help_data)
|
||||||
|
@ -1380,63 +1415,15 @@ prefs_dialog_new (Gimp *gimp,
|
||||||
&grandchild_iter,
|
&grandchild_iter,
|
||||||
page_index++);
|
page_index++);
|
||||||
|
|
||||||
/* Normal Mode */
|
prefs_display_options_frame_add (gimp,
|
||||||
vbox2 = prefs_frame_new (_("Default Appearance in Normal Mode"),
|
G_OBJECT (display_config->default_view),
|
||||||
GTK_CONTAINER (vbox), FALSE);
|
_("Default Appearance in Normal Mode"),
|
||||||
|
GTK_CONTAINER (vbox));
|
||||||
|
|
||||||
prefs_check_button_add (object, "show-menubar",
|
prefs_display_options_frame_add (gimp,
|
||||||
_("Show Menubar"),
|
G_OBJECT (display_config->default_fullscreen_view),
|
||||||
GTK_BOX (vbox2));
|
_("Default Appearance in Fullscreen Mode"),
|
||||||
prefs_check_button_add (object, "show-rulers",
|
GTK_CONTAINER (vbox));
|
||||||
_("Show _Rulers"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "show-scrollbars",
|
|
||||||
_("Show Scrollbars"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "show-statusbar",
|
|
||||||
_("Show S_tatusbar"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
|
|
||||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
|
||||||
|
|
||||||
prefs_enum_option_menu_add (object, "canvas-padding-mode", 0, 0,
|
|
||||||
_("Canvas Padding Mode:"),
|
|
||||||
GTK_TABLE (table), 0);
|
|
||||||
button = prefs_color_button_add (object, "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 (object, "fullscreen-show-menubar",
|
|
||||||
_("Show Menubar"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "fullscreen-show-rulers",
|
|
||||||
_("Show _Rulers"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "fullscreen-show-scrollbars",
|
|
||||||
_("Show Scrollbars"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "fullscreen-show-statusbar",
|
|
||||||
_("Show S_tatusbar"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
|
|
||||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
|
||||||
|
|
||||||
prefs_enum_option_menu_add (object, "fullscreen-canvas-padding-mode", 0, 0,
|
|
||||||
_("Canvas Padding Mode:"),
|
|
||||||
GTK_TABLE (table), 0);
|
|
||||||
button = prefs_color_button_add (object, "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));
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
|
@ -18,6 +18,8 @@ libappdisplay_a_sources = \
|
||||||
display-types.h \
|
display-types.h \
|
||||||
gimpdisplay.c \
|
gimpdisplay.c \
|
||||||
gimpdisplay.h \
|
gimpdisplay.h \
|
||||||
|
gimpdisplayoptions.c \
|
||||||
|
gimpdisplayoptions.h \
|
||||||
gimpdisplay-area.c \
|
gimpdisplay-area.c \
|
||||||
gimpdisplay-area.h \
|
gimpdisplay-area.h \
|
||||||
gimpdisplay-foreach.c \
|
gimpdisplay-foreach.c \
|
||||||
|
|
|
@ -28,22 +28,22 @@ gimp_cursor_mode_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const GEnumValue gimp_display_padding_mode_enum_values[] =
|
static const GEnumValue gimp_canvas_padding_mode_enum_values[] =
|
||||||
{
|
{
|
||||||
{ GIMP_DISPLAY_PADDING_MODE_DEFAULT, N_("From Theme"), "default" },
|
{ GIMP_CANVAS_PADDING_MODE_DEFAULT, N_("From Theme"), "default" },
|
||||||
{ GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK, N_("Light Check Color"), "light-check" },
|
{ GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, N_("Light Check Color"), "light-check" },
|
||||||
{ GIMP_DISPLAY_PADDING_MODE_DARK_CHECK, N_("Dark Check Color"), "dark-check" },
|
{ GIMP_CANVAS_PADDING_MODE_DARK_CHECK, N_("Dark Check Color"), "dark-check" },
|
||||||
{ GIMP_DISPLAY_PADDING_MODE_CUSTOM, N_("Custom Color"), "custom" },
|
{ GIMP_CANVAS_PADDING_MODE_CUSTOM, N_("Custom Color"), "custom" },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gimp_display_padding_mode_get_type (void)
|
gimp_canvas_padding_mode_get_type (void)
|
||||||
{
|
{
|
||||||
static GType enum_type = 0;
|
static GType enum_type = 0;
|
||||||
|
|
||||||
if (!enum_type)
|
if (!enum_type)
|
||||||
enum_type = g_enum_register_static ("GimpDisplayPaddingMode", gimp_display_padding_mode_enum_values);
|
enum_type = g_enum_register_static ("GimpCanvasPaddingMode", gimp_canvas_padding_mode_enum_values);
|
||||||
|
|
||||||
return enum_type;
|
return enum_type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,17 +32,17 @@ typedef enum
|
||||||
} GimpCursorMode;
|
} GimpCursorMode;
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_DISPLAY_PADDING_MODE (gimp_display_padding_mode_get_type ())
|
#define GIMP_TYPE_CANVAS_PADDING_MODE (gimp_canvas_padding_mode_get_type ())
|
||||||
|
|
||||||
GType gimp_display_padding_mode_get_type (void) G_GNUC_CONST;
|
GType gimp_canvas_padding_mode_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GIMP_DISPLAY_PADDING_MODE_DEFAULT, /*< desc="From Theme" >*/
|
GIMP_CANVAS_PADDING_MODE_DEFAULT, /*< desc="From Theme" >*/
|
||||||
GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK, /*< desc="Light Check Color" >*/
|
GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, /*< desc="Light Check Color" >*/
|
||||||
GIMP_DISPLAY_PADDING_MODE_DARK_CHECK, /*< desc="Dark Check Color" >*/
|
GIMP_CANVAS_PADDING_MODE_DARK_CHECK, /*< desc="Dark Check Color" >*/
|
||||||
GIMP_DISPLAY_PADDING_MODE_CUSTOM /*< desc="Custom Color" >*/
|
GIMP_CANVAS_PADDING_MODE_CUSTOM /*< desc="Custom Color" >*/
|
||||||
} GimpDisplayPaddingMode;
|
} GimpCanvasPaddingMode;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __DISPLAY_ENUMS_H__ */
|
#endif /* __DISPLAY_ENUMS_H__ */
|
||||||
|
|
|
@ -0,0 +1,353 @@
|
||||||
|
/* The GIMP -- an image manipulation program
|
||||||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* GimpDisplayOptions
|
||||||
|
* Copyright (C) 2003 Sven Neumann <sven@gimp.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
#include "libgimpbase/gimpbase.h"
|
||||||
|
#include "libgimpmath/gimpmath.h"
|
||||||
|
#include "libgimpcolor/gimpcolor.h"
|
||||||
|
|
||||||
|
#include "core/core-types.h"
|
||||||
|
#include "display-enums.h"
|
||||||
|
|
||||||
|
#include "config/gimpconfig.h"
|
||||||
|
#include "config/gimpconfig.h"
|
||||||
|
#include "config/gimpconfig-params.h"
|
||||||
|
#include "config/gimprc-blurbs.h"
|
||||||
|
|
||||||
|
#include "gimpdisplayoptions.h"
|
||||||
|
|
||||||
|
#include "gimp-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_SHOW_MENUBAR,
|
||||||
|
PROP_SHOW_RULERS,
|
||||||
|
PROP_SHOW_SCROLLBARS,
|
||||||
|
PROP_SHOW_STATUSBAR,
|
||||||
|
PROP_SHOW_SELECTION,
|
||||||
|
PROP_SHOW_ACTIVE_LAYER,
|
||||||
|
PROP_SHOW_GUIDES,
|
||||||
|
PROP_SHOW_GRID,
|
||||||
|
PROP_PADDING_MODE,
|
||||||
|
PROP_PADDING_COLOR
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static void gimp_display_options_class_init (GimpDisplayOptionsClass *klass);
|
||||||
|
static void gimp_display_options_fs_class_init (GimpDisplayOptionsClass *klass);
|
||||||
|
static void gimp_display_options_init (GimpDisplayOptions *options);
|
||||||
|
|
||||||
|
static void gimp_display_options_set_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
static void gimp_display_options_get_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
|
||||||
|
|
||||||
|
GType
|
||||||
|
gimp_display_options_get_type (void)
|
||||||
|
{
|
||||||
|
static GType options_type = 0;
|
||||||
|
|
||||||
|
if (! options_type)
|
||||||
|
{
|
||||||
|
static const GTypeInfo options_info =
|
||||||
|
{
|
||||||
|
sizeof (GimpDisplayOptionsClass),
|
||||||
|
(GBaseInitFunc) NULL,
|
||||||
|
(GBaseFinalizeFunc) NULL,
|
||||||
|
(GClassInitFunc) gimp_display_options_class_init,
|
||||||
|
NULL, /* class_finalize */
|
||||||
|
NULL, /* class_data */
|
||||||
|
sizeof (GimpDisplayOptions),
|
||||||
|
0, /* n_preallocs */
|
||||||
|
(GInstanceInitFunc) gimp_display_options_init
|
||||||
|
};
|
||||||
|
static const GInterfaceInfo config_iface_info =
|
||||||
|
{
|
||||||
|
NULL, /* iface_init */
|
||||||
|
NULL, /* iface_finalize */
|
||||||
|
NULL /* iface_data */
|
||||||
|
};
|
||||||
|
|
||||||
|
options_type = g_type_register_static (G_TYPE_OBJECT,
|
||||||
|
"GimpDisplayOptions",
|
||||||
|
&options_info, 0);
|
||||||
|
|
||||||
|
g_type_add_interface_static (options_type, GIMP_TYPE_CONFIG,
|
||||||
|
&config_iface_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return options_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
gimp_display_options_fullscreen_get_type (void)
|
||||||
|
{
|
||||||
|
static GType options_type = 0;
|
||||||
|
|
||||||
|
if (! options_type)
|
||||||
|
{
|
||||||
|
static const GTypeInfo options_info =
|
||||||
|
{
|
||||||
|
sizeof (GimpDisplayOptionsClass),
|
||||||
|
(GBaseInitFunc) NULL,
|
||||||
|
(GBaseFinalizeFunc) NULL,
|
||||||
|
(GClassInitFunc) gimp_display_options_fs_class_init,
|
||||||
|
NULL, /* class_finalize */
|
||||||
|
NULL, /* class_data */
|
||||||
|
sizeof (GimpDisplayOptions),
|
||||||
|
0, /* n_preallocs */
|
||||||
|
NULL /* instance_init */
|
||||||
|
};
|
||||||
|
static const GInterfaceInfo config_iface_info =
|
||||||
|
{
|
||||||
|
NULL, /* iface_init */
|
||||||
|
NULL, /* iface_finalize */
|
||||||
|
NULL /* iface_data */
|
||||||
|
};
|
||||||
|
|
||||||
|
options_type = g_type_register_static (GIMP_TYPE_DISPLAY_OPTIONS,
|
||||||
|
"GimpDisplayOptionsFullscreen",
|
||||||
|
&options_info, 0);
|
||||||
|
|
||||||
|
g_type_add_interface_static (options_type, GIMP_TYPE_CONFIG,
|
||||||
|
&config_iface_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return options_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
GimpRGB white;
|
||||||
|
|
||||||
|
gimp_rgba_set (&white, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
|
||||||
|
|
||||||
|
object_class->set_property = gimp_display_options_set_property;
|
||||||
|
object_class->get_property = gimp_display_options_get_property;
|
||||||
|
|
||||||
|
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_SHOW_SELECTION,
|
||||||
|
"show-selection", NULL,
|
||||||
|
TRUE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_ACTIVE_LAYER,
|
||||||
|
"show-active-layer", NULL,
|
||||||
|
TRUE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES,
|
||||||
|
"show-guides", NULL,
|
||||||
|
TRUE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID,
|
||||||
|
"show-grid", NULL,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE,
|
||||||
|
"padding-mode", CANVAS_PADDING_MODE_BLURB,
|
||||||
|
GIMP_TYPE_CANVAS_PADDING_MODE,
|
||||||
|
GIMP_CANVAS_PADDING_MODE_DEFAULT,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_COLOR (object_class, PROP_PADDING_COLOR,
|
||||||
|
"padding-color", CANVAS_PADDING_COLOR_BLURB,
|
||||||
|
&white,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_options_fs_class_init (GimpDisplayOptionsClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
GimpRGB black;
|
||||||
|
|
||||||
|
gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
|
||||||
|
|
||||||
|
object_class->set_property = gimp_display_options_set_property;
|
||||||
|
object_class->get_property = gimp_display_options_get_property;
|
||||||
|
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR,
|
||||||
|
"show-menubar", FS_SHOW_MENUBAR_BLURB,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS,
|
||||||
|
"show-rulers", FS_SHOW_RULERS_BLURB,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS,
|
||||||
|
"show-scrollbars", FS_SHOW_SCROLLBARS_BLURB,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
|
||||||
|
"show-statusbar", FS_SHOW_STATUSBAR_BLURB,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION,
|
||||||
|
"show-selection", NULL,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_ACTIVE_LAYER,
|
||||||
|
"show-active-layer", NULL,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES,
|
||||||
|
"show-guides", NULL,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID,
|
||||||
|
"show-grid", NULL,
|
||||||
|
FALSE,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE,
|
||||||
|
"padding-mode", FS_CANVAS_PADDING_MODE_BLURB,
|
||||||
|
GIMP_TYPE_CANVAS_PADDING_MODE,
|
||||||
|
GIMP_CANVAS_PADDING_MODE_CUSTOM,
|
||||||
|
0);
|
||||||
|
GIMP_CONFIG_INSTALL_PROP_COLOR (object_class, PROP_PADDING_COLOR,
|
||||||
|
"padding-color", FS_CANVAS_PADDING_COLOR_BLURB,
|
||||||
|
&black,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_options_init (GimpDisplayOptions *options)
|
||||||
|
{
|
||||||
|
options->padding_mode_set = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_options_set_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GimpDisplayOptions *options = GIMP_DISPLAY_OPTIONS (object);
|
||||||
|
|
||||||
|
switch (property_id)
|
||||||
|
{
|
||||||
|
case PROP_SHOW_MENUBAR:
|
||||||
|
options->show_menubar = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_RULERS:
|
||||||
|
options->show_rulers = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_SCROLLBARS:
|
||||||
|
options->show_scrollbars = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_STATUSBAR:
|
||||||
|
options->show_statusbar = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_SELECTION:
|
||||||
|
options->show_selection = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_ACTIVE_LAYER:
|
||||||
|
options->show_active_layer = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_GUIDES:
|
||||||
|
options->show_guides = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_GRID:
|
||||||
|
options->show_grid = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_PADDING_MODE:
|
||||||
|
options->padding_mode = g_value_get_enum (value);
|
||||||
|
break;
|
||||||
|
case PROP_PADDING_COLOR:
|
||||||
|
options->padding_color = *(GimpRGB *) g_value_get_boxed (value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_options_get_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GimpDisplayOptions *options = GIMP_DISPLAY_OPTIONS (object);
|
||||||
|
|
||||||
|
switch (property_id)
|
||||||
|
{
|
||||||
|
case PROP_SHOW_MENUBAR:
|
||||||
|
g_value_set_boolean (value, options->show_menubar);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_RULERS:
|
||||||
|
g_value_set_boolean (value, options->show_rulers);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_SCROLLBARS:
|
||||||
|
g_value_set_boolean (value, options->show_scrollbars);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_STATUSBAR:
|
||||||
|
g_value_set_boolean (value, options->show_statusbar);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_SELECTION:
|
||||||
|
g_value_set_boolean (value, options->show_selection);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_ACTIVE_LAYER:
|
||||||
|
g_value_set_boolean (value, options->show_active_layer);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_GUIDES:
|
||||||
|
g_value_set_boolean (value, options->show_guides);
|
||||||
|
break;
|
||||||
|
case PROP_SHOW_GRID:
|
||||||
|
g_value_set_boolean (value, options->show_grid);
|
||||||
|
break;
|
||||||
|
case PROP_PADDING_MODE:
|
||||||
|
g_value_set_enum (value, options->padding_mode);
|
||||||
|
break;
|
||||||
|
case PROP_PADDING_COLOR:
|
||||||
|
g_value_set_boxed (value, &options->padding_color);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
/* The GIMP -- an image manipulation program
|
||||||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* GimpDisplayOptions
|
||||||
|
* Copyright (C) 2003 Sven Neumann <sven@gimp.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GIMP_DISPLAY_OPTIONS_H__
|
||||||
|
#define __GIMP_DISPLAY_OPTIONS_H__
|
||||||
|
|
||||||
|
|
||||||
|
#define GIMP_TYPE_DISPLAY_OPTIONS (gimp_display_options_get_type ())
|
||||||
|
#define GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN (gimp_display_options_fullscreen_get_type ())
|
||||||
|
|
||||||
|
#define GIMP_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptions))
|
||||||
|
#define GIMP_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptionsClass))
|
||||||
|
#define GIMP_IS_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DISPLAY_OPTIONS))
|
||||||
|
#define GIMP_IS_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DISPLAY_OPTIONS))
|
||||||
|
#define GIMP_DISPLAY_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptionsClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsClass;
|
||||||
|
|
||||||
|
struct _GimpDisplayOptions
|
||||||
|
{
|
||||||
|
GObject parent_instance;
|
||||||
|
|
||||||
|
/* GimpDisplayShell options */
|
||||||
|
gboolean show_menubar;
|
||||||
|
gboolean show_rulers;
|
||||||
|
gboolean show_scrollbars;
|
||||||
|
gboolean show_statusbar;
|
||||||
|
|
||||||
|
/* GimpCanvas options */
|
||||||
|
gboolean show_selection;
|
||||||
|
gboolean show_active_layer;
|
||||||
|
gboolean show_guides;
|
||||||
|
gboolean show_grid;
|
||||||
|
GimpCanvasPaddingMode padding_mode;
|
||||||
|
GimpRGB padding_color;
|
||||||
|
gboolean padding_mode_set;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GimpDisplayOptionsClass
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GType gimp_display_options_get_type (void) G_GNUC_CONST;
|
||||||
|
GType gimp_display_options_fullscreen_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __GIMP_DISPLAY_OPTIONS_H__ */
|
|
@ -31,6 +31,7 @@
|
||||||
#include "widgets/gimpwidgets-utils.h"
|
#include "widgets/gimpwidgets-utils.h"
|
||||||
|
|
||||||
#include "gimpdisplay.h"
|
#include "gimpdisplay.h"
|
||||||
|
#include "gimpdisplayoptions.h"
|
||||||
#include "gimpdisplayshell.h"
|
#include "gimpdisplayshell.h"
|
||||||
#include "gimpdisplayshell-appearance.h"
|
#include "gimpdisplayshell-appearance.h"
|
||||||
#include "gimpdisplayshell-callbacks.h"
|
#include "gimpdisplayshell-callbacks.h"
|
||||||
|
@ -38,9 +39,8 @@
|
||||||
#include "gimpdisplayshell-render.h"
|
#include "gimpdisplayshell-render.h"
|
||||||
|
|
||||||
|
|
||||||
#define GET_APPEARANCE(shell) \
|
#define GET_OPTIONS(shell) (gimp_display_shell_get_fullscreen (shell) ? \
|
||||||
(gimp_display_shell_get_fullscreen (shell) ? \
|
shell->fullscreen_options : shell->options)
|
||||||
&shell->fullscreen_appearance : &shell->appearance)
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -67,18 +67,198 @@ gimp_display_shell_get_fullscreen (GimpDisplayShell *shell)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
|
gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
|
||||||
gboolean show)
|
gboolean show)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
|
GtkWidget *menubar;
|
||||||
|
GtkContainer *vbox;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
if (show != appearance->selection)
|
g_object_set (options, "show-menubar", show, NULL);
|
||||||
|
|
||||||
|
menubar = GTK_ITEM_FACTORY (shell->menubar_factory)->widget;
|
||||||
|
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
|
||||||
|
|
||||||
|
if (show)
|
||||||
|
gtk_widget_show (menubar);
|
||||||
|
else
|
||||||
|
gtk_widget_hide (menubar);
|
||||||
|
|
||||||
|
if (options->show_menubar || options->show_statusbar)
|
||||||
|
gtk_container_set_border_width (vbox, 2);
|
||||||
|
else
|
||||||
|
gtk_container_set_border_width (vbox, 0);
|
||||||
|
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||||
|
"/View/Show Menubar", show);
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
|
"/View/Show Menubar", show);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_display_shell_get_show_menubar (GimpDisplayShell *shell)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
|
return GET_OPTIONS (shell)->show_menubar;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
|
||||||
|
gboolean show)
|
||||||
|
{
|
||||||
|
GimpDisplayOptions *options;
|
||||||
|
GtkTable *table;
|
||||||
|
|
||||||
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
|
g_object_set (options, "show-rulers", show, NULL);
|
||||||
|
|
||||||
|
table = GTK_TABLE (shell->canvas->parent);
|
||||||
|
|
||||||
|
if (show)
|
||||||
{
|
{
|
||||||
appearance->selection = show ? TRUE : FALSE;
|
gtk_widget_show (shell->origin);
|
||||||
|
gtk_widget_show (shell->hrule);
|
||||||
|
gtk_widget_show (shell->vrule);
|
||||||
|
|
||||||
|
gtk_table_set_col_spacing (table, 0, 1);
|
||||||
|
gtk_table_set_row_spacing (table, 0, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_widget_hide (shell->origin);
|
||||||
|
gtk_widget_hide (shell->hrule);
|
||||||
|
gtk_widget_hide (shell->vrule);
|
||||||
|
|
||||||
|
gtk_table_set_col_spacing (table, 0, 0);
|
||||||
|
gtk_table_set_row_spacing (table, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||||
|
"/View/Show Rulers", show);
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
|
"/View/Show Rulers", show);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_display_shell_get_show_rulers (GimpDisplayShell *shell)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
|
return GET_OPTIONS (shell)->show_rulers;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
|
||||||
|
gboolean show)
|
||||||
|
{
|
||||||
|
GimpDisplayOptions *options;
|
||||||
|
GtkBox *hbox;
|
||||||
|
GtkBox *vbox;
|
||||||
|
|
||||||
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
|
g_object_set (options, "show-scrollbars", show, NULL);
|
||||||
|
|
||||||
|
hbox = GTK_BOX (shell->vsb->parent->parent);
|
||||||
|
vbox = GTK_BOX (shell->hsb->parent->parent);
|
||||||
|
|
||||||
|
if (show)
|
||||||
|
{
|
||||||
|
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_box_set_spacing (hbox, 1);
|
||||||
|
gtk_box_set_spacing (vbox, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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_box_set_spacing (hbox, 0);
|
||||||
|
gtk_box_set_spacing (vbox, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||||
|
"/View/Show Scrollbars", show);
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
|
"/View/Show Scrollbars", show);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
|
return GET_OPTIONS (shell)->show_scrollbars;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
|
||||||
|
gboolean show)
|
||||||
|
{
|
||||||
|
GimpDisplayOptions *options;
|
||||||
|
GtkContainer *vbox;
|
||||||
|
|
||||||
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
|
g_object_set (options, "show-statusbar", show, NULL);
|
||||||
|
|
||||||
|
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
|
||||||
|
|
||||||
|
if (show)
|
||||||
|
gtk_widget_show (shell->statusbar);
|
||||||
|
else
|
||||||
|
gtk_widget_hide (shell->statusbar);
|
||||||
|
|
||||||
|
if (options->show_menubar || options->show_statusbar)
|
||||||
|
gtk_container_set_border_width (vbox, 2);
|
||||||
|
else
|
||||||
|
gtk_container_set_border_width (vbox, 0);
|
||||||
|
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||||
|
"/View/Show Statusbar", show);
|
||||||
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
|
"/View/Show Statusbar", show);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
|
return GET_OPTIONS (shell)->show_statusbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
|
||||||
|
gboolean show)
|
||||||
|
{
|
||||||
|
GimpDisplayOptions *options;
|
||||||
|
|
||||||
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
|
g_object_set (options, "show-selection", show, NULL);
|
||||||
|
|
||||||
if (shell->select)
|
if (shell->select)
|
||||||
gimp_display_shell_selection_set_hidden (shell->select, ! show);
|
gimp_display_shell_selection_set_hidden (shell->select, ! show);
|
||||||
|
@ -87,7 +267,6 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
|
||||||
"/View/Show Selection", show);
|
"/View/Show Selection", show);
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
"/View/Show Selection", show);
|
"/View/Show Selection", show);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -95,22 +274,20 @@ gimp_display_shell_get_show_selection (GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->selection;
|
return GET_OPTIONS (shell)->show_selection;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
|
gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
|
||||||
gboolean show)
|
gboolean show)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
if (show != appearance->active_layer)
|
g_object_set (options, "show-active-layer", show, NULL);
|
||||||
{
|
|
||||||
appearance->active_layer = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
if (shell->select)
|
if (shell->select)
|
||||||
gimp_display_shell_selection_layer_set_hidden (shell->select, ! show);
|
gimp_display_shell_selection_layer_set_hidden (shell->select, ! show);
|
||||||
|
@ -119,7 +296,6 @@ gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
|
||||||
"/View/Show Layer Boundary", show);
|
"/View/Show Layer Boundary", show);
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
"/View/Show Layer Boundary", show);
|
"/View/Show Layer Boundary", show);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -127,22 +303,20 @@ gimp_display_shell_get_show_layer (GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->active_layer;
|
return GET_OPTIONS (shell)->show_active_layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
|
gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
|
||||||
gboolean show)
|
gboolean show)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
if (show != appearance->grid)
|
g_object_set (options, "show-grid", show, NULL);
|
||||||
{
|
|
||||||
appearance->grid = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
if (shell->gdisp->gimage->grid)
|
if (shell->gdisp->gimage->grid)
|
||||||
gimp_display_shell_expose_full (shell);
|
gimp_display_shell_expose_full (shell);
|
||||||
|
@ -151,7 +325,6 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
|
||||||
"/View/Show Grid", show);
|
"/View/Show Grid", show);
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
"/View/Show Grid", show);
|
"/View/Show Grid", show);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -159,7 +332,7 @@ gimp_display_shell_get_show_grid (GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->grid;
|
return GET_OPTIONS (shell)->show_grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -191,15 +364,13 @@ void
|
||||||
gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
|
gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
|
||||||
gboolean show)
|
gboolean show)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
if (show != appearance->guides)
|
g_object_set (options, "show-guides", show, NULL);
|
||||||
{
|
|
||||||
appearance->guides = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
if (shell->gdisp->gimage->guides)
|
if (shell->gdisp->gimage->guides)
|
||||||
gimp_display_shell_expose_full (shell);
|
gimp_display_shell_expose_full (shell);
|
||||||
|
@ -208,7 +379,6 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
|
||||||
"/View/Show Guides", show);
|
"/View/Show Guides", show);
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
||||||
"/View/Show Guides", show);
|
"/View/Show Guides", show);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -216,268 +386,68 @@ gimp_display_shell_get_show_guides (GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->guides;
|
return GET_OPTIONS (shell)->show_guides;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
|
|
||||||
gboolean show)
|
|
||||||
{
|
|
||||||
GimpDisplayShellAppearance *appearance;
|
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
|
||||||
|
|
||||||
if (show != appearance->menubar)
|
|
||||||
{
|
|
||||||
GtkWidget *menubar;
|
|
||||||
GtkContainer *vbox;
|
|
||||||
|
|
||||||
menubar = GTK_ITEM_FACTORY (shell->menubar_factory)->widget;
|
|
||||||
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
gtk_widget_show (menubar);
|
|
||||||
else
|
|
||||||
gtk_widget_hide (menubar);
|
|
||||||
|
|
||||||
appearance->menubar = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
if (appearance->menubar || appearance->statusbar)
|
|
||||||
gtk_container_set_border_width (vbox, 2);
|
|
||||||
else
|
|
||||||
gtk_container_set_border_width (vbox, 0);
|
|
||||||
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
|
||||||
"/View/Show Menubar", show);
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
|
||||||
"/View/Show Menubar", show);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gimp_display_shell_get_show_menubar (GimpDisplayShell *shell)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->menubar;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
|
|
||||||
gboolean show)
|
|
||||||
{
|
|
||||||
GimpDisplayShellAppearance *appearance;
|
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
|
||||||
|
|
||||||
if (show != appearance->rulers)
|
|
||||||
{
|
|
||||||
GtkTable *table;
|
|
||||||
|
|
||||||
table = GTK_TABLE (shell->canvas->parent);
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
{
|
|
||||||
gtk_widget_show (shell->origin);
|
|
||||||
gtk_widget_show (shell->hrule);
|
|
||||||
gtk_widget_show (shell->vrule);
|
|
||||||
|
|
||||||
gtk_table_set_col_spacing (table, 0, 1);
|
|
||||||
gtk_table_set_row_spacing (table, 0, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gtk_widget_hide (shell->origin);
|
|
||||||
gtk_widget_hide (shell->hrule);
|
|
||||||
gtk_widget_hide (shell->vrule);
|
|
||||||
|
|
||||||
gtk_table_set_col_spacing (table, 0, 0);
|
|
||||||
gtk_table_set_row_spacing (table, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
appearance->rulers = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
|
||||||
"/View/Show Rulers", show);
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
|
||||||
"/View/Show Rulers", show);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gimp_display_shell_get_show_rulers (GimpDisplayShell *shell)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->rulers;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
|
|
||||||
gboolean show)
|
|
||||||
{
|
|
||||||
GimpDisplayShellAppearance *appearance;
|
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
|
||||||
|
|
||||||
if (show != appearance->scrollbars)
|
|
||||||
{
|
|
||||||
GtkBox *hbox;
|
|
||||||
GtkBox *vbox;
|
|
||||||
|
|
||||||
hbox = GTK_BOX (shell->vsb->parent->parent);
|
|
||||||
vbox = GTK_BOX (shell->hsb->parent->parent);
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
{
|
|
||||||
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_box_set_spacing (hbox, 1);
|
|
||||||
gtk_box_set_spacing (vbox, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
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_box_set_spacing (hbox, 0);
|
|
||||||
gtk_box_set_spacing (vbox, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
appearance->scrollbars = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
|
||||||
"/View/Show Scrollbars", show);
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
|
||||||
"/View/Show Scrollbars", show);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->scrollbars;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
|
|
||||||
gboolean show)
|
|
||||||
{
|
|
||||||
GimpDisplayShellAppearance *appearance;
|
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
|
||||||
|
|
||||||
if (show != appearance->statusbar)
|
|
||||||
{
|
|
||||||
GtkContainer *vbox;
|
|
||||||
|
|
||||||
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
gtk_widget_show (shell->statusbar);
|
|
||||||
else
|
|
||||||
gtk_widget_hide (shell->statusbar);
|
|
||||||
|
|
||||||
appearance->statusbar = show ? TRUE : FALSE;
|
|
||||||
|
|
||||||
if (appearance->menubar || appearance->statusbar)
|
|
||||||
gtk_container_set_border_width (vbox, 2);
|
|
||||||
else
|
|
||||||
gtk_container_set_border_width (vbox, 0);
|
|
||||||
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
|
||||||
"/View/Show Statusbar", show);
|
|
||||||
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
|
|
||||||
"/View/Show Statusbar", show);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
|
||||||
|
|
||||||
return GET_APPEARANCE (shell)->statusbar;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||||
GimpDisplayPaddingMode padding_mode,
|
GimpCanvasPaddingMode padding_mode,
|
||||||
const GimpRGB *padding_color)
|
const GimpRGB *padding_color)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
guchar r, g, b;
|
GimpRGB color = *padding_color;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
g_return_if_fail (padding_color != NULL);
|
g_return_if_fail (padding_color != NULL);
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
appearance->padding_mode = padding_mode;
|
switch (padding_mode)
|
||||||
|
|
||||||
switch (appearance->padding_mode)
|
|
||||||
{
|
{
|
||||||
case GIMP_DISPLAY_PADDING_MODE_DEFAULT:
|
case GIMP_CANVAS_PADDING_MODE_DEFAULT:
|
||||||
if (shell->canvas)
|
if (shell->canvas)
|
||||||
{
|
{
|
||||||
gtk_widget_ensure_style (shell->canvas);
|
gtk_widget_ensure_style (shell->canvas);
|
||||||
|
gimp_rgb_set_gdk_color (&color,
|
||||||
r = shell->canvas->style->bg[GTK_STATE_NORMAL].red >> 8;
|
shell->canvas->style->bg + GTK_STATE_NORMAL);
|
||||||
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;
|
break;
|
||||||
|
|
||||||
case GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK:
|
case GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK:
|
||||||
gimp_rgb_set_uchar (&appearance->padding_color,
|
gimp_rgb_set_uchar (&color,
|
||||||
render_blend_light_check[0],
|
render_blend_light_check[0],
|
||||||
render_blend_light_check[1],
|
render_blend_light_check[1],
|
||||||
render_blend_light_check[2]);
|
render_blend_light_check[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_DISPLAY_PADDING_MODE_DARK_CHECK:
|
case GIMP_CANVAS_PADDING_MODE_DARK_CHECK:
|
||||||
gimp_rgb_set_uchar (&appearance->padding_color,
|
gimp_rgb_set_uchar (&color,
|
||||||
render_blend_dark_check[0],
|
render_blend_dark_check[0],
|
||||||
render_blend_dark_check[1],
|
render_blend_dark_check[1],
|
||||||
render_blend_dark_check[2]);
|
render_blend_dark_check[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_DISPLAY_PADDING_MODE_CUSTOM:
|
case GIMP_CANVAS_PADDING_MODE_CUSTOM:
|
||||||
appearance->padding_color = *padding_color;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_object_set (options,
|
||||||
|
"padding-mode", padding_mode,
|
||||||
|
"padding-color", &color,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (shell->canvas))
|
if (GTK_WIDGET_REALIZED (shell->canvas))
|
||||||
{
|
{
|
||||||
GdkColormap *colormap;
|
GdkColormap *colormap;
|
||||||
GdkColor color;
|
GdkColor gdk_color;
|
||||||
|
|
||||||
gimp_rgb_get_gdk_color (&appearance->padding_color, &color);
|
gimp_rgb_get_gdk_color (&color, &gdk_color);
|
||||||
|
|
||||||
colormap = gdk_drawable_get_colormap (shell->canvas->window);
|
colormap = gdk_drawable_get_colormap (shell->canvas->window);
|
||||||
g_return_if_fail (colormap != NULL);
|
g_return_if_fail (colormap != NULL);
|
||||||
gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);
|
gdk_colormap_alloc_color (colormap, &gdk_color, FALSE, TRUE);
|
||||||
|
|
||||||
gdk_window_set_background (shell->canvas->window, &color);
|
gdk_window_set_background (shell->canvas->window, &gdk_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shell->padding_button)
|
if (shell->padding_button)
|
||||||
|
@ -487,7 +457,7 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||||
shell);
|
shell);
|
||||||
|
|
||||||
gimp_color_button_set_color (GIMP_COLOR_BUTTON (shell->padding_button),
|
gimp_color_button_set_color (GIMP_COLOR_BUTTON (shell->padding_button),
|
||||||
&appearance->padding_color);
|
&color);
|
||||||
|
|
||||||
g_signal_handlers_unblock_by_func (shell->padding_button,
|
g_signal_handlers_unblock_by_func (shell->padding_button,
|
||||||
gimp_display_shell_color_button_changed,
|
gimp_display_shell_color_button_changed,
|
||||||
|
@ -499,18 +469,18 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_get_padding (GimpDisplayShell *shell,
|
gimp_display_shell_get_padding (GimpDisplayShell *shell,
|
||||||
GimpDisplayPaddingMode *padding_mode,
|
GimpCanvasPaddingMode *padding_mode,
|
||||||
GimpRGB *padding_color)
|
GimpRGB *padding_color)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
appearance = GET_APPEARANCE (shell);
|
options = GET_OPTIONS (shell);
|
||||||
|
|
||||||
if (padding_mode)
|
if (padding_mode)
|
||||||
*padding_mode = appearance->padding_mode;
|
*padding_mode = options->padding_mode;
|
||||||
|
|
||||||
if (padding_color)
|
if (padding_color)
|
||||||
*padding_color = appearance->padding_color;
|
*padding_color = options->padding_color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,22 @@ void gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
|
||||||
gboolean fullscreen);
|
gboolean fullscreen);
|
||||||
gboolean gimp_display_shell_get_fullscreen (GimpDisplayShell *shell);
|
gboolean gimp_display_shell_get_fullscreen (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
|
||||||
|
gboolean show);
|
||||||
|
gboolean gimp_display_shell_get_show_menubar (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
void gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
|
||||||
|
gboolean show);
|
||||||
|
gboolean gimp_display_shell_get_show_rulers (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
void gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
|
||||||
|
gboolean show);
|
||||||
|
gboolean gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
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_show_selection (GimpDisplayShell *shell,
|
void gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
|
||||||
gboolean show);
|
gboolean show);
|
||||||
gboolean gimp_display_shell_get_show_selection (GimpDisplayShell *shell);
|
gboolean gimp_display_shell_get_show_selection (GimpDisplayShell *shell);
|
||||||
|
@ -44,27 +60,11 @@ void gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
|
||||||
gboolean show);
|
gboolean show);
|
||||||
gboolean gimp_display_shell_get_show_guides (GimpDisplayShell *shell);
|
gboolean gimp_display_shell_get_show_guides (GimpDisplayShell *shell);
|
||||||
|
|
||||||
void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
|
|
||||||
gboolean show);
|
|
||||||
gboolean gimp_display_shell_get_show_menubar (GimpDisplayShell *shell);
|
|
||||||
|
|
||||||
void gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
|
|
||||||
gboolean show);
|
|
||||||
gboolean gimp_display_shell_get_show_rulers (GimpDisplayShell *shell);
|
|
||||||
|
|
||||||
void gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
|
|
||||||
gboolean show);
|
|
||||||
gboolean gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell);
|
|
||||||
|
|
||||||
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,
|
void gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||||
GimpDisplayPaddingMode mode,
|
GimpCanvasPaddingMode mode,
|
||||||
const GimpRGB *color);
|
const GimpRGB *color);
|
||||||
void gimp_display_shell_get_padding (GimpDisplayShell *shell,
|
void gimp_display_shell_get_padding (GimpDisplayShell *shell,
|
||||||
GimpDisplayPaddingMode *mode,
|
GimpCanvasPaddingMode *mode,
|
||||||
GimpRGB *color);
|
GimpRGB *color);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "widgets/gimpwidgets-utils.h"
|
#include "widgets/gimpwidgets-utils.h"
|
||||||
|
|
||||||
#include "gimpdisplay.h"
|
#include "gimpdisplay.h"
|
||||||
|
#include "gimpdisplayoptions.h"
|
||||||
#include "gimpdisplayshell.h"
|
#include "gimpdisplayshell.h"
|
||||||
#include "gimpdisplayshell-appearance.h"
|
#include "gimpdisplayshell-appearance.h"
|
||||||
#include "gimpdisplayshell-callbacks.h"
|
#include "gimpdisplayshell-callbacks.h"
|
||||||
|
@ -186,9 +187,8 @@ gimp_display_shell_events (GtkWidget *widget,
|
||||||
case GDK_WINDOW_STATE:
|
case GDK_WINDOW_STATE:
|
||||||
{
|
{
|
||||||
GdkEventWindowState *sevent;
|
GdkEventWindowState *sevent;
|
||||||
GimpDisplayShellAppearance appearance;
|
GimpDisplayOptions *options;
|
||||||
gboolean fullscreen;
|
gboolean fullscreen;
|
||||||
gboolean padding_mode_set;
|
|
||||||
|
|
||||||
sevent = (GdkEventWindowState *) event;
|
sevent = (GdkEventWindowState *) event;
|
||||||
|
|
||||||
|
@ -199,35 +199,27 @@ gimp_display_shell_events (GtkWidget *widget,
|
||||||
|
|
||||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||||
|
|
||||||
if (fullscreen)
|
options = fullscreen ? shell->fullscreen_options : shell->options;
|
||||||
{
|
|
||||||
padding_mode_set = shell->fullscreen_appearance.padding_mode_set;
|
|
||||||
|
|
||||||
appearance = shell->fullscreen_appearance;
|
gimp_display_shell_set_show_menubar (shell,
|
||||||
shell->fullscreen_appearance = shell->appearance;
|
options->show_menubar);
|
||||||
|
gimp_display_shell_set_show_rulers (shell,
|
||||||
shell->fullscreen_appearance.padding_mode_set = padding_mode_set;
|
options->show_rulers);
|
||||||
}
|
gimp_display_shell_set_show_scrollbars (shell,
|
||||||
else
|
options->show_scrollbars);
|
||||||
{
|
gimp_display_shell_set_show_statusbar (shell,
|
||||||
padding_mode_set = shell->appearance.padding_mode_set;
|
options->show_statusbar);
|
||||||
|
gimp_display_shell_set_show_selection (shell,
|
||||||
appearance = shell->appearance;
|
options->show_selection);
|
||||||
shell->appearance = shell->fullscreen_appearance;
|
gimp_display_shell_set_show_layer (shell,
|
||||||
|
options->show_active_layer);
|
||||||
shell->appearance.padding_mode_set = padding_mode_set;
|
gimp_display_shell_set_show_guides (shell,
|
||||||
}
|
options->show_guides);
|
||||||
|
gimp_display_shell_set_show_grid (shell,
|
||||||
gimp_display_shell_set_show_selection (shell, appearance.selection);
|
options->show_grid);
|
||||||
gimp_display_shell_set_show_layer (shell, appearance.active_layer);
|
gimp_display_shell_set_padding (shell,
|
||||||
gimp_display_shell_set_show_guides (shell, appearance.guides);
|
options->padding_mode,
|
||||||
gimp_display_shell_set_show_grid (shell, appearance.grid);
|
&options->padding_color);
|
||||||
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),
|
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
|
||||||
"/View/Fullscreen", fullscreen);
|
"/View/Fullscreen", fullscreen);
|
||||||
|
@ -257,7 +249,7 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *config;
|
GimpDisplayConfig *config;
|
||||||
GimpDisplay *gdisp;
|
GimpDisplay *gdisp;
|
||||||
GimpDisplayPaddingMode padding_mode;
|
GimpCanvasPaddingMode padding_mode;
|
||||||
GimpRGB padding_color;
|
GimpRGB padding_color;
|
||||||
|
|
||||||
gdisp = shell->gdisp;
|
gdisp = shell->gdisp;
|
||||||
|
@ -1347,15 +1339,14 @@ gimp_display_shell_color_button_changed (GtkWidget *widget,
|
||||||
GimpRGB color;
|
GimpRGB color;
|
||||||
|
|
||||||
if (gimp_display_shell_get_fullscreen (shell))
|
if (gimp_display_shell_get_fullscreen (shell))
|
||||||
shell->fullscreen_appearance.padding_mode_set = TRUE;
|
shell->fullscreen_options->padding_mode_set = TRUE;
|
||||||
else
|
else
|
||||||
shell->appearance.padding_mode_set = TRUE;
|
shell->options->padding_mode_set = TRUE;
|
||||||
|
|
||||||
gimp_color_button_get_color (GIMP_COLOR_BUTTON (widget), &color);
|
gimp_color_button_get_color (GIMP_COLOR_BUTTON (widget), &color);
|
||||||
|
|
||||||
gimp_display_shell_set_padding (shell,
|
gimp_display_shell_set_padding (shell,
|
||||||
GIMP_DISPLAY_PADDING_MODE_CUSTOM,
|
GIMP_CANVAS_PADDING_MODE_CUSTOM, &color);
|
||||||
&color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1363,7 +1354,7 @@ gimp_display_shell_color_button_menu_callback (gpointer callback_data,
|
||||||
guint callback_action,
|
guint callback_action,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GimpDisplayShellAppearance *appearance;
|
GimpDisplayOptions *options;
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell;
|
||||||
gboolean fullscreen;
|
gboolean fullscreen;
|
||||||
|
|
||||||
|
@ -1372,37 +1363,38 @@ gimp_display_shell_color_button_menu_callback (gpointer callback_data,
|
||||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||||
|
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
appearance = &shell->fullscreen_appearance;
|
options = shell->fullscreen_options;
|
||||||
else
|
else
|
||||||
appearance = &shell->appearance;
|
options = shell->options;
|
||||||
|
|
||||||
if (callback_action == GIMP_DISPLAY_PADDING_MODE_CUSTOM)
|
if (callback_action == GIMP_CANVAS_PADDING_MODE_CUSTOM)
|
||||||
{
|
{
|
||||||
gtk_button_clicked (GTK_BUTTON (shell->padding_button));
|
gtk_button_clicked (GTK_BUTTON (shell->padding_button));
|
||||||
}
|
}
|
||||||
else if (callback_action == 0xffff)
|
else if (callback_action == 0xffff)
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *config;
|
GimpDisplayConfig *config;
|
||||||
|
GimpDisplayOptions *default_options;
|
||||||
|
|
||||||
config = GIMP_DISPLAY_CONFIG (shell->gdisp->gimage->gimp->config);
|
config = GIMP_DISPLAY_CONFIG (shell->gdisp->gimage->gimp->config);
|
||||||
|
|
||||||
appearance->padding_mode_set = FALSE;
|
options->padding_mode_set = FALSE;
|
||||||
|
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
gimp_display_shell_set_padding (shell,
|
default_options = config->default_fullscreen_view;
|
||||||
config->fs_canvas_padding_mode,
|
|
||||||
&config->fs_canvas_padding_color);
|
|
||||||
else
|
else
|
||||||
|
default_options = config->default_view;
|
||||||
|
|
||||||
gimp_display_shell_set_padding (shell,
|
gimp_display_shell_set_padding (shell,
|
||||||
config->canvas_padding_mode,
|
default_options->padding_mode,
|
||||||
&config->canvas_padding_color);
|
&default_options->padding_color);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
appearance->padding_mode_set = TRUE;
|
options->padding_mode_set = TRUE;
|
||||||
|
|
||||||
gimp_display_shell_set_padding (shell, callback_action,
|
gimp_display_shell_set_padding (shell, callback_action,
|
||||||
&appearance->padding_color);
|
&options->padding_color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#endif
|
#endif
|
||||||
#include "gui/gui-types.h"
|
#include "gui/gui-types.h"
|
||||||
|
|
||||||
|
#include "config/gimpconfig.h"
|
||||||
|
#include "config/gimpconfig-utils.h"
|
||||||
#include "config/gimpdisplayconfig.h"
|
#include "config/gimpdisplayconfig.h"
|
||||||
|
|
||||||
#include "core/gimp.h"
|
#include "core/gimp.h"
|
||||||
|
@ -63,6 +65,7 @@
|
||||||
#include "tools/tool_manager.h"
|
#include "tools/tool_manager.h"
|
||||||
|
|
||||||
#include "gimpdisplay.h"
|
#include "gimpdisplay.h"
|
||||||
|
#include "gimpdisplayoptions.h"
|
||||||
#include "gimpdisplayshell.h"
|
#include "gimpdisplayshell.h"
|
||||||
#include "gimpdisplayshell-appearance.h"
|
#include "gimpdisplayshell-appearance.h"
|
||||||
#include "gimpdisplayshell-callbacks.h"
|
#include "gimpdisplayshell-callbacks.h"
|
||||||
|
@ -94,6 +97,7 @@ enum
|
||||||
static void gimp_display_shell_class_init (GimpDisplayShellClass *klass);
|
static void gimp_display_shell_class_init (GimpDisplayShellClass *klass);
|
||||||
static void gimp_display_shell_init (GimpDisplayShell *shell);
|
static void gimp_display_shell_init (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
static void gimp_display_shell_finalize (GObject *object);
|
||||||
static void gimp_display_shell_destroy (GtkObject *object);
|
static void gimp_display_shell_destroy (GtkObject *object);
|
||||||
static void gimp_display_shell_screen_changed (GtkWidget *widget,
|
static void gimp_display_shell_screen_changed (GtkWidget *widget,
|
||||||
GdkScreen *previous);
|
GdkScreen *previous);
|
||||||
|
@ -145,9 +149,11 @@ gimp_display_shell_get_type (void)
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
||||||
{
|
{
|
||||||
|
GObjectClass *gobject_class;
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
|
gobject_class = G_OBJECT_CLASS (klass);
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = GTK_OBJECT_CLASS (klass);
|
||||||
widget_class = GTK_WIDGET_CLASS (klass);
|
widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
|
||||||
|
@ -180,6 +186,8 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
||||||
gimp_marshal_VOID__VOID,
|
gimp_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gobject_class->finalize = gimp_display_shell_finalize;
|
||||||
|
|
||||||
object_class->destroy = gimp_display_shell_destroy;
|
object_class->destroy = gimp_display_shell_destroy;
|
||||||
|
|
||||||
widget_class->screen_changed = gimp_display_shell_screen_changed;
|
widget_class->screen_changed = gimp_display_shell_screen_changed;
|
||||||
|
@ -267,31 +275,10 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
||||||
|
|
||||||
shell->paused_count = 0;
|
shell->paused_count = 0;
|
||||||
|
|
||||||
shell->appearance.selection = TRUE;
|
shell->options =
|
||||||
shell->appearance.active_layer = TRUE;
|
g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
|
||||||
shell->appearance.guides = TRUE;
|
shell->fullscreen_options =
|
||||||
shell->appearance.grid = FALSE;
|
g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
|
||||||
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, GIMP_OPACITY_OPAQUE);
|
|
||||||
shell->appearance.padding_mode_set = FALSE;
|
|
||||||
|
|
||||||
shell->fullscreen_appearance.selection = TRUE;
|
|
||||||
shell->fullscreen_appearance.active_layer = TRUE;
|
|
||||||
shell->fullscreen_appearance.guides = TRUE;
|
|
||||||
shell->fullscreen_appearance.grid = FALSE;
|
|
||||||
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, GIMP_OPACITY_OPAQUE);
|
|
||||||
shell->fullscreen_appearance.padding_mode_set = FALSE;
|
|
||||||
|
|
||||||
shell->space_pressed = FALSE;
|
shell->space_pressed = FALSE;
|
||||||
shell->space_release_pending = FALSE;
|
shell->space_release_pending = FALSE;
|
||||||
|
@ -348,15 +335,26 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
||||||
|
|
||||||
gimp_help_connect (GTK_WIDGET (shell), gimp_standard_help_func,
|
gimp_help_connect (GTK_WIDGET (shell), gimp_standard_help_func,
|
||||||
GIMP_HELP_IMAGE_WINDOW, NULL);
|
GIMP_HELP_IMAGE_WINDOW, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_shell_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
|
||||||
|
|
||||||
|
if (shell->options)
|
||||||
|
g_object_unref (shell->options);
|
||||||
|
|
||||||
|
if (shell->fullscreen_options)
|
||||||
|
g_object_unref (shell->fullscreen_options);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_destroy (GtkObject *object)
|
gimp_display_shell_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
|
||||||
|
|
||||||
shell = GIMP_DISPLAY_SHELL (object);
|
|
||||||
|
|
||||||
if (shell->gdisp)
|
if (shell->gdisp)
|
||||||
{
|
{
|
||||||
|
@ -519,19 +517,10 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
shell->dot_for_dot = config->default_dot_for_dot;
|
shell->dot_for_dot = config->default_dot_for_dot;
|
||||||
|
|
||||||
shell->appearance.menubar = config->show_menubar;
|
gimp_config_sync (GIMP_CONFIG (config->default_view),
|
||||||
shell->appearance.rulers = config->show_rulers;
|
GIMP_CONFIG (shell->options), 0);
|
||||||
shell->appearance.scrollbars = config->show_scrollbars;
|
gimp_config_sync (GIMP_CONFIG (config->default_fullscreen_view),
|
||||||
shell->appearance.statusbar = config->show_statusbar;
|
GIMP_CONFIG (shell->fullscreen_options), 0);
|
||||||
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%
|
/* adjust the initial scale -- so that window fits on screen the 75%
|
||||||
* value is the same as in gimp_display_shell_shrink_wrap. It
|
* value is the same as in gimp_display_shell_shrink_wrap. It
|
||||||
|
@ -662,7 +651,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
|
||||||
|
|
||||||
if (shell->appearance.menubar)
|
if (shell->options->show_menubar)
|
||||||
gtk_widget_show (menubar);
|
gtk_widget_show (menubar);
|
||||||
|
|
||||||
/* active display callback */
|
/* active display callback */
|
||||||
|
@ -793,7 +782,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
/* create the contents of the right_vbox *********************************/
|
/* create the contents of the right_vbox *********************************/
|
||||||
shell->padding_button = gimp_color_panel_new (_("Set Canvas Padding Color"),
|
shell->padding_button = gimp_color_panel_new (_("Set Canvas Padding Color"),
|
||||||
&shell->appearance.padding_color,
|
&shell->options->padding_color,
|
||||||
GIMP_COLOR_AREA_FLAT,
|
GIMP_COLOR_AREA_FLAT,
|
||||||
15, 15);
|
15, 15);
|
||||||
GTK_WIDGET_UNSET_FLAGS (shell->padding_button, GTK_CAN_FOCUS);
|
GTK_WIDGET_UNSET_FLAGS (shell->padding_button, GTK_CAN_FOCUS);
|
||||||
|
@ -815,19 +804,19 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
{
|
{
|
||||||
{ N_("/From Theme"), NULL,
|
{ N_("/From Theme"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_DEFAULT, NULL },
|
GIMP_CANVAS_PADDING_MODE_DEFAULT, NULL },
|
||||||
{ N_("/Light Check Color"), NULL,
|
{ N_("/Light Check Color"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK, NULL },
|
GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, NULL },
|
||||||
{ N_("/Dark Check Color"), NULL,
|
{ N_("/Dark Check Color"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_DARK_CHECK, NULL },
|
GIMP_CANVAS_PADDING_MODE_DARK_CHECK, NULL },
|
||||||
|
|
||||||
{ "/---", NULL, NULL, 0, "<Separator>"},
|
{ "/---", NULL, NULL, 0, "<Separator>"},
|
||||||
|
|
||||||
{ N_("/Select Custom Color..."), NULL,
|
{ N_("/Select Custom Color..."), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_CUSTOM, "<StockItem>",
|
GIMP_CANVAS_PADDING_MODE_CUSTOM, "<StockItem>",
|
||||||
GTK_STOCK_SELECT_COLOR },
|
GTK_STOCK_SELECT_COLOR },
|
||||||
{ N_("/As in Preferences"), NULL,
|
{ N_("/As in Preferences"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
|
@ -910,7 +899,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
/* show everything *******************************************************/
|
/* show everything *******************************************************/
|
||||||
|
|
||||||
if (shell->appearance.rulers)
|
if (shell->options->show_rulers)
|
||||||
{
|
{
|
||||||
gtk_widget_show (shell->origin);
|
gtk_widget_show (shell->origin);
|
||||||
gtk_widget_show (shell->hrule);
|
gtk_widget_show (shell->hrule);
|
||||||
|
@ -919,7 +908,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
gtk_widget_show (shell->canvas);
|
gtk_widget_show (shell->canvas);
|
||||||
|
|
||||||
if (shell->appearance.scrollbars)
|
if (shell->options->show_scrollbars)
|
||||||
{
|
{
|
||||||
gtk_widget_show (shell->vsb);
|
gtk_widget_show (shell->vsb);
|
||||||
gtk_widget_show (shell->hsb);
|
gtk_widget_show (shell->hsb);
|
||||||
|
@ -928,7 +917,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
gtk_widget_show (shell->nav_ebox);
|
gtk_widget_show (shell->nav_ebox);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shell->appearance.statusbar)
|
if (shell->options->show_statusbar)
|
||||||
gtk_widget_show (shell->statusbar);
|
gtk_widget_show (shell->statusbar);
|
||||||
|
|
||||||
gtk_widget_show (main_vbox);
|
gtk_widget_show (main_vbox);
|
||||||
|
|
|
@ -27,26 +27,6 @@
|
||||||
#include "gui/gui-types.h"
|
#include "gui/gui-types.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpDisplayShellAppearance GimpDisplayShellAppearance;
|
|
||||||
|
|
||||||
struct _GimpDisplayShellAppearance
|
|
||||||
{
|
|
||||||
gboolean selection;
|
|
||||||
gboolean active_layer;
|
|
||||||
gboolean guides;
|
|
||||||
gboolean grid;
|
|
||||||
|
|
||||||
gboolean menubar;
|
|
||||||
gboolean rulers;
|
|
||||||
gboolean scrollbars;
|
|
||||||
gboolean statusbar;
|
|
||||||
|
|
||||||
GimpDisplayPaddingMode padding_mode;
|
|
||||||
GimpRGB padding_color;
|
|
||||||
gboolean padding_mode_set;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* finding the effective screen resolution (double) */
|
/* finding the effective screen resolution (double) */
|
||||||
#define SCREEN_XRES(s) (s->dot_for_dot ? \
|
#define SCREEN_XRES(s) (s->dot_for_dot ? \
|
||||||
s->gdisp->gimage->xresolution : s->monitor_xres)
|
s->gdisp->gimage->xresolution : s->monitor_xres)
|
||||||
|
@ -170,8 +150,8 @@ struct _GimpDisplayShell
|
||||||
GQuark vectors_thaw_handler;
|
GQuark vectors_thaw_handler;
|
||||||
GQuark vectors_visible_handler;
|
GQuark vectors_visible_handler;
|
||||||
|
|
||||||
GimpDisplayShellAppearance appearance;
|
GimpDisplayOptions *options;
|
||||||
GimpDisplayShellAppearance fullscreen_appearance;
|
GimpDisplayOptions *fullscreen_options;
|
||||||
|
|
||||||
/* the state of gimp_display_shell_tool_events() */
|
/* the state of gimp_display_shell_tool_events() */
|
||||||
gboolean space_pressed;
|
gboolean space_pressed;
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "widgets/gimpwidgets-utils.h"
|
#include "widgets/gimpwidgets-utils.h"
|
||||||
|
|
||||||
#include "gimpdisplay.h"
|
#include "gimpdisplay.h"
|
||||||
|
#include "gimpdisplayoptions.h"
|
||||||
#include "gimpdisplayshell.h"
|
#include "gimpdisplayshell.h"
|
||||||
#include "gimpdisplayshell-appearance.h"
|
#include "gimpdisplayshell-appearance.h"
|
||||||
#include "gimpdisplayshell-callbacks.h"
|
#include "gimpdisplayshell-callbacks.h"
|
||||||
|
@ -116,8 +117,8 @@ static gboolean gimp_display_shell_idle_update_icon (gpointer d
|
||||||
void
|
void
|
||||||
gimp_display_shell_connect (GimpDisplayShell *shell)
|
gimp_display_shell_connect (GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *display_config;
|
|
||||||
GimpImage *gimage;
|
GimpImage *gimage;
|
||||||
|
GimpDisplayConfig *display_config;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY (shell->gdisp));
|
g_return_if_fail (GIMP_IS_DISPLAY (shell->gdisp));
|
||||||
|
@ -192,6 +193,7 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
||||||
"notify::transparency-type",
|
"notify::transparency-type",
|
||||||
G_CALLBACK (gimp_display_shell_check_notify_handler),
|
G_CALLBACK (gimp_display_shell_check_notify_handler),
|
||||||
shell);
|
shell);
|
||||||
|
|
||||||
g_signal_connect (gimage->gimp->config,
|
g_signal_connect (gimage->gimp->config,
|
||||||
"notify::image-title-format",
|
"notify::image-title-format",
|
||||||
G_CALLBACK (gimp_display_shell_title_notify_handler),
|
G_CALLBACK (gimp_display_shell_title_notify_handler),
|
||||||
|
@ -216,22 +218,24 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
||||||
"notify::monitor-yresolution",
|
"notify::monitor-yresolution",
|
||||||
G_CALLBACK (gimp_display_shell_monitor_res_notify_handler),
|
G_CALLBACK (gimp_display_shell_monitor_res_notify_handler),
|
||||||
shell);
|
shell);
|
||||||
g_signal_connect (gimage->gimp->config,
|
|
||||||
"notify::canvas-padding-mode",
|
g_signal_connect (display_config->default_view,
|
||||||
|
"notify::padding-mode",
|
||||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||||
shell);
|
shell);
|
||||||
g_signal_connect (gimage->gimp->config,
|
g_signal_connect (display_config->default_view,
|
||||||
"notify::canvas-padding-color",
|
"notify::padding-color",
|
||||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||||
shell);
|
shell);
|
||||||
g_signal_connect (gimage->gimp->config,
|
g_signal_connect (display_config->default_fullscreen_view,
|
||||||
"notify::fullscreen-canvas-padding-mode",
|
"notify::padding-mode",
|
||||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||||
shell);
|
shell);
|
||||||
g_signal_connect (gimage->gimp->config,
|
g_signal_connect (display_config->default_fullscreen_view,
|
||||||
"notify::fullscreen-canvas-padding-color",
|
"notify::padding-color",
|
||||||
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
G_CALLBACK (gimp_display_shell_padding_notify_handler),
|
||||||
shell);
|
shell);
|
||||||
|
|
||||||
g_signal_connect (gimage->gimp->config,
|
g_signal_connect (gimage->gimp->config,
|
||||||
"notify::marching-ants-speed",
|
"notify::marching-ants-speed",
|
||||||
G_CALLBACK (gimp_display_shell_ants_speed_notify_handler),
|
G_CALLBACK (gimp_display_shell_ants_speed_notify_handler),
|
||||||
|
@ -245,6 +249,7 @@ void
|
||||||
gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
GimpImage *gimage;
|
GimpImage *gimage;
|
||||||
|
GimpDisplayConfig *display_config;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY (shell->gdisp));
|
g_return_if_fail (GIMP_IS_DISPLAY (shell->gdisp));
|
||||||
|
@ -252,6 +257,8 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
||||||
|
|
||||||
gimage = shell->gdisp->gimage;
|
gimage = shell->gdisp->gimage;
|
||||||
|
|
||||||
|
display_config = GIMP_DISPLAY_CONFIG (gimage->gimp->config);
|
||||||
|
|
||||||
if (shell->icon_idle_id)
|
if (shell->icon_idle_id)
|
||||||
{
|
{
|
||||||
g_source_remove (shell->icon_idle_id);
|
g_source_remove (shell->icon_idle_id);
|
||||||
|
@ -261,10 +268,10 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
||||||
g_signal_handlers_disconnect_by_func (gimage->gimp->config,
|
g_signal_handlers_disconnect_by_func (gimage->gimp->config,
|
||||||
gimp_display_shell_ants_speed_notify_handler,
|
gimp_display_shell_ants_speed_notify_handler,
|
||||||
shell);
|
shell);
|
||||||
g_signal_handlers_disconnect_by_func (gimage->gimp->config,
|
g_signal_handlers_disconnect_by_func (display_config->default_view,
|
||||||
gimp_display_shell_padding_notify_handler,
|
gimp_display_shell_padding_notify_handler,
|
||||||
shell);
|
shell);
|
||||||
g_signal_handlers_disconnect_by_func (gimage->gimp->config,
|
g_signal_handlers_disconnect_by_func (display_config->default_fullscreen_view,
|
||||||
gimp_display_shell_monitor_res_notify_handler,
|
gimp_display_shell_monitor_res_notify_handler,
|
||||||
shell);
|
shell);
|
||||||
g_signal_handlers_disconnect_by_func (gimage->gimp->config,
|
g_signal_handlers_disconnect_by_func (gimage->gimp->config,
|
||||||
|
@ -502,15 +509,15 @@ gimp_display_shell_check_notify_handler (GObject *config,
|
||||||
GParamSpec *param_spec,
|
GParamSpec *param_spec,
|
||||||
GimpDisplayShell *shell)
|
GimpDisplayShell *shell)
|
||||||
{
|
{
|
||||||
GimpDisplayPaddingMode padding_mode;
|
GimpCanvasPaddingMode padding_mode;
|
||||||
GimpRGB padding_color;
|
GimpRGB padding_color;
|
||||||
|
|
||||||
gimp_display_shell_get_padding (shell, &padding_mode, &padding_color);
|
gimp_display_shell_get_padding (shell, &padding_mode, &padding_color);
|
||||||
|
|
||||||
switch (padding_mode)
|
switch (padding_mode)
|
||||||
{
|
{
|
||||||
case GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK:
|
case GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK:
|
||||||
case GIMP_DISPLAY_PADDING_MODE_DARK_CHECK:
|
case GIMP_CANVAS_PADDING_MODE_DARK_CHECK:
|
||||||
gimp_display_shell_set_padding (shell, padding_mode, &padding_color);
|
gimp_display_shell_set_padding (shell, padding_mode, &padding_color);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -576,18 +583,18 @@ gimp_display_shell_padding_notify_handler (GObject *config,
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *display_config;
|
GimpDisplayConfig *display_config;
|
||||||
gboolean fullscreen;
|
gboolean fullscreen;
|
||||||
GimpDisplayPaddingMode padding_mode;
|
GimpCanvasPaddingMode padding_mode;
|
||||||
GimpRGB padding_color;
|
GimpRGB padding_color;
|
||||||
|
|
||||||
display_config = GIMP_DISPLAY_CONFIG (config);
|
display_config = GIMP_DISPLAY_CONFIG (shell->gdisp->gimage->gimp->config);
|
||||||
|
|
||||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||||
|
|
||||||
/* if the user did not set the padding mode for this display explicitely */
|
/* if the user did not set the padding mode for this display explicitely */
|
||||||
if (! shell->fullscreen_appearance.padding_mode_set)
|
if (! shell->fullscreen_options->padding_mode_set)
|
||||||
{
|
{
|
||||||
padding_mode = display_config->fs_canvas_padding_mode;
|
padding_mode = display_config->default_fullscreen_view->padding_mode;
|
||||||
padding_color = display_config->fs_canvas_padding_color;
|
padding_color = display_config->default_fullscreen_view->padding_color;
|
||||||
|
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
|
@ -595,21 +602,21 @@ gimp_display_shell_padding_notify_handler (GObject *config,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
shell->fullscreen_appearance.padding_mode = padding_mode;
|
shell->fullscreen_options->padding_mode = padding_mode;
|
||||||
shell->fullscreen_appearance.padding_color = padding_color;
|
shell->fullscreen_options->padding_color = padding_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the user did not set the padding mode for this display explicitely */
|
/* if the user did not set the padding mode for this display explicitely */
|
||||||
if (! shell->appearance.padding_mode_set)
|
if (! shell->options->padding_mode_set)
|
||||||
{
|
{
|
||||||
padding_mode = display_config->canvas_padding_mode;
|
padding_mode = display_config->default_view->padding_mode;
|
||||||
padding_color = display_config->canvas_padding_color;
|
padding_color = display_config->default_view->padding_color;
|
||||||
|
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
shell->appearance.padding_mode = padding_mode;
|
shell->options->padding_mode = padding_mode;
|
||||||
shell->appearance.padding_color = padding_color;
|
shell->options->padding_color = padding_color;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#endif
|
#endif
|
||||||
#include "gui/gui-types.h"
|
#include "gui/gui-types.h"
|
||||||
|
|
||||||
|
#include "config/gimpconfig.h"
|
||||||
|
#include "config/gimpconfig-utils.h"
|
||||||
#include "config/gimpdisplayconfig.h"
|
#include "config/gimpdisplayconfig.h"
|
||||||
|
|
||||||
#include "core/gimp.h"
|
#include "core/gimp.h"
|
||||||
|
@ -63,6 +65,7 @@
|
||||||
#include "tools/tool_manager.h"
|
#include "tools/tool_manager.h"
|
||||||
|
|
||||||
#include "gimpdisplay.h"
|
#include "gimpdisplay.h"
|
||||||
|
#include "gimpdisplayoptions.h"
|
||||||
#include "gimpdisplayshell.h"
|
#include "gimpdisplayshell.h"
|
||||||
#include "gimpdisplayshell-appearance.h"
|
#include "gimpdisplayshell-appearance.h"
|
||||||
#include "gimpdisplayshell-callbacks.h"
|
#include "gimpdisplayshell-callbacks.h"
|
||||||
|
@ -94,6 +97,7 @@ enum
|
||||||
static void gimp_display_shell_class_init (GimpDisplayShellClass *klass);
|
static void gimp_display_shell_class_init (GimpDisplayShellClass *klass);
|
||||||
static void gimp_display_shell_init (GimpDisplayShell *shell);
|
static void gimp_display_shell_init (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
static void gimp_display_shell_finalize (GObject *object);
|
||||||
static void gimp_display_shell_destroy (GtkObject *object);
|
static void gimp_display_shell_destroy (GtkObject *object);
|
||||||
static void gimp_display_shell_screen_changed (GtkWidget *widget,
|
static void gimp_display_shell_screen_changed (GtkWidget *widget,
|
||||||
GdkScreen *previous);
|
GdkScreen *previous);
|
||||||
|
@ -145,9 +149,11 @@ gimp_display_shell_get_type (void)
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
||||||
{
|
{
|
||||||
|
GObjectClass *gobject_class;
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
|
gobject_class = G_OBJECT_CLASS (klass);
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = GTK_OBJECT_CLASS (klass);
|
||||||
widget_class = GTK_WIDGET_CLASS (klass);
|
widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
|
||||||
|
@ -180,6 +186,8 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
||||||
gimp_marshal_VOID__VOID,
|
gimp_marshal_VOID__VOID,
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gobject_class->finalize = gimp_display_shell_finalize;
|
||||||
|
|
||||||
object_class->destroy = gimp_display_shell_destroy;
|
object_class->destroy = gimp_display_shell_destroy;
|
||||||
|
|
||||||
widget_class->screen_changed = gimp_display_shell_screen_changed;
|
widget_class->screen_changed = gimp_display_shell_screen_changed;
|
||||||
|
@ -267,31 +275,10 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
||||||
|
|
||||||
shell->paused_count = 0;
|
shell->paused_count = 0;
|
||||||
|
|
||||||
shell->appearance.selection = TRUE;
|
shell->options =
|
||||||
shell->appearance.active_layer = TRUE;
|
g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
|
||||||
shell->appearance.guides = TRUE;
|
shell->fullscreen_options =
|
||||||
shell->appearance.grid = FALSE;
|
g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
|
||||||
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, GIMP_OPACITY_OPAQUE);
|
|
||||||
shell->appearance.padding_mode_set = FALSE;
|
|
||||||
|
|
||||||
shell->fullscreen_appearance.selection = TRUE;
|
|
||||||
shell->fullscreen_appearance.active_layer = TRUE;
|
|
||||||
shell->fullscreen_appearance.guides = TRUE;
|
|
||||||
shell->fullscreen_appearance.grid = FALSE;
|
|
||||||
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, GIMP_OPACITY_OPAQUE);
|
|
||||||
shell->fullscreen_appearance.padding_mode_set = FALSE;
|
|
||||||
|
|
||||||
shell->space_pressed = FALSE;
|
shell->space_pressed = FALSE;
|
||||||
shell->space_release_pending = FALSE;
|
shell->space_release_pending = FALSE;
|
||||||
|
@ -348,15 +335,26 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
||||||
|
|
||||||
gimp_help_connect (GTK_WIDGET (shell), gimp_standard_help_func,
|
gimp_help_connect (GTK_WIDGET (shell), gimp_standard_help_func,
|
||||||
GIMP_HELP_IMAGE_WINDOW, NULL);
|
GIMP_HELP_IMAGE_WINDOW, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_display_shell_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
|
||||||
|
|
||||||
|
if (shell->options)
|
||||||
|
g_object_unref (shell->options);
|
||||||
|
|
||||||
|
if (shell->fullscreen_options)
|
||||||
|
g_object_unref (shell->fullscreen_options);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_destroy (GtkObject *object)
|
gimp_display_shell_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
|
||||||
|
|
||||||
shell = GIMP_DISPLAY_SHELL (object);
|
|
||||||
|
|
||||||
if (shell->gdisp)
|
if (shell->gdisp)
|
||||||
{
|
{
|
||||||
|
@ -519,19 +517,10 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
shell->dot_for_dot = config->default_dot_for_dot;
|
shell->dot_for_dot = config->default_dot_for_dot;
|
||||||
|
|
||||||
shell->appearance.menubar = config->show_menubar;
|
gimp_config_sync (GIMP_CONFIG (config->default_view),
|
||||||
shell->appearance.rulers = config->show_rulers;
|
GIMP_CONFIG (shell->options), 0);
|
||||||
shell->appearance.scrollbars = config->show_scrollbars;
|
gimp_config_sync (GIMP_CONFIG (config->default_fullscreen_view),
|
||||||
shell->appearance.statusbar = config->show_statusbar;
|
GIMP_CONFIG (shell->fullscreen_options), 0);
|
||||||
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%
|
/* adjust the initial scale -- so that window fits on screen the 75%
|
||||||
* value is the same as in gimp_display_shell_shrink_wrap. It
|
* value is the same as in gimp_display_shell_shrink_wrap. It
|
||||||
|
@ -662,7 +651,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
|
||||||
|
|
||||||
if (shell->appearance.menubar)
|
if (shell->options->show_menubar)
|
||||||
gtk_widget_show (menubar);
|
gtk_widget_show (menubar);
|
||||||
|
|
||||||
/* active display callback */
|
/* active display callback */
|
||||||
|
@ -793,7 +782,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
/* create the contents of the right_vbox *********************************/
|
/* create the contents of the right_vbox *********************************/
|
||||||
shell->padding_button = gimp_color_panel_new (_("Set Canvas Padding Color"),
|
shell->padding_button = gimp_color_panel_new (_("Set Canvas Padding Color"),
|
||||||
&shell->appearance.padding_color,
|
&shell->options->padding_color,
|
||||||
GIMP_COLOR_AREA_FLAT,
|
GIMP_COLOR_AREA_FLAT,
|
||||||
15, 15);
|
15, 15);
|
||||||
GTK_WIDGET_UNSET_FLAGS (shell->padding_button, GTK_CAN_FOCUS);
|
GTK_WIDGET_UNSET_FLAGS (shell->padding_button, GTK_CAN_FOCUS);
|
||||||
|
@ -815,19 +804,19 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
{
|
{
|
||||||
{ N_("/From Theme"), NULL,
|
{ N_("/From Theme"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_DEFAULT, NULL },
|
GIMP_CANVAS_PADDING_MODE_DEFAULT, NULL },
|
||||||
{ N_("/Light Check Color"), NULL,
|
{ N_("/Light Check Color"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_LIGHT_CHECK, NULL },
|
GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, NULL },
|
||||||
{ N_("/Dark Check Color"), NULL,
|
{ N_("/Dark Check Color"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_DARK_CHECK, NULL },
|
GIMP_CANVAS_PADDING_MODE_DARK_CHECK, NULL },
|
||||||
|
|
||||||
{ "/---", NULL, NULL, 0, "<Separator>"},
|
{ "/---", NULL, NULL, 0, "<Separator>"},
|
||||||
|
|
||||||
{ N_("/Select Custom Color..."), NULL,
|
{ N_("/Select Custom Color..."), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
GIMP_DISPLAY_PADDING_MODE_CUSTOM, "<StockItem>",
|
GIMP_CANVAS_PADDING_MODE_CUSTOM, "<StockItem>",
|
||||||
GTK_STOCK_SELECT_COLOR },
|
GTK_STOCK_SELECT_COLOR },
|
||||||
{ N_("/As in Preferences"), NULL,
|
{ N_("/As in Preferences"), NULL,
|
||||||
gimp_display_shell_color_button_menu_callback,
|
gimp_display_shell_color_button_menu_callback,
|
||||||
|
@ -910,7 +899,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
/* show everything *******************************************************/
|
/* show everything *******************************************************/
|
||||||
|
|
||||||
if (shell->appearance.rulers)
|
if (shell->options->show_rulers)
|
||||||
{
|
{
|
||||||
gtk_widget_show (shell->origin);
|
gtk_widget_show (shell->origin);
|
||||||
gtk_widget_show (shell->hrule);
|
gtk_widget_show (shell->hrule);
|
||||||
|
@ -919,7 +908,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
|
|
||||||
gtk_widget_show (shell->canvas);
|
gtk_widget_show (shell->canvas);
|
||||||
|
|
||||||
if (shell->appearance.scrollbars)
|
if (shell->options->show_scrollbars)
|
||||||
{
|
{
|
||||||
gtk_widget_show (shell->vsb);
|
gtk_widget_show (shell->vsb);
|
||||||
gtk_widget_show (shell->hsb);
|
gtk_widget_show (shell->hsb);
|
||||||
|
@ -928,7 +917,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
||||||
gtk_widget_show (shell->nav_ebox);
|
gtk_widget_show (shell->nav_ebox);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shell->appearance.statusbar)
|
if (shell->options->show_statusbar)
|
||||||
gtk_widget_show (shell->statusbar);
|
gtk_widget_show (shell->statusbar);
|
||||||
|
|
||||||
gtk_widget_show (main_vbox);
|
gtk_widget_show (main_vbox);
|
||||||
|
|
|
@ -27,26 +27,6 @@
|
||||||
#include "gui/gui-types.h"
|
#include "gui/gui-types.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpDisplayShellAppearance GimpDisplayShellAppearance;
|
|
||||||
|
|
||||||
struct _GimpDisplayShellAppearance
|
|
||||||
{
|
|
||||||
gboolean selection;
|
|
||||||
gboolean active_layer;
|
|
||||||
gboolean guides;
|
|
||||||
gboolean grid;
|
|
||||||
|
|
||||||
gboolean menubar;
|
|
||||||
gboolean rulers;
|
|
||||||
gboolean scrollbars;
|
|
||||||
gboolean statusbar;
|
|
||||||
|
|
||||||
GimpDisplayPaddingMode padding_mode;
|
|
||||||
GimpRGB padding_color;
|
|
||||||
gboolean padding_mode_set;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* finding the effective screen resolution (double) */
|
/* finding the effective screen resolution (double) */
|
||||||
#define SCREEN_XRES(s) (s->dot_for_dot ? \
|
#define SCREEN_XRES(s) (s->dot_for_dot ? \
|
||||||
s->gdisp->gimage->xresolution : s->monitor_xres)
|
s->gdisp->gimage->xresolution : s->monitor_xres)
|
||||||
|
@ -170,8 +150,8 @@ struct _GimpDisplayShell
|
||||||
GQuark vectors_thaw_handler;
|
GQuark vectors_thaw_handler;
|
||||||
GQuark vectors_visible_handler;
|
GQuark vectors_visible_handler;
|
||||||
|
|
||||||
GimpDisplayShellAppearance appearance;
|
GimpDisplayOptions *options;
|
||||||
GimpDisplayShellAppearance fullscreen_appearance;
|
GimpDisplayOptions *fullscreen_options;
|
||||||
|
|
||||||
/* the state of gimp_display_shell_tool_events() */
|
/* the state of gimp_display_shell_tool_events() */
|
||||||
gboolean space_pressed;
|
gboolean space_pressed;
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "widgets/gimpitemfactory.h"
|
#include "widgets/gimpitemfactory.h"
|
||||||
|
|
||||||
#include "display/gimpdisplay.h"
|
#include "display/gimpdisplay.h"
|
||||||
|
#include "display/gimpdisplayoptions.h"
|
||||||
#include "display/gimpdisplayshell.h"
|
#include "display/gimpdisplayshell.h"
|
||||||
#include "display/gimpdisplayshell-appearance.h"
|
#include "display/gimpdisplayshell-appearance.h"
|
||||||
#include "display/gimpdisplayshell-selection.h"
|
#include "display/gimpdisplayshell-selection.h"
|
||||||
|
@ -1296,8 +1297,9 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
Gimp *gimp = NULL;
|
Gimp *gimp = NULL;
|
||||||
GimpDisplayShell *shell = NULL;
|
|
||||||
GimpDisplay *gdisp = NULL;
|
GimpDisplay *gdisp = NULL;
|
||||||
|
GimpDisplayShell *shell = NULL;
|
||||||
|
GimpDisplayOptions *options = NULL;
|
||||||
GimpImage *gimage = NULL;
|
GimpImage *gimage = NULL;
|
||||||
GimpDrawable *drawable = NULL;
|
GimpDrawable *drawable = NULL;
|
||||||
GimpLayer *layer = NULL;
|
GimpLayer *layer = NULL;
|
||||||
|
@ -1317,7 +1319,6 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
gint lind = -1;
|
gint lind = -1;
|
||||||
gint lnum = -1;
|
gint lnum = -1;
|
||||||
gboolean fullscreen = FALSE;
|
gboolean fullscreen = FALSE;
|
||||||
GimpDisplayShellAppearance *appearance = NULL;
|
|
||||||
|
|
||||||
gimp = GIMP_ITEM_FACTORY (item_factory)->gimp;
|
gimp = GIMP_ITEM_FACTORY (item_factory)->gimp;
|
||||||
|
|
||||||
|
@ -1366,10 +1367,7 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
|
|
||||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||||
|
|
||||||
if (fullscreen)
|
options = fullscreen ? shell->fullscreen_options : shell->options;
|
||||||
appearance = &shell->fullscreen_appearance;
|
|
||||||
else
|
|
||||||
appearance = &shell->appearance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_context_get_foreground (gimp_get_user_context (gimp), &fg);
|
gimp_context_get_foreground (gimp_get_user_context (gimp), &fg);
|
||||||
|
@ -1491,22 +1489,22 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
SET_SENSITIVE ("/View/Display Filters...", gdisp);
|
SET_SENSITIVE ("/View/Display Filters...", gdisp);
|
||||||
|
|
||||||
SET_SENSITIVE ("/View/Show Selection", gdisp);
|
SET_SENSITIVE ("/View/Show Selection", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Selection", gdisp && appearance->selection);
|
SET_ACTIVE ("/View/Show Selection", gdisp && options->show_selection);
|
||||||
SET_SENSITIVE ("/View/Show Layer Boundary", gdisp);
|
SET_SENSITIVE ("/View/Show Layer Boundary", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && appearance->active_layer);
|
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && options->show_active_layer);
|
||||||
SET_ACTIVE ("/View/Show Guides", gdisp && appearance->guides);
|
SET_ACTIVE ("/View/Show Guides", gdisp && options->show_guides);
|
||||||
SET_ACTIVE ("/View/Snap to Guides", gdisp && shell->snap_to_guides);
|
SET_ACTIVE ("/View/Snap to Guides", gdisp && shell->snap_to_guides);
|
||||||
SET_ACTIVE ("/View/Show Grid", gdisp && appearance->grid);
|
SET_ACTIVE ("/View/Show Grid", gdisp && options->show_grid);
|
||||||
SET_ACTIVE ("/View/Snap to Grid", gdisp && shell->snap_to_grid);
|
SET_ACTIVE ("/View/Snap to Grid", gdisp && shell->snap_to_grid);
|
||||||
|
|
||||||
SET_SENSITIVE ("/View/Show Menubar", gdisp);
|
SET_SENSITIVE ("/View/Show Menubar", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Menubar", gdisp && appearance->menubar);
|
SET_ACTIVE ("/View/Show Menubar", gdisp && options->show_menubar);
|
||||||
SET_SENSITIVE ("/View/Show Rulers", gdisp);
|
SET_SENSITIVE ("/View/Show Rulers", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Rulers", gdisp && appearance->rulers);
|
SET_ACTIVE ("/View/Show Rulers", gdisp && options->show_rulers);
|
||||||
SET_SENSITIVE ("/View/Show Scrollbars", gdisp);
|
SET_SENSITIVE ("/View/Show Scrollbars", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Scrollbars", gdisp && appearance->scrollbars);
|
SET_ACTIVE ("/View/Show Scrollbars", gdisp && options->show_scrollbars);
|
||||||
SET_SENSITIVE ("/View/Show Statusbar", gdisp);
|
SET_SENSITIVE ("/View/Show Statusbar", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Statusbar", gdisp && appearance->statusbar);
|
SET_ACTIVE ("/View/Show Statusbar", gdisp && options->show_statusbar);
|
||||||
|
|
||||||
SET_SENSITIVE ("/View/Shrink Wrap", gdisp);
|
SET_SENSITIVE ("/View/Shrink Wrap", gdisp);
|
||||||
|
|
||||||
|
|
|
@ -573,7 +573,7 @@ prefs_format_string_select_callback (GtkTreeSelection *sel,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
prefs_frame_new (gchar *label,
|
prefs_frame_new (const gchar *label,
|
||||||
GtkContainer *parent,
|
GtkContainer *parent,
|
||||||
gboolean expand)
|
gboolean expand)
|
||||||
{
|
{
|
||||||
|
@ -812,6 +812,41 @@ prefs_memsize_entry_add (GObject *config,
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
prefs_display_options_frame_add (Gimp *gimp,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *label,
|
||||||
|
GtkContainer *parent)
|
||||||
|
{
|
||||||
|
GtkBox *box;
|
||||||
|
GtkWidget *table;
|
||||||
|
GtkWidget *button;
|
||||||
|
|
||||||
|
box = GTK_BOX (prefs_frame_new (label, parent, FALSE));
|
||||||
|
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-menubar", _("Show Menubar"), box);
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-rulers", _("Show _Rulers"), box);
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-scrollbars", _("Show Scrollbars"), box);
|
||||||
|
prefs_check_button_add (object,
|
||||||
|
"show-statusbar", _("Show S_tatusbar"), box);
|
||||||
|
|
||||||
|
table = prefs_table_new (2, GTK_CONTAINER (box), FALSE);
|
||||||
|
|
||||||
|
prefs_enum_option_menu_add (object, "padding-mode", 0, 0,
|
||||||
|
_("Canvas Padding Mode:"), GTK_TABLE (table), 0);
|
||||||
|
|
||||||
|
button = prefs_color_button_add (object, "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));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prefs_help_func (const gchar *help_id,
|
prefs_help_func (const gchar *help_id,
|
||||||
gpointer help_data)
|
gpointer help_data)
|
||||||
|
@ -1380,63 +1415,15 @@ prefs_dialog_new (Gimp *gimp,
|
||||||
&grandchild_iter,
|
&grandchild_iter,
|
||||||
page_index++);
|
page_index++);
|
||||||
|
|
||||||
/* Normal Mode */
|
prefs_display_options_frame_add (gimp,
|
||||||
vbox2 = prefs_frame_new (_("Default Appearance in Normal Mode"),
|
G_OBJECT (display_config->default_view),
|
||||||
GTK_CONTAINER (vbox), FALSE);
|
_("Default Appearance in Normal Mode"),
|
||||||
|
GTK_CONTAINER (vbox));
|
||||||
|
|
||||||
prefs_check_button_add (object, "show-menubar",
|
prefs_display_options_frame_add (gimp,
|
||||||
_("Show Menubar"),
|
G_OBJECT (display_config->default_fullscreen_view),
|
||||||
GTK_BOX (vbox2));
|
_("Default Appearance in Fullscreen Mode"),
|
||||||
prefs_check_button_add (object, "show-rulers",
|
GTK_CONTAINER (vbox));
|
||||||
_("Show _Rulers"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "show-scrollbars",
|
|
||||||
_("Show Scrollbars"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "show-statusbar",
|
|
||||||
_("Show S_tatusbar"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
|
|
||||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
|
||||||
|
|
||||||
prefs_enum_option_menu_add (object, "canvas-padding-mode", 0, 0,
|
|
||||||
_("Canvas Padding Mode:"),
|
|
||||||
GTK_TABLE (table), 0);
|
|
||||||
button = prefs_color_button_add (object, "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 (object, "fullscreen-show-menubar",
|
|
||||||
_("Show Menubar"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "fullscreen-show-rulers",
|
|
||||||
_("Show _Rulers"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "fullscreen-show-scrollbars",
|
|
||||||
_("Show Scrollbars"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
prefs_check_button_add (object, "fullscreen-show-statusbar",
|
|
||||||
_("Show S_tatusbar"),
|
|
||||||
GTK_BOX (vbox2));
|
|
||||||
|
|
||||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
|
||||||
|
|
||||||
prefs_enum_option_menu_add (object, "fullscreen-canvas-padding-mode", 0, 0,
|
|
||||||
_("Canvas Padding Mode:"),
|
|
||||||
GTK_TABLE (table), 0);
|
|
||||||
button = prefs_color_button_add (object, "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));
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "widgets/gimpitemfactory.h"
|
#include "widgets/gimpitemfactory.h"
|
||||||
|
|
||||||
#include "display/gimpdisplay.h"
|
#include "display/gimpdisplay.h"
|
||||||
|
#include "display/gimpdisplayoptions.h"
|
||||||
#include "display/gimpdisplayshell.h"
|
#include "display/gimpdisplayshell.h"
|
||||||
#include "display/gimpdisplayshell-appearance.h"
|
#include "display/gimpdisplayshell-appearance.h"
|
||||||
#include "display/gimpdisplayshell-selection.h"
|
#include "display/gimpdisplayshell-selection.h"
|
||||||
|
@ -1296,8 +1297,9 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
Gimp *gimp = NULL;
|
Gimp *gimp = NULL;
|
||||||
GimpDisplayShell *shell = NULL;
|
|
||||||
GimpDisplay *gdisp = NULL;
|
GimpDisplay *gdisp = NULL;
|
||||||
|
GimpDisplayShell *shell = NULL;
|
||||||
|
GimpDisplayOptions *options = NULL;
|
||||||
GimpImage *gimage = NULL;
|
GimpImage *gimage = NULL;
|
||||||
GimpDrawable *drawable = NULL;
|
GimpDrawable *drawable = NULL;
|
||||||
GimpLayer *layer = NULL;
|
GimpLayer *layer = NULL;
|
||||||
|
@ -1317,7 +1319,6 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
gint lind = -1;
|
gint lind = -1;
|
||||||
gint lnum = -1;
|
gint lnum = -1;
|
||||||
gboolean fullscreen = FALSE;
|
gboolean fullscreen = FALSE;
|
||||||
GimpDisplayShellAppearance *appearance = NULL;
|
|
||||||
|
|
||||||
gimp = GIMP_ITEM_FACTORY (item_factory)->gimp;
|
gimp = GIMP_ITEM_FACTORY (item_factory)->gimp;
|
||||||
|
|
||||||
|
@ -1366,10 +1367,7 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
|
|
||||||
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
fullscreen = gimp_display_shell_get_fullscreen (shell);
|
||||||
|
|
||||||
if (fullscreen)
|
options = fullscreen ? shell->fullscreen_options : shell->options;
|
||||||
appearance = &shell->fullscreen_appearance;
|
|
||||||
else
|
|
||||||
appearance = &shell->appearance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_context_get_foreground (gimp_get_user_context (gimp), &fg);
|
gimp_context_get_foreground (gimp_get_user_context (gimp), &fg);
|
||||||
|
@ -1491,22 +1489,22 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||||
SET_SENSITIVE ("/View/Display Filters...", gdisp);
|
SET_SENSITIVE ("/View/Display Filters...", gdisp);
|
||||||
|
|
||||||
SET_SENSITIVE ("/View/Show Selection", gdisp);
|
SET_SENSITIVE ("/View/Show Selection", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Selection", gdisp && appearance->selection);
|
SET_ACTIVE ("/View/Show Selection", gdisp && options->show_selection);
|
||||||
SET_SENSITIVE ("/View/Show Layer Boundary", gdisp);
|
SET_SENSITIVE ("/View/Show Layer Boundary", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && appearance->active_layer);
|
SET_ACTIVE ("/View/Show Layer Boundary", gdisp && options->show_active_layer);
|
||||||
SET_ACTIVE ("/View/Show Guides", gdisp && appearance->guides);
|
SET_ACTIVE ("/View/Show Guides", gdisp && options->show_guides);
|
||||||
SET_ACTIVE ("/View/Snap to Guides", gdisp && shell->snap_to_guides);
|
SET_ACTIVE ("/View/Snap to Guides", gdisp && shell->snap_to_guides);
|
||||||
SET_ACTIVE ("/View/Show Grid", gdisp && appearance->grid);
|
SET_ACTIVE ("/View/Show Grid", gdisp && options->show_grid);
|
||||||
SET_ACTIVE ("/View/Snap to Grid", gdisp && shell->snap_to_grid);
|
SET_ACTIVE ("/View/Snap to Grid", gdisp && shell->snap_to_grid);
|
||||||
|
|
||||||
SET_SENSITIVE ("/View/Show Menubar", gdisp);
|
SET_SENSITIVE ("/View/Show Menubar", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Menubar", gdisp && appearance->menubar);
|
SET_ACTIVE ("/View/Show Menubar", gdisp && options->show_menubar);
|
||||||
SET_SENSITIVE ("/View/Show Rulers", gdisp);
|
SET_SENSITIVE ("/View/Show Rulers", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Rulers", gdisp && appearance->rulers);
|
SET_ACTIVE ("/View/Show Rulers", gdisp && options->show_rulers);
|
||||||
SET_SENSITIVE ("/View/Show Scrollbars", gdisp);
|
SET_SENSITIVE ("/View/Show Scrollbars", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Scrollbars", gdisp && appearance->scrollbars);
|
SET_ACTIVE ("/View/Show Scrollbars", gdisp && options->show_scrollbars);
|
||||||
SET_SENSITIVE ("/View/Show Statusbar", gdisp);
|
SET_SENSITIVE ("/View/Show Statusbar", gdisp);
|
||||||
SET_ACTIVE ("/View/Show Statusbar", gdisp && appearance->statusbar);
|
SET_ACTIVE ("/View/Show Statusbar", gdisp && options->show_statusbar);
|
||||||
|
|
||||||
SET_SENSITIVE ("/View/Shrink Wrap", gdisp);
|
SET_SENSITIVE ("/View/Shrink Wrap", gdisp);
|
||||||
|
|
||||||
|
|
|
@ -156,20 +156,6 @@ palette path. This is a string value.
|
||||||
Specify a default gradient. The gradient is searched for in the specified
|
Specify a default gradient. The gradient is searched for in the specified
|
||||||
gradient path. This is a string value.
|
gradient path. This is a string value.
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-grid
|
|
||||||
(xspacing 10.000000)
|
|
||||||
(yspacing 10.000000)
|
|
||||||
(spacing-unit inches)
|
|
||||||
(xoffset 0.000000)
|
|
||||||
(yoffset 0.000000)
|
|
||||||
(offset-unit inches)
|
|
||||||
(fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
|
||||||
(bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
|
||||||
(style intersections))
|
|
||||||
|
|
||||||
Specify a default image grid. This is a parameter list.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(default-font "Sans")
|
(default-font "Sans")
|
||||||
|
|
||||||
|
@ -177,54 +163,32 @@ Specify a default font. The font is searched for in the fontconfig font path.
|
||||||
This is a string value.
|
This is a string value.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(default-comment "Created with The GIMP")
|
(default-image
|
||||||
|
(width 256)
|
||||||
|
(height 256)
|
||||||
|
(unit inches)
|
||||||
|
(xresolution 72.000000)
|
||||||
|
(yresolution 72.000000)
|
||||||
|
(resolution-unit inches)
|
||||||
|
(image-type rgb)
|
||||||
|
(fill-type background-fill)
|
||||||
|
(comment "Created with The GIMP"))
|
||||||
|
|
||||||
Sets the default comment. This is a string value.
|
Sets the default image in the "File/New" dialog. This is a parameter list.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(default-image-type rgb)
|
(default-grid
|
||||||
|
(style intersections)
|
||||||
|
(fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
||||||
|
(bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
||||||
|
(xspacing 10.000000)
|
||||||
|
(yspacing 10.000000)
|
||||||
|
(spacing-unit inches)
|
||||||
|
(xoffset 0.000000)
|
||||||
|
(yoffset 0.000000)
|
||||||
|
(offset-unit inches))
|
||||||
|
|
||||||
Sets the default image type in the "File/New" dialog. Possible values are
|
Specify a default image grid. This is a parameter list.
|
||||||
rgb, gray and indexed.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-image-width 256)
|
|
||||||
|
|
||||||
Sets the default image width in the "File/New" dialog. This is an integer
|
|
||||||
value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-image-height 256)
|
|
||||||
|
|
||||||
Sets the default image height in the "File/New" dialog. This is an integer
|
|
||||||
value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-unit inches)
|
|
||||||
|
|
||||||
Sets the default unit for new images and for the "File/New" dialog. This units
|
|
||||||
will be used for coordinate display when not in dot-for-dot mode. The unit
|
|
||||||
can be one inches, millimeters, points or picas plus those in your user units
|
|
||||||
database.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-xresolution 72.000000)
|
|
||||||
|
|
||||||
Sets the default horizontal resolution for new images and for the "File/New"
|
|
||||||
dialog. This value is always in dpi (dots per inch). This is a float value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-yresolution 72.000000)
|
|
||||||
|
|
||||||
Sets the default vertical resolution for new images and for the "File/New"
|
|
||||||
dialog. This value is always in dpi (dots per inch). This is a float value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-resolution-unit inches)
|
|
||||||
|
|
||||||
Sets the units for the display of the default resolution in the "File/New"
|
|
||||||
dialog. The unit can be one inches, millimeters, points or picas plus those
|
|
||||||
in your user units database.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(undo-levels 5)
|
(undo-levels 5)
|
||||||
|
@ -234,13 +198,14 @@ kept available until the undo-size limit is reached. This is an integer
|
||||||
value.
|
value.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(undo-size 1024k)
|
(undo-size 4M)
|
||||||
|
|
||||||
Sets an upper limit to the memory that is used per image to keep operations on
|
Sets an upper limit to the memory that is used per image to keep operations on
|
||||||
the undo stack. The integer size can contain a suffix of 'B', 'K', 'M' or 'G'
|
the undo stack. Regardless of this setting, at least as many undo-levels as
|
||||||
which makes GIMP interpret the size as being specified in bytes, kilobytes,
|
configured can be undone. The integer size can contain a suffix of 'B', 'K',
|
||||||
megabytes or gigabytes. If no suffix is specified the size defaults to being
|
'M' or 'G' which makes GIMP interpret the size as being specified in bytes,
|
||||||
specified in kilobytes.
|
kilobytes, megabytes or gigabytes. If no suffix is specified the size defaults
|
||||||
|
to being specified in kilobytes.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(pluginrc-path "${gimp_dir}/pluginrc")
|
(pluginrc-path "${gimp_dir}/pluginrc")
|
||||||
|
@ -324,7 +289,7 @@ opened, otherwise it will be displayed with a scale of 1:1. Possible values
|
||||||
are yes and no.
|
are yes and no.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(perfect-mouse no)
|
(perfect-mouse yes)
|
||||||
|
|
||||||
When enabled, the X server is queried for the mouse's current position on each
|
When enabled, the X server is queried for the mouse's current position on each
|
||||||
motion event, rather than relying on the position hint. This means painting
|
motion event, rather than relying on the position hint. This means painting
|
||||||
|
@ -352,7 +317,7 @@ When enabled, all paint tools will show a preview of the current brush's
|
||||||
outline. Possible values are yes and no.
|
outline. Possible values are yes and no.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(image-title-format "%f-%p.%i (%t)")
|
(image-title-format "%f-%p.%i (%t, %L) %z%%")
|
||||||
|
|
||||||
Sets the text to appear in image window titles. This is a format string;
|
Sets the text to appear in image window titles. This is a format string;
|
||||||
certain % character sequences are recognised and expanded as follows:
|
certain % character sequences are recognised and expanded as follows:
|
||||||
|
@ -381,11 +346,13 @@ certain % character sequences are recognised and expanded as follows:
|
||||||
.br
|
.br
|
||||||
%Cx expands to x if the image is clean, the empty string otherwise
|
%Cx expands to x if the image is clean, the empty string otherwise
|
||||||
.br
|
.br
|
||||||
%m memory used by the image
|
|
||||||
.br
|
|
||||||
%l the number of layers
|
%l the number of layers
|
||||||
.br
|
.br
|
||||||
%L the name of the active layer/channel
|
%L the number of layers (long form)
|
||||||
|
.br
|
||||||
|
%m memory used by the image
|
||||||
|
.br
|
||||||
|
%n the name of the active layer/channel
|
||||||
.br
|
.br
|
||||||
%w image width in pixels
|
%w image width in pixels
|
||||||
.br
|
.br
|
||||||
|
@ -403,7 +370,7 @@ certain % character sequences are recognised and expanded as follows:
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(image-status-format "%f-%p.%i (%t)")
|
(image-status-format "%n (%m)")
|
||||||
|
|
||||||
Sets the text to appear in image window status bars. This is a format string;
|
Sets the text to appear in image window status bars. This is a format string;
|
||||||
certain % character sequences are recognised and expanded as follows:
|
certain % character sequences are recognised and expanded as follows:
|
||||||
|
@ -432,11 +399,13 @@ certain % character sequences are recognised and expanded as follows:
|
||||||
.br
|
.br
|
||||||
%Cx expands to x if the image is clean, the empty string otherwise
|
%Cx expands to x if the image is clean, the empty string otherwise
|
||||||
.br
|
.br
|
||||||
%m memory used by the image
|
|
||||||
.br
|
|
||||||
%l the number of layers
|
%l the number of layers
|
||||||
.br
|
.br
|
||||||
%L the name of the active layer/channel
|
%L the number of layers (long form)
|
||||||
|
.br
|
||||||
|
%m memory used by the image
|
||||||
|
.br
|
||||||
|
%n the name of the active layer/channel
|
||||||
.br
|
.br
|
||||||
%w image width in pixels
|
%w image width in pixels
|
||||||
.br
|
.br
|
||||||
|
@ -487,82 +456,35 @@ the image window. Possible values are tiny, extra-small, small, medium,
|
||||||
large, extra-large, huge, enormous and gigantic.
|
large, extra-large, huge, enormous and gigantic.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(show-menubar yes)
|
(default-view
|
||||||
|
(show-menubar yes)
|
||||||
|
(show-rulers yes)
|
||||||
|
(show-scrollbars yes)
|
||||||
|
(show-statusbar yes)
|
||||||
|
(show-selection yes)
|
||||||
|
(show-active-layer yes)
|
||||||
|
(show-guides yes)
|
||||||
|
(show-grid no)
|
||||||
|
(padding-mode default)
|
||||||
|
(padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000)))
|
||||||
|
|
||||||
When enabled, the menubar is visible by default. This can also be toggled with
|
Sets the default settings for the image view. This is a parameter list.
|
||||||
the "View->Show Menubar" command. Possible values are yes and no.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(show-rulers yes)
|
(default-fullscreen-view
|
||||||
|
(show-menubar no)
|
||||||
|
(show-rulers no)
|
||||||
|
(show-scrollbars no)
|
||||||
|
(show-statusbar no)
|
||||||
|
(show-selection no)
|
||||||
|
(show-active-layer no)
|
||||||
|
(show-guides no)
|
||||||
|
(show-grid no)
|
||||||
|
(padding-mode custom)
|
||||||
|
(padding-color (color-rgba 0.000000 0.000000 0.000000 1.000000)))
|
||||||
|
|
||||||
When enabled, the rulers are visible by default. This can also be toggled with
|
Sets the default settings used when an image is viewed in fullscreen mode.
|
||||||
the "View->Show Rulers" command. Possible values are yes and no.
|
This is a parameter list.
|
||||||
|
|
||||||
.TP
|
|
||||||
(show-scrollbars yes)
|
|
||||||
|
|
||||||
When enabled, the scrollbars are visible by default. This can also be toggled
|
|
||||||
with the "View->Show Scrollbars" command. Possible values are yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(show-statusbar yes)
|
|
||||||
|
|
||||||
When enabled, the statusbar is visible by default. This can also be toggled
|
|
||||||
with the "View->Show Statusbar" command. Possible values are yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(canvas-padding-mode default)
|
|
||||||
|
|
||||||
Specifies how the area around the image should be drawn. Possible values are
|
|
||||||
default, light-check, dark-check and custom.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(canvas-padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
|
||||||
|
|
||||||
Sets the canvas padding color used if the padding mode is set to custom color.
|
|
||||||
The color is specified in the form (color-rgba red green blue alpha) with
|
|
||||||
channel values as floats between 0.0 and 1.0.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-menubar no)
|
|
||||||
|
|
||||||
When enabled, the menubar is visible by default in fullscreen mode. This can
|
|
||||||
also be toggled with the "View->Show Menubar" command. Possible values are
|
|
||||||
yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-rulers no)
|
|
||||||
|
|
||||||
When enabled, the rulers are visible by default in fullscreen mode. This can
|
|
||||||
also be toggled with the "View->Show Rulers" command. Possible values are yes
|
|
||||||
and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-scrollbars no)
|
|
||||||
|
|
||||||
When enabled, the scrollbars are visible by default in fullscreen mode. This
|
|
||||||
can also be toggled with the "View->Show Scrollbars" command. Possible values
|
|
||||||
are yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-statusbar no)
|
|
||||||
|
|
||||||
When enabled, the statusbar is visible by default in fullscreen mode. This can
|
|
||||||
also be toggled with the "View->Show Statusbar" command. Possible values are
|
|
||||||
yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-canvas-padding-mode custom)
|
|
||||||
|
|
||||||
Specifies how the area around the image should be drawn when in fullscreen
|
|
||||||
mode. Possible values are default, light-check, dark-check and custom.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-canvas-padding-color (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
|
||||||
|
|
||||||
Sets the canvas padding color used when in fullscreen mode and the padding
|
|
||||||
mode is set to custom color. The color is specified in the form (color-rgba
|
|
||||||
red green blue alpha) with channel values as floats between 0.0 and 1.0.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(transparency-size medium-checks)
|
(transparency-size medium-checks)
|
||||||
|
|
210
docs/gimprc.5.in
210
docs/gimprc.5.in
|
@ -156,20 +156,6 @@ palette path. This is a string value.
|
||||||
Specify a default gradient. The gradient is searched for in the specified
|
Specify a default gradient. The gradient is searched for in the specified
|
||||||
gradient path. This is a string value.
|
gradient path. This is a string value.
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-grid
|
|
||||||
(xspacing 10.000000)
|
|
||||||
(yspacing 10.000000)
|
|
||||||
(spacing-unit inches)
|
|
||||||
(xoffset 0.000000)
|
|
||||||
(yoffset 0.000000)
|
|
||||||
(offset-unit inches)
|
|
||||||
(fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
|
||||||
(bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
|
||||||
(style intersections))
|
|
||||||
|
|
||||||
Specify a default image grid. This is a parameter list.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(default-font "Sans")
|
(default-font "Sans")
|
||||||
|
|
||||||
|
@ -177,54 +163,32 @@ Specify a default font. The font is searched for in the fontconfig font path.
|
||||||
This is a string value.
|
This is a string value.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(default-comment "Created with The GIMP")
|
(default-image
|
||||||
|
(width 256)
|
||||||
|
(height 256)
|
||||||
|
(unit inches)
|
||||||
|
(xresolution 72.000000)
|
||||||
|
(yresolution 72.000000)
|
||||||
|
(resolution-unit inches)
|
||||||
|
(image-type rgb)
|
||||||
|
(fill-type background-fill)
|
||||||
|
(comment "Created with The GIMP"))
|
||||||
|
|
||||||
Sets the default comment. This is a string value.
|
Sets the default image in the "File/New" dialog. This is a parameter list.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(default-image-type rgb)
|
(default-grid
|
||||||
|
(style intersections)
|
||||||
|
(fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
||||||
|
(bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
||||||
|
(xspacing 10.000000)
|
||||||
|
(yspacing 10.000000)
|
||||||
|
(spacing-unit inches)
|
||||||
|
(xoffset 0.000000)
|
||||||
|
(yoffset 0.000000)
|
||||||
|
(offset-unit inches))
|
||||||
|
|
||||||
Sets the default image type in the "File/New" dialog. Possible values are
|
Specify a default image grid. This is a parameter list.
|
||||||
rgb, gray and indexed.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-image-width 256)
|
|
||||||
|
|
||||||
Sets the default image width in the "File/New" dialog. This is an integer
|
|
||||||
value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-image-height 256)
|
|
||||||
|
|
||||||
Sets the default image height in the "File/New" dialog. This is an integer
|
|
||||||
value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-unit inches)
|
|
||||||
|
|
||||||
Sets the default unit for new images and for the "File/New" dialog. This units
|
|
||||||
will be used for coordinate display when not in dot-for-dot mode. The unit
|
|
||||||
can be one inches, millimeters, points or picas plus those in your user units
|
|
||||||
database.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-xresolution 72.000000)
|
|
||||||
|
|
||||||
Sets the default horizontal resolution for new images and for the "File/New"
|
|
||||||
dialog. This value is always in dpi (dots per inch). This is a float value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-yresolution 72.000000)
|
|
||||||
|
|
||||||
Sets the default vertical resolution for new images and for the "File/New"
|
|
||||||
dialog. This value is always in dpi (dots per inch). This is a float value.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(default-resolution-unit inches)
|
|
||||||
|
|
||||||
Sets the units for the display of the default resolution in the "File/New"
|
|
||||||
dialog. The unit can be one inches, millimeters, points or picas plus those
|
|
||||||
in your user units database.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(undo-levels 5)
|
(undo-levels 5)
|
||||||
|
@ -234,13 +198,14 @@ kept available until the undo-size limit is reached. This is an integer
|
||||||
value.
|
value.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(undo-size 1024k)
|
(undo-size 4M)
|
||||||
|
|
||||||
Sets an upper limit to the memory that is used per image to keep operations on
|
Sets an upper limit to the memory that is used per image to keep operations on
|
||||||
the undo stack. The integer size can contain a suffix of 'B', 'K', 'M' or 'G'
|
the undo stack. Regardless of this setting, at least as many undo-levels as
|
||||||
which makes GIMP interpret the size as being specified in bytes, kilobytes,
|
configured can be undone. The integer size can contain a suffix of 'B', 'K',
|
||||||
megabytes or gigabytes. If no suffix is specified the size defaults to being
|
'M' or 'G' which makes GIMP interpret the size as being specified in bytes,
|
||||||
specified in kilobytes.
|
kilobytes, megabytes or gigabytes. If no suffix is specified the size defaults
|
||||||
|
to being specified in kilobytes.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(pluginrc-path "${gimp_dir}/pluginrc")
|
(pluginrc-path "${gimp_dir}/pluginrc")
|
||||||
|
@ -324,7 +289,7 @@ opened, otherwise it will be displayed with a scale of 1:1. Possible values
|
||||||
are yes and no.
|
are yes and no.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(perfect-mouse no)
|
(perfect-mouse yes)
|
||||||
|
|
||||||
When enabled, the X server is queried for the mouse's current position on each
|
When enabled, the X server is queried for the mouse's current position on each
|
||||||
motion event, rather than relying on the position hint. This means painting
|
motion event, rather than relying on the position hint. This means painting
|
||||||
|
@ -352,7 +317,7 @@ When enabled, all paint tools will show a preview of the current brush's
|
||||||
outline. Possible values are yes and no.
|
outline. Possible values are yes and no.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(image-title-format "%f-%p.%i (%t)")
|
(image-title-format "%f-%p.%i (%t, %L) %z%%")
|
||||||
|
|
||||||
Sets the text to appear in image window titles. This is a format string;
|
Sets the text to appear in image window titles. This is a format string;
|
||||||
certain % character sequences are recognised and expanded as follows:
|
certain % character sequences are recognised and expanded as follows:
|
||||||
|
@ -381,11 +346,13 @@ certain % character sequences are recognised and expanded as follows:
|
||||||
.br
|
.br
|
||||||
%Cx expands to x if the image is clean, the empty string otherwise
|
%Cx expands to x if the image is clean, the empty string otherwise
|
||||||
.br
|
.br
|
||||||
%m memory used by the image
|
|
||||||
.br
|
|
||||||
%l the number of layers
|
%l the number of layers
|
||||||
.br
|
.br
|
||||||
%L the name of the active layer/channel
|
%L the number of layers (long form)
|
||||||
|
.br
|
||||||
|
%m memory used by the image
|
||||||
|
.br
|
||||||
|
%n the name of the active layer/channel
|
||||||
.br
|
.br
|
||||||
%w image width in pixels
|
%w image width in pixels
|
||||||
.br
|
.br
|
||||||
|
@ -403,7 +370,7 @@ certain % character sequences are recognised and expanded as follows:
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(image-status-format "%f-%p.%i (%t)")
|
(image-status-format "%n (%m)")
|
||||||
|
|
||||||
Sets the text to appear in image window status bars. This is a format string;
|
Sets the text to appear in image window status bars. This is a format string;
|
||||||
certain % character sequences are recognised and expanded as follows:
|
certain % character sequences are recognised and expanded as follows:
|
||||||
|
@ -432,11 +399,13 @@ certain % character sequences are recognised and expanded as follows:
|
||||||
.br
|
.br
|
||||||
%Cx expands to x if the image is clean, the empty string otherwise
|
%Cx expands to x if the image is clean, the empty string otherwise
|
||||||
.br
|
.br
|
||||||
%m memory used by the image
|
|
||||||
.br
|
|
||||||
%l the number of layers
|
%l the number of layers
|
||||||
.br
|
.br
|
||||||
%L the name of the active layer/channel
|
%L the number of layers (long form)
|
||||||
|
.br
|
||||||
|
%m memory used by the image
|
||||||
|
.br
|
||||||
|
%n the name of the active layer/channel
|
||||||
.br
|
.br
|
||||||
%w image width in pixels
|
%w image width in pixels
|
||||||
.br
|
.br
|
||||||
|
@ -487,82 +456,35 @@ the image window. Possible values are tiny, extra-small, small, medium,
|
||||||
large, extra-large, huge, enormous and gigantic.
|
large, extra-large, huge, enormous and gigantic.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(show-menubar yes)
|
(default-view
|
||||||
|
(show-menubar yes)
|
||||||
|
(show-rulers yes)
|
||||||
|
(show-scrollbars yes)
|
||||||
|
(show-statusbar yes)
|
||||||
|
(show-selection yes)
|
||||||
|
(show-active-layer yes)
|
||||||
|
(show-guides yes)
|
||||||
|
(show-grid no)
|
||||||
|
(padding-mode default)
|
||||||
|
(padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000)))
|
||||||
|
|
||||||
When enabled, the menubar is visible by default. This can also be toggled with
|
Sets the default settings for the image view. This is a parameter list.
|
||||||
the "View->Show Menubar" command. Possible values are yes and no.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(show-rulers yes)
|
(default-fullscreen-view
|
||||||
|
(show-menubar no)
|
||||||
|
(show-rulers no)
|
||||||
|
(show-scrollbars no)
|
||||||
|
(show-statusbar no)
|
||||||
|
(show-selection no)
|
||||||
|
(show-active-layer no)
|
||||||
|
(show-guides no)
|
||||||
|
(show-grid no)
|
||||||
|
(padding-mode custom)
|
||||||
|
(padding-color (color-rgba 0.000000 0.000000 0.000000 1.000000)))
|
||||||
|
|
||||||
When enabled, the rulers are visible by default. This can also be toggled with
|
Sets the default settings used when an image is viewed in fullscreen mode.
|
||||||
the "View->Show Rulers" command. Possible values are yes and no.
|
This is a parameter list.
|
||||||
|
|
||||||
.TP
|
|
||||||
(show-scrollbars yes)
|
|
||||||
|
|
||||||
When enabled, the scrollbars are visible by default. This can also be toggled
|
|
||||||
with the "View->Show Scrollbars" command. Possible values are yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(show-statusbar yes)
|
|
||||||
|
|
||||||
When enabled, the statusbar is visible by default. This can also be toggled
|
|
||||||
with the "View->Show Statusbar" command. Possible values are yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(canvas-padding-mode default)
|
|
||||||
|
|
||||||
Specifies how the area around the image should be drawn. Possible values are
|
|
||||||
default, light-check, dark-check and custom.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(canvas-padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
|
||||||
|
|
||||||
Sets the canvas padding color used if the padding mode is set to custom color.
|
|
||||||
The color is specified in the form (color-rgba red green blue alpha) with
|
|
||||||
channel values as floats between 0.0 and 1.0.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-menubar no)
|
|
||||||
|
|
||||||
When enabled, the menubar is visible by default in fullscreen mode. This can
|
|
||||||
also be toggled with the "View->Show Menubar" command. Possible values are
|
|
||||||
yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-rulers no)
|
|
||||||
|
|
||||||
When enabled, the rulers are visible by default in fullscreen mode. This can
|
|
||||||
also be toggled with the "View->Show Rulers" command. Possible values are yes
|
|
||||||
and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-scrollbars no)
|
|
||||||
|
|
||||||
When enabled, the scrollbars are visible by default in fullscreen mode. This
|
|
||||||
can also be toggled with the "View->Show Scrollbars" command. Possible values
|
|
||||||
are yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-show-statusbar no)
|
|
||||||
|
|
||||||
When enabled, the statusbar is visible by default in fullscreen mode. This can
|
|
||||||
also be toggled with the "View->Show Statusbar" command. Possible values are
|
|
||||||
yes and no.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-canvas-padding-mode custom)
|
|
||||||
|
|
||||||
Specifies how the area around the image should be drawn when in fullscreen
|
|
||||||
mode. Possible values are default, light-check, dark-check and custom.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
(fullscreen-canvas-padding-color (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
|
||||||
|
|
||||||
Sets the canvas padding color used when in fullscreen mode and the padding
|
|
||||||
mode is set to custom color. The color is specified in the form (color-rgba
|
|
||||||
red green blue alpha) with channel values as floats between 0.0 and 1.0.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
(transparency-size medium-checks)
|
(transparency-size medium-checks)
|
||||||
|
|
183
etc/gimprc
183
etc/gimprc
|
@ -117,67 +117,36 @@
|
||||||
#
|
#
|
||||||
# (default-gradient "FG to BG (RGB)")
|
# (default-gradient "FG to BG (RGB)")
|
||||||
|
|
||||||
# Specify a default image grid. This is a parameter list.
|
|
||||||
#
|
|
||||||
# (default-grid
|
|
||||||
# (xspacing 10.000000)
|
|
||||||
# (yspacing 10.000000)
|
|
||||||
# (spacing-unit inches)
|
|
||||||
# (xoffset 0.000000)
|
|
||||||
# (yoffset 0.000000)
|
|
||||||
# (offset-unit inches)
|
|
||||||
# (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
|
||||||
# (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
|
||||||
# (style intersections))
|
|
||||||
|
|
||||||
# Specify a default font. The font is searched for in the fontconfig font
|
# Specify a default font. The font is searched for in the fontconfig font
|
||||||
# path. This is a string value.
|
# path. This is a string value.
|
||||||
#
|
#
|
||||||
# (default-font "Sans")
|
# (default-font "Sans")
|
||||||
|
|
||||||
# Sets the default comment. This is a string value.
|
# Sets the default image in the "File/New" dialog. This is a parameter list.
|
||||||
#
|
#
|
||||||
# (default-comment "Created with The GIMP")
|
# (default-image
|
||||||
|
# (width 256)
|
||||||
|
# (height 256)
|
||||||
|
# (unit inches)
|
||||||
|
# (xresolution 72.000000)
|
||||||
|
# (yresolution 72.000000)
|
||||||
|
# (resolution-unit inches)
|
||||||
|
# (image-type rgb)
|
||||||
|
# (fill-type background-fill)
|
||||||
|
# (comment "Created with The GIMP"))
|
||||||
|
|
||||||
# Sets the default image type in the "File/New" dialog. Possible values are
|
# Specify a default image grid. This is a parameter list.
|
||||||
# rgb, gray and indexed.
|
|
||||||
#
|
#
|
||||||
# (default-image-type rgb)
|
# (default-grid
|
||||||
|
# (style intersections)
|
||||||
# Sets the default image width in the "File/New" dialog. This is an integer
|
# (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
||||||
# value.
|
# (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
||||||
#
|
# (xspacing 10.000000)
|
||||||
# (default-image-width 256)
|
# (yspacing 10.000000)
|
||||||
|
# (spacing-unit inches)
|
||||||
# Sets the default image height in the "File/New" dialog. This is an integer
|
# (xoffset 0.000000)
|
||||||
# value.
|
# (yoffset 0.000000)
|
||||||
#
|
# (offset-unit inches))
|
||||||
# (default-image-height 256)
|
|
||||||
|
|
||||||
# Sets the default unit for new images and for the "File/New" dialog. This
|
|
||||||
# units will be used for coordinate display when not in dot-for-dot mode.
|
|
||||||
# The unit can be one inches, millimeters, points or picas plus those in your
|
|
||||||
# user units database.
|
|
||||||
#
|
|
||||||
# (default-unit inches)
|
|
||||||
|
|
||||||
# Sets the default horizontal resolution for new images and for the
|
|
||||||
# "File/New" dialog. This value is always in dpi (dots per inch). This is a
|
|
||||||
# float value.
|
|
||||||
#
|
|
||||||
# (default-xresolution 72.000000)
|
|
||||||
|
|
||||||
# Sets the default vertical resolution for new images and for the "File/New"
|
|
||||||
# dialog. This value is always in dpi (dots per inch). This is a float
|
|
||||||
# value.
|
|
||||||
#
|
|
||||||
# (default-yresolution 72.000000)
|
|
||||||
|
|
||||||
# Sets the units for the display of the default resolution in the "File/New"
|
|
||||||
# dialog. The unit can be one inches, millimeters, points or picas plus
|
|
||||||
# those in your user units database.
|
|
||||||
#
|
|
||||||
# (default-resolution-unit inches)
|
|
||||||
|
|
||||||
# Sets the minimal number of operations that can be undone. More undo levels
|
# Sets the minimal number of operations that can be undone. More undo levels
|
||||||
# are kept available until the undo-size limit is reached. This is an
|
# are kept available until the undo-size limit is reached. This is an
|
||||||
|
@ -186,12 +155,13 @@
|
||||||
# (undo-levels 5)
|
# (undo-levels 5)
|
||||||
|
|
||||||
# Sets an upper limit to the memory that is used per image to keep operations
|
# Sets an upper limit to the memory that is used per image to keep operations
|
||||||
# on the undo stack. The integer size can contain a suffix of 'B', 'K', 'M'
|
# on the undo stack. Regardless of this setting, at least as many undo-levels
|
||||||
# or 'G' which makes GIMP interpret the size as being specified in bytes,
|
# as configured can be undone. The integer size can contain a suffix of 'B',
|
||||||
# kilobytes, megabytes or gigabytes. If no suffix is specified the size
|
# 'K', 'M' or 'G' which makes GIMP interpret the size as being specified in
|
||||||
# defaults to being specified in kilobytes.
|
# bytes, kilobytes, megabytes or gigabytes. If no suffix is specified the
|
||||||
|
# size defaults to being specified in kilobytes.
|
||||||
#
|
#
|
||||||
# (undo-size 1024k)
|
# (undo-size 4M)
|
||||||
|
|
||||||
# Sets the pluginrc search path. This is a single filename.
|
# Sets the pluginrc search path. This is a single filename.
|
||||||
#
|
#
|
||||||
|
@ -268,7 +238,7 @@
|
||||||
# Perversely, on some X servers enabling this option results in faster
|
# Perversely, on some X servers enabling this option results in faster
|
||||||
# painting. Possible values are yes and no.
|
# painting. Possible values are yes and no.
|
||||||
#
|
#
|
||||||
# (perfect-mouse no)
|
# (perfect-mouse yes)
|
||||||
|
|
||||||
# Sets the mode of cursor the GIMP will use. Possible values are tool-icon,
|
# Sets the mode of cursor the GIMP will use. Possible values are tool-icon,
|
||||||
# tool-crosshair and crosshair.
|
# tool-crosshair and crosshair.
|
||||||
|
@ -300,9 +270,10 @@
|
||||||
# %d destination scale factor
|
# %d destination scale factor
|
||||||
# %Dx expands to x if the image is dirty, the empty string otherwise
|
# %Dx expands to x if the image is dirty, the empty string otherwise
|
||||||
# %Cx expands to x if the image is clean, the empty string otherwise
|
# %Cx expands to x if the image is clean, the empty string otherwise
|
||||||
# %m memory used by the image
|
|
||||||
# %l the number of layers
|
# %l the number of layers
|
||||||
# %L the name of the active layer/channel
|
# %L the number of layers (long form)
|
||||||
|
# %m memory used by the image
|
||||||
|
# %n the name of the active layer/channel
|
||||||
# %w image width in pixels
|
# %w image width in pixels
|
||||||
# %W image width in real-world units
|
# %W image width in real-world units
|
||||||
# %h image height in pixels
|
# %h image height in pixels
|
||||||
|
@ -311,7 +282,7 @@
|
||||||
# %U unit abbreviation
|
# %U unit abbreviation
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# (image-title-format "%f-%p.%i (%t)")
|
# (image-title-format "%f-%p.%i (%t, %L) %z%%")
|
||||||
|
|
||||||
# Sets the text to appear in image window status bars. This is a format
|
# Sets the text to appear in image window status bars. This is a format
|
||||||
# string; certain % character sequences are recognised and expanded as
|
# string; certain % character sequences are recognised and expanded as
|
||||||
|
@ -328,9 +299,10 @@
|
||||||
# %d destination scale factor
|
# %d destination scale factor
|
||||||
# %Dx expands to x if the image is dirty, the empty string otherwise
|
# %Dx expands to x if the image is dirty, the empty string otherwise
|
||||||
# %Cx expands to x if the image is clean, the empty string otherwise
|
# %Cx expands to x if the image is clean, the empty string otherwise
|
||||||
# %m memory used by the image
|
|
||||||
# %l the number of layers
|
# %l the number of layers
|
||||||
# %L the name of the active layer/channel
|
# %L the number of layers (long form)
|
||||||
|
# %m memory used by the image
|
||||||
|
# %n the name of the active layer/channel
|
||||||
# %w image width in pixels
|
# %w image width in pixels
|
||||||
# %W image width in real-world units
|
# %W image width in real-world units
|
||||||
# %h image height in pixels
|
# %h image height in pixels
|
||||||
|
@ -339,7 +311,7 @@
|
||||||
# %U unit abbreviation
|
# %U unit abbreviation
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# (image-status-format "%f-%p.%i (%t)")
|
# (image-status-format "%n (%m)")
|
||||||
|
|
||||||
# Ask for confirmation before closing an image without saving. Possible
|
# Ask for confirmation before closing an image without saving. Possible
|
||||||
# values are yes and no.
|
# values are yes and no.
|
||||||
|
@ -369,73 +341,34 @@
|
||||||
#
|
#
|
||||||
# (navigation-preview-size medium)
|
# (navigation-preview-size medium)
|
||||||
|
|
||||||
# When enabled, the menubar is visible by default. This can also be toggled
|
# Sets the default settings for the image view. This is a parameter list.
|
||||||
# with the "View->Show Menubar" command. Possible values are yes and no.
|
|
||||||
#
|
#
|
||||||
|
# (default-view
|
||||||
# (show-menubar yes)
|
# (show-menubar yes)
|
||||||
|
|
||||||
# When enabled, the rulers are visible by default. This can also be toggled
|
|
||||||
# with the "View->Show Rulers" command. Possible values are yes and no.
|
|
||||||
#
|
|
||||||
# (show-rulers yes)
|
# (show-rulers yes)
|
||||||
|
|
||||||
# When enabled, the scrollbars are visible by default. This can also be
|
|
||||||
# toggled with the "View->Show Scrollbars" command. Possible values are yes
|
|
||||||
# and no.
|
|
||||||
#
|
|
||||||
# (show-scrollbars yes)
|
# (show-scrollbars yes)
|
||||||
|
|
||||||
# When enabled, the statusbar is visible by default. This can also be toggled
|
|
||||||
# with the "View->Show Statusbar" command. Possible values are yes and no.
|
|
||||||
#
|
|
||||||
# (show-statusbar yes)
|
# (show-statusbar yes)
|
||||||
|
# (show-selection yes)
|
||||||
|
# (show-active-layer yes)
|
||||||
|
# (show-guides yes)
|
||||||
|
# (show-grid no)
|
||||||
|
# (padding-mode default)
|
||||||
|
# (padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000)))
|
||||||
|
|
||||||
# Specifies how the area around the image should be drawn. Possible values
|
# Sets the default settings used when an image is viewed in fullscreen mode.
|
||||||
# are default, light-check, dark-check and custom.
|
# This is a parameter list.
|
||||||
#
|
#
|
||||||
# (canvas-padding-mode default)
|
# (default-fullscreen-view
|
||||||
|
# (show-menubar no)
|
||||||
# Sets the canvas padding color used if the padding mode is set to custom
|
# (show-rulers no)
|
||||||
# color. The color is specified in the form (color-rgba red green blue
|
# (show-scrollbars no)
|
||||||
# alpha) with channel values as floats between 0.0 and 1.0.
|
# (show-statusbar no)
|
||||||
#
|
# (show-selection no)
|
||||||
# (canvas-padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000))
|
# (show-active-layer no)
|
||||||
|
# (show-guides no)
|
||||||
# When enabled, the menubar is visible by default in fullscreen mode. This
|
# (show-grid no)
|
||||||
# can also be toggled with the "View->Show Menubar" command. Possible values
|
# (padding-mode custom)
|
||||||
# are yes and no.
|
# (padding-color (color-rgba 0.000000 0.000000 0.000000 1.000000)))
|
||||||
#
|
|
||||||
# (fullscreen-show-menubar no)
|
|
||||||
|
|
||||||
# When enabled, the rulers are visible by default in fullscreen mode. This
|
|
||||||
# can also be toggled with the "View->Show Rulers" command. Possible values
|
|
||||||
# are yes and no.
|
|
||||||
#
|
|
||||||
# (fullscreen-show-rulers no)
|
|
||||||
|
|
||||||
# When enabled, the scrollbars are visible by default in fullscreen mode.
|
|
||||||
# This can also be toggled with the "View->Show Scrollbars" command.
|
|
||||||
# Possible values are yes and no.
|
|
||||||
#
|
|
||||||
# (fullscreen-show-scrollbars no)
|
|
||||||
|
|
||||||
# When enabled, the statusbar is visible by default in fullscreen mode. This
|
|
||||||
# can also be toggled with the "View->Show Statusbar" command. Possible
|
|
||||||
# values are yes and no.
|
|
||||||
#
|
|
||||||
# (fullscreen-show-statusbar no)
|
|
||||||
|
|
||||||
# Specifies how the area around the image should be drawn when in fullscreen
|
|
||||||
# mode. Possible values are default, light-check, dark-check and custom.
|
|
||||||
#
|
|
||||||
# (fullscreen-canvas-padding-mode custom)
|
|
||||||
|
|
||||||
# Sets the canvas padding color used when in fullscreen mode and the padding
|
|
||||||
# mode is set to custom color. The color is specified in the form
|
|
||||||
# (color-rgba red green blue alpha) with channel values as floats between 0.0
|
|
||||||
# and 1.0.
|
|
||||||
#
|
|
||||||
# (fullscreen-canvas-padding-color (color-rgba 0.000000 0.000000 0.000000 1.000000))
|
|
||||||
|
|
||||||
# Sets the size of the checkerboard used to display transparency. Possible
|
# Sets the size of the checkerboard used to display transparency. Possible
|
||||||
# values are small-checks, medium-checks and large-checks.
|
# values are small-checks, medium-checks and large-checks.
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2003-10-22 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* POTFILES.in: added app/display/gimpdisplayoptions.c.
|
||||||
|
|
||||||
2003-10-21 Miloslav Trmac <mitr@volny.cz>
|
2003-10-21 Miloslav Trmac <mitr@volny.cz>
|
||||||
|
|
||||||
* cs.po: Updated Czech translation.
|
* cs.po: Updated Czech translation.
|
||||||
|
|
|
@ -66,6 +66,7 @@ app/core/gimpunit.c
|
||||||
|
|
||||||
app/display/display-enums.c
|
app/display/display-enums.c
|
||||||
app/display/gimpdisplay.c
|
app/display/gimpdisplay.c
|
||||||
|
app/display/gimpdisplayoptions.c
|
||||||
app/display/gimpdisplayshell.c
|
app/display/gimpdisplayshell.c
|
||||||
app/display/gimpdisplayshell-callbacks.c
|
app/display/gimpdisplayshell-callbacks.c
|
||||||
app/display/gimpdisplayshell-dnd.c
|
app/display/gimpdisplayshell-dnd.c
|
||||||
|
|
Loading…
Reference in New Issue