1999-03-28 02:16:30 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
2000-11-18 08:25:42 +08:00
|
|
|
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
|
1999-03-28 02:16:30 +08:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
2000-06-06 08:28:28 +08:00
|
|
|
|
2000-01-26 07:05:47 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
1999-02-21 07:20:54 +08:00
|
|
|
#include <string.h>
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <gtk/gtk.h>
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-01-24 07:56:18 +08:00
|
|
|
#include "libgimpmath/gimpmath.h"
|
2001-05-21 21:58:46 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-24 07:56:18 +08:00
|
|
|
|
2001-09-26 07:23:09 +08:00
|
|
|
#include "gui-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
#include "config/gimpconfig.h"
|
|
|
|
#include "config/gimpconfig-params.h"
|
2002-11-25 21:48:24 +08:00
|
|
|
#include "config/gimpconfig-utils.h"
|
2002-11-21 03:45:03 +08:00
|
|
|
#include "config/gimprc.h"
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2003-10-14 23:20:59 +08:00
|
|
|
#include "core/gimptemplate.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
|
2002-12-04 06:16:56 +08:00
|
|
|
#include "widgets/gimpcolorpanel.h"
|
2003-10-14 23:20:59 +08:00
|
|
|
#include "widgets/gimpcontainermenuimpl.h"
|
2002-03-01 00:55:38 +08:00
|
|
|
#include "widgets/gimpdeviceinfo.h"
|
|
|
|
#include "widgets/gimpdevices.h"
|
2002-11-24 06:22:21 +08:00
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2003-10-10 22:11:47 +08:00
|
|
|
#include "widgets/gimpgrideditor.h"
|
2003-08-22 09:42:57 +08:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
2002-11-21 03:45:03 +08:00
|
|
|
#include "widgets/gimppropwidgets.h"
|
2003-10-14 23:20:59 +08:00
|
|
|
#include "widgets/gimptemplateeditor.h"
|
2003-05-29 19:34:30 +08:00
|
|
|
#include "widgets/gimpwidgets-utils.h"
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2003-04-08 18:02:42 +08:00
|
|
|
#include "menus.h"
|
2001-05-23 05:12:43 +08:00
|
|
|
#include "resolution-calibrate-dialog.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "session.h"
|
2003-09-11 07:42:59 +08:00
|
|
|
#include "themes.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
/* preferences local functions */
|
2002-11-21 03:45:03 +08:00
|
|
|
|
|
|
|
static GtkWidget * prefs_dialog_new (Gimp *gimp,
|
2003-10-11 22:30:18 +08:00
|
|
|
GimpConfig *config);
|
2002-11-21 03:45:03 +08:00
|
|
|
static void prefs_config_notify (GObject *config,
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
GObject *config_copy);
|
|
|
|
static void prefs_config_copy_notify (GObject *config_copy,
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
GObject *config);
|
2003-11-06 23:27:05 +08:00
|
|
|
static void prefs_response (GtkWidget *widget,
|
|
|
|
gint response_id,
|
2002-11-23 06:10:40 +08:00
|
|
|
GtkWidget *dialog);
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
static void prefs_resolution_source_callback (GtkWidget *widget,
|
2002-11-21 03:45:03 +08:00
|
|
|
GObject *config);
|
|
|
|
static void prefs_resolution_calibrate_callback (GtkWidget *widget,
|
2002-11-24 06:22:21 +08:00
|
|
|
GtkWidget *sizeentry);
|
2003-04-14 22:15:20 +08:00
|
|
|
static void prefs_input_devices_dialog (GtkWidget *widget);
|
2002-11-21 03:45:03 +08:00
|
|
|
static void prefs_input_dialog_able_callback (GtkWidget *widget,
|
|
|
|
GdkDevice *device,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
|
2002-11-26 22:54:28 +08:00
|
|
|
/* private variables */
|
|
|
|
|
|
|
|
static GtkWidget *prefs_dialog = NULL;
|
|
|
|
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
/* public function */
|
|
|
|
|
2002-11-25 21:48:24 +08:00
|
|
|
GtkWidget *
|
|
|
|
preferences_dialog_create (Gimp *gimp)
|
|
|
|
{
|
2003-10-11 22:30:18 +08:00
|
|
|
GimpConfig *config;
|
|
|
|
GimpConfig *config_copy;
|
|
|
|
GimpConfig *config_orig;
|
2002-11-25 21:48:24 +08:00
|
|
|
|
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
|
|
|
|
2002-11-26 22:54:28 +08:00
|
|
|
if (prefs_dialog)
|
|
|
|
return prefs_dialog;
|
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
/* turn off autosaving while the prefs dialog is open */
|
2002-11-30 21:08:44 +08:00
|
|
|
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
config = GIMP_CONFIG (gimp->edit_config);
|
2002-11-25 21:48:24 +08: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 22:54:28 +08:00
|
|
|
g_object_add_weak_pointer (G_OBJECT (prefs_dialog),
|
2002-11-27 18:55:59 +08:00
|
|
|
(gpointer *) &prefs_dialog);
|
2002-11-26 22:54:28 +08:00
|
|
|
|
2002-12-14 22:13:54 +08:00
|
|
|
g_object_set_data (G_OBJECT (prefs_dialog), "gimp", gimp);
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2002-12-14 22:13:54 +08: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 21:48:24 +08:00
|
|
|
|
|
|
|
return prefs_dialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* private functions */
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
static void
|
2002-11-21 03:45:03 +08:00
|
|
|
prefs_config_notify (GObject *config,
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
GObject *config_copy)
|
1998-06-09 05:53:45 +08:00
|
|
|
{
|
2002-11-21 23:46:19 +08:00
|
|
|
GValue global_value = { 0, };
|
2002-11-26 22:54:28 +08:00
|
|
|
GValue copy_value = { 0, };
|
1999-11-27 21:44:54 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_value_init (&global_value, param_spec->value_type);
|
|
|
|
g_value_init (©_value, param_spec->value_type);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_object_get_property (config, param_spec->name, &global_value);
|
|
|
|
g_object_get_property (config_copy, param_spec->name, ©_value);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2002-11-21 23:46:19 +08: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-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_object_set_property (config_copy, param_spec->name, &global_value);
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_signal_handlers_unblock_by_func (config_copy,
|
|
|
|
prefs_config_copy_notify,
|
|
|
|
config);
|
|
|
|
}
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_value_unset (&global_value);
|
|
|
|
g_value_unset (©_value);
|
1998-06-09 05:53:45 +08:00
|
|
|
}
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
static void
|
|
|
|
prefs_config_copy_notify (GObject *config_copy,
|
|
|
|
GParamSpec *param_spec,
|
|
|
|
GObject *config)
|
1998-06-09 05:53:45 +08:00
|
|
|
{
|
2002-11-21 23:46:19 +08:00
|
|
|
GValue copy_value = { 0, };
|
|
|
|
GValue global_value = { 0, };
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_value_init (©_value, param_spec->value_type);
|
|
|
|
g_value_init (&global_value, param_spec->value_type);
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_object_get_property (config_copy, param_spec->name, ©_value);
|
|
|
|
g_object_get_property (config, param_spec->name, &global_value);
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
if (g_param_values_cmp (param_spec, ©_value, &global_value))
|
2002-02-12 06:39:08 +08:00
|
|
|
{
|
2002-11-30 21:08:44 +08:00
|
|
|
if (param_spec->flags & GIMP_PARAM_CONFIRM)
|
2002-11-21 23:46:19 +08:00
|
|
|
{
|
2003-01-27 21:41:27 +08:00
|
|
|
#ifdef GIMP_CONFIG_DEBUG
|
2002-12-11 00:38:16 +08:00
|
|
|
g_print ("NOT Applying prefs change of '%s' to edit_config "
|
2002-11-21 23:46:19 +08:00
|
|
|
"because it needs confirmation\n",
|
|
|
|
param_spec->name);
|
2003-01-27 21:41:27 +08:00
|
|
|
#endif
|
2002-11-21 23:46:19 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-01-27 21:41:27 +08:00
|
|
|
#ifdef GIMP_CONFIG_DEBUG
|
2002-12-11 00:38:16 +08:00
|
|
|
g_print ("Applying prefs change of '%s' to edit_config\n",
|
2002-11-21 23:46:19 +08:00
|
|
|
param_spec->name);
|
2003-01-27 21:41:27 +08:00
|
|
|
#endif
|
2002-11-21 23:46:19 +08:00
|
|
|
g_signal_handlers_block_by_func (config,
|
|
|
|
prefs_config_notify,
|
|
|
|
config_copy);
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_object_set_property (config, param_spec->name, ©_value);
|
2000-01-26 07:05:47 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_signal_handlers_unblock_by_func (config,
|
|
|
|
prefs_config_notify,
|
|
|
|
config_copy);
|
|
|
|
}
|
2000-01-26 07:05:47 +08:00
|
|
|
}
|
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
g_value_unset (©_value);
|
|
|
|
g_value_unset (&global_value);
|
2002-11-21 03:45:03 +08:00
|
|
|
}
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
static void
|
2003-11-06 23:27:05 +08:00
|
|
|
prefs_response (GtkWidget *widget,
|
|
|
|
gint response_id,
|
|
|
|
GtkWidget *dialog)
|
1998-06-09 05:53:45 +08:00
|
|
|
{
|
2003-11-06 23:27:05 +08:00
|
|
|
Gimp *gimp = g_object_get_data (G_OBJECT (dialog), "gimp");
|
2001-10-29 19:47:11 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
if (response_id == GTK_RESPONSE_OK)
|
|
|
|
{
|
|
|
|
GimpConfig *config_copy;
|
|
|
|
GList *restart_diff;
|
|
|
|
GList *confirm_diff;
|
|
|
|
GList *list;
|
2001-10-29 19:47:11 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
config_copy = g_object_get_data (G_OBJECT (dialog), "config-copy");
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
/* destroy config_orig */
|
|
|
|
g_object_set_data (G_OBJECT (dialog), "config-orig", NULL);
|
2001-06-18 21:10:03 +08:00
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
|
2001-11-09 03:14:51 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
confirm_diff = gimp_config_diff (GIMP_CONFIG (gimp->edit_config),
|
|
|
|
config_copy,
|
|
|
|
GIMP_PARAM_CONFIRM);
|
2000-01-26 07:05:47 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
|
2002-11-21 23:46:19 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
for (list = confirm_diff; list; list = g_list_next (list))
|
|
|
|
{
|
|
|
|
GParamSpec *param_spec;
|
|
|
|
GValue value = { 0, };
|
2000-01-26 07:05:47 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
param_spec = (GParamSpec *) list->data;
|
2002-11-21 23:46:19 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_value_init (&value, param_spec->value_type);
|
2001-07-27 07:35:00 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_object_get_property (G_OBJECT (config_copy),
|
|
|
|
param_spec->name, &value);
|
|
|
|
g_object_set_property (G_OBJECT (gimp->edit_config),
|
|
|
|
param_spec->name, &value);
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_value_unset (&value);
|
|
|
|
}
|
2002-11-30 21:08:44 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_list_free (confirm_diff);
|
2001-07-27 07:35:00 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
gimp_rc_save (GIMP_RC (gimp->edit_config));
|
2001-07-27 07:35:00 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
/* enable autosaving again */
|
|
|
|
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
2001-07-27 07:35:00 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
/* spit out a solely informational warning about changed values
|
|
|
|
* which need restart
|
|
|
|
*/
|
|
|
|
restart_diff = gimp_config_diff (GIMP_CONFIG (gimp->edit_config),
|
|
|
|
GIMP_CONFIG (gimp->config),
|
|
|
|
GIMP_PARAM_RESTART);
|
2001-07-27 07:35:00 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
if (restart_diff)
|
|
|
|
{
|
|
|
|
GString *string;
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-14 23:33:40 +08:00
|
|
|
string = g_string_new (_("You will have to restart GIMP for "
|
2003-11-06 23:27:05 +08:00
|
|
|
"the following changes to take effect:"));
|
|
|
|
g_string_append (string, "\n\n");
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
for (list = restart_diff; list; list = g_list_next (list))
|
|
|
|
{
|
|
|
|
GParamSpec *param_spec = list->data;
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_string_append_printf (string, "%s\n", param_spec->name);
|
|
|
|
}
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_message (string->str);
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_string_free (string, TRUE);
|
|
|
|
}
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_list_free (restart_diff);
|
2002-11-25 21:48:24 +08:00
|
|
|
}
|
2003-11-06 23:27:05 +08:00
|
|
|
else /* cancel */
|
|
|
|
{
|
|
|
|
GimpConfig *config_orig;
|
|
|
|
GList *diff;
|
|
|
|
GList *list;
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
config_orig = g_object_get_data (G_OBJECT (dialog), "config-orig");
|
2002-11-30 21:08:44 +08:00
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
/* destroy config_copy */
|
|
|
|
g_object_set_data (G_OBJECT (dialog), "config-copy", NULL);
|
2002-11-30 21:08:44 +08:00
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
diff = gimp_config_diff (GIMP_CONFIG (gimp->edit_config), config_orig,
|
|
|
|
GIMP_PARAM_SERIALIZE);
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
for (list = diff; list; list = g_list_next (list))
|
2002-11-21 03:45:03 +08:00
|
|
|
{
|
2002-11-25 21:48:24 +08:00
|
|
|
GParamSpec *param_spec;
|
2003-11-06 23:27:05 +08:00
|
|
|
GValue value = { 0, };
|
2002-11-25 21:48:24 +08:00
|
|
|
|
|
|
|
param_spec = (GParamSpec *) list->data;
|
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_value_init (&value, param_spec->value_type);
|
|
|
|
|
|
|
|
g_object_get_property (G_OBJECT (config_orig),
|
|
|
|
param_spec->name,
|
|
|
|
&value);
|
|
|
|
g_object_set_property (G_OBJECT (gimp->edit_config),
|
|
|
|
param_spec->name,
|
|
|
|
&value);
|
|
|
|
|
|
|
|
g_value_unset (&value);
|
2002-11-21 03:45:03 +08:00
|
|
|
}
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
|
2002-11-25 21:48:24 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_list_free (diff);
|
2001-07-27 07:35:00 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
/* enable autosaving again */
|
|
|
|
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
|
|
|
}
|
2003-11-12 20:56:31 +08:00
|
|
|
|
|
|
|
gtk_widget_destroy (dialog);
|
1999-03-14 07:03:11 +08:00
|
|
|
}
|
|
|
|
|
1999-03-03 20:35:12 +08:00
|
|
|
static void
|
2003-10-14 23:20:59 +08:00
|
|
|
prefs_template_select_callback (GimpContainerMenu *menu,
|
|
|
|
GimpTemplate *template,
|
|
|
|
gpointer insert_data,
|
|
|
|
GimpTemplate *edit_template)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
2003-10-14 23:20:59 +08:00
|
|
|
if (template)
|
|
|
|
gimp_config_sync (GIMP_CONFIG (template), GIMP_CONFIG (edit_template), 0);
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
1999-03-28 02:16:30 +08:00
|
|
|
static void
|
2003-10-14 23:20:59 +08:00
|
|
|
prefs_resolution_source_callback (GtkWidget *widget,
|
|
|
|
GObject *config)
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
gdouble xres;
|
|
|
|
gdouble yres;
|
|
|
|
gboolean from_gdk;
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2000-09-25 09:27:47 +08:00
|
|
|
gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget));
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2002-12-14 22:13:54 +08:00
|
|
|
from_gdk = GTK_TOGGLE_BUTTON (widget)->active;
|
1999-02-25 19:25:53 +08:00
|
|
|
|
2002-12-14 22:13:54 +08:00
|
|
|
if (from_gdk)
|
|
|
|
{
|
2003-05-29 19:34:30 +08:00
|
|
|
gimp_get_screen_resolution (NULL, &xres, &yres);
|
2002-12-14 22:13:54 +08:00
|
|
|
}
|
|
|
|
else
|
1999-02-25 19:25:53 +08:00
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
GimpSizeEntry *sizeentry;
|
1999-02-25 19:25:53 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
sizeentry = g_object_get_data (G_OBJECT (widget),
|
|
|
|
"monitor_resolution_sizeentry");
|
2002-12-14 22:13:54 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
if (sizeentry)
|
1999-02-25 19:25:53 +08:00
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
xres = gimp_size_entry_get_refval (sizeentry, 0);
|
|
|
|
yres = gimp_size_entry_get_refval (sizeentry, 1);
|
1999-02-25 19:25:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
g_object_set (config,
|
|
|
|
"monitor-xresolution", xres,
|
|
|
|
"monitor-yresolution", yres,
|
2002-11-21 23:46:19 +08:00
|
|
|
"monitor-resolution-from-windowing-system", from_gdk,
|
2002-11-21 03:45:03 +08:00
|
|
|
NULL);
|
1999-02-25 19:25:53 +08:00
|
|
|
}
|
1998-12-06 05:48:37 +08:00
|
|
|
|
2000-09-25 09:27:47 +08:00
|
|
|
static void
|
|
|
|
prefs_resolution_calibrate_callback (GtkWidget *widget,
|
2002-11-24 06:22:21 +08:00
|
|
|
GtkWidget *sizeentry)
|
2000-09-25 09:27:47 +08:00
|
|
|
{
|
2002-03-01 02:34:41 +08:00
|
|
|
GtkWidget *dialog;
|
|
|
|
GtkWidget *notebook;
|
|
|
|
GtkWidget *image;
|
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
dialog = gtk_widget_get_toplevel (sizeentry);
|
2002-03-01 02:34:41 +08:00
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
notebook = g_object_get_data (G_OBJECT (dialog), "notebook");
|
|
|
|
image = g_object_get_data (G_OBJECT (notebook), "image");
|
2002-03-01 02:34:41 +08:00
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
resolution_calibrate_dialog (sizeentry,
|
2002-03-01 02:34:41 +08:00
|
|
|
gtk_image_get_pixbuf (GTK_IMAGE (image)),
|
|
|
|
NULL, NULL, NULL);
|
2000-09-25 09:27:47 +08:00
|
|
|
}
|
|
|
|
|
2003-04-14 22:15:20 +08:00
|
|
|
static void
|
|
|
|
prefs_input_devices_dialog (GtkWidget *widget)
|
|
|
|
{
|
|
|
|
static GtkWidget *input_dialog = NULL;
|
|
|
|
|
|
|
|
if (input_dialog)
|
|
|
|
{
|
|
|
|
gtk_window_present (GTK_WINDOW (input_dialog));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
input_dialog = gtk_input_dialog_new ();
|
|
|
|
|
|
|
|
g_object_add_weak_pointer (G_OBJECT (input_dialog),
|
|
|
|
(gpointer *) &input_dialog);
|
|
|
|
|
|
|
|
gtk_window_set_transient_for (GTK_WINDOW (input_dialog),
|
|
|
|
GTK_WINDOW (prefs_dialog));
|
|
|
|
gtk_window_set_destroy_with_parent (GTK_WINDOW (input_dialog), TRUE);
|
2003-07-18 06:30:13 +08:00
|
|
|
|
2003-04-14 22:15:20 +08:00
|
|
|
gtk_widget_hide (GTK_INPUT_DIALOG (input_dialog)->save_button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (GTK_INPUT_DIALOG (input_dialog)->close_button,
|
|
|
|
"clicked",
|
|
|
|
G_CALLBACK (gtk_widget_destroy),
|
|
|
|
input_dialog);
|
|
|
|
|
|
|
|
g_signal_connect (input_dialog, "enable_device",
|
|
|
|
G_CALLBACK (prefs_input_dialog_able_callback),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect (input_dialog, "disable_device",
|
|
|
|
G_CALLBACK (prefs_input_dialog_able_callback),
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
gtk_widget_show (input_dialog);
|
|
|
|
}
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
static void
|
|
|
|
prefs_input_dialog_able_callback (GtkWidget *widget,
|
|
|
|
GdkDevice *device,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gimp_device_info_changed_by_device (device);
|
|
|
|
}
|
|
|
|
|
1999-11-27 21:44:54 +08:00
|
|
|
static GtkWidget *
|
2002-02-28 21:47:03 +08:00
|
|
|
prefs_notebook_append_page (Gimp *gimp,
|
|
|
|
GtkNotebook *notebook,
|
2003-06-11 23:01:38 +08:00
|
|
|
const gchar *notebook_label,
|
2002-02-28 21:47:03 +08:00
|
|
|
const gchar *notebook_icon,
|
2003-06-11 23:01:38 +08:00
|
|
|
GtkTreeStore *tree,
|
|
|
|
const gchar *tree_label,
|
2003-08-24 03:35:05 +08:00
|
|
|
const gchar *help_id,
|
2003-06-11 23:01:38 +08:00
|
|
|
GtkTreeIter *parent,
|
|
|
|
GtkTreeIter *iter,
|
|
|
|
gint page_index)
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
2003-09-11 07:42:59 +08:00
|
|
|
GtkWidget *event_box;
|
|
|
|
GtkWidget *vbox;
|
|
|
|
GdkPixbuf *pixbuf = NULL;
|
|
|
|
GdkPixbuf *small_pixbuf = NULL;
|
1999-03-28 02:16:30 +08:00
|
|
|
|
1999-12-18 19:37:11 +08:00
|
|
|
event_box = gtk_event_box_new ();
|
2001-12-08 01:39:51 +08:00
|
|
|
gtk_notebook_append_page (notebook, event_box, NULL);
|
1999-12-18 19:37:11 +08:00
|
|
|
gtk_widget_show (event_box);
|
|
|
|
|
2003-08-24 03:35:05 +08:00
|
|
|
gimp_help_set_help_data (event_box, NULL, help_id);
|
1999-12-18 19:37:11 +08:00
|
|
|
|
2003-11-03 17:04:41 +08:00
|
|
|
vbox = gtk_vbox_new (FALSE, 6);
|
2003-06-11 23:01:38 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
2002-03-01 02:34:41 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (event_box), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
if (notebook_icon)
|
|
|
|
{
|
2003-11-16 01:53:18 +08:00
|
|
|
gchar *filename;
|
2002-02-28 21:47:03 +08:00
|
|
|
|
2003-11-16 01:53:18 +08:00
|
|
|
filename = themes_get_theme_file (gimp, "images", "preferences",
|
|
|
|
notebook_icon, NULL);
|
2002-02-28 21:47:03 +08:00
|
|
|
|
2002-05-11 07:30:09 +08:00
|
|
|
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
|
|
|
|
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
|
|
|
|
else
|
|
|
|
pixbuf = NULL;
|
2002-02-28 21:47:03 +08:00
|
|
|
|
|
|
|
g_free (filename);
|
|
|
|
|
|
|
|
if (pixbuf)
|
2003-09-11 07:42:59 +08:00
|
|
|
small_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
|
|
|
|
18, 18,
|
|
|
|
GDK_INTERP_BILINEAR);
|
2002-02-28 21:47:03 +08:00
|
|
|
}
|
|
|
|
|
2001-09-27 13:50:59 +08:00
|
|
|
gtk_tree_store_append (tree, iter, parent);
|
2002-03-01 02:34:41 +08:00
|
|
|
gtk_tree_store_set (tree, iter,
|
|
|
|
0, small_pixbuf,
|
|
|
|
1, tree_label,
|
|
|
|
2, page_index,
|
2002-03-12 04:23:26 +08:00
|
|
|
3, notebook_label,
|
2002-03-01 02:34:41 +08:00
|
|
|
4, pixbuf,
|
|
|
|
-1);
|
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
if (pixbuf)
|
|
|
|
g_object_unref (pixbuf);
|
2001-09-27 13:50:59 +08:00
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
if (small_pixbuf)
|
|
|
|
g_object_unref (small_pixbuf);
|
|
|
|
|
1999-03-28 02:16:30 +08:00
|
|
|
return vbox;
|
|
|
|
}
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-03-28 02:16:30 +08:00
|
|
|
static void
|
2001-09-27 13:50:59 +08:00
|
|
|
prefs_tree_select_callback (GtkTreeSelection *sel,
|
|
|
|
GtkNotebook *notebook)
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
2002-03-01 02:34:41 +08:00
|
|
|
GtkWidget *label;
|
|
|
|
GtkWidget *image;
|
2001-09-27 13:50:59 +08:00
|
|
|
GtkTreeModel *model;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GValue val = { 0, };
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2001-09-27 13:50:59 +08:00
|
|
|
if (! gtk_tree_selection_get_selected (sel, &model, &iter))
|
1999-03-28 02:16:30 +08:00
|
|
|
return;
|
1998-12-06 05:48:37 +08:00
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
label = g_object_get_data (G_OBJECT (notebook), "label");
|
|
|
|
image = g_object_get_data (G_OBJECT (notebook), "image");
|
|
|
|
|
|
|
|
gtk_tree_model_get_value (model, &iter, 3, &val);
|
|
|
|
|
2002-03-12 04:23:26 +08:00
|
|
|
gtk_label_set_text (GTK_LABEL (label),
|
|
|
|
g_value_get_string (&val));
|
2002-03-01 02:34:41 +08:00
|
|
|
|
|
|
|
g_value_unset (&val);
|
|
|
|
|
|
|
|
gtk_tree_model_get_value (model, &iter, 4, &val);
|
|
|
|
|
|
|
|
gtk_image_set_from_pixbuf (GTK_IMAGE (image),
|
|
|
|
g_value_get_object (&val));
|
|
|
|
|
|
|
|
g_value_unset (&val);
|
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
gtk_tree_model_get_value (model, &iter, 2, &val);
|
1998-12-06 05:48:37 +08:00
|
|
|
|
2001-09-27 13:50:59 +08:00
|
|
|
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook),
|
|
|
|
g_value_get_int (&val));
|
2001-11-12 02:35:25 +08:00
|
|
|
|
|
|
|
g_value_unset (&val);
|
1999-03-28 02:16:30 +08:00
|
|
|
}
|
1998-12-06 05:48:37 +08:00
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
static void
|
|
|
|
prefs_format_string_select_callback (GtkTreeSelection *sel,
|
|
|
|
GtkEntry *entry)
|
|
|
|
{
|
|
|
|
GtkTreeModel *model;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
2003-06-11 23:01:38 +08:00
|
|
|
if (gtk_tree_selection_get_selected (sel, &model, &iter))
|
|
|
|
{
|
|
|
|
GValue val = { 0, };
|
2002-11-23 06:10:40 +08:00
|
|
|
|
2003-06-11 23:01:38 +08: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-23 06:10:40 +08:00
|
|
|
}
|
|
|
|
|
2003-11-12 07:56:00 +08:00
|
|
|
static void
|
|
|
|
prefs_theme_select_callback (GtkTreeSelection *sel,
|
|
|
|
Gimp *gimp)
|
|
|
|
{
|
|
|
|
GtkTreeModel *model;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
if (gtk_tree_selection_get_selected (sel, &model, &iter))
|
|
|
|
{
|
|
|
|
GValue val = { 0, };
|
|
|
|
|
|
|
|
gtk_tree_model_get_value (model, &iter, 0, &val);
|
|
|
|
g_object_set (gimp->config, "theme", g_value_get_string (&val), NULL);
|
|
|
|
g_value_unset (&val);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
static void
|
|
|
|
prefs_theme_reload_callback (GtkWidget *button,
|
|
|
|
Gimp *gimp)
|
|
|
|
{
|
|
|
|
g_object_notify (G_OBJECT (gimp->config), "theme");
|
|
|
|
}
|
|
|
|
|
1999-11-27 21:44:54 +08:00
|
|
|
static GtkWidget *
|
2003-10-22 22:46:05 +08:00
|
|
|
prefs_frame_new (const gchar *label,
|
2002-11-23 06:10:40 +08:00
|
|
|
GtkContainer *parent,
|
|
|
|
gboolean expand)
|
1999-11-27 21:44:54 +08:00
|
|
|
{
|
|
|
|
GtkWidget *frame;
|
2002-11-24 06:22:21 +08:00
|
|
|
GtkWidget *vbox;
|
1999-11-27 21:44:54 +08:00
|
|
|
|
2003-06-11 23:01:38 +08:00
|
|
|
gboolean hig_compliant = FALSE;
|
2002-02-28 21:47:03 +08:00
|
|
|
|
2003-06-11 23:01:38 +08:00
|
|
|
if (hig_compliant)
|
2002-11-24 08:03:42 +08:00
|
|
|
{
|
2003-06-11 23:01:38 +08:00
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *title;
|
|
|
|
GtkWidget *space;
|
2002-11-24 08:03:42 +08:00
|
|
|
PangoAttrList *attrs;
|
|
|
|
PangoAttribute *attr;
|
|
|
|
|
2003-06-11 23:01:38 +08:00
|
|
|
frame = gtk_vbox_new (FALSE, 4);
|
2002-11-24 08:03:42 +08:00
|
|
|
|
|
|
|
attrs = pango_attr_list_new ();
|
|
|
|
|
|
|
|
attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
|
|
|
|
attr->start_index = 0;
|
|
|
|
attr->end_index = -1;
|
|
|
|
pango_attr_list_insert (attrs, attr);
|
|
|
|
|
|
|
|
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
|
|
|
attr->start_index = 0;
|
|
|
|
attr->end_index = -1;
|
|
|
|
pango_attr_list_insert (attrs, attr);
|
|
|
|
|
2003-06-11 23:01:38 +08:00
|
|
|
title = gtk_label_new (label);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (title), 0.0, 0.5);
|
|
|
|
gtk_label_set_attributes (GTK_LABEL (title), attrs);
|
|
|
|
gtk_box_pack_start (GTK_BOX (frame), title, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (title);
|
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
pango_attr_list_unref (attrs);
|
2003-06-11 23:01:38 +08:00
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
space = gtk_label_new (" ");
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), space, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (space);
|
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (hbox), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
frame = gtk_frame_new (label);
|
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 2);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
2002-11-24 08:03:42 +08:00
|
|
|
}
|
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
if (GTK_IS_BOX (parent))
|
2002-11-23 06:10:40 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (parent), frame, expand, expand, 0);
|
2002-02-28 21:47:03 +08:00
|
|
|
else
|
|
|
|
gtk_container_add (parent, frame);
|
|
|
|
|
1999-11-27 21:44:54 +08:00
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
return vbox;
|
1999-11-27 21:44:54 +08:00
|
|
|
}
|
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
static GtkWidget *
|
|
|
|
prefs_table_new (gint rows,
|
|
|
|
GtkContainer *parent,
|
|
|
|
gboolean left_align)
|
|
|
|
{
|
|
|
|
GtkWidget *table;
|
|
|
|
|
|
|
|
if (left_align)
|
|
|
|
{
|
|
|
|
GtkWidget *hbox;
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 0);
|
|
|
|
|
|
|
|
if (GTK_IS_BOX (parent))
|
|
|
|
gtk_box_pack_start (GTK_BOX (parent), hbox, FALSE, FALSE, 0);
|
|
|
|
else
|
|
|
|
gtk_container_add (parent, hbox);
|
|
|
|
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
parent = GTK_CONTAINER (hbox);
|
|
|
|
}
|
|
|
|
|
|
|
|
table = gtk_table_new (rows, 2, FALSE);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
|
|
|
|
|
|
|
if (rows > 1)
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
|
|
|
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
|
|
|
|
|
|
|
if (GTK_IS_BOX (parent))
|
|
|
|
gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
|
|
|
|
else
|
|
|
|
gtk_container_add (parent, table);
|
|
|
|
|
|
|
|
gtk_widget_show (table);
|
|
|
|
|
|
|
|
return table;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
2002-11-21 03:45:03 +08:00
|
|
|
prefs_check_button_add (GObject *config,
|
|
|
|
const gchar *property_name,
|
|
|
|
const gchar *label,
|
2002-02-28 21:47:03 +08:00
|
|
|
GtkBox *vbox)
|
|
|
|
{
|
|
|
|
GtkWidget *button;
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
button = gimp_prop_check_button_new (config, property_name, label);
|
2002-02-28 21:47:03 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
if (button)
|
|
|
|
{
|
|
|
|
gtk_box_pack_start (vbox, button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
}
|
2002-02-28 21:47:03 +08:00
|
|
|
|
|
|
|
return button;
|
|
|
|
}
|
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
static GtkWidget *
|
|
|
|
prefs_color_button_add (GObject *config,
|
|
|
|
const gchar *property_name,
|
|
|
|
const gchar *label,
|
|
|
|
const gchar *title,
|
|
|
|
GtkTable *table,
|
|
|
|
gint table_row)
|
|
|
|
{
|
|
|
|
GtkWidget *button;
|
|
|
|
|
|
|
|
button = gimp_prop_color_button_new (config, property_name, title,
|
2002-12-13 03:48:13 +08:00
|
|
|
20, 20, GIMP_COLOR_AREA_FLAT);
|
2002-11-24 06:22:21 +08:00
|
|
|
|
|
|
|
if (button)
|
|
|
|
gimp_table_attach_aligned (table, 0, table_row,
|
|
|
|
label, 1.0, 0.5,
|
|
|
|
button, 1, TRUE);
|
|
|
|
|
|
|
|
return button;
|
|
|
|
}
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
static GtkWidget *
|
|
|
|
prefs_enum_option_menu_add (GObject *config,
|
|
|
|
const gchar *property_name,
|
|
|
|
gint minimum,
|
|
|
|
gint maximum,
|
|
|
|
const gchar *label,
|
|
|
|
GtkTable *table,
|
|
|
|
gint table_row)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
|
|
|
|
menu = gimp_prop_enum_option_menu_new (config, property_name,
|
|
|
|
minimum, maximum);
|
|
|
|
|
|
|
|
if (menu)
|
|
|
|
gimp_table_attach_aligned (table, 0, table_row,
|
|
|
|
label, 1.0, 0.5,
|
|
|
|
menu, 1, TRUE);
|
|
|
|
|
|
|
|
return menu;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
prefs_boolean_option_menu_add (GObject *config,
|
|
|
|
const gchar *property_name,
|
|
|
|
const gchar *true_text,
|
|
|
|
const gchar *false_text,
|
|
|
|
const gchar *label,
|
|
|
|
GtkTable *table,
|
|
|
|
gint table_row)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
|
|
|
|
menu = gimp_prop_boolean_option_menu_new (config, property_name,
|
|
|
|
true_text, false_text);
|
|
|
|
|
|
|
|
if (menu)
|
|
|
|
gimp_table_attach_aligned (table, 0, table_row,
|
|
|
|
label, 1.0, 0.5,
|
|
|
|
menu, 1, TRUE);
|
|
|
|
|
|
|
|
return menu;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
prefs_spin_button_add (GObject *config,
|
|
|
|
const gchar *property_name,
|
|
|
|
gdouble step_increment,
|
|
|
|
gdouble page_increment,
|
|
|
|
gint digits,
|
|
|
|
const gchar *label,
|
|
|
|
GtkTable *table,
|
|
|
|
gint table_row)
|
|
|
|
{
|
|
|
|
GtkWidget *spinbutton;
|
|
|
|
|
|
|
|
spinbutton = gimp_prop_spin_button_new (config, property_name,
|
|
|
|
step_increment, page_increment,
|
|
|
|
digits);
|
|
|
|
|
|
|
|
if (spinbutton)
|
|
|
|
gimp_table_attach_aligned (table, 0, table_row,
|
|
|
|
label, 1.0, 0.5,
|
|
|
|
spinbutton, 1, TRUE);
|
|
|
|
|
|
|
|
return spinbutton;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
prefs_memsize_entry_add (GObject *config,
|
|
|
|
const gchar *property_name,
|
|
|
|
const gchar *label,
|
|
|
|
GtkTable *table,
|
|
|
|
gint table_row)
|
|
|
|
{
|
|
|
|
GtkWidget *entry;
|
|
|
|
|
|
|
|
entry = gimp_prop_memsize_entry_new (config, property_name);
|
|
|
|
|
|
|
|
if (entry)
|
|
|
|
gimp_table_attach_aligned (table, 0, table_row,
|
|
|
|
label, 1.0, 0.5,
|
|
|
|
entry, 1, TRUE);
|
|
|
|
|
|
|
|
return entry;
|
|
|
|
}
|
|
|
|
|
2003-10-22 22:46:05 +08:00
|
|
|
static void
|
|
|
|
prefs_display_options_frame_add (Gimp *gimp,
|
|
|
|
GObject *object,
|
|
|
|
const gchar *label,
|
|
|
|
GtkContainer *parent)
|
|
|
|
{
|
2003-10-23 19:39:33 +08:00
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *hbox;
|
2003-10-23 04:32:13 +08:00
|
|
|
GtkWidget *checks_vbox;
|
2003-10-22 22:46:05 +08:00
|
|
|
GtkWidget *table;
|
|
|
|
GtkWidget *button;
|
|
|
|
|
2003-10-23 19:39:33 +08:00
|
|
|
vbox = prefs_frame_new (label, parent, FALSE);
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
2003-10-23 04:32:13 +08:00
|
|
|
|
2003-10-23 19:39:33 +08:00
|
|
|
checks_vbox = gtk_vbox_new (FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
|
2003-10-23 04:32:13 +08:00
|
|
|
gtk_widget_show (checks_vbox);
|
|
|
|
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-menubar",
|
|
|
|
_("Show _Menubar"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-rulers",
|
|
|
|
_("Show _Rulers"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-scrollbars",
|
|
|
|
_("Show Scroll_bars"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-statusbar",
|
|
|
|
_("Show S_tatusbar"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
|
|
|
|
2003-10-23 19:39:33 +08:00
|
|
|
checks_vbox = gtk_vbox_new (FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
|
2003-10-23 04:32:13 +08:00
|
|
|
gtk_widget_show (checks_vbox);
|
2003-10-22 22:46:05 +08:00
|
|
|
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-selection",
|
|
|
|
_("Show S_election"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-layer-boundary",
|
|
|
|
_("Show _Layer Boundary"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-guides",
|
|
|
|
_("Show _Guides"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-23 19:39:33 +08:00
|
|
|
prefs_check_button_add (object, "show-grid",
|
|
|
|
_("Show Gri_d"),
|
2003-10-23 04:32:13 +08:00
|
|
|
GTK_BOX (checks_vbox));
|
2003-10-22 22:46:05 +08:00
|
|
|
|
2003-10-23 19:39:33 +08:00
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox), FALSE);
|
2003-10-22 22:46:05 +08:00
|
|
|
|
|
|
|
prefs_enum_option_menu_add (object, "padding-mode", 0, 0,
|
|
|
|
_("Canvas Padding Mode:"), GTK_TABLE (table), 0);
|
|
|
|
|
|
|
|
button = prefs_color_button_add (object, "padding-color",
|
|
|
|
_("Custom Padding Color:"),
|
|
|
|
_("Select Custom Canvas Padding Color"),
|
|
|
|
GTK_TABLE (table), 1);
|
|
|
|
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
|
|
|
|
gimp_get_user_context (gimp));
|
|
|
|
}
|
|
|
|
|
1999-12-18 19:37:11 +08:00
|
|
|
static void
|
2003-08-24 03:35:05 +08:00
|
|
|
prefs_help_func (const gchar *help_id,
|
|
|
|
gpointer help_data)
|
1999-12-18 19:37:11 +08:00
|
|
|
{
|
2003-08-24 03:35:05 +08:00
|
|
|
GtkWidget *notebook;
|
|
|
|
GtkWidget *event_box;
|
|
|
|
gint page_num;
|
1999-12-18 19:37:11 +08:00
|
|
|
|
2003-08-24 03:35:05 +08:00
|
|
|
notebook = g_object_get_data (G_OBJECT (help_data), "notebook");
|
|
|
|
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
|
|
|
|
event_box = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
|
1999-12-18 19:37:11 +08:00
|
|
|
|
2003-08-24 03:35:05 +08:00
|
|
|
help_id = g_object_get_data (G_OBJECT (event_box), "gimp-help-id");
|
|
|
|
gimp_standard_help_func (help_id, NULL);
|
1999-12-18 19:37:11 +08:00
|
|
|
}
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
static GtkWidget *
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_dialog_new (Gimp *gimp,
|
|
|
|
GimpConfig *config)
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
GtkWidget *dialog;
|
2002-03-19 05:25:17 +08:00
|
|
|
GtkWidget *tv;
|
|
|
|
GtkTreeStore *tree;
|
|
|
|
GtkTreeViewColumn *column;
|
|
|
|
GtkCellRenderer *cell;
|
|
|
|
GtkTreeSelection *sel;
|
|
|
|
GtkTreeIter top_iter;
|
|
|
|
GtkTreeIter child_iter;
|
2002-11-23 06:10:40 +08:00
|
|
|
GtkTreeIter grandchild_iter;
|
2002-03-19 05:25:17 +08:00
|
|
|
gint page_index;
|
|
|
|
|
2002-09-17 21:10:56 +08:00
|
|
|
GtkWidget *ebox;
|
2002-03-19 05:25:17 +08:00
|
|
|
GtkWidget *frame;
|
|
|
|
GtkWidget *notebook;
|
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *vbox2;
|
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *abox;
|
|
|
|
GtkWidget *button;
|
|
|
|
GtkWidget *fileselection;
|
|
|
|
GtkWidget *patheditor;
|
|
|
|
GtkWidget *table;
|
|
|
|
GtkWidget *label;
|
|
|
|
GtkWidget *image;
|
|
|
|
GtkWidget *sizeentry;
|
|
|
|
GtkWidget *separator;
|
|
|
|
GtkWidget *calibrate_button;
|
|
|
|
PangoAttrList *attrs;
|
|
|
|
PangoAttribute *attr;
|
|
|
|
GSList *group;
|
2003-10-10 22:11:47 +08:00
|
|
|
GtkWidget *editor;
|
2002-11-21 03:45:03 +08:00
|
|
|
gint i;
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
GObject *object;
|
2002-11-21 03:45:03 +08:00
|
|
|
GimpCoreConfig *core_config;
|
|
|
|
GimpDisplayConfig *display_config;
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2001-10-29 19:47:11 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
2003-10-11 22:30:18 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_CONFIG (config), NULL);
|
2001-10-29 19:47:11 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
object = G_OBJECT (config);
|
2002-11-21 03:45:03 +08:00
|
|
|
core_config = GIMP_CORE_CONFIG (config);
|
|
|
|
display_config = GIMP_DISPLAY_CONFIG (config);
|
1998-12-06 05:48:37 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
dialog = gimp_dialog_new (_("Preferences"), "preferences",
|
2003-11-06 23:27:05 +08:00
|
|
|
NULL, 0,
|
2002-11-21 03:45:03 +08:00
|
|
|
prefs_help_func,
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_DIALOG,
|
2000-01-26 07:05:47 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
|
|
|
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
2002-11-21 03:45:03 +08:00
|
|
|
|
|
|
|
NULL);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-11-06 23:27:05 +08:00
|
|
|
g_signal_connect (dialog, "response",
|
|
|
|
G_CALLBACK (prefs_response),
|
|
|
|
dialog);
|
|
|
|
|
1999-03-28 02:16:30 +08:00
|
|
|
/* The main hbox */
|
2003-06-11 23:01:38 +08:00
|
|
|
hbox = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
2002-11-21 03:45:03 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
|
1999-03-28 02:16:30 +08:00
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
/* The categories tree */
|
2001-09-28 20:55:25 +08:00
|
|
|
frame = gtk_frame_new (NULL);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
tree = gtk_tree_store_new (5,
|
|
|
|
GDK_TYPE_PIXBUF, G_TYPE_STRING,
|
|
|
|
G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_PIXBUF);
|
2001-09-27 13:50:59 +08:00
|
|
|
tv = gtk_tree_view_new_with_model (GTK_TREE_MODEL (tree));
|
2003-01-06 06:07:10 +08:00
|
|
|
g_object_unref (tree);
|
2001-09-27 13:50:59 +08:00
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tv), FALSE);
|
|
|
|
|
2002-03-19 05:25:17 +08:00
|
|
|
column = gtk_tree_view_column_new ();
|
2002-02-28 21:47:03 +08:00
|
|
|
|
2002-03-19 05:25:17 +08:00
|
|
|
cell = gtk_cell_renderer_pixbuf_new ();
|
|
|
|
gtk_tree_view_column_pack_start (column, cell, FALSE);
|
|
|
|
gtk_tree_view_column_set_attributes (column, cell, "pixbuf", 0, NULL);
|
|
|
|
|
|
|
|
cell = gtk_cell_renderer_text_new ();
|
|
|
|
gtk_tree_view_column_pack_start (column, cell, TRUE);
|
|
|
|
gtk_tree_view_column_set_attributes (column, cell, "text", 1, NULL);
|
|
|
|
|
|
|
|
gtk_tree_view_append_column (GTK_TREE_VIEW (tv), column);
|
2001-09-27 13:50:59 +08:00
|
|
|
|
2001-09-28 20:55:25 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (frame), tv);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
|
|
|
frame = gtk_frame_new (NULL);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
vbox = gtk_vbox_new (FALSE, 4);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
2002-09-17 21:10:56 +08:00
|
|
|
ebox = gtk_event_box_new ();
|
|
|
|
gtk_widget_set_state (ebox, GTK_STATE_PRELIGHT);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), ebox, FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (ebox);
|
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
frame = gtk_frame_new (NULL);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
2002-09-17 21:10:56 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (ebox), frame);
|
2002-03-01 02:34:41 +08:00
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
label = gtk_label_new (NULL);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
2002-03-12 04:23:26 +08:00
|
|
|
attrs = pango_attr_list_new ();
|
2002-09-17 21:10:56 +08:00
|
|
|
|
2003-07-16 01:35:08 +08:00
|
|
|
attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
|
2002-03-12 04:23:26 +08:00
|
|
|
attr->start_index = 0;
|
|
|
|
attr->end_index = -1;
|
|
|
|
pango_attr_list_insert (attrs, attr);
|
2002-09-17 21:10:56 +08:00
|
|
|
|
|
|
|
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
|
|
|
attr->start_index = 0;
|
|
|
|
attr->end_index = -1;
|
|
|
|
pango_attr_list_insert (attrs, attr);
|
|
|
|
|
2002-03-12 04:23:26 +08:00
|
|
|
gtk_label_set_attributes (GTK_LABEL (label), attrs);
|
|
|
|
pango_attr_list_unref (attrs);
|
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
image = gtk_image_new ();
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (image);
|
|
|
|
|
|
|
|
/* The main preferences notebook */
|
1999-03-28 02:16:30 +08:00
|
|
|
notebook = gtk_notebook_new ();
|
|
|
|
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
|
|
|
|
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
|
2002-11-23 06:10:40 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
g_object_set_data (G_OBJECT (dialog), "notebook", notebook);
|
1999-12-18 19:37:11 +08:00
|
|
|
|
2002-03-01 02:34:41 +08:00
|
|
|
g_object_set_data (G_OBJECT (notebook), "label", label);
|
|
|
|
g_object_set_data (G_OBJECT (notebook), "image", image);
|
|
|
|
|
2001-09-27 13:50:59 +08:00
|
|
|
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv));
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect (sel, "changed",
|
2001-07-25 08:42:47 +08:00
|
|
|
G_CALLBACK (prefs_tree_select_callback),
|
2001-09-27 13:50:59 +08:00
|
|
|
notebook);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
|
|
|
page_index = 0;
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
/***************/
|
|
|
|
/* New Image */
|
|
|
|
/***************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-10-15 19:04:31 +08:00
|
|
|
_("New Image"),
|
2002-02-28 21:47:03 +08:00
|
|
|
"new-image.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2002-02-28 21:47:03 +08:00
|
|
|
_("New Image"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_NEW_IMAGE,
|
2001-09-27 13:50:59 +08:00
|
|
|
NULL,
|
|
|
|
&top_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
|
|
|
/* select this page in the tree */
|
2001-09-27 13:50:59 +08:00
|
|
|
gtk_tree_selection_select_iter (sel, &top_iter);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox), TRUE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
{
|
|
|
|
GtkWidget *optionmenu;
|
|
|
|
GtkWidget *menu;
|
2000-02-04 12:31:18 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
optionmenu = gtk_option_menu_new ();
|
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
|
|
|
_("From _Template:"), 1.0, 0.5,
|
|
|
|
optionmenu, 1, FALSE);
|
1999-05-31 22:11:10 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
menu = gimp_container_menu_new (gimp->templates, NULL, 16, 0);
|
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
|
|
|
gtk_widget_show (menu);
|
2002-11-21 23:46:19 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
gimp_container_menu_select_item (GIMP_CONTAINER_MENU (menu), NULL);
|
1999-05-31 22:11:10 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
g_signal_connect (menu, "select_item",
|
|
|
|
G_CALLBACK (prefs_template_select_callback),
|
|
|
|
core_config->default_image);
|
|
|
|
}
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
editor = gimp_template_editor_new (core_config->default_image, gimp, FALSE);
|
2003-11-22 08:01:49 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
|
2003-10-14 23:20:59 +08:00
|
|
|
gtk_widget_show (editor);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox), TRUE);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_memsize_entry_add (object, "max-new-image-size",
|
2003-11-14 21:41:16 +08:00
|
|
|
_("Maximum New Image Size:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 1);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2004-01-08 20:29:12 +08:00
|
|
|
/******************/
|
|
|
|
/* Default Grid */
|
|
|
|
/******************/
|
2003-10-10 22:11:47 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-10-15 07:41:58 +08:00
|
|
|
_("Default Image Grid"),
|
2003-10-10 22:11:47 +08:00
|
|
|
"default-grid.png",
|
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Default Grid"),
|
2004-01-28 19:06:34 +08:00
|
|
|
GIMP_HELP_PREFS_DEFAULT_GRID,
|
2004-01-08 20:29:12 +08:00
|
|
|
NULL,
|
2003-10-10 22:11:47 +08:00
|
|
|
&top_iter,
|
|
|
|
page_index++);
|
|
|
|
|
|
|
|
/* Grid */
|
|
|
|
editor = gimp_grid_editor_new (core_config->default_grid,
|
2003-10-14 23:20:59 +08:00
|
|
|
core_config->default_image->xresolution,
|
|
|
|
core_config->default_image->yresolution);
|
2003-10-10 22:11:47 +08:00
|
|
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (vbox), editor);
|
|
|
|
gtk_widget_show (editor);
|
|
|
|
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
/***************/
|
|
|
|
/* Interface */
|
|
|
|
/***************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-10-15 07:41:58 +08:00
|
|
|
_("User Interface"),
|
2002-02-28 21:47:03 +08:00
|
|
|
"interface.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2001-01-02 10:33:43 +08:00
|
|
|
_("Interface"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_INTERFACE,
|
2001-01-02 10:33:43 +08:00
|
|
|
NULL,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-07-18 06:30:13 +08:00
|
|
|
/* Previews */
|
2003-04-08 18:02:42 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Previews"), GTK_CONTAINER (vbox), FALSE);
|
2003-03-07 00:47:34 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "layer-previews",
|
2003-03-07 00:47:34 +08:00
|
|
|
_("_Enable Layer & Channel Previews"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
2003-04-08 18:02:42 +08:00
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "layer-preview-size", 0, 0,
|
2004-02-11 04:28:41 +08:00
|
|
|
_("Default _Layer & Channel Preview Size:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 0);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "navigation-preview-size", 0, 0,
|
2004-02-11 04:28:41 +08:00
|
|
|
_("Default _Navigation Preview Size:"),
|
2002-11-22 01:17:03 +08:00
|
|
|
GTK_TABLE (table), 1);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-03-04 23:12:27 +08:00
|
|
|
/* Dialog Bahavior */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Dialog Behavior"), GTK_CONTAINER (vbox), FALSE);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "info-window-per-display",
|
2002-11-21 23:46:19 +08:00
|
|
|
_("_Info Window Per Display"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_BOX (vbox2));
|
1999-11-20 22:27:07 +08:00
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
/* Menus */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Menus"), GTK_CONTAINER (vbox), FALSE);
|
1999-11-20 22:27:07 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "tearoff-menus",
|
2002-12-11 00:38:16 +08:00
|
|
|
_("Enable _Tearoff Menus"),
|
|
|
|
GTK_BOX (vbox2));
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-04-08 18:02:42 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_spin_button_add (object, "last-opened-size", 1.0, 5.0, 0,
|
2003-04-08 18:02:42 +08:00
|
|
|
_("Open _Recent Menu Size:"),
|
|
|
|
GTK_TABLE (table), 3);
|
|
|
|
|
|
|
|
/* Keyboard Shortcuts */
|
|
|
|
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "can-change-accels",
|
2003-10-26 22:01:33 +08:00
|
|
|
_("Use Dynamic _Keyboard Shortcuts"),
|
2003-04-01 15:47:04 +08:00
|
|
|
GTK_BOX (vbox2));
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2003-11-12 07:56:00 +08:00
|
|
|
/* Themes */
|
2003-11-21 04:36:55 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Select Theme"), GTK_CONTAINER (vbox), TRUE);
|
2003-11-12 07:56:00 +08:00
|
|
|
|
|
|
|
{
|
2003-11-12 20:56:31 +08:00
|
|
|
GtkWidget *scrolled_win;
|
|
|
|
GtkListStore *list_store;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkTreeSelection *sel;
|
|
|
|
gchar **themes;
|
|
|
|
gint n_themes;
|
|
|
|
gint i;
|
2003-11-12 07:56:00 +08:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
2003-11-12 07:56:00 +08: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);
|
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
|
|
|
|
_("Theme"),
|
|
|
|
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);
|
2003-11-12 07:56:00 +08:00
|
|
|
|
|
|
|
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
|
|
|
|
|
|
|
|
themes = themes_list_themes (gimp, &n_themes);
|
|
|
|
|
|
|
|
for (i = 0; i < n_themes; i++)
|
|
|
|
{
|
2003-11-12 20:56:31 +08:00
|
|
|
GtkTreeIter iter;
|
|
|
|
|
2003-11-12 07:56:00 +08:00
|
|
|
gtk_list_store_append (list_store, &iter);
|
|
|
|
gtk_list_store_set (list_store, &iter,
|
|
|
|
0, themes[i],
|
2003-11-12 20:56:31 +08:00
|
|
|
1, themes_get_theme_dir (gimp, themes[i]),
|
2003-11-12 07:56:00 +08:00
|
|
|
-1);
|
|
|
|
|
|
|
|
if (GIMP_GUI_CONFIG (object)->theme &&
|
|
|
|
! strcmp (GIMP_GUI_CONFIG (object)->theme, themes[i]))
|
|
|
|
{
|
|
|
|
gtk_tree_selection_select_iter (sel, &iter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (themes)
|
|
|
|
g_strfreev (themes);
|
|
|
|
|
|
|
|
g_signal_connect (sel, "changed",
|
|
|
|
G_CALLBACK (prefs_theme_select_callback),
|
|
|
|
gimp);
|
|
|
|
}
|
|
|
|
|
2003-11-12 20:56:31 +08:00
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_mnemonic (_("Reload C_urrent Theme"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 4, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
G_CALLBACK (prefs_theme_reload_callback),
|
|
|
|
gimp);
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
/*****************************/
|
|
|
|
/* Interface / Help System */
|
|
|
|
/*****************************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-10-15 07:41:58 +08:00
|
|
|
_("Help System"),
|
2002-02-28 21:47:03 +08:00
|
|
|
"help-system.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2001-01-02 10:33:43 +08:00
|
|
|
_("Help System"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_HELP,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
|
|
|
&child_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* General */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "show-tool-tips",
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Show Tool _Tips"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_BOX (vbox2));
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "use-help",
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Context Sensitive _Help with \"F1\""),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_BOX (vbox2));
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "show-tips",
|
2002-11-23 02:06:36 +08:00
|
|
|
_("Show Tips on _Startup"),
|
|
|
|
GTK_BOX (vbox2));
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* Help Browser */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Help Browser"), GTK_CONTAINER (vbox), FALSE);
|
2002-02-28 21:47:03 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
1999-12-20 01:15:11 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "help-browser", 0, 0,
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Help _Browser to Use:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 0);
|
1999-12-20 01:15:11 +08:00
|
|
|
|
2003-10-26 22:01:33 +08:00
|
|
|
/* Web Browser */
|
|
|
|
vbox2 = prefs_frame_new (_("Web Browser"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
|
|
|
fileselection = gimp_prop_file_entry_new (object, "web-browser",
|
|
|
|
_("Select Web Browser"),
|
|
|
|
FALSE, FALSE);
|
|
|
|
|
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
|
|
|
_("Web Browser to Use:"), 1.0, 0.5,
|
|
|
|
fileselection, 1, TRUE);
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
/******************************/
|
|
|
|
/* Interface / Tool Options */
|
|
|
|
/******************************/
|
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-10-15 07:41:58 +08:00
|
|
|
_("Tool Options"),
|
2002-03-01 00:55:38 +08:00
|
|
|
"tool-options.png",
|
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Tool Options"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_TOOL_OPTIONS,
|
2002-03-01 00:55:38 +08:00
|
|
|
&top_iter,
|
|
|
|
&child_iter,
|
|
|
|
page_index++);
|
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* Contiguous Regions */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Finding Contiguous Regions"),
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2002-03-01 00:55:38 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_spin_button_add (object, "default-threshold", 1.0, 5.0, 0,
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Default _Threshold:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 0);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* Scaling */
|
|
|
|
vbox2 = prefs_frame_new (_("Scaling"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), TRUE);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "interpolation-type", 0, 0,
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Default _Interpolation:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 0);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
/*******************************/
|
|
|
|
/* Interface / Input Devices */
|
|
|
|
/*******************************/
|
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
|
|
|
_("Input Devices"),
|
|
|
|
"input-devices.png",
|
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Input Devices"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_INPUT_DEVICES,
|
2002-03-01 00:55:38 +08:00
|
|
|
&top_iter,
|
|
|
|
&child_iter,
|
|
|
|
page_index++);
|
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* Input Device Settings */
|
2003-10-26 22:01:33 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Extended Input Devices"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
2003-04-14 22:15:20 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
2003-10-26 22:01:33 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
2003-04-14 22:15:20 +08:00
|
|
|
gtk_widget_show (hbox);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2003-10-26 22:01:33 +08:00
|
|
|
button = gtk_button_new_with_label (_("Configure Extended Input Devices"));
|
2003-04-14 22:15:20 +08:00
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (button);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2003-04-14 22:15:20 +08:00
|
|
|
g_signal_connect (button, "clicked",
|
|
|
|
G_CALLBACK (prefs_input_devices_dialog),
|
|
|
|
NULL);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
/*******************************/
|
|
|
|
/* Interface / Image Windows */
|
|
|
|
/*******************************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2001-01-02 10:33:43 +08:00
|
|
|
_("Image Windows"),
|
2002-02-28 21:47:03 +08:00
|
|
|
"image-windows.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2001-01-02 10:33:43 +08:00
|
|
|
_("Image Windows"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
|
|
|
&child_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-07-18 06:30:13 +08:00
|
|
|
/* General */
|
|
|
|
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "default-dot-for-dot",
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Use \"_Dot for Dot\" by default"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_BOX (vbox2));
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-07-18 06:30:13 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_spin_button_add (object, "marching-ants-speed", 10.0, 100.0, 0,
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Marching _Ants Speed:"),
|
2003-07-18 06:30:13 +08:00
|
|
|
GTK_TABLE (table), 0);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-03-04 23:12:27 +08:00
|
|
|
/* Zoom & Resize Behavior */
|
|
|
|
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
|
2002-12-14 22:13:54 +08:00
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "resize-windows-on-zoom",
|
2002-12-14 22:13:54 +08:00
|
|
|
_("Resize Window on _Zoom"),
|
|
|
|
GTK_BOX (vbox2));
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "resize-windows-on-resize",
|
2002-12-14 22:13:54 +08:00
|
|
|
_("Resize Window on Image _Size Change"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
2003-07-18 06:30:13 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_boolean_option_menu_add (object, "initial-zoom-to-fit",
|
2003-07-18 06:30:13 +08:00
|
|
|
_("Fit to Window"),
|
|
|
|
"1:1",
|
|
|
|
_("Inital Zoom Ratio:"),
|
|
|
|
GTK_TABLE (table), 0);
|
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* Pointer Movement Feedback */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"),
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "show-brush-outline",
|
2003-08-20 01:20:05 +08:00
|
|
|
_("Show _Brush Outline"),
|
|
|
|
GTK_BOX (vbox2));
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "perfect-mouse",
|
2002-11-23 06:10:40 +08:00
|
|
|
_("Perfect-but-Slow _Pointer Tracking"),
|
|
|
|
GTK_BOX (vbox2));
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "cursor-updating",
|
2002-11-23 06:10:40 +08:00
|
|
|
_("Enable Cursor _Updating"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "cursor-mode", 0, 0,
|
2002-11-23 06:10:40 +08:00
|
|
|
_("Cursor M_ode:"),
|
|
|
|
GTK_TABLE (table), 0);
|
|
|
|
|
|
|
|
|
2003-07-18 06:30:13 +08:00
|
|
|
/********************************************/
|
|
|
|
/* Interface / Image Windows / Appearance */
|
|
|
|
/********************************************/
|
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
|
|
|
_("Image Window Appearance"),
|
|
|
|
"image-windows.png",
|
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Appearance"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW_APPEARANCE,
|
2003-07-18 06:30:13 +08:00
|
|
|
&child_iter,
|
|
|
|
&grandchild_iter,
|
|
|
|
page_index++);
|
|
|
|
|
2003-10-22 22:46:05 +08:00
|
|
|
prefs_display_options_frame_add (gimp,
|
|
|
|
G_OBJECT (display_config->default_view),
|
|
|
|
_("Default Appearance in Normal Mode"),
|
|
|
|
GTK_CONTAINER (vbox));
|
2003-07-18 06:30:13 +08:00
|
|
|
|
2003-10-22 22:46:05 +08:00
|
|
|
prefs_display_options_frame_add (gimp,
|
|
|
|
G_OBJECT (display_config->default_fullscreen_view),
|
|
|
|
_("Default Appearance in Fullscreen Mode"),
|
|
|
|
GTK_CONTAINER (vbox));
|
2003-07-18 06:30:13 +08:00
|
|
|
|
|
|
|
|
2002-12-04 06:16:56 +08:00
|
|
|
/****************************************************************/
|
|
|
|
/* Interface / Image Windows / Image Title & Statusbar Format */
|
|
|
|
/****************************************************************/
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
|
|
|
_("Image Title & Statusbar Format"),
|
2002-11-24 08:03:42 +08:00
|
|
|
"image-title.png",
|
2002-11-23 06:10:40 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Title & Status"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_IMAGE_WINDOW_TITLE,
|
2002-11-23 06:10:40 +08:00
|
|
|
&child_iter,
|
|
|
|
&grandchild_iter,
|
|
|
|
page_index++);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
const gchar *format_strings[] =
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
"%f-%p.%i (%t)",
|
|
|
|
"%f-%p.%i (%t) %z%%",
|
|
|
|
"%f-%p.%i (%t) %d:%s",
|
2002-02-07 19:33:01 +08:00
|
|
|
"%f-%p.%i (%t) %s:%d",
|
|
|
|
"%f-%p.%i (%t) %m"
|
2001-12-08 01:39:51 +08:00
|
|
|
};
|
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
const gchar *format_names[] =
|
2001-12-08 01:39:51 +08:00
|
|
|
{
|
|
|
|
N_("Custom"),
|
|
|
|
N_("Standard"),
|
|
|
|
N_("Show zoom percentage"),
|
|
|
|
N_("Show zoom ratio"),
|
2002-02-07 19:33:01 +08:00
|
|
|
N_("Show reversed zoom ratio"),
|
|
|
|
N_("Show memory usage")
|
2001-12-08 01:39:51 +08:00
|
|
|
};
|
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
struct
|
2002-11-23 06:10:40 +08:00
|
|
|
{
|
2002-11-24 06:22:21 +08:00
|
|
|
gchar *current_setting;
|
|
|
|
const gchar *title;
|
|
|
|
const gchar *property_name;
|
|
|
|
}
|
|
|
|
formats[] =
|
2002-11-23 06:10:40 +08:00
|
|
|
{
|
2003-08-20 17:59:12 +08:00
|
|
|
{ NULL, N_("Image Title Format"), "image-title-format" },
|
|
|
|
{ NULL, N_("Image Statusbar Format"), "image-status-format" }
|
2002-11-23 06:10:40 +08:00
|
|
|
};
|
2002-02-12 06:39:08 +08:00
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
gint format;
|
2002-02-12 06:39:08 +08:00
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
|
2002-02-12 06:39:08 +08:00
|
|
|
|
2003-08-20 17:59:12 +08:00
|
|
|
formats[0].current_setting = display_config->image_title_format;
|
|
|
|
formats[1].current_setting = display_config->image_status_format;
|
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
for (format = 0; format < G_N_ELEMENTS (formats); format++)
|
2002-02-12 06:39:08 +08:00
|
|
|
{
|
2003-11-12 20:56:31 +08:00
|
|
|
GtkWidget *scrolled_win;
|
|
|
|
GtkListStore *list_store;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *entry;
|
|
|
|
GtkTreeSelection *sel;
|
|
|
|
gint i;
|
2002-11-23 06:10:40 +08:00
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
format_strings[0] = formats[format].current_setting;
|
2002-11-23 06:10:40 +08:00
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
vbox2 = prefs_frame_new (gettext (formats[format].title),
|
|
|
|
GTK_CONTAINER (vbox), TRUE);
|
2002-11-23 06:10:40 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
entry = gimp_prop_entry_new (object, formats[format].property_name, 0);
|
2002-11-23 06:10:40 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), entry, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (entry);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
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_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolled_win), view);
|
|
|
|
gtk_widget_show (view);
|
|
|
|
|
|
|
|
g_object_unref (list_store);
|
|
|
|
|
2003-11-12 20:56:31 +08: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);
|
2002-11-23 06:10:40 +08:00
|
|
|
|
|
|
|
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (format_strings); i++)
|
|
|
|
{
|
2003-11-12 20:56:31 +08:00
|
|
|
GtkTreeIter iter;
|
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
gtk_list_store_append (list_store, &iter);
|
|
|
|
gtk_list_store_set (list_store, &iter,
|
|
|
|
0, format_names[i],
|
|
|
|
1, format_strings[i],
|
|
|
|
-1);
|
|
|
|
|
|
|
|
if (i == 0)
|
|
|
|
gtk_tree_selection_select_iter (sel, &iter);
|
|
|
|
}
|
2003-11-12 20:56:31 +08:00
|
|
|
|
|
|
|
g_signal_connect (sel, "changed",
|
|
|
|
G_CALLBACK (prefs_format_string_select_callback),
|
|
|
|
entry);
|
2002-02-12 06:39:08 +08:00
|
|
|
}
|
2001-12-08 01:39:51 +08:00
|
|
|
}
|
2000-06-06 08:28:28 +08:00
|
|
|
|
2000-01-16 02:13:13 +08:00
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
/*************************/
|
|
|
|
/* Interface / Display */
|
|
|
|
/*************************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2002-03-01 00:55:38 +08:00
|
|
|
_("Display"),
|
|
|
|
"display.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2002-03-01 00:55:38 +08:00
|
|
|
_("Display"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_DISPLAY,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
|
|
|
&child_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
1999-04-22 22:34:00 +08:00
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* Transparency */
|
|
|
|
vbox2 = prefs_frame_new (_("Transparency"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2), TRUE);
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "transparency-type", 0, 0,
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Transparency _Type:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 0);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "transparency-size", 0, 0,
|
2002-11-21 23:46:19 +08:00
|
|
|
_("Check _Size:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 1);
|
1999-09-24 04:21:15 +08:00
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* 8-Bit Displays */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("8-Bit Displays"), GTK_CONTAINER (vbox), FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-30 04:57:21 +08:00
|
|
|
/* disabling this entry is not multi-head safe */
|
|
|
|
#if 0
|
2002-03-01 00:55:38 +08:00
|
|
|
if (gdk_rgb_get_visual ()->depth != 8)
|
|
|
|
gtk_widget_set_sensitive (GTK_WIDGET (vbox2->parent), FALSE);
|
2003-10-30 04:57:21 +08:00
|
|
|
#endif
|
2001-07-25 08:42:47 +08:00
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
table = prefs_table_new (1, GTK_CONTAINER (vbox2), FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_spin_button_add (object, "min-colors", 1.0, 8.0, 0,
|
2002-11-21 03:45:03 +08:00
|
|
|
_("Minimum Number of Colors:"),
|
|
|
|
GTK_TABLE (table), 0);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_check_button_add (object, "install-colormap",
|
2002-11-21 03:45:03 +08:00
|
|
|
_("Install Colormap"),
|
|
|
|
GTK_BOX (vbox2));
|
2001-07-25 08:42:47 +08:00
|
|
|
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
/*************************/
|
|
|
|
/* Interface / Monitor */
|
|
|
|
/*************************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-10-15 07:41:58 +08:00
|
|
|
_("Monitor Resolution"),
|
2002-02-28 21:47:03 +08:00
|
|
|
"monitor.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2001-01-02 10:33:43 +08:00
|
|
|
_("Monitor"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_MONITOR,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
2002-03-01 00:55:38 +08:00
|
|
|
&child_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Get Monitor Resolution"),
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
|
|
|
{
|
2000-03-15 07:06:21 +08:00
|
|
|
gdouble xres, yres;
|
|
|
|
gchar *str;
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-05-29 19:34:30 +08:00
|
|
|
gimp_get_screen_resolution (NULL, &xres, &yres);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2000-03-15 07:06:21 +08:00
|
|
|
str = g_strdup_printf (_("(Currently %d x %d dpi)"),
|
|
|
|
ROUND (xres), ROUND (yres));
|
|
|
|
label = gtk_label_new (str);
|
|
|
|
g_free (str);
|
1999-03-28 02:16:30 +08:00
|
|
|
}
|
|
|
|
|
1999-04-05 20:48:48 +08:00
|
|
|
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
{
|
|
|
|
gchar *pixels_per_unit = g_strconcat (_("Pixels"), "/%s", NULL);
|
|
|
|
|
|
|
|
sizeentry = gimp_prop_coordinates_new (object,
|
|
|
|
"monitor-xresolution",
|
|
|
|
"monitor-yresolution",
|
|
|
|
NULL,
|
|
|
|
pixels_per_unit,
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION,
|
|
|
|
0.0, 0.0,
|
|
|
|
TRUE);
|
|
|
|
|
|
|
|
g_free (pixels_per_unit);
|
|
|
|
}
|
1999-05-31 22:11:10 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (sizeentry), 2);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (sizeentry), 2);
|
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry),
|
1999-03-28 02:16:30 +08:00
|
|
|
_("Horizontal"), 0, 1, 0.0);
|
1999-05-31 22:11:10 +08:00
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry),
|
1999-03-28 02:16:30 +08:00
|
|
|
_("Vertical"), 0, 2, 0.0);
|
1999-05-31 22:11:10 +08:00
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry),
|
1999-05-19 01:33:39 +08:00
|
|
|
_("dpi"), 1, 4, 0.0);
|
1999-05-31 22:11:10 +08:00
|
|
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (abox), sizeentry);
|
|
|
|
gtk_widget_show (sizeentry);
|
2002-11-21 03:45:03 +08:00
|
|
|
gtk_widget_set_sensitive (sizeentry, ! display_config->monitor_res_from_gdk);
|
2002-11-21 23:46:19 +08:00
|
|
|
|
2000-09-25 09:27:47 +08:00
|
|
|
hbox = gtk_hbox_new (FALSE, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
2003-07-18 06:30:13 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate"));
|
2000-09-25 09:27:47 +08:00
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (calibrate_button)->child), 4, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (calibrate_button);
|
2002-11-21 03:45:03 +08:00
|
|
|
gtk_widget_set_sensitive (calibrate_button,
|
|
|
|
! display_config->monitor_res_from_gdk);
|
2000-09-25 09:27:47 +08:00
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect (calibrate_button, "clicked",
|
2001-07-25 08:42:47 +08:00
|
|
|
G_CALLBACK (prefs_resolution_calibrate_callback),
|
|
|
|
sizeentry);
|
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
group = NULL;
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
button = gtk_radio_button_new_with_mnemonic (group,
|
|
|
|
_("From _Windowing System"));
|
2001-12-08 01:39:51 +08:00
|
|
|
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
2002-11-21 03:45:03 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
2001-08-01 08:35:59 +08:00
|
|
|
g_object_set_data (G_OBJECT (button), "monitor_resolution_sizeentry",
|
|
|
|
sizeentry);
|
|
|
|
g_object_set_data (G_OBJECT (button), "set_sensitive",
|
|
|
|
label);
|
|
|
|
g_object_set_data (G_OBJECT (button), "inverse_sensitive",
|
|
|
|
sizeentry);
|
|
|
|
g_object_set_data (G_OBJECT (sizeentry), "inverse_sensitive",
|
|
|
|
calibrate_button);
|
2002-11-21 03:45:03 +08:00
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect (button, "toggled",
|
2003-10-14 23:20:59 +08:00
|
|
|
G_CALLBACK (prefs_resolution_source_callback),
|
2002-11-21 03:45:03 +08:00
|
|
|
config);
|
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (label);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2000-09-25 09:27:47 +08:00
|
|
|
separator = gtk_hseparator_new ();
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), separator, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (separator);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2002-11-21 23:46:19 +08:00
|
|
|
button = gtk_radio_button_new_with_mnemonic (group, _("_Manually"));
|
2001-12-08 01:39:51 +08:00
|
|
|
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
1999-05-31 22:11:10 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (button);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), abox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (abox);
|
2001-12-08 01:39:51 +08:00
|
|
|
|
2000-09-25 09:27:47 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
2001-12-08 01:39:51 +08:00
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
if (! display_config->monitor_res_from_gdk)
|
1999-05-31 22:11:10 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
|
2003-11-22 02:39:52 +08:00
|
|
|
/***********************/
|
|
|
|
/* Window Management */
|
|
|
|
/***********************/
|
2003-11-21 07:02:54 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2003-11-22 02:39:52 +08:00
|
|
|
_("Window Management"),
|
|
|
|
"window-management.png",
|
2003-11-21 07:02:54 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2003-11-22 02:39:52 +08:00
|
|
|
_("Window Management"),
|
|
|
|
GIMP_HELP_PREFS_WINDOW_MANAGEMENT,
|
2003-11-21 07:02:54 +08:00
|
|
|
NULL,
|
|
|
|
&top_iter,
|
|
|
|
page_index++);
|
|
|
|
|
2003-11-22 02:39:52 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Window Type Hints"),
|
2003-11-21 07:02:54 +08:00
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
|
|
|
|
2004-01-18 21:38:24 +08:00
|
|
|
prefs_enum_option_menu_add (object, "toolbox-window-hint", 0, 0,
|
2003-11-21 07:02:54 +08:00
|
|
|
_("Window Type Hint for the _Toolbox:"),
|
|
|
|
GTK_TABLE (table), 0);
|
|
|
|
|
2004-01-18 21:38:24 +08:00
|
|
|
prefs_enum_option_menu_add (object, "dock-window-hint", 0, 0,
|
2003-11-21 07:02:54 +08:00
|
|
|
_("Window Type Hint for the _Docks:"),
|
|
|
|
GTK_TABLE (table), 1);
|
|
|
|
|
|
|
|
vbox2 = prefs_frame_new (_("Focus"),
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "activate-on-focus",
|
|
|
|
_("Activate the _Focused Image"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
/*****************/
|
|
|
|
/* Environment */
|
|
|
|
/*****************/
|
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
|
|
|
_("Environment"),
|
|
|
|
"environment.png",
|
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Environment"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_ENVIRONMENT,
|
2002-03-01 00:55:38 +08:00
|
|
|
NULL,
|
|
|
|
&top_iter,
|
|
|
|
page_index++);
|
|
|
|
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("Resource Consumption"),
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
#ifdef ENABLE_MP
|
2003-02-13 01:11:34 +08:00
|
|
|
table = prefs_table_new (4, GTK_CONTAINER (vbox2), FALSE);
|
2002-03-01 00:55:38 +08:00
|
|
|
#else
|
2003-02-13 01:11:34 +08:00
|
|
|
table = prefs_table_new (3, GTK_CONTAINER (vbox2), FALSE);
|
2002-03-01 00:55:38 +08:00
|
|
|
#endif /* ENABLE_MP */
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_spin_button_add (object, "undo-levels", 1.0, 5.0, 0,
|
2003-02-25 10:46:44 +08:00
|
|
|
_("Minimal Number of Undo Levels:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 0);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_memsize_entry_add (object, "undo-size",
|
2003-02-13 01:11:34 +08:00
|
|
|
_("Maximum Undo Memory:"),
|
|
|
|
GTK_TABLE (table), 1);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_memsize_entry_add (object, "tile-cache-size",
|
2002-11-21 03:45:03 +08:00
|
|
|
_("Tile Cache Size:"),
|
2003-02-13 01:11:34 +08:00
|
|
|
GTK_TABLE (table), 2);
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
#ifdef ENABLE_MP
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
|
2002-11-21 03:45:03 +08:00
|
|
|
_("Number of Processors to Use:"),
|
2003-02-13 01:11:34 +08:00
|
|
|
GTK_TABLE (table), 3);
|
2002-03-01 00:55:38 +08:00
|
|
|
#endif /* ENABLE_MP */
|
|
|
|
|
2003-10-15 07:41:58 +08:00
|
|
|
/* Resource Consumption */
|
|
|
|
prefs_check_button_add (object, "stingy-memory-use",
|
|
|
|
_("Conservative Memory Usage"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
2002-11-24 08:03:42 +08:00
|
|
|
/* File Saving */
|
2002-11-23 06:10:40 +08:00
|
|
|
vbox2 = prefs_frame_new (_("File Saving"), GTK_CONTAINER (vbox), FALSE);
|
2003-11-15 21:08:41 +08:00
|
|
|
|
|
|
|
prefs_check_button_add (object, "confirm-on-close",
|
|
|
|
_("Confirm Closing of Unsaved Images"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
table = prefs_table_new (2, GTK_CONTAINER (vbox2), TRUE);
|
|
|
|
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_boolean_option_menu_add (object, "trust-dirty-flag",
|
2002-11-21 03:45:03 +08:00
|
|
|
_("Only when Modified"),
|
|
|
|
_("Always"),
|
|
|
|
_("\"File -> Save\" Saves the Image:"),
|
|
|
|
GTK_TABLE (table), 0);
|
2003-10-11 22:30:18 +08:00
|
|
|
prefs_enum_option_menu_add (object, "thumbnail-size", 0, 0,
|
2003-03-04 23:12:27 +08:00
|
|
|
_("Size of Thumbnail Files:"),
|
2002-11-21 03:45:03 +08:00
|
|
|
GTK_TABLE (table), 1);
|
2003-09-23 04:04:39 +08:00
|
|
|
|
|
|
|
|
2003-10-26 22:01:33 +08:00
|
|
|
/************************/
|
|
|
|
/* Session Management */
|
|
|
|
/************************/
|
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
|
|
|
_("Session Management"),
|
|
|
|
"session.png",
|
|
|
|
GTK_TREE_STORE (tree),
|
|
|
|
_("Session"),
|
|
|
|
GIMP_HELP_PREFS_SESSION,
|
|
|
|
NULL,
|
|
|
|
&top_iter,
|
|
|
|
page_index++);
|
2003-09-23 04:04:39 +08:00
|
|
|
|
2003-10-26 22:01:33 +08:00
|
|
|
/* 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-session",
|
|
|
|
_("R_estore Saved Window Positions on Start-up"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_label (_("Save Window Positions Now"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (button, "clicked",
|
|
|
|
G_CALLBACK (session_save),
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_label (_("Clear Saved Window Positions Now"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (button, "clicked",
|
|
|
|
G_CALLBACK (session_clear),
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
/* Keyboard Shortcuts */
|
|
|
|
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "save-accels",
|
|
|
|
_("Save Keyboard Shortcuts on Exit"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
prefs_check_button_add (object, "restore-accels",
|
|
|
|
_("Restore Saved Keyboard Shortcuts on Start-up"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_label (_("Save Keyboard Shortcuts Now"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (button, "clicked",
|
|
|
|
G_CALLBACK (menus_save),
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_label (_("Clear Saved Keyboard Shortcuts Now"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (button, "clicked",
|
|
|
|
G_CALLBACK (menus_clear),
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
/* Input Devices */
|
|
|
|
vbox2 = prefs_frame_new (_("Input Devices"), GTK_CONTAINER (vbox), FALSE);
|
|
|
|
|
|
|
|
prefs_check_button_add (object, "save-device-status",
|
|
|
|
_("Save Input Device Settings on Exit"),
|
|
|
|
GTK_BOX (vbox2));
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 4);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_label (_("Save Input Device Settings Now"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (button, "clicked",
|
|
|
|
G_CALLBACK (gimp_devices_save),
|
|
|
|
gimp);
|
|
|
|
|
|
|
|
button = gtk_button_new_with_label (_("Clear Saved Input Device Settings Now"));
|
|
|
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
g_signal_connect_swapped (button, "clicked",
|
|
|
|
G_CALLBACK (gimp_devices_clear),
|
|
|
|
gimp);
|
2003-09-23 04:04:39 +08:00
|
|
|
|
2002-03-01 00:55:38 +08:00
|
|
|
|
|
|
|
/*************/
|
|
|
|
/* Folders */
|
|
|
|
/*************/
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2002-02-12 06:30:45 +08:00
|
|
|
_("Folders"),
|
2002-02-28 21:47:03 +08:00
|
|
|
"folders.png",
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2002-02-12 06:30:45 +08:00
|
|
|
_("Folders"),
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS,
|
2001-01-02 10:33:43 +08:00
|
|
|
NULL,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
2001-12-08 01:39:51 +08:00
|
|
|
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
1999-11-27 21:44:54 +08:00
|
|
|
static const struct
|
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
const gchar *label;
|
|
|
|
const gchar *fs_label;
|
|
|
|
const gchar *property_name;
|
1999-11-27 21:44:54 +08:00
|
|
|
}
|
|
|
|
dirs[] =
|
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
{ N_("Temp Dir:"), N_("Select Temp Dir"), "temp-path" },
|
|
|
|
{ N_("Swap Dir:"), N_("Select Swap Dir"), "swap-path" },
|
1999-03-28 02:16:30 +08:00
|
|
|
};
|
2001-12-08 01:39:51 +08:00
|
|
|
|
2002-02-28 21:47:03 +08:00
|
|
|
table = prefs_table_new (G_N_ELEMENTS (dirs) + 1,
|
|
|
|
GTK_CONTAINER (vbox), FALSE);
|
2001-12-08 01:39:51 +08:00
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
2003-10-11 22:30:18 +08:00
|
|
|
fileselection = gimp_prop_file_entry_new (object, dirs[i].property_name,
|
2002-11-21 03:45:03 +08:00
|
|
|
gettext (dirs[i].fs_label),
|
|
|
|
TRUE, TRUE);
|
2000-01-31 11:13:02 +08:00
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, i,
|
2001-12-08 01:39:51 +08:00
|
|
|
gettext (dirs[i].label), 1.0, 0.5,
|
2000-01-31 11:13:02 +08:00
|
|
|
fileselection, 1, FALSE);
|
1999-03-28 02:16:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-11-24 06:22:21 +08:00
|
|
|
|
|
|
|
/*********************/
|
2002-02-12 06:30:45 +08:00
|
|
|
/* Folders / <paths> */
|
2002-11-24 06:22:21 +08:00
|
|
|
/*********************/
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
1999-11-27 21:44:54 +08:00
|
|
|
static const struct
|
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
const gchar *tree_label;
|
|
|
|
const gchar *label;
|
|
|
|
const gchar *icon;
|
|
|
|
const gchar *help_data;
|
|
|
|
const gchar *fs_label;
|
2004-01-29 05:53:50 +08:00
|
|
|
const gchar *path_property_name;
|
|
|
|
const gchar *writable_property_name;
|
1999-11-27 21:44:54 +08:00
|
|
|
}
|
|
|
|
paths[] =
|
|
|
|
{
|
2002-03-01 21:34:09 +08:00
|
|
|
{ N_("Brushes"), N_("Brush Folders"), "folders-brushes.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_BRUSHES,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Brush Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"brush-path", "brush-path-writable" },
|
2002-03-01 21:34:09 +08:00
|
|
|
{ N_("Patterns"), N_("Pattern Folders"), "folders-patterns.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_PATTERNS,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Pattern Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"pattern-path", "pattern-path-writable" },
|
2002-03-01 21:34:09 +08:00
|
|
|
{ N_("Palettes"), N_("Palette Folders"), "folders-palettes.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_PALETTES,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Palette Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"palette-path", "palette-path-writable" },
|
2002-03-01 21:34:09 +08:00
|
|
|
{ N_("Gradients"), N_("Gradient Folders"), "folders-gradients.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_GRADIENTS,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Gradient Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"gradient-path", "gradient-path-writable" },
|
2003-09-02 02:20:56 +08:00
|
|
|
{ N_("Fonts"), N_("Font Folders"), "folders-fonts.png",
|
2004-01-28 19:06:34 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_FONTS,
|
2003-09-02 02:20:56 +08:00
|
|
|
N_("Select Font Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"font-path", "font-path-writable" },
|
2002-03-01 21:34:09 +08:00
|
|
|
{ N_("Plug-Ins"), N_("Plug-In Folders"), "folders-plug-ins.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_PLUG_INS,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Plug-In Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"plug-in-path", NULL },
|
2003-07-08 23:36:32 +08:00
|
|
|
{ N_("Scripts"), N_("Script-Fu Folders"), "folders-scripts.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_SCRIPTS,
|
2003-07-08 23:36:32 +08:00
|
|
|
N_("Select Script-Fu Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"script-fu-path", NULL },
|
2002-03-06 19:48:16 +08:00
|
|
|
{ N_("Modules"), N_("Module Folders"), "folders-modules.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_MODULES,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Module Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"module-path", NULL },
|
2002-11-12 11:34:11 +08:00
|
|
|
{ N_("Environment"), N_("Environment Folders"), "folders-environ.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_ENVIRONMENT,
|
2002-11-12 11:34:11 +08:00
|
|
|
N_("Select Environment Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"environ-path", NULL },
|
2002-03-06 19:48:16 +08:00
|
|
|
{ N_("Themes"), N_("Theme Folders"), "folders-themes.png",
|
2003-08-22 09:42:57 +08:00
|
|
|
GIMP_HELP_PREFS_FOLDERS_THEMES,
|
2002-02-12 06:30:45 +08:00
|
|
|
N_("Select Theme Folders"),
|
2004-01-29 05:53:50 +08:00
|
|
|
"theme-path", NULL }
|
1999-03-28 02:16:30 +08:00
|
|
|
};
|
2001-12-08 01:39:51 +08:00
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (paths); i++)
|
1999-03-28 02:16:30 +08:00
|
|
|
{
|
2002-02-28 21:47:03 +08:00
|
|
|
vbox = prefs_notebook_append_page (gimp,
|
|
|
|
GTK_NOTEBOOK (notebook),
|
2001-01-02 10:33:43 +08:00
|
|
|
gettext (paths[i].label),
|
2002-03-01 21:34:09 +08:00
|
|
|
paths[i].icon,
|
2001-09-27 13:50:59 +08:00
|
|
|
GTK_TREE_STORE (tree),
|
2001-01-02 10:33:43 +08:00
|
|
|
gettext (paths[i].tree_label),
|
|
|
|
paths[i].help_data,
|
2001-09-27 13:50:59 +08:00
|
|
|
&top_iter,
|
|
|
|
&child_iter,
|
2002-02-28 21:47:03 +08:00
|
|
|
page_index++);
|
1999-03-28 02:16:30 +08:00
|
|
|
|
2004-01-29 05:53:50 +08:00
|
|
|
patheditor = gimp_prop_path_editor_new (object,
|
|
|
|
paths[i].path_property_name,
|
|
|
|
paths[i].writable_property_name,
|
2002-11-21 03:45:03 +08:00
|
|
|
gettext (paths[i].fs_label));
|
1999-03-28 02:16:30 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (vbox), patheditor);
|
|
|
|
gtk_widget_show (patheditor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-09-27 13:50:59 +08:00
|
|
|
gtk_widget_show (tv);
|
1999-03-28 02:16:30 +08:00
|
|
|
gtk_widget_show (notebook);
|
1999-11-27 21:44:54 +08:00
|
|
|
|
2001-09-27 13:50:59 +08:00
|
|
|
gtk_tree_view_expand_all (GTK_TREE_VIEW (tv));
|
|
|
|
|
2002-11-21 03:45:03 +08:00
|
|
|
return dialog;
|
1998-06-09 05:53:45 +08:00
|
|
|
}
|