Commit 840e5f46 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/config/gimpguiconfig.[ch] added new gimprc option "transient-docks".

2005-05-12  Sven Neumann  <sven@gimp.org>

	* app/config/gimpguiconfig.[ch]
	* app/config/gimprc-blurbs.h: added new gimprc option
	"transient-docks".

	* app/widgets/gimpimagedock.c (gimp_image_dock_display_changed):
	as an experiment
	, obey the "transient-docks" preference and set
	the dock window transient to the active display shell. Please
	comment on the behaviour you observe.

	* app/dialogs/preferences-dialog.c (prefs_dialog_new): added a
	view on the new gimprc property.

	* app/config/gimpguiconfig.[ch]: set the IGNORE flag on the
	"info-window-per-display" property; it isn't used any longer.

	* app/config/gimpconfig-dump.c (dump_gimprc_system): don't dump
	properties that have the GIMP_CONFIG_PARAM_IGNORE flag set.
parent c9933fca
2005-05-12 Sven Neumann <sven@gimp.org>
* app/config/gimpguiconfig.[ch]
* app/config/gimprc-blurbs.h: added new gimprc option
"transient-docks".
* app/widgets/gimpimagedock.c (gimp_image_dock_display_changed):
as an experiment
, obey the "transient-docks" preference and set
the dock window transient to the active display shell. Please
comment on the behaviour you observe.
* app/dialogs/preferences-dialog.c (prefs_dialog_new): added a
view on the new gimprc property.
* app/config/gimpguiconfig.[ch]: set the IGNORE flag on the
"info-window-per-display" property; it isn't used any longer.
* app/config/gimpconfig-dump.c (dump_gimprc_system): don't dump
properties that have the GIMP_CONFIG_PARAM_IGNORE flag set.
2005-05-11 Sven Neumann <sven@gimp.org>
* plug-ins/jpeg/jpeg-exif.c (jpeg_query): split the message into
......
......@@ -132,6 +132,9 @@ dump_gimprc_system (GimpConfig *rc,
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
continue;
if (prop_spec->flags & GIMP_CONFIG_PARAM_IGNORE)
continue;
comment = dump_describe_param (prop_spec);
if (comment)
{
......
......@@ -88,6 +88,7 @@ enum
PROP_WEB_BROWSER,
PROP_TOOLBOX_WINDOW_HINT,
PROP_DOCK_WINDOW_HINT,
PROP_TRANSIENT_DOCKS,
PROP_CURSOR_FORMAT
};
......@@ -147,9 +148,9 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INFO_WINDOW_PER_DISPLAY,
"info-window-per-display",
INFO_WINDOW_PER_DISPLAY_BLURB,
NULL,
FALSE,
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TRUST_DIRTY_FLAG,
"trust-dirty-flag",
TRUST_DIRTY_FLAG_BLURB,
......@@ -269,7 +270,11 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
DOCK_WINDOW_HINT_BLURB,
GIMP_TYPE_WINDOW_HINT,
GIMP_WINDOW_HINT_NORMAL,
GIMP_CONFIG_PARAM_RESTART);
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TRANSIENT_DOCKS,
"transient-docks", TRANSIENT_DOCKS_BLURB,
FALSE,
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CURSOR_FORMAT,
"cursor-format", CURSOR_FORMAT_BLURB,
GIMP_TYPE_CURSOR_FORMAT,
......@@ -391,6 +396,9 @@ gimp_gui_config_set_property (GObject *object,
case PROP_DOCK_WINDOW_HINT:
gui_config->dock_window_hint = g_value_get_enum (value);
break;
case PROP_TRANSIENT_DOCKS:
gui_config->transient_docks = g_value_get_boolean (value);
break;
case PROP_CURSOR_FORMAT:
gui_config->cursor_format = g_value_get_enum (value);
break;
......@@ -498,6 +506,9 @@ gimp_gui_config_get_property (GObject *object,
case PROP_DOCK_WINDOW_HINT:
g_value_set_enum (value, gui_config->dock_window_hint);
break;
case PROP_TRANSIENT_DOCKS:
g_value_set_boolean (value, gui_config->transient_docks);
break;
case PROP_CURSOR_FORMAT:
g_value_set_enum (value, gui_config->cursor_format);
break;
......
......@@ -42,7 +42,7 @@ struct _GimpGuiConfig
gint default_threshold;
gboolean move_tool_changes_active;
gboolean info_window_per_display;
gboolean info_window_per_display; /* unused */
gboolean trust_dirty_flag;
gboolean save_device_status;
gboolean save_session_info;
......@@ -69,6 +69,7 @@ struct _GimpGuiConfig
gchar *web_browser;
GimpWindowHint toolbox_window_hint;
GimpWindowHint dock_window_hint;
gboolean transient_docks;
GimpCursorFormat cursor_format;
gint last_tip; /* saved in sessionrc */
......
......@@ -159,9 +159,6 @@ N_("Sets the text to appear in image window status bars.")
#define IMAGE_TITLE_FORMAT_BLURB \
N_("Sets the text to appear in image window titles.")
#define INFO_WINDOW_PER_DISPLAY_BLURB \
N_("When enabled, the GIMP will use a different info window per image view.")
#define INITIAL_ZOOM_TO_FIT_BLURB \
N_("When enabled, this will ensure that the full image is visible after a " \
"file is opened, otherwise it will be displayed with a scale of 1:1.")
......@@ -352,6 +349,11 @@ N_("Sets the swap file location. The gimp uses a tile based memory " \
#define TEAROFF_MENUS_BLURB \
N_("When enabled, menus can be torn off.")
#define TRANSIENT_DOCKS_BLURB \
N_("When enabled, dock windows (the toolbox and palettes) are transient " \
"transient to the active image window. With most window managers this " \
"keeps the dock windows above the image window.")
#define CAN_CHANGE_ACCELS_BLURB \
N_("When enabled, you can change keyboard shortcuts for menu items " \
"by hitting a key combination while the menu item is highlighted.")
......
......@@ -2287,9 +2287,14 @@ prefs_dialog_new (Gimp *gimp,
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "dock-window-hint", 0, 0,
_("Hint for the _docks:"),
_("Hint for other _docks:"),
GTK_TABLE (table), 1, size_group);
prefs_check_button_add (object, "transient-docks",
_("Toolbox and other docks are transient "
"to the active display"),
GTK_BOX (vbox2));
vbox2 = prefs_frame_new (_("Focus"),
GTK_CONTAINER (vbox), FALSE);
......
......@@ -172,6 +172,19 @@ gimp_image_dock_display_changed (GimpContext *context,
GimpImageDock *dock)
{
gimp_ui_manager_update (dock->ui_manager, display);
if (GIMP_GUI_CONFIG (context->gimp->config)->transient_docks)
{
GtkWindow *parent = NULL;
if (display)
g_object_get (display, "shell", &parent, NULL);
gtk_window_set_transient_for (GTK_WINDOW (dock), parent);
if (parent)
g_object_unref (parent);
}
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment