2006-12-09 21:33:38 +00:00
|
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2000-11-18 00:25:42 +00:00
|
|
|
|
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
|
1999-03-27 18:16:30 +00:00
|
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1999-03-27 18:16:30 +00:00
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1999-03-27 18:16:30 +00: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-17 22:28:01 +00:00
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1999-03-27 18:16:30 +00:00
|
|
|
|
*/
|
2000-06-06 00:28:28 +00:00
|
|
|
|
|
2000-01-25 23:05:47 +00:00
|
|
|
|
#include "config.h"
|
|
|
|
|
|
1999-02-20 23:20:54 +00:00
|
|
|
|
#include <string.h>
|
|
|
|
|
|
2012-04-21 21:41:36 +02:00
|
|
|
|
#include <gegl.h>
|
2000-12-29 15:22:01 +00:00
|
|
|
|
#include <gtk/gtk.h>
|
2000-12-16 21:37:03 +00:00
|
|
|
|
|
2001-01-23 23:56:18 +00:00
|
|
|
|
#include "libgimpmath/gimpmath.h"
|
2001-05-21 13:58:46 +00:00
|
|
|
|
#include "libgimpbase/gimpbase.h"
|
2005-01-25 19:11:26 +00:00
|
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
2001-01-24 22:36:18 +00:00
|
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-23 23:56:18 +00:00
|
|
|
|
|
2004-09-13 15:15:23 +00:00
|
|
|
|
#include "dialogs-types.h"
|
2000-12-16 21:37:03 +00:00
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
#include "config/gimprc.h"
|
|
|
|
|
|
2001-07-04 19:31:35 +00:00
|
|
|
|
#include "core/gimp.h"
|
2003-10-14 15:20:59 +00:00
|
|
|
|
#include "core/gimptemplate.h"
|
2001-05-09 02:32:03 +00:00
|
|
|
|
|
2014-02-18 20:10:24 +01:00
|
|
|
|
#include "widgets/gimpaction-history.h"
|
2002-12-03 22:16:56 +00:00
|
|
|
|
#include "widgets/gimpcolorpanel.h"
|
2004-05-11 16:01:00 +00:00
|
|
|
|
#include "widgets/gimpcontainercombobox.h"
|
|
|
|
|
#include "widgets/gimpcontainerview.h"
|
2005-05-09 09:35:41 +00:00
|
|
|
|
#include "widgets/gimpcontrollerlist.h"
|
2002-02-28 16:55:38 +00:00
|
|
|
|
#include "widgets/gimpdevices.h"
|
2005-09-30 00:40:45 +00:00
|
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2003-10-10 14:11:47 +00:00
|
|
|
|
#include "widgets/gimpgrideditor.h"
|
2008-07-04 18:41:58 +00:00
|
|
|
|
#include "widgets/gimphelp.h"
|
2003-08-22 01:42:57 +00:00
|
|
|
|
#include "widgets/gimphelp-ids.h"
|
2006-05-11 12:29:57 +00:00
|
|
|
|
#include "widgets/gimpmessagebox.h"
|
|
|
|
|
#include "widgets/gimpmessagedialog.h"
|
2013-03-10 19:49:59 +01:00
|
|
|
|
#include "widgets/gimpprefsbox.h"
|
2002-11-20 19:45:03 +00:00
|
|
|
|
#include "widgets/gimppropwidgets.h"
|
2016-09-14 01:27:42 +02:00
|
|
|
|
#include "widgets/gimpstrokeeditor.h"
|
2003-10-14 15:20:59 +00:00
|
|
|
|
#include "widgets/gimptemplateeditor.h"
|
2009-07-21 19:49:19 +02:00
|
|
|
|
#include "widgets/gimptooleditor.h"
|
2003-05-29 11:34:30 +00:00
|
|
|
|
#include "widgets/gimpwidgets-utils.h"
|
2002-02-28 16:55:38 +00:00
|
|
|
|
|
2004-05-06 07:41:53 +00:00
|
|
|
|
#include "menus/menus.h"
|
|
|
|
|
|
2005-04-11 21:17:59 +00:00
|
|
|
|
#include "tools/gimp-tools.h"
|
|
|
|
|
|
2004-09-13 15:15:23 +00:00
|
|
|
|
#include "gui/session.h"
|
2015-12-08 14:52:12 -05:00
|
|
|
|
#include "gui/icon-themes.h"
|
2004-09-13 15:15:23 +00:00
|
|
|
|
#include "gui/themes.h"
|
|
|
|
|
|
2006-10-30 10:13:06 +00:00
|
|
|
|
#include "preferences-dialog.h"
|
2016-09-22 19:13:33 +02:00
|
|
|
|
#include "preferences-dialog-utils.h"
|
2001-05-22 21:12:43 +00:00
|
|
|
|
#include "resolution-calibrate-dialog.h"
|
2001-04-17 21:43:29 +00:00
|
|
|
|
|
2003-03-25 16:38:19 +00:00
|
|
|
|
#include "gimp-intl.h"
|
1998-06-08 21:53:45 +00:00
|
|
|
|
|
2000-12-29 15:22:01 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
#define RESPONSE_RESET 1
|
|
|
|
|
|
|
|
|
|
|
1998-06-08 21:53:45 +00:00
|
|
|
|
/* preferences local functions */
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
|
|
|
|
static GtkWidget * prefs_dialog_new (Gimp *gimp,
|
2003-10-11 14:30:18 +00:00
|
|
|
|
GimpConfig *config);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
static void prefs_config_notify (GObject *config,
|
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
|
GObject *config_copy);
|
|
|
|
|
static void prefs_config_copy_notify (GObject *config_copy,
|
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
|
GObject *config);
|
2003-11-06 15:27:05 +00:00
|
|
|
|
static void prefs_response (GtkWidget *widget,
|
|
|
|
|
gint response_id,
|
2002-11-22 22:10:40 +00:00
|
|
|
|
GtkWidget *dialog);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
static void prefs_message (GtkMessageType type,
|
|
|
|
|
gboolean destroy,
|
|
|
|
|
const gchar *message);
|
|
|
|
|
|
2016-09-22 18:53:18 +02:00
|
|
|
|
static void prefs_color_management_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
|
|
|
|
static void prefs_dialog_defaults_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
|
|
|
|
|
2003-10-14 15:20:59 +00:00
|
|
|
|
static void prefs_resolution_source_callback (GtkWidget *widget,
|
2002-11-20 19:45:03 +00:00
|
|
|
|
GObject *config);
|
|
|
|
|
static void prefs_resolution_calibrate_callback (GtkWidget *widget,
|
2005-04-16 19:27:28 +00:00
|
|
|
|
GtkWidget *entry);
|
2004-03-09 10:51:25 +00:00
|
|
|
|
static void prefs_input_devices_dialog (GtkWidget *widget,
|
2004-07-20 18:50:20 +00:00
|
|
|
|
Gimp *gimp);
|
2010-02-19 17:41:26 +01:00
|
|
|
|
static void prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
2010-02-12 15:46:07 +01:00
|
|
|
|
Gimp *gimp);
|
2004-07-21 16:11:31 +00:00
|
|
|
|
static void prefs_menus_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_menus_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
2006-05-11 12:29:57 +00:00
|
|
|
|
static void prefs_menus_remove_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
2004-07-21 16:11:31 +00:00
|
|
|
|
static void prefs_session_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_session_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_devices_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_devices_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
2014-07-29 12:28:18 +02:00
|
|
|
|
static void prefs_search_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
2005-04-11 21:17:59 +00:00
|
|
|
|
static void prefs_tool_options_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_tool_options_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
|
|
|
|
|
2002-11-26 14:54:28 +00:00
|
|
|
|
/* private variables */
|
|
|
|
|
|
|
|
|
|
static GtkWidget *prefs_dialog = NULL;
|
2009-07-29 21:55:31 +10:00
|
|
|
|
static GtkWidget *tool_editor = NULL;
|
2002-11-26 14:54:28 +00:00
|
|
|
|
|
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
/* public function */
|
|
|
|
|
|
2002-11-25 13:48:24 +00:00
|
|
|
|
GtkWidget *
|
|
|
|
|
preferences_dialog_create (Gimp *gimp)
|
|
|
|
|
{
|
2003-10-11 14:30:18 +00:00
|
|
|
|
GimpConfig *config;
|
|
|
|
|
GimpConfig *config_copy;
|
|
|
|
|
GimpConfig *config_orig;
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
|
|
|
|
|
2002-11-26 14:54:28 +00:00
|
|
|
|
if (prefs_dialog)
|
|
|
|
|
return prefs_dialog;
|
|
|
|
|
|
2003-10-14 15:20:59 +00:00
|
|
|
|
/* turn off autosaving while the prefs dialog is open */
|
2002-11-30 13:08:44 +00:00
|
|
|
|
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), FALSE);
|
|
|
|
|
|
2003-10-11 14:30:18 +00:00
|
|
|
|
config = GIMP_CONFIG (gimp->edit_config);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
config_copy = gimp_config_duplicate (config);
|
|
|
|
|
config_orig = gimp_config_duplicate (config);
|
|
|
|
|
|
|
|
|
|
g_signal_connect_object (config, "notify",
|
|
|
|
|
G_CALLBACK (prefs_config_notify),
|
|
|
|
|
config_copy, 0);
|
|
|
|
|
g_signal_connect_object (config_copy, "notify",
|
|
|
|
|
G_CALLBACK (prefs_config_copy_notify),
|
|
|
|
|
config, 0);
|
|
|
|
|
|
|
|
|
|
prefs_dialog = prefs_dialog_new (gimp, config_copy);
|
|
|
|
|
|
2002-11-26 14:54:28 +00:00
|
|
|
|
g_object_add_weak_pointer (G_OBJECT (prefs_dialog),
|
2004-04-22 17:38:14 +00:00
|
|
|
|
(gpointer) &prefs_dialog);
|
2002-11-26 14:54:28 +00:00
|
|
|
|
|
2002-12-14 14:13:54 +00:00
|
|
|
|
g_object_set_data (G_OBJECT (prefs_dialog), "gimp", gimp);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2002-12-14 14:13:54 +00:00
|
|
|
|
g_object_set_data_full (G_OBJECT (prefs_dialog), "config-copy", config_copy,
|
|
|
|
|
(GDestroyNotify) g_object_unref);
|
|
|
|
|
g_object_set_data_full (G_OBJECT (prefs_dialog), "config-orig", config_orig,
|
|
|
|
|
(GDestroyNotify) g_object_unref);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
|
|
|
|
return prefs_dialog;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* private functions */
|
|
|
|
|
|
1998-06-08 21:53:45 +00:00
|
|
|
|
static void
|
2002-11-20 19:45:03 +00:00
|
|
|
|
prefs_config_notify (GObject *config,
|
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
|
GObject *config_copy)
|
1998-06-08 21:53:45 +00:00
|
|
|
|
{
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue global_value = G_VALUE_INIT;
|
|
|
|
|
GValue copy_value = G_VALUE_INIT;
|
1999-11-27 13:44:54 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_value_init (&global_value, param_spec->value_type);
|
|
|
|
|
g_value_init (©_value, param_spec->value_type);
|
1998-06-08 21:53:45 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_object_get_property (config, param_spec->name, &global_value);
|
|
|
|
|
g_object_get_property (config_copy, param_spec->name, ©_value);
|
1998-06-08 21:53:45 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
if (g_param_values_cmp (param_spec, &global_value, ©_value))
|
|
|
|
|
{
|
|
|
|
|
g_signal_handlers_block_by_func (config_copy,
|
|
|
|
|
prefs_config_copy_notify,
|
|
|
|
|
config);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_object_set_property (config_copy, param_spec->name, &global_value);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_signal_handlers_unblock_by_func (config_copy,
|
|
|
|
|
prefs_config_copy_notify,
|
|
|
|
|
config);
|
|
|
|
|
}
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_value_unset (&global_value);
|
|
|
|
|
g_value_unset (©_value);
|
1998-06-08 21:53:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_config_copy_notify (GObject *config_copy,
|
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
|
GObject *config)
|
1998-06-08 21:53:45 +00:00
|
|
|
|
{
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue copy_value = G_VALUE_INIT;
|
|
|
|
|
GValue global_value = G_VALUE_INIT;
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_value_init (©_value, param_spec->value_type);
|
|
|
|
|
g_value_init (&global_value, param_spec->value_type);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_object_get_property (config_copy, param_spec->name, ©_value);
|
|
|
|
|
g_object_get_property (config, param_spec->name, &global_value);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
if (g_param_values_cmp (param_spec, ©_value, &global_value))
|
2002-02-11 22:39:08 +00:00
|
|
|
|
{
|
2005-02-05 14:52:58 +00:00
|
|
|
|
if (param_spec->flags & GIMP_CONFIG_PARAM_CONFIRM)
|
2002-11-21 15:46:19 +00:00
|
|
|
|
{
|
2003-01-27 13:41:27 +00:00
|
|
|
|
#ifdef GIMP_CONFIG_DEBUG
|
2002-12-10 16:38:16 +00:00
|
|
|
|
g_print ("NOT Applying prefs change of '%s' to edit_config "
|
2002-11-21 15:46:19 +00:00
|
|
|
|
"because it needs confirmation\n",
|
|
|
|
|
param_spec->name);
|
2003-01-27 13:41:27 +00:00
|
|
|
|
#endif
|
2002-11-21 15:46:19 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2003-01-27 13:41:27 +00:00
|
|
|
|
#ifdef GIMP_CONFIG_DEBUG
|
2002-12-10 16:38:16 +00:00
|
|
|
|
g_print ("Applying prefs change of '%s' to edit_config\n",
|
2002-11-21 15:46:19 +00:00
|
|
|
|
param_spec->name);
|
2003-01-27 13:41:27 +00:00
|
|
|
|
#endif
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_signal_handlers_block_by_func (config,
|
|
|
|
|
prefs_config_notify,
|
|
|
|
|
config_copy);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_object_set_property (config, param_spec->name, ©_value);
|
2000-01-25 23:05:47 +00:00
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_signal_handlers_unblock_by_func (config,
|
|
|
|
|
prefs_config_notify,
|
|
|
|
|
config_copy);
|
|
|
|
|
}
|
2000-01-25 23:05:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-11-21 15:46:19 +00:00
|
|
|
|
g_value_unset (©_value);
|
|
|
|
|
g_value_unset (&global_value);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
}
|
|
|
|
|
|
1998-06-08 21:53:45 +00:00
|
|
|
|
static void
|
2003-11-06 15:27:05 +00:00
|
|
|
|
prefs_response (GtkWidget *widget,
|
|
|
|
|
gint response_id,
|
|
|
|
|
GtkWidget *dialog)
|
1998-06-08 21:53:45 +00:00
|
|
|
|
{
|
2003-11-06 15:27:05 +00:00
|
|
|
|
Gimp *gimp = g_object_get_data (G_OBJECT (dialog), "gimp");
|
2001-10-29 11:47:11 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
switch (response_id)
|
2003-11-06 15:27:05 +00:00
|
|
|
|
{
|
2006-06-04 18:05:53 +00:00
|
|
|
|
case RESPONSE_RESET:
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *confirm;
|
2001-10-29 11:47:11 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
confirm = gimp_message_dialog_new (_("Reset All Preferences"),
|
|
|
|
|
GIMP_STOCK_QUESTION,
|
|
|
|
|
dialog,
|
|
|
|
|
GTK_DIALOG_MODAL |
|
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
|
gimp_standard_help_func, NULL,
|
1998-06-08 21:53:45 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
|
|
|
|
GIMP_STOCK_RESET, GTK_RESPONSE_OK,
|
2001-06-18 13:10:03 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
NULL);
|
2001-11-08 19:14:51 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gtk_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
|
|
|
|
|
GTK_RESPONSE_OK,
|
|
|
|
|
GTK_RESPONSE_CANCEL,
|
|
|
|
|
-1);
|
2000-01-25 23:05:47 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (confirm)->box,
|
|
|
|
|
_("Do you really want to reset all "
|
|
|
|
|
"preferences to default values?"));
|
2002-11-21 15:46:19 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
if (gimp_dialog_run (GIMP_DIALOG (confirm)) == GTK_RESPONSE_OK)
|
|
|
|
|
{
|
|
|
|
|
GimpConfig *config_copy;
|
2002-11-21 15:46:19 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
config_copy = g_object_get_data (G_OBJECT (dialog), "config-copy");
|
2001-07-26 23:35:00 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gimp_config_reset (config_copy);
|
2016-09-06 20:51:47 +02:00
|
|
|
|
|
|
|
|
|
/* don't use the default value if there is no help browser */
|
|
|
|
|
if (! gimp_help_browser_is_installed (gimp))
|
|
|
|
|
{
|
|
|
|
|
g_object_set (config_copy,
|
|
|
|
|
"help-browser", GIMP_HELP_BROWSER_WEB_BROWSER,
|
|
|
|
|
NULL);
|
|
|
|
|
}
|
2006-06-04 18:05:53 +00:00
|
|
|
|
}
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gtk_widget_destroy (confirm);
|
2002-11-30 13:08:44 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
break;
|
1998-06-08 21:53:45 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
case GTK_RESPONSE_OK:
|
|
|
|
|
{
|
|
|
|
|
GObject *config_copy;
|
|
|
|
|
GList *restart_diff;
|
|
|
|
|
GList *confirm_diff;
|
|
|
|
|
GList *list;
|
2001-07-26 23:35:00 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
config_copy = g_object_get_data (G_OBJECT (dialog), "config-copy");
|
2001-07-26 23:35:00 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
/* destroy config_orig */
|
|
|
|
|
g_object_set_data (G_OBJECT (dialog), "config-orig", NULL);
|
2001-07-26 23:35:00 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
confirm_diff = gimp_config_diff (G_OBJECT (gimp->edit_config),
|
|
|
|
|
config_copy,
|
|
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
for (list = confirm_diff; list; list = g_list_next (list))
|
|
|
|
|
{
|
|
|
|
|
GParamSpec *param_spec = list->data;
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue value = G_VALUE_INIT;
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_value_init (&value, param_spec->value_type);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_object_get_property (config_copy,
|
|
|
|
|
param_spec->name, &value);
|
|
|
|
|
g_object_set_property (G_OBJECT (gimp->edit_config),
|
|
|
|
|
param_spec->name, &value);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_value_unset (&value);
|
|
|
|
|
}
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
|
2002-11-30 13:08:44 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_list_free (confirm_diff);
|
2002-11-30 13:08:44 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gimp_rc_save (GIMP_RC (gimp->edit_config));
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
/* spit out a solely informational warning about changed values
|
|
|
|
|
* which need restart
|
|
|
|
|
*/
|
|
|
|
|
restart_diff = gimp_config_diff (G_OBJECT (gimp->edit_config),
|
|
|
|
|
G_OBJECT (gimp->config),
|
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
if (restart_diff)
|
|
|
|
|
{
|
|
|
|
|
GString *string;
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
string = g_string_new (_("You will have to restart GIMP for "
|
|
|
|
|
"the following changes to take effect:"));
|
|
|
|
|
g_string_append (string, "\n\n");
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
for (list = restart_diff; list; list = g_list_next (list))
|
|
|
|
|
{
|
|
|
|
|
GParamSpec *param_spec = list->data;
|
2003-11-06 15:27:05 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_string_append_printf (string, "%s\n", param_spec->name);
|
|
|
|
|
}
|
2003-11-06 15:27:05 +00:00
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_INFO, FALSE, string->str);
|
2006-06-04 18:05:53 +00:00
|
|
|
|
|
|
|
|
|
g_string_free (string, TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_list_free (restart_diff);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
{
|
|
|
|
|
GObject *config_orig;
|
|
|
|
|
GList *diff;
|
|
|
|
|
GList *list;
|
|
|
|
|
|
|
|
|
|
config_orig = g_object_get_data (G_OBJECT (dialog), "config-orig");
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
/* destroy config_copy */
|
|
|
|
|
g_object_set_data (G_OBJECT (dialog), "config-copy", NULL);
|
2002-11-25 13:48:24 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
|
|
|
|
|
|
|
|
|
|
diff = gimp_config_diff (G_OBJECT (gimp->edit_config),
|
|
|
|
|
config_orig,
|
|
|
|
|
GIMP_CONFIG_PARAM_SERIALIZE);
|
|
|
|
|
|
|
|
|
|
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
|
|
|
|
|
|
|
|
|
|
for (list = diff; list; list = g_list_next (list))
|
|
|
|
|
{
|
|
|
|
|
GParamSpec *param_spec = list->data;
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue value = G_VALUE_INIT;
|
2006-06-04 18:05:53 +00:00
|
|
|
|
|
|
|
|
|
g_value_init (&value, param_spec->value_type);
|
|
|
|
|
|
|
|
|
|
g_object_get_property (config_orig,
|
|
|
|
|
param_spec->name, &value);
|
|
|
|
|
g_object_set_property (G_OBJECT (gimp->edit_config),
|
|
|
|
|
param_spec->name, &value);
|
|
|
|
|
|
|
|
|
|
g_value_unset (&value);
|
|
|
|
|
}
|
|
|
|
|
|
2009-07-29 21:55:31 +10:00
|
|
|
|
gimp_tool_editor_revert_changes (GIMP_TOOL_EDITOR (tool_editor));
|
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
|
|
|
|
|
|
|
|
|
|
g_list_free (diff);
|
|
|
|
|
}
|
2009-07-29 21:55:31 +10:00
|
|
|
|
|
|
|
|
|
tool_editor = NULL;
|
2003-11-06 15:27:05 +00:00
|
|
|
|
}
|
2003-11-12 12:56:31 +00:00
|
|
|
|
|
2004-05-02 20:30:41 +00:00
|
|
|
|
/* enable autosaving again */
|
|
|
|
|
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
|
|
|
|
|
2003-11-12 12:56:31 +00:00
|
|
|
|
gtk_widget_destroy (dialog);
|
1999-03-13 23:03:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-09-22 18:53:18 +02:00
|
|
|
|
static void
|
|
|
|
|
prefs_color_management_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config)
|
|
|
|
|
{
|
2016-09-26 00:56:40 +02:00
|
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (config);
|
|
|
|
|
|
|
|
|
|
gimp_config_reset (GIMP_CONFIG (core_config->color_management));
|
|
|
|
|
gimp_config_reset_property (config, "color-profile-policy");
|
2016-09-22 18:53:18 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_dialog_defaults_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config)
|
|
|
|
|
{
|
|
|
|
|
GParamSpec **pspecs;
|
|
|
|
|
guint n_pspecs;
|
|
|
|
|
guint i;
|
|
|
|
|
|
|
|
|
|
pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (config),
|
|
|
|
|
&n_pspecs);
|
|
|
|
|
|
|
|
|
|
g_object_freeze_notify (config);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < n_pspecs; i++)
|
|
|
|
|
{
|
|
|
|
|
GParamSpec *pspec = pspecs[i];
|
|
|
|
|
|
|
|
|
|
if (pspec->owner_type == GIMP_TYPE_DIALOG_CONFIG)
|
|
|
|
|
gimp_config_reset_property (config, pspec->name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_object_thaw_notify (config);
|
|
|
|
|
|
|
|
|
|
g_free (pspecs);
|
|
|
|
|
}
|
|
|
|
|
|
1999-03-03 12:35:12 +00:00
|
|
|
|
static void
|
2004-05-11 16:01:00 +00:00
|
|
|
|
prefs_template_select_callback (GimpContainerView *view,
|
2003-10-14 15:20:59 +00:00
|
|
|
|
GimpTemplate *template,
|
|
|
|
|
gpointer insert_data,
|
|
|
|
|
GimpTemplate *edit_template)
|
1999-03-03 12:35:12 +00:00
|
|
|
|
{
|
2003-10-14 15:20:59 +00:00
|
|
|
|
if (template)
|
2008-11-26 19:15:27 +00:00
|
|
|
|
{
|
|
|
|
|
/* make sure the resolution values are copied first (see bug #546924) */
|
|
|
|
|
gimp_config_sync (G_OBJECT (template), G_OBJECT (edit_template),
|
|
|
|
|
GIMP_TEMPLATE_PARAM_COPY_FIRST);
|
|
|
|
|
gimp_config_sync (G_OBJECT (template), G_OBJECT (edit_template),
|
|
|
|
|
0);
|
|
|
|
|
}
|
1999-03-03 12:35:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
1999-03-27 18:16:30 +00:00
|
|
|
|
static void
|
2003-10-14 15:20:59 +00:00
|
|
|
|
prefs_resolution_source_callback (GtkWidget *widget,
|
|
|
|
|
GObject *config)
|
1999-03-27 18:16:30 +00:00
|
|
|
|
{
|
2002-11-20 19:45:03 +00:00
|
|
|
|
gdouble xres;
|
|
|
|
|
gdouble yres;
|
|
|
|
|
gboolean from_gdk;
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2008-06-28 15:12:13 +00:00
|
|
|
|
from_gdk = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
1999-02-25 11:25:53 +00:00
|
|
|
|
|
2002-12-14 14:13:54 +00:00
|
|
|
|
if (from_gdk)
|
|
|
|
|
{
|
2014-05-02 23:56:16 +02:00
|
|
|
|
gimp_get_monitor_resolution (gtk_widget_get_screen (widget),
|
|
|
|
|
gimp_widget_get_monitor (widget),
|
|
|
|
|
&xres, &yres);
|
2002-12-14 14:13:54 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
1999-02-25 11:25:53 +00:00
|
|
|
|
{
|
2005-04-16 19:27:28 +00:00
|
|
|
|
GimpSizeEntry *entry = g_object_get_data (G_OBJECT (widget),
|
|
|
|
|
"monitor_resolution_sizeentry");
|
2007-10-27 20:18:53 +00:00
|
|
|
|
|
|
|
|
|
g_return_if_fail (GIMP_IS_SIZE_ENTRY (entry));
|
|
|
|
|
|
|
|
|
|
xres = gimp_size_entry_get_refval (entry, 0);
|
|
|
|
|
yres = gimp_size_entry_get_refval (entry, 1);
|
1999-02-25 11:25:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
g_object_set (config,
|
|
|
|
|
"monitor-xresolution", xres,
|
|
|
|
|
"monitor-yresolution", yres,
|
2002-11-21 15:46:19 +00:00
|
|
|
|
"monitor-resolution-from-windowing-system", from_gdk,
|
2002-11-20 19:45:03 +00:00
|
|
|
|
NULL);
|
1999-02-25 11:25:53 +00:00
|
|
|
|
}
|
1998-12-05 21:48:37 +00:00
|
|
|
|
|
2000-09-25 01:27:47 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_resolution_calibrate_callback (GtkWidget *widget,
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GtkWidget *entry)
|
2000-09-25 01:27:47 +00:00
|
|
|
|
{
|
2002-02-28 18:34:41 +00:00
|
|
|
|
GtkWidget *dialog;
|
2013-03-10 19:49:59 +01:00
|
|
|
|
GtkWidget *prefs_box;
|
2002-02-28 18:34:41 +00:00
|
|
|
|
GtkWidget *image;
|
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
dialog = gtk_widget_get_toplevel (entry);
|
2002-02-28 18:34:41 +00:00
|
|
|
|
|
2013-03-10 19:49:59 +01:00
|
|
|
|
prefs_box = g_object_get_data (G_OBJECT (dialog), "prefs-box");
|
|
|
|
|
image = gimp_prefs_box_get_image (GIMP_PREFS_BOX (prefs_box));
|
2002-02-28 18:34:41 +00:00
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
resolution_calibrate_dialog (entry, gtk_image_get_pixbuf (GTK_IMAGE (image)));
|
2000-09-25 01:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-04-14 14:15:20 +00:00
|
|
|
|
static void
|
2004-03-09 10:51:25 +00:00
|
|
|
|
prefs_input_devices_dialog (GtkWidget *widget,
|
2004-07-20 18:50:20 +00:00
|
|
|
|
Gimp *gimp)
|
2003-04-14 14:15:20 +00:00
|
|
|
|
{
|
2010-02-28 23:20:57 +01:00
|
|
|
|
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
2010-02-19 17:41:26 +01:00
|
|
|
|
gtk_widget_get_screen (widget),
|
2014-05-02 03:01:23 +02:00
|
|
|
|
gimp_widget_get_monitor (widget),
|
2010-02-19 17:41:26 +01:00
|
|
|
|
"gimp-input-devices-dialog", 0);
|
2002-02-28 16:55:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
2004-07-20 18:50:20 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
2010-02-28 23:20:57 +01:00
|
|
|
|
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
2005-09-30 00:40:45 +00:00
|
|
|
|
gtk_widget_get_screen (widget),
|
2014-05-02 03:01:23 +02:00
|
|
|
|
gimp_widget_get_monitor (widget),
|
2005-09-30 00:40:45 +00:00
|
|
|
|
"gimp-keyboard-shortcuts-dialog", 0);
|
2004-07-20 18:50:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
2004-07-21 16:11:31 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_menus_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *clear_button;
|
|
|
|
|
|
|
|
|
|
menus_save (gimp, TRUE);
|
|
|
|
|
|
|
|
|
|
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
|
|
|
|
|
|
|
|
|
|
if (clear_button)
|
|
|
|
|
gtk_widget_set_sensitive (clear_button, TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_menus_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GError *error = NULL;
|
|
|
|
|
|
|
|
|
|
if (! menus_clear (gimp, &error))
|
|
|
|
|
{
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
|
2004-07-21 16:11:31 +00:00
|
|
|
|
g_clear_error (&error);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_set_sensitive (widget, FALSE);
|
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_INFO, TRUE,
|
|
|
|
|
_("Your keyboard shortcuts will be reset to "
|
|
|
|
|
"default values the next time you start GIMP."));
|
2004-07-21 16:11:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2006-05-11 12:29:57 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_menus_remove_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *dialog;
|
|
|
|
|
|
|
|
|
|
dialog = gimp_message_dialog_new (_("Remove all Keyboard Shortcuts"),
|
|
|
|
|
GIMP_STOCK_QUESTION,
|
|
|
|
|
gtk_widget_get_toplevel (widget),
|
|
|
|
|
GTK_DIALOG_MODAL |
|
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
|
gimp_standard_help_func, NULL,
|
|
|
|
|
|
|
|
|
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
|
|
|
|
GTK_STOCK_CLEAR, GTK_RESPONSE_OK,
|
|
|
|
|
|
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
|
|
|
|
GTK_RESPONSE_OK,
|
|
|
|
|
GTK_RESPONSE_CANCEL,
|
|
|
|
|
-1);
|
|
|
|
|
|
|
|
|
|
g_signal_connect_object (gtk_widget_get_toplevel (widget), "unmap",
|
|
|
|
|
G_CALLBACK (gtk_widget_destroy),
|
|
|
|
|
dialog, G_CONNECT_SWAPPED);
|
|
|
|
|
|
|
|
|
|
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
|
|
|
|
_("Do you really want to remove all "
|
|
|
|
|
"keyboard shortcuts from all menus?"));
|
|
|
|
|
|
|
|
|
|
if (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK)
|
|
|
|
|
{
|
|
|
|
|
menus_remove (gimp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gtk_widget_destroy (dialog);
|
|
|
|
|
}
|
|
|
|
|
|
2004-07-21 16:11:31 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_session_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *clear_button;
|
|
|
|
|
|
|
|
|
|
session_save (gimp, TRUE);
|
|
|
|
|
|
|
|
|
|
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
|
|
|
|
|
|
|
|
|
|
if (clear_button)
|
|
|
|
|
gtk_widget_set_sensitive (clear_button, TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_session_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GError *error = NULL;
|
|
|
|
|
|
|
|
|
|
if (! session_clear (gimp, &error))
|
|
|
|
|
{
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
|
2004-07-21 16:11:31 +00:00
|
|
|
|
g_clear_error (&error);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_set_sensitive (widget, FALSE);
|
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_INFO, TRUE,
|
|
|
|
|
_("Your window setup will be reset to "
|
|
|
|
|
"default values the next time you start GIMP."));
|
2004-07-21 16:11:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_devices_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *clear_button;
|
|
|
|
|
|
|
|
|
|
gimp_devices_save (gimp, TRUE);
|
|
|
|
|
|
|
|
|
|
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
|
|
|
|
|
|
|
|
|
|
if (clear_button)
|
|
|
|
|
gtk_widget_set_sensitive (clear_button, TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_devices_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GError *error = NULL;
|
|
|
|
|
|
|
|
|
|
if (! gimp_devices_clear (gimp, &error))
|
|
|
|
|
{
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
|
2004-07-21 16:11:31 +00:00
|
|
|
|
g_clear_error (&error);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_set_sensitive (widget, FALSE);
|
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_INFO, TRUE,
|
|
|
|
|
_("Your input device settings will be reset to "
|
|
|
|
|
"default values the next time you start GIMP."));
|
2004-07-21 16:11:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-26 06:02:59 +12:00
|
|
|
|
static void
|
2014-07-29 12:28:18 +02:00
|
|
|
|
prefs_search_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
2013-09-26 06:02:59 +12:00
|
|
|
|
{
|
2014-07-29 12:28:18 +02:00
|
|
|
|
gimp_action_history_clear (gimp);
|
2013-09-26 06:02:59 +12:00
|
|
|
|
}
|
|
|
|
|
|
2005-04-11 21:17:59 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_tool_options_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *clear_button;
|
|
|
|
|
|
|
|
|
|
gimp_tools_save (gimp, TRUE, TRUE);
|
|
|
|
|
|
|
|
|
|
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
|
|
|
|
|
|
|
|
|
|
if (clear_button)
|
|
|
|
|
gtk_widget_set_sensitive (clear_button, TRUE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_tool_options_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GError *error = NULL;
|
|
|
|
|
|
|
|
|
|
if (! gimp_tools_clear (gimp, &error))
|
|
|
|
|
{
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
|
2005-04-11 21:17:59 +00:00
|
|
|
|
g_clear_error (&error);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gtk_widget_set_sensitive (widget, FALSE);
|
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
prefs_message (GTK_MESSAGE_INFO, TRUE,
|
|
|
|
|
_("Your tool options will be reset to "
|
|
|
|
|
"default values the next time you start GIMP."));
|
2005-04-11 21:17:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-11-22 22:10:40 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_format_string_select_callback (GtkTreeSelection *sel,
|
|
|
|
|
GtkEntry *entry)
|
|
|
|
|
{
|
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
2003-06-11 15:01:38 +00:00
|
|
|
|
if (gtk_tree_selection_get_selected (sel, &model, &iter))
|
|
|
|
|
{
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue val = G_VALUE_INIT;
|
2002-11-22 22:10:40 +00:00
|
|
|
|
|
2003-06-11 15:01:38 +00:00
|
|
|
|
gtk_tree_model_get_value (model, &iter, 1, &val);
|
|
|
|
|
gtk_entry_set_text (entry, g_value_get_string (&val));
|
|
|
|
|
g_value_unset (&val);
|
|
|
|
|
}
|
2002-11-22 22:10:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-11-11 23:56:00 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_theme_select_callback (GtkTreeSelection *sel,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
|
|
if (gtk_tree_selection_get_selected (sel, &model, &iter))
|
|
|
|
|
{
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue val = G_VALUE_INIT;
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
|
|
|
|
gtk_tree_model_get_value (model, &iter, 0, &val);
|
2015-12-08 14:52:12 -05:00
|
|
|
|
g_object_set_property (G_OBJECT (gimp->config), "theme", &val);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
g_value_unset (&val);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-11-12 12:56:31 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_theme_reload_callback (GtkWidget *button,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
g_object_notify (G_OBJECT (gimp->config), "theme");
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-08 14:52:12 -05:00
|
|
|
|
static void
|
|
|
|
|
prefs_icon_theme_select_callback (GtkTreeSelection *sel,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
|
|
if (gtk_tree_selection_get_selected (sel, &model, &iter))
|
|
|
|
|
{
|
2016-03-26 15:59:26 +01:00
|
|
|
|
GValue val = G_VALUE_INIT;
|
2015-12-08 14:52:12 -05:00
|
|
|
|
|
2015-12-30 03:31:40 +01:00
|
|
|
|
gtk_tree_model_get_value (model, &iter, 1, &val);
|
2015-12-08 14:52:12 -05:00
|
|
|
|
g_object_set_property (G_OBJECT (gimp->config), "icon-theme", &val);
|
|
|
|
|
g_value_unset (&val);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2004-11-10 13:44:14 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_canvas_padding_color_changed (GtkWidget *button,
|
|
|
|
|
GtkWidget *combo)
|
|
|
|
|
{
|
|
|
|
|
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
|
|
|
|
|
GIMP_CANVAS_PADDING_MODE_CUSTOM);
|
|
|
|
|
}
|
|
|
|
|
|
2003-10-22 14:46:05 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_display_options_frame_add (Gimp *gimp,
|
|
|
|
|
GObject *object,
|
|
|
|
|
const gchar *label,
|
|
|
|
|
GtkContainer *parent)
|
|
|
|
|
{
|
2003-10-23 11:39:33 +00:00
|
|
|
|
GtkWidget *vbox;
|
|
|
|
|
GtkWidget *hbox;
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GtkWidget *checks_vbox;
|
2003-10-22 14:46:05 +00:00
|
|
|
|
GtkWidget *table;
|
2004-11-10 13:44:14 +00:00
|
|
|
|
GtkWidget *combo;
|
2003-10-22 14:46:05 +00:00
|
|
|
|
GtkWidget *button;
|
|
|
|
|
|
2003-10-23 11:39:33 +00:00
|
|
|
|
vbox = prefs_frame_new (label, parent, FALSE);
|
|
|
|
|
|
2011-09-30 11:29:11 +02:00
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
2003-10-23 11:39:33 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
2003-10-22 20:32:13 +00:00
|
|
|
|
|
2011-09-30 11:29:11 +02:00
|
|
|
|
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
2003-10-23 11:39:33 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
|
2003-10-22 20:32:13 +00:00
|
|
|
|
gtk_widget_show (checks_vbox);
|
|
|
|
|
|
2007-09-12 16:26:04 +00:00
|
|
|
|
#ifndef GDK_WINDOWING_QUARTZ
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-menubar",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show _menubar"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2007-09-12 16:26:04 +00:00
|
|
|
|
#endif /* !GDK_WINDOWING_QUARTZ */
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-rulers",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show _rulers"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-scrollbars",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show scroll_bars"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-statusbar",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show s_tatusbar"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
|
2011-09-30 11:29:11 +02:00
|
|
|
|
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
2003-10-23 11:39:33 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
|
2003-10-22 20:32:13 +00:00
|
|
|
|
gtk_widget_show (checks_vbox);
|
2003-10-22 14:46:05 +00:00
|
|
|
|
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-selection",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show s_election"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-layer-boundary",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show _layer boundary"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-guides",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show _guides"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 11:39:33 +00:00
|
|
|
|
prefs_check_button_add (object, "show-grid",
|
2004-06-23 22:44:04 +00:00
|
|
|
|
_("Show gri_d"),
|
2003-10-22 20:32:13 +00:00
|
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-22 14:46:05 +00:00
|
|
|
|
|
2004-05-21 14:17:27 +00:00
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox));
|
2003-10-22 14:46:05 +00:00
|
|
|
|
|
2004-11-10 13:44:14 +00:00
|
|
|
|
combo = prefs_enum_combo_box_add (object, "padding-mode", 0, 0,
|
|
|
|
|
_("Canvas _padding mode:"),
|
|
|
|
|
GTK_TABLE (table), 0,
|
|
|
|
|
NULL);
|
2003-10-22 14:46:05 +00:00
|
|
|
|
|
|
|
|
|
button = prefs_color_button_add (object, "padding-color",
|
2004-10-12 22:57:15 +00:00
|
|
|
|
_("Custom p_adding color:"),
|
2005-08-23 00:18:08 +00:00
|
|
|
|
_("Select Custom Canvas Padding Color"),
|
2016-08-29 17:38:33 +02:00
|
|
|
|
GTK_TABLE (table), 1, NULL,
|
|
|
|
|
gimp_get_user_context (gimp));
|
2004-11-10 13:44:14 +00:00
|
|
|
|
|
2005-05-27 16:51:39 +00:00
|
|
|
|
g_signal_connect (button, "color-changed",
|
2004-11-10 13:44:14 +00:00
|
|
|
|
G_CALLBACK (prefs_canvas_padding_color_changed),
|
2007-11-10 15:44:51 +00:00
|
|
|
|
combo);
|
2003-10-22 14:46:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-07-16 18:21:34 +09:00
|
|
|
|
static void
|
|
|
|
|
prefs_behavior_options_frame_add (Gimp *gimp,
|
2016-08-24 18:27:49 +02:00
|
|
|
|
GObject *object,
|
|
|
|
|
const gchar *label,
|
|
|
|
|
GtkContainer *parent)
|
2013-07-16 18:21:34 +09:00
|
|
|
|
{
|
|
|
|
|
GtkWidget *vbox;
|
|
|
|
|
GtkWidget *hbox;
|
|
|
|
|
GtkWidget *checks_vbox;
|
|
|
|
|
|
|
|
|
|
vbox = prefs_frame_new (label, parent, FALSE);
|
|
|
|
|
|
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
|
|
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (checks_vbox);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "snap-to-guides",
|
|
|
|
|
_("Snap to Guides"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
prefs_check_button_add (object, "snap-to-grid",
|
|
|
|
|
_("Snap to Grid"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
|
|
|
|
|
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (checks_vbox);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "snap-to-canvas",
|
|
|
|
|
_("Snap to Canvas Edges"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
prefs_check_button_add (object, "snap-to-path",
|
|
|
|
|
_("Snap to Active Path"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
}
|
|
|
|
|
|
1999-12-18 11:37:11 +00:00
|
|
|
|
static void
|
2003-08-23 19:35:05 +00:00
|
|
|
|
prefs_help_func (const gchar *help_id,
|
|
|
|
|
gpointer help_data)
|
1999-12-18 11:37:11 +00:00
|
|
|
|
{
|
2013-03-10 19:49:59 +01:00
|
|
|
|
GtkWidget *prefs_box;
|
2003-08-23 19:35:05 +00:00
|
|
|
|
GtkWidget *notebook;
|
2016-08-14 15:52:46 +02:00
|
|
|
|
GtkWidget *page;
|
2003-08-23 19:35:05 +00:00
|
|
|
|
gint page_num;
|
1999-12-18 11:37:11 +00:00
|
|
|
|
|
2013-03-10 19:49:59 +01:00
|
|
|
|
prefs_box = g_object_get_data (G_OBJECT (help_data), "prefs-box");
|
|
|
|
|
notebook = gimp_prefs_box_get_notebook (GIMP_PREFS_BOX (prefs_box));
|
2003-08-23 19:35:05 +00:00
|
|
|
|
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
|
2016-08-14 15:52:46 +02:00
|
|
|
|
page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
|
1999-12-18 11:37:11 +00:00
|
|
|
|
|
2016-08-14 15:52:46 +02:00
|
|
|
|
help_id = g_object_get_data (G_OBJECT (page), "gimp-help-id");
|
2003-08-23 19:35:05 +00:00
|
|
|
|
gimp_standard_help_func (help_id, NULL);
|
1999-12-18 11:37:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-08-10 13:12:17 +00:00
|
|
|
|
static void
|
|
|
|
|
prefs_message (GtkMessageType type,
|
|
|
|
|
gboolean destroy_with_parent,
|
|
|
|
|
const gchar *message)
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *dialog;
|
|
|
|
|
|
|
|
|
|
dialog = gtk_message_dialog_new (GTK_WINDOW (prefs_dialog),
|
|
|
|
|
destroy_with_parent ?
|
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT : 0,
|
|
|
|
|
type, GTK_BUTTONS_OK,
|
2008-11-04 12:33:09 +00:00
|
|
|
|
"%s", message);
|
2006-08-10 13:12:17 +00:00
|
|
|
|
|
2006-08-11 12:56:26 +00:00
|
|
|
|
g_signal_connect (dialog, "response",
|
|
|
|
|
G_CALLBACK (gtk_widget_destroy),
|
|
|
|
|
NULL);
|
2006-08-10 13:12:17 +00:00
|
|
|
|
gtk_widget_show (dialog);
|
|
|
|
|
}
|
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
static GtkWidget *
|
2003-10-11 14:30:18 +00:00
|
|
|
|
prefs_dialog_new (Gimp *gimp,
|
|
|
|
|
GimpConfig *config)
|
1999-03-27 18:16:30 +00:00
|
|
|
|
{
|
2002-11-20 19:45:03 +00:00
|
|
|
|
GtkWidget *dialog;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
GtkTreeIter top_iter;
|
|
|
|
|
GtkTreeIter child_iter;
|
|
|
|
|
|
2013-03-10 19:49:59 +01:00
|
|
|
|
GtkWidget *prefs_box;
|
2015-12-11 06:29:50 -05:00
|
|
|
|
GtkSizeGroup *size_group = NULL;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
GtkWidget *vbox;
|
|
|
|
|
GtkWidget *hbox;
|
2013-03-10 19:49:59 +01:00
|
|
|
|
GtkWidget *vbox2;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
GtkWidget *button;
|
2004-07-21 16:11:31 +00:00
|
|
|
|
GtkWidget *button2;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
GtkWidget *table;
|
|
|
|
|
GtkWidget *label;
|
2005-04-16 19:27:28 +00:00
|
|
|
|
GtkWidget *entry;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
GtkWidget *calibrate_button;
|
|
|
|
|
GSList *group;
|
2003-10-10 14:11:47 +00:00
|
|
|
|
GtkWidget *editor;
|
2002-11-20 19:45:03 +00:00
|
|
|
|
gint i;
|
|
|
|
|
|
2003-10-11 14:30:18 +00:00
|
|
|
|
GObject *object;
|
2002-11-20 19:45:03 +00:00
|
|
|
|
GimpCoreConfig *core_config;
|
|
|
|
|
GimpDisplayConfig *display_config;
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2001-10-29 11:47:11 +00:00
|
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
2003-10-11 14:30:18 +00:00
|
|
|
|
g_return_val_if_fail (GIMP_IS_CONFIG (config), NULL);
|
2001-10-29 11:47:11 +00:00
|
|
|
|
|
2003-10-11 14:30:18 +00:00
|
|
|
|
object = G_OBJECT (config);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
core_config = GIMP_CORE_CONFIG (config);
|
|
|
|
|
display_config = GIMP_DISPLAY_CONFIG (config);
|
1998-12-05 21:48:37 +00:00
|
|
|
|
|
2011-03-21 21:49:08 +01:00
|
|
|
|
dialog = gimp_dialog_new (_("Preferences"), "gimp-preferences",
|
2003-11-06 15:27:05 +00:00
|
|
|
|
NULL, 0,
|
2002-11-20 19:45:03 +00:00
|
|
|
|
prefs_help_func,
|
2003-08-22 01:42:57 +00:00
|
|
|
|
GIMP_HELP_PREFS_DIALOG,
|
2000-01-25 23:05:47 +00:00
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
GIMP_STOCK_RESET, RESPONSE_RESET,
|
2003-11-06 15:27:05 +00:00
|
|
|
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
|
|
|
|
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
|
|
|
|
NULL);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2005-02-08 20:40:33 +00:00
|
|
|
|
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
2006-06-04 18:05:53 +00:00
|
|
|
|
RESPONSE_RESET,
|
2005-02-08 20:40:33 +00:00
|
|
|
|
GTK_RESPONSE_OK,
|
|
|
|
|
GTK_RESPONSE_CANCEL,
|
|
|
|
|
-1);
|
|
|
|
|
|
2006-06-04 18:05:53 +00:00
|
|
|
|
g_signal_connect (dialog, "response",
|
|
|
|
|
G_CALLBACK (prefs_response),
|
|
|
|
|
dialog);
|
|
|
|
|
|
2013-03-10 19:49:59 +01:00
|
|
|
|
/* The prefs box */
|
|
|
|
|
prefs_box = gimp_prefs_box_new ();
|
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (prefs_box), 12);
|
2010-10-30 14:56:00 +02:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
2013-03-10 19:49:59 +01:00
|
|
|
|
prefs_box, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (prefs_box);
|
2002-02-28 13:47:03 +00:00
|
|
|
|
|
2013-03-10 19:49:59 +01:00
|
|
|
|
g_object_set_data (G_OBJECT (dialog), "prefs-box", prefs_box);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/**********************/
|
|
|
|
|
/* System Resources */
|
|
|
|
|
/**********************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-13 13:23:31 +01:00
|
|
|
|
"gimp-prefs-system-resources",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("System Resources"),
|
|
|
|
|
_("System Resources"),
|
2015-12-13 13:23:31 +01:00
|
|
|
|
GIMP_HELP_PREFS_SYSTEM_RESOURCES,
|
2013-03-10 19:49:59 +01:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
vbox2 = prefs_frame_new (_("Resource Consumption"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2000-02-04 04:31:18 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
#ifdef ENABLE_MP
|
|
|
|
|
table = prefs_table_new (5, GTK_CONTAINER (vbox2));
|
|
|
|
|
#else
|
|
|
|
|
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
|
|
|
|
|
#endif /* ENABLE_MP */
|
1999-05-31 14:11:10 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
prefs_spin_button_add (object, "undo-levels", 1.0, 5.0, 0,
|
|
|
|
|
_("Minimal number of _undo levels:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
prefs_memsize_entry_add (object, "undo-size",
|
|
|
|
|
_("Maximum undo _memory:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
|
|
|
|
prefs_memsize_entry_add (object, "tile-cache-size",
|
|
|
|
|
_("Tile cache _size:"),
|
|
|
|
|
GTK_TABLE (table), 2, size_group);
|
|
|
|
|
prefs_memsize_entry_add (object, "max-new-image-size",
|
|
|
|
|
_("Maximum _new image size:"),
|
|
|
|
|
GTK_TABLE (table), 3, size_group);
|
2002-11-21 15:46:19 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
#ifdef ENABLE_MP
|
|
|
|
|
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
|
|
|
|
|
_("Number of _processors to use:"),
|
|
|
|
|
GTK_TABLE (table), 4, size_group);
|
|
|
|
|
#endif /* ENABLE_MP */
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2013-06-01 23:02:42 +02:00
|
|
|
|
/* Hardware Acceleration */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Hardware Acceleration"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "use-opencl",
|
|
|
|
|
_("Use OpenCL"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
/* Image Thumbnails */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Image Thumbnails"), GTK_CONTAINER (vbox), FALSE);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
2001-07-25 00:42:47 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
prefs_enum_combo_box_add (object, "thumbnail-size", 0, 0,
|
|
|
|
|
_("Size of _thumbnails:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
prefs_memsize_entry_add (object, "thumbnail-filesize-limit",
|
|
|
|
|
_("Maximum _filesize for thumbnailing:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
2003-10-10 14:11:47 +00:00
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = NULL;
|
2003-10-10 14:11:47 +00:00
|
|
|
|
|
2005-10-31 20:57:03 +00:00
|
|
|
|
/* Document History */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Document History"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "save-document-history",
|
2008-03-24 23:03:23 +00:00
|
|
|
|
_("Keep record of used files in the Recent Documents list"),
|
2006-04-12 12:49:29 +00:00
|
|
|
|
GTK_BOX (vbox2));
|
2005-10-31 20:57:03 +00:00
|
|
|
|
|
2003-10-10 14:11:47 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/**********************/
|
|
|
|
|
/* Color Management */
|
|
|
|
|
/**********************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-12 22:52:53 +01:00
|
|
|
|
"gimp-prefs-color-management",
|
|
|
|
|
_("Color Management"),
|
|
|
|
|
_("Color Management"),
|
|
|
|
|
GIMP_HELP_PREFS_COLOR_MANAGEMENT,
|
2013-03-10 19:49:59 +01:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2016-08-24 12:52:33 +02:00
|
|
|
|
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
|
|
|
|
|
|
2016-09-22 18:53:18 +02:00
|
|
|
|
button = gimp_prefs_box_set_page_resettable (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
vbox,
|
|
|
|
|
_("Reset Color Management"));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_color_management_reset),
|
2016-09-26 00:56:40 +02:00
|
|
|
|
config);
|
2016-09-22 18:53:18 +02:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
{
|
2016-09-22 18:53:18 +02:00
|
|
|
|
GObject *color_config = G_OBJECT (core_config->color_management);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GtkListStore *store;
|
|
|
|
|
gchar *filename;
|
|
|
|
|
gint row = 0;
|
2009-12-30 22:21:54 +01:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
filename = gimp_personal_rc_file ("profilerc");
|
|
|
|
|
store = gimp_color_profile_store_new (filename);
|
|
|
|
|
g_free (filename);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gimp_color_profile_store_add_file (GIMP_COLOR_PROFILE_STORE (store),
|
|
|
|
|
NULL, NULL);
|
2004-05-21 14:17:27 +00:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
2004-05-21 14:17:27 +00:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox));
|
2004-07-28 16:24:51 +00:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
prefs_enum_combo_box_add (color_config, "mode", 0, 0,
|
|
|
|
|
_("Image display _mode:"),
|
|
|
|
|
GTK_TABLE (table), row++, NULL);
|
2004-07-20 18:50:20 +00:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
/* Color Managed Display */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Color Managed Display"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
|
|
|
|
|
row = 0;
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"display-profile",
|
|
|
|
|
store,
|
|
|
|
|
_("Select Monitor Color Profile"),
|
|
|
|
|
_("_Monitor profile:"),
|
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config,
|
|
|
|
|
"display-profile-from-gdk",
|
|
|
|
|
_("_Try to use the system monitor "
|
|
|
|
|
"profile"));
|
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table),
|
|
|
|
|
button, 1, 2, row, row + 1);
|
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
row++;
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (color_config,
|
|
|
|
|
"display-rendering-intent", 0, 0,
|
|
|
|
|
_("_Rendering intent:"),
|
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config,
|
|
|
|
|
"display-use-black-point-compensation",
|
|
|
|
|
_("Use _black point compensation"));
|
2016-06-06 01:15:26 +02:00
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table),
|
|
|
|
|
button, 1, 2, row, row + 1);
|
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
row++;
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
2016-06-07 13:08:18 +02:00
|
|
|
|
prefs_boolean_combo_box_add (color_config,
|
|
|
|
|
"display-optimize",
|
|
|
|
|
_("Speed"),
|
|
|
|
|
_("Precision / Color Fidelity"),
|
|
|
|
|
_("_Optimize image display for:"),
|
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
2016-06-08 00:21:51 +03:00
|
|
|
|
/* Print Simulation (Soft-proofing) */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Soft-Proofing"),
|
2016-05-14 14:48:58 +02:00
|
|
|
|
GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
|
|
|
|
|
row = 0;
|
|
|
|
|
|
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"printer-profile",
|
|
|
|
|
store,
|
2016-06-08 00:21:51 +03:00
|
|
|
|
_("Select Soft-Proofing Color Profile"),
|
|
|
|
|
_("_Soft-proofing profile:"),
|
2016-05-14 14:48:58 +02:00
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (color_config,
|
|
|
|
|
"simulation-rendering-intent", 0, 0,
|
|
|
|
|
_("Re_ndering intent:"),
|
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config,
|
|
|
|
|
"simulation-use-black-point-compensation",
|
|
|
|
|
_("Use black _point compensation"));
|
2016-06-06 01:15:26 +02:00
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table),
|
|
|
|
|
button, 1, 2, row, row + 1);
|
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
row++;
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
2016-06-07 13:08:18 +02:00
|
|
|
|
prefs_boolean_combo_box_add (color_config,
|
|
|
|
|
"simulation-optimize",
|
|
|
|
|
_("Speed"),
|
|
|
|
|
_("Precision / Color Fidelity"),
|
2016-06-08 00:21:51 +03:00
|
|
|
|
_("O_ptimize soft-proofing for:"),
|
2016-06-07 13:08:18 +02:00
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, row, row + 1);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
row++;
|
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config, "simulation-gamut-check",
|
|
|
|
|
_("Mark out of gamut colors"));
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
|
|
button = gimp_prop_color_button_new (color_config, "out-of-gamut-color",
|
|
|
|
|
_("Select Warning Color"),
|
2016-09-22 19:13:33 +02:00
|
|
|
|
PREFS_COLOR_BUTTON_WIDTH,
|
|
|
|
|
PREFS_COLOR_BUTTON_HEIGHT,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GIMP_COLOR_AREA_FLAT);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
|
|
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
|
|
|
|
gimp_get_user_context (gimp));
|
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
/* Preferred profiles */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Preferred Profiles"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
|
|
|
|
row = 0;
|
|
|
|
|
|
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"rgb-profile",
|
|
|
|
|
store,
|
|
|
|
|
_("Select Preferred RGB Color Profile"),
|
|
|
|
|
_("_RGB profile:"),
|
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"gray-profile",
|
|
|
|
|
store,
|
|
|
|
|
_("Select Preferred Grayscale Color Profile"),
|
2016-05-14 17:58:21 +03:00
|
|
|
|
_("_Grayscale profile:"),
|
2016-05-14 14:48:58 +02:00
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"cmyk-profile",
|
|
|
|
|
store,
|
|
|
|
|
_("Select CMYK Color Profile"),
|
|
|
|
|
_("_CMYK profile:"),
|
|
|
|
|
GTK_TABLE (table), row++, size_group);
|
|
|
|
|
|
|
|
|
|
/* Policies */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Policies"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
2016-08-23 19:18:20 +02:00
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
|
|
|
|
_("File Open behaviour:"),
|
2016-08-23 19:18:20 +02:00
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
2016-05-14 14:48:58 +02:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
|
|
|
|
|
g_object_unref (store);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
}
|
2006-05-11 12:29:57 +00:00
|
|
|
|
|
2003-04-08 10:02:42 +00:00
|
|
|
|
|
2014-09-14 01:08:25 +02:00
|
|
|
|
/****************/
|
|
|
|
|
/* Playground */
|
|
|
|
|
/****************/
|
|
|
|
|
if (gimp->show_playground)
|
|
|
|
|
{
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
"gimp-prefs-playground",
|
2014-09-14 01:08:25 +02:00
|
|
|
|
_("Experimental Playground"),
|
|
|
|
|
_("Playground"),
|
|
|
|
|
GIMP_HELP_PREFS_DIALOG,
|
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
|
|
|
|
|
|
|
|
|
vbox2 = prefs_frame_new (_("Insane Options"),
|
|
|
|
|
GTK_CONTAINER (vbox), TRUE);
|
|
|
|
|
|
2015-03-03 20:26:58 +01:00
|
|
|
|
button = prefs_check_button_add (object, "playground-npd-tool",
|
|
|
|
|
_("_N-Point Deformation tool"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2015-03-08 17:21:11 +01:00
|
|
|
|
button = prefs_check_button_add (object, "playground-handle-transform-tool",
|
|
|
|
|
_("_Handle Transform tool"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2015-06-14 13:02:31 +02:00
|
|
|
|
button = prefs_check_button_add (object, "playground-seamless-clone-tool",
|
|
|
|
|
_("_Seamless Clone tool"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2014-09-14 01:08:25 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/******************/
|
|
|
|
|
/* Tool Options */
|
|
|
|
|
/******************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-12 22:52:53 +01:00
|
|
|
|
"gimp-prefs-tool-options",
|
|
|
|
|
C_("preferences", "Tool Options"),
|
|
|
|
|
C_("preferences", "Tool Options"),
|
|
|
|
|
GIMP_HELP_PREFS_TOOL_OPTIONS,
|
2013-03-10 19:49:59 +01:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
2002-02-28 16:55:38 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* General */
|
|
|
|
|
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_check_button_add (object, "save-tool-options",
|
|
|
|
|
_("_Save tool options on exit"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2016-09-03 15:28:22 +02:00
|
|
|
|
button = prefs_button_add ("document-save",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Save Tool Options _Now"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_tool_options_save_callback),
|
|
|
|
|
gimp);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
button2 = prefs_button_add (GIMP_STOCK_RESET,
|
|
|
|
|
_("_Reset Saved Tool Options to "
|
|
|
|
|
"Default Values"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button2, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_tool_options_clear_callback),
|
|
|
|
|
gimp);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_object_set_data (G_OBJECT (button), "clear-button", button2);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Scaling */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Scaling"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_enum_combo_box_add (object, "interpolation-type", 0, 0,
|
|
|
|
|
_("Default _interpolation:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2003-11-12 12:56:31 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Global Brush, Pattern, ... */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Paint Options Shared Between Tools"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2004-06-25 10:24:35 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_check_button_add_with_icon (object, "global-brush",
|
|
|
|
|
_("_Brush"), GIMP_STOCK_BRUSH,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "global-dynamics",
|
|
|
|
|
_("_Dynamics"), GIMP_STOCK_DYNAMICS,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "global-pattern",
|
|
|
|
|
_("_Pattern"), GIMP_STOCK_PATTERN,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "global-gradient",
|
|
|
|
|
_("_Gradient"), GIMP_STOCK_GRADIENT,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
2004-06-25 10:24:35 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Move Tool */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Move Tool"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2004-06-25 10:24:35 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_check_button_add_with_icon (object, "move-tool-changes-active",
|
|
|
|
|
_("Set layer or path as active"),
|
|
|
|
|
GIMP_STOCK_TOOL_MOVE,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = NULL;
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/*******************/
|
|
|
|
|
/* Default Image */
|
|
|
|
|
/*******************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-new-image",
|
|
|
|
|
_("Default New Image"),
|
|
|
|
|
_("Default Image"),
|
|
|
|
|
GIMP_HELP_PREFS_NEW_IMAGE,
|
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
|
|
|
|
|
2016-08-24 12:52:33 +02:00
|
|
|
|
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox));
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *combo;
|
|
|
|
|
|
|
|
|
|
combo = gimp_container_combo_box_new (gimp->templates,
|
|
|
|
|
gimp_get_user_context (gimp),
|
|
|
|
|
16, 0);
|
|
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
|
|
|
|
_("_Template:"), 0.0, 0.5,
|
|
|
|
|
combo, 1, FALSE);
|
|
|
|
|
|
|
|
|
|
gimp_container_view_select_item (GIMP_CONTAINER_VIEW (combo), NULL);
|
|
|
|
|
|
|
|
|
|
g_signal_connect (combo, "select-item",
|
|
|
|
|
G_CALLBACK (prefs_template_select_callback),
|
|
|
|
|
core_config->default_image);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
editor = gimp_template_editor_new (core_config->default_image, gimp, FALSE);
|
|
|
|
|
gimp_template_editor_show_advanced (GIMP_TEMPLATE_EDITOR (editor), TRUE);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), editor, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (editor);
|
2003-11-12 12:56:31 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Quick Mask Color */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Quick Mask"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
2016-08-24 19:49:59 +02:00
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_color_button_add (object, "quick-mask-color",
|
|
|
|
|
_("Quick Mask color:"),
|
|
|
|
|
_("Set the default Quick Mask color"),
|
|
|
|
|
GTK_TABLE (table), 0, NULL,
|
|
|
|
|
gimp_get_user_context (gimp));
|
2002-02-28 16:55:38 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/**********************************/
|
|
|
|
|
/* Default Image / Default Grid */
|
|
|
|
|
/**********************************/
|
2015-12-08 14:52:12 -05:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-12 22:52:53 +01:00
|
|
|
|
"gimp-prefs-default-grid",
|
|
|
|
|
_("Default Image Grid"),
|
|
|
|
|
_("Default Grid"),
|
|
|
|
|
GIMP_HELP_PREFS_DEFAULT_GRID,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
/* Grid */
|
|
|
|
|
editor = gimp_grid_editor_new (core_config->default_grid,
|
|
|
|
|
gimp_get_user_context (gimp),
|
|
|
|
|
gimp_template_get_resolution_x (core_config->default_image),
|
|
|
|
|
gimp_template_get_resolution_y (core_config->default_image));
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (editor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***************/
|
|
|
|
|
/* Interface */
|
|
|
|
|
/***************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-interface",
|
|
|
|
|
_("User Interface"),
|
|
|
|
|
_("Interface"),
|
|
|
|
|
GIMP_HELP_PREFS_INTERFACE,
|
2015-12-08 14:52:12 -05:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Language */
|
|
|
|
|
|
|
|
|
|
/* Only add the language entry if the iso-codes package is available. */
|
|
|
|
|
#ifdef HAVE_ISO_CODES
|
|
|
|
|
vbox2 = prefs_frame_new (_("Language"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_language_combo_box_add (object, "language", GTK_BOX (vbox2));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Previews */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Previews"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "layer-previews",
|
|
|
|
|
_("_Enable layer & channel previews"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-preview-size", 0, 0,
|
|
|
|
|
_("_Default layer & channel preview size:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2016-05-28 02:53:28 +03:00
|
|
|
|
prefs_enum_combo_box_add (object, "undo-preview-size", 0, 0,
|
|
|
|
|
_("_Undo preview size:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_enum_combo_box_add (object, "navigation-preview-size", 0, 0,
|
|
|
|
|
_("Na_vigation preview size:"),
|
2016-05-28 02:53:28 +03:00
|
|
|
|
GTK_TABLE (table), 2, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/* Keyboard Shortcuts */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "can-change-accels",
|
|
|
|
|
_("_Use dynamic keyboard shortcuts"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
button = prefs_button_add ("preferences-system",
|
|
|
|
|
_("Configure _Keyboard Shortcuts..."),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_keyboard_shortcuts_dialog),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "save-accels",
|
|
|
|
|
_("_Save keyboard shortcuts on exit"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-09-03 15:28:22 +02:00
|
|
|
|
button = prefs_button_add ("document-save",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Save Keyboard Shortcuts _Now"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_menus_save_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
button2 = prefs_button_add (GIMP_STOCK_RESET,
|
|
|
|
|
_("_Reset Keyboard Shortcuts to Default Values"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button2, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_menus_clear_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT (button), "clear-button", button2);
|
|
|
|
|
|
2016-09-03 15:28:22 +02:00
|
|
|
|
button = prefs_button_add ("edit-clear",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Remove _All Keyboard Shortcuts"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_menus_remove_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***********************/
|
|
|
|
|
/* Interface / Theme */
|
|
|
|
|
/***********************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-theme",
|
|
|
|
|
_("Theme"),
|
|
|
|
|
_("Theme"),
|
|
|
|
|
GIMP_HELP_PREFS_THEME,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
vbox2 = prefs_frame_new (_("Select Theme"), GTK_CONTAINER (vbox), TRUE);
|
2015-12-08 14:52:12 -05:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *scrolled_win;
|
|
|
|
|
GtkListStore *list_store;
|
|
|
|
|
GtkWidget *view;
|
|
|
|
|
GtkTreeSelection *sel;
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gchar **themes;
|
|
|
|
|
gint n_themes;
|
2015-12-08 14:52:12 -05:00
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
|
|
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
|
gtk_widget_set_size_request (scrolled_win, -1, 80);
|
|
|
|
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
|
|
|
|
|
GTK_SHADOW_IN);
|
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
|
|
|
|
GTK_POLICY_NEVER,
|
|
|
|
|
GTK_POLICY_AUTOMATIC);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (scrolled_win);
|
|
|
|
|
|
|
|
|
|
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
|
|
|
|
|
|
|
|
|
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolled_win), view);
|
|
|
|
|
gtk_widget_show (view);
|
|
|
|
|
|
|
|
|
|
g_object_unref (list_store);
|
|
|
|
|
|
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Theme"),
|
2015-12-08 14:52:12 -05:00
|
|
|
|
gtk_cell_renderer_text_new (),
|
|
|
|
|
"text", 0,
|
|
|
|
|
NULL);
|
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 1,
|
|
|
|
|
_("Folder"),
|
|
|
|
|
gtk_cell_renderer_text_new (),
|
|
|
|
|
"text", 1,
|
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
themes = themes_list_themes (gimp, &n_themes);
|
2015-12-08 14:52:12 -05:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
for (i = 0; i < n_themes; i++)
|
2015-12-08 14:52:12 -05:00
|
|
|
|
{
|
|
|
|
|
GtkTreeIter iter;
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GFile *theme_dir = themes_get_theme_dir (gimp, themes[i]);
|
2015-12-08 14:52:12 -05:00
|
|
|
|
|
|
|
|
|
gtk_list_store_append (list_store, &iter);
|
|
|
|
|
gtk_list_store_set (list_store, &iter,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
0, themes[i],
|
|
|
|
|
1, gimp_file_get_utf8_name (theme_dir),
|
|
|
|
|
-1);
|
|
|
|
|
|
|
|
|
|
if (GIMP_GUI_CONFIG (object)->theme &&
|
|
|
|
|
! strcmp (GIMP_GUI_CONFIG (object)->theme, themes[i]))
|
|
|
|
|
{
|
|
|
|
|
GtkTreePath *path;
|
|
|
|
|
|
|
|
|
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
|
|
|
|
|
|
|
|
|
|
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
|
|
|
|
|
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
|
|
|
|
|
NULL, FALSE, 0.0, 0.0);
|
|
|
|
|
|
|
|
|
|
gtk_tree_path_free (path);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_strfreev (themes);
|
|
|
|
|
|
|
|
|
|
g_signal_connect (sel, "changed",
|
|
|
|
|
G_CALLBACK (prefs_theme_select_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
|
|
button = prefs_button_add ("view-refresh",
|
|
|
|
|
_("Reload C_urrent Theme"),
|
|
|
|
|
GTK_BOX (hbox));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_theme_reload_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************/
|
|
|
|
|
/* Interface / Icon Theme */
|
|
|
|
|
/****************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-icon-theme",
|
|
|
|
|
_("Icon Theme"),
|
|
|
|
|
_("Icon Theme"),
|
|
|
|
|
GIMP_HELP_PREFS_ICON_THEME,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
vbox2 = prefs_frame_new (_("Select an Icon Theme"), GTK_CONTAINER (vbox), TRUE);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *scrolled_win;
|
|
|
|
|
GtkListStore *list_store;
|
|
|
|
|
GtkWidget *view;
|
|
|
|
|
GtkTreeSelection *sel;
|
|
|
|
|
gchar **icon_themes;
|
|
|
|
|
gint n_icon_themes;
|
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
|
|
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
|
gtk_widget_set_size_request (scrolled_win, -1, 80);
|
|
|
|
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
|
|
|
|
|
GTK_SHADOW_IN);
|
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
|
|
|
|
GTK_POLICY_NEVER,
|
|
|
|
|
GTK_POLICY_AUTOMATIC);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (scrolled_win);
|
|
|
|
|
|
2015-12-30 03:31:40 +01:00
|
|
|
|
list_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolled_win), view);
|
|
|
|
|
gtk_widget_show (view);
|
|
|
|
|
|
|
|
|
|
g_object_unref (list_store);
|
|
|
|
|
|
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
|
2015-12-30 03:31:40 +01:00
|
|
|
|
NULL,
|
|
|
|
|
gtk_cell_renderer_pixbuf_new (),
|
|
|
|
|
"pixbuf", 0,
|
|
|
|
|
NULL);
|
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 1,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Icon Theme"),
|
|
|
|
|
gtk_cell_renderer_text_new (),
|
2015-12-30 03:31:40 +01:00
|
|
|
|
"text", 1,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
NULL);
|
2015-12-30 03:31:40 +01:00
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 2,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Folder"),
|
|
|
|
|
gtk_cell_renderer_text_new (),
|
2015-12-30 03:31:40 +01:00
|
|
|
|
"text", 2,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
|
|
|
|
|
|
|
|
|
|
icon_themes = icon_themes_list_themes (gimp, &n_icon_themes);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < n_icon_themes; i++)
|
|
|
|
|
{
|
2015-12-30 03:31:40 +01:00
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GFile *icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_themes[i]);
|
2016-09-02 12:30:49 +02:00
|
|
|
|
GFile *icon_theme_search_path = g_file_get_parent (icon_theme_dir);
|
2015-12-30 03:31:40 +01:00
|
|
|
|
GtkIconTheme *theme;
|
|
|
|
|
gchar *example;
|
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
|
|
|
|
|
|
theme = gtk_icon_theme_new ();
|
2016-09-02 12:30:49 +02:00
|
|
|
|
gtk_icon_theme_prepend_search_path (theme, gimp_file_get_utf8_name(icon_theme_search_path));
|
|
|
|
|
g_object_unref (icon_theme_search_path);
|
|
|
|
|
gtk_icon_theme_set_custom_theme (theme, icon_themes[i]);
|
|
|
|
|
|
2015-12-30 03:31:40 +01:00
|
|
|
|
example = gtk_icon_theme_get_example_icon_name (theme);
|
|
|
|
|
if (! example)
|
|
|
|
|
{
|
|
|
|
|
/* If the icon theme didn't explicitly specify an example
|
|
|
|
|
* icon, try "gimp-wilber".
|
|
|
|
|
*/
|
|
|
|
|
example = g_strdup ("gimp-wilber");
|
|
|
|
|
}
|
|
|
|
|
pixbuf = gtk_icon_theme_load_icon (theme, example, 16, 0, NULL);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
gtk_list_store_append (list_store, &iter);
|
|
|
|
|
gtk_list_store_set (list_store, &iter,
|
2015-12-30 03:31:40 +01:00
|
|
|
|
0, pixbuf,
|
|
|
|
|
1, icon_themes[i],
|
|
|
|
|
2, gimp_file_get_utf8_name (icon_theme_dir),
|
2015-12-08 14:52:12 -05:00
|
|
|
|
-1);
|
2015-12-30 03:31:40 +01:00
|
|
|
|
g_object_unref (theme);
|
|
|
|
|
g_object_unref (pixbuf);
|
|
|
|
|
g_free (example);
|
2015-12-08 14:52:12 -05:00
|
|
|
|
|
|
|
|
|
if (GIMP_GUI_CONFIG (object)->icon_theme &&
|
|
|
|
|
! strcmp (GIMP_GUI_CONFIG (object)->icon_theme, icon_themes[i]))
|
|
|
|
|
{
|
|
|
|
|
GtkTreePath *path;
|
|
|
|
|
|
|
|
|
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
|
|
|
|
|
|
|
|
|
|
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
|
|
|
|
|
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
|
|
|
|
|
NULL, FALSE, 0.0, 0.0);
|
|
|
|
|
|
|
|
|
|
gtk_tree_path_free (path);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_strfreev (icon_themes);
|
|
|
|
|
|
|
|
|
|
g_signal_connect (sel, "changed",
|
|
|
|
|
G_CALLBACK (prefs_icon_theme_select_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/*************************/
|
|
|
|
|
/* Interface / Toolbox */
|
|
|
|
|
/*************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-toolbox",
|
|
|
|
|
_("Toolbox"),
|
|
|
|
|
_("Toolbox"),
|
|
|
|
|
GIMP_HELP_PREFS_TOOLBOX,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
|
|
|
|
|
|
/* Appearance */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Appearance"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-color-area",
|
|
|
|
|
_("Show _foreground & background color"),
|
|
|
|
|
GIMP_STOCK_DEFAULT_COLORS,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-foo-area",
|
|
|
|
|
_("Show active _brush, pattern & gradient"),
|
|
|
|
|
GIMP_STOCK_BRUSH,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-image-area",
|
|
|
|
|
_("Show active _image"),
|
|
|
|
|
GIMP_STOCK_IMAGE,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
|
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = NULL;
|
|
|
|
|
|
|
|
|
|
/* Tool Editor */
|
2015-12-16 12:40:32 +01:00
|
|
|
|
vbox2 = prefs_frame_new (_("Tools Configuration"),
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_CONTAINER (vbox), TRUE);
|
|
|
|
|
tool_editor = gimp_tool_editor_new (gimp->tool_info_list, gimp->user_context,
|
|
|
|
|
gimp_tools_get_default_order (gimp),
|
|
|
|
|
GIMP_VIEW_SIZE_SMALL, 1);
|
|
|
|
|
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), tool_editor, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (tool_editor);
|
|
|
|
|
|
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
|
/*********************************/
|
|
|
|
|
/* Interface / Dialog Defaults */
|
|
|
|
|
/*********************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
/* FIXME need an icon */
|
|
|
|
|
"gimp-prefs-controllers",
|
|
|
|
|
_("Dialog Defaults"),
|
|
|
|
|
_("Dialog Defaults"),
|
|
|
|
|
GIMP_HELP_PREFS_DIALOG_DEFAULTS,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
2016-08-24 12:52:33 +02:00
|
|
|
|
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
|
|
|
|
|
|
2016-09-22 18:53:18 +02:00
|
|
|
|
button = gimp_prefs_box_set_page_resettable (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
vbox,
|
|
|
|
|
_("Reset Dialog Defaults"));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_dialog_defaults_reset),
|
|
|
|
|
config);
|
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
|
|
|
|
|
|
/* Color profile import dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Color Profile Import dialog"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
|
|
|
|
_("Color profile policy:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
2016-09-25 00:33:58 +02:00
|
|
|
|
/* Convert to Color Profile Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Convert to Color Profile Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "image-convert-profile-intent", 0, 0,
|
|
|
|
|
_("Rendering intent:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "image-convert-profile-black-point-compensation",
|
|
|
|
|
_("Black point compensation"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-09-26 17:38:26 +02:00
|
|
|
|
/* Convert Precision Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Precision Conversion Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object,
|
|
|
|
|
"image-convert-precision-layer-dither-method",
|
|
|
|
|
0, 0,
|
|
|
|
|
_("Dither layers:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
prefs_enum_combo_box_add (object,
|
|
|
|
|
"image-convert-precision-text-layer-dither-method",
|
|
|
|
|
0, 0,
|
|
|
|
|
_("Dither text layers:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
|
|
|
|
prefs_enum_combo_box_add (object,
|
|
|
|
|
"image-convert-precision-channel-dither-method",
|
|
|
|
|
0, 0,
|
|
|
|
|
_("Dither channels/masks:"),
|
|
|
|
|
GTK_TABLE (table), 2, size_group);
|
|
|
|
|
|
2016-09-28 00:31:59 +02:00
|
|
|
|
/* Convert Indexed Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Indexed Conversion Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "image-convert-indexed-palette-type", 0, 0,
|
|
|
|
|
_("Colormap:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
prefs_spin_button_add (object, "image-convert-indexed-max-colors", 1.0, 8.0, 0,
|
|
|
|
|
_("Maximum number of colors:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "image-convert-indexed-remove-duplicates",
|
|
|
|
|
_("Remove unused and duplicate colors "
|
|
|
|
|
"from colormap"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
prefs_enum_combo_box_add (object, "image-convert-indexed-dither-type", 0, 0,
|
|
|
|
|
_("Color dithering:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "image-convert-indexed-dither-alpha",
|
|
|
|
|
_("Enable dithering of transparency"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_check_button_add (object, "image-convert-indexed-dither-text-layers",
|
|
|
|
|
_("Enable dithering of text layers"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
|
/* New Layer Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("New Layer Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_entry_add (object, "layer-new-name",
|
|
|
|
|
_("Layer name:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2016-08-24 12:33:56 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-new-fill-type", 0, 0,
|
|
|
|
|
_("Fill type:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
|
/* Add Layer Mask Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Add Layer Mask Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-add-mask-type", 0, 0,
|
|
|
|
|
_("Layer mask type:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "layer-add-mask-invert",
|
|
|
|
|
_("Invert mask"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-09-25 00:33:58 +02:00
|
|
|
|
/* Merge Layers Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Merge Layers Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-merge-type",
|
|
|
|
|
GIMP_EXPAND_AS_NECESSARY,
|
|
|
|
|
GIMP_CLIP_TO_BOTTOM_LAYER,
|
|
|
|
|
_("Merged layer size:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "layer-merge-active-group-only",
|
|
|
|
|
_("Merge within active group only"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_check_button_add (object, "layer-merge-discard-invisible",
|
|
|
|
|
_("Discard invisible layers"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-08-24 18:27:49 +02:00
|
|
|
|
/* New Channel Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("New Channel Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_entry_add (object, "channel-new-name",
|
|
|
|
|
_("Channel name:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2016-08-24 18:27:49 +02:00
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_color_button_add (object, "channel-new-color",
|
|
|
|
|
_("Color and opacity:"),
|
|
|
|
|
_("Default New Channel Color and Opacity"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group,
|
|
|
|
|
gimp_get_user_context (gimp));
|
2016-08-24 18:27:49 +02:00
|
|
|
|
|
2016-08-24 19:49:59 +02:00
|
|
|
|
/* New Path Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("New Path Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_entry_add (object, "path-new-name",
|
|
|
|
|
_("Path name:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2016-08-24 19:49:59 +02:00
|
|
|
|
|
2016-09-26 00:16:47 +02:00
|
|
|
|
/* Export Path Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Export Paths Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_file_chooser_button_add (object, "path-export-path",
|
|
|
|
|
_("Export folder:"),
|
|
|
|
|
_("Select Default Folder for Exporting Paths"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "path-export-active-only",
|
|
|
|
|
_("Export the active path only"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
/* Import Path Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Import Paths Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_file_chooser_button_add (object, "path-import-path",
|
|
|
|
|
_("Import folder:"),
|
|
|
|
|
_("Select Default Folder for Importing Paths"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "path-import-merge",
|
|
|
|
|
_("Merge imported paths"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_check_button_add (object, "path-import-scale",
|
|
|
|
|
_("Scale imported paths"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
|
/* Feather Selection Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Feather Selection Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-feather-radius", 1.0, 10.0, 2,
|
|
|
|
|
_("Feather radius:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
/* Grow Selection Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Grow Selection Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-grow-radius", 1.0, 10.0, 0,
|
|
|
|
|
_("Grow radius:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
/* Shrink Selection Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Shrink Selection Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-shrink-radius", 1.0, 10.0, 0,
|
|
|
|
|
_("Shrink radius:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "selection-shrink-edge-lock",
|
|
|
|
|
_("Selected areas continue outside the image"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
/* Border Selection Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Border Selection Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-border-radius", 1.0, 10.0, 0,
|
|
|
|
|
_("Border radius:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "selection-border-style", 0, 0,
|
|
|
|
|
_("Border style:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "selection-border-edge-lock",
|
|
|
|
|
_("Selected areas continue outside the image"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
|
/* Fill Options Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Fill Selection Outline & Fill Path Dialogs"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
table = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
|
|
|
|
|
FALSE);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (table);
|
|
|
|
|
|
|
|
|
|
/* Stroke Options Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Stroke Selection & Stroke Path Dialogs"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
table = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
|
|
|
|
|
96.0 /* FIXME */, FALSE);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (table);
|
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/*****************************/
|
|
|
|
|
/* Interface / Help System */
|
|
|
|
|
/*****************************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
"gimp-prefs-help-system",
|
|
|
|
|
_("Help System"),
|
2013-03-10 19:49:59 +01:00
|
|
|
|
_("Help System"),
|
|
|
|
|
GIMP_HELP_PREFS_HELP,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
2001-07-25 00:42:47 +00:00
|
|
|
|
|
2004-05-21 14:17:27 +00:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
|
|
2002-11-24 00:03:42 +00:00
|
|
|
|
/* General */
|
2002-11-22 22:10:40 +00:00
|
|
|
|
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
1999-09-27 17:58:10 +00:00
|
|
|
|
|
2006-03-10 16:40:09 +00:00
|
|
|
|
prefs_check_button_add (object, "show-tooltips",
|
|
|
|
|
_("Show _tooltips"),
|
2002-11-20 19:45:03 +00:00
|
|
|
|
GTK_BOX (vbox2));
|
2004-10-04 16:21:52 +00:00
|
|
|
|
prefs_check_button_add (object, "show-help-button",
|
|
|
|
|
_("Show help _buttons"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2001-07-25 00:42:47 +00:00
|
|
|
|
|
2016-09-06 20:51:47 +02:00
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
|
|
|
|
button = prefs_boolean_combo_box_add (object, "user-manual-online",
|
|
|
|
|
_("Use the online version"),
|
|
|
|
|
_("Use a locally installed copy"),
|
|
|
|
|
_("User manual:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
gimp_help_set_help_data (button, NULL, NULL);
|
|
|
|
|
|
|
|
|
|
if (gimp_help_user_manual_is_installed (gimp))
|
|
|
|
|
{
|
|
|
|
|
hbox = prefs_hint_box_new (GIMP_STOCK_INFO,
|
|
|
|
|
_("There's a local installation "
|
|
|
|
|
"of the user manual."));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
hbox = prefs_hint_box_new (GIMP_STOCK_WARNING,
|
|
|
|
|
_("The user manual is not installed "
|
|
|
|
|
"locally."));
|
|
|
|
|
}
|
2008-07-04 21:49:17 +00:00
|
|
|
|
|
2016-09-06 20:51:47 +02:00
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2);
|
|
|
|
|
gtk_widget_show (hbox);
|
2002-11-22 22:10:40 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Help Browser */
|
2016-09-06 20:51:47 +02:00
|
|
|
|
#ifdef HAVE_WEBKIT
|
|
|
|
|
/* If there is no webkit available, assume we are on a platform
|
|
|
|
|
* that doesn't use the help browser, so don't bother showing
|
|
|
|
|
* the combo.
|
|
|
|
|
*/
|
2015-12-12 22:52:53 +01:00
|
|
|
|
vbox2 = prefs_frame_new (_("Help Browser"), GTK_CONTAINER (vbox), FALSE);
|
2003-11-12 12:56:31 +00:00
|
|
|
|
|
2016-09-06 20:51:47 +02:00
|
|
|
|
if (gimp_help_browser_is_installed (gimp))
|
|
|
|
|
{
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "help-browser", 0, 0,
|
|
|
|
|
_("H_elp browser to use:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
hbox = prefs_hint_box_new (GIMP_STOCK_WARNING,
|
|
|
|
|
_("The GIMP help browser doesn't seem to "
|
|
|
|
|
"be installed. Using the web browser "
|
|
|
|
|
"instead."));
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
|
|
g_object_set (config,
|
|
|
|
|
"help-browser", GIMP_HELP_BROWSER_WEB_BROWSER,
|
|
|
|
|
NULL);
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
g_object_set (config,
|
|
|
|
|
"help-browser", GIMP_HELP_BROWSER_WEB_BROWSER,
|
|
|
|
|
NULL);
|
|
|
|
|
#endif /* HAVE_WEBKIT */
|
2002-11-22 22:10:40 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/* Action Search */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Action Search"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
2003-11-12 12:56:31 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_check_button_add (object, "search-show-unavailable-actions",
|
|
|
|
|
_("Show _unavailable actions"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_spin_button_add (object, "action-history-size", 1.0, 10.0, 0,
|
|
|
|
|
_("Maximum History Size:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2000-06-06 00:28:28 +00:00
|
|
|
|
|
icons: Bug 759904
add
gimp-shred
patch: replace "edit-clear" by "gimp-shred" (or GIMP_STOCK_SHRED)
gimp/app/actions/documents-commands.c: "edit-clear",
gimp/gimp/app/actions/edit-actions.c: { "edit-undo-clear", "edit-clear",
gimp/app/actions/documents-actions.c: { "documents-clear", "edit-clear",
gimp/app/dialogs/preferences-dialog.c: button = prefs_button_add ("edit-clear", shred
add
gimp-edit-clear
patch: replace "edit-clear" by "gimp-edit-clear" (or GIMP_STOCK_EDIT_CLEAR)
gimp/app/actions/text-editor-actions.c: { "text-editor-clear", "edit-clear",
gimp/app/actions/edit-actions.c: { "edit-clear", "edit-clear",
gimp/app/actions/error-console-actions.c: { "error-console-clear", "edit-clear",
gimp/app/actions/text-tool-actions.c: { "text-tool-clear", "edit-clear",
gimp/app/widgets/gimptextstyleeditor.c: image = gtk_image_new_from_icon_name ("edit-clear", GTK_ICON_SIZE_MENU);
gimp/app/dialogs/preferences-dialog.c: button = prefs_button_add ("edit-clear",
patch
gimpicons.c
gimpicons.h
update
icon-list.mk
2016-06-06 21:47:13 +02:00
|
|
|
|
button = prefs_button_add (GIMP_STOCK_SHRED,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Clear Action History"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_search_clear_callback),
|
|
|
|
|
gimp);
|
2013-07-16 18:21:34 +09:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = NULL;
|
2013-07-16 18:21:34 +09:00
|
|
|
|
|
2000-01-15 18:13:13 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/*************************/
|
|
|
|
|
/* Interface / Display */
|
|
|
|
|
/*************************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
"gimp-prefs-display",
|
|
|
|
|
_("Display"),
|
2013-03-10 19:49:59 +01:00
|
|
|
|
_("Display"),
|
|
|
|
|
GIMP_HELP_PREFS_DISPLAY,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
1999-04-22 14:34:00 +00:00
|
|
|
|
|
2004-05-21 14:17:27 +00:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
|
|
2002-11-24 00:03:42 +00:00
|
|
|
|
/* Transparency */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Transparency"), GTK_CONTAINER (vbox), FALSE);
|
2004-05-21 14:17:27 +00:00
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
2001-07-25 00:42:47 +00:00
|
|
|
|
|
2004-04-18 15:12:42 +00:00
|
|
|
|
prefs_enum_combo_box_add (object, "transparency-type", 0, 0,
|
2005-08-22 23:39:12 +00:00
|
|
|
|
_("_Check style:"),
|
2004-05-21 14:17:27 +00:00
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2004-04-18 15:12:42 +00:00
|
|
|
|
prefs_enum_combo_box_add (object, "transparency-size", 0, 0,
|
2005-08-22 23:39:12 +00:00
|
|
|
|
_("Check _size:"),
|
2004-05-21 14:17:27 +00:00
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
1999-09-23 20:21:15 +00:00
|
|
|
|
|
2007-01-21 13:17:04 +00:00
|
|
|
|
vbox2 = prefs_frame_new (_("Monitor Resolution"),
|
2002-11-22 22:10:40 +00:00
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2003-10-14 15:20:59 +00:00
|
|
|
|
{
|
|
|
|
|
gchar *pixels_per_unit = g_strconcat (_("Pixels"), "/%s", NULL);
|
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
entry = gimp_prop_coordinates_new (object,
|
|
|
|
|
"monitor-xresolution",
|
|
|
|
|
"monitor-yresolution",
|
|
|
|
|
NULL,
|
|
|
|
|
pixels_per_unit,
|
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION,
|
|
|
|
|
0.0, 0.0,
|
|
|
|
|
TRUE);
|
2003-10-14 15:20:59 +00:00
|
|
|
|
|
|
|
|
|
g_free (pixels_per_unit);
|
|
|
|
|
}
|
1999-05-31 14:11:10 +00:00
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (entry), 2);
|
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (entry), 2);
|
2002-11-21 15:46:19 +00:00
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
_("Horizontal"), 0, 1, 0.0);
|
2005-04-16 19:27:28 +00:00
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
_("Vertical"), 0, 2, 0.0);
|
2005-04-16 19:27:28 +00:00
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
|
2006-04-05 16:45:27 +00:00
|
|
|
|
_("ppi"), 1, 4, 0.0);
|
1999-05-31 14:11:10 +00:00
|
|
|
|
|
2011-09-30 11:29:11 +02:00
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
2004-06-09 23:51:06 +00:00
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 24);
|
|
|
|
|
gtk_widget_show (entry);
|
|
|
|
|
gtk_widget_set_sensitive (entry, ! display_config->monitor_res_from_gdk);
|
2002-11-21 15:46:19 +00:00
|
|
|
|
|
2004-06-09 23:51:06 +00:00
|
|
|
|
group = NULL;
|
2003-07-17 22:30:13 +00:00
|
|
|
|
|
2004-06-09 23:51:06 +00:00
|
|
|
|
{
|
|
|
|
|
gdouble xres, yres;
|
|
|
|
|
gchar *str;
|
2000-09-25 01:27:47 +00:00
|
|
|
|
|
2014-05-02 23:56:16 +02:00
|
|
|
|
gimp_get_monitor_resolution (gdk_screen_get_default (), /* FIXME monitor */
|
|
|
|
|
0, /* FIXME monitor */
|
|
|
|
|
&xres, &yres);
|
2001-07-25 00:42:47 +00:00
|
|
|
|
|
2007-01-21 13:17:04 +00:00
|
|
|
|
str = g_strdup_printf (_("_Detect automatically (currently %d × %d ppi)"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
ROUND (xres), ROUND (yres));
|
2004-06-09 23:51:06 +00:00
|
|
|
|
|
|
|
|
|
button = gtk_radio_button_new_with_mnemonic (group, str);
|
|
|
|
|
|
|
|
|
|
g_free (str);
|
|
|
|
|
}
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2001-12-07 17:39:51 +00:00
|
|
|
|
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
2002-11-20 19:45:03 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
2005-04-16 19:27:28 +00:00
|
|
|
|
g_object_set_data (G_OBJECT (button), "monitor_resolution_sizeentry", entry);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2003-01-05 22:07:10 +00:00
|
|
|
|
g_signal_connect (button, "toggled",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
G_CALLBACK (prefs_resolution_source_callback),
|
|
|
|
|
config);
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
2007-01-21 13:17:04 +00:00
|
|
|
|
button = gtk_radio_button_new_with_mnemonic (group, _("_Enter manually"));
|
2001-12-07 17:39:51 +00:00
|
|
|
|
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
1999-05-31 14:11:10 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (button);
|
2002-02-28 16:55:38 +00:00
|
|
|
|
|
2000-09-25 01:27:47 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
2001-12-07 17:39:51 +00:00
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
if (! display_config->monitor_res_from_gdk)
|
1999-05-31 14:11:10 +00:00
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2011-09-30 11:29:11 +02:00
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
2004-06-09 23:51:06 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
|
|
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate..."));
|
2007-11-10 15:44:51 +00:00
|
|
|
|
label = gtk_bin_get_child (GTK_BIN (calibrate_button));
|
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label), 4, 0);
|
2004-06-09 23:51:06 +00:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (calibrate_button);
|
|
|
|
|
gtk_widget_set_sensitive (calibrate_button,
|
|
|
|
|
! display_config->monitor_res_from_gdk);
|
|
|
|
|
|
2011-05-11 11:43:19 +02:00
|
|
|
|
g_object_bind_property (button, "active",
|
|
|
|
|
entry, "sensitive",
|
|
|
|
|
G_BINDING_SYNC_CREATE);
|
|
|
|
|
g_object_bind_property (button, "active",
|
|
|
|
|
calibrate_button, "sensitive",
|
|
|
|
|
G_BINDING_SYNC_CREATE);
|
2004-06-09 23:51:06 +00:00
|
|
|
|
|
|
|
|
|
g_signal_connect (calibrate_button, "clicked",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
G_CALLBACK (prefs_resolution_calibrate_callback),
|
|
|
|
|
entry);
|
2004-06-09 23:51:06 +00:00
|
|
|
|
|
2005-08-10 00:24:59 +00:00
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = NULL;
|
|
|
|
|
|
2002-02-28 16:55:38 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/***********************************/
|
|
|
|
|
/* Interface / Window Management */
|
|
|
|
|
/***********************************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-12 22:52:53 +01:00
|
|
|
|
"gimp-prefs-window-management",
|
|
|
|
|
_("Window Management"),
|
|
|
|
|
_("Window Management"),
|
|
|
|
|
GIMP_HELP_PREFS_WINDOW_MANAGEMENT,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
vbox2 = prefs_frame_new (_("Window Manager Hints"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "dock-window-hint", 0, 0,
|
|
|
|
|
_("Hint for _docks and toolbox:"),
|
|
|
|
|
GTK_TABLE (table), 1, size_group);
|
|
|
|
|
|
|
|
|
|
vbox2 = prefs_frame_new (_("Focus"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "activate-on-focus",
|
|
|
|
|
_("Activate the _focused image"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
/* Window Positions */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Window Positions"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "save-session-info",
|
|
|
|
|
_("_Save window positions on exit"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_check_button_add (object, "restore-monitor",
|
|
|
|
|
_("Open windows on the same _monitor they were open before"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-09-03 15:28:22 +02:00
|
|
|
|
button = prefs_button_add ("document-save",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Save Window Positions _Now"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_session_save_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
button2 = prefs_button_add (GIMP_STOCK_RESET,
|
|
|
|
|
_("_Reset Saved Window Positions to "
|
|
|
|
|
"Default Values"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button2, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_session_clear_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT (button), "clear-button", button2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*******************/
|
|
|
|
|
/* Image Windows */
|
|
|
|
|
/*******************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-image-windows",
|
|
|
|
|
_("Image Windows"),
|
|
|
|
|
_("Image Windows"),
|
|
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW,
|
2013-03-10 19:49:59 +01:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
2005-02-08 00:04:50 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
|
|
|
|
|
|
/* General */
|
|
|
|
|
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "default-dot-for-dot",
|
|
|
|
|
_("Use \"_Dot for dot\" by default"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "marching-ants-speed", 1.0, 10.0, 0,
|
|
|
|
|
_("Marching _ants speed:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
/* Zoom & Resize Behavior */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "resize-windows-on-zoom",
|
|
|
|
|
_("Resize window on _zoom"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_check_button_add (object, "resize-windows-on-resize",
|
|
|
|
|
_("Resize window on image _size change"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_boolean_combo_box_add (object, "initial-zoom-to-fit",
|
|
|
|
|
_("Show entire image"),
|
|
|
|
|
"1:1",
|
|
|
|
|
_("Initial zoom _ratio:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
/* Space Bar */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Space Bar"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
|
|
|
|
|
_("_While space bar is pressed:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
|
|
|
|
|
/* Mouse Pointers */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Mouse Pointers"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "show-brush-outline",
|
|
|
|
|
_("Show _brush outline"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
prefs_check_button_add (object, "show-paint-tool-cursor",
|
|
|
|
|
_("Show pointer for paint _tools"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "cursor-mode", 0, 0,
|
|
|
|
|
_("Pointer _mode:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
|
|
|
|
prefs_enum_combo_box_add (object, "cursor-handedness", 0, 0,
|
|
|
|
|
_("Pointer _handedness:"),
|
|
|
|
|
GTK_TABLE (table), 1, NULL);
|
|
|
|
|
|
|
|
|
|
g_object_unref (size_group);
|
|
|
|
|
size_group = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************************/
|
|
|
|
|
/* Image Windows / Appearance */
|
|
|
|
|
/********************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2016-06-04 15:26:26 +02:00
|
|
|
|
"gimp-prefs-image-windows-appearance",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Image Window Appearance"),
|
|
|
|
|
_("Appearance"),
|
|
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW_APPEARANCE,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
prefs_display_options_frame_add (gimp,
|
|
|
|
|
G_OBJECT (display_config->default_view),
|
|
|
|
|
_("Default Appearance in Normal Mode"),
|
|
|
|
|
GTK_CONTAINER (vbox));
|
|
|
|
|
|
|
|
|
|
prefs_display_options_frame_add (gimp,
|
|
|
|
|
G_OBJECT (display_config->default_fullscreen_view),
|
|
|
|
|
_("Default Appearance in Fullscreen Mode"),
|
|
|
|
|
GTK_CONTAINER (vbox));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************/
|
|
|
|
|
/* Image Windows / Image Title & Statusbar Format */
|
|
|
|
|
/****************************************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-image-title",
|
|
|
|
|
_("Image Title & Statusbar Format"),
|
|
|
|
|
_("Title & Status"),
|
|
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW_TITLE,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
const gchar *format_strings[] =
|
|
|
|
|
{
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
"%f-%p.%i (%t) %z%%",
|
|
|
|
|
"%f-%p.%i (%t) %d:%s",
|
|
|
|
|
"%f-%p.%i (%t) %wx%h",
|
|
|
|
|
"%f-%p-%i (%t) %wx%h (%xx%y)"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const gchar *format_names[] =
|
|
|
|
|
{
|
|
|
|
|
N_("Current format"),
|
|
|
|
|
N_("Default format"),
|
|
|
|
|
N_("Show zoom percentage"),
|
|
|
|
|
N_("Show zoom ratio"),
|
|
|
|
|
N_("Show image size"),
|
|
|
|
|
N_("Show drawable size")
|
|
|
|
|
};
|
2005-02-08 00:04:50 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
struct
|
2005-02-08 00:04:50 +00:00
|
|
|
|
{
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gchar *current_setting;
|
|
|
|
|
const gchar *default_setting;
|
|
|
|
|
const gchar *title;
|
2005-02-08 00:04:50 +00:00
|
|
|
|
const gchar *property_name;
|
|
|
|
|
}
|
2015-12-12 22:52:53 +01:00
|
|
|
|
formats[] =
|
2005-02-08 00:04:50 +00:00
|
|
|
|
{
|
2015-12-12 22:52:53 +01:00
|
|
|
|
{ NULL, GIMP_CONFIG_DEFAULT_IMAGE_TITLE_FORMAT,
|
|
|
|
|
N_("Image Title Format"), "image-title-format" },
|
|
|
|
|
{ NULL, GIMP_CONFIG_DEFAULT_IMAGE_STATUS_FORMAT,
|
|
|
|
|
N_("Image Statusbar Format"), "image-status-format" }
|
2005-02-08 00:04:50 +00:00
|
|
|
|
};
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gint format;
|
2006-11-01 14:09:29 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
|
2007-08-14 16:01:04 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
formats[0].current_setting = display_config->image_title_format;
|
|
|
|
|
formats[1].current_setting = display_config->image_status_format;
|
2007-08-14 16:01:04 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
for (format = 0; format < G_N_ELEMENTS (formats); format++)
|
2005-02-08 00:04:50 +00:00
|
|
|
|
{
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GtkWidget *scrolled_win;
|
|
|
|
|
GtkListStore *list_store;
|
|
|
|
|
GtkWidget *view;
|
|
|
|
|
GtkTreeSelection *sel;
|
|
|
|
|
gint i;
|
2005-06-24 09:41:16 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
format_strings[0] = formats[format].current_setting;
|
|
|
|
|
format_strings[1] = formats[format].default_setting;
|
2005-06-24 09:41:16 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
vbox2 = prefs_frame_new (gettext (formats[format].title),
|
|
|
|
|
GTK_CONTAINER (vbox), TRUE);
|
2005-06-24 09:41:16 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
entry = gimp_prop_entry_new (object, formats[format].property_name, 0);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), entry, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (entry);
|
2007-10-05 08:21:27 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
|
|
|
|
|
GTK_SHADOW_IN);
|
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
|
|
|
|
GTK_POLICY_NEVER,
|
|
|
|
|
GTK_POLICY_AUTOMATIC);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (scrolled_win);
|
2005-06-24 09:41:16 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
2006-11-01 14:09:29 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
|
|
|
|
|
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolled_win), view);
|
|
|
|
|
gtk_widget_show (view);
|
2013-12-07 13:42:11 -05:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_object_unref (list_store);
|
2013-12-07 13:42:11 -05:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
|
|
|
|
|
NULL,
|
|
|
|
|
gtk_cell_renderer_text_new (),
|
|
|
|
|
"text", 0,
|
|
|
|
|
NULL);
|
|
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 1,
|
|
|
|
|
NULL,
|
|
|
|
|
gtk_cell_renderer_text_new (),
|
|
|
|
|
"text", 1,
|
|
|
|
|
NULL);
|
2006-11-01 14:09:29 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (format_strings); i++)
|
2006-11-01 14:09:29 +00:00
|
|
|
|
{
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GtkTreeIter iter;
|
2013-12-07 13:42:11 -05:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gtk_list_store_append (list_store, &iter);
|
|
|
|
|
gtk_list_store_set (list_store, &iter,
|
|
|
|
|
0, gettext (format_names[i]),
|
|
|
|
|
1, format_strings[i],
|
|
|
|
|
-1);
|
2013-12-07 13:42:11 -05:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
if (i == 0)
|
|
|
|
|
gtk_tree_selection_select_iter (sel, &iter);
|
2006-11-01 14:09:29 +00:00
|
|
|
|
}
|
2007-10-05 08:21:27 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_signal_connect (sel, "changed",
|
|
|
|
|
G_CALLBACK (prefs_format_string_select_callback),
|
|
|
|
|
entry);
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-11-01 00:54:20 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
/******************************/
|
|
|
|
|
/* Image Windows / Snapping */
|
|
|
|
|
/******************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2016-06-04 15:15:56 +02:00
|
|
|
|
"gimp-prefs-image-windows-snapping",
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("Image Window Snapping Behavior"),
|
|
|
|
|
_("Snapping"),
|
|
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW_APPEARANCE,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
2007-10-05 08:21:27 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_behavior_options_frame_add (gimp,
|
2015-12-16 12:40:32 +01:00
|
|
|
|
G_OBJECT (display_config->default_view),
|
|
|
|
|
_("Default Behavior in Normal Mode"),
|
|
|
|
|
GTK_CONTAINER (vbox));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_behavior_options_frame_add (gimp,
|
2015-12-16 12:40:32 +01:00
|
|
|
|
G_OBJECT (display_config->default_fullscreen_view),
|
|
|
|
|
_("Default Behavior in Fullscreen Mode"),
|
|
|
|
|
GTK_CONTAINER (vbox));
|
|
|
|
|
|
|
|
|
|
/* Snapping Distance */
|
|
|
|
|
vbox2 = prefs_frame_new (_("General"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
|
|
|
|
|
_("_Snapping distance:"),
|
|
|
|
|
GTK_TABLE (table), 0, size_group);
|
2005-02-08 00:04:50 +00:00
|
|
|
|
|
2006-11-01 00:54:20 +00:00
|
|
|
|
|
2004-06-17 14:07:05 +00:00
|
|
|
|
/*******************/
|
|
|
|
|
/* Input Devices */
|
|
|
|
|
/*******************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
"gimp-prefs-input-devices",
|
|
|
|
|
_("Input Devices"),
|
2013-03-10 19:49:59 +01:00
|
|
|
|
_("Input Devices"),
|
|
|
|
|
GIMP_HELP_PREFS_INPUT_DEVICES,
|
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
2004-06-17 14:07:05 +00:00
|
|
|
|
|
|
|
|
|
/* Extended Input Devices */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Extended Input Devices"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
2014-05-11 22:49:22 +02:00
|
|
|
|
button = prefs_button_add ("preferences-system",
|
2004-07-29 01:19:12 +00:00
|
|
|
|
_("Configure E_xtended Input Devices..."),
|
2004-06-17 14:07:05 +00:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_input_devices_dialog),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "save-device-status",
|
2004-07-29 01:19:12 +00:00
|
|
|
|
_("_Save input device settings on exit"),
|
2004-06-17 14:07:05 +00:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-09-03 15:28:22 +02:00
|
|
|
|
button = prefs_button_add ("document-save",
|
2004-07-29 01:19:12 +00:00
|
|
|
|
_("Save Input Device Settings _Now"),
|
2004-06-17 14:07:05 +00:00
|
|
|
|
GTK_BOX (vbox2));
|
2004-07-21 16:11:31 +00:00
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_devices_save_callback),
|
|
|
|
|
gimp);
|
2004-06-17 14:07:05 +00:00
|
|
|
|
|
2004-07-29 01:19:12 +00:00
|
|
|
|
button2 = prefs_button_add (GIMP_STOCK_RESET,
|
|
|
|
|
_("_Reset Saved Input Device Settings to "
|
|
|
|
|
"Default Values"),
|
2004-07-21 16:11:31 +00:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button2, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_devices_clear_callback),
|
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT (button), "clear-button", button2);
|
2004-06-17 14:07:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************/
|
|
|
|
|
/* Additional Controllers */
|
|
|
|
|
/****************************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
"gimp-prefs-controllers",
|
2013-03-10 19:49:59 +01:00
|
|
|
|
_("Additional Input Controllers"),
|
|
|
|
|
_("Input Controllers"),
|
|
|
|
|
GIMP_HELP_PREFS_INPUT_CONTROLLERS,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
2004-06-17 14:07:05 +00:00
|
|
|
|
|
2005-05-09 09:35:41 +00:00
|
|
|
|
vbox2 = gimp_controller_list_new (gimp);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), vbox2, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (vbox2);
|
2004-06-17 14:07:05 +00:00
|
|
|
|
|
|
|
|
|
|
2002-02-28 16:55:38 +00:00
|
|
|
|
/*************/
|
|
|
|
|
/* Folders */
|
|
|
|
|
/*************/
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
"gimp-prefs-folders",
|
|
|
|
|
_("Folders"),
|
2013-03-10 19:49:59 +01:00
|
|
|
|
_("Folders"),
|
|
|
|
|
GIMP_HELP_PREFS_FOLDERS,
|
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
2001-12-07 17:39:51 +00:00
|
|
|
|
|
1999-03-27 18:16:30 +00:00
|
|
|
|
{
|
1999-11-27 13:44:54 +00:00
|
|
|
|
static const struct
|
|
|
|
|
{
|
2006-05-24 15:27:49 +00:00
|
|
|
|
const gchar *property_name;
|
2002-11-20 19:45:03 +00:00
|
|
|
|
const gchar *label;
|
2016-09-26 00:23:08 +02:00
|
|
|
|
const gchar *dialog_title;
|
1999-11-27 13:44:54 +00:00
|
|
|
|
}
|
|
|
|
|
dirs[] =
|
|
|
|
|
{
|
2006-05-24 15:27:49 +00:00
|
|
|
|
{
|
|
|
|
|
"temp-path",
|
|
|
|
|
N_("Temporary folder:"),
|
|
|
|
|
N_("Select Folder for Temporary Files")
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"swap-path",
|
|
|
|
|
N_("Swap folder:"),
|
|
|
|
|
N_("Select Swap Folder")
|
|
|
|
|
}
|
1999-03-27 18:16:30 +00:00
|
|
|
|
};
|
2001-12-07 17:39:51 +00:00
|
|
|
|
|
2004-05-21 14:17:27 +00:00
|
|
|
|
table = prefs_table_new (G_N_ELEMENTS (dirs) + 1, GTK_CONTAINER (vbox));
|
2001-12-07 17:39:51 +00:00
|
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
|
1999-03-27 18:16:30 +00:00
|
|
|
|
{
|
2016-09-26 00:23:08 +02:00
|
|
|
|
prefs_file_chooser_button_add (object, dirs[i].property_name,
|
|
|
|
|
gettext (dirs[i].label),
|
|
|
|
|
gettext (dirs[i].dialog_title),
|
|
|
|
|
GTK_TABLE (table), i, NULL);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2002-11-23 22:22:21 +00:00
|
|
|
|
|
|
|
|
|
/*********************/
|
2002-02-11 22:30:45 +00:00
|
|
|
|
/* Folders / <paths> */
|
2002-11-23 22:22:21 +00:00
|
|
|
|
/*********************/
|
1999-03-27 18:16:30 +00:00
|
|
|
|
{
|
1999-11-27 13:44:54 +00:00
|
|
|
|
static const struct
|
|
|
|
|
{
|
2002-11-20 19:45:03 +00:00
|
|
|
|
const gchar *tree_label;
|
|
|
|
|
const gchar *label;
|
|
|
|
|
const gchar *icon;
|
|
|
|
|
const gchar *help_data;
|
|
|
|
|
const gchar *fs_label;
|
2004-01-28 21:53:50 +00:00
|
|
|
|
const gchar *path_property_name;
|
|
|
|
|
const gchar *writable_property_name;
|
1999-11-27 13:44:54 +00:00
|
|
|
|
}
|
|
|
|
|
paths[] =
|
|
|
|
|
{
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Brushes"), N_("Brush Folders"), "folders-brushes",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_BRUSHES,
|
|
|
|
|
N_("Select Brush Folders"),
|
|
|
|
|
"brush-path", "brush-path-writable" },
|
2009-10-11 01:42:23 +02:00
|
|
|
|
{ N_("Dynamics"), N_("Dynamics Folders"), "folders-dynamics",
|
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_DYNAMICS,
|
|
|
|
|
N_("Select Dynamics Folders"),
|
|
|
|
|
"dynamics-path", "dynamics-path-writable" },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Patterns"), N_("Pattern Folders"), "folders-patterns",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_PATTERNS,
|
|
|
|
|
N_("Select Pattern Folders"),
|
|
|
|
|
"pattern-path", "pattern-path-writable" },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Palettes"), N_("Palette Folders"), "folders-palettes",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_PALETTES,
|
|
|
|
|
N_("Select Palette Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"palette-path", "palette-path-writable" },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Gradients"), N_("Gradient Folders"), "folders-gradients",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_GRADIENTS,
|
|
|
|
|
N_("Select Gradient Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"gradient-path", "gradient-path-writable" },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Fonts"), N_("Font Folders"), "folders-fonts",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_FONTS,
|
|
|
|
|
N_("Select Font Folders"),
|
2005-04-13 13:14:24 +00:00
|
|
|
|
"font-path", NULL },
|
2011-09-29 20:19:49 +03:00
|
|
|
|
{ N_("Tool Presets"), N_("Tool Preset Folders"), "folders-tool-presets",
|
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_TOOL_PRESETS,
|
|
|
|
|
N_("Select Tool Preset Folders"),
|
|
|
|
|
"tool-preset-path", "tool-preset-path-writable" },
|
2015-04-25 21:12:19 -04:00
|
|
|
|
{ N_("MyPaint Brushes"), N_("MyPaint Brush Folders"), "folders-mypaint-brushes",
|
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_MYPAINT_BRUSHES,
|
|
|
|
|
N_("Select MyPaint Brush Folders"),
|
|
|
|
|
"mypaint-brush-path", "mypaint-brush-path-writable" },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Plug-Ins"), N_("Plug-In Folders"), "folders-plug-ins",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_PLUG_INS,
|
|
|
|
|
N_("Select Plug-In Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"plug-in-path", NULL },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Scripts"), N_("Script-Fu Folders"), "folders-scripts",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_SCRIPTS,
|
|
|
|
|
N_("Select Script-Fu Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"script-fu-path", NULL },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Modules"), N_("Module Folders"), "folders-modules",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_MODULES,
|
|
|
|
|
N_("Select Module Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"module-path", NULL },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Interpreters"), N_("Interpreter Folders"), "folders-interp",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_INTERPRETERS,
|
|
|
|
|
N_("Select Interpreter Folders"),
|
2005-02-21 02:56:29 +00:00
|
|
|
|
"interpreter-path", NULL },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Environment"), N_("Environment Folders"), "folders-environ",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_ENVIRONMENT,
|
|
|
|
|
N_("Select Environment Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"environ-path", NULL },
|
2006-06-20 14:42:08 +00:00
|
|
|
|
{ N_("Themes"), N_("Theme Folders"), "folders-themes",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_THEMES,
|
|
|
|
|
N_("Select Theme Folders"),
|
2015-12-13 13:04:46 +01:00
|
|
|
|
"theme-path", NULL },
|
|
|
|
|
{ N_("Icon Themes"), N_("Icon Theme Folders"), "folders-icon-themes",
|
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_ICON_THEMES,
|
|
|
|
|
N_("Select Icon Theme Folders"),
|
|
|
|
|
"icon-theme-path", NULL }
|
1999-03-27 18:16:30 +00:00
|
|
|
|
};
|
2001-12-07 17:39:51 +00:00
|
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (paths); i++)
|
1999-03-27 18:16:30 +00:00
|
|
|
|
{
|
2005-04-16 19:27:28 +00:00
|
|
|
|
GtkWidget *editor;
|
2015-12-11 06:29:50 -05:00
|
|
|
|
gchar *icon_name;
|
2005-04-16 19:27:28 +00:00
|
|
|
|
|
2015-12-11 06:29:50 -05:00
|
|
|
|
icon_name = g_strconcat ("gimp-prefs-", paths[i].icon, NULL);
|
2013-03-10 19:49:59 +01:00
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2015-12-11 06:29:50 -05:00
|
|
|
|
icon_name,
|
2013-03-10 19:49:59 +01:00
|
|
|
|
gettext (paths[i].label),
|
|
|
|
|
gettext (paths[i].tree_label),
|
|
|
|
|
paths[i].help_data,
|
|
|
|
|
&top_iter,
|
|
|
|
|
&child_iter);
|
2015-12-11 06:29:50 -05:00
|
|
|
|
g_free (icon_name);
|
2005-07-31 20:07:14 +00:00
|
|
|
|
|
|
|
|
|
editor = gimp_prop_path_editor_new (object,
|
2005-04-16 19:27:28 +00:00
|
|
|
|
paths[i].path_property_name,
|
|
|
|
|
paths[i].writable_property_name,
|
|
|
|
|
gettext (paths[i].fs_label));
|
2010-10-30 14:56:00 +02:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
|
2005-07-31 20:07:14 +00:00
|
|
|
|
gtk_widget_show (editor);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-03-10 19:49:59 +01:00
|
|
|
|
{
|
|
|
|
|
GtkWidget *tv;
|
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
GtkTreePath *path;
|
|
|
|
|
|
|
|
|
|
tv = gimp_prefs_box_get_tree_view (GIMP_PREFS_BOX (prefs_box));
|
|
|
|
|
gtk_tree_view_expand_all (GTK_TREE_VIEW (tv));
|
|
|
|
|
|
|
|
|
|
/* collapse the Folders subtree */
|
|
|
|
|
model = gtk_tree_view_get_model (GTK_TREE_VIEW (tv));
|
|
|
|
|
path = gtk_tree_model_get_path (model, &top_iter);
|
|
|
|
|
gtk_tree_view_collapse_row (GTK_TREE_VIEW (tv), path);
|
|
|
|
|
gtk_tree_path_free (path);
|
|
|
|
|
}
|
1999-11-27 13:44:54 +00:00
|
|
|
|
|
2002-11-20 19:45:03 +00:00
|
|
|
|
return dialog;
|
1998-06-08 21:53:45 +00:00
|
|
|
|
}
|