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
|
2018-07-11 23:27:07 +02:00
|
|
|
|
* along with this program. If not, see <https://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>
|
|
|
|
|
|
2018-05-30 21:08:30 +02:00
|
|
|
|
#include <cairo-gobject.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
|
|
|
|
|
2017-05-04 20:35:53 +02:00
|
|
|
|
#include "plug-in/gimppluginmanager.h"
|
|
|
|
|
|
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"
|
2017-10-03 20:47:06 +02:00
|
|
|
|
#include "widgets/gimplanguagecombobox.h"
|
2006-05-11 12:29:57 +00:00
|
|
|
|
#include "widgets/gimpmessagebox.h"
|
|
|
|
|
#include "widgets/gimpmessagedialog.h"
|
2017-05-04 20:35:53 +02:00
|
|
|
|
#include "widgets/gimppluginview.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
|
|
|
|
|
2017-10-03 20:47:06 +02:00
|
|
|
|
static GtkWidget * prefs_dialog_new (Gimp *gimp,
|
|
|
|
|
GimpConfig *config);
|
|
|
|
|
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);
|
|
|
|
|
static void prefs_response (GtkWidget *widget,
|
|
|
|
|
gint response_id,
|
|
|
|
|
GtkWidget *dialog);
|
|
|
|
|
|
|
|
|
|
static void prefs_message (GtkMessageType type,
|
|
|
|
|
gboolean destroy,
|
|
|
|
|
const gchar *message);
|
|
|
|
|
|
|
|
|
|
static void prefs_color_management_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
|
|
|
|
static void prefs_dialog_defaults_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
2018-11-18 18:10:34 +01:00
|
|
|
|
static void prefs_folders_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
|
|
|
|
static void prefs_path_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
2017-10-03 20:47:06 +02:00
|
|
|
|
|
|
|
|
|
static void prefs_import_raw_procedure_callback (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
|
|
|
|
static void prefs_resolution_source_callback (GtkWidget *widget,
|
|
|
|
|
GObject *config);
|
|
|
|
|
static void prefs_resolution_calibrate_callback (GtkWidget *widget,
|
|
|
|
|
GtkWidget *entry);
|
|
|
|
|
static void prefs_input_devices_dialog (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_menus_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_menus_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_menus_remove_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
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);
|
|
|
|
|
static void prefs_search_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_tool_options_save_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_tool_options_clear_callback (GtkWidget *widget,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_help_language_change_callback (GtkComboBox *combo,
|
|
|
|
|
Gimp *gimp);
|
|
|
|
|
static void prefs_help_language_change_callback2 (GtkComboBox *combo,
|
|
|
|
|
GtkContainer *box);
|
2018-02-08 22:45:49 +01:00
|
|
|
|
|
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"),
|
2017-03-05 16:01:59 +01:00
|
|
|
|
GIMP_ICON_DIALOG_QUESTION,
|
2006-06-04 18:05:53 +00:00
|
|
|
|
dialog,
|
|
|
|
|
GTK_DIALOG_MODAL |
|
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
|
gimp_standard_help_func, NULL,
|
1998-06-08 21:53:45 +00:00
|
|
|
|
|
2017-02-12 16:06:34 +01:00
|
|
|
|
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
|
|
|
|
_("_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
|
|
|
|
|
2018-05-10 17:04:37 +02:00
|
|
|
|
gimp_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
|
2006-06-04 18:05:53 +00:00
|
|
|
|
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-12-11 20:19:42 +01:00
|
|
|
|
gimp_rc_load_system (GIMP_RC (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");
|
2017-05-01 02:07:09 +02:00
|
|
|
|
gimp_config_reset_property (config, "filter-tool-show-color-options");
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-01 14:15:13 +02:00
|
|
|
|
gimp_config_reset_property (config, "filter-tool-max-recent");
|
2018-04-01 14:41:20 +02:00
|
|
|
|
gimp_config_reset_property (config, "filter-tool-use-last-settings");
|
2018-04-01 14:15:13 +02:00
|
|
|
|
gimp_config_reset_property (config, "filter-tool-show-color-options");
|
|
|
|
|
|
2016-09-22 18:53:18 +02:00
|
|
|
|
g_object_thaw_notify (config);
|
|
|
|
|
|
|
|
|
|
g_free (pspecs);
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-18 18:10:34 +01:00
|
|
|
|
static void
|
|
|
|
|
prefs_folders_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config)
|
|
|
|
|
{
|
|
|
|
|
gimp_config_reset_property (config, "temp-path");
|
|
|
|
|
gimp_config_reset_property (config, "swap-path");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_path_reset (GtkWidget *widget,
|
|
|
|
|
GObject *config)
|
|
|
|
|
{
|
|
|
|
|
const gchar *path_property;
|
|
|
|
|
const gchar *writable_property;
|
|
|
|
|
|
|
|
|
|
path_property = g_object_get_data (G_OBJECT (widget), "path");
|
|
|
|
|
writable_property = g_object_get_data (G_OBJECT (widget), "path-writable");
|
|
|
|
|
|
|
|
|
|
gimp_config_reset_property (config, path_property);
|
|
|
|
|
|
|
|
|
|
if (writable_property)
|
|
|
|
|
gimp_config_reset_property (config, writable_property);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
2017-05-04 20:35:53 +02:00
|
|
|
|
static void
|
|
|
|
|
prefs_import_raw_procedure_callback (GtkWidget *widget,
|
|
|
|
|
GObject *config)
|
|
|
|
|
{
|
|
|
|
|
gchar *raw_plug_in;
|
|
|
|
|
|
|
|
|
|
raw_plug_in = gimp_plug_in_view_get_plug_in (GIMP_PLUG_IN_VIEW (widget));
|
|
|
|
|
|
|
|
|
|
g_object_set (config,
|
|
|
|
|
"import-raw-plug-in", raw_plug_in,
|
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
g_free (raw_plug_in);
|
|
|
|
|
}
|
|
|
|
|
|
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)
|
|
|
|
|
{
|
2018-04-29 17:27:47 +02:00
|
|
|
|
gimp_get_monitor_resolution (gimp_widget_get_monitor (widget),
|
2014-05-02 23:56:16 +02:00
|
|
|
|
&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
|
|
|
|
{
|
2018-05-09 01:44:42 +02:00
|
|
|
|
GtkWidget *dialog;
|
|
|
|
|
GtkWidget *prefs_box;
|
|
|
|
|
const gchar *icon_name;
|
2002-02-28 18:34:41 +00:00
|
|
|
|
|
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");
|
2018-05-09 01:44:42 +02:00
|
|
|
|
icon_name = gimp_prefs_box_get_current_icon_name (GIMP_PREFS_BOX (prefs_box));
|
2002-02-28 18:34:41 +00:00
|
|
|
|
|
2018-05-09 01:44:42 +02:00
|
|
|
|
resolution_calibrate_dialog (entry, icon_name);
|
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 (),
|
2014-05-02 03:01:23 +02:00
|
|
|
|
gimp_widget_get_monitor (widget),
|
2018-05-03 00:55:44 +02:00
|
|
|
|
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 (),
|
2014-05-02 03:01:23 +02:00
|
|
|
|
gimp_widget_get_monitor (widget),
|
2018-05-03 00:55:44 +02:00
|
|
|
|
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"),
|
2017-03-05 16:01:59 +01:00
|
|
|
|
GIMP_ICON_DIALOG_QUESTION,
|
2006-05-11 12:29:57 +00:00
|
|
|
|
gtk_widget_get_toplevel (widget),
|
|
|
|
|
GTK_DIALOG_MODAL |
|
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
|
gimp_standard_help_func, NULL,
|
|
|
|
|
|
2017-02-12 16:06:34 +01:00
|
|
|
|
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
|
|
|
|
_("Cl_ear"), GTK_RESPONSE_OK,
|
2006-05-11 12:29:57 +00:00
|
|
|
|
|
|
|
|
|
NULL);
|
|
|
|
|
|
2018-05-10 17:04:37 +02:00
|
|
|
|
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
2006-05-11 12:29:57 +00:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-03 20:47:06 +02:00
|
|
|
|
static void
|
|
|
|
|
prefs_help_language_change_callback (GtkComboBox *combo,
|
|
|
|
|
Gimp *gimp)
|
|
|
|
|
{
|
|
|
|
|
gchar *help_locales = NULL;
|
|
|
|
|
gchar *code;
|
|
|
|
|
|
|
|
|
|
code = gimp_language_combo_box_get_code (GIMP_LANGUAGE_COMBO_BOX (combo));
|
|
|
|
|
if (code && g_strcmp0 ("", code) != 0)
|
|
|
|
|
{
|
|
|
|
|
help_locales = g_strdup_printf ("%s:", code);
|
|
|
|
|
}
|
|
|
|
|
g_object_set (gimp->config,
|
|
|
|
|
"help-locales", help_locales? help_locales : "",
|
|
|
|
|
NULL);
|
|
|
|
|
g_free (code);
|
|
|
|
|
if (help_locales)
|
|
|
|
|
g_free (help_locales);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
prefs_help_language_change_callback2 (GtkComboBox *combo,
|
|
|
|
|
GtkContainer *box)
|
|
|
|
|
{
|
|
|
|
|
Gimp *gimp;
|
|
|
|
|
GtkLabel *label = NULL;
|
|
|
|
|
GtkImage *icon = NULL;
|
|
|
|
|
GList *children;
|
|
|
|
|
GList *iter;
|
|
|
|
|
const gchar *text;
|
|
|
|
|
const gchar *icon_name;
|
|
|
|
|
|
|
|
|
|
gimp = g_object_get_data (G_OBJECT (box), "gimp");
|
|
|
|
|
children = gtk_container_get_children (box);
|
|
|
|
|
for (iter = children; iter; iter = iter->next)
|
|
|
|
|
{
|
|
|
|
|
if (GTK_IS_LABEL (iter->data))
|
|
|
|
|
{
|
|
|
|
|
label = iter->data;
|
|
|
|
|
}
|
|
|
|
|
else if (GTK_IS_IMAGE (iter->data))
|
|
|
|
|
{
|
|
|
|
|
icon = iter->data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (gimp_help_user_manual_is_installed (gimp))
|
|
|
|
|
{
|
|
|
|
|
text = _("There's a local installation of the user manual.");
|
|
|
|
|
icon_name = GIMP_ICON_DIALOG_INFORMATION;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
text = _("The user manual is not installed locally.");
|
|
|
|
|
icon_name = GIMP_ICON_DIALOG_WARNING;
|
|
|
|
|
}
|
|
|
|
|
if (label)
|
|
|
|
|
{
|
|
|
|
|
gtk_label_set_text (label, text);
|
|
|
|
|
}
|
|
|
|
|
if (icon)
|
|
|
|
|
{
|
|
|
|
|
gtk_image_set_from_icon_name (icon, icon_name,
|
|
|
|
|
GTK_ICON_SIZE_BUTTON);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_list_free (children);
|
|
|
|
|
}
|
|
|
|
|
|
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;
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GtkWidget *grid;
|
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);
|
|
|
|
|
|
2019-09-04 15:00:06 +03:00
|
|
|
|
prefs_check_button_add (object, "show-selection",
|
|
|
|
|
_("Show s_election"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
prefs_check_button_add (object, "show-layer-boundary",
|
|
|
|
|
_("Show _layer boundary"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
2019-09-04 16:33:09 +03:00
|
|
|
|
prefs_check_button_add (object, "show-canvas-boundary",
|
|
|
|
|
_("Show can_vas boundary"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
2019-09-04 15:00:06 +03:00
|
|
|
|
prefs_check_button_add (object, "show-guides",
|
|
|
|
|
_("Show _guides"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
prefs_check_button_add (object, "show-grid",
|
|
|
|
|
_("Show gri_d"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
2019-09-04 15:01:43 +03:00
|
|
|
|
prefs_check_button_add (object, "show-sample-points",
|
|
|
|
|
_("Show _sample points"),
|
|
|
|
|
GTK_BOX (checks_vbox));
|
2019-09-04 15:00:06 +03:00
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
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));
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0,
|
2004-11-10 13:44:14 +00:00
|
|
|
|
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"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, NULL,
|
2016-08-29 17:38:33 +02:00
|
|
|
|
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);
|
2019-09-15 16:12:17 +03:00
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "padding-in-show-all",
|
|
|
|
|
_("_Keep canvas padding in \"Show All\" mode"),
|
|
|
|
|
GTK_BOX (vbox));
|
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",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Snap to _Guides"),
|
2013-07-16 18:21:34 +09:00
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
prefs_check_button_add (object, "snap-to-grid",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("S_nap to Grid"),
|
2013-07-16 18:21:34 +09:00
|
|
|
|
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",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Snap to Canvas _Edges"),
|
2013-07-16 18:21:34 +09:00
|
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
prefs_check_button_add (object, "snap-to-path",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Snap to _Active Path"),
|
2013-07-16 18:21:34 +09:00
|
|
|
|
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;
|
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");
|
1999-12-18 11:37:11 +00:00
|
|
|
|
|
2018-05-09 01:44:42 +02:00
|
|
|
|
help_id = gimp_prefs_box_get_current_help_id (GIMP_PREFS_BOX (prefs_box));
|
|
|
|
|
|
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;
|
2017-02-18 01:57:28 +01:00
|
|
|
|
GtkWidget *vbox3;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
GtkWidget *button;
|
2004-07-21 16:11:31 +00:00
|
|
|
|
GtkWidget *button2;
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GtkWidget *grid;
|
2002-03-18 21:25:17 +00:00
|
|
|
|
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;
|
2017-10-04 00:36:45 +02:00
|
|
|
|
GList *manuals;
|
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
|
|
|
|
|
2017-02-12 16:06:34 +01:00
|
|
|
|
_("_Reset"), RESPONSE_RESET,
|
|
|
|
|
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
|
|
|
|
_("_OK"), GTK_RESPONSE_OK,
|
2002-11-20 19:45:03 +00:00
|
|
|
|
|
|
|
|
|
NULL);
|
1999-03-27 18:16:30 +00:00
|
|
|
|
|
2018-05-10 17:04:37 +02:00
|
|
|
|
gimp_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
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2005-02-11 13:32:10 +00:00
|
|
|
|
prefs_memsize_entry_add (object, "undo-size",
|
|
|
|
|
_("Maximum undo _memory:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2005-02-11 13:32:10 +00:00
|
|
|
|
prefs_memsize_entry_add (object, "tile-cache-size",
|
|
|
|
|
_("Tile cache _size:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 2, size_group);
|
2005-02-11 13:32:10 +00:00
|
|
|
|
prefs_memsize_entry_add (object, "max-new-image-size",
|
|
|
|
|
_("Maximum _new image size:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 3, size_group);
|
2002-11-21 15:46:19 +00:00
|
|
|
|
|
2019-09-22 16:44:23 +03:00
|
|
|
|
prefs_compression_combo_box_add (object, "swap-compression",
|
|
|
|
|
_("S_wap compression:"),
|
|
|
|
|
GTK_GRID (grid), 4, size_group);
|
|
|
|
|
|
2005-02-11 13:32:10 +00:00
|
|
|
|
#ifdef ENABLE_MP
|
|
|
|
|
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
|
2017-06-28 19:05:58 +02:00
|
|
|
|
_("Number of _threads to use:"),
|
2019-09-22 16:44:23 +03:00
|
|
|
|
GTK_GRID (grid), 5, size_group);
|
2005-02-11 13:32:10 +00:00
|
|
|
|
#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",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Use O_penCL"),
|
2013-06-01 23:02:42 +02:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2019-02-04 10:38:43 +01:00
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
|
|
|
|
|
_("OpenCL drivers and support are experimental, "
|
|
|
|
|
"expect slowdowns and possible crashes "
|
|
|
|
|
"(please report)."));
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
|
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
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
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",
|
2019-09-06 14:24:24 +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
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
|
|
|
|
|
2003-10-10 14:11:47 +00:00
|
|
|
|
|
2018-01-26 20:14:26 +01:00
|
|
|
|
/***************/
|
|
|
|
|
/* Debugging */
|
|
|
|
|
/***************/
|
2018-01-26 21:20:52 +01:00
|
|
|
|
/* No debugging preferences are needed on win32. Either GIMP has been
|
|
|
|
|
* built with DrMinGW support (HAVE_EXCHNDL) or not. If it has, then
|
|
|
|
|
* the backtracing is enabled and can't be disabled. It assume it will
|
|
|
|
|
* work only upon a crash.
|
|
|
|
|
*/
|
2018-01-26 20:14:26 +01:00
|
|
|
|
#ifndef G_OS_WIN32
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
2018-02-01 12:54:52 +01:00
|
|
|
|
"gimp-wilber-eek", /* TODO: icon needed. */
|
2018-01-26 20:14:26 +01:00
|
|
|
|
_("Debugging"),
|
|
|
|
|
_("Debugging"),
|
|
|
|
|
GIMP_HELP_PREFS_DEBUGGING,
|
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
2018-02-01 12:54:52 +01:00
|
|
|
|
|
2018-01-26 20:14:26 +01:00
|
|
|
|
hbox = g_object_new (GIMP_TYPE_HINT_BOX,
|
|
|
|
|
"icon-name", GIMP_ICON_DIALOG_WARNING,
|
2018-02-01 12:54:52 +01:00
|
|
|
|
"hint", _("We hope you will never need these "
|
|
|
|
|
"settings, but as all software, GIMP "
|
|
|
|
|
"has bugs, and crashes can occur. If it "
|
|
|
|
|
"happens, you can help us by reporting "
|
|
|
|
|
"bugs."),
|
2018-01-26 20:14:26 +01:00
|
|
|
|
NULL);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
2018-02-01 12:54:52 +01:00
|
|
|
|
gtk_widget_show (hbox);
|
2018-01-26 20:14:26 +01:00
|
|
|
|
|
2018-02-01 12:54:52 +01:00
|
|
|
|
vbox2 = prefs_frame_new (_("Bug Reporting"),
|
2018-01-26 20:14:26 +01:00
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "debug-policy", 0, 0,
|
2018-04-01 14:01:14 +02:00
|
|
|
|
_("Debug _policy:"),
|
2018-12-07 12:11:25 +01:00
|
|
|
|
GTK_GRID (grid), 0, NULL);
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
|
|
2018-01-26 20:14:26 +01:00
|
|
|
|
/* Check existence of gdb or lldb to activate the preference, as a
|
2018-02-08 22:45:49 +01:00
|
|
|
|
* good hint of its prerequisite, unless backtrace() API exists, in
|
|
|
|
|
* which case the feature is always available.
|
2018-01-26 20:14:26 +01:00
|
|
|
|
*/
|
2018-02-14 16:13:20 +01:00
|
|
|
|
hbox = NULL;
|
2018-02-22 12:35:43 +01:00
|
|
|
|
if (! gimp_stack_trace_available (TRUE))
|
2018-01-26 20:14:26 +01:00
|
|
|
|
{
|
2018-02-08 22:45:49 +01:00
|
|
|
|
#ifndef HAVE_EXECINFO_H
|
2018-02-22 05:21:50 +01:00
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
|
|
|
|
|
_("This feature requires \"gdb\" or \"lldb\" installed on your system."));
|
|
|
|
|
gtk_widget_set_sensitive (button, FALSE);
|
2018-02-08 22:45:49 +01:00
|
|
|
|
#else
|
2018-02-22 05:21:50 +01:00
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
|
|
|
|
|
_("This feature is more efficient with \"gdb\" or \"lldb\" installed on your system."));
|
2018-02-14 16:13:20 +01:00
|
|
|
|
#endif /* ! HAVE_EXECINFO_H */
|
2018-01-26 20:14:26 +01:00
|
|
|
|
}
|
2018-02-14 16:13:20 +01:00
|
|
|
|
if (hbox)
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
2018-01-26 20:14:26 +01:00
|
|
|
|
|
2018-02-08 22:45:49 +01:00
|
|
|
|
#endif /* ! G_OS_WIN32 */
|
2018-01-26 20:14:26 +01: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,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("R_eset Color Management"));
|
2016-09-22 18:53:18 +02:00
|
|
|
|
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;
|
2019-09-21 12:53:38 +02:00
|
|
|
|
GFile *file;
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gint row = 0;
|
2009-12-30 22:21:54 +01:00
|
|
|
|
|
2019-09-22 17:34:40 +03:00
|
|
|
|
file = gimp_directory_file ("profilerc", NULL);
|
2019-09-21 12:53:38 +02:00
|
|
|
|
store = gimp_color_profile_store_new (file);
|
|
|
|
|
g_object_unref (file);
|
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
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-05-14 14:48:58 +02:00
|
|
|
|
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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group,
|
2018-01-02 23:09:00 +01:00
|
|
|
|
object, "color-profile-path");
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config,
|
|
|
|
|
"display-profile-from-gdk",
|
|
|
|
|
_("_Try to use the system monitor "
|
|
|
|
|
"profile"));
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
|
2016-05-14 14:48:58 +02:00
|
|
|
|
row++;
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (color_config,
|
|
|
|
|
"display-rendering-intent", 0, 0,
|
|
|
|
|
_("_Rendering intent:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group);
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config,
|
|
|
|
|
"display-use-black-point-compensation",
|
|
|
|
|
_("Use _black point compensation"));
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
|
2016-06-06 01:15:26 +02:00
|
|
|
|
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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-05-14 14:48:58 +02:00
|
|
|
|
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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group,
|
2018-01-02 23:09:00 +01:00
|
|
|
|
object, "color-profile-path");
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (color_config,
|
|
|
|
|
"simulation-rendering-intent", 0, 0,
|
|
|
|
|
_("Re_ndering intent:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group);
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config,
|
|
|
|
|
"simulation-use-black-point-compensation",
|
|
|
|
|
_("Use black _point compensation"));
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
|
2016-06-06 01:15:26 +02:00
|
|
|
|
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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gtk_grid_attach (GTK_GRID (grid), hbox, 1, row, 1, 1);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
row++;
|
|
|
|
|
|
|
|
|
|
button = gimp_prop_check_button_new (color_config, "simulation-gamut-check",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Mar_k out of gamut colors"));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-05-14 14:48:58 +02:00
|
|
|
|
row = 0;
|
|
|
|
|
|
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"rgb-profile",
|
|
|
|
|
store,
|
|
|
|
|
_("Select Preferred RGB Color Profile"),
|
|
|
|
|
_("_RGB profile:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group,
|
2018-01-02 23:09:00 +01:00
|
|
|
|
object, "color-profile-path");
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group,
|
2018-01-02 23:09:00 +01:00
|
|
|
|
object, "color-profile-path");
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
prefs_profile_combo_box_add (color_config,
|
|
|
|
|
"cmyk-profile",
|
|
|
|
|
store,
|
|
|
|
|
_("Select CMYK Color Profile"),
|
|
|
|
|
_("_CMYK profile:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), row++, size_group,
|
2018-01-02 23:09:00 +01:00
|
|
|
|
object, "color-profile-path");
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
/* Policies */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Policies"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("_File Open behaviour:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
2017-05-01 02:07:09 +02:00
|
|
|
|
/* Filter Dialogs */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Filter Dialogs"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
|
|
|
|
|
|
|
|
|
button = prefs_check_button_add (object, "filter-tool-show-color-options",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Show _advanced color options"),
|
2017-05-01 02:07:09 +02:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
2016-05-14 14:48:58 +02:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2017-01-22 22:03:55 +01:00
|
|
|
|
/***************************/
|
|
|
|
|
/* Image Import / Export */
|
|
|
|
|
/***************************/
|
|
|
|
|
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
"gimp-prefs-import-export",
|
|
|
|
|
_("Image Import & Export"),
|
2018-01-11 01:53:35 +01:00
|
|
|
|
_("Image Import & Export"),
|
2018-05-09 01:44:42 +02:00
|
|
|
|
GIMP_HELP_PREFS_IMPORT_EXPORT,
|
2017-01-22 22:03:55 +01:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
|
|
|
|
|
2018-12-05 21:59:19 +03:00
|
|
|
|
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
|
|
|
|
|
|
|
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
|
|
2017-05-04 20:35:53 +02:00
|
|
|
|
/* Import Policies */
|
2017-01-22 22:03:55 +01:00
|
|
|
|
vbox2 = prefs_frame_new (_("Import Policies"),
|
2017-05-04 20:35:53 +02:00
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2017-01-22 22:03:55 +01:00
|
|
|
|
|
|
|
|
|
button = prefs_check_button_add (object, "import-promote-float",
|
|
|
|
|
_("Promote imported images to "
|
2017-01-26 02:22:37 +03:00
|
|
|
|
"_floating point precision"),
|
2017-01-22 22:03:55 +01:00
|
|
|
|
GTK_BOX (vbox2));
|
2017-02-18 01:57:28 +01:00
|
|
|
|
|
|
|
|
|
vbox3 = prefs_frame_new (NULL, GTK_CONTAINER (vbox2), FALSE);
|
2018-07-01 13:06:18 -04:00
|
|
|
|
g_object_bind_property (button, "active",
|
|
|
|
|
vbox3, "sensitive",
|
|
|
|
|
G_BINDING_SYNC_CREATE);
|
2017-01-22 22:03:55 +01:00
|
|
|
|
button = prefs_check_button_add (object, "import-promote-dither",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("_Dither images when promoting to "
|
2017-01-22 22:03:55 +01:00
|
|
|
|
"floating point"),
|
2017-02-18 01:57:28 +01:00
|
|
|
|
GTK_BOX (vbox3));
|
2017-01-22 22:03:55 +01:00
|
|
|
|
|
2017-02-17 22:07:43 +01:00
|
|
|
|
button = prefs_check_button_add (object, "import-add-alpha",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("_Add an alpha channel to imported images"),
|
2017-02-17 22:07:43 +01:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2017-02-18 01:57:28 +01:00
|
|
|
|
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Color _profile policy:"),
|
2018-12-05 21:59:19 +03:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2017-02-18 01:57:28 +01:00
|
|
|
|
|
2018-01-11 01:53:35 +01:00
|
|
|
|
/* Export Policies */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Export Policies"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
2018-06-18 02:19:41 +02:00
|
|
|
|
button = prefs_check_button_add (object, "export-color-profile",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Export the i_mage's color profile by default"),
|
2018-06-18 02:19:41 +02:00
|
|
|
|
GTK_BOX (vbox2));
|
2019-10-10 00:45:41 +02:00
|
|
|
|
button = prefs_check_button_add (object, "export-comment",
|
|
|
|
|
_("Export the image's comment by default"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2018-01-11 01:53:35 +01:00
|
|
|
|
button = prefs_check_button_add (object, "export-metadata-exif",
|
2018-12-05 21:59:19 +03:00
|
|
|
|
/* Translators: label for
|
|
|
|
|
* configuration option (checkbox).
|
|
|
|
|
* It determines how file export
|
|
|
|
|
* plug-ins handle Exif by default.
|
2018-06-24 21:09:59 +02:00
|
|
|
|
*/
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Export _Exif metadata by default when available"),
|
2018-01-11 01:53:35 +01:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
button = prefs_check_button_add (object, "export-metadata-xmp",
|
2018-12-05 21:59:19 +03:00
|
|
|
|
/* Translators: label for
|
|
|
|
|
* configuration option (checkbox).
|
|
|
|
|
* It determines how file export
|
|
|
|
|
* plug-ins handle XMP by default.
|
2018-06-24 21:09:59 +02:00
|
|
|
|
*/
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Export _XMP metadata by default when available"),
|
2018-01-11 01:53:35 +01:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
button = prefs_check_button_add (object, "export-metadata-iptc",
|
2018-12-05 21:59:19 +03:00
|
|
|
|
/* Translators: label for
|
|
|
|
|
* configuration option (checkbox).
|
|
|
|
|
* It determines how file export
|
|
|
|
|
* plug-ins handle IPTC by default.
|
2018-06-24 21:09:59 +02:00
|
|
|
|
*/
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Export _IPTC metadata by default when available"),
|
2018-01-11 01:53:35 +01:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
|
|
|
|
|
_("Metadata can contain sensitive information."));
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
|
2018-12-05 21:59:19 +03:00
|
|
|
|
/* Export File Type */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Export File Type"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "export-file-type", 0, 0,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Default export file t_ype:"),
|
2018-12-05 21:59:19 +03:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2018-01-11 01:53:35 +01:00
|
|
|
|
|
2017-05-04 20:35:53 +02:00
|
|
|
|
/* Raw Image Importer */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Raw Image Importer"),
|
|
|
|
|
GTK_CONTAINER (vbox), TRUE);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *scrolled_window;
|
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
|
|
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
|
|
|
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
|
|
|
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
|
|
|
|
|
GTK_SHADOW_IN);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_window, TRUE, TRUE, 0);
|
|
|
|
|
gtk_widget_show (scrolled_window);
|
|
|
|
|
|
2018-07-17 02:19:58 -04:00
|
|
|
|
view = gimp_plug_in_view_new (gimp->plug_in_manager->display_raw_load_procs);
|
2017-05-04 20:35:53 +02:00
|
|
|
|
gimp_plug_in_view_set_plug_in (GIMP_PLUG_IN_VIEW (view),
|
|
|
|
|
core_config->import_raw_plug_in);
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolled_window), view);
|
|
|
|
|
gtk_widget_show (view);
|
|
|
|
|
|
|
|
|
|
g_signal_connect (view, "changed",
|
|
|
|
|
G_CALLBACK (prefs_import_raw_procedure_callback),
|
|
|
|
|
config);
|
|
|
|
|
}
|
2017-01-22 22:03:55 +01:00
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
|
|
|
|
|
2018-12-05 21:59:19 +03: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"),
|
2018-05-09 01:44:42 +02:00
|
|
|
|
GIMP_HELP_PREFS_PLAYGROUND,
|
2014-09-14 01:08:25 +02:00
|
|
|
|
NULL,
|
|
|
|
|
&top_iter);
|
|
|
|
|
|
2018-04-21 15:48:22 +02:00
|
|
|
|
hbox = g_object_new (GIMP_TYPE_HINT_BOX,
|
|
|
|
|
"icon-name", GIMP_ICON_DIALOG_WARNING,
|
|
|
|
|
"hint", _("These features are unfinished, buggy "
|
|
|
|
|
"and may crash GIMP. It is unadvised to "
|
|
|
|
|
"use them unless you really know what "
|
|
|
|
|
"you are doing or you intend to contribute "
|
|
|
|
|
"patches."),
|
|
|
|
|
NULL);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
2014-09-14 01:08:25 +02:00
|
|
|
|
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-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
|
|
|
|
|
2019-02-06 15:22:27 -05:00
|
|
|
|
prefs_check_button_add (object, "edit-non-visible",
|
2019-06-24 15:57:21 +02:00
|
|
|
|
_("Allow _editing on non-visible layers"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2019-02-06 15:22:27 -05: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
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_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
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button2 = prefs_button_add (GIMP_ICON_RESET,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("_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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2003-11-12 12:56:31 +00:00
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
g_object_unref (size_group);
|
2018-12-07 12:11:25 +01: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
|
|
|
|
/* 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",
|
2017-03-05 16:01:59 +01:00
|
|
|
|
_("_Brush"), GIMP_ICON_BRUSH,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "global-dynamics",
|
2017-03-05 16:01:59 +01:00
|
|
|
|
_("_Dynamics"), GIMP_ICON_DYNAMICS,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "global-pattern",
|
2017-03-05 16:01:59 +01:00
|
|
|
|
_("_Pattern"), GIMP_ICON_PATTERN,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "global-gradient",
|
2017-03-05 16:01:59 +01:00
|
|
|
|
_("_Gradient"), GIMP_ICON_GRADIENT,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
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",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Set _layer or path as active"),
|
2017-03-05 16:01:59 +01:00
|
|
|
|
GIMP_ICON_TOOL_MOVE,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
2003-11-11 23:56:00 +00:00
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
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);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *combo;
|
|
|
|
|
|
|
|
|
|
combo = gimp_container_combo_box_new (gimp->templates,
|
|
|
|
|
gimp_get_user_context (gimp),
|
|
|
|
|
16, 0);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("_Template:"), 0.0, 0.5,
|
2018-05-02 23:59:41 +02:00
|
|
|
|
combo, 1);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-04 00:10:05 +02:00
|
|
|
|
gtk_widget_set_vexpand (editor, FALSE);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, NULL,
|
2016-08-29 17:38:33 +02:00
|
|
|
|
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);
|
|
|
|
|
|
2018-07-01 13:15:21 -04:00
|
|
|
|
button = prefs_check_button_add (object, "layer-previews",
|
|
|
|
|
_("_Enable layer & channel previews"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
|
vbox3 = prefs_frame_new (NULL, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
g_object_bind_property (button, "active",
|
|
|
|
|
vbox3, "sensitive",
|
|
|
|
|
G_BINDING_SYNC_CREATE);
|
|
|
|
|
button = prefs_check_button_add (object, "group-layer-previews",
|
2018-07-03 00:32:32 -04:00
|
|
|
|
_("Enable layer _group previews"),
|
2018-07-01 13:15:21 -04:00
|
|
|
|
GTK_BOX (vbox3));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-preview-size", 0, 0,
|
|
|
|
|
_("_Default layer & channel preview size:"),
|
2018-12-07 12:11:25 +01:00
|
|
|
|
GTK_GRID (grid), 0, NULL);
|
2016-05-28 02:53:28 +03:00
|
|
|
|
prefs_enum_combo_box_add (object, "undo-preview-size", 0, 0,
|
|
|
|
|
_("_Undo preview size:"),
|
2018-12-07 12:11:25 +01:00
|
|
|
|
GTK_GRID (grid), 1, NULL);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_enum_combo_box_add (object, "navigation-preview-size", 0, 0,
|
|
|
|
|
_("Na_vigation preview size:"),
|
2018-12-07 12:11:25 +01:00
|
|
|
|
GTK_GRID (grid), 2, NULL);
|
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));
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_PREFERENCES_SYSTEM,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("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));
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_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);
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button2 = prefs_button_add (GIMP_ICON_RESET,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("_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);
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_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);
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-01 04:43:33 +02:00
|
|
|
|
prefs_check_button_add (object, "prefer-dark-theme",
|
|
|
|
|
_("Use dark theme variant if available"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_VIEW_REFRESH,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("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;
|
2018-05-30 21:08:30 +02:00
|
|
|
|
gint scale_factor;
|
2015-12-12 22:52:53 +01:00
|
|
|
|
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);
|
|
|
|
|
|
2018-05-30 21:08:30 +02:00
|
|
|
|
list_store = gtk_list_store_new (3, CAIRO_GOBJECT_TYPE_SURFACE, 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 (),
|
2018-05-30 21:08:30 +02:00
|
|
|
|
"surface", 0,
|
2015-12-30 03:31:40 +01:00
|
|
|
|
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));
|
|
|
|
|
|
2018-05-30 21:08:30 +02:00
|
|
|
|
scale_factor = gtk_widget_get_scale_factor (scrolled_win);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
icon_themes = icon_themes_list_themes (gimp, &n_icon_themes);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < n_icon_themes; i++)
|
|
|
|
|
{
|
2018-05-30 21:08:30 +02:00
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GFile *icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_themes[i]);
|
|
|
|
|
GFile *icon_theme_search_path = g_file_get_parent (icon_theme_dir);
|
|
|
|
|
GtkIconTheme *theme;
|
|
|
|
|
gchar *example;
|
|
|
|
|
cairo_surface_t *surface;
|
2015-12-30 03:31:40 +01:00
|
|
|
|
|
|
|
|
|
theme = gtk_icon_theme_new ();
|
2018-05-30 21:08:30 +02:00
|
|
|
|
gtk_icon_theme_prepend_search_path (theme,
|
|
|
|
|
gimp_file_get_utf8_name (icon_theme_search_path));
|
2016-09-02 12:30:49 +02:00
|
|
|
|
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".
|
|
|
|
|
*/
|
2018-05-30 21:08:30 +02:00
|
|
|
|
example = g_strdup ("gimp-wilber-symbolic");
|
2015-12-30 03:31:40 +01:00
|
|
|
|
}
|
2018-05-30 21:08:30 +02:00
|
|
|
|
surface = gtk_icon_theme_load_surface (theme, example, 24,
|
|
|
|
|
scale_factor, NULL,
|
|
|
|
|
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
|
|
|
|
NULL);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
gtk_list_store_append (list_store, &iter);
|
|
|
|
|
gtk_list_store_set (list_store, &iter,
|
2018-05-30 21:08:30 +02:00
|
|
|
|
0, surface,
|
2015-12-30 03:31:40 +01:00
|
|
|
|
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);
|
2018-05-30 21:08:30 +02:00
|
|
|
|
cairo_surface_destroy (surface);
|
2015-12-30 03:31:40 +01:00
|
|
|
|
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);
|
2018-06-08 03:29:47 +02:00
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "prefer-symbolic-icons",
|
|
|
|
|
_("Use symbolic icons if available"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2016-01-07 05:09:01 +01:00
|
|
|
|
}
|
2015-12-08 14:52:12 -05:00
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
|
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);
|
|
|
|
|
|
2018-01-06 07:26:22 +03:00
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-wilber",
|
|
|
|
|
_("Show GIMP _logo (drag-and-drop target)"),
|
|
|
|
|
GIMP_ICON_WILBER,
|
|
|
|
|
GTK_BOX (vbox2), size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-color-area",
|
|
|
|
|
_("Show _foreground & background color"),
|
2017-03-05 16:01:59 +01:00
|
|
|
|
GIMP_ICON_COLORS_DEFAULT,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-foo-area",
|
|
|
|
|
_("Show active _brush, pattern & gradient"),
|
2017-03-05 16:01:59 +01:00
|
|
|
|
GIMP_ICON_BRUSH,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
prefs_check_button_add_with_icon (object, "toolbox-image-area",
|
|
|
|
|
_("Show active _image"),
|
2017-03-05 16:01:59 +01:00
|
|
|
|
GIMP_ICON_IMAGE,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2), size_group);
|
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/* 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,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Reset Dialog _Defaults"));
|
2016-09-22 18:53:18 +02:00
|
|
|
|
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 */
|
2016-10-01 00:19:37 +02:00
|
|
|
|
vbox2 = prefs_frame_new (_("Color Profile Import Dialog"), GTK_CONTAINER (vbox),
|
2016-08-23 19:18:20 +02:00
|
|
|
|
FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-23 19:18:20 +02:00
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
|
|
|
|
_("Color profile policy:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-08-23 19:18:20 +02:00
|
|
|
|
|
2018-01-02 23:09:00 +01:00
|
|
|
|
/* All color profile chooser dialogs */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Color Profile File Dialogs"), GTK_CONTAINER (vbox),
|
|
|
|
|
FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2018-01-02 23:09:00 +01:00
|
|
|
|
|
|
|
|
|
prefs_file_chooser_button_add (object, "color-profile-path",
|
|
|
|
|
_("Profile folder:"),
|
|
|
|
|
_("Select Default Folder for Color Profiles"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2018-01-02 23:09:00 +01:00
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-25 00:33:58 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "image-convert-profile-intent", 0, 0,
|
|
|
|
|
_("Rendering intent:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-25 00:33:58 +02:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-26 17:38:26 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object,
|
|
|
|
|
"image-convert-precision-layer-dither-method",
|
|
|
|
|
0, 0,
|
|
|
|
|
_("Dither layers:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-26 17:38:26 +02:00
|
|
|
|
prefs_enum_combo_box_add (object,
|
|
|
|
|
"image-convert-precision-text-layer-dither-method",
|
|
|
|
|
0, 0,
|
|
|
|
|
_("Dither text layers:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2016-09-26 17:38:26 +02:00
|
|
|
|
prefs_enum_combo_box_add (object,
|
|
|
|
|
"image-convert-precision-channel-dither-method",
|
|
|
|
|
0, 0,
|
|
|
|
|
_("Dither channels/masks:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 2, size_group);
|
2016-09-26 17:38:26 +02:00
|
|
|
|
|
2016-09-28 00:31:59 +02:00
|
|
|
|
/* Convert Indexed Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Indexed Conversion Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-28 00:31:59 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "image-convert-indexed-palette-type", 0, 0,
|
|
|
|
|
_("Colormap:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-28 00:31:59 +02:00
|
|
|
|
prefs_spin_button_add (object, "image-convert-indexed-max-colors", 1.0, 8.0, 0,
|
|
|
|
|
_("Maximum number of colors:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2016-09-28 00:31:59 +02:00
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "image-convert-indexed-remove-duplicates",
|
|
|
|
|
_("Remove unused and duplicate colors "
|
|
|
|
|
"from colormap"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-28 00:31:59 +02:00
|
|
|
|
prefs_enum_combo_box_add (object, "image-convert-indexed-dither-type", 0, 0,
|
|
|
|
|
_("Color dithering:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-28 00:31:59 +02:00
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
2018-04-01 14:15:13 +02:00
|
|
|
|
/* Filter Dialogs */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Filter Dialogs"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2018-04-01 14:15:13 +02:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "filter-tool-max-recent", 1.0, 8.0, 0,
|
|
|
|
|
_("Keep recent settings:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2018-04-01 14:15:13 +02:00
|
|
|
|
|
2018-04-01 14:41:20 +02:00
|
|
|
|
button = prefs_check_button_add (object, "filter-tool-use-last-settings",
|
|
|
|
|
_("Default to the last used settings"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2018-04-01 14:15:13 +02:00
|
|
|
|
button = prefs_check_button_add (object, "filter-tool-show-color-options",
|
|
|
|
|
_("Show advanced color options"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
|
/* Canvas Size Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Canvas Size Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-10-20 00:30:10 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "image-resize-fill-type", 0, 0,
|
|
|
|
|
_("Fill with:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-10-20 00:30:10 +02:00
|
|
|
|
prefs_enum_combo_box_add (object, "image-resize-layer-set", 0, 0,
|
|
|
|
|
_("Resize layers:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2016-10-20 00:30:10 +02:00
|
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "image-resize-resize-text-layers",
|
|
|
|
|
_("Resize text layers"),
|
|
|
|
|
GTK_BOX (vbox2));
|
2016-09-28 00:31:59 +02:00
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
|
/* New Layer Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("New Layer Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-24 12:33:56 +02:00
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_entry_add (object, "layer-new-name",
|
|
|
|
|
_("Layer name:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2016-08-24 12:33:56 +02:00
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
|
/* Layer Boundary Size Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Layer Boundary Size Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-10-20 00:30:10 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-resize-fill-type", 0, 0,
|
|
|
|
|
_("Fill with:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-10-20 00:30:10 +02:00
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
|
/* Add Layer Mask Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Add Layer Mask Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-23 19:18:20 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-add-mask-type", 0, 0,
|
|
|
|
|
_("Layer mask type:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-08-23 19:18:20 +02:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-25 00:33:58 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "layer-merge-type",
|
|
|
|
|
GIMP_EXPAND_AS_NECESSARY,
|
|
|
|
|
GIMP_CLIP_TO_BOTTOM_LAYER,
|
|
|
|
|
_("Merged layer size:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-25 00:33:58 +02:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-24 18:27:49 +02:00
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_entry_add (object, "channel-new-name",
|
|
|
|
|
_("Channel name:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group,
|
2016-08-29 17:38:33 +02:00
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-24 19:49:59 +02:00
|
|
|
|
|
2016-08-29 17:38:33 +02:00
|
|
|
|
prefs_entry_add (object, "path-new-name",
|
|
|
|
|
_("Path name:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-26 00:16:47 +02:00
|
|
|
|
|
|
|
|
|
prefs_file_chooser_button_add (object, "path-export-path",
|
|
|
|
|
_("Export folder:"),
|
|
|
|
|
_("Select Default Folder for Exporting Paths"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-26 00:16:47 +02:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-26 00:16:47 +02:00
|
|
|
|
|
|
|
|
|
prefs_file_chooser_button_add (object, "path-import-path",
|
|
|
|
|
_("Import folder:"),
|
|
|
|
|
_("Select Default Folder for Importing Paths"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-26 00:16:47 +02:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-feather-radius", 1.0, 10.0, 2,
|
|
|
|
|
_("Feather radius:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
2019-06-16 16:51:30 +02:00
|
|
|
|
prefs_check_button_add (object, "selection-feather-edge-lock",
|
|
|
|
|
_("Selected areas continue outside the image"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
|
/* Grow Selection Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Grow Selection Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-grow-radius", 1.0, 10.0, 0,
|
|
|
|
|
_("Grow radius:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
/* Shrink Selection Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Shrink Selection Dialog"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-shrink-radius", 1.0, 10.0, 0,
|
|
|
|
|
_("Shrink radius:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "selection-border-radius", 1.0, 10.0, 0,
|
|
|
|
|
_("Border radius:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "selection-border-style", 0, 0,
|
|
|
|
|
_("Border style:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
editor = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
|
|
|
|
|
FALSE);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), editor, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (editor);
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
|
|
|
|
/* Stroke Options Dialog */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Stroke Selection & Stroke Path Dialogs"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
2017-03-23 01:43:49 +01:00
|
|
|
|
/* The stroke line width physical values could be based on either the
|
|
|
|
|
* x or y resolution, some average, or whatever which makes a bit of
|
2017-03-23 15:44:21 +01:00
|
|
|
|
* sense. There is no perfect answer. The actual stroke dialog though
|
|
|
|
|
* uses the y resolution on the opened image. So using the y resolution
|
|
|
|
|
* of the default image seems like the best compromise in the preferences.
|
2017-03-23 01:43:49 +01:00
|
|
|
|
*/
|
2018-05-02 23:59:41 +02:00
|
|
|
|
editor = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
|
|
|
|
|
gimp_template_get_resolution_y (core_config->default_image),
|
|
|
|
|
FALSE);
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), editor, FALSE, FALSE, 0);
|
|
|
|
|
gtk_widget_show (editor);
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
2016-08-23 19:18:20 +02:00
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-06 20:51:47 +02:00
|
|
|
|
button = prefs_boolean_combo_box_add (object, "user-manual-online",
|
|
|
|
|
_("Use the online version"),
|
|
|
|
|
_("Use a locally installed copy"),
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("U_ser manual:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-06 20:51:47 +02:00
|
|
|
|
gimp_help_set_help_data (button, NULL, NULL);
|
|
|
|
|
|
2017-10-04 00:36:45 +02:00
|
|
|
|
manuals = gimp_help_get_installed_languages ();
|
|
|
|
|
entry = NULL;
|
|
|
|
|
if (manuals != NULL)
|
2017-10-03 20:47:06 +02:00
|
|
|
|
{
|
2017-10-04 00:36:45 +02:00
|
|
|
|
gchar *help_locales = NULL;
|
2017-10-03 20:47:06 +02:00
|
|
|
|
|
2017-10-04 00:36:45 +02:00
|
|
|
|
entry = gimp_language_combo_box_new (TRUE,
|
|
|
|
|
_("User interface language"));
|
2017-10-03 20:47:06 +02:00
|
|
|
|
|
2017-10-04 00:36:45 +02:00
|
|
|
|
g_object_get (config, "help-locales", &help_locales, NULL);
|
|
|
|
|
if (help_locales && strlen (help_locales))
|
|
|
|
|
{
|
|
|
|
|
gchar *sep;
|
|
|
|
|
|
|
|
|
|
sep = strchr (help_locales, ':');
|
|
|
|
|
if (sep)
|
|
|
|
|
*sep = '\0';
|
|
|
|
|
}
|
|
|
|
|
if (help_locales)
|
|
|
|
|
{
|
|
|
|
|
gimp_language_combo_box_set_code (GIMP_LANGUAGE_COMBO_BOX (entry),
|
|
|
|
|
help_locales);
|
|
|
|
|
g_free (help_locales);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gimp_language_combo_box_set_code (GIMP_LANGUAGE_COMBO_BOX (entry),
|
|
|
|
|
"");
|
|
|
|
|
}
|
|
|
|
|
g_signal_connect (entry, "changed",
|
|
|
|
|
G_CALLBACK (prefs_help_language_change_callback),
|
|
|
|
|
gimp);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gtk_grid_attach (GTK_GRID (grid), entry, 1, 1, 1, 1);
|
2017-10-04 00:36:45 +02:00
|
|
|
|
gtk_widget_show (entry);
|
2017-10-03 20:47:06 +02:00
|
|
|
|
}
|
|
|
|
|
|
2016-09-06 20:51:47 +02:00
|
|
|
|
if (gimp_help_user_manual_is_installed (gimp))
|
|
|
|
|
{
|
2017-03-05 16:01:59 +01:00
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_INFORMATION,
|
2016-09-06 20:51:47 +02:00
|
|
|
|
_("There's a local installation "
|
|
|
|
|
"of the user manual."));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2017-03-05 16:01:59 +01:00
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
|
2016-09-06 20:51:47 +02:00
|
|
|
|
_("The user manual is not installed "
|
|
|
|
|
"locally."));
|
|
|
|
|
}
|
2017-10-04 00:36:45 +02:00
|
|
|
|
if (manuals)
|
|
|
|
|
{
|
|
|
|
|
g_object_set_data (G_OBJECT (hbox), "gimp", gimp);
|
|
|
|
|
g_signal_connect (entry, "changed",
|
|
|
|
|
G_CALLBACK (prefs_help_language_change_callback2),
|
|
|
|
|
hbox);
|
|
|
|
|
g_list_free_full (manuals, g_free);
|
|
|
|
|
}
|
2008-07-04 21:49:17 +00:00
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 2, 1, 1);
|
2016-09-06 20:51:47 +02:00
|
|
|
|
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))
|
|
|
|
|
{
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2016-09-06 20:51:47 +02:00
|
|
|
|
|
|
|
|
|
button = prefs_enum_combo_box_add (object, "help-browser", 0, 0,
|
|
|
|
|
_("H_elp browser to use:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2016-09-06 20:51:47 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2017-03-05 16:01:59 +01:00
|
|
|
|
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
|
2016-09-06 20:51:47 +02:00
|
|
|
|
_("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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("_Maximum History Size:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2000-06-06 00:28:28 +00:00
|
|
|
|
|
2017-02-28 19:31:27 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_SHRED,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("C_lear Action History"),
|
2015-12-12 22:52:53 +01:00
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_search_clear_callback),
|
|
|
|
|
gimp);
|
2013-07-16 18:21:34 +09:00
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, size_group);
|
1999-09-23 20:21:15 +00:00
|
|
|
|
|
2019-07-16 18:50:21 +02:00
|
|
|
|
/* Zoom Quality */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Zoom Quality"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "zoom-quality", 0, 0,
|
|
|
|
|
_("_Zoom quality:"),
|
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
|
|
|
|
|
|
|
|
|
/* Monitor Resolution */
|
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
|
|
|
|
|
2018-05-02 20:23:05 +02:00
|
|
|
|
gtk_grid_set_column_spacing (GTK_GRID (entry), 2);
|
|
|
|
|
gtk_grid_set_row_spacing (GTK_GRID (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);
|
2018-05-04 00:10:05 +02:00
|
|
|
|
gtk_widget_set_halign (hbox, GTK_ALIGN_START);
|
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_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
|
|
|
|
{
|
2017-03-23 16:00:24 +01:00
|
|
|
|
gdouble xres;
|
|
|
|
|
gdouble yres;
|
2004-06-09 23:51:06 +00:00
|
|
|
|
gchar *str;
|
2000-09-25 01:27:47 +00:00
|
|
|
|
|
2018-04-29 17:27:47 +02:00
|
|
|
|
gimp_get_monitor_resolution (gdk_display_get_monitor (gdk_display_get_default (), 0),
|
2017-03-23 16:00:24 +01:00
|
|
|
|
&xres, &yres);
|
|
|
|
|
|
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));
|
2018-04-29 01:51:36 +02:00
|
|
|
|
g_object_set (label,
|
|
|
|
|
"margin-start", 4,
|
|
|
|
|
"margin-end", 4,
|
|
|
|
|
NULL);
|
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
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
2005-08-10 00:24:59 +00:00
|
|
|
|
|
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);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "dock-window-hint", 0, 0,
|
|
|
|
|
_("Hint for _docks and toolbox:"),
|
2018-12-07 12:11:25 +01:00
|
|
|
|
GTK_GRID (grid), 1, NULL);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_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);
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button2 = prefs_button_add (GIMP_ICON_RESET,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
_("_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);
|
|
|
|
|
|
2019-09-04 15:50:29 +03:00
|
|
|
|
prefs_check_button_add (object, "default-show-all",
|
|
|
|
|
_("Use \"Show _all\" by default"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_check_button_add (object, "default-dot-for-dot",
|
|
|
|
|
_("Use \"_Dot for dot\" by default"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "marching-ants-speed", 1.0, 10.0, 0,
|
2019-09-04 15:50:29 +03:00
|
|
|
|
_("Marching ants s_peed:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/* 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));
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
prefs_boolean_combo_box_add (object, "initial-zoom-to-fit",
|
|
|
|
|
_("Show entire image"),
|
|
|
|
|
"1:1",
|
|
|
|
|
_("Initial zoom _ratio:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/* Space Bar */
|
|
|
|
|
vbox2 = prefs_frame_new (_("Space Bar"),
|
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
|
|
|
|
|
_("_While space bar is pressed:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
/* 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));
|
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
prefs_enum_combo_box_add (object, "cursor-mode", 0, 0,
|
|
|
|
|
_("Pointer _mode:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 0, size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
prefs_enum_combo_box_add (object, "cursor-handedness", 0, 0,
|
|
|
|
|
_("Pointer _handedness:"),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 1, NULL);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
2018-12-07 12:11:25 +01:00
|
|
|
|
g_clear_object (&size_group);
|
2015-12-12 22:52:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************************/
|
|
|
|
|
/* 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
|
|
|
|
|
2018-02-11 22:23:10 +01:00
|
|
|
|
gimp_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);
|
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
|
|
|
|
|
2018-12-07 12:11:25 +01: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"),
|
2018-05-09 01:44:42 +02:00
|
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW_SNAPPING,
|
2015-12-12 22:52:53 +01:00
|
|
|
|
&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);
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
2015-12-16 12:40:32 +01:00
|
|
|
|
|
|
|
|
|
prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
|
|
|
|
|
_("_Snapping distance:"),
|
2018-12-07 12:11:25 +01:00
|
|
|
|
GTK_GRID (grid), 0, NULL);
|
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);
|
|
|
|
|
|
2016-10-04 22:32:08 +02:00
|
|
|
|
prefs_check_button_add (object, "devices-share-tool",
|
|
|
|
|
_("S_hare tool and tool options between input devices"),
|
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_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));
|
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button = prefs_button_add (GIMP_ICON_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
|
|
|
|
|
2017-03-05 16:01:59 +01:00
|
|
|
|
button2 = prefs_button_add (GIMP_ICON_RESET,
|
2004-07-29 01:19:12 +00:00
|
|
|
|
_("_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
|
|
|
|
|
2018-11-18 18:10:34 +01:00
|
|
|
|
button = gimp_prefs_box_set_page_resettable (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
vbox,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
_("Reset _Folders"));
|
2018-11-18 18:10:34 +01:00
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_folders_reset),
|
|
|
|
|
config);
|
|
|
|
|
|
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",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("_Temporary folder:"),
|
2006-05-24 15:27:49 +00:00
|
|
|
|
N_("Select Folder for Temporary Files")
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"swap-path",
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("_Swap folder:"),
|
2006-05-24 15:27:49 +00:00
|
|
|
|
N_("Select Swap Folder")
|
|
|
|
|
}
|
1999-03-27 18:16:30 +00:00
|
|
|
|
};
|
2001-12-07 17:39:51 +00:00
|
|
|
|
|
2018-05-02 23:59:41 +02:00
|
|
|
|
grid = prefs_grid_new (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),
|
2018-05-02 23:59:41 +02:00
|
|
|
|
GTK_GRID (grid), 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;
|
2018-11-18 18:10:34 +01:00
|
|
|
|
const gchar *reset_label;
|
2002-11-20 19:45:03 +00:00
|
|
|
|
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[] =
|
|
|
|
|
{
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Brushes"), N_("Brush Folders"),
|
|
|
|
|
"folders-brushes",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_BRUSHES,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Brush _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Brush Folders"),
|
|
|
|
|
"brush-path", "brush-path-writable" },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Dynamics"), N_("Dynamics Folders"),
|
|
|
|
|
"folders-dynamics",
|
2009-10-11 01:42:23 +02:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_DYNAMICS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Dynamics _Folders"),
|
2009-10-11 01:42:23 +02:00
|
|
|
|
N_("Select Dynamics Folders"),
|
|
|
|
|
"dynamics-path", "dynamics-path-writable" },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Patterns"), N_("Pattern Folders"),
|
|
|
|
|
"folders-patterns",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_PATTERNS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Pattern _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Pattern Folders"),
|
|
|
|
|
"pattern-path", "pattern-path-writable" },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Palettes"), N_("Palette Folders"),
|
|
|
|
|
"folders-palettes",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_PALETTES,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Palette _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Palette Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"palette-path", "palette-path-writable" },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Gradients"), N_("Gradient Folders"),
|
|
|
|
|
"folders-gradients",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_GRADIENTS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Gradient _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Gradient Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"gradient-path", "gradient-path-writable" },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Fonts"), N_("Font Folders"),
|
|
|
|
|
"folders-fonts",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_FONTS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Font _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Font Folders"),
|
2005-04-13 13:14:24 +00:00
|
|
|
|
"font-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Tool Presets"), N_("Tool Preset Folders"),
|
|
|
|
|
"folders-tool-presets",
|
2011-09-29 20:19:49 +03:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_TOOL_PRESETS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Tool Preset _Folders"),
|
2011-09-29 20:19:49 +03:00
|
|
|
|
N_("Select Tool Preset Folders"),
|
|
|
|
|
"tool-preset-path", "tool-preset-path-writable" },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("MyPaint Brushes"), N_("MyPaint Brush Folders"),
|
|
|
|
|
"folders-mypaint-brushes",
|
2015-04-25 21:12:19 -04:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_MYPAINT_BRUSHES,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset MyPaint Brush _Folders"),
|
2015-04-25 21:12:19 -04:00
|
|
|
|
N_("Select MyPaint Brush Folders"),
|
|
|
|
|
"mypaint-brush-path", "mypaint-brush-path-writable" },
|
2018-11-18 18:10:34 +01: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,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset plug-in _Folders"),
|
2017-03-21 17:45:50 +01:00
|
|
|
|
N_("Select plug-in Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"plug-in-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Scripts"), N_("Script-Fu Folders"),
|
|
|
|
|
"folders-scripts",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_SCRIPTS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Script-Fu _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Script-Fu Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"script-fu-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Modules"), N_("Module Folders"),
|
|
|
|
|
"folders-modules",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_MODULES,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Module _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Module Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"module-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Interpreters"), N_("Interpreter Folders"),
|
|
|
|
|
"folders-interp",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_INTERPRETERS,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Interpreter _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Interpreter Folders"),
|
2005-02-21 02:56:29 +00:00
|
|
|
|
"interpreter-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Environment"), N_("Environment Folders"),
|
|
|
|
|
"folders-environ",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_ENVIRONMENT,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Environment _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Environment Folders"),
|
2004-01-28 21:53:50 +00:00
|
|
|
|
"environ-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Themes"), N_("Theme Folders"),
|
|
|
|
|
"folders-themes",
|
2005-07-31 20:07:14 +00:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_THEMES,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Theme _Folders"),
|
2005-07-31 20:07:14 +00:00
|
|
|
|
N_("Select Theme Folders"),
|
2015-12-13 13:04:46 +01:00
|
|
|
|
"theme-path", NULL },
|
2018-11-18 18:10:34 +01:00
|
|
|
|
{ N_("Icon Themes"), N_("Icon Theme Folders"),
|
|
|
|
|
"folders-icon-themes",
|
2015-12-13 13:04:46 +01:00
|
|
|
|
GIMP_HELP_PREFS_FOLDERS_ICON_THEMES,
|
2019-09-06 14:24:24 +00:00
|
|
|
|
N_("Reset Icon Theme _Folders"),
|
2015-12-13 13:04:46 +01:00
|
|
|
|
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
|
|
|
|
|
2018-11-18 18:10:34 +01:00
|
|
|
|
button = gimp_prefs_box_set_page_resettable (GIMP_PREFS_BOX (prefs_box),
|
|
|
|
|
vbox,
|
|
|
|
|
gettext (paths[i].reset_label));
|
|
|
|
|
g_object_set_data (G_OBJECT (button), "path",
|
|
|
|
|
(gpointer) paths[i].path_property_name);
|
|
|
|
|
g_object_set_data (G_OBJECT (button), "path-writable",
|
|
|
|
|
(gpointer) paths[i].writable_property_name);
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
|
G_CALLBACK (prefs_path_reset),
|
|
|
|
|
config);
|
|
|
|
|
|
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);
|
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
|
|
|
|
}
|