gimp/app/gui/palette-select.c

272 lines
7.0 KiB
C
Raw Normal View History

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
* Copyright (C) 1998 Andy Thomas (alt@picnic.demon.co.uk)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
2000-02-01 07:59:05 +08:00
#include "config.h"
#include <string.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 23:22:01 +08:00
#include <gtk/gtk.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-25 06:36:18 +08:00
#include "libgimpwidgets/gimpwidgets.h"
added app/display/ and app/plug-in/. Empty for now except for the types 2001-08-17 Michael Natterer <mitch@gimp.org> * configure.in: added app/display/ and app/plug-in/. Empty for now except for the types files. * app/Makefile.am * app/appenums.h * app/apptypes.h: removed. * app/display/Makefile.am * app/display/display-types.h * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/gui/Makefile.am * app/gui/gui-types.h * app/pdb/Makefile.am * app/pdb/pdb-types.h: new files for typedefs. * app/appenv.h: added MessageHandlerType and StackTraceMode here. * app/undo_types.h: moved undo struct typedefs here. * app/tools/tools-types.h * app/core/core-types.h: added some enums and Tattoo here (renamed to GimpTattoo). * app/gdisplay.h: temp_hack: #include "display/display-types.h" * app/gimphelp.c: s/gtk_idle_add/g_idle_add/ * app/gimprc.c: don't use "gimprc" in token handlers but the passed "val1p" and "val2p". * app/image_map.[ch]: cleanup in preparation of making a GObject out of it. * app/base/pixel-region.[ch]: no need to pass the PixelRegionIterator around as void pointer. * app/core/gimp.[ch] * app/core/gimpcontext.[ch] * app/core/gimptoolinfo.[ch] * app/tools/tool_manager.c * app/widgets/gimpdnd.c: added the standard_tool_info to the Gimp object. * app/batch.c * app/file-open.c * app/file-save.c * app/file-utils.c * app/interface.c * app/main.c * app/path.[ch] * app/pathP.h * app/plug_in.h * app/core/gimpdrawable.[ch] * app/core/gimpimage-mask.c * app/core/gimpimage.[ch] * app/core/gimplayer.c * app/gui/color-area.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/error-console-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/indicator-area.c * app/gui/info-dialog.c * app/gui/palette-editor.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/session.c * app/gui/splash.c * app/gui/view-commands.c * app/tools/gimpinktool-blob.c * app/widgets/gimpcolorpanel.c * app/widgets/gimpdockbook.c * app/widgets/gimppreview.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c: changed accordingly: s/Tattoo/GimpTattoo/, include the new types files, include <glib-object.h> instead of >gtk/gtk.h>. Bad hacks to get rid of SELECTION_OFF and friends in core/ (will be replaced ba a signal soon). * tools/pdbgen/Makefile.am: changed list of headers scanned for enums accordingly. * app/pdb/procedural_db.c * tools/pdbgen/app.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb: same fixes as above, added hacks to ensure that all foo-types.h files are included before all other gimp internal includes, include "pdb-types.h" unconditionally. * tools/pdbgen/enums.pl * app/pdb/*_cmds.c: regenerated.
2001-08-17 22:27:31 +08:00
#include "gui-types.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 23:22:01 +08:00
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-05 03:31:35 +08:00
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimppalette.h"
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
#include "pdb/procedural_db.h"
#include "widgets/gimpcontainerview.h"
2001-04-11 09:13:53 +08:00
#include "widgets/gimpdatafactoryview.h"
#include "dialogs-constructors.h"
Move away from creating all item_factories statically in menus_init() but 2003-01-10 Michael Natterer <mitch@gimp.org> Move away from creating all item_factories statically in menus_init() but create a new one for each place where one is needed: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpmenufactory.[ch]: new factory which creates and configures the GimpItemFactories it knows about on-the-fly. * app/widgets/gimpitemfactory.[ch]: added gimp_item_factory_update() which calls the "update_func". Added "gboolean update_on_popup" so item_factories can be configured to require manual updates (used for the <Image> factory). * app/gui/menus.[ch]: create a "global_menu_factory" and register all menus we have with it. Added various setup functions which do stuff like adding the "Open Recent" menu or reorder plug-in menu entries. Removed the debugging stuff... * app/gui/Makefile.am * app/gui/debug-commands.[ch]: ...and added it here. * app/gui/gui.c: create the <Toolbox>, the popup-<Image> and the <Paths> factories here because they are still global. * app/gui/plug-in-menus.[ch]: changed the "image_factory" parameters to "item_factory" and create/update the entries for the passed item_factory only. Makes the whole stuff much more straightforward. * app/plug-in/plug-ins.c: don't call plug_in_make_menu(). * app/display/gimpdisplay.[ch] * app/display/gimpdisplayshell.[ch]: added "menu_factory" and "popup_factory" parameters to gimp_display_new() and gimp_display_shell_new(). Create the menubar_factory and the qmask_factory dynamically. Pass the shell, not a Gimp to the QMask callbacks. Changed gimp_display_shell_set_menu_sensitivity() to gimp_display_shell_menu_update() and don't call it directly (it's a GimpItemFactory update_func now). Call gimp_item_factory_update() on the resp. factories instead. * app/gui/qmask-commands.c * app/display/gimpdisplayshell-callbacks.c * app/tools/gimpimagemaptool.c: changed accordingly. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdock.c * app/widgets/gimpdockbook.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemlistview.[ch] * app/widgets/gimppaletteeditor.[ch]: pass around lots of GimpMenuFactory pointers and menu_identifiers so all views can create their item_factories themselves. Unref the factories when they are no longer needed because they belong to the views now. * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/brush-select.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly. * app/gui/file-dialog-utils.[ch] (file_dialog_new): require menu_factory and menu_identifier parameters. * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch]: removed file_*_dialog_menu_init() (they went to menus.c as setup_funcs). Added file_*_dialog_set_type() and moved the <Load> and <Save> factory callbacks to file-commands.c * app/gui/file-commands.[ch]: changed accordingly. * app/gui/view-commands.c: changed the statusbar, menubar, rulers and guides callbacks to do their job only if the setting has actually changed. Don't update whole item factories afterwards. Instead, just change the state of the items that actually need update. Unrelated: * app/core/gimpchannel.c (gimp_channel_init): set "bounds_known" and friends to FALSE since we don't know that the new channel will be empty (fixes QMask and probably other stuff). * app/gui/image-commands.c * app/gui/vectors-commands.c: cleanup.
2003-01-11 01:55:53 +08:00
#include "menus.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-18 05:43:29 +08:00
#include "palette-select.h"
#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 23:22:01 +08:00
#define STD_PALETTE_COLUMNS 6
#define STD_PALETTE_ROWS 5
/* local function prototypes */
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
static void palette_select_change_callbacks (PaletteSelect *psp,
gboolean closing);
static void palette_select_palette_changed (GimpContext *context,
GimpPalette *palette,
PaletteSelect *psp);
static void palette_select_close_callback (GtkWidget *widget,
PaletteSelect *psp);
/* list of active dialogs */
static GSList *palette_active_dialogs = NULL;
new ui for the "Layer Offset" dialog. 1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de> * app/channel_ops.[ch]: new ui for the "Layer Offset" dialog. * app/channels_dialog.c * app/layers_dialog.c: major code cleanup: Folded some callbacks into common ones, "widget" instead of "w", indentation, ... * app/commands.c * app/interface.[ch] * app/global_edit.c: the query boxes must be shown by the caller now. There's no need to split up the string for the message box manually as the Gtk 1.2 label widget handles newlines corectly. Added the "edge_lock" toggle to the "Shrink Selection" dialog. Nicer spacings for the query and message boxes. * app/ink.c: tried to grab the pointer in the blob preview but failed. Left the code there as a reminder (commented out). * app/menus.c: reordered <Image>/Select. I was bored and grep-ed the sources for ancient or deprecated stuff: * app/about_dialog.[ch] * app/actionarea.[ch] * app/app_procs.c * app/brush_edit.c * app/brush_select.c * app/color_select.c * app/convert.c * app/devices.c * app/gdisplay.c * app/gdisplay_ops.c * app/histogram_tool.[ch] * app/info_window.c * app/install.c * app/ops_buttons.c * app/palette.c * app/palette_select.c * app/paths_dialog.c * app/pattern_select.c * app/resize.c * app/scale_toolc.c * app/text_tool.c: s/container_border_width/container_set_border_width/g, s/sprintf/g_snprintf/g, replaced some constant string lengths with strlen(x). * app/bezier_select.c * app/blend.c * app/boundary.c * app/errors.[ch] * app/free_select.c * app/gimpbrushlist.c * app/gimprc.c * app/iscissors.c * app/main.c * app/patterns.[ch] * app/text_tool.c: namespace fanaticism: prefixed all gimp error functions with "gimp_" and formated the messages more uniformly. * app/gradient.c * app/gradient_select.c: same stuff as above for the ui code. There are still some sub-dialogs which need cleanup. Did some cleanup in most of these files: prototypes, removed tons of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
1999-10-27 02:27:27 +08:00
/* public functions */
1999-10-27 02:27:27 +08:00
PaletteSelect *
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
palette_select_new (Gimp *gimp,
const gchar *title,
const gchar *initial_palette,
const gchar *callback_name)
{
PaletteSelect *psp;
GimpPalette *active = NULL;
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
g_return_val_if_fail (title != NULL, NULL);
if (gimp->no_data)
{
static gboolean first_call = TRUE;
if (first_call)
gimp_data_factory_data_init (gimp->palette_factory, FALSE);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
first_call = FALSE;
}
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (initial_palette && strlen (initial_palette))
{
active = (GimpPalette *)
gimp_container_get_child_by_name (gimp->palette_factory->container,
initial_palette);
}
if (! active)
active = gimp_context_get_palette (gimp_get_current_context (gimp));
if (! active)
return NULL;
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
psp = g_new0 (PaletteSelect, 1);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
/* Add to active palette dialogs list */
palette_active_dialogs = g_slist_append (palette_active_dialogs, psp);
psp->context = gimp_context_new (gimp, title, NULL);
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
psp->callback_name = g_strdup (callback_name);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
gimp_context_set_palette (psp->context, active);
g_signal_connect (psp->context, "palette_changed",
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
G_CALLBACK (palette_select_palette_changed),
psp);
/* the shell */
psp->shell = gimp_dialog_new (title, "palette_selection",
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-28 01:58:10 +08:00
gimp_standard_help_func,
The GIMP Help System part II: press "F1" while browsing a menu to show the 1999-10-03 Michael Natterer <mitch@gimp.org> The GIMP Help System part II: press "F1" while browsing a menu to show the help page for the menu entry you're currently over with the mouse. * app/color_notebook.c: all color selectors have to register with a help page now. * app/color_select.[ch]: register with a help string. Removed the dialog part of the files because it's use was deprecated anyway (use color notebooks instead). * app/colormap_dialog.i.c * app/colormap_dialog.p.h * app/palette.c * app/palette_select.c: use a color notebook instead of a color selector. * app/gimphelp.c * app/gimpui.c: minor changes. * app/gimprc.c: "use help" defaults to TRUE now. * app/lc_dialog.c * app/lc_dialogP.h: a special help function which shows the help for the currently selected notebook page. * app/menus.c: some weird code which catches "key_press_event" in all menu shells and pops up the corresp. help page for the selected item. Embedded the GtkItemFactoryEntry in a new GimpItemFactoryEntry to allow a help path to be stored. Will be partially exported and moved to gimphelp.[ch] later to catch key_press for plug-in menu items (don't try this now ;-) * app/app_procs.c * app/brush_edit.c * app/brush_select.c * app/channel_ops.c * app/channels_dialog.c * app/commands.c * app/convert.c * app/devices.c * app/file_new_dialog.c * app/fileops.c * app/gdisplay.c * app/gdisplay_color.c * app/gdisplay_color_ui.c * app/gdisplay_ops.c * app/global_edit.c * app/gradient.c * app/gradient_select.c * app/interface.c * app/layers_dialog.c * app/module_db.c * app/paths_dialog.c * app/pattern_select.c * app/preferences_dialog.c * app/qmask.c * app/resize.c * app/undo_history.c: changed all dialog constructors to point to the right place in the new help file structure. * configure.in * help/*: the basic new help file structure. * modules/colorsel_gtk.c * modules/colorsel_triangle.c * modules/colorsel_water.c: register a help page. * plug-ins/helpbrowser/helpbrowser.c: load the help files according to the new help file structure.
1999-10-03 21:50:19 +08:00
"dialogs/palette_selection.html",
GTK_WIN_POS_MOUSE,
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-28 01:58:10 +08:00
FALSE, TRUE, FALSE,
GTK_STOCK_CLOSE, palette_select_close_callback,
psp, NULL, NULL, TRUE, TRUE,
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-28 01:58:10 +08:00
NULL);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
/* The Palette List */
Move away from creating all item_factories statically in menus_init() but 2003-01-10 Michael Natterer <mitch@gimp.org> Move away from creating all item_factories statically in menus_init() but create a new one for each place where one is needed: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpmenufactory.[ch]: new factory which creates and configures the GimpItemFactories it knows about on-the-fly. * app/widgets/gimpitemfactory.[ch]: added gimp_item_factory_update() which calls the "update_func". Added "gboolean update_on_popup" so item_factories can be configured to require manual updates (used for the <Image> factory). * app/gui/menus.[ch]: create a "global_menu_factory" and register all menus we have with it. Added various setup functions which do stuff like adding the "Open Recent" menu or reorder plug-in menu entries. Removed the debugging stuff... * app/gui/Makefile.am * app/gui/debug-commands.[ch]: ...and added it here. * app/gui/gui.c: create the <Toolbox>, the popup-<Image> and the <Paths> factories here because they are still global. * app/gui/plug-in-menus.[ch]: changed the "image_factory" parameters to "item_factory" and create/update the entries for the passed item_factory only. Makes the whole stuff much more straightforward. * app/plug-in/plug-ins.c: don't call plug_in_make_menu(). * app/display/gimpdisplay.[ch] * app/display/gimpdisplayshell.[ch]: added "menu_factory" and "popup_factory" parameters to gimp_display_new() and gimp_display_shell_new(). Create the menubar_factory and the qmask_factory dynamically. Pass the shell, not a Gimp to the QMask callbacks. Changed gimp_display_shell_set_menu_sensitivity() to gimp_display_shell_menu_update() and don't call it directly (it's a GimpItemFactory update_func now). Call gimp_item_factory_update() on the resp. factories instead. * app/gui/qmask-commands.c * app/display/gimpdisplayshell-callbacks.c * app/tools/gimpimagemaptool.c: changed accordingly. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdock.c * app/widgets/gimpdockbook.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemlistview.[ch] * app/widgets/gimppaletteeditor.[ch]: pass around lots of GimpMenuFactory pointers and menu_identifiers so all views can create their item_factories themselves. Unref the factories when they are no longer needed because they belong to the views now. * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/brush-select.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly. * app/gui/file-dialog-utils.[ch] (file_dialog_new): require menu_factory and menu_identifier parameters. * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch]: removed file_*_dialog_menu_init() (they went to menus.c as setup_funcs). Added file_*_dialog_set_type() and moved the <Load> and <Save> factory callbacks to file-commands.c * app/gui/file-commands.[ch]: changed accordingly. * app/gui/view-commands.c: changed the statusbar, menubar, rulers and guides callbacks to do their job only if the setting has actually changed. Don't update whole item factories afterwards. Instead, just change the state of the items that actually need update. Unrelated: * app/core/gimpchannel.c (gimp_channel_init): set "bounds_known" and friends to FALSE since we don't know that the new channel will be empty (fixes QMask and probably other stuff). * app/gui/image-commands.c * app/gui/vectors-commands.c: cleanup.
2003-01-11 01:55:53 +08:00
psp->view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
gimp->palette_factory,
dialogs_edit_palette_func,
psp->context,
GIMP_PREVIEW_SIZE_MEDIUM, 1,
Move away from creating all item_factories statically in menus_init() but 2003-01-10 Michael Natterer <mitch@gimp.org> Move away from creating all item_factories statically in menus_init() but create a new one for each place where one is needed: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpmenufactory.[ch]: new factory which creates and configures the GimpItemFactories it knows about on-the-fly. * app/widgets/gimpitemfactory.[ch]: added gimp_item_factory_update() which calls the "update_func". Added "gboolean update_on_popup" so item_factories can be configured to require manual updates (used for the <Image> factory). * app/gui/menus.[ch]: create a "global_menu_factory" and register all menus we have with it. Added various setup functions which do stuff like adding the "Open Recent" menu or reorder plug-in menu entries. Removed the debugging stuff... * app/gui/Makefile.am * app/gui/debug-commands.[ch]: ...and added it here. * app/gui/gui.c: create the <Toolbox>, the popup-<Image> and the <Paths> factories here because they are still global. * app/gui/plug-in-menus.[ch]: changed the "image_factory" parameters to "item_factory" and create/update the entries for the passed item_factory only. Makes the whole stuff much more straightforward. * app/plug-in/plug-ins.c: don't call plug_in_make_menu(). * app/display/gimpdisplay.[ch] * app/display/gimpdisplayshell.[ch]: added "menu_factory" and "popup_factory" parameters to gimp_display_new() and gimp_display_shell_new(). Create the menubar_factory and the qmask_factory dynamically. Pass the shell, not a Gimp to the QMask callbacks. Changed gimp_display_shell_set_menu_sensitivity() to gimp_display_shell_menu_update() and don't call it directly (it's a GimpItemFactory update_func now). Call gimp_item_factory_update() on the resp. factories instead. * app/gui/qmask-commands.c * app/display/gimpdisplayshell-callbacks.c * app/tools/gimpimagemaptool.c: changed accordingly. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdock.c * app/widgets/gimpdockbook.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemlistview.[ch] * app/widgets/gimppaletteeditor.[ch]: pass around lots of GimpMenuFactory pointers and menu_identifiers so all views can create their item_factories themselves. Unref the factories when they are no longer needed because they belong to the views now. * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/brush-select.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly. * app/gui/file-dialog-utils.[ch] (file_dialog_new): require menu_factory and menu_identifier parameters. * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch]: removed file_*_dialog_menu_init() (they went to menus.c as setup_funcs). Added file_*_dialog_set_type() and moved the <Load> and <Save> factory callbacks to file-commands.c * app/gui/file-commands.[ch]: changed accordingly. * app/gui/view-commands.c: changed the statusbar, menubar, rulers and guides callbacks to do their job only if the setting has actually changed. Don't update whole item factories afterwards. Instead, just change the state of the items that actually need update. Unrelated: * app/core/gimpchannel.c (gimp_channel_init): set "bounds_known" and friends to FALSE since we don't know that the new channel will be empty (fixes QMask and probably other stuff). * app/gui/image-commands.c * app/gui/vectors-commands.c: cleanup.
2003-01-11 01:55:53 +08:00
global_menu_factory, "<Palettes>");
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
gimp_container_view_set_size_request (GIMP_CONTAINER_VIEW (GIMP_CONTAINER_EDITOR (psp->view)->view),
5 * (GIMP_PREVIEW_SIZE_MEDIUM + 2),
8 * (GIMP_PREVIEW_SIZE_MEDIUM + 2));
gtk_container_set_border_width (GTK_CONTAINER (psp->view), 4);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (psp->shell)->vbox), psp->view);
gtk_widget_show (psp->view);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
gtk_widget_show (psp->shell);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
return psp;
}
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
void
palette_select_free (PaletteSelect *psp)
{
g_return_if_fail (psp != NULL);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
gtk_widget_destroy (psp->shell);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
/* remove from active list */
palette_active_dialogs = g_slist_remove (palette_active_dialogs, psp);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (psp->callback_name)
g_free (psp->callback_name);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (psp->context)
g_object_unref (psp->context);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
g_free (psp);
}
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
PaletteSelect *
palette_select_get_by_callback (const gchar *callback_name)
{
GSList *list;
PaletteSelect *psp;
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
for (list = palette_active_dialogs; list; list = g_slist_next (list))
{
psp = (PaletteSelect *) list->data;
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (psp->callback_name && ! strcmp (callback_name, psp->callback_name))
return psp;
}
return NULL;
}
void
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
palette_select_dialogs_check (void)
1999-10-27 02:27:27 +08:00
{
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
PaletteSelect *psp;
GSList *list;
list = palette_active_dialogs;
while (list)
1999-10-27 02:27:27 +08:00
{
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
psp = (PaletteSelect *) list->data;
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
list = g_slist_next (list);
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (psp->callback_name)
{
if (! procedural_db_lookup (psp->context->gimp, psp->callback_name))
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
palette_select_close_callback (NULL, psp);
}
1999-10-27 02:27:27 +08:00
}
}
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
/* private functions */
static void
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
palette_select_change_callbacks (PaletteSelect *psp,
gboolean closing)
{
ProcRecord *proc;
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
GimpPalette *palette;
static gboolean busy = FALSE;
if (! (psp && psp->callback_name) || busy)
return;
busy = TRUE;
palette = gimp_context_get_palette (psp->context);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
/* If its still registered run it */
proc = procedural_db_lookup (psp->context->gimp, psp->callback_name);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (proc && palette)
{
Argument *return_vals;
gint nreturn_vals;
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
return_vals =
procedural_db_run_proc (psp->context->gimp,
psp->callback_name,
&nreturn_vals,
GIMP_PDB_STRING, GIMP_OBJECT (palette)->name,
GIMP_PDB_INT32, palette->n_colors,
GIMP_PDB_INT32, closing,
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
GIMP_PDB_END);
if (!return_vals || return_vals[0].value.pdb_int != GIMP_PDB_SUCCESS)
g_message (_("Unable to run palette callback.\n"
"The corresponding plug-in may have crashed."));
if (return_vals)
procedural_db_destroy_args (return_vals, nreturn_vals);
}
busy = FALSE;
}
1999-10-27 02:27:27 +08:00
static void
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
palette_select_palette_changed (GimpContext *context,
GimpPalette *palette,
PaletteSelect *psp)
1999-10-27 02:27:27 +08:00
{
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
if (palette)
palette_select_change_callbacks (psp, FALSE);
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
}
1999-10-27 02:27:27 +08:00
app/gimprc.[ch] app/gui/preferences-dialog.c 2002-03-12 Michael Natterer <mitch@gimp.org> * app/gimprc.[ch] * app/gui/preferences-dialog.c * app/paint/gimppaintoptions.[ch] * app/tools/paint_options.[ch] * app/tools/tool_manager.[ch]: removed the "global_paint_options" gimprc option because it doesn't quite fit the new dockable dialog architecture. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: removed the "Global Brush/Pattern/... Selection" part of them. They are now only used for temp popup selections and the PDB. *Lots* of cleanup. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/gui.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/plug-in/plug-in.c: changed accordingly. Cleaned up the palette and other data PDB stuff: * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: added "palette_select" and "palettes". * tools/pdbgen/pdb/palette_select.pdb: new file. Makes the palette selection PDB controllable. * tools/pdbgen/pdb/palettes.pdb: new file cut out of palette.pdb because of API symmetry with brushes, patterns, ... * tools/pdbgen/pdb/palette.pdb: removed from here. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: lots of cleanup. Autogenerated stuff: * app/pdb/Makefile.am * app/pdb/palette_select_cmds.c * app/pdb/palettes_cmds.c: new files. * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimppalettes_pdb.[ch] * libgimp/gimppaletteselect_pdb.[ch]: new files. * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimppatterns_pdb.c: regenerated. * devel-docs/libgimp/tmpl/gimpgradients.sgml * devel-docs/libgimp/tmpl/gimppalette.sgml: regenerated.
2002-03-13 05:02:10 +08:00
static void
palette_select_close_callback (GtkWidget *widget,
PaletteSelect *psp)
{
palette_select_change_callbacks (psp, TRUE);
1999-10-27 02:27:27 +08:00
palette_select_free (psp);
}