2001-12-17 05:34:05 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpGuiConfig class
|
|
|
|
* Copyright (C) 2001 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"
|
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
#include "config-types.h"
|
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
#include "gimpconfig-params.h"
|
|
|
|
#include "gimpconfig-types.h"
|
2001-12-18 20:39:45 +08:00
|
|
|
#include "gimpconfig-utils.h"
|
2001-12-17 05:34:05 +08:00
|
|
|
|
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
|
|
|
|
|
|
|
static void gimp_gui_config_class_init (GimpGuiConfigClass *klass);
|
2002-02-08 20:35:38 +08:00
|
|
|
static void gimp_gui_config_finalize (GObject *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);
|
|
|
|
static void gimp_gui_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
|
2003-01-23 08:40:34 +08:00
|
|
|
|
2003-11-21 04:36:55 +08:00
|
|
|
#define DEFAULT_THEME "Default"
|
2003-09-23 04:04:39 +08:00
|
|
|
|
|
|
|
#ifdef G_OS_WIN32
|
2003-11-21 04:36:55 +08:00
|
|
|
# define DEFAULT_GIMP_HELP_BROWSER GIMP_HELP_BROWSER_WEB_BROWSER
|
|
|
|
# define DEFAULT_WEB_BROWSER "not used on Windows"
|
2003-09-23 04:04:39 +08:00
|
|
|
#else
|
2003-11-21 04:36:55 +08:00
|
|
|
# define DEFAULT_GIMP_HELP_BROWSER GIMP_HELP_BROWSER_GIMP
|
|
|
|
# define DEFAULT_WEB_BROWSER "mozilla %s"
|
2003-09-23 04:04:39 +08:00
|
|
|
#endif
|
2003-01-23 08:40:34 +08:00
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
|
|
|
PROP_DEFAULT_THRESHOLD,
|
2001-12-17 09:01:34 +08:00
|
|
|
PROP_INFO_WINDOW_PER_DISPLAY,
|
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,
|
|
|
|
PROP_SHOW_TIPS,
|
2001-12-18 20:39:45 +08:00
|
|
|
PROP_SHOW_TOOL_TIPS,
|
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,
|
2004-07-28 06:17:30 +08:00
|
|
|
PROP_MENU_MNEMONICS,
|
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,
|
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-03-17 21:59:42 +08:00
|
|
|
PROP_HELP_LOCALES,
|
2003-09-23 04:04:39 +08:00
|
|
|
PROP_HELP_BROWSER,
|
2003-11-21 04:36:55 +08:00
|
|
|
PROP_WEB_BROWSER,
|
2004-01-17 07:18:23 +08:00
|
|
|
PROP_TOOLBOX_WINDOW_HINT,
|
2004-06-13 10:08:54 +08:00
|
|
|
PROP_DOCK_WINDOW_HINT,
|
|
|
|
PROP_CURSOR_FORMAT
|
2001-12-17 05:34:05 +08:00
|
|
|
};
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
static GObjectClass *parent_class = NULL;
|
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
|
2003-09-23 04:04:39 +08:00
|
|
|
GType
|
2001-12-17 05:34:05 +08:00
|
|
|
gimp_gui_config_get_type (void)
|
|
|
|
{
|
|
|
|
static GType config_type = 0;
|
|
|
|
|
|
|
|
if (! config_type)
|
|
|
|
{
|
|
|
|
static const GTypeInfo config_info =
|
|
|
|
{
|
|
|
|
sizeof (GimpGuiConfigClass),
|
|
|
|
NULL, /* base_init */
|
|
|
|
NULL, /* base_finalize */
|
|
|
|
(GClassInitFunc) gimp_gui_config_class_init,
|
|
|
|
NULL, /* class_finalize */
|
|
|
|
NULL, /* class_data */
|
|
|
|
sizeof (GimpGuiConfig),
|
|
|
|
0, /* n_preallocs */
|
|
|
|
NULL /* instance_init */
|
|
|
|
};
|
|
|
|
|
2003-09-23 04:04:39 +08:00
|
|
|
config_type = g_type_register_static (GIMP_TYPE_DISPLAY_CONFIG,
|
|
|
|
"GimpGuiConfig",
|
2001-12-17 05:34:05 +08:00
|
|
|
&config_info, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return config_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|
|
|
{
|
|
|
|
GObjectClass *object_class;
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
|
2001-12-17 05:34:05 +08:00
|
|
|
object_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_DEFAULT_THRESHOLD,
|
2002-11-28 23:19:19 +08:00
|
|
|
"default-threshold", DEFAULT_THRESHOLD_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
0, 255, 15,
|
|
|
|
0);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INFO_WINDOW_PER_DISPLAY,
|
|
|
|
"info-window-per-display",
|
2002-11-28 23:19:19 +08:00
|
|
|
INFO_WINDOW_PER_DISPLAY_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_RESTART);
|
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,
|
2002-11-21 03:09:40 +08:00
|
|
|
FALSE,
|
|
|
|
0);
|
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,
|
|
|
|
0);
|
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,
|
|
|
|
0);
|
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,
|
|
|
|
0);
|
2001-12-17 09:01:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TIPS,
|
2002-11-28 23:19:19 +08:00
|
|
|
"show-tips", SHOW_TIPS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
|
|
|
0);
|
2001-12-18 20:39:45 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TOOL_TIPS,
|
2002-11-28 23:19:19 +08:00
|
|
|
"show-tool-tips", SHOW_TOOL_TIPS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
TRUE,
|
|
|
|
0);
|
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,
|
2004-05-17 21:38:03 +08:00
|
|
|
0);
|
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,
|
|
|
|
0);
|
2003-04-08 18:02:42 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_ACCELS,
|
|
|
|
"save-accels", SAVE_ACCELS_BLURB,
|
|
|
|
TRUE,
|
|
|
|
0);
|
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_RESTORE_ACCELS,
|
|
|
|
"restore-accels", RESTORE_ACCELS_BLURB,
|
|
|
|
TRUE,
|
|
|
|
0);
|
2004-07-28 06:17:30 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MENU_MNEMONICS,
|
|
|
|
"menu-mnemonics", MENU_MNEMONICS_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_RESTART);
|
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,
|
2002-11-22 01:17:03 +08:00
|
|
|
GIMP_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,
|
2003-11-26 03:45:01 +08:00
|
|
|
0, GIMP_MAX_MEMSIZE, 1 << 26,
|
2002-11-21 03:09:40 +08:00
|
|
|
0);
|
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,
|
|
|
|
TRUE,
|
|
|
|
0);
|
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_FOO_AREA,
|
|
|
|
"toolbox-foo-area",
|
|
|
|
TOOLBOX_FOO_AREA_BLURB,
|
|
|
|
TRUE,
|
|
|
|
0);
|
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_IMAGE_AREA,
|
|
|
|
"toolbox-image-area",
|
|
|
|
TOOLBOX_IMAGE_AREA_BLURB,
|
|
|
|
TRUE,
|
|
|
|
0);
|
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,
|
2003-01-11 09:31:22 +08:00
|
|
|
GIMP_PARAM_PATH_DIR_LIST,
|
2002-11-21 03:09:40 +08:00
|
|
|
gimp_config_build_data_path ("themes"),
|
|
|
|
GIMP_PARAM_RESTART);
|
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,
|
2002-11-21 03:09:40 +08:00
|
|
|
0);
|
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,
|
|
|
|
0);
|
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
|
|
|
"",
|
2004-03-17 21:59:42 +08:00
|
|
|
0);
|
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,
|
2003-10-10 05:33:27 +08:00
|
|
|
DEFAULT_GIMP_HELP_BROWSER,
|
2002-11-21 03:09:40 +08:00
|
|
|
0);
|
2003-09-23 04:04:39 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_WEB_BROWSER,
|
|
|
|
"web-browser", WEB_BROWSER_BLURB,
|
|
|
|
GIMP_PARAM_PATH_FILE,
|
|
|
|
DEFAULT_WEB_BROWSER,
|
|
|
|
0);
|
2004-01-17 07:18:23 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TOOLBOX_WINDOW_HINT,
|
|
|
|
"toolbox-window-hint",
|
|
|
|
TOOLBOX_WINDOW_HINT_BLURB,
|
|
|
|
GIMP_TYPE_WINDOW_HINT,
|
|
|
|
GIMP_WINDOW_HINT_NORMAL,
|
2003-11-21 04:36:55 +08:00
|
|
|
GIMP_PARAM_RESTART);
|
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,
|
|
|
|
GIMP_WINDOW_HINT_NORMAL,
|
2003-11-21 04:36:55 +08:00
|
|
|
GIMP_PARAM_RESTART);
|
2004-06-13 10:08:54 +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,
|
|
|
|
0);
|
2001-12-17 05:34:05 +08:00
|
|
|
}
|
|
|
|
|
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);
|
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)
|
|
|
|
{
|
|
|
|
case PROP_DEFAULT_THRESHOLD:
|
|
|
|
gui_config->default_threshold = g_value_get_int (value);
|
|
|
|
break;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_INFO_WINDOW_PER_DISPLAY:
|
|
|
|
gui_config->info_window_per_display = g_value_get_boolean (value);
|
2003-09-23 04:04:39 +08:00
|
|
|
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;
|
|
|
|
case PROP_SHOW_TIPS:
|
|
|
|
gui_config->show_tips = g_value_get_boolean (value);
|
|
|
|
break;
|
2001-12-18 20:39:45 +08:00
|
|
|
case PROP_SHOW_TOOL_TIPS:
|
|
|
|
gui_config->show_tool_tips = g_value_get_boolean (value);
|
|
|
|
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;
|
2004-07-28 06:17:30 +08:00
|
|
|
case PROP_MENU_MNEMONICS:
|
|
|
|
gui_config->menu_mnemonics = 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;
|
2001-12-17 09:01:34 +08:00
|
|
|
case PROP_THEME_PATH:
|
|
|
|
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-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;
|
2003-09-23 04:04:39 +08:00
|
|
|
case PROP_WEB_BROWSER:
|
|
|
|
g_free (gui_config->web_browser);
|
|
|
|
gui_config->web_browser = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-17 07:18:23 +08:00
|
|
|
case PROP_TOOLBOX_WINDOW_HINT:
|
|
|
|
gui_config->toolbox_window_hint = g_value_get_enum (value);
|
2003-11-21 04:36:55 +08:00
|
|
|
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;
|
2004-06-13 10:08:54 +08:00
|
|
|
case PROP_CURSOR_FORMAT:
|
|
|
|
gui_config->cursor_format = g_value_get_enum (value);
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
case PROP_DEFAULT_THRESHOLD:
|
|
|
|
g_value_set_int (value, gui_config->default_threshold);
|
|
|
|
break;
|
2001-12-18 20:39:45 +08:00
|
|
|
case PROP_INFO_WINDOW_PER_DISPLAY:
|
|
|
|
g_value_set_boolean (value, gui_config->info_window_per_display);
|
2001-12-17 05:34:05 +08:00
|
|
|
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;
|
|
|
|
case PROP_SHOW_TIPS:
|
|
|
|
g_value_set_boolean (value, gui_config->show_tips);
|
|
|
|
break;
|
2001-12-18 20:39:45 +08:00
|
|
|
case PROP_SHOW_TOOL_TIPS:
|
|
|
|
g_value_set_boolean (value, gui_config->show_tool_tips);
|
|
|
|
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;
|
2004-07-28 06:17:30 +08:00
|
|
|
case PROP_MENU_MNEMONICS:
|
|
|
|
g_value_set_boolean (value, gui_config->menu_mnemonics);
|
|
|
|
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;
|
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-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;
|
2003-09-23 04:04:39 +08:00
|
|
|
case PROP_WEB_BROWSER:
|
|
|
|
g_value_set_string (value, gui_config->web_browser);
|
|
|
|
break;
|
2004-01-17 07:18:23 +08:00
|
|
|
case PROP_TOOLBOX_WINDOW_HINT:
|
|
|
|
g_value_set_enum (value, gui_config->toolbox_window_hint);
|
2003-11-21 04:36:55 +08:00
|
|
|
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;
|
2004-06-13 10:08:54 +08:00
|
|
|
case PROP_CURSOR_FORMAT:
|
|
|
|
g_value_set_enum (value, gui_config->cursor_format);
|
|
|
|
break;
|
2001-12-17 05:34:05 +08:00
|
|
|
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|