gimp/app/actions/gradients-commands.c

151 lines
4.8 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
*/
#include "config.h"
#include <gegl.h>
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
app/actions/data-commands.c app/actions/documents-commands.c 2006-10-09 Michael Natterer <mitch@gimp.org> * app/actions/data-commands.c * app/actions/documents-commands.c * app/actions/drawable-commands.c * app/actions/gradients-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c * app/core/gimp-contexts.c * app/core/gimp-documents.c * app/core/gimp-edit.c * app/core/gimp-modules.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp-units.c * app/core/gimpchannel.c * app/core/gimpdatafactory.[ch] * app/core/gimpdrawable-bucket-fill.c * app/core/gimpimage-merge.c * app/core/gimpimagefile.c * app/core/gimplayer-floating-sel.c * app/core/gimppdbprogress.c * app/core/gimpselection.c * app/dialogs/palette-import-dialog.c * app/display/gimpdisplayshell-dnd.c * app/gui/session.c * app/gui/themes.c * app/pdb/gimpprocedure.c * app/plug-in/gimpplugin-message.c * app/plug-in/gimpplugin.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.c * app/text/gimptextlayer-xcf.c * app/text/gimptextlayer.c * app/widgets/gimpcontrollers.c * app/widgets/gimpdataeditor.c * app/widgets/gimpdevices.c * app/widgets/gimpdnd-xds.c * app/widgets/gimplayertreeview.c * app/widgets/gimptoolbox-dnd.c * app/widgets/gimptoolbox.c * app/widgets/gimpuimanager.c * app/widgets/gimpvectorstreeview.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/palette.pdb: convert lots of g_message() to gimp_message(). Make sure we never pass unknown strings (like error->message) to printf-like functions directly; run them thorugh "%s" instead. Don't translate some messages which should never happen. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-10 02:49:15 +08:00
#include "core/gimp.h"
#include "core/gimpgradient-save.h"
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
#include "core/gimpcontext.h"
app/gui/brushes-menu.[ch] app/gui/buffers-menu.[ch] 2003-01-13 Michael Natterer <mitch@gimp.org> * app/gui/brushes-menu.[ch] * app/gui/buffers-menu.[ch] * app/gui/channels-menu.[ch] * app/gui/colormap-editor-menu.[ch] * app/gui/dialogs-menu.[ch] * app/gui/documents-menu.[ch] * app/gui/file-open-menu.[ch] * app/gui/file-save-menu.[ch] * app/gui/gradient-editor-menu.[ch] * app/gui/gradients-menu.[ch] * app/gui/image-menu.[ch] * app/gui/images-menu.[ch] * app/gui/layers-menu.[ch] * app/gui/palette-editor-menu.[ch] * app/gui/palettes-menu.[ch] * app/gui/patterns-menu.[ch] * app/gui/qmask-menu.[ch] * app/gui/toolbox-menu.[ch] * app/gui/vectors-menu.[ch]: new files, one per GimpItemFactory, containing the menu entries and their setup and update funcs. * app/gui/brushes-commands.[ch] * app/gui/patterns-commands.[ch]: removed because they contained only update funcs. * app/gui/Makefile.am: changed accordingly. Split the huge SOURCES list in smaller ones for menus and dialogs. * app/gui/menus.[ch]: removed the menu entries and setup funcs. Added MENU_SEPARATOR() and MENU_BRANCH() macros to the header. Made some utility functions public. * app/display/gimpdisplayshell.[ch] * app/gui/buffers-commands.[ch] * app/gui/channels-commands.[ch] * app/gui/colormap-editor-commands.[ch] * app/gui/dialogs-commands.[ch] * app/gui/documents-commands.[ch] * app/gui/gradient-editor-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/images-commands.[ch] * app/gui/layers-commands.[ch] * app/gui/palette-editor-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/qmask-commands.[ch] * app/gui/vectors-commands.[ch]: removed the update funcs. * app/gui/plug-in-menus.[ch]: renamed plug_in_set_menu_sensitivity() to plug_in_menus_update(). Cleanup. * app/gui/paths-dialog.[ch]: added the <Paths> entries here so they will go away together with these files. * app/gui/dialogs-constructors.c * app/gui/drawable-commands.c: removed useless #includes.
2003-01-13 22:08:10 +08:00
#include "widgets/gimpcontainereditor.h"
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
#include "widgets/gimpcontainerview.h"
app/widgets/Makefile.am new file defining the available help topics. Work 2003-08-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/gimphelp-ids.h: new file defining the available help topics. Work in progress and totally unusable for matching to the help system. Stay tuned... * app/gui/about-dialog.c * app/gui/brushes-menu.c * app/gui/buffers-menu.c * app/gui/channels-commands.[ch] * app/gui/channels-menu.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradients-commands.c * app/gui/gradients-menu.c * app/gui/image-menu.c * app/gui/layers-commands.[ch] * app/gui/layers-menu.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palettes-menu.c * app/gui/patterns-menu.c * app/gui/resize-dialog.c * app/gui/select-commands.c * app/gui/templates-menu.c * app/gui/tips-dialog.c * app/gui/toolbox-menu.c * app/gui/vectors-commands.[ch] * app/gui/vectors-menu.c: replaced literal HTML file paths by help IDs from gimphelp-ids.h. Renamed some menu callbacks to be consistent with similar ones. This is just an intermediate commit and not finished. While browsing all the menus, I noticed that our "x to selection" functions are not consistent at all. They should all offer the REPLACE,ADD,SUBTRACT,INTERSECT options: * app/core/gimpchannel.[ch]: added new function gimp_channel_new_from_alpha(). Removed gimp_channel_layer_alpha() and gimp_channel_layer_mask(). * app/core/gimpimage-mask.[ch]: added gimp_image_mask_select_alpha() and gimp_image_mask_select_component() which offer the full set of operation, feather and feather_radius parameters as the other selection functions. * app/core/gimpimage-mask-select.[ch]: removed gimp_image_mask_layer_alpha() and gimp_image_mask_layer_mask(). * app/gui/channels-commands.c (channels_channel_to_selection): use gimp_image_mask_select_component() instead of implementing it here. * app/gui/image-menu.c * app/gui/layers-commands.[ch]: offer the full choice of REPLACE,ADD,SUBTRACT,INTERSECT with "Alpha to Selection" and "Mask to Selection". * tools/pdbgen/pdb/selection.pdb: changed accordingly. * app/pdb/selection_cmds.c: regenerated.
2003-08-21 23:54:47 +08:00
#include "widgets/gimphelp-ids.h"
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
#include "dialogs/dialogs.h"
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
#include "gradients-commands.h"
#include "gimp-intl.h"
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
/* local function prototypes */
Action code review and pre-release consistency cleanup: 2004-10-18 Michael Natterer <mitch@gimp.org> Action code review and pre-release consistency cleanup: * app/actions/*-actions.c: added some missing and resolved conflicting mnemonics, added missing help IDs. Cleaned up the *_actions_update() functions. * app/actions/channels-actions.c * app/actions/layers-actions.c * app/actions/vectors-actions.c (*_actions_update): simplified the code that figures the prev and next channel,layer,vectors. * app/actions/qmask-actions.c: use the same accelerator for "qmask-active" and "qmask-toggle". Fixed action sensitivity. * app/actions/channels-commands.c * app/actions/dockable-commands.c * app/actions/documents-commands.c * app/actions/gradients-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/image-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c: folded tons of private utility functions into their only callers (they used to be public and called from outside before the switch to action based menus). Renamed functions and variables saying "query" or "qbox" to "dialog". Moved static functions to the end of the files. Misc minor cleanups. * app/actions/drawable-actions.c * app/actions/drawable-commands.c: made the "drawable-visible" and "drawable-linked" actions affect the layer if the active drawable is a layer mask. * app/actions/select-commands.c: added action to stroke with the last values used in an attempt to address bug #135746 but #if 0'ed it because the approach is too ugly. * app/tools/gimpiscissorstool.c: changed mnemonic from I to S. * menus/image-menu-xml.in: added more stuff to the (commented out) "context" menu.
2004-10-18 19:29:58 +08:00
static void gradients_save_as_pov_ray_response (GtkWidget *dialog,
gint response_id,
GimpGradient *gradient);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
/* public functions */
void
gradients_save_as_pov_ray_cmd_callback (GimpAction *action,
gpointer data)
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
Action code review and pre-release consistency cleanup: 2004-10-18 Michael Natterer <mitch@gimp.org> Action code review and pre-release consistency cleanup: * app/actions/*-actions.c: added some missing and resolved conflicting mnemonics, added missing help IDs. Cleaned up the *_actions_update() functions. * app/actions/channels-actions.c * app/actions/layers-actions.c * app/actions/vectors-actions.c (*_actions_update): simplified the code that figures the prev and next channel,layer,vectors. * app/actions/qmask-actions.c: use the same accelerator for "qmask-active" and "qmask-toggle". Fixed action sensitivity. * app/actions/channels-commands.c * app/actions/dockable-commands.c * app/actions/documents-commands.c * app/actions/gradients-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/image-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c: folded tons of private utility functions into their only callers (they used to be public and called from outside before the switch to action based menus). Renamed functions and variables saying "query" or "qbox" to "dialog". Moved static functions to the end of the files. Misc minor cleanups. * app/actions/drawable-actions.c * app/actions/drawable-commands.c: made the "drawable-visible" and "drawable-linked" actions affect the layer if the active drawable is a layer mask. * app/actions/select-commands.c: added action to stroke with the last values used in an attempt to address bug #135746 but #if 0'ed it because the approach is too ugly. * app/tools/gimpiscissorstool.c: changed mnemonic from I to S. * menus/image-menu-xml.in: added more stuff to the (commented out) "context" menu.
2004-10-18 19:29:58 +08:00
GimpContext *context;
GimpGradient *gradient;
GtkWidget *dialog;
More GimpContainerView chopping: 2004-05-10 Michael Natterer <mitch@gimp.org> More GimpContainerView chopping: * app/widgets/gimpcontainerview.[ch]: added GimpContainerViewPrivate struct (which is currently puclic :-) and removed all members from the GimpContainerView struct. Added accessors for "context", "container" and "preview_size / preview_border_width". Added macro to get the private struct (*not* via G_TYPE_INSTANCE_GET_PRIVATE because that's unavailable for interfaces). * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpcontainertreeview-dnd.c * app/widgets/gimpcontainertreeview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdocumentview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimpitemtreeview.c * app/widgets/gimplayertreeview.c * app/widgets/gimpsessioninfo.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/dockable-actions.c * app/actions/dockable-commands.c * app/actions/documents-actions.c * app/actions/fonts-actions.c * app/actions/gradients-actions.c * app/actions/gradients-commands.c * app/actions/images-actions.c * app/actions/palettes-actions.c * app/actions/palettes-commands.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/tools-actions.c * app/actions/tools-commands.c: changed accordingly.
2004-05-11 01:16:50 +08:00
context = gimp_container_view_get_context (editor->view);
More GimpContainerView chopping: 2004-05-10 Michael Natterer <mitch@gimp.org> More GimpContainerView chopping: * app/widgets/gimpcontainerview.[ch]: added GimpContainerViewPrivate struct (which is currently puclic :-) and removed all members from the GimpContainerView struct. Added accessors for "context", "container" and "preview_size / preview_border_width". Added macro to get the private struct (*not* via G_TYPE_INSTANCE_GET_PRIVATE because that's unavailable for interfaces). * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpcontainertreeview-dnd.c * app/widgets/gimpcontainertreeview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdocumentview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimpitemtreeview.c * app/widgets/gimplayertreeview.c * app/widgets/gimpsessioninfo.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/dockable-actions.c * app/actions/dockable-commands.c * app/actions/documents-actions.c * app/actions/fonts-actions.c * app/actions/gradients-actions.c * app/actions/gradients-commands.c * app/actions/images-actions.c * app/actions/palettes-actions.c * app/actions/palettes-commands.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/tools-actions.c * app/actions/tools-commands.c: changed accordingly.
2004-05-11 01:16:50 +08:00
gradient = gimp_context_get_gradient (context);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
if (! gradient)
return;
#define SAVE_AS_POV_DIALOG_KEY "gimp-save-as-pov-ray-dialog"
dialog = dialogs_get_dialog (G_OBJECT (gradient), SAVE_AS_POV_DIALOG_KEY);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
if (! dialog)
{
gchar *title = g_strdup_printf (_("Save '%s' as POV-Ray"),
gimp_object_get_name (gradient));
dialog = gtk_file_chooser_dialog_new (title, NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Save"), GTK_RESPONSE_OK,
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
NULL);
g_free (title);
app/actions/data-commands.c app/actions/documents-commands.c 2006-10-09 Michael Natterer <mitch@gimp.org> * app/actions/data-commands.c * app/actions/documents-commands.c * app/actions/drawable-commands.c * app/actions/gradients-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c * app/core/gimp-contexts.c * app/core/gimp-documents.c * app/core/gimp-edit.c * app/core/gimp-modules.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp-units.c * app/core/gimpchannel.c * app/core/gimpdatafactory.[ch] * app/core/gimpdrawable-bucket-fill.c * app/core/gimpimage-merge.c * app/core/gimpimagefile.c * app/core/gimplayer-floating-sel.c * app/core/gimppdbprogress.c * app/core/gimpselection.c * app/dialogs/palette-import-dialog.c * app/display/gimpdisplayshell-dnd.c * app/gui/session.c * app/gui/themes.c * app/pdb/gimpprocedure.c * app/plug-in/gimpplugin-message.c * app/plug-in/gimpplugin.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.c * app/text/gimptextlayer-xcf.c * app/text/gimptextlayer.c * app/widgets/gimpcontrollers.c * app/widgets/gimpdataeditor.c * app/widgets/gimpdevices.c * app/widgets/gimpdnd-xds.c * app/widgets/gimplayertreeview.c * app/widgets/gimptoolbox-dnd.c * app/widgets/gimptoolbox.c * app/widgets/gimpuimanager.c * app/widgets/gimpvectorstreeview.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/palette.pdb: convert lots of g_message() to gimp_message(). Make sure we never pass unknown strings (like error->message) to printf-like functions directly; run them thorugh "%s" instead. Don't translate some messages which should never happen. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-10 02:49:15 +08:00
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
g_object_set_data (G_OBJECT (dialog), "gimp", context->gimp);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (GTK_WIDGET (editor)));
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-gradient-save-pov");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog),
TRUE);
g_signal_connect (dialog, "response",
G_CALLBACK (gradients_save_as_pov_ray_response),
gradient);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
g_signal_connect_object (dialog, "destroy",
G_CALLBACK (g_object_unref),
g_object_ref (gradient),
G_CONNECT_SWAPPED);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
gimp_help_connect (dialog, gimp_standard_help_func,
GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
dialogs_attach_dialog (G_OBJECT (gradient),
SAVE_AS_POV_DIALOG_KEY, dialog);
}
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
gtk_window_present (GTK_WINDOW (dialog));
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
}
Action code review and pre-release consistency cleanup: 2004-10-18 Michael Natterer <mitch@gimp.org> Action code review and pre-release consistency cleanup: * app/actions/*-actions.c: added some missing and resolved conflicting mnemonics, added missing help IDs. Cleaned up the *_actions_update() functions. * app/actions/channels-actions.c * app/actions/layers-actions.c * app/actions/vectors-actions.c (*_actions_update): simplified the code that figures the prev and next channel,layer,vectors. * app/actions/qmask-actions.c: use the same accelerator for "qmask-active" and "qmask-toggle". Fixed action sensitivity. * app/actions/channels-commands.c * app/actions/dockable-commands.c * app/actions/documents-commands.c * app/actions/gradients-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/image-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c: folded tons of private utility functions into their only callers (they used to be public and called from outside before the switch to action based menus). Renamed functions and variables saying "query" or "qbox" to "dialog". Moved static functions to the end of the files. Misc minor cleanups. * app/actions/drawable-actions.c * app/actions/drawable-commands.c: made the "drawable-visible" and "drawable-linked" actions affect the layer if the active drawable is a layer mask. * app/actions/select-commands.c: added action to stroke with the last values used in an attempt to address bug #135746 but #if 0'ed it because the approach is too ugly. * app/tools/gimpiscissorstool.c: changed mnemonic from I to S. * menus/image-menu-xml.in: added more stuff to the (commented out) "context" menu.
2004-10-18 19:29:58 +08:00
/* private functions */
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
static void
Action code review and pre-release consistency cleanup: 2004-10-18 Michael Natterer <mitch@gimp.org> Action code review and pre-release consistency cleanup: * app/actions/*-actions.c: added some missing and resolved conflicting mnemonics, added missing help IDs. Cleaned up the *_actions_update() functions. * app/actions/channels-actions.c * app/actions/layers-actions.c * app/actions/vectors-actions.c (*_actions_update): simplified the code that figures the prev and next channel,layer,vectors. * app/actions/qmask-actions.c: use the same accelerator for "qmask-active" and "qmask-toggle". Fixed action sensitivity. * app/actions/channels-commands.c * app/actions/dockable-commands.c * app/actions/documents-commands.c * app/actions/gradients-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/image-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c: folded tons of private utility functions into their only callers (they used to be public and called from outside before the switch to action based menus). Renamed functions and variables saying "query" or "qbox" to "dialog". Moved static functions to the end of the files. Misc minor cleanups. * app/actions/drawable-actions.c * app/actions/drawable-commands.c: made the "drawable-visible" and "drawable-linked" actions affect the layer if the active drawable is a layer mask. * app/actions/select-commands.c: added action to stroke with the last values used in an attempt to address bug #135746 but #if 0'ed it because the approach is too ugly. * app/tools/gimpiscissorstool.c: changed mnemonic from I to S. * menus/image-menu-xml.in: added more stuff to the (commented out) "context" menu.
2004-10-18 19:29:58 +08:00
gradients_save_as_pov_ray_response (GtkWidget *dialog,
gint response_id,
GimpGradient *gradient)
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
{
if (response_id == GTK_RESPONSE_OK)
{
GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
2014-07-01 21:56:39 +08:00
GError *error = NULL;
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
2014-07-01 21:56:39 +08:00
if (! gimp_gradient_save_pov (gradient, file, &error))
{
bumped minimum required version of GLib to 2.18.0. 2008-11-04 Sven Neumann <sven@sven> * configure.in: bumped minimum required version of GLib to 2.18.0. * INSTALL: document the updated dependency. * app/core/gimp.[ch]: introduced gimp_message_literal(), a variant of gimp_message() that takes a literal string. * app/errors.[ch]: removed format arguments from gimp_fatal_error() and gimp_terminate() and let them take a literal string instead. * app/tools/gimptool.[ch]: introduced gimp_tool_message_literal(), a variant of gimp_tool_message() that takes a literal string. * app/actions/documents-commands.c * app/actions/drawable-commands.c * app/actions/edit-commands.c * app/actions/error-console-commands.c * app/actions/file-commands.c * app/actions/gradients-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/plug-in-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c * app/config/gimprc.c * app/core/gimp-modules.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp-units.c * app/core/gimpchannel.c * app/core/gimpcontainer-filter.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpimage-convert.c * app/core/gimpimage-merge.c * app/core/gimpimage.c * app/core/gimpimagefile.c * app/core/gimplayer-floating-sel.c * app/core/gimplayer.c * app/core/gimpselection.c * app/dialogs/convert-dialog.c * app/dialogs/dialogs.c * app/dialogs/palette-import-dialog.c * app/dialogs/preferences-dialog.c * app/dialogs/quit-dialog.c * app/dialogs/stroke-dialog.c * app/display/gimpdisplayshell-dnd.c * app/file/file-open.c * app/file/file-procedure.c * app/file/file-save.c * app/file/file-utils.c * app/gegl/gimpcurvesconfig.c * app/gegl/gimplevelsconfig.c * app/gui/gui-message.c * app/gui/gui.c * app/gui/session.c * app/paint/gimpbrushcore.c * app/paint/gimpclone.c * app/paint/gimpheal.c * app/paint/gimpperspectiveclone.c * app/paint/gimpsourcecore.c * app/pdb/gimppdb-utils.c * app/pdb/gimpprocedure.c * app/plug-in/gimpplugin-message.c * app/plug-in/gimpplugin.c * app/plug-in/gimppluginmanager-restore.c * app/plug-in/gimppluginprocedure.c * app/text/gimptextlayer.c * app/tools/gimp-tools.c * app/tools/gimpaligntool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcurvestool.c * app/tools/gimpdesaturatetool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpforegroundselecttool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpgegltool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpimagemaptool-settings.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmeasuretool.c * app/tools/gimppainttool.c * app/tools/gimpposterizetool.c * app/tools/gimpselectiontool.c * app/tools/gimpsourcetool.c * app/tools/gimpthresholdtool.c * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c * app/widgets/gimpactionview.c * app/widgets/gimpcontrollerlist.c * app/widgets/gimpcontrollers.c * app/widgets/gimpdataeditor.c * app/widgets/gimpdevices.c * app/widgets/gimpdnd-xds.c * app/widgets/gimperrordialog.c * app/widgets/gimphelp.c * app/widgets/gimpitemtreeview.c * app/widgets/gimppdbdialog.c * app/widgets/gimpsettingsbox.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpwidgets-utils.c * app/xcf/xcf-load.c * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/image.pdb: use the _literal variants for g_set_error(), gimp_message() and gimp_tool_message(). * app/pdb/convert-cmds.c * app/pdb/edit-cmds.c * app/pdb/floating-sel-cmds.c * app/pdb/image-cmds.c: regenerated. svn path=/trunk/; revision=27548
2008-11-04 20:33:09 +08:00
gimp_message_literal (g_object_get_data (G_OBJECT (dialog), "gimp"),
G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
error->message);
g_clear_error (&error);
2014-07-01 21:56:39 +08:00
g_object_unref (file);
app/actions/data-commands.c app/actions/documents-commands.c 2006-10-09 Michael Natterer <mitch@gimp.org> * app/actions/data-commands.c * app/actions/documents-commands.c * app/actions/drawable-commands.c * app/actions/gradients-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/palettes-commands.c * app/actions/select-commands.c * app/actions/vectors-commands.c * app/core/gimp-contexts.c * app/core/gimp-documents.c * app/core/gimp-edit.c * app/core/gimp-modules.c * app/core/gimp-parasites.c * app/core/gimp-templates.c * app/core/gimp-units.c * app/core/gimpchannel.c * app/core/gimpdatafactory.[ch] * app/core/gimpdrawable-bucket-fill.c * app/core/gimpimage-merge.c * app/core/gimpimagefile.c * app/core/gimplayer-floating-sel.c * app/core/gimppdbprogress.c * app/core/gimpselection.c * app/dialogs/palette-import-dialog.c * app/display/gimpdisplayshell-dnd.c * app/gui/session.c * app/gui/themes.c * app/pdb/gimpprocedure.c * app/plug-in/gimpplugin-message.c * app/plug-in/gimpplugin.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.c * app/text/gimptextlayer-xcf.c * app/text/gimptextlayer.c * app/widgets/gimpcontrollers.c * app/widgets/gimpdataeditor.c * app/widgets/gimpdevices.c * app/widgets/gimpdnd-xds.c * app/widgets/gimplayertreeview.c * app/widgets/gimptoolbox-dnd.c * app/widgets/gimptoolbox.c * app/widgets/gimpuimanager.c * app/widgets/gimpvectorstreeview.c * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/palette.pdb: convert lots of g_message() to gimp_message(). Make sure we never pass unknown strings (like error->message) to printf-like functions directly; run them thorugh "%s" instead. Don't translate some messages which should never happen. * app/pdb/brush_cmds.c * app/pdb/gradient_cmds.c * app/pdb/palette_cmds.c: regenerated.
2006-10-10 02:49:15 +08:00
return;
}
2014-07-01 21:56:39 +08:00
g_object_unref (file);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
}
gtk_widget_destroy (dialog);
the active_tool may change in the middle of gdisplay_canvas_events(), so 2001-07-08 Michael Natterer <mitch@gimp.org> * app/disp_callbacks.c: the active_tool may change in the middle of gdisplay_canvas_events(), so re-get it after using it for cursor_update. * app/base/boundary.c: made some global variables local. * app/core/gimpdrawable.c: don't call gimp_drawable_set_visible() in gimp_drawable_configure() because we don't want signal emissions while configuring the drawable. * app/gui/Makefile.am * app/gui/brushes-commands.[ch] * app/gui/data-commands.[ch] * app/gui/gradients-commands.[ch] * app/gui/palettes-commands.[ch] * app/gui/patterns-commands.[ch]: new files for new new item factories' callbacks. * app/gui/menus.[ch]: added context menus for brushes, patterns, ... * app/gui/gradient-editor.c * app/gui/palette-editor.c: removed the "Save as POV", "Import Palette" and "Merge Palattes" buttons as they are item factory callbacks now. * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdatafactoryview.[ch]: pass a "GimpContainerContextFunc" pointer to all GimpContainerEditor subclasses' constructors. Use the function to show the context menu. * app/widgets/gimpcontainergridview.c: dispatch the previews' "context" signal. * app/widgets/gimppreview.[ch]: new signal "context" which is emitted on right-click. * app/gui/brush-select.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/layers-commands.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/test-commands.c: changed accordingly.
2001-07-09 05:44:52 +08:00
}