gimp/app/dialogs/preferences-dialog.c

3259 lines
121 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <string.h>
#include <gegl.h>
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 15:22:01 +00:00
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 13:58:46 +00:00
#include "libgimpbase/gimpbase.h"
2005-01-25 19:11:26 +00:00
#include "libgimpconfig/gimpconfig.h"
Makefile.am configure.in added the new library below. 2001-01-24 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool.in: added the new library below. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpchainbutton.[ch] * libgimpwidgets/gimpcolorarea.[ch] * libgimpwidgets/gimpcolorbutton.[ch] * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimphelpui.[ch] * libgimpwidgets/gimppatheditor.[ch] * libgimpwidgets/gimppixmap.[ch] * libgimpwidgets/gimpquerybox.[ch] * libgimpwidgets/gimpsizeentry.[ch] * libgimpwidgets/gimpunitmenu.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimpwidgets/gimpwidgets.def * libgimpwidgets/gimpwidgetstypes.h: new shared library. Currently there are some ugly dependencies into libgimp. These will be removed and go to a "libgimpglue" library which will be a library for functions which share a common interface between plug-ins and the app but have different implementations. Include "libgimp/gimpunit.h" from "libgimpwidgets/gimpwidgetstypes.h" to simulate this upcoming separation. * libgimp/Makefile.am * libgimp/gimpchainbutton.[ch] * libgimp/gimpcolorarea.[ch] * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimpfileselection.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimppixmap.[ch] * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: removed from here. * libgimp/gimpui.h * libgimp/gimpuitypes.h * libgimp/makefile.mingw.in * libgimp/makefile.msc: changed accordingly. * app/[all ui files] * app/pdb/palette_cmds.c * app/pdb/tools_cmds.c * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: #include "libgimpwidgets/gimpwidgets.h" and removed useless includes. * app/apptypes.h: #include "libgimpwidgets/gimpwidgetstypes.h" * app/Makefile.am * plug-ins/[all makefiles which link against libgimpui]: link against libgimpwidgets.la * po-libgimp/POTFILES.in: changed file locations.
2001-01-24 22:36:18 +00:00
#include "libgimpwidgets/gimpwidgets.h"
configure.in added new directory app/dialogs and link libappdialogs.c into 2004-09-13 Michael Natterer <mitch@gimp.org> * configure.in * app/Makefile.am: added new directory app/dialogs and link libappdialogs.c into the gimp binary. * app/gui/Makefile.am * app/gui/gui-types.h * app/gui/gui-vtable.c * app/gui/gui.c * app/gui/about-dialog.[ch] * app/gui/authors.h * app/gui/color-notebook.[ch] * app/gui/convert-dialog.[ch] * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.[ch] * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-open-location-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/grid-dialog.[ch] * app/gui/info-dialog.[ch] * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/offset-dialog.[ch] * app/gui/palette-import-dialog.[ch] * app/gui/preferences-dialog.[ch] * app/gui/quit-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/resolution-calibrate-dialog.[ch] * app/gui/stroke-dialog.[ch] * app/gui/tips-dialog.[ch] * app/gui/tips-parser.[ch] * app/gui/user-install-dialog.[ch]: removed these files... * app/dialogs/Makefile.am * app/dialogs/dialogs-types.h * app/dialogs/*.[ch]: ...and added them here. Changed some filenames like module-browser -> module-dialog. * app/app_procs.c * app/actions/actions-types.h * app/actions/actions.c * app/actions/dialogs-actions.c * app/actions/dialogs-commands.c * app/actions/dockable-commands.c * app/actions/drawable-commands.c * app/actions/edit-commands.c * app/actions/file-commands.c * app/actions/gradient-editor-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/select-commands.c * app/actions/templates-commands.c * app/actions/templates-commands.h * app/actions/vectors-commands.c * app/actions/view-commands.c * app/display/gimpdisplayshell-cursor.c * app/display/gimpdisplayshell-title.c * app/display/gimpdisplayshell.[ch] * app/tools/gimpcroptool.c * app/tools/gimpperspectivetool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptransformtool.[ch] * app/tools/gimpvectortool.c * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcolorpanel.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimptoolbox-color-area.c * menus/toolbox-menu.xml.in * tools/authorsgen/authorsgen.pl: changed accordingly.
2004-09-13 15:15:23 +00:00
#include "dialogs-types.h"
#include "config/gimprc.h"
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-04 19:31:35 +00:00
#include "core/gimp.h"
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
#include "core/gimptemplate.h"
#include "plug-in/gimppluginmanager.h"
#include "widgets/gimpaction-history.h"
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcontainercombobox.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpcontrollerlist.h"
#include "widgets/gimpdevices.h"
#include "widgets/gimpdialogfactory.h"
removed the grid parasite related functions from here ... 2003-10-10 Henrik Brix Andersen <brix@gimp.org> * app/core/gimpimage-grid.[ch]: removed the grid parasite related functions from here ... * app/core/gimpgrid.[ch]: ... and added them here. While I was at it I also changed PROP_TYPE to PROP_STYLE and added blurbs to the properties * app/xcf/xcf-load.c * app/display/gimpdisplayshell.c: changed accordingly * app/widgets/Makefile.am * po/POTFILES.in * app/widgets/widgets-types.h * app/widgets/gimpgrideditor.[ch]: added a new GimpGridEditor widget - with a work-around for the fact that gimp_prop_coordinated_new() doesn't accept boundaries * app/gui/grid-dialog.h * app/gui/grid-dialog.c (grid_dialog_new): use the new GimpGridEditor widget, take a GimpImage as function parameter, assume GimpImages always have a GimpGrid. This simplifies the grid dialog. * app/gui/image-commands.c (image_configure_grid_cmd_callback): changed accordingly * app/core/core-types.h: moved typedef GimpGrid from here ... * app/config/config-types.h: ... to here to be able to use it in GimpCoreConfig * app/config/gimprc-blurbs.h * app/config/gimpcoreconfig.[ch]: added default_grid member * app/widgets/gimphelp-ids.h * themes/Default/images/preferences/Makefile.am * themes/Default/images/default-grid.png * app/gui/preferences-dialog.c: added UI for specifying default image grid * app/core/gimpimage.c (gimp_image_new): create a GimpGrid from core_config->default_grid * app/gui/image-menu.c (image_menu_update): the grid/guide entries in <Image>/View/ should always be sensitive ... * app/display/gimpdisplayshell.c (gimp_display_shell_init): ... but the grid entries should be disabled by default
2003-10-10 14:11:47 +00:00
#include "widgets/gimpgrideditor.h"
#include "widgets/gimphelp.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpiconsizescale.h"
#include "widgets/gimplanguagecombobox.h"
#include "widgets/gimpmessagebox.h"
#include "widgets/gimpmessagedialog.h"
#include "widgets/gimppluginview.h"
#include "widgets/gimpprefsbox.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gimpstrokeeditor.h"
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
#include "widgets/gimptemplateeditor.h"
#include "widgets/gimptooleditor.h"
#include "widgets/gimpwidgets-utils.h"
#include "menus/menus.h"
#include "tools/gimp-tools.h"
configure.in added new directory app/dialogs and link libappdialogs.c into 2004-09-13 Michael Natterer <mitch@gimp.org> * configure.in * app/Makefile.am: added new directory app/dialogs and link libappdialogs.c into the gimp binary. * app/gui/Makefile.am * app/gui/gui-types.h * app/gui/gui-vtable.c * app/gui/gui.c * app/gui/about-dialog.[ch] * app/gui/authors.h * app/gui/color-notebook.[ch] * app/gui/convert-dialog.[ch] * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.[ch] * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-open-location-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/grid-dialog.[ch] * app/gui/info-dialog.[ch] * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/offset-dialog.[ch] * app/gui/palette-import-dialog.[ch] * app/gui/preferences-dialog.[ch] * app/gui/quit-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/resolution-calibrate-dialog.[ch] * app/gui/stroke-dialog.[ch] * app/gui/tips-dialog.[ch] * app/gui/tips-parser.[ch] * app/gui/user-install-dialog.[ch]: removed these files... * app/dialogs/Makefile.am * app/dialogs/dialogs-types.h * app/dialogs/*.[ch]: ...and added them here. Changed some filenames like module-browser -> module-dialog. * app/app_procs.c * app/actions/actions-types.h * app/actions/actions.c * app/actions/dialogs-actions.c * app/actions/dialogs-commands.c * app/actions/dockable-commands.c * app/actions/drawable-commands.c * app/actions/edit-commands.c * app/actions/file-commands.c * app/actions/gradient-editor-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/select-commands.c * app/actions/templates-commands.c * app/actions/templates-commands.h * app/actions/vectors-commands.c * app/actions/view-commands.c * app/display/gimpdisplayshell-cursor.c * app/display/gimpdisplayshell-title.c * app/display/gimpdisplayshell.[ch] * app/tools/gimpcroptool.c * app/tools/gimpperspectivetool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptransformtool.[ch] * app/tools/gimpvectortool.c * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcolorpanel.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimptoolbox-color-area.c * menus/toolbox-menu.xml.in * tools/authorsgen/authorsgen.pl: changed accordingly.
2004-09-13 15:15:23 +00:00
#include "gui/session.h"
#include "gui/icon-themes.h"
configure.in added new directory app/dialogs and link libappdialogs.c into 2004-09-13 Michael Natterer <mitch@gimp.org> * configure.in * app/Makefile.am: added new directory app/dialogs and link libappdialogs.c into the gimp binary. * app/gui/Makefile.am * app/gui/gui-types.h * app/gui/gui-vtable.c * app/gui/gui.c * app/gui/about-dialog.[ch] * app/gui/authors.h * app/gui/color-notebook.[ch] * app/gui/convert-dialog.[ch] * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.[ch] * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-open-location-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/grid-dialog.[ch] * app/gui/info-dialog.[ch] * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/offset-dialog.[ch] * app/gui/palette-import-dialog.[ch] * app/gui/preferences-dialog.[ch] * app/gui/quit-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/resolution-calibrate-dialog.[ch] * app/gui/stroke-dialog.[ch] * app/gui/tips-dialog.[ch] * app/gui/tips-parser.[ch] * app/gui/user-install-dialog.[ch]: removed these files... * app/dialogs/Makefile.am * app/dialogs/dialogs-types.h * app/dialogs/*.[ch]: ...and added them here. Changed some filenames like module-browser -> module-dialog. * app/app_procs.c * app/actions/actions-types.h * app/actions/actions.c * app/actions/dialogs-actions.c * app/actions/dialogs-commands.c * app/actions/dockable-commands.c * app/actions/drawable-commands.c * app/actions/edit-commands.c * app/actions/file-commands.c * app/actions/gradient-editor-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/select-commands.c * app/actions/templates-commands.c * app/actions/templates-commands.h * app/actions/vectors-commands.c * app/actions/view-commands.c * app/display/gimpdisplayshell-cursor.c * app/display/gimpdisplayshell-title.c * app/display/gimpdisplayshell.[ch] * app/tools/gimpcroptool.c * app/tools/gimpperspectivetool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptransformtool.[ch] * app/tools/gimpvectortool.c * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcolorpanel.c * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimppaletteeditor.[ch] * app/widgets/gimptoolbox-color-area.c * menus/toolbox-menu.xml.in * tools/authorsgen/authorsgen.pl: changed accordingly.
2004-09-13 15:15:23 +00:00
#include "gui/themes.h"
#include "preferences-dialog.h"
#include "preferences-dialog-utils.h"
#include "resolution-calibrate-dialog.h"
app/Makefile.am app/gui/Makefile.am app/about_dialog.[ch] 2001-04-17 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gui/Makefile.am * app/about_dialog.[ch] * app/brush_edit.[ch] * app/brush_select.[ch] * app/channels_dialog.[ch] * app/color_area.[ch] * app/color_notebook.[ch] * app/color_select.[ch] * app/colormap_dialog.[ch] * app/commands.[ch] * app/file_new_dialog.[ch] * app/gradient_editor.[ch] * app/gradient_select.[ch] * app/indicator_area.[ch] * app/info_dialog.[ch] * app/info_window.[ch] * app/layer_select.[ch] * app/layers_dialog.[ch] * app/menus.[ch] * app/palette.[ch] * app/palette_import.[ch] * app/palette_select.[ch] * app/paths_dialog.[ch] * app/pattern_select.[ch] * app/preferences_dialog.[ch] * app/session.[ch] * app/test_commands.[ch] * app/tips_dialog.[ch] * app/toolbox.[ch]: moved to gui/ (s/_/-/ and some more useful filenames on the way). * app/app_procs.c * app/context_manager.c * app/convert.c * app/disp_callbacks.c * app/errorconsole.c * app/file-open.c * app/file-save.c * app/file-utils.c * app/gdisplay.c * app/gimage.c * app/gimprc.c * app/image_new.c * app/interface.c * app/nav_window.c * app/path.c * app/plug_in.c * app/gui/dialogs-constructors.c * app/pdb/brush_select_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpscaletool.c * app/tools/gimptransformtool.c * app/widgets/gimpcolorpanel.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * po/POTFILES.in: changed accordingly.
2001-04-17 21:43:29 +00:00
#include "gimp-intl.h"
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 15:22:01 +00:00
#define RESPONSE_RESET 1
/* preferences local functions */
static GtkWidget * prefs_dialog_new (Gimp *gimp,
GimpConfig *config);
static void prefs_config_notify (GObject *config,
GParamSpec *param_spec,
GObject *config_copy);
static void prefs_config_copy_notify (GObject *config_copy,
GParamSpec *param_spec,
GObject *config);
static void prefs_response (GtkWidget *widget,
gint response_id,
GtkWidget *dialog);
static void prefs_message (GtkMessageType type,
gboolean destroy,
const gchar *message);
static void prefs_color_management_reset (GtkWidget *widget,
GObject *config);
static void prefs_dialog_defaults_reset (GtkWidget *widget,
GObject *config);
static void prefs_import_raw_procedure_callback (GtkWidget *widget,
GObject *config);
static void prefs_resolution_source_callback (GtkWidget *widget,
GObject *config);
static void prefs_resolution_calibrate_callback (GtkWidget *widget,
GtkWidget *entry);
static void prefs_input_devices_dialog (GtkWidget *widget,
Gimp *gimp);
static void prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
Gimp *gimp);
static void prefs_menus_save_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_menus_clear_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_menus_remove_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_session_save_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_session_clear_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_devices_save_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_devices_clear_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_search_clear_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_tool_options_save_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_tool_options_clear_callback (GtkWidget *widget,
Gimp *gimp);
static void prefs_help_language_change_callback (GtkComboBox *combo,
Gimp *gimp);
static void prefs_help_language_change_callback2 (GtkComboBox *combo,
GtkContainer *box);
#ifndef HAVE_EXECINFO_H
static void prefs_sensitive_debug_on_success (GPid pid,
gint status,
GtkWidget *widget);
static void prefs_notify_sensitive_debug (GtkWidget *button,
GParamSpec *pspec,
GtkWidget *label);
#else
static void prefs_hide_widget_on_success (GPid pid,
gint status,
GtkWidget *widget);
#endif
/* private variables */
static GtkWidget *prefs_dialog = NULL;
static GtkWidget *tool_editor = NULL;
/* public function */
GtkWidget *
preferences_dialog_create (Gimp *gimp)
{
app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 Sven Neumann <sven@gimp.org> * app/widgets/gimpdocked.[ch] * app/widgets/widgets-types.h: renamed GimpDockedIface to GimpDockedInterface. * app/display/gimpnavigationview.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerview.c * app/widgets/gimpeditor.c * app/widgets/gimpimageeditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimptooloptionseditor.c: changed accordingly. * app/config/config-types.h * app/config/gimpconfig.[ch] * app/config/gimpconfig-deserialize.[ch] * app/config/gimpconfig-serialize.[ch] * app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and changed the GimpConfig API to take GimpConfig instead of GObject pointers. * app/config/gimpconfig-dump.c * app/config/gimprc.c * app/config/test-config.c * app/core/gimp-documents.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp.[ch] * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdocumentlist.c * app/core/gimpgrid.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpparasitelist.c * app/core/gimptemplate.c * app/core/gimptooloptions.c * app/core/gimpviewable.c * app/gui/grid-dialog.c * app/gui/preferences-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tool-options-commands.c * app/paint/gimppaintcore.c * app/pdb/gimprc_cmds.c * app/text/gimptext-parasite.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimptexttool.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimptemplateview.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
GimpConfig *config;
GimpConfig *config_copy;
GimpConfig *config_orig;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
if (prefs_dialog)
return prefs_dialog;
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
/* turn off autosaving while the prefs dialog is open */
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), FALSE);
app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 Sven Neumann <sven@gimp.org> * app/widgets/gimpdocked.[ch] * app/widgets/widgets-types.h: renamed GimpDockedIface to GimpDockedInterface. * app/display/gimpnavigationview.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerview.c * app/widgets/gimpeditor.c * app/widgets/gimpimageeditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimptooloptionseditor.c: changed accordingly. * app/config/config-types.h * app/config/gimpconfig.[ch] * app/config/gimpconfig-deserialize.[ch] * app/config/gimpconfig-serialize.[ch] * app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and changed the GimpConfig API to take GimpConfig instead of GObject pointers. * app/config/gimpconfig-dump.c * app/config/gimprc.c * app/config/test-config.c * app/core/gimp-documents.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp.[ch] * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdocumentlist.c * app/core/gimpgrid.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpparasitelist.c * app/core/gimptemplate.c * app/core/gimptooloptions.c * app/core/gimpviewable.c * app/gui/grid-dialog.c * app/gui/preferences-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tool-options-commands.c * app/paint/gimppaintcore.c * app/pdb/gimprc_cmds.c * app/text/gimptext-parasite.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimptexttool.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimptemplateview.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
config = GIMP_CONFIG (gimp->edit_config);
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);
g_object_add_weak_pointer (G_OBJECT (prefs_dialog),
(gpointer) &prefs_dialog);
Changed menubar showing/hiding to work like rulers and statusbar: 2002-12-14 Michael Natterer <mitch@gimp.org> Changed menubar showing/hiding to work like rulers and statusbar: * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: renamed "menu_bar_per_display" to "show_menubar". Removed GIMP_PARAM_RESTART flag. * app/display/gimpdisplayshell.[ch]: chaged shell->item_factory to shell->menubar_factory plus shell->popup_factory and always create both of them. Added "gboolean update_popup" to gimp_display_shell_set_menu_sensitivity() and call it recursively with update_popup == TRUE if the display it is called for is the active one. * app/display/gimpdisplay.c * app/display/gimpdisplayshell-callbacks.c: changed accordinly. * app/gui/gui.c: ditto. Set the menu sensitivity of new displays. * app/gui/menus.c: added "<Image>/View/Toggle Menubar" menu item. Moved some factory initialization code from gimpdisplayshell.c here. * app/gui/view-commands.[ch]: added view_toggle_menubar_cmd_callback(). Update the menu sensitivity manually in all callbacks which don't call gimp_image_flush(). * app/gui/preferences-dialog.c (prefs_dialog_new): moved the "Show Menubar" toggle to the "Appearance" frame of the "Image Windows" page. Added an own frame for the display zoom/scaling settings. (preferences_dialog_create): Attach config_copy and config_orig using g_object_set_data_full() instead of just g_object_set_data() plus a g_object_weak_ref(). (prefs_default_resolution_callback): set the resolution for both fields of the "size_sizeentry" instead of setting it for "x" twice.
2002-12-14 14:13:54 +00:00
g_object_set_data (G_OBJECT (prefs_dialog), "gimp", gimp);
Changed menubar showing/hiding to work like rulers and statusbar: 2002-12-14 Michael Natterer <mitch@gimp.org> Changed menubar showing/hiding to work like rulers and statusbar: * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: renamed "menu_bar_per_display" to "show_menubar". Removed GIMP_PARAM_RESTART flag. * app/display/gimpdisplayshell.[ch]: chaged shell->item_factory to shell->menubar_factory plus shell->popup_factory and always create both of them. Added "gboolean update_popup" to gimp_display_shell_set_menu_sensitivity() and call it recursively with update_popup == TRUE if the display it is called for is the active one. * app/display/gimpdisplay.c * app/display/gimpdisplayshell-callbacks.c: changed accordinly. * app/gui/gui.c: ditto. Set the menu sensitivity of new displays. * app/gui/menus.c: added "<Image>/View/Toggle Menubar" menu item. Moved some factory initialization code from gimpdisplayshell.c here. * app/gui/view-commands.[ch]: added view_toggle_menubar_cmd_callback(). Update the menu sensitivity manually in all callbacks which don't call gimp_image_flush(). * app/gui/preferences-dialog.c (prefs_dialog_new): moved the "Show Menubar" toggle to the "Appearance" frame of the "Image Windows" page. Added an own frame for the display zoom/scaling settings. (preferences_dialog_create): Attach config_copy and config_orig using g_object_set_data_full() instead of just g_object_set_data() plus a g_object_weak_ref(). (prefs_default_resolution_callback): set the resolution for both fields of the "size_sizeentry" instead of setting it for "x" twice.
2002-12-14 14:13:54 +00:00
g_object_set_data_full (G_OBJECT (prefs_dialog), "config-copy", config_copy,
(GDestroyNotify) g_object_unref);
g_object_set_data_full (G_OBJECT (prefs_dialog), "config-orig", config_orig,
(GDestroyNotify) g_object_unref);
return prefs_dialog;
}
/* private functions */
static void
prefs_config_notify (GObject *config,
GParamSpec *param_spec,
GObject *config_copy)
{
GValue global_value = G_VALUE_INIT;
GValue copy_value = G_VALUE_INIT;
g_value_init (&global_value, param_spec->value_type);
g_value_init (&copy_value, param_spec->value_type);
g_object_get_property (config, param_spec->name, &global_value);
g_object_get_property (config_copy, param_spec->name, &copy_value);
if (g_param_values_cmp (param_spec, &global_value, &copy_value))
{
g_signal_handlers_block_by_func (config_copy,
prefs_config_copy_notify,
config);
g_object_set_property (config_copy, param_spec->name, &global_value);
g_signal_handlers_unblock_by_func (config_copy,
prefs_config_copy_notify,
config);
}
g_value_unset (&global_value);
g_value_unset (&copy_value);
}
static void
prefs_config_copy_notify (GObject *config_copy,
GParamSpec *param_spec,
GObject *config)
{
GValue copy_value = G_VALUE_INIT;
GValue global_value = G_VALUE_INIT;
g_value_init (&copy_value, param_spec->value_type);
g_value_init (&global_value, param_spec->value_type);
g_object_get_property (config_copy, param_spec->name, &copy_value);
g_object_get_property (config, param_spec->name, &global_value);
if (g_param_values_cmp (param_spec, &copy_value, &global_value))
{
if (param_spec->flags & GIMP_CONFIG_PARAM_CONFIRM)
{
#ifdef GIMP_CONFIG_DEBUG
The unbelievable happened: a menu bar per display (optionally) 2002-12-10 Michael Natterer <mitch@gimp.org> The unbelievable happened: a menu bar per display (optionally) * app/widgets/gimpitemfactory.[ch]: Added the possibility to have more than one item factory per <Prefix>. Added gimp_item_factories_set_foobar() variants of all functions which set menu item properties (label, sensitive, ...). Removed the #ifndef ENABLE_NLS code since that's no longer possible. * app/widgets/gimptoolbox.c: made it robust againt the <Image> factory not existing at the time of toolbox creation. * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: added boolean "menu_bar_per_display" property. * app/gui/preferences-dialog.c: added a toggle for the new option. * app/gui/menus.[ch]: added menus_get_new_image_factory() as temporary solution. Will add a GimpMenuFactory which creates the item factories soon. * app/display/gimpdisplayshell.c: add the menu bar if requested. Changed widget packing slightly for the menu bar case. * app/display/gimpdisplayshell-callbacks.c: changed accordingly. Currently there is no right-click popup menu when we have a menu bar. This will change soon. * app/gui/file-dialog-utils.c * app/gui/gui.c: use gimp_item_factories_set_foo(). * app/gui/channels-commands.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/drawable-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/plug-in-commands.c * app/gui/select-commands.c * app/gui/tools-commands.c * app/gui/vectors-commands.c * app/gui/view-commands.c: per-display item factories pass the GimpDisplay as user_data to callbacks, not a Gimp. Changed all return_if_no_foo() macros to handle both cases. Cleaned up the plug-in menu stuff: * app/plug-in/plug-in-types.h: removed PlugInMenuEntry type. * app/plug-in/plug-ins.[ch]: added plug_ins_proc_def_add() as counterpart to plug_ins_proc_def_remove(). Added plug_ins_locale_domain() as counterpart to plug_ins_help_path(). Remember the locale domains just as the help paths. Changed plug-in initialization so that their menus can be created multiple times. * app/plug-in/plug-in.[ch]: use plug_ins_proc_def_add() instead of doing it manually. * app/gui/plug-in-menus.[ch]: added plug_in_menus_init() which just registers the locale domains. Changed plug_in_make_menu() to take a list of proc_defs, not plug_ins_defs so it can be used after plug-in query.
2002-12-10 16:38:16 +00:00
g_print ("NOT Applying prefs change of '%s' to edit_config "
"because it needs confirmation\n",
param_spec->name);
#endif
}
else
{
#ifdef GIMP_CONFIG_DEBUG
The unbelievable happened: a menu bar per display (optionally) 2002-12-10 Michael Natterer <mitch@gimp.org> The unbelievable happened: a menu bar per display (optionally) * app/widgets/gimpitemfactory.[ch]: Added the possibility to have more than one item factory per <Prefix>. Added gimp_item_factories_set_foobar() variants of all functions which set menu item properties (label, sensitive, ...). Removed the #ifndef ENABLE_NLS code since that's no longer possible. * app/widgets/gimptoolbox.c: made it robust againt the <Image> factory not existing at the time of toolbox creation. * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: added boolean "menu_bar_per_display" property. * app/gui/preferences-dialog.c: added a toggle for the new option. * app/gui/menus.[ch]: added menus_get_new_image_factory() as temporary solution. Will add a GimpMenuFactory which creates the item factories soon. * app/display/gimpdisplayshell.c: add the menu bar if requested. Changed widget packing slightly for the menu bar case. * app/display/gimpdisplayshell-callbacks.c: changed accordingly. Currently there is no right-click popup menu when we have a menu bar. This will change soon. * app/gui/file-dialog-utils.c * app/gui/gui.c: use gimp_item_factories_set_foo(). * app/gui/channels-commands.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/drawable-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/plug-in-commands.c * app/gui/select-commands.c * app/gui/tools-commands.c * app/gui/vectors-commands.c * app/gui/view-commands.c: per-display item factories pass the GimpDisplay as user_data to callbacks, not a Gimp. Changed all return_if_no_foo() macros to handle both cases. Cleaned up the plug-in menu stuff: * app/plug-in/plug-in-types.h: removed PlugInMenuEntry type. * app/plug-in/plug-ins.[ch]: added plug_ins_proc_def_add() as counterpart to plug_ins_proc_def_remove(). Added plug_ins_locale_domain() as counterpart to plug_ins_help_path(). Remember the locale domains just as the help paths. Changed plug-in initialization so that their menus can be created multiple times. * app/plug-in/plug-in.[ch]: use plug_ins_proc_def_add() instead of doing it manually. * app/gui/plug-in-menus.[ch]: added plug_in_menus_init() which just registers the locale domains. Changed plug_in_make_menu() to take a list of proc_defs, not plug_ins_defs so it can be used after plug-in query.
2002-12-10 16:38:16 +00:00
g_print ("Applying prefs change of '%s' to edit_config\n",
param_spec->name);
#endif
g_signal_handlers_block_by_func (config,
prefs_config_notify,
config_copy);
g_object_set_property (config, param_spec->name, &copy_value);
g_signal_handlers_unblock_by_func (config,
prefs_config_notify,
config_copy);
}
}
g_value_unset (&copy_value);
g_value_unset (&global_value);
}
static void
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
prefs_response (GtkWidget *widget,
gint response_id,
GtkWidget *dialog)
{
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
Gimp *gimp = g_object_get_data (G_OBJECT (dialog), "gimp");
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 11:47:11 +00:00
switch (response_id)
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
{
case RESPONSE_RESET:
{
GtkWidget *confirm;
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 11:47:11 +00:00
confirm = gimp_message_dialog_new (_("Reset All Preferences"),
GIMP_ICON_DIALOG_QUESTION,
dialog,
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
gimp_standard_help_func, NULL,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Reset"), GTK_RESPONSE_OK,
major cleanup. After being finished, I decided that it needs to be 2001-06-18 Michael Natterer <mitch@gimp.org> * app/nav_window.[ch]: major cleanup. After being finished, I decided that it needs to be factored out to a widget (see below), so like 90% of this file will go away soon. * app/apptypes.h: added opaque NavigationDialog typedef. * app/gdisplay.[ch]: Added gdisplay_selection_visibility() which is called from gdisplays_selection_visibility(). Capitalized the SelectionControl enum values. Cleaned up the GDisplay struct and it's initialisation while i was on it. * app/gimage.c: gimage_size_changed_handler(): removed stuff which is now done by GimpImage itself. * app/scale.c * app/scroll.c: also update the navigation popup, not only the dialog. * app/selection.[ch]: major indentation & cleanup attack. Maybe found the "Selection vanishes" bug (the timeout id was assinged to a gint, not a _guint_). * app/undo.c: s/gimp_image_size_changed/gimp_viweable_size_changed/ * app/core/gimpdrawable.c: invalidate the image's preview from our "invalidate_preview" implementation. This means that the image's preview is invalidated way too often currently, which cries for some general freeze/thaw mechanism on the GimpViewable level. (Note that previews are rendered in the idle loop, so this is not really a major performance impact, it's just ugly). * app/core/gimpimage.[ch]: removed the "size_changed" signal... * app/core/gimpviewable.[ch]: ...and added it here. * app/core/gimplayer.c: invalidate_preview(): always chain up, also if it's a floating selection. * app/gui/info-dialog.[ch] * app/gui/info-window.c: minor cleanups. * app/gui/preferences-dialog.c: no need to invalidate the image after we have invalidated all it's layers. * app/core/gimpimage-mask.c * app/gui/commands.c * app/tools/gimpeditselectiontool.c * app/tools/gimpinktool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c: capitalized the SelectionCommand enum values. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpnavigationpreview.[ch]: new widget. * app/widgets/gimppreview.[ch]: added a non-working non-dot-for-dot mode. Added xres/yres params to the gimp_preview_calc_size() helper function. Cache the "size" value which was passed to the simple function variants (gimp_preview_new() and gimp_preview_set_size()) so we can re-calculate the preview's extents on the underlying viewable's "size_changed" signal and on gimp_preview_set_viewable(). * app/widgets/gimpdrawablepreview.c * app/widgets/gimpimagepreview.c: changed accordingly.
2001-06-18 13:10:03 +00:00
NULL);
build display/ before tools/. 2001-11-08 Michael Natterer <mitch@gimp.org> * app/Makefile.am: build display/ before tools/. * app/devices.c: devices_check_change(): added all events which have a GdkDevice pointer. * app/gimpprogress.c: include "display-types.h" instead of "core-types.h". * app/core/Makefile.am * app/core/gimpdrawable-bucket-fill.[ch]: new files: the bucket_fill stuff taken from tools/gimpbucketfilltool.[ch]. * app/core/core-types.h: added "BucketFillMode". * app/core/gimpimage-mask-select.[ch]: cleanup. * app/core/gimpmarshal.list: added more marshallers for GimpTool's new signal signatures. * app/core/gimpmarshal.[ch]: regenerated. * app/display/Makefile.am * app/display/gimpdisplayshell-dnd.[ch] * app/display/gimpdisplayshell-layer-select.[ch]: new files: the canvas drop callbacks from gimpdisplayshell-callbacks.[ch] and the stuff formerly knows as gui/layer-select.[ch]. * app/display/gimpdisplay.h: don't include "gui/gui-types.h". * app/display/gximage.c: include "display-types.h". * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell.[ch]: call gdsplay_delete(), don't destroy the shell widget. * app/gui/Makefile.am * app/gui/layer-select.[ch]: removed. * app/gui/gradients-commands.c: fixed "Save as POV" fprintf()s. * app/gui/preferences-dialog.c: removed the layer_select stuff because it is useless with the new preview system. * app/gui/tool-options-dialog.c: send the correct data to the close_callback. * app/gui/tools-commands.c: changed to follow the new gimp_tool_initialize() semantics (see below). Tool & canvas event handling chainsawing: * app/tools/tools-types.h: new struct GimpCoords which contains x, y, pressure, tilt etc. * app/display/gimpdisplayshell-callbacks.[ch]: added utility functions which transparently retreive the current event's GimpCoords or take it from the device directly if the event has none. Pass GimpCoords _in_image_coordinates_ to all tool functions. Most important: don't pass GdkEvents and display coordinates to tools any more. * app/tools/gimptool.[ch]: changed virtual functions to take GimpCoords, time and state separately instead of GdkEvents. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.[ch] * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.[ch] * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.[ch] * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.[ch] * app/tools/gimpfuzzyselecttool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.[ch] * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpselectiontool.[ch] * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.[ch] * app/tools/path_tool.[ch] * app/tools/selection_options.c: tons and tons of changes: - changed to use the new virtual function parameters. - removed zillions of gdisplay_untransform_coords(). - get the active drawable's offsets manually in many cases. (questionable, but IMHO ok because it's obvious and not simply a "TRUE" passed to some function) - reordered some functions to be consistent across tools. - some tools had to be changed to work on image coords, not display ones (esp. crop). - fixed strange rotate tool behaviour which should be backported to stable. - some stuff i came across. - indentation and other paranoia. - rounding of coordinated may be broken in some tools. - new bugs guaranteed. * app/tools/tool_manager.[ch]: new semantic of tool_manager_initialize_active() (looked at the places where it was used from and put common code together). Should be a bit better now :) * app/tools/gimpblendtool.c * app/tools/transform_options.c: use the new GTK+ feature that a widget (toggle button) can be a frame's title for this tools' tool options. * app/widgets/widgets-types.h: stuff. * themes/Default/gtkrc: s/GtkDialog/GimpDialog/. * tools/pdbgen/Makefile.am: don't scan tools/gimpbucketfilltool.h any more. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb/tools.pdb: changed bucket_fill wrapper. * app/pdb/tools_cmds.c: regenerated.
2001-11-08 19:14:51 +00:00
gtk_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (confirm)->box,
_("Do you really want to reset all "
"preferences to default values?"));
if (gimp_dialog_run (GIMP_DIALOG (confirm)) == GTK_RESPONSE_OK)
{
GimpConfig *config_copy;
config_copy = g_object_get_data (G_OBJECT (dialog), "config-copy");
gimp_config_reset (config_copy);
gimp_rc_load_system (GIMP_RC (config_copy));
/* don't use the default value if there is no help browser */
if (! gimp_help_browser_is_installed (gimp))
{
g_object_set (config_copy,
"help-browser", GIMP_HELP_BROWSER_WEB_BROWSER,
NULL);
}
}
gtk_widget_destroy (confirm);
return;
}
break;
case GTK_RESPONSE_OK:
{
GObject *config_copy;
GList *restart_diff;
GList *confirm_diff;
GList *list;
config_copy = g_object_get_data (G_OBJECT (dialog), "config-copy");
/* destroy config_orig */
g_object_set_data (G_OBJECT (dialog), "config-orig", NULL);
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
confirm_diff = gimp_config_diff (G_OBJECT (gimp->edit_config),
config_copy,
GIMP_CONFIG_PARAM_CONFIRM);
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
for (list = confirm_diff; list; list = g_list_next (list))
{
GParamSpec *param_spec = list->data;
GValue value = G_VALUE_INIT;
g_value_init (&value, param_spec->value_type);
g_object_get_property (config_copy,
param_spec->name, &value);
g_object_set_property (G_OBJECT (gimp->edit_config),
param_spec->name, &value);
g_value_unset (&value);
}
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
g_list_free (confirm_diff);
gimp_rc_save (GIMP_RC (gimp->edit_config));
/* spit out a solely informational warning about changed values
* which need restart
*/
restart_diff = gimp_config_diff (G_OBJECT (gimp->edit_config),
G_OBJECT (gimp->config),
GIMP_CONFIG_PARAM_RESTART);
if (restart_diff)
{
GString *string;
string = g_string_new (_("You will have to restart GIMP for "
"the following changes to take effect:"));
g_string_append (string, "\n\n");
for (list = restart_diff; list; list = g_list_next (list))
{
GParamSpec *param_spec = list->data;
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
g_string_append_printf (string, "%s\n", param_spec->name);
}
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
prefs_message (GTK_MESSAGE_INFO, FALSE, string->str);
g_string_free (string, TRUE);
}
g_list_free (restart_diff);
}
break;
default:
{
GObject *config_orig;
GList *diff;
GList *list;
config_orig = g_object_get_data (G_OBJECT (dialog), "config-orig");
/* destroy config_copy */
g_object_set_data (G_OBJECT (dialog), "config-copy", NULL);
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
diff = gimp_config_diff (G_OBJECT (gimp->edit_config),
config_orig,
GIMP_CONFIG_PARAM_SERIALIZE);
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
for (list = diff; list; list = g_list_next (list))
{
GParamSpec *param_spec = list->data;
GValue value = G_VALUE_INIT;
g_value_init (&value, param_spec->value_type);
g_object_get_property (config_orig,
param_spec->name, &value);
g_object_set_property (G_OBJECT (gimp->edit_config),
param_spec->name, &value);
g_value_unset (&value);
}
gimp_tool_editor_revert_changes (GIMP_TOOL_EDITOR (tool_editor));
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
g_list_free (diff);
}
tool_editor = NULL;
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
}
/* enable autosaving again */
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
gtk_widget_destroy (dialog);
}
static void
prefs_color_management_reset (GtkWidget *widget,
GObject *config)
{
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (config);
gimp_config_reset (GIMP_CONFIG (core_config->color_management));
gimp_config_reset_property (config, "color-profile-policy");
gimp_config_reset_property (config, "filter-tool-show-color-options");
}
static void
prefs_dialog_defaults_reset (GtkWidget *widget,
GObject *config)
{
GParamSpec **pspecs;
guint n_pspecs;
guint i;
pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (config),
&n_pspecs);
g_object_freeze_notify (config);
for (i = 0; i < n_pspecs; i++)
{
GParamSpec *pspec = pspecs[i];
if (pspec->owner_type == GIMP_TYPE_DIALOG_CONFIG)
gimp_config_reset_property (config, pspec->name);
}
g_object_thaw_notify (config);
g_free (pspecs);
}
static void
prefs_template_select_callback (GimpContainerView *view,
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
GimpTemplate *template,
gpointer insert_data,
GimpTemplate *edit_template)
{
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
if (template)
{
/* make sure the resolution values are copied first (see bug #546924) */
gimp_config_sync (G_OBJECT (template), G_OBJECT (edit_template),
GIMP_TEMPLATE_PARAM_COPY_FIRST);
gimp_config_sync (G_OBJECT (template), G_OBJECT (edit_template),
0);
}
}
static void
prefs_import_raw_procedure_callback (GtkWidget *widget,
GObject *config)
{
gchar *raw_plug_in;
raw_plug_in = gimp_plug_in_view_get_plug_in (GIMP_PLUG_IN_VIEW (widget));
g_object_set (config,
"import-raw-plug-in", raw_plug_in,
NULL);
g_free (raw_plug_in);
}
static void
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
prefs_resolution_source_callback (GtkWidget *widget,
GObject *config)
{
gdouble xres;
gdouble yres;
gboolean from_gdk;
from_gdk = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
Changed menubar showing/hiding to work like rulers and statusbar: 2002-12-14 Michael Natterer <mitch@gimp.org> Changed menubar showing/hiding to work like rulers and statusbar: * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: renamed "menu_bar_per_display" to "show_menubar". Removed GIMP_PARAM_RESTART flag. * app/display/gimpdisplayshell.[ch]: chaged shell->item_factory to shell->menubar_factory plus shell->popup_factory and always create both of them. Added "gboolean update_popup" to gimp_display_shell_set_menu_sensitivity() and call it recursively with update_popup == TRUE if the display it is called for is the active one. * app/display/gimpdisplay.c * app/display/gimpdisplayshell-callbacks.c: changed accordinly. * app/gui/gui.c: ditto. Set the menu sensitivity of new displays. * app/gui/menus.c: added "<Image>/View/Toggle Menubar" menu item. Moved some factory initialization code from gimpdisplayshell.c here. * app/gui/view-commands.[ch]: added view_toggle_menubar_cmd_callback(). Update the menu sensitivity manually in all callbacks which don't call gimp_image_flush(). * app/gui/preferences-dialog.c (prefs_dialog_new): moved the "Show Menubar" toggle to the "Appearance" frame of the "Image Windows" page. Added an own frame for the display zoom/scaling settings. (preferences_dialog_create): Attach config_copy and config_orig using g_object_set_data_full() instead of just g_object_set_data() plus a g_object_weak_ref(). (prefs_default_resolution_callback): set the resolution for both fields of the "size_sizeentry" instead of setting it for "x" twice.
2002-12-14 14:13:54 +00:00
if (from_gdk)
{
gimp_get_monitor_resolution (gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
&xres, &yres);
Changed menubar showing/hiding to work like rulers and statusbar: 2002-12-14 Michael Natterer <mitch@gimp.org> Changed menubar showing/hiding to work like rulers and statusbar: * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: renamed "menu_bar_per_display" to "show_menubar". Removed GIMP_PARAM_RESTART flag. * app/display/gimpdisplayshell.[ch]: chaged shell->item_factory to shell->menubar_factory plus shell->popup_factory and always create both of them. Added "gboolean update_popup" to gimp_display_shell_set_menu_sensitivity() and call it recursively with update_popup == TRUE if the display it is called for is the active one. * app/display/gimpdisplay.c * app/display/gimpdisplayshell-callbacks.c: changed accordinly. * app/gui/gui.c: ditto. Set the menu sensitivity of new displays. * app/gui/menus.c: added "<Image>/View/Toggle Menubar" menu item. Moved some factory initialization code from gimpdisplayshell.c here. * app/gui/view-commands.[ch]: added view_toggle_menubar_cmd_callback(). Update the menu sensitivity manually in all callbacks which don't call gimp_image_flush(). * app/gui/preferences-dialog.c (prefs_dialog_new): moved the "Show Menubar" toggle to the "Appearance" frame of the "Image Windows" page. Added an own frame for the display zoom/scaling settings. (preferences_dialog_create): Attach config_copy and config_orig using g_object_set_data_full() instead of just g_object_set_data() plus a g_object_weak_ref(). (prefs_default_resolution_callback): set the resolution for both fields of the "size_sizeentry" instead of setting it for "x" twice.
2002-12-14 14:13:54 +00:00
}
else
{
GimpSizeEntry *entry = g_object_get_data (G_OBJECT (widget),
"monitor_resolution_sizeentry");
g_return_if_fail (GIMP_IS_SIZE_ENTRY (entry));
xres = gimp_size_entry_get_refval (entry, 0);
yres = gimp_size_entry_get_refval (entry, 1);
}
g_object_set (config,
"monitor-xresolution", xres,
"monitor-yresolution", yres,
"monitor-resolution-from-windowing-system", from_gdk,
NULL);
}
static void
prefs_resolution_calibrate_callback (GtkWidget *widget,
GtkWidget *entry)
{
GtkWidget *dialog;
GtkWidget *prefs_box;
GtkWidget *image;
dialog = gtk_widget_get_toplevel (entry);
prefs_box = g_object_get_data (G_OBJECT (dialog), "prefs-box");
image = gimp_prefs_box_get_image (GIMP_PREFS_BOX (prefs_box));
resolution_calibrate_dialog (entry, gtk_image_get_pixbuf (GTK_IMAGE (image)));
}
static void
prefs_input_devices_dialog (GtkWidget *widget,
Gimp *gimp)
{
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
"gimp-input-devices-dialog", 0);
}
static void
prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
Gimp *gimp)
{
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
"gimp-keyboard-shortcuts-dialog", 0);
}
static void
prefs_menus_save_callback (GtkWidget *widget,
Gimp *gimp)
{
GtkWidget *clear_button;
menus_save (gimp, TRUE);
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
if (clear_button)
gtk_widget_set_sensitive (clear_button, TRUE);
}
static void
prefs_menus_clear_callback (GtkWidget *widget,
Gimp *gimp)
{
GError *error = NULL;
if (! menus_clear (gimp, &error))
{
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
g_clear_error (&error);
}
else
{
gtk_widget_set_sensitive (widget, FALSE);
prefs_message (GTK_MESSAGE_INFO, TRUE,
_("Your keyboard shortcuts will be reset to "
"default values the next time you start GIMP."));
}
}
static void
prefs_menus_remove_callback (GtkWidget *widget,
Gimp *gimp)
{
GtkWidget *dialog;
dialog = gimp_message_dialog_new (_("Remove all Keyboard Shortcuts"),
GIMP_ICON_DIALOG_QUESTION,
gtk_widget_get_toplevel (widget),
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
gimp_standard_help_func, NULL,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("Cl_ear"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect_object (gtk_widget_get_toplevel (widget), "unmap",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
_("Do you really want to remove all "
"keyboard shortcuts from all menus?"));
if (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK)
{
menus_remove (gimp);
}
gtk_widget_destroy (dialog);
}
static void
prefs_session_save_callback (GtkWidget *widget,
Gimp *gimp)
{
GtkWidget *clear_button;
session_save (gimp, TRUE);
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
if (clear_button)
gtk_widget_set_sensitive (clear_button, TRUE);
}
static void
prefs_session_clear_callback (GtkWidget *widget,
Gimp *gimp)
{
GError *error = NULL;
if (! session_clear (gimp, &error))
{
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
g_clear_error (&error);
}
else
{
gtk_widget_set_sensitive (widget, FALSE);
prefs_message (GTK_MESSAGE_INFO, TRUE,
_("Your window setup will be reset to "
"default values the next time you start GIMP."));
}
}
static void
prefs_devices_save_callback (GtkWidget *widget,
Gimp *gimp)
{
GtkWidget *clear_button;
gimp_devices_save (gimp, TRUE);
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
if (clear_button)
gtk_widget_set_sensitive (clear_button, TRUE);
}
static void
prefs_devices_clear_callback (GtkWidget *widget,
Gimp *gimp)
{
GError *error = NULL;
if (! gimp_devices_clear (gimp, &error))
{
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
g_clear_error (&error);
}
else
{
gtk_widget_set_sensitive (widget, FALSE);
prefs_message (GTK_MESSAGE_INFO, TRUE,
_("Your input device settings will be reset to "
"default values the next time you start GIMP."));
}
}
static void
prefs_search_clear_callback (GtkWidget *widget,
Gimp *gimp)
{
gimp_action_history_clear (gimp);
}
static void
prefs_tool_options_save_callback (GtkWidget *widget,
Gimp *gimp)
{
GtkWidget *clear_button;
gimp_tools_save (gimp, TRUE, TRUE);
clear_button = g_object_get_data (G_OBJECT (widget), "clear-button");
if (clear_button)
gtk_widget_set_sensitive (clear_button, TRUE);
}
static void
prefs_tool_options_clear_callback (GtkWidget *widget,
Gimp *gimp)
{
GError *error = NULL;
if (! gimp_tools_clear (gimp, &error))
{
prefs_message (GTK_MESSAGE_ERROR, TRUE, error->message);
g_clear_error (&error);
}
else
{
gtk_widget_set_sensitive (widget, FALSE);
prefs_message (GTK_MESSAGE_INFO, TRUE,
_("Your tool options will be reset to "
"default values the next time you start GIMP."));
}
}
static void
prefs_help_language_change_callback (GtkComboBox *combo,
Gimp *gimp)
{
gchar *help_locales = NULL;
gchar *code;
code = gimp_language_combo_box_get_code (GIMP_LANGUAGE_COMBO_BOX (combo));
if (code && g_strcmp0 ("", code) != 0)
{
help_locales = g_strdup_printf ("%s:", code);
}
g_object_set (gimp->config,
"help-locales", help_locales? help_locales : "",
NULL);
g_free (code);
if (help_locales)
g_free (help_locales);
}
static void
prefs_help_language_change_callback2 (GtkComboBox *combo,
GtkContainer *box)
{
Gimp *gimp;
GtkLabel *label = NULL;
GtkImage *icon = NULL;
GList *children;
GList *iter;
const gchar *text;
const gchar *icon_name;
gimp = g_object_get_data (G_OBJECT (box), "gimp");
children = gtk_container_get_children (box);
for (iter = children; iter; iter = iter->next)
{
if (GTK_IS_LABEL (iter->data))
{
label = iter->data;
}
else if (GTK_IS_IMAGE (iter->data))
{
icon = iter->data;
}
}
if (gimp_help_user_manual_is_installed (gimp))
{
text = _("There's a local installation of the user manual.");
icon_name = GIMP_ICON_DIALOG_INFORMATION;
}
else
{
text = _("The user manual is not installed locally.");
icon_name = GIMP_ICON_DIALOG_WARNING;
}
if (label)
{
gtk_label_set_text (label, text);
}
if (icon)
{
gtk_image_set_from_icon_name (icon, icon_name,
GTK_ICON_SIZE_BUTTON);
}
g_list_free (children);
}
#ifndef HAVE_EXECINFO_H
static void
prefs_sensitive_debug_on_success (GPid pid,
gint status,
GtkWidget *widget)
{
gtk_widget_set_sensitive (widget,
g_spawn_check_exit_status (status, NULL));
g_spawn_close_pid (pid);
}
static void
prefs_notify_sensitive_debug (GtkWidget *button,
GParamSpec *pspec,
GtkWidget *label)
{
gtk_widget_set_visible (label,
! gtk_widget_is_sensitive (button));
}
#else
static void
prefs_hide_widget_on_success (GPid pid,
gint status,
GtkWidget *widget)
{
gtk_widget_set_visible (widget,
! g_spawn_check_exit_status (status, NULL));
g_spawn_close_pid (pid);
}
#endif
static void
prefs_format_string_select_callback (GtkTreeSelection *sel,
GtkEntry *entry)
{
GtkTreeModel *model;
GtkTreeIter iter;
if (gtk_tree_selection_get_selected (sel, &model, &iter))
{
GValue val = G_VALUE_INIT;
gtk_tree_model_get_value (model, &iter, 1, &val);
gtk_entry_set_text (entry, g_value_get_string (&val));
g_value_unset (&val);
}
}
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 = G_VALUE_INIT;
gtk_tree_model_get_value (model, &iter, 0, &val);
g_object_set_property (G_OBJECT (gimp->config), "theme", &val);
g_value_unset (&val);
}
}
static void
prefs_theme_reload_callback (GtkWidget *button,
Gimp *gimp)
{
g_object_notify (G_OBJECT (gimp->config), "theme");
}
static void
prefs_icon_theme_select_callback (GtkTreeSelection *sel,
Gimp *gimp)
{
GtkTreeModel *model;
GtkTreeIter iter;
if (gtk_tree_selection_get_selected (sel, &model, &iter))
{
GValue val = G_VALUE_INIT;
gtk_tree_model_get_value (model, &iter, 1, &val);
g_object_set_property (G_OBJECT (gimp->config), "icon-theme", &val);
g_value_unset (&val);
}
}
static void
prefs_canvas_padding_color_changed (GtkWidget *button,
GtkWidget *combo)
{
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
GIMP_CANVAS_PADDING_MODE_CUSTOM);
}
static void
prefs_display_options_frame_add (Gimp *gimp,
GObject *object,
const gchar *label,
GtkContainer *parent)
{
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *checks_vbox;
GtkWidget *table;
GtkWidget *combo;
GtkWidget *button;
vbox = prefs_frame_new (label, parent, FALSE);
2011-09-30 11:29:11 +02:00
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
2011-09-30 11:29:11 +02:00
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
gtk_widget_show (checks_vbox);
#ifndef GDK_WINDOWING_QUARTZ
prefs_check_button_add (object, "show-menubar",
_("Show _menubar"),
GTK_BOX (checks_vbox));
#endif /* !GDK_WINDOWING_QUARTZ */
prefs_check_button_add (object, "show-rulers",
_("Show _rulers"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "show-scrollbars",
_("Show scroll_bars"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "show-statusbar",
_("Show s_tatusbar"),
GTK_BOX (checks_vbox));
2011-09-30 11:29:11 +02:00
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
gtk_widget_show (checks_vbox);
prefs_check_button_add (object, "show-selection",
_("Show s_election"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "show-layer-boundary",
_("Show _layer boundary"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "show-guides",
_("Show _guides"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "show-grid",
_("Show gri_d"),
GTK_BOX (checks_vbox));
table = prefs_table_new (2, GTK_CONTAINER (vbox));
combo = prefs_enum_combo_box_add (object, "padding-mode", 0, 0,
_("Canvas _padding mode:"),
GTK_TABLE (table), 0,
NULL);
button = prefs_color_button_add (object, "padding-color",
_("Custom p_adding color:"),
_("Select Custom Canvas Padding Color"),
GTK_TABLE (table), 1, NULL,
gimp_get_user_context (gimp));
g_signal_connect (button, "color-changed",
G_CALLBACK (prefs_canvas_padding_color_changed),
combo);
}
static void
prefs_behavior_options_frame_add (Gimp *gimp,
GObject *object,
const gchar *label,
GtkContainer *parent)
{
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *checks_vbox;
vbox = prefs_frame_new (label, parent, FALSE);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
gtk_widget_show (checks_vbox);
prefs_check_button_add (object, "snap-to-guides",
_("Snap to Guides"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "snap-to-grid",
_("Snap to Grid"),
GTK_BOX (checks_vbox));
checks_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_box_pack_start (GTK_BOX (hbox), checks_vbox, TRUE, TRUE, 0);
gtk_widget_show (checks_vbox);
prefs_check_button_add (object, "snap-to-canvas",
_("Snap to Canvas Edges"),
GTK_BOX (checks_vbox));
prefs_check_button_add (object, "snap-to-path",
_("Snap to Active Path"),
GTK_BOX (checks_vbox));
}
static void
changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const 2003-08-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const gchar *help_id". - added "gpointer help_data". * libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to gimp_help_connect(). Removed all fiddling with html links and treat all help IDs as opaque identifiers. * app/core/gimptoolinfo.[ch]: changed "help_data" member to "help_id". * app/widgets/gimpitemfactory.[ch]: removed the "help_path" parameter from gimp_item_factory_new() since we don't fiddle with html file paths any more. Simplifies menu item help a lot. Renamed "help_data" member of struct GimpItemFactoryEntry to "help_id". * app/gui/plug-in-menus.c: changed accordingly. 3rd party plug-ins' menu item help IDs are now encoded as "help_path:help_id". * app/gui/file-open-menu.c * app/gui/file-save-menu.c: when constructing the <Load> and <Save> menus, take the resp. procedures' locale_domain and help_path into account. Fixes translation of 3rd party menu items. Also do the right thing for load/save procs which are implemented as temporary procedures (they are impossible to implement currently but it's nice to do the right thing anyway...). * app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimp/gimpui.c * app/display/gimpdisplayshell.c * app/gui/gui.c * app/gui/about-dialog.c * app/gui/color-notebook.c * app/gui/dialogs-constructors.c * app/gui/file-dialog-utils.[ch] * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/preferences-dialog.c * app/gui/tips-dialog.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimperrorconsole.c * app/widgets/gimphelp.[ch] * app/widgets/gimpmenufactory.[ch] * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/fp/fp_gtk.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_main.c: changed accordingly. Removed trailing whitespace all over the place.
2003-08-23 19:35:05 +00:00
prefs_help_func (const gchar *help_id,
gpointer help_data)
{
GtkWidget *prefs_box;
changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const 2003-08-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const gchar *help_id". - added "gpointer help_data". * libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to gimp_help_connect(). Removed all fiddling with html links and treat all help IDs as opaque identifiers. * app/core/gimptoolinfo.[ch]: changed "help_data" member to "help_id". * app/widgets/gimpitemfactory.[ch]: removed the "help_path" parameter from gimp_item_factory_new() since we don't fiddle with html file paths any more. Simplifies menu item help a lot. Renamed "help_data" member of struct GimpItemFactoryEntry to "help_id". * app/gui/plug-in-menus.c: changed accordingly. 3rd party plug-ins' menu item help IDs are now encoded as "help_path:help_id". * app/gui/file-open-menu.c * app/gui/file-save-menu.c: when constructing the <Load> and <Save> menus, take the resp. procedures' locale_domain and help_path into account. Fixes translation of 3rd party menu items. Also do the right thing for load/save procs which are implemented as temporary procedures (they are impossible to implement currently but it's nice to do the right thing anyway...). * app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimp/gimpui.c * app/display/gimpdisplayshell.c * app/gui/gui.c * app/gui/about-dialog.c * app/gui/color-notebook.c * app/gui/dialogs-constructors.c * app/gui/file-dialog-utils.[ch] * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/preferences-dialog.c * app/gui/tips-dialog.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimperrorconsole.c * app/widgets/gimphelp.[ch] * app/widgets/gimpmenufactory.[ch] * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/fp/fp_gtk.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_main.c: changed accordingly. Removed trailing whitespace all over the place.
2003-08-23 19:35:05 +00:00
GtkWidget *notebook;
GtkWidget *page;
changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const 2003-08-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const gchar *help_id". - added "gpointer help_data". * libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to gimp_help_connect(). Removed all fiddling with html links and treat all help IDs as opaque identifiers. * app/core/gimptoolinfo.[ch]: changed "help_data" member to "help_id". * app/widgets/gimpitemfactory.[ch]: removed the "help_path" parameter from gimp_item_factory_new() since we don't fiddle with html file paths any more. Simplifies menu item help a lot. Renamed "help_data" member of struct GimpItemFactoryEntry to "help_id". * app/gui/plug-in-menus.c: changed accordingly. 3rd party plug-ins' menu item help IDs are now encoded as "help_path:help_id". * app/gui/file-open-menu.c * app/gui/file-save-menu.c: when constructing the <Load> and <Save> menus, take the resp. procedures' locale_domain and help_path into account. Fixes translation of 3rd party menu items. Also do the right thing for load/save procs which are implemented as temporary procedures (they are impossible to implement currently but it's nice to do the right thing anyway...). * app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimp/gimpui.c * app/display/gimpdisplayshell.c * app/gui/gui.c * app/gui/about-dialog.c * app/gui/color-notebook.c * app/gui/dialogs-constructors.c * app/gui/file-dialog-utils.[ch] * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/preferences-dialog.c * app/gui/tips-dialog.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimperrorconsole.c * app/widgets/gimphelp.[ch] * app/widgets/gimpmenufactory.[ch] * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/fp/fp_gtk.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_main.c: changed accordingly. Removed trailing whitespace all over the place.
2003-08-23 19:35:05 +00:00
gint page_num;
prefs_box = g_object_get_data (G_OBJECT (help_data), "prefs-box");
notebook = gimp_prefs_box_get_notebook (GIMP_PREFS_BOX (prefs_box));
changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const 2003-08-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const gchar *help_id". - added "gpointer help_data". * libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to gimp_help_connect(). Removed all fiddling with html links and treat all help IDs as opaque identifiers. * app/core/gimptoolinfo.[ch]: changed "help_data" member to "help_id". * app/widgets/gimpitemfactory.[ch]: removed the "help_path" parameter from gimp_item_factory_new() since we don't fiddle with html file paths any more. Simplifies menu item help a lot. Renamed "help_data" member of struct GimpItemFactoryEntry to "help_id". * app/gui/plug-in-menus.c: changed accordingly. 3rd party plug-ins' menu item help IDs are now encoded as "help_path:help_id". * app/gui/file-open-menu.c * app/gui/file-save-menu.c: when constructing the <Load> and <Save> menus, take the resp. procedures' locale_domain and help_path into account. Fixes translation of 3rd party menu items. Also do the right thing for load/save procs which are implemented as temporary procedures (they are impossible to implement currently but it's nice to do the right thing anyway...). * app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimp/gimpui.c * app/display/gimpdisplayshell.c * app/gui/gui.c * app/gui/about-dialog.c * app/gui/color-notebook.c * app/gui/dialogs-constructors.c * app/gui/file-dialog-utils.[ch] * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/preferences-dialog.c * app/gui/tips-dialog.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimperrorconsole.c * app/widgets/gimphelp.[ch] * app/widgets/gimpmenufactory.[ch] * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/fp/fp_gtk.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_main.c: changed accordingly. Removed trailing whitespace all over the place.
2003-08-23 19:35:05 +00:00
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page_num);
help_id = g_object_get_data (G_OBJECT (page), "gimp-help-id");
changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const 2003-08-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const gchar *help_id". - added "gpointer help_data". * libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to gimp_help_connect(). Removed all fiddling with html links and treat all help IDs as opaque identifiers. * app/core/gimptoolinfo.[ch]: changed "help_data" member to "help_id". * app/widgets/gimpitemfactory.[ch]: removed the "help_path" parameter from gimp_item_factory_new() since we don't fiddle with html file paths any more. Simplifies menu item help a lot. Renamed "help_data" member of struct GimpItemFactoryEntry to "help_id". * app/gui/plug-in-menus.c: changed accordingly. 3rd party plug-ins' menu item help IDs are now encoded as "help_path:help_id". * app/gui/file-open-menu.c * app/gui/file-save-menu.c: when constructing the <Load> and <Save> menus, take the resp. procedures' locale_domain and help_path into account. Fixes translation of 3rd party menu items. Also do the right thing for load/save procs which are implemented as temporary procedures (they are impossible to implement currently but it's nice to do the right thing anyway...). * app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimp/gimpui.c * app/display/gimpdisplayshell.c * app/gui/gui.c * app/gui/about-dialog.c * app/gui/color-notebook.c * app/gui/dialogs-constructors.c * app/gui/file-dialog-utils.[ch] * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/preferences-dialog.c * app/gui/tips-dialog.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimperrorconsole.c * app/widgets/gimphelp.[ch] * app/widgets/gimpmenufactory.[ch] * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/fp/fp_gtk.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_main.c: changed accordingly. Removed trailing whitespace all over the place.
2003-08-23 19:35:05 +00:00
gimp_standard_help_func (help_id, NULL);
}
static void
prefs_message (GtkMessageType type,
gboolean destroy_with_parent,
const gchar *message)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (prefs_dialog),
destroy_with_parent ?
GTK_DIALOG_DESTROY_WITH_PARENT : 0,
type, GTK_BUTTONS_OK,
bumped minimum required version of GLib to 2.18.0. 2008-11-04 Sven Neumann <sven@sven> * configure.in: bumped minimum required version of GLib to 2.18.0. * INSTALL: document the updated dependency. * app/core/gimp.[ch]: introduced gimp_message_literal(), a variant of gimp_message() that takes a literal string. * app/errors.[ch]: removed format arguments from gimp_fatal_error() and gimp_terminate() and let them take a literal string instead. * app/tools/gimptool.[ch]: introduced gimp_tool_message_literal(), a variant of gimp_tool_message() that takes a literal string. * app/actions/documents-commands.c * app/actions/drawable-commands.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/gradients-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/plug-in-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c * app/config/gimprc.c * app/core/gimp-modules.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp-units.c * app/core/gimpchannel.c * app/core/gimpcontainer-filter.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpimage-convert.c * app/core/gimpimage-merge.c * app/core/gimpimage.c * app/core/gimpimagefile.c * app/core/gimplayer-floating-sel.c * app/core/gimplayer.c * app/core/gimpselection.c * app/dialogs/convert-dialog.c * app/dialogs/dialogs.c * app/dialogs/palette-import-dialog.c * app/dialogs/preferences-dialog.c * app/dialogs/quit-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/file/file-open.c * app/file/file-procedure.c * app/file/file-save.c * app/file/file-utils.c * app/gegl/gimpcurvesconfig.c * app/gegl/gimplevelsconfig.c * app/gui/gui-message.c * app/gui/gui.c * app/gui/session.c * app/paint/gimpbrushcore.c * app/paint/gimpclone.c * app/paint/gimpheal.c * app/paint/gimpperspectiveclone.c * app/paint/gimpsourcecore.c * app/pdb/gimppdb-utils.c * app/pdb/gimpprocedure.c * app/plug-in/gimpplugin-message.c * app/plug-in/gimpplugin.c * app/plug-in/gimppluginmanager-restore.c * app/plug-in/gimppluginprocedure.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimpaligntool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcurvestool.c * app/tools/gimpdesaturatetool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpforegroundselecttool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpgegltool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpimagemaptool-settings.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimppainttool.c * app/tools/gimpposterizetool.c * app/tools/gimpselectiontool.c * app/tools/gimpsourcetool.c * app/tools/gimpthresholdtool.c * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimpcontrollers.c * app/widgets/gimpdataeditor.c * app/widgets/gimpdevices.c * app/widgets/gimpdnd-xds.c * app/widgets/gimperrordialog.c * app/widgets/gimphelp.c * app/widgets/gimpitemtreeview.c * app/widgets/gimppdbdialog.c * app/widgets/gimpsettingsbox.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpwidgets-utils.c * app/xcf/xcf-load.c * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/image.pdb: use the _literal variants for g_set_error(), gimp_message() and gimp_tool_message(). * app/pdb/convert-cmds.c * app/pdb/edit-cmds.c * app/pdb/floating-sel-cmds.c * app/pdb/image-cmds.c: regenerated. svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
"%s", message);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_widget_show (dialog);
}
static GtkWidget *
app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 Sven Neumann <sven@gimp.org> * app/widgets/gimpdocked.[ch] * app/widgets/widgets-types.h: renamed GimpDockedIface to GimpDockedInterface. * app/display/gimpnavigationview.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerview.c * app/widgets/gimpeditor.c * app/widgets/gimpimageeditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimptooloptionseditor.c: changed accordingly. * app/config/config-types.h * app/config/gimpconfig.[ch] * app/config/gimpconfig-deserialize.[ch] * app/config/gimpconfig-serialize.[ch] * app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and changed the GimpConfig API to take GimpConfig instead of GObject pointers. * app/config/gimpconfig-dump.c * app/config/gimprc.c * app/config/test-config.c * app/core/gimp-documents.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp.[ch] * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdocumentlist.c * app/core/gimpgrid.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpparasitelist.c * app/core/gimptemplate.c * app/core/gimptooloptions.c * app/core/gimpviewable.c * app/gui/grid-dialog.c * app/gui/preferences-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tool-options-commands.c * app/paint/gimppaintcore.c * app/pdb/gimprc_cmds.c * app/text/gimptext-parasite.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimptexttool.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimptemplateview.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
prefs_dialog_new (Gimp *gimp,
GimpConfig *config)
{
GtkWidget *dialog;
GtkTreeIter top_iter;
GtkTreeIter child_iter;
GtkWidget *prefs_box;
GtkSizeGroup *size_group = NULL;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *vbox2;
GtkWidget *vbox3;
GtkWidget *button;
GtkWidget *button2;
GtkWidget *table;
GtkWidget *label;
GtkWidget *entry;
GtkWidget *calibrate_button;
GSList *group;
removed the grid parasite related functions from here ... 2003-10-10 Henrik Brix Andersen <brix@gimp.org> * app/core/gimpimage-grid.[ch]: removed the grid parasite related functions from here ... * app/core/gimpgrid.[ch]: ... and added them here. While I was at it I also changed PROP_TYPE to PROP_STYLE and added blurbs to the properties * app/xcf/xcf-load.c * app/display/gimpdisplayshell.c: changed accordingly * app/widgets/Makefile.am * po/POTFILES.in * app/widgets/widgets-types.h * app/widgets/gimpgrideditor.[ch]: added a new GimpGridEditor widget - with a work-around for the fact that gimp_prop_coordinated_new() doesn't accept boundaries * app/gui/grid-dialog.h * app/gui/grid-dialog.c (grid_dialog_new): use the new GimpGridEditor widget, take a GimpImage as function parameter, assume GimpImages always have a GimpGrid. This simplifies the grid dialog. * app/gui/image-commands.c (image_configure_grid_cmd_callback): changed accordingly * app/core/core-types.h: moved typedef GimpGrid from here ... * app/config/config-types.h: ... to here to be able to use it in GimpCoreConfig * app/config/gimprc-blurbs.h * app/config/gimpcoreconfig.[ch]: added default_grid member * app/widgets/gimphelp-ids.h * themes/Default/images/preferences/Makefile.am * themes/Default/images/default-grid.png * app/gui/preferences-dialog.c: added UI for specifying default image grid * app/core/gimpimage.c (gimp_image_new): create a GimpGrid from core_config->default_grid * app/gui/image-menu.c (image_menu_update): the grid/guide entries in <Image>/View/ should always be sensitive ... * app/display/gimpdisplayshell.c (gimp_display_shell_init): ... but the grid entries should be disabled by default
2003-10-10 14:11:47 +00:00
GtkWidget *editor;
gint i;
app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 Sven Neumann <sven@gimp.org> * app/widgets/gimpdocked.[ch] * app/widgets/widgets-types.h: renamed GimpDockedIface to GimpDockedInterface. * app/display/gimpnavigationview.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerview.c * app/widgets/gimpeditor.c * app/widgets/gimpimageeditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimptooloptionseditor.c: changed accordingly. * app/config/config-types.h * app/config/gimpconfig.[ch] * app/config/gimpconfig-deserialize.[ch] * app/config/gimpconfig-serialize.[ch] * app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and changed the GimpConfig API to take GimpConfig instead of GObject pointers. * app/config/gimpconfig-dump.c * app/config/gimprc.c * app/config/test-config.c * app/core/gimp-documents.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp.[ch] * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdocumentlist.c * app/core/gimpgrid.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpparasitelist.c * app/core/gimptemplate.c * app/core/gimptooloptions.c * app/core/gimpviewable.c * app/gui/grid-dialog.c * app/gui/preferences-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tool-options-commands.c * app/paint/gimppaintcore.c * app/pdb/gimprc_cmds.c * app/text/gimptext-parasite.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimptexttool.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimptemplateview.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
GObject *object;
GimpCoreConfig *core_config;
GimpDisplayConfig *display_config;
GList *manuals;
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 11:47:11 +00:00
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 Sven Neumann <sven@gimp.org> * app/widgets/gimpdocked.[ch] * app/widgets/widgets-types.h: renamed GimpDockedIface to GimpDockedInterface. * app/display/gimpnavigationview.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerview.c * app/widgets/gimpeditor.c * app/widgets/gimpimageeditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimptooloptionseditor.c: changed accordingly. * app/config/config-types.h * app/config/gimpconfig.[ch] * app/config/gimpconfig-deserialize.[ch] * app/config/gimpconfig-serialize.[ch] * app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and changed the GimpConfig API to take GimpConfig instead of GObject pointers. * app/config/gimpconfig-dump.c * app/config/gimprc.c * app/config/test-config.c * app/core/gimp-documents.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp.[ch] * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdocumentlist.c * app/core/gimpgrid.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpparasitelist.c * app/core/gimptemplate.c * app/core/gimptooloptions.c * app/core/gimpviewable.c * app/gui/grid-dialog.c * app/gui/preferences-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tool-options-commands.c * app/paint/gimppaintcore.c * app/pdb/gimprc_cmds.c * app/text/gimptext-parasite.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimptexttool.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimptemplateview.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
g_return_val_if_fail (GIMP_IS_CONFIG (config), NULL);
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 11:47:11 +00:00
app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 Sven Neumann <sven@gimp.org> * app/widgets/gimpdocked.[ch] * app/widgets/widgets-types.h: renamed GimpDockedIface to GimpDockedInterface. * app/display/gimpnavigationview.c * app/widgets/gimpcoloreditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainerview.c * app/widgets/gimpeditor.c * app/widgets/gimpimageeditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimptooloptionseditor.c: changed accordingly. * app/config/config-types.h * app/config/gimpconfig.[ch] * app/config/gimpconfig-deserialize.[ch] * app/config/gimpconfig-serialize.[ch] * app/config/gimpconfig-utils.[ch]: added a GimpConfig typedef and changed the GimpConfig API to take GimpConfig instead of GObject pointers. * app/config/gimpconfig-dump.c * app/config/gimprc.c * app/config/test-config.c * app/core/gimp-documents.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp.[ch] * app/core/gimpcontainer.c * app/core/gimpcontext.c * app/core/gimpdocumentlist.c * app/core/gimpgrid.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpparasitelist.c * app/core/gimptemplate.c * app/core/gimptooloptions.c * app/core/gimpviewable.c * app/gui/grid-dialog.c * app/gui/preferences-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tool-options-commands.c * app/paint/gimppaintcore.c * app/pdb/gimprc_cmds.c * app/text/gimptext-parasite.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimptexttool.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimptemplateview.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly.
2003-10-11 14:30:18 +00:00
object = G_OBJECT (config);
core_config = GIMP_CORE_CONFIG (config);
display_config = GIMP_DISPLAY_CONFIG (config);
dialog = gimp_dialog_new (_("Preferences"), "gimp-preferences",
removed our own action_area API and use GtkDialog's one. Create all 2003-11-06 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpdialog.[ch]: removed our own action_area API and use GtkDialog's one. Create all dialogs without separator. Changed almost everything else too. Fixes bug #125143. * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c: changed accordingly. * libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType to GimpExportReturn. * libgimp/gimpcompat.h: added a #define for the old name. * themes/Default/gtkrc: increased action_area border to 6 pixels. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-scale.c * app/display/gimpprogress.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-new-dialog.c * app/gui/font-select.c * app/gui/gradient-editor-commands.c * app/gui/gradient-select.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/user-install-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptexteditor.c * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpwidgets-utils.c: changed accordingly and increased the dialogs' outer borders to 6 pixels all over the place. * plug-ins/*/*.c: changed accordingly. The plug-ins may be arbitrarily broken, I tested none of them.
2003-11-06 15:27:05 +00:00
NULL, 0,
prefs_help_func,
GIMP_HELP_PREFS_DIALOG,
_("_Reset"), RESPONSE_RESET,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_OK"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (dialog, "response",
G_CALLBACK (prefs_response),
dialog);
/* The prefs box */
prefs_box = gimp_prefs_box_new ();
gtk_container_set_border_width (GTK_CONTAINER (prefs_box), 12);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
prefs_box, TRUE, TRUE, 0);
gtk_widget_show (prefs_box);
g_object_set_data (G_OBJECT (dialog), "prefs-box", prefs_box);
/**********************/
/* System Resources */
/**********************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-system-resources",
_("System Resources"),
_("System Resources"),
GIMP_HELP_PREFS_SYSTEM_RESOURCES,
NULL,
&top_iter);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
vbox2 = prefs_frame_new (_("Resource Consumption"),
GTK_CONTAINER (vbox), FALSE);
#ifdef ENABLE_MP
table = prefs_table_new (5, GTK_CONTAINER (vbox2));
#else
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
#endif /* ENABLE_MP */
prefs_spin_button_add (object, "undo-levels", 1.0, 5.0, 0,
_("Minimal number of _undo levels:"),
GTK_TABLE (table), 0, size_group);
prefs_memsize_entry_add (object, "undo-size",
_("Maximum undo _memory:"),
GTK_TABLE (table), 1, size_group);
prefs_memsize_entry_add (object, "tile-cache-size",
_("Tile cache _size:"),
GTK_TABLE (table), 2, size_group);
prefs_memsize_entry_add (object, "max-new-image-size",
_("Maximum _new image size:"),
GTK_TABLE (table), 3, size_group);
#ifdef ENABLE_MP
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
_("Number of _threads to use:"),
GTK_TABLE (table), 4, size_group);
vbox2 = g_object_new (GIMP_TYPE_HINT_BOX,
"icon-name", GIMP_ICON_DIALOG_WARNING,
"hint", _("Threading support is not yet stable.\n"
"Setting this to greater than one might\n"
"result in image errors or crashes."),
NULL);
gtk_table_attach (GTK_TABLE (table), vbox2, 1, 2, 5, 6,
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
gtk_widget_show (vbox2);
#endif /* ENABLE_MP */
/* Hardware Acceleration */
vbox2 = prefs_frame_new (_("Hardware Acceleration"), GTK_CONTAINER (vbox),
FALSE);
prefs_check_button_add (object, "use-opencl",
_("Use OpenCL"),
GTK_BOX (vbox2));
/* Image Thumbnails */
vbox2 = prefs_frame_new (_("Image Thumbnails"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "thumbnail-size", 0, 0,
_("Size of _thumbnails:"),
GTK_TABLE (table), 0, size_group);
prefs_memsize_entry_add (object, "thumbnail-filesize-limit",
_("Maximum _filesize for thumbnailing:"),
GTK_TABLE (table), 1, size_group);
removed the grid parasite related functions from here ... 2003-10-10 Henrik Brix Andersen <brix@gimp.org> * app/core/gimpimage-grid.[ch]: removed the grid parasite related functions from here ... * app/core/gimpgrid.[ch]: ... and added them here. While I was at it I also changed PROP_TYPE to PROP_STYLE and added blurbs to the properties * app/xcf/xcf-load.c * app/display/gimpdisplayshell.c: changed accordingly * app/widgets/Makefile.am * po/POTFILES.in * app/widgets/widgets-types.h * app/widgets/gimpgrideditor.[ch]: added a new GimpGridEditor widget - with a work-around for the fact that gimp_prop_coordinated_new() doesn't accept boundaries * app/gui/grid-dialog.h * app/gui/grid-dialog.c (grid_dialog_new): use the new GimpGridEditor widget, take a GimpImage as function parameter, assume GimpImages always have a GimpGrid. This simplifies the grid dialog. * app/gui/image-commands.c (image_configure_grid_cmd_callback): changed accordingly * app/core/core-types.h: moved typedef GimpGrid from here ... * app/config/config-types.h: ... to here to be able to use it in GimpCoreConfig * app/config/gimprc-blurbs.h * app/config/gimpcoreconfig.[ch]: added default_grid member * app/widgets/gimphelp-ids.h * themes/Default/images/preferences/Makefile.am * themes/Default/images/default-grid.png * app/gui/preferences-dialog.c: added UI for specifying default image grid * app/core/gimpimage.c (gimp_image_new): create a GimpGrid from core_config->default_grid * app/gui/image-menu.c (image_menu_update): the grid/guide entries in <Image>/View/ should always be sensitive ... * app/display/gimpdisplayshell.c (gimp_display_shell_init): ... but the grid entries should be disabled by default
2003-10-10 14:11:47 +00:00
g_object_unref (size_group);
size_group = NULL;
removed the grid parasite related functions from here ... 2003-10-10 Henrik Brix Andersen <brix@gimp.org> * app/core/gimpimage-grid.[ch]: removed the grid parasite related functions from here ... * app/core/gimpgrid.[ch]: ... and added them here. While I was at it I also changed PROP_TYPE to PROP_STYLE and added blurbs to the properties * app/xcf/xcf-load.c * app/display/gimpdisplayshell.c: changed accordingly * app/widgets/Makefile.am * po/POTFILES.in * app/widgets/widgets-types.h * app/widgets/gimpgrideditor.[ch]: added a new GimpGridEditor widget - with a work-around for the fact that gimp_prop_coordinated_new() doesn't accept boundaries * app/gui/grid-dialog.h * app/gui/grid-dialog.c (grid_dialog_new): use the new GimpGridEditor widget, take a GimpImage as function parameter, assume GimpImages always have a GimpGrid. This simplifies the grid dialog. * app/gui/image-commands.c (image_configure_grid_cmd_callback): changed accordingly * app/core/core-types.h: moved typedef GimpGrid from here ... * app/config/config-types.h: ... to here to be able to use it in GimpCoreConfig * app/config/gimprc-blurbs.h * app/config/gimpcoreconfig.[ch]: added default_grid member * app/widgets/gimphelp-ids.h * themes/Default/images/preferences/Makefile.am * themes/Default/images/default-grid.png * app/gui/preferences-dialog.c: added UI for specifying default image grid * app/core/gimpimage.c (gimp_image_new): create a GimpGrid from core_config->default_grid * app/gui/image-menu.c (image_menu_update): the grid/guide entries in <Image>/View/ should always be sensitive ... * app/display/gimpdisplayshell.c (gimp_display_shell_init): ... but the grid entries should be disabled by default
2003-10-10 14:11:47 +00:00
/* Document History */
vbox2 = prefs_frame_new (_("Document History"), GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "save-document-history",
_("Keep record of used files in the Recent Documents list"),
GTK_BOX (vbox2));
removed the grid parasite related functions from here ... 2003-10-10 Henrik Brix Andersen <brix@gimp.org> * app/core/gimpimage-grid.[ch]: removed the grid parasite related functions from here ... * app/core/gimpgrid.[ch]: ... and added them here. While I was at it I also changed PROP_TYPE to PROP_STYLE and added blurbs to the properties * app/xcf/xcf-load.c * app/display/gimpdisplayshell.c: changed accordingly * app/widgets/Makefile.am * po/POTFILES.in * app/widgets/widgets-types.h * app/widgets/gimpgrideditor.[ch]: added a new GimpGridEditor widget - with a work-around for the fact that gimp_prop_coordinated_new() doesn't accept boundaries * app/gui/grid-dialog.h * app/gui/grid-dialog.c (grid_dialog_new): use the new GimpGridEditor widget, take a GimpImage as function parameter, assume GimpImages always have a GimpGrid. This simplifies the grid dialog. * app/gui/image-commands.c (image_configure_grid_cmd_callback): changed accordingly * app/core/core-types.h: moved typedef GimpGrid from here ... * app/config/config-types.h: ... to here to be able to use it in GimpCoreConfig * app/config/gimprc-blurbs.h * app/config/gimpcoreconfig.[ch]: added default_grid member * app/widgets/gimphelp-ids.h * themes/Default/images/preferences/Makefile.am * themes/Default/images/default-grid.png * app/gui/preferences-dialog.c: added UI for specifying default image grid * app/core/gimpimage.c (gimp_image_new): create a GimpGrid from core_config->default_grid * app/gui/image-menu.c (image_menu_update): the grid/guide entries in <Image>/View/ should always be sensitive ... * app/display/gimpdisplayshell.c (gimp_display_shell_init): ... but the grid entries should be disabled by default
2003-10-10 14:11:47 +00:00
/***************/
/* Debugging */
/***************/
/* No debugging preferences are needed on win32. Either GIMP has been
* built with DrMinGW support (HAVE_EXCHNDL) or not. If it has, then
* the backtracing is enabled and can't be disabled. It assume it will
* work only upon a crash.
*/
#ifndef G_OS_WIN32
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-wilber-eek", /* TODO: icon needed. */
_("Debugging"),
_("Debugging"),
GIMP_HELP_PREFS_DEBUGGING,
NULL,
&top_iter);
hbox = g_object_new (GIMP_TYPE_HINT_BOX,
"icon-name", GIMP_ICON_DIALOG_WARNING,
"hint", _("We hope you will never need these "
"settings, but as all software, GIMP "
"has bugs, and crashes can occur. If it "
"happens, you can help us by reporting "
"bugs."),
NULL);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
vbox2 = prefs_frame_new (_("Bug Reporting"),
GTK_CONTAINER (vbox), FALSE);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "debug-policy", 0, 0,
_("Try generating debug data for bug reporting when appropriate"),
GTK_TABLE (table), 0, size_group);
#ifndef HAVE_EXECINFO_H
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
_("This feature requires \"gdb\" or \"lldb\" installed on your system."));
gtk_widget_set_sensitive (button, FALSE);
g_signal_connect (button, "notify::sensitive",
G_CALLBACK (prefs_notify_sensitive_debug),
hbox);
#else
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
_("This feature is more efficient with \"gdb\" or \"lldb\" installed on your system."));
#endif /* ! HAVE_EXECINFO_H */
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
/* Check existence of gdb or lldb to activate the preference, as a
* good hint of its prerequisite, unless backtrace() API exists, in
* which case the feature is always available.
*/
{
gchar *args[3] = { "gdb", "--version", NULL};
GPid pid;
if (g_spawn_async (NULL, args, NULL,
G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH |
G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, &pid, NULL))
{
#ifndef HAVE_EXECINFO_H
g_child_watch_add (pid,
(GChildWatchFunc) prefs_sensitive_debug_on_success,
button);
#else
g_child_watch_add (pid,
(GChildWatchFunc) prefs_hide_widget_on_success,
hbox);
#endif
}
else
{
args[0] = "lldb";
if (g_spawn_async (NULL, args, NULL,
G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH |
G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, &pid, NULL))
{
#ifndef HAVE_EXECINFO_H
g_child_watch_add (pid,
(GChildWatchFunc) prefs_sensitive_debug_on_success,
button);
#else
g_child_watch_add (pid,
(GChildWatchFunc) prefs_hide_widget_on_success,
hbox);
#endif
}
}
}
#endif /* ! G_OS_WIN32 */
/**********************/
/* Color Management */
/**********************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-color-management",
_("Color Management"),
_("Color Management"),
GIMP_HELP_PREFS_COLOR_MANAGEMENT,
NULL,
&top_iter);
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
button = gimp_prefs_box_set_page_resettable (GIMP_PREFS_BOX (prefs_box),
vbox,
_("Reset Color Management"));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_color_management_reset),
config);
{
GObject *color_config = G_OBJECT (core_config->color_management);
GtkListStore *store;
gchar *filename;
gint row = 0;
filename = gimp_personal_rc_file ("profilerc");
store = gimp_color_profile_store_new (filename);
g_free (filename);
gimp_color_profile_store_add_file (GIMP_COLOR_PROFILE_STORE (store),
NULL, NULL);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
table = prefs_table_new (1, GTK_CONTAINER (vbox));
prefs_enum_combo_box_add (color_config, "mode", 0, 0,
_("Image display _mode:"),
GTK_TABLE (table), row++, NULL);
/* Color Managed Display */
vbox2 = prefs_frame_new (_("Color Managed Display"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
row = 0;
prefs_profile_combo_box_add (color_config,
"display-profile",
store,
_("Select Monitor Color Profile"),
_("_Monitor profile:"),
GTK_TABLE (table), row++, size_group,
object, "color-profile-path");
button = gimp_prop_check_button_new (color_config,
"display-profile-from-gdk",
_("_Try to use the system monitor "
"profile"));
gtk_table_attach_defaults (GTK_TABLE (table),
button, 1, 2, row, row + 1);
gtk_widget_show (button);
row++;
prefs_enum_combo_box_add (color_config,
"display-rendering-intent", 0, 0,
_("_Rendering intent:"),
GTK_TABLE (table), row++, size_group);
button = gimp_prop_check_button_new (color_config,
"display-use-black-point-compensation",
_("Use _black point compensation"));
gtk_table_attach_defaults (GTK_TABLE (table),
button, 1, 2, row, row + 1);
gtk_widget_show (button);
row++;
prefs_boolean_combo_box_add (color_config,
"display-optimize",
_("Speed"),
_("Precision / Color Fidelity"),
_("_Optimize image display for:"),
GTK_TABLE (table), row++, size_group);
/* Print Simulation (Soft-proofing) */
vbox2 = prefs_frame_new (_("Soft-Proofing"),
GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
row = 0;
prefs_profile_combo_box_add (color_config,
"printer-profile",
store,
_("Select Soft-Proofing Color Profile"),
_("_Soft-proofing profile:"),
GTK_TABLE (table), row++, size_group,
object, "color-profile-path");
prefs_enum_combo_box_add (color_config,
"simulation-rendering-intent", 0, 0,
_("Re_ndering intent:"),
GTK_TABLE (table), row++, size_group);
button = gimp_prop_check_button_new (color_config,
"simulation-use-black-point-compensation",
_("Use black _point compensation"));
gtk_table_attach_defaults (GTK_TABLE (table),
button, 1, 2, row, row + 1);
gtk_widget_show (button);
row++;
prefs_boolean_combo_box_add (color_config,
"simulation-optimize",
_("Speed"),
_("Precision / Color Fidelity"),
_("O_ptimize soft-proofing for:"),
GTK_TABLE (table), row++, size_group);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, row, row + 1);
gtk_widget_show (hbox);
row++;
button = gimp_prop_check_button_new (color_config, "simulation-gamut-check",
_("Mark out of gamut colors"));
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
gtk_widget_show (button);
button = gimp_prop_color_button_new (color_config, "out-of-gamut-color",
_("Select Warning Color"),
PREFS_COLOR_BUTTON_WIDTH,
PREFS_COLOR_BUTTON_HEIGHT,
GIMP_COLOR_AREA_FLAT);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
gimp_get_user_context (gimp));
/* Preferred profiles */
vbox2 = prefs_frame_new (_("Preferred Profiles"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
row = 0;
prefs_profile_combo_box_add (color_config,
"rgb-profile",
store,
_("Select Preferred RGB Color Profile"),
_("_RGB profile:"),
GTK_TABLE (table), row++, size_group,
object, "color-profile-path");
prefs_profile_combo_box_add (color_config,
"gray-profile",
store,
_("Select Preferred Grayscale Color Profile"),
_("_Grayscale profile:"),
GTK_TABLE (table), row++, size_group,
object, "color-profile-path");
prefs_profile_combo_box_add (color_config,
"cmyk-profile",
store,
_("Select CMYK Color Profile"),
_("_CMYK profile:"),
GTK_TABLE (table), row++, size_group,
object, "color-profile-path");
/* Policies */
vbox2 = prefs_frame_new (_("Policies"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
_("File Open behaviour:"),
GTK_TABLE (table), 0, size_group);
/* Filter Dialogs */
vbox2 = prefs_frame_new (_("Filter Dialogs"), GTK_CONTAINER (vbox),
FALSE);
button = prefs_check_button_add (object, "filter-tool-show-color-options",
_("Show advanced color options"),
GTK_BOX (vbox2));
g_object_unref (size_group);
g_object_unref (store);
}
/***************************/
/* Image Import / Export */
/***************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-import-export",
_("Image Import & Export"),
_("Image Import & Export"),
GIMP_HELP_PREFS_DIALOG,
NULL,
&top_iter);
/* Import Policies */
vbox2 = prefs_frame_new (_("Import Policies"),
GTK_CONTAINER (vbox), FALSE);
button = prefs_check_button_add (object, "import-promote-float",
_("Promote imported images to "
2017-01-26 02:22:37 +03:00
"_floating point precision"),
GTK_BOX (vbox2));
vbox3 = prefs_frame_new (NULL, GTK_CONTAINER (vbox2), FALSE);
button = prefs_check_button_add (object, "import-promote-dither",
_("Dither images when promoting to "
"floating point"),
GTK_BOX (vbox3));
button = prefs_check_button_add (object, "import-add-alpha",
_("Add an alpha channel to imported images"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
_("Color profile policy:"),
GTK_TABLE (table), 0, NULL);
/* Export Policies */
vbox2 = prefs_frame_new (_("Export Policies"),
GTK_CONTAINER (vbox), FALSE);
button = prefs_check_button_add (object, "export-metadata-exif",
_("Export Exif metadata by default when available"),
GTK_BOX (vbox2));
button = prefs_check_button_add (object, "export-metadata-xmp",
_("Export XMP metadata by default when available"),
GTK_BOX (vbox2));
button = prefs_check_button_add (object, "export-metadata-iptc",
_("Export IPTC metadata by default when available"),
GTK_BOX (vbox2));
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
_("Metadata can contain sensitive information."));
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
/* Raw Image Importer */
vbox2 = prefs_frame_new (_("Raw Image Importer"),
GTK_CONTAINER (vbox), TRUE);
{
GtkWidget *scrolled_window;
GtkWidget *view;
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (scrolled_window);
view = gimp_plug_in_view_new (gimp->plug_in_manager->raw_load_procs);
gimp_plug_in_view_set_plug_in (GIMP_PLUG_IN_VIEW (view),
core_config->import_raw_plug_in);
gtk_container_add (GTK_CONTAINER (scrolled_window), view);
gtk_widget_show (view);
g_signal_connect (view, "changed",
G_CALLBACK (prefs_import_raw_procedure_callback),
config);
}
/****************/
/* Playground */
/****************/
if (gimp->show_playground)
{
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-playground",
_("Experimental Playground"),
_("Playground"),
GIMP_HELP_PREFS_DIALOG,
NULL,
&top_iter);
vbox2 = prefs_frame_new (_("Insane Options"),
GTK_CONTAINER (vbox), TRUE);
button = prefs_check_button_add (object, "playground-npd-tool",
_("_N-Point Deformation tool"),
GTK_BOX (vbox2));
button = prefs_check_button_add (object, "playground-seamless-clone-tool",
_("_Seamless Clone tool"),
GTK_BOX (vbox2));
}
/******************/
/* Tool Options */
/******************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-tool-options",
C_("preferences", "Tool Options"),
C_("preferences", "Tool Options"),
GIMP_HELP_PREFS_TOOL_OPTIONS,
NULL,
&top_iter);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* General */
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "save-tool-options",
_("_Save tool options on exit"),
GTK_BOX (vbox2));
button = prefs_button_add (GIMP_ICON_DOCUMENT_SAVE,
_("Save Tool Options _Now"),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_tool_options_save_callback),
gimp);
button2 = prefs_button_add (GIMP_ICON_RESET,
_("_Reset Saved Tool Options to "
"Default Values"),
GTK_BOX (vbox2));
g_signal_connect (button2, "clicked",
G_CALLBACK (prefs_tool_options_clear_callback),
gimp);
g_object_set_data (G_OBJECT (button), "clear-button", button2);
/* Scaling */
vbox2 = prefs_frame_new (_("Scaling"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "interpolation-type", 0, 0,
_("Default _interpolation:"),
GTK_TABLE (table), 0, size_group);
g_object_unref (size_group);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* Global Brush, Pattern, ... */
vbox2 = prefs_frame_new (_("Paint Options Shared Between Tools"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add_with_icon (object, "global-brush",
_("_Brush"), GIMP_ICON_BRUSH,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "global-dynamics",
_("_Dynamics"), GIMP_ICON_DYNAMICS,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "global-pattern",
_("_Pattern"), GIMP_ICON_PATTERN,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "global-gradient",
_("_Gradient"), GIMP_ICON_GRADIENT,
GTK_BOX (vbox2), size_group);
/* Move Tool */
vbox2 = prefs_frame_new (_("Move Tool"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add_with_icon (object, "move-tool-changes-active",
_("Set layer or path as active"),
GIMP_ICON_TOOL_MOVE,
GTK_BOX (vbox2), size_group);
g_object_unref (size_group);
size_group = NULL;
/*******************/
/* Default Image */
/*******************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-new-image",
_("Default New Image"),
_("Default Image"),
GIMP_HELP_PREFS_NEW_IMAGE,
NULL,
&top_iter);
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
table = prefs_table_new (1, GTK_CONTAINER (vbox));
{
GtkWidget *combo;
combo = gimp_container_combo_box_new (gimp->templates,
gimp_get_user_context (gimp),
16, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Template:"), 0.0, 0.5,
combo, 1, FALSE);
gimp_container_view_select_item (GIMP_CONTAINER_VIEW (combo), NULL);
g_signal_connect (combo, "select-item",
G_CALLBACK (prefs_template_select_callback),
core_config->default_image);
}
editor = gimp_template_editor_new (core_config->default_image, gimp, FALSE);
gimp_template_editor_show_advanced (GIMP_TEMPLATE_EDITOR (editor), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), editor, FALSE, FALSE, 0);
gtk_widget_show (editor);
/* Quick Mask Color */
vbox2 = prefs_frame_new (_("Quick Mask"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_color_button_add (object, "quick-mask-color",
_("Quick Mask color:"),
_("Set the default Quick Mask color"),
GTK_TABLE (table), 0, NULL,
gimp_get_user_context (gimp));
/**********************************/
/* Default Image / Default Grid */
/**********************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-default-grid",
_("Default Image Grid"),
_("Default Grid"),
GIMP_HELP_PREFS_DEFAULT_GRID,
&top_iter,
&child_iter);
/* Grid */
editor = gimp_grid_editor_new (core_config->default_grid,
gimp_get_user_context (gimp),
gimp_template_get_resolution_x (core_config->default_image),
gimp_template_get_resolution_y (core_config->default_image));
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
/***************/
/* Interface */
/***************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-interface",
_("User Interface"),
_("Interface"),
GIMP_HELP_PREFS_INTERFACE,
NULL,
&top_iter);
/* Language */
/* Only add the language entry if the iso-codes package is available. */
#ifdef HAVE_ISO_CODES
vbox2 = prefs_frame_new (_("Language"), GTK_CONTAINER (vbox), FALSE);
prefs_language_combo_box_add (object, "language", GTK_BOX (vbox2));
#endif
/* Previews */
vbox2 = prefs_frame_new (_("Previews"), GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "layer-previews",
_("_Enable layer & channel previews"),
GTK_BOX (vbox2));
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-preview-size", 0, 0,
_("_Default layer & channel preview size:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "undo-preview-size", 0, 0,
_("_Undo preview size:"),
GTK_TABLE (table), 1, size_group);
prefs_enum_combo_box_add (object, "navigation-preview-size", 0, 0,
_("Na_vigation preview size:"),
GTK_TABLE (table), 2, size_group);
/* Keyboard Shortcuts */
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "can-change-accels",
_("_Use dynamic keyboard shortcuts"),
GTK_BOX (vbox2));
button = prefs_button_add (GIMP_ICON_PREFERENCES_SYSTEM,
_("Configure _Keyboard Shortcuts..."),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_keyboard_shortcuts_dialog),
gimp);
prefs_check_button_add (object, "save-accels",
_("_Save keyboard shortcuts on exit"),
GTK_BOX (vbox2));
button = prefs_button_add (GIMP_ICON_DOCUMENT_SAVE,
_("Save Keyboard Shortcuts _Now"),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_menus_save_callback),
gimp);
button2 = prefs_button_add (GIMP_ICON_RESET,
_("_Reset Keyboard Shortcuts to Default Values"),
GTK_BOX (vbox2));
g_signal_connect (button2, "clicked",
G_CALLBACK (prefs_menus_clear_callback),
gimp);
g_object_set_data (G_OBJECT (button), "clear-button", button2);
button = prefs_button_add (GIMP_ICON_EDIT_CLEAR,
_("Remove _All Keyboard Shortcuts"),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_menus_remove_callback),
gimp);
/***********************/
/* Interface / Theme */
/***********************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-theme",
_("Theme"),
_("Theme"),
GIMP_HELP_PREFS_THEME,
&top_iter,
&child_iter);
vbox2 = prefs_frame_new (_("Select Theme"), GTK_CONTAINER (vbox), TRUE);
{
GtkWidget *scrolled_win;
GtkListStore *list_store;
GtkWidget *view;
GtkTreeSelection *sel;
gchar **themes;
gint n_themes;
gint i;
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_size_request (scrolled_win, -1, 80);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
gtk_widget_show (scrolled_win);
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
gtk_container_add (GTK_CONTAINER (scrolled_win), view);
gtk_widget_show (view);
g_object_unref (list_store);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
_("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);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
themes = themes_list_themes (gimp, &n_themes);
for (i = 0; i < n_themes; i++)
{
GtkTreeIter iter;
GFile *theme_dir = themes_get_theme_dir (gimp, themes[i]);
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
0, themes[i],
1, gimp_file_get_utf8_name (theme_dir),
-1);
if (GIMP_GUI_CONFIG (object)->theme &&
! strcmp (GIMP_GUI_CONFIG (object)->theme, themes[i]))
{
GtkTreePath *path;
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
NULL, FALSE, 0.0, 0.0);
gtk_tree_path_free (path);
}
}
g_strfreev (themes);
g_signal_connect (sel, "changed",
G_CALLBACK (prefs_theme_select_callback),
gimp);
}
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
button = prefs_button_add (GIMP_ICON_VIEW_REFRESH,
_("Reload C_urrent Theme"),
GTK_BOX (hbox));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_theme_reload_callback),
gimp);
/****************************/
/* Interface / Icon Theme */
/****************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-icon-theme",
_("Icon Theme"),
_("Icon Theme"),
GIMP_HELP_PREFS_ICON_THEME,
&top_iter,
&child_iter);
vbox2 = prefs_frame_new (_("Select an Icon Theme"), GTK_CONTAINER (vbox), TRUE);
{
GtkWidget *scrolled_win;
GtkWidget *icon_size_scale;
GtkListStore *list_store;
GtkWidget *view;
GtkTreeSelection *sel;
gchar **icon_themes;
gint n_icon_themes;
gint i;
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_size_request (scrolled_win, -1, 80);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
gtk_widget_show (scrolled_win);
list_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
gtk_container_add (GTK_CONTAINER (scrolled_win), view);
gtk_widget_show (view);
g_object_unref (list_store);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 0,
NULL,
gtk_cell_renderer_pixbuf_new (),
"pixbuf", 0,
NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 1,
_("Icon Theme"),
gtk_cell_renderer_text_new (),
"text", 1,
NULL);
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 2,
_("Folder"),
gtk_cell_renderer_text_new (),
"text", 2,
NULL);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
icon_themes = icon_themes_list_themes (gimp, &n_icon_themes);
for (i = 0; i < n_icon_themes; i++)
{
GtkTreeIter iter;
GFile *icon_theme_dir = icon_themes_get_theme_dir (gimp, icon_themes[i]);
GFile *icon_theme_search_path = g_file_get_parent (icon_theme_dir);
GtkIconTheme *theme;
gchar *example;
GdkPixbuf *pixbuf;
theme = gtk_icon_theme_new ();
gtk_icon_theme_prepend_search_path (theme, gimp_file_get_utf8_name(icon_theme_search_path));
g_object_unref (icon_theme_search_path);
gtk_icon_theme_set_custom_theme (theme, icon_themes[i]);
example = gtk_icon_theme_get_example_icon_name (theme);
if (! example)
{
/* If the icon theme didn't explicitly specify an example
* icon, try "gimp-wilber".
*/
example = g_strdup ("gimp-wilber");
}
pixbuf = gtk_icon_theme_load_icon (theme, example, 16, 0, NULL);
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
0, pixbuf,
1, icon_themes[i],
2, gimp_file_get_utf8_name (icon_theme_dir),
-1);
g_object_unref (theme);
g_object_unref (pixbuf);
g_free (example);
if (GIMP_GUI_CONFIG (object)->icon_theme &&
! strcmp (GIMP_GUI_CONFIG (object)->icon_theme, icon_themes[i]))
{
GtkTreePath *path;
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
NULL, FALSE, 0.0, 0.0);
gtk_tree_path_free (path);
}
}
g_strfreev (icon_themes);
g_signal_connect (sel, "changed",
G_CALLBACK (prefs_icon_theme_select_callback),
gimp);
icon_size_scale = gimp_icon_size_scale_new (gimp);
gtk_box_pack_start (GTK_BOX (vbox), icon_size_scale, FALSE, FALSE, 0);
gtk_widget_show (icon_size_scale);
}
/*************************/
/* Interface / Toolbox */
/*************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-toolbox",
_("Toolbox"),
_("Toolbox"),
GIMP_HELP_PREFS_TOOLBOX,
&top_iter,
&child_iter);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* Appearance */
vbox2 = prefs_frame_new (_("Appearance"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add_with_icon (object, "toolbox-wilber",
_("Show GIMP _logo (drag-and-drop target)"),
GIMP_ICON_WILBER,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "toolbox-color-area",
_("Show _foreground & background color"),
GIMP_ICON_COLORS_DEFAULT,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "toolbox-foo-area",
_("Show active _brush, pattern & gradient"),
GIMP_ICON_BRUSH,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "toolbox-image-area",
_("Show active _image"),
GIMP_ICON_IMAGE,
GTK_BOX (vbox2), size_group);
g_object_unref (size_group);
size_group = NULL;
/* Tool Editor */
vbox2 = prefs_frame_new (_("Tools Configuration"),
GTK_CONTAINER (vbox), TRUE);
tool_editor = gimp_tool_editor_new (gimp->tool_info_list, gimp->user_context,
gimp_tools_get_default_order (gimp),
GIMP_VIEW_SIZE_SMALL, 1);
gtk_box_pack_start (GTK_BOX (vbox2), tool_editor, TRUE, TRUE, 0);
gtk_widget_show (tool_editor);
/*********************************/
/* Interface / Dialog Defaults */
/*********************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
/* FIXME need an icon */
"gimp-prefs-controllers",
_("Dialog Defaults"),
_("Dialog Defaults"),
GIMP_HELP_PREFS_DIALOG_DEFAULTS,
&top_iter,
&child_iter);
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
button = gimp_prefs_box_set_page_resettable (GIMP_PREFS_BOX (prefs_box),
vbox,
_("Reset Dialog Defaults"));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_dialog_defaults_reset),
config);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* Color profile import dialog */
vbox2 = prefs_frame_new (_("Color Profile Import Dialog"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
_("Color profile policy:"),
GTK_TABLE (table), 0, size_group);
/* All color profile chooser dialogs */
vbox2 = prefs_frame_new (_("Color Profile File Dialogs"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_file_chooser_button_add (object, "color-profile-path",
_("Profile folder:"),
_("Select Default Folder for Color Profiles"),
GTK_TABLE (table), 0, size_group);
/* Convert to Color Profile Dialog */
vbox2 = prefs_frame_new (_("Convert to Color Profile Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-convert-profile-intent", 0, 0,
_("Rendering intent:"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "image-convert-profile-black-point-compensation",
_("Black point compensation"),
GTK_BOX (vbox2));
/* Convert Precision Dialog */
vbox2 = prefs_frame_new (_("Precision Conversion Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object,
"image-convert-precision-layer-dither-method",
0, 0,
_("Dither layers:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object,
"image-convert-precision-text-layer-dither-method",
0, 0,
_("Dither text layers:"),
GTK_TABLE (table), 1, size_group);
prefs_enum_combo_box_add (object,
"image-convert-precision-channel-dither-method",
0, 0,
_("Dither channels/masks:"),
GTK_TABLE (table), 2, size_group);
/* Convert Indexed Dialog */
vbox2 = prefs_frame_new (_("Indexed Conversion Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-convert-indexed-palette-type", 0, 0,
_("Colormap:"),
GTK_TABLE (table), 0, size_group);
prefs_spin_button_add (object, "image-convert-indexed-max-colors", 1.0, 8.0, 0,
_("Maximum number of colors:"),
GTK_TABLE (table), 1, size_group);
prefs_check_button_add (object, "image-convert-indexed-remove-duplicates",
_("Remove unused and duplicate colors "
"from colormap"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-convert-indexed-dither-type", 0, 0,
_("Color dithering:"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "image-convert-indexed-dither-alpha",
_("Enable dithering of transparency"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "image-convert-indexed-dither-text-layers",
_("Enable dithering of text layers"),
GTK_BOX (vbox2));
/* Canvas Size Dialog */
vbox2 = prefs_frame_new (_("Canvas Size Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-resize-fill-type", 0, 0,
_("Fill with:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "image-resize-layer-set", 0, 0,
_("Resize layers:"),
GTK_TABLE (table), 1, size_group);
prefs_check_button_add (object, "image-resize-resize-text-layers",
_("Resize text layers"),
GTK_BOX (vbox2));
/* New Layer Dialog */
vbox2 = prefs_frame_new (_("New Layer Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_entry_add (object, "layer-new-name",
_("Layer name:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "layer-new-fill-type", 0, 0,
_("Fill type:"),
GTK_TABLE (table), 1, size_group);
/* Layer Boundary Size Dialog */
vbox2 = prefs_frame_new (_("Layer Boundary Size Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-resize-fill-type", 0, 0,
_("Fill with:"),
GTK_TABLE (table), 0, size_group);
/* Add Layer Mask Dialog */
vbox2 = prefs_frame_new (_("Add Layer Mask Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-add-mask-type", 0, 0,
_("Layer mask type:"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "layer-add-mask-invert",
_("Invert mask"),
GTK_BOX (vbox2));
/* Merge Layers Dialog */
vbox2 = prefs_frame_new (_("Merge Layers Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-merge-type",
GIMP_EXPAND_AS_NECESSARY,
GIMP_CLIP_TO_BOTTOM_LAYER,
_("Merged layer size:"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "layer-merge-active-group-only",
_("Merge within active group only"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "layer-merge-discard-invisible",
_("Discard invisible layers"),
GTK_BOX (vbox2));
/* New Channel Dialog */
vbox2 = prefs_frame_new (_("New Channel Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_entry_add (object, "channel-new-name",
_("Channel name:"),
GTK_TABLE (table), 0, size_group);
prefs_color_button_add (object, "channel-new-color",
_("Color and opacity:"),
_("Default New Channel Color and Opacity"),
GTK_TABLE (table), 1, size_group,
gimp_get_user_context (gimp));
/* New Path Dialog */
vbox2 = prefs_frame_new (_("New Path Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_entry_add (object, "path-new-name",
_("Path name:"),
GTK_TABLE (table), 0, size_group);
/* Export Path Dialog */
vbox2 = prefs_frame_new (_("Export Paths Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_file_chooser_button_add (object, "path-export-path",
_("Export folder:"),
_("Select Default Folder for Exporting Paths"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "path-export-active-only",
_("Export the active path only"),
GTK_BOX (vbox2));
/* Import Path Dialog */
vbox2 = prefs_frame_new (_("Import Paths Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_file_chooser_button_add (object, "path-import-path",
_("Import folder:"),
_("Select Default Folder for Importing Paths"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "path-import-merge",
_("Merge imported paths"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "path-import-scale",
_("Scale imported paths"),
GTK_BOX (vbox2));
/* Feather Selection Dialog */
vbox2 = prefs_frame_new (_("Feather Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-feather-radius", 1.0, 10.0, 2,
_("Feather radius:"),
GTK_TABLE (table), 0, size_group);
/* Grow Selection Dialog */
vbox2 = prefs_frame_new (_("Grow Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-grow-radius", 1.0, 10.0, 0,
_("Grow radius:"),
GTK_TABLE (table), 0, size_group);
/* Shrink Selection Dialog */
vbox2 = prefs_frame_new (_("Shrink Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-shrink-radius", 1.0, 10.0, 0,
_("Shrink radius:"),
GTK_TABLE (table), 0, size_group);
prefs_check_button_add (object, "selection-shrink-edge-lock",
_("Selected areas continue outside the image"),
GTK_BOX (vbox2));
/* Border Selection Dialog */
vbox2 = prefs_frame_new (_("Border Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-border-radius", 1.0, 10.0, 0,
_("Border radius:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "selection-border-style", 0, 0,
_("Border style:"),
GTK_TABLE (table), 1, size_group);
prefs_check_button_add (object, "selection-border-edge-lock",
_("Selected areas continue outside the image"),
GTK_BOX (vbox2));
/* Fill Options Dialog */
vbox2 = prefs_frame_new (_("Fill Selection Outline & Fill Path Dialogs"),
GTK_CONTAINER (vbox), FALSE);
table = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* Stroke Options Dialog */
vbox2 = prefs_frame_new (_("Stroke Selection & Stroke Path Dialogs"),
GTK_CONTAINER (vbox), FALSE);
/* The stroke line width physical values could be based on either the
* x or y resolution, some average, or whatever which makes a bit of
* sense. There is no perfect answer. The actual stroke dialog though
* uses the y resolution on the opened image. So using the y resolution
* of the default image seems like the best compromise in the preferences.
*/
table = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
gimp_template_get_resolution_y (core_config->default_image),
FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
g_object_unref (size_group);
/*****************************/
/* Interface / Help System */
/*****************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-help-system",
_("Help System"),
_("Help System"),
GIMP_HELP_PREFS_HELP,
&top_iter,
&child_iter);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* General */
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
app/Makefile.am app/gimphelp.[ch] new files 1999-09-27 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gimphelp.[ch] * app/gimpui.[ch]: new files * app/interface.[ch] * app/preferences_dialog.[ch] The GIMP Help System part 1: Press "F1" in any dialog to pop up the help page for this dialog. Moved the widget constructors from preferences_dialog.[ch] and the query boxes from interface.[ch] to gimpui.[ch]. The dialog constructors take a help_func and a help_data parameter and install the "F1" accelerator which emits the new "help" signal. The "help" signal callback calls help_func(help_data) which finally has to call gimp_help() which in turn invokes the help browser. Still have to find a proper way to (1) prevent "F1" being assigned to some menu item and (2) to catch "F1" while browsing the menu trees in order to pop up the help for the selected item. * app/menus.c: a <Toolbox>/File/Help... menu item. * app/commands.[ch]: a command callback for the "Help..." menu item. * app/gimprc.[ch]: new boolean gimprc variable "use_help". * app/info_dialog.[ch]: pass a help function and data to the info dialog constructor. * app/tools.[ch]: store the tools help page names in the tool info structure. Export a special tools_help_func() which shows the help page for the active tool. * app/[all files calling a dialog constructor]: pass the dialog's help page to the constructor. Most dialogs are now created by gimp_dialog_new() which also sets up the action_area and the WM delete event callback, so I removed the resp. code from these files. Fixed some minor bugs and did some other stuff but didn't change any logic except dialog creation. * plug-ins/helpbrowser/helpbrowser.c: don't try to call a running help browser and don't install any menu path (all done in app/gimphelp.[ch] now).
1999-09-27 17:58:10 +00:00
prefs_check_button_add (object, "show-tooltips",
_("Show _tooltips"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "show-help-button",
_("Show help _buttons"),
GTK_BOX (vbox2));
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
button = prefs_boolean_combo_box_add (object, "user-manual-online",
_("Use the online version"),
_("Use a locally installed copy"),
_("User manual:"),
GTK_TABLE (table), 0, size_group);
gimp_help_set_help_data (button, NULL, NULL);
manuals = gimp_help_get_installed_languages ();
entry = NULL;
if (manuals != NULL)
{
gchar *help_locales = NULL;
entry = gimp_language_combo_box_new (TRUE,
_("User interface language"));
g_object_get (config, "help-locales", &help_locales, NULL);
if (help_locales && strlen (help_locales))
{
gchar *sep;
sep = strchr (help_locales, ':');
if (sep)
*sep = '\0';
}
if (help_locales)
{
gimp_language_combo_box_set_code (GIMP_LANGUAGE_COMBO_BOX (entry),
help_locales);
g_free (help_locales);
}
else
{
gimp_language_combo_box_set_code (GIMP_LANGUAGE_COMBO_BOX (entry),
"");
}
g_signal_connect (entry, "changed",
G_CALLBACK (prefs_help_language_change_callback),
gimp);
gtk_table_attach_defaults (GTK_TABLE (table), entry, 1, 2, 1, 2);
gtk_widget_show (entry);
}
if (gimp_help_user_manual_is_installed (gimp))
{
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_INFORMATION,
_("There's a local installation "
"of the user manual."));
}
else
{
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
_("The user manual is not installed "
"locally."));
}
if (manuals)
{
g_object_set_data (G_OBJECT (hbox), "gimp", gimp);
g_signal_connect (entry, "changed",
G_CALLBACK (prefs_help_language_change_callback2),
hbox);
g_list_free_full (manuals, g_free);
}
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 2, 3);
gtk_widget_show (hbox);
/* Help Browser */
#ifdef HAVE_WEBKIT
/* If there is no webkit available, assume we are on a platform
* that doesn't use the help browser, so don't bother showing
* the combo.
*/
vbox2 = prefs_frame_new (_("Help Browser"), GTK_CONTAINER (vbox), FALSE);
if (gimp_help_browser_is_installed (gimp))
{
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "help-browser", 0, 0,
_("H_elp browser to use:"),
GTK_TABLE (table), 0, size_group);
}
else
{
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
_("The GIMP help browser doesn't seem to "
"be installed. Using the web browser "
"instead."));
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
g_object_set (config,
"help-browser", GIMP_HELP_BROWSER_WEB_BROWSER,
NULL);
}
#else
g_object_set (config,
"help-browser", GIMP_HELP_BROWSER_WEB_BROWSER,
NULL);
#endif /* HAVE_WEBKIT */
/* Action Search */
vbox2 = prefs_frame_new (_("Action Search"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_check_button_add (object, "search-show-unavailable-actions",
_("Show _unavailable actions"),
GTK_BOX (vbox2));
prefs_spin_button_add (object, "action-history-size", 1.0, 10.0, 0,
_("Maximum History Size:"),
GTK_TABLE (table), 0, size_group);
button = prefs_button_add (GIMP_ICON_SHRED,
_("Clear Action History"),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_search_clear_callback),
gimp);
g_object_unref (size_group);
size_group = NULL;
/*************************/
/* Interface / Display */
/*************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-display",
_("Display"),
_("Display"),
GIMP_HELP_PREFS_DISPLAY,
&top_iter,
&child_iter);
First version of per-tool paint options. No PDB interface yet. The tool 1999-04-22 Michael Natterer <mitschel@cs.tu-berlin.de> First version of per-tool paint options. No PDB interface yet. The tool options dialog got rather big when in per-tool mode, so it will probably have to become a notebook. It's not yet 100% consistent. If switched off, everything should behave exactly like before. * app/Makefile.am * app/paint_options.h: new file * app/tool_options.c: PaintOptions gui. Maintain a list of all paint tools' ToolOptions to enable switching between global and per-tool paint options. * app/brush_select.[ch]: changed packing boxes, tables, ... The paint options in the brush selection can be hidden now. Moved create_paint_mode_menu() to paint_options.h and tool_options.c and renamed it to paint_mode_menu_new(). * app/gimage_mask.c * app/gimpbrush.[ch] * app/gimpbrushlist.[ch] * app/paint_core.c: moved gimp_brush_[set|get]_spacing() from gimpbrushlist.[ch] to gimpbrush.[ch]. Moved gimp_brush_[get|set]_[opacity|paint_mode]() to paint_options.h and tool_options.c and renamed them to paint_options_*_*(). They are "global paint options" now. * app/airbrush.c * app/blend.c * app/bucket_fill.c * app/clone.c * app/convolve.c * app/eraser.c * app/ink.c * app/paintbrush.c * app/pencil.c: all paint tools' options are derived from "PaintOptions" now. Opacity and paint mode are obtained through macros which take into account the current paint options mode. * app/buildmenu.h: #include <gtk/gtk.h> * app/color_picker.c * app/text_tool.c: changed spacings. * app/gimprc.[ch]: new gimprc option "global-paint-options" * app/preferences_dialog.c: Added a "Tool Options" page. Code cleanup. Some work on the convenience constructors test site. * app/tools.c: fixed "unused variable" warning.
1999-04-22 14:34:00 +00:00
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* Transparency */
vbox2 = prefs_frame_new (_("Transparency"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "transparency-type", 0, 0,
_("_Check style:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "transparency-size", 0, 0,
_("Check _size:"),
GTK_TABLE (table), 1, size_group);
vbox2 = prefs_frame_new (_("Monitor Resolution"),
GTK_CONTAINER (vbox), FALSE);
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
{
gchar *pixels_per_unit = g_strconcat (_("Pixels"), "/%s", NULL);
entry = gimp_prop_coordinates_new (object,
"monitor-xresolution",
"monitor-yresolution",
NULL,
pixels_per_unit,
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION,
0.0, 0.0,
TRUE);
removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 Sven Neumann <sven@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_copy_properties() and added the more intelligent gimp_config_sync() instead. * app/config/Makefile.am * app/config/config-types.h * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: replaced default image properties with a single GimpTemplate object property. Changed the set_property function to not replace aggregate objects but call gimp_config_sync() instead. * app/tools/gimptextoptions.c (gimp_text_options_set_property): same change here. * app/config/gimpconfig.[ch]: changed return value of gimp_config_duplicate() to gpointer to avoid some casts that only made the code harder to read. * app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy here but edit the GimpTemplate passed when the editor was constructed. * app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow editing of the default image paramaters. * app/config/gimprc.c * app/core/core-types.h * app/core/gimp.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-grid.c * app/core/gimpimage-new.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimptemplate.[ch] * app/gui/file-new-dialog.c * app/gui/grid-dialog.c * app/gui/info-window.c * app/gui/resize-dialog.c * app/gui/templates-commands.[ch] * app/gui/tool-options-commands.c * app/text/gimptextlayer.c * app/text/gimptextlayer.c * app/tools/gimptexttool.c * app/widgets/gimptemplateview.c * app/xcf/xcf-load.c: changed accordingly.
2003-10-14 15:20:59 +00:00
g_free (pixels_per_unit);
}
gtk_table_set_col_spacings (GTK_TABLE (entry), 2);
gtk_table_set_row_spacings (GTK_TABLE (entry), 2);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("Horizontal"), 0, 1, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("Vertical"), 0, 2, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("ppi"), 1, 4, 0.0);
2011-09-30 11:29:11 +02:00
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 24);
gtk_widget_show (entry);
gtk_widget_set_sensitive (entry, ! display_config->monitor_res_from_gdk);
group = NULL;
{
gdouble xres;
gdouble yres;
gchar *str;
gimp_get_monitor_resolution (gdk_screen_get_default (), /* FIXME monitor */
0, /* FIXME monitor */
&xres, &yres);
str = g_strdup_printf (_("_Detect automatically (currently %d × %d ppi)"),
ROUND (xres), ROUND (yres));
button = gtk_radio_button_new_with_mnemonic (group, str);
g_free (str);
}
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_object_set_data (G_OBJECT (button), "monitor_resolution_sizeentry", entry);
g_signal_connect (button, "toggled",
G_CALLBACK (prefs_resolution_source_callback),
config);
button = gtk_radio_button_new_with_mnemonic (group, _("_Enter manually"));
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
if (! display_config->monitor_res_from_gdk)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
2011-09-30 11:29:11 +02:00
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate..."));
label = gtk_bin_get_child (GTK_BIN (calibrate_button));
gtk_misc_set_padding (GTK_MISC (label), 4, 0);
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
gtk_widget_show (calibrate_button);
gtk_widget_set_sensitive (calibrate_button,
! display_config->monitor_res_from_gdk);
g_object_bind_property (button, "active",
entry, "sensitive",
G_BINDING_SYNC_CREATE);
g_object_bind_property (button, "active",
calibrate_button, "sensitive",
G_BINDING_SYNC_CREATE);
g_signal_connect (calibrate_button, "clicked",
G_CALLBACK (prefs_resolution_calibrate_callback),
entry);
g_object_unref (size_group);
size_group = NULL;
/***********************************/
/* Interface / Window Management */
/***********************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-window-management",
_("Window Management"),
_("Window Management"),
GIMP_HELP_PREFS_WINDOW_MANAGEMENT,
&top_iter,
&child_iter);
vbox2 = prefs_frame_new (_("Window Manager Hints"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "dock-window-hint", 0, 0,
_("Hint for _docks and toolbox:"),
GTK_TABLE (table), 1, size_group);
vbox2 = prefs_frame_new (_("Focus"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "activate-on-focus",
_("Activate the _focused image"),
GTK_BOX (vbox2));
/* Window Positions */
vbox2 = prefs_frame_new (_("Window Positions"), GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "save-session-info",
_("_Save window positions on exit"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "restore-monitor",
_("Open windows on the same _monitor they were open before"),
GTK_BOX (vbox2));
button = prefs_button_add (GIMP_ICON_DOCUMENT_SAVE,
_("Save Window Positions _Now"),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_session_save_callback),
gimp);
button2 = prefs_button_add (GIMP_ICON_RESET,
_("_Reset Saved Window Positions to "
"Default Values"),
GTK_BOX (vbox2));
g_signal_connect (button2, "clicked",
G_CALLBACK (prefs_session_clear_callback),
gimp);
g_object_set_data (G_OBJECT (button), "clear-button", button2);
/*******************/
/* Image Windows */
/*******************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-image-windows",
_("Image Windows"),
_("Image Windows"),
GIMP_HELP_PREFS_IMAGE_WINDOW,
NULL,
&top_iter);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* General */
vbox2 = prefs_frame_new (_("General"), GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "default-dot-for-dot",
_("Use \"_Dot for dot\" by default"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "marching-ants-speed", 1.0, 10.0, 0,
_("Marching _ants speed:"),
GTK_TABLE (table), 0, size_group);
/* Zoom & Resize Behavior */
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "resize-windows-on-zoom",
_("Resize window on _zoom"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "resize-windows-on-resize",
_("Resize window on image _size change"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_boolean_combo_box_add (object, "initial-zoom-to-fit",
_("Show entire image"),
"1:1",
_("Initial zoom _ratio:"),
GTK_TABLE (table), 0, size_group);
/* Space Bar */
vbox2 = prefs_frame_new (_("Space Bar"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
_("_While space bar is pressed:"),
GTK_TABLE (table), 0, size_group);
/* Mouse Pointers */
vbox2 = prefs_frame_new (_("Mouse Pointers"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "show-brush-outline",
_("Show _brush outline"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "show-paint-tool-cursor",
_("Show pointer for paint _tools"),
GTK_BOX (vbox2));
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "cursor-mode", 0, 0,
_("Pointer _mode:"),
GTK_TABLE (table), 0, size_group);
prefs_enum_combo_box_add (object, "cursor-handedness", 0, 0,
_("Pointer _handedness:"),
GTK_TABLE (table), 1, NULL);
g_object_unref (size_group);
size_group = NULL;
/********************************/
/* Image Windows / Appearance */
/********************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
2016-06-04 15:26:26 +02:00
"gimp-prefs-image-windows-appearance",
_("Image Window Appearance"),
_("Appearance"),
GIMP_HELP_PREFS_IMAGE_WINDOW_APPEARANCE,
&top_iter,
&child_iter);
prefs_display_options_frame_add (gimp,
G_OBJECT (display_config->default_view),
_("Default Appearance in Normal Mode"),
GTK_CONTAINER (vbox));
prefs_display_options_frame_add (gimp,
G_OBJECT (display_config->default_fullscreen_view),
_("Default Appearance in Fullscreen Mode"),
GTK_CONTAINER (vbox));
/****************************************************/
/* Image Windows / Image Title & Statusbar Format */
/****************************************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-image-title",
_("Image Title & Statusbar Format"),
_("Title & Status"),
GIMP_HELP_PREFS_IMAGE_WINDOW_TITLE,
&top_iter,
&child_iter);
{
const gchar *format_strings[] =
{
NULL,
NULL,
"%f-%p.%i (%t) %z%%",
"%f-%p.%i (%t) %d:%s",
"%f-%p.%i (%t) %wx%h",
"%f-%p-%i (%t) %wx%h (%xx%y)"
};
const gchar *format_names[] =
{
N_("Current format"),
N_("Default format"),
N_("Show zoom percentage"),
N_("Show zoom ratio"),
N_("Show image size"),
N_("Show drawable size")
};
struct
{
gchar *current_setting;
const gchar *default_setting;
const gchar *title;
const gchar *property_name;
}
formats[] =
{
{ NULL, GIMP_CONFIG_DEFAULT_IMAGE_TITLE_FORMAT,
N_("Image Title Format"), "image-title-format" },
{ NULL, GIMP_CONFIG_DEFAULT_IMAGE_STATUS_FORMAT,
N_("Image Statusbar Format"), "image-status-format" }
};
gint format;
g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
formats[0].current_setting = display_config->image_title_format;
formats[1].current_setting = display_config->image_status_format;
for (format = 0; format < G_N_ELEMENTS (formats); format++)
{
GtkWidget *scrolled_win;
GtkListStore *list_store;
GtkWidget *view;
GtkTreeSelection *sel;
gint i;
format_strings[0] = formats[format].current_setting;
format_strings[1] = formats[format].default_setting;
vbox2 = prefs_frame_new (gettext (formats[format].title),
GTK_CONTAINER (vbox), TRUE);
entry = gimp_prop_entry_new (object, formats[format].property_name, 0);
gtk_box_pack_start (GTK_BOX (vbox2), entry, FALSE, FALSE, 0);
gtk_widget_show (entry);
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);
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);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
for (i = 0; i < G_N_ELEMENTS (format_strings); i++)
{
GtkTreeIter iter;
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
0, gettext (format_names[i]),
1, format_strings[i],
-1);
if (i == 0)
gtk_tree_selection_select_iter (sel, &iter);
}
g_signal_connect (sel, "changed",
G_CALLBACK (prefs_format_string_select_callback),
entry);
}
}
/******************************/
/* Image Windows / Snapping */
/******************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-image-windows-snapping",
_("Image Window Snapping Behavior"),
_("Snapping"),
GIMP_HELP_PREFS_IMAGE_WINDOW_APPEARANCE,
&top_iter,
&child_iter);
prefs_behavior_options_frame_add (gimp,
G_OBJECT (display_config->default_view),
_("Default Behavior in Normal Mode"),
GTK_CONTAINER (vbox));
prefs_behavior_options_frame_add (gimp,
G_OBJECT (display_config->default_fullscreen_view),
_("Default Behavior in Fullscreen Mode"),
GTK_CONTAINER (vbox));
/* Snapping Distance */
vbox2 = prefs_frame_new (_("General"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
_("_Snapping distance:"),
GTK_TABLE (table), 0, size_group);
/*******************/
/* Input Devices */
/*******************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-input-devices",
_("Input Devices"),
_("Input Devices"),
GIMP_HELP_PREFS_INPUT_DEVICES,
NULL,
&top_iter);
/* Extended Input Devices */
vbox2 = prefs_frame_new (_("Extended Input Devices"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "devices-share-tool",
_("S_hare tool and tool options between input devices"),
GTK_BOX (vbox2));
button = prefs_button_add (GIMP_ICON_PREFERENCES_SYSTEM,
_("Configure E_xtended Input Devices..."),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_input_devices_dialog),
gimp);
prefs_check_button_add (object, "save-device-status",
_("_Save input device settings on exit"),
GTK_BOX (vbox2));
button = prefs_button_add (GIMP_ICON_DOCUMENT_SAVE,
_("Save Input Device Settings _Now"),
GTK_BOX (vbox2));
g_signal_connect (button, "clicked",
G_CALLBACK (prefs_devices_save_callback),
gimp);
button2 = prefs_button_add (GIMP_ICON_RESET,
_("_Reset Saved Input Device Settings to "
"Default Values"),
GTK_BOX (vbox2));
g_signal_connect (button2, "clicked",
G_CALLBACK (prefs_devices_clear_callback),
gimp);
g_object_set_data (G_OBJECT (button), "clear-button", button2);
/****************************/
/* Additional Controllers */
/****************************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-controllers",
_("Additional Input Controllers"),
_("Input Controllers"),
GIMP_HELP_PREFS_INPUT_CONTROLLERS,
&top_iter,
&child_iter);
vbox2 = gimp_controller_list_new (gimp);
gtk_box_pack_start (GTK_BOX (vbox), vbox2, TRUE, TRUE, 0);
gtk_widget_show (vbox2);
/*************/
/* Folders */
/*************/
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-folders",
_("Folders"),
_("Folders"),
GIMP_HELP_PREFS_FOLDERS,
NULL,
&top_iter);
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
{
static const struct
{
const gchar *property_name;
const gchar *label;
const gchar *dialog_title;
}
dirs[] =
{
{
"temp-path",
N_("Temporary folder:"),
N_("Select Folder for Temporary Files")
},
{
"swap-path",
N_("Swap folder:"),
N_("Select Swap Folder")
}
};
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
table = prefs_table_new (G_N_ELEMENTS (dirs) + 1, GTK_CONTAINER (vbox));
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
{
prefs_file_chooser_button_add (object, dirs[i].property_name,
gettext (dirs[i].label),
gettext (dirs[i].dialog_title),
GTK_TABLE (table), i, NULL);
}
}
removed gimp_config_values_equal(). 2002-11-23 Michael Natterer <mitch@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_values_equal(). * app/config/gimpconfig-serialize.c * app/config/gimpconfig.c: use g_param_values_cmp() instead so our registered compare methods are used. * app/config/gimpdisplayconfig.[ch]: added "canvas_padding_mode" and "canvas_padding_color" properties. * app/display/display-enums.[ch]: added enum GimpDisplayPaddingMode which can be one of { theme, light check, dark check, custom }. * app/display/gimpdisplay.h * app/display/gimpdisplay-handlers.c: removed cached monitor resolution values... * app/display/gimpdisplayshell.[ch]: ...and added them here. Added padding state as in GimpDisplayConfig. Added utility function gimp_display_shell_set_padding() which hides all the details. Added the new padding modes to the padding color button's context menu. * app/display/gimpdisplayshell-callbacks.[ch]: don't fiddle with colors manually but use gimp_display_shell_set_padding() in realize() and in the color button callbacks. * app/display/gimpdisplayshell-handlers.c: connect to notify::monitor-[xy]resolution and notify::canvas-padding-[mode|color] and update accordingly. * app/widgets/gimppropwidgets.[ch]: added gimp_prop_color_button_new(). * app/widgets/gimpdialogfactory.[ch]: added gimp_dialog_factories_session_clear() (unimplemented). * app/gui/preferences-dialog.c: added widgets for padding mode and color. Removed some callbacks by connecting the functions they called directly. Cleanup.
2002-11-23 22:22:21 +00:00
/*********************/
/* Folders / <paths> */
removed gimp_config_values_equal(). 2002-11-23 Michael Natterer <mitch@gimp.org> * app/config/gimpconfig-utils.[ch]: removed gimp_config_values_equal(). * app/config/gimpconfig-serialize.c * app/config/gimpconfig.c: use g_param_values_cmp() instead so our registered compare methods are used. * app/config/gimpdisplayconfig.[ch]: added "canvas_padding_mode" and "canvas_padding_color" properties. * app/display/display-enums.[ch]: added enum GimpDisplayPaddingMode which can be one of { theme, light check, dark check, custom }. * app/display/gimpdisplay.h * app/display/gimpdisplay-handlers.c: removed cached monitor resolution values... * app/display/gimpdisplayshell.[ch]: ...and added them here. Added padding state as in GimpDisplayConfig. Added utility function gimp_display_shell_set_padding() which hides all the details. Added the new padding modes to the padding color button's context menu. * app/display/gimpdisplayshell-callbacks.[ch]: don't fiddle with colors manually but use gimp_display_shell_set_padding() in realize() and in the color button callbacks. * app/display/gimpdisplayshell-handlers.c: connect to notify::monitor-[xy]resolution and notify::canvas-padding-[mode|color] and update accordingly. * app/widgets/gimppropwidgets.[ch]: added gimp_prop_color_button_new(). * app/widgets/gimpdialogfactory.[ch]: added gimp_dialog_factories_session_clear() (unimplemented). * app/gui/preferences-dialog.c: added widgets for padding mode and color. Removed some callbacks by connecting the functions they called directly. Cleanup.
2002-11-23 22:22:21 +00:00
/*********************/
{
static const struct
{
const gchar *tree_label;
const gchar *label;
const gchar *icon;
const gchar *help_data;
const gchar *fs_label;
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
const gchar *path_property_name;
const gchar *writable_property_name;
}
paths[] =
{
{ N_("Brushes"), N_("Brush Folders"), "folders-brushes",
GIMP_HELP_PREFS_FOLDERS_BRUSHES,
N_("Select Brush Folders"),
"brush-path", "brush-path-writable" },
{ N_("Dynamics"), N_("Dynamics Folders"), "folders-dynamics",
GIMP_HELP_PREFS_FOLDERS_DYNAMICS,
N_("Select Dynamics Folders"),
"dynamics-path", "dynamics-path-writable" },
{ N_("Patterns"), N_("Pattern Folders"), "folders-patterns",
GIMP_HELP_PREFS_FOLDERS_PATTERNS,
N_("Select Pattern Folders"),
"pattern-path", "pattern-path-writable" },
{ N_("Palettes"), N_("Palette Folders"), "folders-palettes",
GIMP_HELP_PREFS_FOLDERS_PALETTES,
N_("Select Palette Folders"),
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
"palette-path", "palette-path-writable" },
{ N_("Gradients"), N_("Gradient Folders"), "folders-gradients",
GIMP_HELP_PREFS_FOLDERS_GRADIENTS,
N_("Select Gradient Folders"),
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
"gradient-path", "gradient-path-writable" },
{ N_("Fonts"), N_("Font Folders"), "folders-fonts",
GIMP_HELP_PREFS_FOLDERS_FONTS,
N_("Select Font Folders"),
"font-path", NULL },
{ N_("Tool Presets"), N_("Tool Preset Folders"), "folders-tool-presets",
GIMP_HELP_PREFS_FOLDERS_TOOL_PRESETS,
N_("Select Tool Preset Folders"),
"tool-preset-path", "tool-preset-path-writable" },
{ N_("MyPaint Brushes"), N_("MyPaint Brush Folders"), "folders-mypaint-brushes",
GIMP_HELP_PREFS_FOLDERS_MYPAINT_BRUSHES,
N_("Select MyPaint Brush Folders"),
"mypaint-brush-path", "mypaint-brush-path-writable" },
{ N_("Plug-ins"), N_("Plug-in Folders"), "folders-plug-ins",
GIMP_HELP_PREFS_FOLDERS_PLUG_INS,
N_("Select plug-in Folders"),
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
"plug-in-path", NULL },
{ N_("Scripts"), N_("Script-Fu Folders"), "folders-scripts",
GIMP_HELP_PREFS_FOLDERS_SCRIPTS,
N_("Select Script-Fu Folders"),
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
"script-fu-path", NULL },
{ N_("Modules"), N_("Module Folders"), "folders-modules",
GIMP_HELP_PREFS_FOLDERS_MODULES,
N_("Select Module Folders"),
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
"module-path", NULL },
{ N_("Interpreters"), N_("Interpreter Folders"), "folders-interp",
GIMP_HELP_PREFS_FOLDERS_INTERPRETERS,
N_("Select Interpreter Folders"),
"interpreter-path", NULL },
{ N_("Environment"), N_("Environment Folders"), "folders-environ",
GIMP_HELP_PREFS_FOLDERS_ENVIRONMENT,
N_("Select Environment Folders"),
Added infrastructure to make sure we don't write to the global brush, 2004-01-28 Michael Natterer <mitch@gimp.org> Added infrastructure to make sure we don't write to the global brush, pattern etc. directories. Needed to make this configurable because we can't rely on the global directories being read-only, having certain names or being otherwise detectable at runtime in a sane way. Fixes bug #132214. * libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to the GimpDataFileData struct so callbacks don't need to call g_path_get_dirname() for each file. * libgimpwidgets/gimpfileentry.c: made it work with non UTF-8 encoded filenames. * libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for setting/getting a second "writable_path". The widget makes sure that the writable_path is always a subset of the path. * app/config/gimpconfig-utils.[ch]: added new function gimp_config_build_writable_path(). * app/config/gimpcoreconfig.[ch]: added separate properties for the writable brush, pattern, gradient, palette and font paths. * app/config/gimprc-blurbs.h: added (still empty) blurbs for the new properties. * app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter "gboolean writable". Set data->writable to FALSE by default. If "writable" is passed as TRUE, still check if we can write to the file before setting data->writable to TRUE. (gimp_data_create_filename): changed "data_path" parameter to "dest_dir" and assume dest_dir is writable. (gimp_data_duplicate): set data->dirty to TRUE to make sure duplicated things will be saved. * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpbrushpipe.c * app/core/gimpgradient.c * app/core/gimppalette.c * app/core/gimppattern.c: don't set the data's filename and don't touch data->dirty in the _load() functions because that's done by the data factory now. Don't touch data->dirty in the _duplicate() functions because that's done by gimp_data_duplicate() itself now. * app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added "writable_property_name" and remember it. Added utility function gimp_data_factory_get_save_dir() which determines the directory to save new datas to. Added public function gimp_data_factory_data_save_single() which saves a single data object. Make sure new things get saved to the first writable directory as specified in preferences. * app/core/gimp.c (gimp_real_initialize): pass the writable_paths' property names to gimp_data_factory_new(). * app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use gimp_data_factory_data_save_single() instead of implementing saving here. * app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new): added "const gchar *writable_property_name" parameter (can be NULL). Added the needed callbacks to handle the writable_path and made the path_editor and file_entry code aware of non UTF-8 filename encodings. Some general cleanup. * app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
"environ-path", NULL },
{ N_("Themes"), N_("Theme Folders"), "folders-themes",
GIMP_HELP_PREFS_FOLDERS_THEMES,
N_("Select Theme Folders"),
"theme-path", NULL },
{ N_("Icon Themes"), N_("Icon Theme Folders"), "folders-icon-themes",
GIMP_HELP_PREFS_FOLDERS_ICON_THEMES,
N_("Select Icon Theme Folders"),
"icon-theme-path", NULL }
};
app/Makefile.am removed, chopped... 2001-12-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/devices.[ch]: removed, chopped... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/gui/Makefile.am * app/widgets/gimpdeviceinfo.[ch] * app/widgets/gimpdevices.[ch] * app/gui/device-status-dialog.[ch] * app/gui/input-dialog.[ch]: ...and added here. Made GimpToolInfo a GimpContext subclass. Create a GimpDeviceManager struct in gimpdevices.c and attach it to the Gimp instance. * app/core/gimp.[ch]: removed gimp_create_context(). It was a bad idea in the first place beause it prevented GimpContext subclasses from being be properly registered with their Gimp instance. * app/core/gimpcontext.c: moved the stuff which used to be in gimp_create_context() back here. Added a "gimp" property which must be set on construction. Added a "dispose" implementation which removes the context from it's Gimp's context_list. * app/gimprc.c * app/core/gimptoolinfo.[ch] * app/display/gimpdisplayshell-callbacks.c * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/toolbox.c * app/tools/gimppainttool.c * app/tools/tool_manager.c * app/widgets/gimpimagedock.c: changed accordingly. * app/gui/tools-commands.[ch]: made all callback signatures the same. * app/gui/preferences-dialog.c: cleaned up the display_format_string GtkCombo code.
2001-12-07 17:39:51 +00:00
for (i = 0; i < G_N_ELEMENTS (paths); i++)
{
GtkWidget *editor;
gchar *icon_name;
icon_name = g_strconcat ("gimp-prefs-", paths[i].icon, NULL);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
icon_name,
gettext (paths[i].label),
gettext (paths[i].tree_label),
paths[i].help_data,
&top_iter,
&child_iter);
g_free (icon_name);
editor = gimp_prop_path_editor_new (object,
paths[i].path_property_name,
paths[i].writable_property_name,
gettext (paths[i].fs_label));
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
}
}
{
GtkWidget *tv;
GtkTreeModel *model;
GtkTreePath *path;
tv = gimp_prefs_box_get_tree_view (GIMP_PREFS_BOX (prefs_box));
gtk_tree_view_expand_all (GTK_TREE_VIEW (tv));
/* collapse the Folders subtree */
model = gtk_tree_view_get_model (GTK_TREE_VIEW (tv));
path = gtk_tree_model_get_path (model, &top_iter);
gtk_tree_view_collapse_row (GTK_TREE_VIEW (tv), path);
gtk_tree_path_free (path);
}
return dialog;
}