2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-12-17 05:34:05 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpGuiConfig class
|
|
|
|
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2001-12-17 05:34:05 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2001-12-17 05:34:05 +08:00
|
|
|
* (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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2001-12-17 05:34:05 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
#include "libgimpbase/gimpbase.h"
|
2005-01-26 03:11:26 +08:00
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
#include "config-types.h"
|
|
|
|
|
2002-12-20 22:36:08 +08:00
|
|
|
#include "gimprc-blurbs.h"
|
2001-12-17 05:34:05 +08:00
|
|
|
#include "gimpguiconfig.h"
|
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
2003-01-26 04:29:42 +08:00
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2008-06-13 04:14:44 +08:00
|
|
|
#define DEFAULT_HELP_BROWSER GIMP_HELP_BROWSER_GIMP
|
|
|
|
#define DEFAULT_THEME "Default"
|
|
|
|
|
|
|
|
#define DEFAULT_USER_MANUAL_ONLINE_URI \
|
|
|
|
"http://docs.gimp.org/" GIMP_APP_VERSION_STRING
|
2003-09-23 04:04:39 +08:00
|
|
|
|
2005-12-11 03:24:36 +08:00
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2004-10-30 23:02:39 +08:00
|
|
|
PROP_MOVE_TOOL_CHANGES_ACTIVE,
|
2009-02-09 07:19:12 +08:00
|
|
|
PROP_IMAGE_MAP_TOOL_MAX_RECENT,
|
2001-12-18 20:39:45 +08:00
|
|
|
PROP_TRUST_DIRTY_FLAG,
|
2001-12-17 09:01:34 +08:00
|
|
|
PROP_SAVE_DEVICE_STATUS,
|
|
|
|
PROP_SAVE_SESSION_INFO,
|
|
|
|
PROP_RESTORE_SESSION,
|
2005-04-12 05:17:59 +08:00
|
|
|
PROP_SAVE_TOOL_OPTIONS,
|
2006-03-11 00:40:09 +08:00
|
|
|
PROP_SHOW_TOOLTIPS,
|
2001-12-17 09:01:34 +08:00
|
|
|
PROP_TEAROFF_MENUS,
|
2003-04-01 15:47:04 +08:00
|
|
|
PROP_CAN_CHANGE_ACCELS,
|
2003-04-08 18:02:42 +08:00
|
|
|
PROP_SAVE_ACCELS,
|
|
|
|
PROP_RESTORE_ACCELS,
|
2002-11-22 01:17:03 +08:00
|
|
|
PROP_LAST_OPENED_SIZE,
|
2001-12-17 09:01:34 +08:00
|
|
|
PROP_MAX_NEW_IMAGE_SIZE,
|
2004-06-01 04:30:52 +08:00
|
|
|
PROP_TOOLBOX_COLOR_AREA,
|
|
|
|
PROP_TOOLBOX_FOO_AREA,
|
|
|
|
PROP_TOOLBOX_IMAGE_AREA,
|
2008-08-28 22:30:47 +08:00
|
|
|
PROP_TOOLBOX_WILBER,
|
2001-12-17 09:01:34 +08:00
|
|
|
PROP_THEME_PATH,
|
2001-12-19 01:45:29 +08:00
|
|
|
PROP_THEME,
|
2002-05-06 03:17:41 +08:00
|
|
|
PROP_USE_HELP,
|
2004-10-05 00:21:52 +08:00
|
|
|
PROP_SHOW_HELP_BUTTON,
|
2004-03-17 21:59:42 +08:00
|
|
|
PROP_HELP_LOCALES,
|
2003-09-23 04:04:39 +08:00
|
|
|
PROP_HELP_BROWSER,
|
2008-06-13 04:14:44 +08:00
|
|
|
PROP_USER_MANUAL_ONLINE,
|
|
|
|
PROP_USER_MANUAL_ONLINE_URI,
|
2004-06-13 10:08:54 +08:00
|
|
|
PROP_DOCK_WINDOW_HINT,
|
2011-07-25 04:09:21 +08:00
|
|
|
PROP_CURSOR_HANDEDNESS,
|
2008-09-30 17:41:55 +08:00
|
|
|
|
2011-11-06 00:52:45 +08:00
|
|
|
PROP_HIDE_DOCKS,
|
|
|
|
PROP_SINGLE_WINDOW_MODE,
|
2013-09-15 18:56:17 +08:00
|
|
|
PROP_TABS_POSITION,
|
2011-11-06 00:52:45 +08:00
|
|
|
PROP_LAST_TIP_SHOWN,
|
|
|
|
|
2008-09-30 17:41:55 +08:00
|
|
|
/* ignored, only for backward compatibility: */
|
2012-08-27 04:53:04 +08:00
|
|
|
PROP_CURSOR_FORMAT,
|
2008-09-30 17:41:55 +08:00
|
|
|
PROP_INFO_WINDOW_PER_DISPLAY,
|
2009-07-18 23:51:04 +08:00
|
|
|
PROP_MENU_MNEMONICS,
|
2008-09-30 17:41:55 +08:00
|
|
|
PROP_SHOW_TOOL_TIPS,
|
2009-07-21 22:38:00 +08:00
|
|
|
PROP_SHOW_TIPS,
|
2009-09-10 05:34:18 +08:00
|
|
|
PROP_TOOLBOX_WINDOW_HINT,
|
2009-09-10 08:38:42 +08:00
|
|
|
PROP_TRANSIENT_DOCKS,
|
|
|
|
PROP_WEB_BROWSER
|
2001-12-17 05:34:05 +08:00
|
|
|
};
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
|
2005-12-11 03:24:36 +08:00
|
|
|
static void gimp_gui_config_finalize (GObject *object);
|
|
|
|
static void gimp_gui_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gimp_gui_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
2001-12-17 05:34:05 +08:00
|
|
|
|
|
|
|
|
2006-05-15 17:46:31 +08:00
|
|
|
G_DEFINE_TYPE (GimpGuiConfig, gimp_gui_config, GIMP_TYPE_DISPLAY_CONFIG)
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2005-12-11 03:24:36 +08:00
|
|
|
#define parent_class gimp_gui_config_parent_class
|
2001-12-17 05:34:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|
|
|
{
|
2005-12-11 03:24:36 +08:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
2005-04-08 01:10:05 +08:00
|
|
|
gchar *path;
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
object_class->finalize = gimp_gui_config_finalize;
|
2001-12-17 05:34:05 +08:00
|
|
|
object_class->set_property = gimp_gui_config_set_property;
|
|
|
|
object_class->get_property = gimp_gui_config_get_property;
|
|
|
|
|
2004-10-30 23:02:39 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MOVE_TOOL_CHANGES_ACTIVE,
|
|
|
|
"move-tool-changes-active",
|
|
|
|
MOVE_TOOL_CHANGES_ACTIVE_BLURB,
|
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2009-02-09 07:19:12 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_IMAGE_MAP_TOOL_MAX_RECENT,
|
|
|
|
"image-map-tool-max-recent",
|
|
|
|
IMAGE_MAP_TOOL_MAX_RECENT_BLURB,
|
|
|
|
0, 255, 10,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-18 20:39:45 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TRUST_DIRTY_FLAG,
|
|
|
|
"trust-dirty-flag",
|
2002-11-28 23:19:19 +08:00
|
|
|
TRUST_DIRTY_FLAG_BLURB,
|
2009-08-05 05:20:49 +08:00
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_DEVICE_STATUS,
|
|
|
|
"save-device-status",
|
2002-11-28 23:19:19 +08:00
|
|
|
SAVE_DEVICE_STATUS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_SESSION_INFO,
|
|
|
|
"save-session-info",
|
2002-11-28 23:19:19 +08:00
|
|
|
SAVE_SESSION_INFO_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_RESTORE_SESSION,
|
2002-11-28 23:19:19 +08:00
|
|
|
"restore-session", RESTORE_SESSION_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2005-04-12 05:17:59 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_TOOL_OPTIONS,
|
|
|
|
"save-tool-options",
|
|
|
|
SAVE_TOOL_OPTIONS_BLURB,
|
2005-05-07 17:28:12 +08:00
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2006-03-11 00:40:09 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TOOLTIPS,
|
|
|
|
"show-tooltips", SHOW_TOOLTIPS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
2007-11-09 19:17:00 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TEAROFF_MENUS,
|
2002-11-28 23:19:19 +08:00
|
|
|
"tearoff-menus", TEAROFF_MENUS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2003-04-01 15:47:04 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CAN_CHANGE_ACCELS,
|
|
|
|
"can-change-accels", CAN_CHANGE_ACCELS_BLURB,
|
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2003-04-08 18:02:42 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_ACCELS,
|
|
|
|
"save-accels", SAVE_ACCELS_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2003-04-08 18:02:42 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_RESTORE_ACCELS,
|
|
|
|
"restore-accels", RESTORE_ACCELS_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2002-11-22 01:17:03 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_LAST_OPENED_SIZE,
|
2002-11-28 23:19:19 +08:00
|
|
|
"last-opened-size", LAST_OPENED_SIZE_BLURB,
|
2003-09-23 22:05:03 +08:00
|
|
|
0, 1024, 10,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_MAX_NEW_IMAGE_SIZE,
|
2002-11-28 23:19:19 +08:00
|
|
|
"max-new-image-size",
|
|
|
|
MAX_NEW_IMAGE_SIZE_BLURB,
|
2007-02-28 05:13:49 +08:00
|
|
|
0, GIMP_MAX_MEMSIZE, 1 << 27, /* 128MB */
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-06-01 04:30:52 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_COLOR_AREA,
|
|
|
|
"toolbox-color-area",
|
|
|
|
TOOLBOX_COLOR_AREA_BLURB,
|
2007-05-17 07:56:51 +08:00
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-06-01 04:30:52 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_FOO_AREA,
|
|
|
|
"toolbox-foo-area",
|
|
|
|
TOOLBOX_FOO_AREA_BLURB,
|
2006-02-18 18:46:31 +08:00
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-06-01 04:30:52 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_IMAGE_AREA,
|
|
|
|
"toolbox-image-area",
|
|
|
|
TOOLBOX_IMAGE_AREA_BLURB,
|
2004-10-31 23:41:17 +08:00
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2008-08-28 22:30:47 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_WILBER,
|
|
|
|
"toolbox-wilber",
|
|
|
|
TOOLBOX_WILBER_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2005-04-08 01:10:05 +08:00
|
|
|
path = gimp_config_build_data_path ("themes");
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_THEME_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"theme-path", THEME_PATH_BLURB,
|
2006-04-12 20:49:29 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_THEME,
|
2002-11-28 23:19:19 +08:00
|
|
|
"theme", THEME_BLURB,
|
2003-01-23 08:40:34 +08:00
|
|
|
DEFAULT_THEME,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-19 01:45:29 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_HELP,
|
2002-11-28 23:19:19 +08:00
|
|
|
"use-help", USE_HELP_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-10-05 00:21:52 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_HELP_BUTTON,
|
|
|
|
"show-help-button", SHOW_HELP_BUTTON_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-03-17 21:59:42 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_HELP_LOCALES,
|
|
|
|
"help-locales", HELP_LOCALES_BLURB,
|
2004-03-30 01:54:13 +08:00
|
|
|
"",
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2002-05-06 03:17:41 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_HELP_BROWSER,
|
2002-11-28 23:19:19 +08:00
|
|
|
"help-browser", HELP_BROWSER_BLURB,
|
2002-05-06 03:17:41 +08:00
|
|
|
GIMP_TYPE_HELP_BROWSER_TYPE,
|
2008-06-13 04:14:44 +08:00
|
|
|
DEFAULT_HELP_BROWSER,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2008-06-13 04:14:44 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USER_MANUAL_ONLINE,
|
|
|
|
"user-manual-online",
|
|
|
|
USER_MANUAL_ONLINE_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_USER_MANUAL_ONLINE_URI,
|
|
|
|
"user-manual-online-uri",
|
|
|
|
USER_MANUAL_ONLINE_URI_BLURB,
|
|
|
|
DEFAULT_USER_MANUAL_ONLINE_URI,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-01-17 07:18:23 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_DOCK_WINDOW_HINT,
|
|
|
|
"dock-window-hint",
|
|
|
|
DOCK_WINDOW_HINT_BLURB,
|
|
|
|
GIMP_TYPE_WINDOW_HINT,
|
2008-03-20 22:44:44 +08:00
|
|
|
GIMP_WINDOW_HINT_UTILITY,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-05-12 07:12:36 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2011-07-25 04:09:21 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CURSOR_HANDEDNESS,
|
|
|
|
"cursor-handedness", CURSOR_HANDEDNESS_BLURB,
|
|
|
|
GIMP_TYPE_HANDEDNESS,
|
|
|
|
GIMP_HANDEDNESS_RIGHT,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2008-09-30 17:41:55 +08:00
|
|
|
|
2011-11-06 00:52:45 +08:00
|
|
|
g_object_class_install_property (object_class, PROP_HIDE_DOCKS,
|
|
|
|
g_param_spec_boolean ("hide-docks",
|
|
|
|
NULL,
|
|
|
|
HIDE_DOCKS_BLURB,
|
|
|
|
FALSE,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
G_PARAM_CONSTRUCT |
|
|
|
|
GIMP_PARAM_STATIC_STRINGS));
|
|
|
|
g_object_class_install_property (object_class, PROP_SINGLE_WINDOW_MODE,
|
|
|
|
g_param_spec_boolean ("single-window-mode",
|
|
|
|
NULL,
|
|
|
|
SINGLE_WINDOW_MODE_BLURB,
|
|
|
|
FALSE,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
G_PARAM_CONSTRUCT |
|
|
|
|
GIMP_PARAM_STATIC_STRINGS));
|
2013-10-11 23:30:30 +08:00
|
|
|
g_object_class_install_property (object_class, PROP_TABS_POSITION,
|
|
|
|
g_param_spec_enum ("tabs-position", NULL, NULL,
|
|
|
|
GIMP_TYPE_POSITION, GIMP_POSITION_TOP,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
G_PARAM_CONSTRUCT |
|
|
|
|
GIMP_PARAM_STATIC_STRINGS));
|
2011-11-06 00:52:45 +08:00
|
|
|
g_object_class_install_property (object_class, PROP_LAST_TIP_SHOWN,
|
|
|
|
g_param_spec_int ("last-tip-shown",
|
|
|
|
NULL, NULL,
|
|
|
|
0, G_MAXINT, 0,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
G_PARAM_CONSTRUCT |
|
|
|
|
GIMP_PARAM_STATIC_STRINGS));
|
|
|
|
|
2008-09-30 17:41:55 +08:00
|
|
|
/* only for backward compatibility: */
|
2012-08-27 04:53:04 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CURSOR_FORMAT,
|
|
|
|
"cursor-format", CURSOR_FORMAT_BLURB,
|
|
|
|
GIMP_TYPE_CURSOR_FORMAT,
|
|
|
|
GIMP_CURSOR_FORMAT_PIXBUF,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2008-09-30 17:41:55 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INFO_WINDOW_PER_DISPLAY,
|
|
|
|
"info-window-per-display",
|
|
|
|
NULL,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2009-07-18 23:51:04 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MENU_MNEMONICS,
|
2009-07-21 22:38:56 +08:00
|
|
|
"menu-mnemonics", NULL,
|
2009-07-18 23:51:04 +08:00
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2008-09-30 17:41:55 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TOOL_TIPS,
|
|
|
|
"show-tool-tips", NULL,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TIPS,
|
|
|
|
"show-tips", NULL,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2009-09-10 05:34:18 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TOOLBOX_WINDOW_HINT,
|
|
|
|
"toolbox-window-hint", NULL,
|
|
|
|
GIMP_TYPE_WINDOW_HINT,
|
|
|
|
GIMP_WINDOW_HINT_UTILITY,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2009-07-21 22:38:00 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TRANSIENT_DOCKS,
|
|
|
|
"transient-docks", NULL,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2009-08-08 21:21:10 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_WEB_BROWSER,
|
|
|
|
"web-browser", NULL,
|
|
|
|
GIMP_CONFIG_PATH_FILE,
|
2009-09-10 05:40:44 +08:00
|
|
|
"not used any longer",
|
2009-08-08 21:21:10 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2001-12-17 05:34:05 +08:00
|
|
|
}
|
|
|
|
|
2005-12-11 03:24:36 +08:00
|
|
|
static void
|
|
|
|
gimp_gui_config_init (GimpGuiConfig *config)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
static void
|
|
|
|
gimp_gui_config_finalize (GObject *object)
|
|
|
|
{
|
2003-11-17 05:57:46 +08:00
|
|
|
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (object);
|
2003-09-23 04:04:39 +08:00
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (gui_config->theme_path);
|
|
|
|
g_free (gui_config->theme);
|
2004-03-17 21:59:42 +08:00
|
|
|
g_free (gui_config->help_locales);
|
2003-09-23 04:04:39 +08:00
|
|
|
g_free (gui_config->web_browser);
|
2008-06-13 04:14:44 +08:00
|
|
|
g_free (gui_config->user_manual_online_uri);
|
2002-02-08 20:35:38 +08:00
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
static void
|
|
|
|
gimp_gui_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2003-11-17 05:57:46 +08:00
|
|
|
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (object);
|
2001-12-17 05:34:05 +08:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2004-10-30 23:02:39 +08:00
|
|
|
case PROP_MOVE_TOOL_CHANGES_ACTIVE:
|
|
|
|
gui_config->move_tool_changes_active = g_value_get_boolean (value);
|
|
|
|
break;
|
2009-02-09 07:19:12 +08:00
|
|
|
case PROP_IMAGE_MAP_TOOL_MAX_RECENT:
|
|
|
|
gui_config->image_map_tool_max_recent = g_value_get_int (value);
|
|
|
|
break;
|
2001-12-18 20:39:45 +08:00
|
|
|
case PROP_TRUST_DIRTY_FLAG:
|
|
|
|
gui_config->trust_dirty_flag = g_value_get_boolean (value);
|
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_SAVE_DEVICE_STATUS:
|
|
|
|
gui_config->save_device_status = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_SAVE_SESSION_INFO:
|
|
|
|
gui_config->save_session_info = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_RESTORE_SESSION:
|
|
|
|
gui_config->restore_session = g_value_get_boolean (value);
|
|
|
|
break;
|
2005-04-12 05:17:59 +08:00
|
|
|
case PROP_SAVE_TOOL_OPTIONS:
|
|
|
|
gui_config->save_tool_options = g_value_get_boolean (value);
|
|
|
|
break;
|
2006-03-11 00:40:09 +08:00
|
|
|
case PROP_SHOW_TOOLTIPS:
|
|
|
|
gui_config->show_tooltips = g_value_get_boolean (value);
|
2001-12-18 20:39:45 +08:00
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_TEAROFF_MENUS:
|
|
|
|
gui_config->tearoff_menus = g_value_get_boolean (value);
|
|
|
|
break;
|
2003-04-01 15:47:04 +08:00
|
|
|
case PROP_CAN_CHANGE_ACCELS:
|
|
|
|
gui_config->can_change_accels = g_value_get_boolean (value);
|
|
|
|
break;
|
2003-04-08 18:02:42 +08:00
|
|
|
case PROP_SAVE_ACCELS:
|
|
|
|
gui_config->save_accels = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_RESTORE_ACCELS:
|
|
|
|
gui_config->restore_accels = g_value_get_boolean (value);
|
|
|
|
break;
|
2002-11-22 01:17:03 +08:00
|
|
|
case PROP_LAST_OPENED_SIZE:
|
|
|
|
gui_config->last_opened_size = g_value_get_int (value);
|
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_MAX_NEW_IMAGE_SIZE:
|
2003-11-14 21:41:16 +08:00
|
|
|
gui_config->max_new_image_size = g_value_get_uint64 (value);
|
2001-12-17 09:01:34 +08:00
|
|
|
break;
|
2004-06-01 04:30:52 +08:00
|
|
|
case PROP_TOOLBOX_COLOR_AREA:
|
|
|
|
gui_config->toolbox_color_area = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_TOOLBOX_FOO_AREA:
|
|
|
|
gui_config->toolbox_foo_area = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_TOOLBOX_IMAGE_AREA:
|
|
|
|
gui_config->toolbox_image_area = g_value_get_boolean (value);
|
|
|
|
break;
|
2008-08-28 22:30:47 +08:00
|
|
|
case PROP_TOOLBOX_WILBER:
|
|
|
|
gui_config->toolbox_wilber = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_THEME_PATH:
|
2001-12-17 09:01:34 +08:00
|
|
|
g_free (gui_config->theme_path);
|
|
|
|
gui_config->theme_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_THEME:
|
|
|
|
g_free (gui_config->theme);
|
|
|
|
gui_config->theme = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-19 01:45:29 +08:00
|
|
|
case PROP_USE_HELP:
|
|
|
|
gui_config->use_help = g_value_get_boolean (value);
|
|
|
|
break;
|
2004-10-05 00:21:52 +08:00
|
|
|
case PROP_SHOW_HELP_BUTTON:
|
|
|
|
gui_config->show_help_button = g_value_get_boolean (value);
|
|
|
|
break;
|
2004-03-17 21:59:42 +08:00
|
|
|
case PROP_HELP_LOCALES:
|
|
|
|
g_free (gui_config->help_locales);
|
|
|
|
gui_config->help_locales = g_value_dup_string (value);
|
|
|
|
break;
|
2002-05-06 03:17:41 +08:00
|
|
|
case PROP_HELP_BROWSER:
|
|
|
|
gui_config->help_browser = g_value_get_enum (value);
|
|
|
|
break;
|
2008-06-13 04:14:44 +08:00
|
|
|
case PROP_USER_MANUAL_ONLINE:
|
|
|
|
gui_config->user_manual_online = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_USER_MANUAL_ONLINE_URI:
|
|
|
|
g_free (gui_config->user_manual_online_uri);
|
|
|
|
gui_config->user_manual_online_uri = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-17 07:18:23 +08:00
|
|
|
case PROP_DOCK_WINDOW_HINT:
|
|
|
|
gui_config->dock_window_hint = g_value_get_enum (value);
|
2003-11-21 04:36:55 +08:00
|
|
|
break;
|
2011-07-25 04:09:21 +08:00
|
|
|
case PROP_CURSOR_HANDEDNESS:
|
|
|
|
gui_config->cursor_handedness = g_value_get_enum (value);
|
|
|
|
break;
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2011-11-06 00:52:45 +08:00
|
|
|
case PROP_HIDE_DOCKS:
|
|
|
|
gui_config->hide_docks = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_SINGLE_WINDOW_MODE:
|
|
|
|
gui_config->single_window_mode = g_value_get_boolean (value);
|
|
|
|
break;
|
2013-09-15 18:56:17 +08:00
|
|
|
case PROP_TABS_POSITION:
|
|
|
|
gui_config->tabs_position = g_value_get_enum (value);
|
|
|
|
break;
|
2011-11-06 00:52:45 +08:00
|
|
|
case PROP_LAST_TIP_SHOWN:
|
|
|
|
gui_config->last_tip_shown = g_value_get_int (value);
|
|
|
|
break;
|
|
|
|
|
2012-08-27 04:53:04 +08:00
|
|
|
case PROP_CURSOR_FORMAT:
|
2008-09-30 17:41:55 +08:00
|
|
|
case PROP_INFO_WINDOW_PER_DISPLAY:
|
2009-07-18 23:51:04 +08:00
|
|
|
case PROP_MENU_MNEMONICS:
|
2008-09-30 17:41:55 +08:00
|
|
|
case PROP_SHOW_TOOL_TIPS:
|
|
|
|
case PROP_SHOW_TIPS:
|
2009-09-10 05:34:18 +08:00
|
|
|
case PROP_TOOLBOX_WINDOW_HINT:
|
2009-07-21 22:38:00 +08:00
|
|
|
case PROP_TRANSIENT_DOCKS:
|
2009-08-08 21:21:10 +08:00
|
|
|
case PROP_WEB_BROWSER:
|
2008-09-30 17:41:55 +08:00
|
|
|
/* ignored */
|
|
|
|
break;
|
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_gui_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2003-11-17 05:57:46 +08:00
|
|
|
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (object);
|
2001-12-17 05:34:05 +08:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2004-10-30 23:02:39 +08:00
|
|
|
case PROP_MOVE_TOOL_CHANGES_ACTIVE:
|
|
|
|
g_value_set_boolean (value, gui_config->move_tool_changes_active);
|
|
|
|
break;
|
2009-02-09 07:19:12 +08:00
|
|
|
case PROP_IMAGE_MAP_TOOL_MAX_RECENT:
|
|
|
|
g_value_set_int (value, gui_config->image_map_tool_max_recent);
|
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_TRUST_DIRTY_FLAG:
|
|
|
|
g_value_set_boolean (value, gui_config->trust_dirty_flag);
|
|
|
|
break;
|
|
|
|
case PROP_SAVE_DEVICE_STATUS:
|
|
|
|
g_value_set_boolean (value, gui_config->save_device_status);
|
|
|
|
break;
|
|
|
|
case PROP_SAVE_SESSION_INFO:
|
|
|
|
g_value_set_boolean (value, gui_config->save_session_info);
|
|
|
|
break;
|
|
|
|
case PROP_RESTORE_SESSION:
|
|
|
|
g_value_set_boolean (value, gui_config->restore_session);
|
|
|
|
break;
|
2005-04-12 05:17:59 +08:00
|
|
|
case PROP_SAVE_TOOL_OPTIONS:
|
|
|
|
g_value_set_boolean (value, gui_config->save_tool_options);
|
|
|
|
break;
|
2006-03-11 00:40:09 +08:00
|
|
|
case PROP_SHOW_TOOLTIPS:
|
|
|
|
g_value_set_boolean (value, gui_config->show_tooltips);
|
2001-12-18 20:39:45 +08:00
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_TEAROFF_MENUS:
|
|
|
|
g_value_set_boolean (value, gui_config->tearoff_menus);
|
|
|
|
break;
|
2003-04-01 15:47:04 +08:00
|
|
|
case PROP_CAN_CHANGE_ACCELS:
|
|
|
|
g_value_set_boolean (value, gui_config->can_change_accels);
|
|
|
|
break;
|
2003-04-08 18:02:42 +08:00
|
|
|
case PROP_SAVE_ACCELS:
|
|
|
|
g_value_set_boolean (value, gui_config->save_accels);
|
|
|
|
break;
|
|
|
|
case PROP_RESTORE_ACCELS:
|
|
|
|
g_value_set_boolean (value, gui_config->restore_accels);
|
|
|
|
break;
|
2002-11-22 01:17:03 +08:00
|
|
|
case PROP_LAST_OPENED_SIZE:
|
|
|
|
g_value_set_int (value, gui_config->last_opened_size);
|
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_MAX_NEW_IMAGE_SIZE:
|
2003-11-14 21:41:16 +08:00
|
|
|
g_value_set_uint64 (value, gui_config->max_new_image_size);
|
2001-12-17 09:01:34 +08:00
|
|
|
break;
|
2004-06-01 04:30:52 +08:00
|
|
|
case PROP_TOOLBOX_COLOR_AREA:
|
|
|
|
g_value_set_boolean (value, gui_config->toolbox_color_area);
|
|
|
|
break;
|
|
|
|
case PROP_TOOLBOX_FOO_AREA:
|
|
|
|
g_value_set_boolean (value, gui_config->toolbox_foo_area);
|
|
|
|
break;
|
|
|
|
case PROP_TOOLBOX_IMAGE_AREA:
|
|
|
|
g_value_set_boolean (value, gui_config->toolbox_image_area);
|
|
|
|
break;
|
2008-08-28 22:30:47 +08:00
|
|
|
case PROP_TOOLBOX_WILBER:
|
|
|
|
g_value_set_boolean (value, gui_config->toolbox_wilber);
|
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_THEME_PATH:
|
|
|
|
g_value_set_string (value, gui_config->theme_path);
|
|
|
|
break;
|
|
|
|
case PROP_THEME:
|
|
|
|
g_value_set_string (value, gui_config->theme);
|
|
|
|
break;
|
2001-12-19 01:45:29 +08:00
|
|
|
case PROP_USE_HELP:
|
|
|
|
g_value_set_boolean (value, gui_config->use_help);
|
|
|
|
break;
|
2004-10-05 00:21:52 +08:00
|
|
|
case PROP_SHOW_HELP_BUTTON:
|
|
|
|
g_value_set_boolean (value, gui_config->show_help_button);
|
|
|
|
break;
|
2004-03-17 21:59:42 +08:00
|
|
|
case PROP_HELP_LOCALES:
|
|
|
|
g_value_set_string (value, gui_config->help_locales);
|
|
|
|
break;
|
2002-05-06 03:17:41 +08:00
|
|
|
case PROP_HELP_BROWSER:
|
|
|
|
g_value_set_enum (value, gui_config->help_browser);
|
|
|
|
break;
|
2008-06-13 04:14:44 +08:00
|
|
|
case PROP_USER_MANUAL_ONLINE:
|
|
|
|
g_value_set_boolean (value, gui_config->user_manual_online);
|
|
|
|
break;
|
|
|
|
case PROP_USER_MANUAL_ONLINE_URI:
|
|
|
|
g_value_set_string (value, gui_config->user_manual_online_uri);
|
|
|
|
break;
|
2004-01-17 07:18:23 +08:00
|
|
|
case PROP_DOCK_WINDOW_HINT:
|
|
|
|
g_value_set_enum (value, gui_config->dock_window_hint);
|
2003-11-21 04:36:55 +08:00
|
|
|
break;
|
2011-07-25 04:09:21 +08:00
|
|
|
case PROP_CURSOR_HANDEDNESS:
|
|
|
|
g_value_set_enum (value, gui_config->cursor_handedness);
|
|
|
|
break;
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2011-11-06 00:52:45 +08:00
|
|
|
case PROP_HIDE_DOCKS:
|
|
|
|
g_value_set_boolean (value, gui_config->hide_docks);
|
|
|
|
break;
|
|
|
|
case PROP_SINGLE_WINDOW_MODE:
|
|
|
|
g_value_set_boolean (value, gui_config->single_window_mode);
|
|
|
|
break;
|
2013-09-15 18:56:17 +08:00
|
|
|
case PROP_TABS_POSITION:
|
|
|
|
g_value_set_enum (value, gui_config->tabs_position);
|
|
|
|
break;
|
2011-11-06 00:52:45 +08:00
|
|
|
case PROP_LAST_TIP_SHOWN:
|
|
|
|
g_value_set_int (value, gui_config->last_tip_shown);
|
|
|
|
break;
|
|
|
|
|
2012-08-27 04:53:04 +08:00
|
|
|
case PROP_CURSOR_FORMAT:
|
2008-09-30 17:41:55 +08:00
|
|
|
case PROP_INFO_WINDOW_PER_DISPLAY:
|
2009-07-18 23:51:04 +08:00
|
|
|
case PROP_MENU_MNEMONICS:
|
2008-09-30 17:41:55 +08:00
|
|
|
case PROP_SHOW_TOOL_TIPS:
|
|
|
|
case PROP_SHOW_TIPS:
|
2009-09-10 05:34:18 +08:00
|
|
|
case PROP_TOOLBOX_WINDOW_HINT:
|
2009-07-21 22:38:00 +08:00
|
|
|
case PROP_TRANSIENT_DOCKS:
|
2009-08-08 21:21:10 +08:00
|
|
|
case PROP_WEB_BROWSER:
|
2008-09-30 17:41:55 +08:00
|
|
|
/* ignored */
|
|
|
|
break;
|
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|