gimp/app/dialogs/dialogs-constructors.c

994 lines
31 KiB
C
Raw Normal View History

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 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.
*/
#include "config.h"
#include <gtk/gtk.h>
#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/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/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
Cleaned up all places which pick colors to work consistently: the concept 2003-09-26 Michael Natterer <mitch@gimp.org> Cleaned up all places which pick colors to work consistently: the concept of an "active color" has disappeared, instead <ctrl> picks the BG color all over the place (fixes bug #122931). * app/tools/tools-enums.[ch]: added enum GimpColorPickMode which can be one of { FOREGROUND, BACKGROUND }. Reordered enums so non-registered ones are at the end of the file. Removed trailing whitespace. * app/tools/gimpcolorpickeroptions.[ch]: added a "pick-mode" property and a GUI for it. Renamed the "update-active" property to "update-toolbox". * app/tools/gimpcolorpickertool.c: honor the new option. Toggle pick-mode on <ctrl>. * app/tools/gimpcolortool.[ch]: added pick_mode member and change the cursor accordingly. * app/widgets/gimpcolormapeditor.[ch]: added "GdkModifierType state" to the "selected" signal. Removed the signal's default implementation. * app/gui/dialogs-constructors.c: fixed the signal handler which lives here and set BG if <ctrl> was pressed. * app/widgets/gimppaletteeditor.c: removed weird <ctrl> <-> active_color interaction and pick BG on <ctrl>. Don't change the toolbox color when editing a color in the palette. * app/widgets/gimptoolbox-color-area.[ch]: made the whole active_color stuff private. Will remove these artefacts soon... * app/gui/colormap-editor-menu.c * app/gui/palette-editor-menu.c: added separate menu entries for adding a color from the current FG and BG. * app/gui/colormap-editor-commands.c * app/gui/palette-editor-commands.[ch]: changed callbacks accordingly. * cursors/background.xbm * cursors/background_mask.xbm * cursors/foreground.xbm * cursors/foreground_mask.xbm * cursors/gimp-tool-cursors.xcf: moved the FG/BG cursor modifiers closer to the upper right corner. * app/widgets/gimpcursor.c: ignore the cursor modifiers' hotspots since they are not relevant and I didn't save the hotspot in the updated cursor files for that reason.
2003-09-26 21:33:54 +08:00
#include "core/gimpimage-colormap.h"
#include "core/gimplayer.h"
app/core/Makefile.am app/core/core-types.h new base class for something 2002-02-25 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimpitem.[ch]: new base class for something which is a child of an image, has a PDB ID, a tattoo, parasites and emits a "removed" signal. * app/core/gimpdrawable.[ch] * app/vectors/gimpvectors.[ch]: derive from GimpItem. Removed lots of stuff from GimpDrawable. * app/core/gimp.[ch]: changed gimp->drawable_table and gimp->next_drawable_ID to gimp->item_table and gimp->next_item_id. * app/undo.[ch]: s/undo_push_drawable_parasite/undo_push_item_parasite/, minor cleanups. * app/core/gimplayer.[ch]: changed gimp_layer_new_from_tiles() and gimp_layer_new_from_drawable() to take the "dest_gimage" as second, not first parameter. * app/image_map.c * app/core/gimpchannel.c * app/core/gimpdrawable-blend.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpdrawable-histogram.c * app/core/gimpdrawable-offset.c * app/core/gimpdrawable-preview.c * app/core/gimpdrawable-transform.c * app/core/gimpedit.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-pick-color.c * app/core/gimpimage.c * app/core/gimplayer-floating-sel.c * app/display/gimpdisplayshell-dnd.c * app/file/file-save.c * app/gui/channels-commands.c * app/gui/file-save-dialog.c * app/gui/layers-commands.c * app/gui/offset-dialog.c * app/gui/paths-dialog.c * app/gui/toolbox.c * app/paint/gimpairbrush.c * app/paint/gimpclone.c * app/paint/gimpconvolve.c * app/paint/gimpdodgeburn.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimppaintcore.c * app/paint/gimppencil.c * app/paint/gimpsmudge.c * app/plug-in/plug-in.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpinktool.c * app/tools/gimppainttool.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/widgets/gimpdrawablepreview.c: changed accordingly. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpitemlistview.[ch]: new widget implementing most of the stuff formerly done by GimpDrawableListView. * app/widgets/gimpchannellistview.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimplayerlistview.c: changed accordingly. * app/widgets/gimpdnd.[ch]: added a vectors DND type. * app/gui/menus.c * app/gui/dialogs.c * app/gui/dialogs-constructors.[ch]: added a vectors dialog and a vectors item_factory. * app/gui/Makefile.am * app/gui/vectors-commands.[ch]: new files implementing the callbacks for the new vectors dialog and item_factory. * app/pdb/pdb_glue.h: some more ugly hacks to keep intermediate perl code working... * tools/pdbgen/pdb.pl: added a vectors type, use GimpItem for all ID lookups. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/misc_tools.pdb * tools/pdbgen/pdb/parasite.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/selection_tools.pdb: misc changes according to stuff above. * app/pdb/channel_cmds.c * app/pdb/color_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/floating_sel_cmds.c * app/pdb/image_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/parasite_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c * app/pdb/text_tool_cmds.c * app/pdb/transform_tools_cmds.c: regenerated.
2002-02-26 01:58:50 +08:00
#include "vectors/gimpvectors.h"
#include "config/gimpdisplayconfig.h"
themes/Default/images/stock-delete-16.png 2003-03-06 Michael Natterer <mitch@gimp.org> * themes/Default/images/stock-delete-16.png * themes/Default/images/stock-lower-16.png * themes/Default/images/stock-new-16.png * themes/Default/images/stock-paste-16.png * themes/Default/images/stock-raise-16.png * themes/Default/images/stock-refresh-16.png: removed these files since we use the icons provided by GTK+ now. * themes/Default/gtkrc * themes/Default/images/Makefile.am: removed them here hoo. * libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent in the header and the .c file. Added GIMP_STOCK_ERROR and GIMP_STOCK_QUESTION which are available in all sizes (unlike GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION). * app/core/gimpviewable.c * app/display/gimpdisplayshell.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimpwidgets-utils.c * app/widgets/gimpdatafactoryview.c: use the new stock IDs. * app/config/gimpcoreconfig.[ch]: renamed "preview_size" to "layer_preview_size" and added "gboolean layer_previews" which switches layer previews on/off independent of their size. * app/config/gimprc-blurbs.h: added/changed their blurbs. * app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE. * app/core/gimpdrawable-preview.c * app/core/gimpdrawable.c * app/core/gimpimage.c: return NULL previews if core_config->layer_previews is FALSE. Invalidate all layer/channel previews whenever "layer_previews" changes. * app/widgets/gimppreviewrendererdrawable.c * app/widgets/gimppreviewrendererimage.c: render the stock_id if the drawable/image returns a NULL preview. Fixes bug #107242. * app/display/gimpdisplayshell-handlers.c: don't set the sensitivity of the navigation button because it can no longer be disabled. * app/display/gimpdisplayshell-layer-select.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/paths-dialog.c: changed accordingly. * app/gui/preferences-dialog.c: added a toggle button for the new "layer_previews" boolean. * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerlistview.c: chain up unconditionally in GimpContainerView::clear_items(). * app/widgets/gimpcontainertreeview.c: ditto. Made the reorder() implementation lengthy and eeky (but working) again... Stop signal emission on double clicks so GtkTreeView doesn't re-select the item we are about change. * app/widgets/gimpcontainerview.c (gimp_container_view_real_clear_items): need to use g_hash_table_new_full() here too or everything will b0rk. * app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_default_render_stock): use gtk_widget_render_icon() instead of gtk_icon_set_render_icon(). * tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-07 00:47:34 +08:00
#include "widgets/gimpbrusheditor.h"
removed GimpFillType. 2001-06-29 Michael Natterer <mitch@gimp.org> * app/appenums.h: removed GimpFillType. * app/gimprc.c: parse the session-info's new "aux-info" field. * app/global_edit.[ch]: removed the old "Paste Named" dialog and prefixed all functions with "gimp_". * app/core/core-types.h: added GimpFillType. * app/core/gimpbrush.[ch]: new signal "spacing_changed". * app/gui/Makefile.am * app/gui/tools-commands.[ch]: one more file cut out of commands.[ch]. * app/gui/commands.[ch]: removed the tools stuff here. * app/gui/brush-select.[ch] * app/gui/dialogs-constructors.c: use the new GimpBrushFactoryView (see below). * app/gui/dialogs-commands.[ch] * app/gui/menus.[ch]: - Made it 64bit safe again by passing the dialog factory's identifiers as GQuarks, not as guints created by GPOINTER_TO_UINT(). - Added a "gchar *quark_string" field to GimpItemFactoryEntry which gets transformed into a GQuark by menus_create_item(). - Added SEPARATOR() and BRANCH() macros which make the *_entries[] arrays more readable. - Added a menu item to show/hide GimpImageDock's image menu. - Removed file_last_opened_cmd_callback(). * app/gui/edit-commands.c: the global_edit functions are "gimp_" prefixed now. * app/gui/file-commands.[ch]: added file_last_opened_cmd_callback() here. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpbrushfactoryview.[ch]: new widget: a GimpDataFactory subclass with a "spacing" scale. * app/widgets/gimpcontainereditor.[ch]: - Connect to the GimpContainerView's "select_item", "activate_item" and "context_item" signals here once instead of in each subclass and dispatch them via new virtual functions. - Added a convenience function which makes DND to the buttons much less painful for subclasses. * app/widgets/gimpbufferview.c * app/widgets/gimpdatafactoryview.[ch]: changed accordingly. * app/widgets/gimpdialogfactory.[ch]: - Added gimp_dialog_factory_dialog_raise() which can raise toplevel dialogs _and_ dockables (and creates them if they are not open yet). - Keep track of all created dialogs (not only toplevels). - Added an "aux_info" field to GimpSessionInfo which is a GList of gchar* and is saved in sessionrc. - Remember if GimpImageDock's image menu is visible by using an aux_info string. - The code did not become nicer with all those new constraints. I have to add comments before I forget how it works. * app/widgets/gimpdockbook.c: set the state of the "Show Image Menu" menu item before popping up the item factory. * app/widgets/gimpimagedock.[ch]: added gimp_image_dock_set_show_image_meu(). * plug-ins/gdyntext/gdyntext.c * plug-ins/perl/examples/fit-text * plug-ins/perl/examples/terral_text * plug-ins/perl/examples/tex-to-float: register all text rendering plug-ins under <Image>/Filters/Text * app/pdb/brush_select_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/enums.pl * po/POTFILES.in: changed according to all the stuff above.
2001-06-30 03:25:03 +08:00
#include "widgets/gimpbrushfactoryview.h"
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
#include "widgets/gimpbufferview.h"
added virtual functions set_toggles_visible() and set_toggles_sensitive(). 2002-11-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolorselector.[ch]: added virtual functions set_toggles_visible() and set_toggles_sensitive(). Added a stock_id. Emit "color_changed" and "channel_changed" on set_color() and set_channel() resp. * libgimpwidgets/gimpcolornotebook.[ch]: implement the new methods. Added gimp_color_notebook_set_has_page() to control which selectors a notebook contains. * libgimpwidgets/gimpcolorscales.[ch]: removed the toggle API and implement the new methods. * libgimpwidgets/gimpcolorselect.c: added toggle buttons for the channels so the widget doesn't need external ones. * app/gui/color-notebook.c: changed accordingly. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-color-triangle-16.png: added a (bad) icon for the triangle color selector. * modules/colorsel_triangle.c: use the new icon. * modules/colorsel_water.c: use the "Paintbrush" icon for now. * app/widgets/gimpcoloreditor.[ch]: new widget for editing the FG/BG color featuring a color notebook, stock buttons for selecting the pages and a GimpPickButton. * app/widgets/Makefile.am * app/widgets/widgets-types.h: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added a dockable wrapper for GimpColorEditor. * app/gui/menus.c: added it to the menus. Also added separate Layers, Channels and Paths entries. Bind <ctrl>L to the new callback so it doesn't always create a new layers dialog.
2002-11-05 08:02:56 +08:00
#include "widgets/gimpcoloreditor.h"
#include "widgets/gimpcolormapeditor.h"
#include "widgets/gimpcontainergridview.h"
Started migration from GtkList to GtkTreeView: 2003-02-21 Michael Natterer <mitch@gimp.org> Started migration from GtkList to GtkTreeView: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpcontainertreeview.[ch]; new GimpContainerView subclass using GtkListStore/GtkTreeView. * app/widgets/widgets-enums.h: added GIMP_VIEW_TYPE_TREE to thje GimpViewType enum. * app/widgets/gimpcontainereditor.c: added GimpContainerTreeView to the switch() which selects the view type. * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c: added tree view versions of many dialogs. * app/widgets/gimppreview.[ch]: removed the get_size() virtual function and gimp_preview_calc_size(). * app/core/gimpviewable.[ch]: added virtual function get_preview_size() and gimp_viewable_calc_preview_size(). * app/core/gimpbuffer.c * app/core/gimpdrawable-preview.[ch] * app/core/gimpdrawable.c * app/core/gimpgradient.c * app/core/gimpimage.c * app/core/gimppalette.c: added get_preview_size() implementations. * app/widgets/gimpbufferpreview.c * app/widgets/gimpdrawablepreview.c * app/widgets/gimpgradientpreview.c * app/widgets/gimpimagepreview.c * app/widgets/gimppalettepreview.c * app/widgets/gimpselectioneditor.c * app/widgets/gimpundopreview.c * app/display/gimpnavigationview.c: changed accordingly, removed get_size() implementations. * app/widgets/widgets-types.h: changed the first param of GimpItemGetNameFunc from GtkWidget to GObject. * app/widgets/gimpcontainerview-utils.c: accept a GimpViewable as object in the built-in get_name funcs. * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpcontainergridview.c * app/widgets/gimplistitem.c * app/widgets/gimpmenuitem.c: changed accordingly.
2003-02-22 03:03:19 +08:00
#include "widgets/gimpcontainertreeview.h"
added a "menu_title" which is registered with each menu. 2003-09-23 Michael Natterer <mitch@gimp.org> * app/widgets/gimpmenufactory.[ch]: added a "menu_title" which is registered with each menu. * app/widgets/gimpitemfactory.[ch]: added the title to the constructor and to the GimpItemFactory struct. * app/gui/menus.c: register titles with all menus. * app/widgets/gimpdockable.[ch]: show the tab menu, not the contained dialog's menu when clicking on the menu button. Embed the dialog's menu as submenu. Use the item_factory's title and the dockable's stock_id for the submenu entry. * app/widgets/gimpeditor.c: removed GtkWidget:popup_menu() implementation since that's done by GimpDockable now. * app/widgets/gimpdockbook.c: set the new menu item invisible when showing the menu as tab menu. * app/widgets/gimphelp-ids.h: added GIMP_HELP_DOCK_TAB_DETACH and renamed _TAB_REMOVE to _TAB_CLOSE. * app/gui/dialogs-menu.c: added the new menu entry for showing the dialog's sub-menu. Added a "Detach" menu item, renamed "Remove" to "Close". Accept both a GimpDockbook and a GimpDockable pointer as "data" in dialogs_menu_update(). * app/gui/dialogs-commands.[ch]: changed accordingly. Never use gtk_item_factory_popup_data_from_widget() but always the "data" passed to the callbacks. Take care to not set the already active preview_size, tab_style and list/grid type in the resp. callbacks to avoid being called from dialogs_menu_update(). * app/gui/dialogs-constructors.c: removed separate set_context_funcs and get_menu_funcs for GimpContainerView and GimpContainerEditor widgets and simply use gimp_container_view_get_by_dockable() to find the right widget.
2003-09-24 00:17:25 +08:00
#include "widgets/gimpcontainerview-utils.h"
#include "widgets/gimpdataeditor.h"
#include "widgets/gimpdevicestatus.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdockable.h"
#include "widgets/gimpdocumentview.h"
#include "widgets/gimperrorconsole.h"
#include "widgets/gimpfontview.h"
#include "widgets/gimpgradienteditor.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimphistogrameditor.h"
#include "widgets/gimpimagedock.h"
#include "widgets/gimpimageview.h"
#include "widgets/gimpitemtreeview.h"
#include "widgets/gimppaletteeditor.h"
#include "widgets/gimppatternfactoryview.h"
#include "widgets/gimpselectioneditor.h"
#include "widgets/gimptemplateview.h"
g_strdup() the stock_id passed to gimp_tool_info_new() because the 2002-03-14 Michael Natterer <mitch@gimp.org> * app/core/gimptoolinfo.c: g_strdup() the stock_id passed to gimp_tool_info_new() because the caller's memory may disappear after registering the tool (tool modules). Made a GimpDock out of the toolbox: * app/gui/Makefile.am * app/gui/color-area.[ch] * app/gui/indicator-area.[ch] * app/gui/toolbox.[ch]: removed... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimptoolbox-color-area.[ch] * app/widgets/gimptoolbox-indicator-area.[ch] * app/widgets/gimptoolbox.[ch]: ...and added here. * app/widgets/gimpdock.[ch]: don't set a minimal width. Added a "destroy_if_empty" boolean so we can prevent destruction of the toolbox if it's last dockable is removed. Added gimp_dock_construct() which is called from GimpImageDock and GimpToolbox. * app/widgets/gimpimagedock.[ch]: Default to not showing the image menu, set a minimal width here, misc. minor cleanup. * app/widgets/gimpdockbook.c: some more GIMP_IS_IMAGE_DOCK() checks, fixed dnd widget creation. * app/widgets/gimpdialogfactory.[ch]: changed gimp_dialog_factories_toggle() to take just the toolbox_factory as parameter. When restoring the session use the created dock's dialog factory to create dockables, not the the factory we created the dock from (for the toolbox). * app/display/gimpdisplayshell-callbacks.c: changed accordingly. * app/gui/dialogs.[ch]: create an own dialog factory for the toolbox and set dialogs_toolbox_new() as it's new_dock_func. * app/gui/dialogs-constructors.[ch]: changed dialogs_toolbox_get() accordingly. * app/gui/dialogs-commands.[ch]: added dialogs_show_toolbox(), ckeck if a dock is really a GimpImageDock before casting. * app/gui/gui.c * app/gui/menus.c * app/widgets/gimppaletteeditor.c: changed accordingly. * app/gui/color-notebook.c * app/gui/color-select.c * app/gui/colormap-dialog.c * app/gui/palette-editor-commands.c: removed useless inclusion of "gui/color-area.h". * themes/Default/gtkrc: set "gimp-dock-style" for GimpToolbox widgets.
2002-03-15 01:07:02 +08:00
#include "widgets/gimptoolbox.h"
#include "widgets/gimptooloptionseditor.h"
#include "widgets/gimptoolview.h"
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
#include "widgets/gimpundoeditor.h"
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
#include "widgets/gimpvectorstreeview.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpnavigationeditor.h"
#include "actions/channels-commands.h"
#include "actions/edit-commands.h"
#include "actions/file-commands.h"
#include "actions/layers-commands.h"
#include "actions/vectors-commands.h"
#include "about-dialog.h"
#include "dialogs.h"
#include "dialogs-constructors.h"
added new function gimp_dialog_factory_add_foreign() which adds a dialog 2003-05-02 Michael Natterer <mitch@gimp.org> * app/widgets/gimpdialogfactory.[ch]: added new function gimp_dialog_factory_add_foreign() which adds a dialog that was not created by the factory itself. Its identifier however must be registered with the factory. Connect to all toplevel dialogs' "configure_event" and remember the resulting window geometry so we get session management for *all* dialogs, not only for those which were open on exit. * app/gui/dialogs.c: added the "File New" dialog. Added foreign entries (without constructor) for all dialogs opened by tools. * app/gui/dialogs-constructors.[ch]: added a constructor for the file_new dialog. * app/gui/file-new-dialog.[ch]: renamed file_new_dialog_create() to file_new_dialog_new() and removed the gimage and template paramaters. Adder new function file_new_dialog_set() to set gimage and template after creation. * app/gui/file-commands.c * app/gui/templates-commands.c: changed accordingly. * app/tools/gimpimagemaptool.[ch] * app/tools/gimptransformtool.[ch]: added "const gchar *shell_identifier" to the tool structs. Register the tool dialogs using gimp_dialog_factory_add_foreign(). * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcurvestool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpthresholdtool.c: set "shell_identifier" so the dialogs become session managed. Fixes bug #61091. * app/tools/gimpcroptool.c: register the crop dialog with the dialog factory. Fixes bug #52849. * app/tools/gimpcolorpickertool.c: ditto. Unrelated: * app/tools/gimptool.c: no need to cast the return value of g_object_new().
2003-05-03 02:43:15 +08:00
#include "file-new-dialog.h"
#include "module-browser.h"
#include "preferences-dialog.h"
#include "tips-dialog.h"
#include "gimp-intl.h"
/* local function prototypes */
static GtkWidget * dialogs_dockable_new (GtkWidget *widget,
const gchar *name,
const gchar *blurb,
const gchar *stock_id,
const gchar *help_id);
static void dialogs_indexed_palette_selected (GimpColormapEditor *editor,
GdkModifierType state,
GimpDockable *dockable);
/**********************/
/* toplevel dialogs */
/**********************/
added new function gimp_dialog_factory_add_foreign() which adds a dialog 2003-05-02 Michael Natterer <mitch@gimp.org> * app/widgets/gimpdialogfactory.[ch]: added new function gimp_dialog_factory_add_foreign() which adds a dialog that was not created by the factory itself. Its identifier however must be registered with the factory. Connect to all toplevel dialogs' "configure_event" and remember the resulting window geometry so we get session management for *all* dialogs, not only for those which were open on exit. * app/gui/dialogs.c: added the "File New" dialog. Added foreign entries (without constructor) for all dialogs opened by tools. * app/gui/dialogs-constructors.[ch]: added a constructor for the file_new dialog. * app/gui/file-new-dialog.[ch]: renamed file_new_dialog_create() to file_new_dialog_new() and removed the gimage and template paramaters. Adder new function file_new_dialog_set() to set gimage and template after creation. * app/gui/file-commands.c * app/gui/templates-commands.c: changed accordingly. * app/tools/gimpimagemaptool.[ch] * app/tools/gimptransformtool.[ch]: added "const gchar *shell_identifier" to the tool structs. Register the tool dialogs using gimp_dialog_factory_add_foreign(). * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcurvestool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpthresholdtool.c: set "shell_identifier" so the dialogs become session managed. Fixes bug #61091. * app/tools/gimpcroptool.c: register the crop dialog with the dialog factory. Fixes bug #52849. * app/tools/gimpcolorpickertool.c: ditto. Unrelated: * app/tools/gimptool.c: no need to cast the return value of g_object_new().
2003-05-03 02:43:15 +08:00
GtkWidget *
dialogs_file_new_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return file_new_dialog_new (context->gimp);
}
GtkWidget *
dialogs_preferences_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return preferences_dialog_create (context->gimp);
}
GtkWidget *
dialogs_module_browser_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 19:47:11 +08:00
return module_browser_new (context->gimp);
}
GtkWidget *
dialogs_tips_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
Finally landed the new GimpConfig based gimprc parser. It's not finished 2002-11-18 Sven Neumann <sven@gimp.org> Finally landed the new GimpConfig based gimprc parser. It's not finished yet but we need to start somewhere. This release removes the old gimprc.[ch] files. The gimprc format changes slightly, but the changes are minimal. The Preferences dialog is temporarily disabled since it still needs to be ported. If you are are afraid, stay away from CVS for a few days ;-) * app/Makefile.am * app/gimprc.[ch]: removed the old gimprc system. * app/base/Makefile.am * app/base/base-config.[ch]: removed these files in favor of config/gimpbaseconfig.[ch]. * app/core/Makefile.am * app/core/gimpcoreconfig.[ch]: removed these files in favor of config/gimpcoreconfig.[ch]. * app/config/Makefile.am * app/config/config-types.h: moved typedefs into this new file. * app/config/gimpbaseconfig.[ch] * app/config/gimpcoreconfig.[ch] * app/config/gimpdisplayconfig.[ch] * app/config/gimpguiconfig.[ch] * app/config/gimprc.[ch] * app/config/test-config.c: brought into shape for real use. * app/base/base-types.h: include config/config-types.h here. Added a global GimpBaseConfig *base_config variable to ease migration. * app/gui/Makefile.am: temporarily disabled the preferences dialog. * app/app_procs.c * app/undo.c * app/undo_history.c * app/base/base.[ch] * app/base/gimphistogram.c * app/base/pixel-processor.c * app/base/temp-buf.c * app/base/tile-cache.c * app/core/core-types.h * app/core/gimp-documents.c * app/core/gimp.c * app/core/gimpbrush.c * app/core/gimpbrushgenerated.c * app/core/gimpcontext.c * app/core/gimpdrawable-transform.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimpimagefile.c * app/core/gimpmodules.c * app/core/gimppattern.c * app/display/Makefile.am * app/display/gimpdisplay-handlers.c * app/display/gimpdisplay.[ch] * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-handlers.c * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell-render.c * app/display/gimpdisplayshell-scale.c * app/display/gimpdisplayshell-scroll.c * app/display/gimpdisplayshell-selection.c * app/display/gimpdisplayshell.[ch] * app/display/gimpnavigationview.c * app/file/file-save.c * app/gui/device-status-dialog.c * app/gui/dialogs-constructors.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/gui.c * app/gui/menus.c * app/gui/paths-dialog.c * app/gui/resize-dialog.c * app/gui/session.c * app/gui/test-commands.c * app/gui/tips-dialog.c * app/gui/tips-dialog.h * app/gui/user-install-dialog.c * app/gui/view-commands.c * app/paint/gimppaintcore.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimpinktool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimptexttool.[ch] * app/tools/selection_options.c * app/tools/tools.c * app/tools/transform_options.c * app/widgets/gimphelp.c * app/widgets/gimpitemfactory.c * app/widgets/gimpselectioneditor.c * app/xcf/xcf-load.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/transform_tools.pdb: use the new config system instead of the old gimprc stuff. * etc/gimprc.in * etc/gimprc_user.in: adapted to the new gimprc format. Will update the man-page later... * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c * app/pdb/image_cmds.c * app/pdb/layer_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpgimprc_pdb.c: regenerated.
2002-11-19 04:50:31 +08:00
return tips_dialog_create (context->gimp);
}
GtkWidget *
dialogs_about_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return about_dialog_create ();
}
app/display/Makefile.am app/display/display-types.h new widget derived 2002-02-03 Michael Natterer <mitch@gimp.org> * app/display/Makefile.am * app/display/display-types.h * app/display/gimpstatusbar.[ch]: new widget derived from GtkStatusbar. Contains the coordinates display, a progress bar which is also used for status message display and a cancel button. Added a simplified API for pushing/popping messages which takes a string as context_id and does the conversion to guint internally on each call. * app/display/gimpdisplayshell.[ch]: removed the status bar code. * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-handlers.c * app/display/gimpdisplayshell-scale.c * app/gui/view-commands.c * app/gimpprogress.c: changed accordingly. Removed knowledge about GimpDisplayShell from tools: * app/tools/gimptool.[ch]: added gimp_tool_push_status() and gimp_tool_pop_status() so tools don't need to fiddle with display details. * app/tools/gimpdrawtool.[ch]: pass a GimpDisplay instead of a GdkWindow to gimp_draw_tool_start() (the window passed was always gdisp->shell->canvas->window). * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.[ch] * app/tools/gimpclonetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.[ch] * app/tools/gimpeditselectiontool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimpiscissorstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.[ch] * app/tools/gimpmovetool.c * app/tools/gimppainttool.[ch] * app/tools/gimppathtool.c * app/tools/gimprectselecttool.[ch] * app/tools/gimptransformtool.c: changed accordingly: - pass GimpDisplay to gimp_draw_tool_start(). - use GimpTool's new status push/pop functions. - removed the statusbar context_id from all tool structs. * app/gui/dialogs-constructors.[ch]: a bit cleanup in preparation of dockable editor dialogs.
2002-02-03 20:10:23 +08:00
/***********/
/* docks */
/***********/
g_strdup() the stock_id passed to gimp_tool_info_new() because the 2002-03-14 Michael Natterer <mitch@gimp.org> * app/core/gimptoolinfo.c: g_strdup() the stock_id passed to gimp_tool_info_new() because the caller's memory may disappear after registering the tool (tool modules). Made a GimpDock out of the toolbox: * app/gui/Makefile.am * app/gui/color-area.[ch] * app/gui/indicator-area.[ch] * app/gui/toolbox.[ch]: removed... * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimptoolbox-color-area.[ch] * app/widgets/gimptoolbox-indicator-area.[ch] * app/widgets/gimptoolbox.[ch]: ...and added here. * app/widgets/gimpdock.[ch]: don't set a minimal width. Added a "destroy_if_empty" boolean so we can prevent destruction of the toolbox if it's last dockable is removed. Added gimp_dock_construct() which is called from GimpImageDock and GimpToolbox. * app/widgets/gimpimagedock.[ch]: Default to not showing the image menu, set a minimal width here, misc. minor cleanup. * app/widgets/gimpdockbook.c: some more GIMP_IS_IMAGE_DOCK() checks, fixed dnd widget creation. * app/widgets/gimpdialogfactory.[ch]: changed gimp_dialog_factories_toggle() to take just the toolbox_factory as parameter. When restoring the session use the created dock's dialog factory to create dockables, not the the factory we created the dock from (for the toolbox). * app/display/gimpdisplayshell-callbacks.c: changed accordingly. * app/gui/dialogs.[ch]: create an own dialog factory for the toolbox and set dialogs_toolbox_new() as it's new_dock_func. * app/gui/dialogs-constructors.[ch]: changed dialogs_toolbox_get() accordingly. * app/gui/dialogs-commands.[ch]: added dialogs_show_toolbox(), ckeck if a dock is really a GimpImageDock before casting. * app/gui/gui.c * app/gui/menus.c * app/widgets/gimppaletteeditor.c: changed accordingly. * app/gui/color-notebook.c * app/gui/color-select.c * app/gui/colormap-dialog.c * app/gui/palette-editor-commands.c: removed useless inclusion of "gui/color-area.h". * themes/Default/gtkrc: set "gimp-dock-style" for GimpToolbox widgets.
2002-03-15 01:07:02 +08:00
GtkWidget *
dialogs_toolbox_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
/* we pass "global_dock_factory", _not_ "global_toolbox_factory" to
* the toolbox constructor, because the toolbox_factory has no
* dockables registered
*/
return gimp_toolbox_new (global_dock_factory, context->gimp);
}
cleanup. 2001-04-22 Michael Natterer <mitch@gimp.org> * app/Makefile.am: cleanup. * app/interface.c: #include "gimpui.h" * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/menus.c * app/gui/test-commands.[ch]: changes for the image menu below. * app/apptypes.h * app/widgets/Makefile.am * app/widgets/gimpcontainermenu.[ch] * app/widgets/gimpcontainermenuimpl.[ch]: new widgets. The actual implemtation lives in a separate file because gimpcontainermenu.c's code is identical to gimpcontainerview.c's except for the base class. This will become an interface with Gtk 2.0. * app/widgets/gimpimagedock.[ch]: a dock with an image menu. The pages still don't follow the context correctly. * app/widgets/gimpmenuitem.[ch]: a menu item with a preview. * app/widgets/gimpdialogfactory.[ch]: pass a dock constructor to the constructor and provide a method to create a new dock within this factory's context. * app/widgets/gimpdock.[ch]: removed the constructor because we create only image docks now. Put the vbox into a main_vbox (which also contains the image menu). * app/widgets/gimpdockbook.[ch]: create new docks with the dialog factory. * app/gimpcontainer.[ch] * app/gimpdata.[ch] * app/gimpdatafactory.[ch] * app/gimpdatalist.[ch] * app/gimplist.[ch] * app/gimpviewable.[ch] * app/widgets/gimpbrushpreview.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerlistview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdockable.[ch] * app/widgets/gimpdrawablelistitem.[ch] * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpdrawablepreview.[ch] * app/widgets/gimplayerlistitem.[ch] * app/widgets/gimplayerlistview.[ch] * app/widgets/gimplistitem.[ch] * app/widgets/gimppalettepreview.[ch] * app/widgets/gimppatternpreview.[ch] * app/widgets/gimppreview.[ch]: ass-sign some copyrights.
2001-04-22 08:38:56 +08:00
GtkWidget *
dialogs_dock_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
cleanup. 2001-04-22 Michael Natterer <mitch@gimp.org> * app/Makefile.am: cleanup. * app/interface.c: #include "gimpui.h" * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/menus.c * app/gui/test-commands.[ch]: changes for the image menu below. * app/apptypes.h * app/widgets/Makefile.am * app/widgets/gimpcontainermenu.[ch] * app/widgets/gimpcontainermenuimpl.[ch]: new widgets. The actual implemtation lives in a separate file because gimpcontainermenu.c's code is identical to gimpcontainerview.c's except for the base class. This will become an interface with Gtk 2.0. * app/widgets/gimpimagedock.[ch]: a dock with an image menu. The pages still don't follow the context correctly. * app/widgets/gimpmenuitem.[ch]: a menu item with a preview. * app/widgets/gimpdialogfactory.[ch]: pass a dock constructor to the constructor and provide a method to create a new dock within this factory's context. * app/widgets/gimpdock.[ch]: removed the constructor because we create only image docks now. Put the vbox into a main_vbox (which also contains the image menu). * app/widgets/gimpdockbook.[ch]: create new docks with the dialog factory. * app/gimpcontainer.[ch] * app/gimpdata.[ch] * app/gimpdatafactory.[ch] * app/gimpdatalist.[ch] * app/gimplist.[ch] * app/gimpviewable.[ch] * app/widgets/gimpbrushpreview.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerlistview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdockable.[ch] * app/widgets/gimpdrawablelistitem.[ch] * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpdrawablepreview.[ch] * app/widgets/gimplayerlistitem.[ch] * app/widgets/gimplayerlistview.[ch] * app/widgets/gimplistitem.[ch] * app/widgets/gimppalettepreview.[ch] * app/widgets/gimppatternpreview.[ch] * app/widgets/gimppreview.[ch]: ass-sign some copyrights.
2001-04-22 08:38:56 +08:00
{
added a read-only property for the display's image, so it can be retreived 2002-05-10 Michael Natterer <mitch@gimp.org> * app/display/gimpdisplay.c: added a read-only property for the display's image, so it can be retreived by the core, which treats displays as simple GimpObjects. * app/core/gimpcontext.c: made context->display an object property, not just gpointer. Connect to the "remove" signal of gimp->displays to get notified of disappearing displays. Removed the EEKWrapper and get the display's gimage with g_object_get(). * app/widgets/gimpimagedock.[ch]: added image_dock->display_container and require it being passed in the constructor. Do voodoo things in the "image_changed" and "display_changed" callbacks to ensure that the dock doesn't end up with no display even if the active image has one. Added a style property for the image menu's preview size. * app/gui/dialogs-commands.c (dialogs_menu_update): set the "View as List" and "View as Grid" items insensitive if the other view type doesn't exist. Hide them if the view cannot be classified as "list" or "grid" at all. Also hide the "Preview Size" submenu if it's pointless for the view. * app/gui/dialogs-constructors.c: added a special tab for the navigation dialog. Will propbaby add dockable->stock_id to generalize this kind of tab. Pass gimp->displays to gimp_image_dock_new(). * app/gui/menus.c: reordered the "<Dialogs>" factory entries, added more stock icons, cleanup. * etc/gtkrc_user * themes/Default/gtkrc: document usage of GimpImageDock's "menu_preview_height" property.
2002-05-10 21:09:19 +08:00
return gimp_image_dock_new (factory,
context->gimp->images,
context->gimp->displays);
cleanup. 2001-04-22 Michael Natterer <mitch@gimp.org> * app/Makefile.am: cleanup. * app/interface.c: #include "gimpui.h" * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c * app/gui/menus.c * app/gui/test-commands.[ch]: changes for the image menu below. * app/apptypes.h * app/widgets/Makefile.am * app/widgets/gimpcontainermenu.[ch] * app/widgets/gimpcontainermenuimpl.[ch]: new widgets. The actual implemtation lives in a separate file because gimpcontainermenu.c's code is identical to gimpcontainerview.c's except for the base class. This will become an interface with Gtk 2.0. * app/widgets/gimpimagedock.[ch]: a dock with an image menu. The pages still don't follow the context correctly. * app/widgets/gimpmenuitem.[ch]: a menu item with a preview. * app/widgets/gimpdialogfactory.[ch]: pass a dock constructor to the constructor and provide a method to create a new dock within this factory's context. * app/widgets/gimpdock.[ch]: removed the constructor because we create only image docks now. Put the vbox into a main_vbox (which also contains the image menu). * app/widgets/gimpdockbook.[ch]: create new docks with the dialog factory. * app/gimpcontainer.[ch] * app/gimpdata.[ch] * app/gimpdatafactory.[ch] * app/gimpdatalist.[ch] * app/gimplist.[ch] * app/gimpviewable.[ch] * app/widgets/gimpbrushpreview.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerlistview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdockable.[ch] * app/widgets/gimpdrawablelistitem.[ch] * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpdrawablepreview.[ch] * app/widgets/gimplayerlistitem.[ch] * app/widgets/gimplayerlistview.[ch] * app/widgets/gimplistitem.[ch] * app/widgets/gimppalettepreview.[ch] * app/widgets/gimppatternpreview.[ch] * app/widgets/gimppreview.[ch]: ass-sign some copyrights.
2001-04-22 08:38:56 +08:00
}
/***************/
/* dockables */
/***************/
GtkWidget *
dialogs_tool_options_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
static GtkWidget *view = NULL;
if (view)
return NULL;
view = gimp_tool_options_editor_new (context->gimp, factory->menu_factory);
g_object_add_weak_pointer (G_OBJECT (view), (gpointer) &view);
return dialogs_dockable_new (view,
_("Tool Options"), NULL,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_TOOL_OPTIONS,
GIMP_HELP_TOOL_OPTIONS_DIALOG);
}
GtkWidget *
dialogs_device_status_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
static GtkWidget *view = NULL;
if (view)
return NULL;
view = gimp_device_status_new (context->gimp);
g_object_add_weak_pointer (G_OBJECT (view), (gpointer) &view);
return dialogs_dockable_new (view,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("Devices"), _("Device Status"),
GIMP_STOCK_DEVICE_STATUS,
GIMP_HELP_DEVICE_STATUS_DIALOG);
}
GtkWidget *
dialogs_error_console_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
static GtkWidget *view = NULL;
if (view)
return NULL;
Cleaned up and improved the message system: 2003-06-13 Michael Natterer <mitch@gimp.org> Cleaned up and improved the message system: * app/core/gimp.[ch]: added "const gchar *domain" to GimpMessageFunc (a NULL domain means the message is from the GIMP core, everything else is a plug-in). * app/errors.c: pass "domain == NULL" to gimp_message(). * tools/pdbgen/pdb/message.pdb: derive the message domain from the current plug-in's menu_path (evil hack but works reasonably well). * app/pdb/message_cmds.c: regenerated. * app/widgets/gimpwidgets-utils.[ch] (gimp_message_box): added a header showing the message domain and changed the dialog layout to follow the HIG more closely. * app/gui/error-console-dialog.[ch]: removed. * app/widgets/gimperrorconsole.[ch] * app/gui/error-console-commands.[ch] * app/gui/error-console-menu.[ch]: new files containing a re-implementation of the error console dialog. * app/gui/Makefile.am * app/gui/dialogs-constructors.c * app/gui/gui.c * app/gui/menus.c * app/widgets/Makefile.am * app/widgets/widgets-types.h: changed accordingly. * app/display/gimpprogress.c: added more spacing and removed the separator (more HIG compliant). * plug-ins/[most plug-ins].c: Changed lots of messages and progress strings: - Removed plug-in names from messages since that's automatically covered by "domain" now. - Put all filenames in ''. - Changed "Loading" to "Opening". - Added "..." to all progress messages. - Cleaned up all file open/save error messages to look the same and include g_strerror(errno). - Removed special casing for progress bars and *always* show them, not only if run_mode != GIMP_RUN_NONINTERACTIVE (we can't expect all plug-ins to do this correctly but need to hack the core to sort out unwanted progress bars). Unrelated: - Cleaned up indentation, spacing, #includes, coding style and other stuff while I was at all these files.
2003-06-13 22:37:00 +08:00
view = gimp_error_console_new (context->gimp, factory->menu_factory);
g_object_add_weak_pointer (G_OBJECT (view), (gpointer) &view);
return dialogs_dockable_new (view,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("Errors"), _("Error Console"),
GIMP_STOCK_WARNING,
GIMP_HELP_ERRORS_DIALOG);
}
/***** list views *****/
GtkWidget *
dialogs_image_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->images,
context,
preview_size, 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
factory->menu_factory);
return dialogs_dockable_new (view,
_("Images"), NULL,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_IMAGES,
GIMP_HELP_IMAGE_DIALOG);
}
GtkWidget *
dialogs_brush_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
removed GimpFillType. 2001-06-29 Michael Natterer <mitch@gimp.org> * app/appenums.h: removed GimpFillType. * app/gimprc.c: parse the session-info's new "aux-info" field. * app/global_edit.[ch]: removed the old "Paste Named" dialog and prefixed all functions with "gimp_". * app/core/core-types.h: added GimpFillType. * app/core/gimpbrush.[ch]: new signal "spacing_changed". * app/gui/Makefile.am * app/gui/tools-commands.[ch]: one more file cut out of commands.[ch]. * app/gui/commands.[ch]: removed the tools stuff here. * app/gui/brush-select.[ch] * app/gui/dialogs-constructors.c: use the new GimpBrushFactoryView (see below). * app/gui/dialogs-commands.[ch] * app/gui/menus.[ch]: - Made it 64bit safe again by passing the dialog factory's identifiers as GQuarks, not as guints created by GPOINTER_TO_UINT(). - Added a "gchar *quark_string" field to GimpItemFactoryEntry which gets transformed into a GQuark by menus_create_item(). - Added SEPARATOR() and BRANCH() macros which make the *_entries[] arrays more readable. - Added a menu item to show/hide GimpImageDock's image menu. - Removed file_last_opened_cmd_callback(). * app/gui/edit-commands.c: the global_edit functions are "gimp_" prefixed now. * app/gui/file-commands.[ch]: added file_last_opened_cmd_callback() here. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpbrushfactoryview.[ch]: new widget: a GimpDataFactory subclass with a "spacing" scale. * app/widgets/gimpcontainereditor.[ch]: - Connect to the GimpContainerView's "select_item", "activate_item" and "context_item" signals here once instead of in each subclass and dispatch them via new virtual functions. - Added a convenience function which makes DND to the buttons much less painful for subclasses. * app/widgets/gimpbufferview.c * app/widgets/gimpdatafactoryview.[ch]: changed accordingly. * app/widgets/gimpdialogfactory.[ch]: - Added gimp_dialog_factory_dialog_raise() which can raise toplevel dialogs _and_ dockables (and creates them if they are not open yet). - Keep track of all created dialogs (not only toplevels). - Added an "aux_info" field to GimpSessionInfo which is a GList of gchar* and is saved in sessionrc. - Remember if GimpImageDock's image menu is visible by using an aux_info string. - The code did not become nicer with all those new constraints. I have to add comments before I forget how it works. * app/widgets/gimpdockbook.c: set the state of the "Show Image Menu" menu item before popping up the item factory. * app/widgets/gimpimagedock.[ch]: added gimp_image_dock_set_show_image_meu(). * plug-ins/gdyntext/gdyntext.c * plug-ins/perl/examples/fit-text * plug-ins/perl/examples/terral_text * plug-ins/perl/examples/tex-to-float: register all text rendering plug-ins under <Image>/Filters/Text * app/pdb/brush_select_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/enums.pl * po/POTFILES.in: changed according to all the stuff above.
2001-06-30 03:25:03 +08:00
view = gimp_brush_factory_view_new (GIMP_VIEW_TYPE_LIST,
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
context->gimp->brush_factory,
removed GimpFillType. 2001-06-29 Michael Natterer <mitch@gimp.org> * app/appenums.h: removed GimpFillType. * app/gimprc.c: parse the session-info's new "aux-info" field. * app/global_edit.[ch]: removed the old "Paste Named" dialog and prefixed all functions with "gimp_". * app/core/core-types.h: added GimpFillType. * app/core/gimpbrush.[ch]: new signal "spacing_changed". * app/gui/Makefile.am * app/gui/tools-commands.[ch]: one more file cut out of commands.[ch]. * app/gui/commands.[ch]: removed the tools stuff here. * app/gui/brush-select.[ch] * app/gui/dialogs-constructors.c: use the new GimpBrushFactoryView (see below). * app/gui/dialogs-commands.[ch] * app/gui/menus.[ch]: - Made it 64bit safe again by passing the dialog factory's identifiers as GQuarks, not as guints created by GPOINTER_TO_UINT(). - Added a "gchar *quark_string" field to GimpItemFactoryEntry which gets transformed into a GQuark by menus_create_item(). - Added SEPARATOR() and BRANCH() macros which make the *_entries[] arrays more readable. - Added a menu item to show/hide GimpImageDock's image menu. - Removed file_last_opened_cmd_callback(). * app/gui/edit-commands.c: the global_edit functions are "gimp_" prefixed now. * app/gui/file-commands.[ch]: added file_last_opened_cmd_callback() here. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpbrushfactoryview.[ch]: new widget: a GimpDataFactory subclass with a "spacing" scale. * app/widgets/gimpcontainereditor.[ch]: - Connect to the GimpContainerView's "select_item", "activate_item" and "context_item" signals here once instead of in each subclass and dispatch them via new virtual functions. - Added a convenience function which makes DND to the buttons much less painful for subclasses. * app/widgets/gimpbufferview.c * app/widgets/gimpdatafactoryview.[ch]: changed accordingly. * app/widgets/gimpdialogfactory.[ch]: - Added gimp_dialog_factory_dialog_raise() which can raise toplevel dialogs _and_ dockables (and creates them if they are not open yet). - Keep track of all created dialogs (not only toplevels). - Added an "aux_info" field to GimpSessionInfo which is a GList of gchar* and is saved in sessionrc. - Remember if GimpImageDock's image menu is visible by using an aux_info string. - The code did not become nicer with all those new constraints. I have to add comments before I forget how it works. * app/widgets/gimpdockbook.c: set the state of the "Show Image Menu" menu item before popping up the item factory. * app/widgets/gimpimagedock.[ch]: added gimp_image_dock_set_show_image_meu(). * plug-ins/gdyntext/gdyntext.c * plug-ins/perl/examples/fit-text * plug-ins/perl/examples/terral_text * plug-ins/perl/examples/tex-to-float: register all text rendering plug-ins under <Image>/Filters/Text * app/pdb/brush_select_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/enums.pl * po/POTFILES.in: changed according to all the stuff above.
2001-06-30 03:25:03 +08:00
dialogs_edit_brush_func,
context,
TRUE,
preview_size, 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
factory->menu_factory);
return dialogs_dockable_new (view,
_("Brushes"), NULL,
GIMP_STOCK_BRUSH,
GIMP_HELP_BRUSH_DIALOG);
}
GtkWidget *
dialogs_pattern_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->pattern_factory,
NULL,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Patterns"), NULL,
GIMP_STOCK_PATTERN,
GIMP_HELP_PATTERN_DIALOG);
}
GtkWidget *
dialogs_gradient_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size, 1,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Gradients>",
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
"/gradients-popup",
"gradients");
return dialogs_dockable_new (view,
_("Gradients"), NULL,
GIMP_STOCK_GRADIENT,
GIMP_HELP_GRADIENT_DIALOG);
}
GtkWidget *
dialogs_palette_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size, 1,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Palettes>",
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
"/palettes-popup",
"palettes");
return dialogs_dockable_new (view,
_("Palettes"), NULL,
GIMP_STOCK_PALETTE,
GIMP_HELP_PALETTE_DIALOG);
}
GtkWidget *
dialogs_font_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_font_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->fonts,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Fonts"), NULL,
GIMP_STOCK_FONT,
GIMP_HELP_FONT_DIALOG);
}
GtkWidget *
dialogs_tool_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_tool_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->tool_info_list,
context,
preview_size, 0,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Tools"), NULL,
GIMP_STOCK_TOOLS,
GIMP_HELP_TOOLS_DIALOG);
}
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
GtkWidget *
dialogs_buffer_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
{
GtkWidget *view;
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
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
context->gimp->named_buffers,
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
context,
preview_size, 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
factory->menu_factory);
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
return dialogs_dockable_new (view,
_("Buffers"), NULL,
GIMP_STOCK_BUFFER,
GIMP_HELP_BUFFER_DIALOG);
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
}
GtkWidget *
dialogs_document_list_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->documents,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("History"), _("Document History"),
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GTK_STOCK_OPEN,
GIMP_HELP_DOCUMENT_DIALOG);
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
}
GtkWidget *
dialogs_template_list_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
GtkWidget *view;
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->templates,
context,
preview_size, 0,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Templates"), _("Image Templates"),
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_TEMPLATE,
GIMP_HELP_TEMPLATE_DIALOG);
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
}
/***** grid views *****/
GtkWidget *
dialogs_image_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->images,
context,
preview_size, 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
factory->menu_factory);
return dialogs_dockable_new (view,
_("Images"), NULL,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_IMAGES,
GIMP_HELP_IMAGE_DIALOG);
}
GtkWidget *
dialogs_brush_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
removed GimpFillType. 2001-06-29 Michael Natterer <mitch@gimp.org> * app/appenums.h: removed GimpFillType. * app/gimprc.c: parse the session-info's new "aux-info" field. * app/global_edit.[ch]: removed the old "Paste Named" dialog and prefixed all functions with "gimp_". * app/core/core-types.h: added GimpFillType. * app/core/gimpbrush.[ch]: new signal "spacing_changed". * app/gui/Makefile.am * app/gui/tools-commands.[ch]: one more file cut out of commands.[ch]. * app/gui/commands.[ch]: removed the tools stuff here. * app/gui/brush-select.[ch] * app/gui/dialogs-constructors.c: use the new GimpBrushFactoryView (see below). * app/gui/dialogs-commands.[ch] * app/gui/menus.[ch]: - Made it 64bit safe again by passing the dialog factory's identifiers as GQuarks, not as guints created by GPOINTER_TO_UINT(). - Added a "gchar *quark_string" field to GimpItemFactoryEntry which gets transformed into a GQuark by menus_create_item(). - Added SEPARATOR() and BRANCH() macros which make the *_entries[] arrays more readable. - Added a menu item to show/hide GimpImageDock's image menu. - Removed file_last_opened_cmd_callback(). * app/gui/edit-commands.c: the global_edit functions are "gimp_" prefixed now. * app/gui/file-commands.[ch]: added file_last_opened_cmd_callback() here. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpbrushfactoryview.[ch]: new widget: a GimpDataFactory subclass with a "spacing" scale. * app/widgets/gimpcontainereditor.[ch]: - Connect to the GimpContainerView's "select_item", "activate_item" and "context_item" signals here once instead of in each subclass and dispatch them via new virtual functions. - Added a convenience function which makes DND to the buttons much less painful for subclasses. * app/widgets/gimpbufferview.c * app/widgets/gimpdatafactoryview.[ch]: changed accordingly. * app/widgets/gimpdialogfactory.[ch]: - Added gimp_dialog_factory_dialog_raise() which can raise toplevel dialogs _and_ dockables (and creates them if they are not open yet). - Keep track of all created dialogs (not only toplevels). - Added an "aux_info" field to GimpSessionInfo which is a GList of gchar* and is saved in sessionrc. - Remember if GimpImageDock's image menu is visible by using an aux_info string. - The code did not become nicer with all those new constraints. I have to add comments before I forget how it works. * app/widgets/gimpdockbook.c: set the state of the "Show Image Menu" menu item before popping up the item factory. * app/widgets/gimpimagedock.[ch]: added gimp_image_dock_set_show_image_meu(). * plug-ins/gdyntext/gdyntext.c * plug-ins/perl/examples/fit-text * plug-ins/perl/examples/terral_text * plug-ins/perl/examples/tex-to-float: register all text rendering plug-ins under <Image>/Filters/Text * app/pdb/brush_select_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/enums.pl * po/POTFILES.in: changed according to all the stuff above.
2001-06-30 03:25:03 +08:00
view = gimp_brush_factory_view_new (GIMP_VIEW_TYPE_GRID,
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
context->gimp->brush_factory,
removed GimpFillType. 2001-06-29 Michael Natterer <mitch@gimp.org> * app/appenums.h: removed GimpFillType. * app/gimprc.c: parse the session-info's new "aux-info" field. * app/global_edit.[ch]: removed the old "Paste Named" dialog and prefixed all functions with "gimp_". * app/core/core-types.h: added GimpFillType. * app/core/gimpbrush.[ch]: new signal "spacing_changed". * app/gui/Makefile.am * app/gui/tools-commands.[ch]: one more file cut out of commands.[ch]. * app/gui/commands.[ch]: removed the tools stuff here. * app/gui/brush-select.[ch] * app/gui/dialogs-constructors.c: use the new GimpBrushFactoryView (see below). * app/gui/dialogs-commands.[ch] * app/gui/menus.[ch]: - Made it 64bit safe again by passing the dialog factory's identifiers as GQuarks, not as guints created by GPOINTER_TO_UINT(). - Added a "gchar *quark_string" field to GimpItemFactoryEntry which gets transformed into a GQuark by menus_create_item(). - Added SEPARATOR() and BRANCH() macros which make the *_entries[] arrays more readable. - Added a menu item to show/hide GimpImageDock's image menu. - Removed file_last_opened_cmd_callback(). * app/gui/edit-commands.c: the global_edit functions are "gimp_" prefixed now. * app/gui/file-commands.[ch]: added file_last_opened_cmd_callback() here. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpbrushfactoryview.[ch]: new widget: a GimpDataFactory subclass with a "spacing" scale. * app/widgets/gimpcontainereditor.[ch]: - Connect to the GimpContainerView's "select_item", "activate_item" and "context_item" signals here once instead of in each subclass and dispatch them via new virtual functions. - Added a convenience function which makes DND to the buttons much less painful for subclasses. * app/widgets/gimpbufferview.c * app/widgets/gimpdatafactoryview.[ch]: changed accordingly. * app/widgets/gimpdialogfactory.[ch]: - Added gimp_dialog_factory_dialog_raise() which can raise toplevel dialogs _and_ dockables (and creates them if they are not open yet). - Keep track of all created dialogs (not only toplevels). - Added an "aux_info" field to GimpSessionInfo which is a GList of gchar* and is saved in sessionrc. - Remember if GimpImageDock's image menu is visible by using an aux_info string. - The code did not become nicer with all those new constraints. I have to add comments before I forget how it works. * app/widgets/gimpdockbook.c: set the state of the "Show Image Menu" menu item before popping up the item factory. * app/widgets/gimpimagedock.[ch]: added gimp_image_dock_set_show_image_meu(). * plug-ins/gdyntext/gdyntext.c * plug-ins/perl/examples/fit-text * plug-ins/perl/examples/terral_text * plug-ins/perl/examples/tex-to-float: register all text rendering plug-ins under <Image>/Filters/Text * app/pdb/brush_select_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/enums.pl * po/POTFILES.in: changed according to all the stuff above.
2001-06-30 03:25:03 +08:00
dialogs_edit_brush_func,
context,
TRUE,
preview_size, 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
factory->menu_factory);
return dialogs_dockable_new (view,
_("Brushes"), NULL,
GIMP_STOCK_BRUSH,
GIMP_HELP_BRUSH_DIALOG);
}
GtkWidget *
dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->pattern_factory,
NULL,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Patterns"), NULL,
GIMP_STOCK_PATTERN,
GIMP_HELP_PATTERN_DIALOG);
}
GtkWidget *
dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size, 1,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Gradients>",
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
"/gradients-popup",
"gradients");
return dialogs_dockable_new (view,
_("Gradients"), NULL,
GIMP_STOCK_GRADIENT,
GIMP_HELP_GRADIENT_DIALOG);
}
GtkWidget *
dialogs_palette_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size, 1,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Palettes>",
added action_data_get_context() and macro return_if_no_context(). 2004-05-11 Michael Natterer <mitch@gimp.org> * app/actions/actions.[ch]: added action_data_get_context() and macro return_if_no_context(). * app/actions/brushes-actions.c * app/actions/buffers-actions.c * app/actions/buffers-commands.c * app/actions/data-commands.c * app/actions/fonts-actions.c * app/actions/fonts-commands.c * app/actions/gradients-actions.c * app/actions/images-actions.c * app/actions/images-commands.c * app/actions/palettes-actions.c * app/actions/patterns-actions.c * app/actions/templates-actions.c * app/actions/templates-commands.[ch] * app/actions/tools-actions.c * app/actions/tools-commands.c: moved lots of code from widgets/ to the resp. action callbacks. * app/widgets/gimpeditor.[ch]: added gimp_editor_add_action_button() which creates a GtkButton connected to the resp. action. * app/widgets/gimpdatafactoryview.[ch]: added "action_group" parameters so we can distinguish brushes, patterns etc. actions. * app/widgets/gimpimageview.[ch] * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.[ch] * app/widgets/gimptoolview.c: removed tons of GtkButton::clicked() callbacks and use gimp_editor_add_action_button() instead of simply _add_button(). * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly.
2004-05-12 00:05:21 +08:00
"/palettes-popup",
"palettes");
return dialogs_dockable_new (view,
_("Palettes"), NULL,
GIMP_STOCK_PALETTE,
GIMP_HELP_PALETTE_DIALOG);
}
GtkWidget *
dialogs_font_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_font_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->fonts,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Fonts"), NULL,
GIMP_STOCK_FONT,
GIMP_HELP_FONT_DIALOG);
}
GtkWidget *
dialogs_tool_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_tool_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->tool_info_list,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("Tools"), NULL,
GIMP_STOCK_TOOLS,
GIMP_HELP_TOOLS_DIALOG);
}
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
GtkWidget *
dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
{
GtkWidget *view;
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
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
context->gimp->named_buffers,
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
context,
preview_size, 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
factory->menu_factory);
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
return dialogs_dockable_new (view,
_("Buffers"), NULL,
GIMP_STOCK_BUFFER,
GIMP_HELP_BUFFER_DIALOG);
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
}
GtkWidget *
dialogs_document_grid_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->documents,
context,
preview_size, 1,
factory->menu_factory);
return dialogs_dockable_new (view,
_("History"), _("Document History"),
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GTK_STOCK_OPEN,
GIMP_HELP_DOCUMENT_DIALOG);
app/Makefile.am removed. 2001-06-26 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/color_transfer.[ch]: removed. * app/tools/Makefile.am * app/tools/gimpcolorbalancetool-transfer.[ch]: added. * app/tools/gimpcolorbalancetool.c: changed accordingly. * app/base/Makefile.am * app/base/tile-manager-crop.[ch]: formerly known as crop_buffer(). * app/tools/gimptexttool.c: changed accordingly. * app/context_manager.[ch]: added the global clipboard and the named buffer list here. * app/app_procs.c: don't call color_transfer_init() and don't free the buffer stuff (done by the context manager now). * app/errorconsole.c: don't #include "gui/commands.h" * app/global_edit.[ch]: removed lots of stuff which is now done by gui/edit-commands.* or the new GimpBuffer object. The "paste named" dialog will go away and this file will be moved to core/ soon. * app/image_new.c: no need to declare the global_buffer extern any more. * app/qmask.c: don't #include "global_edit.h" * app/core/Makefile.am * app/core/core-types.h * app/core/gimpbuffer.[ch]: new object (aka named buffer) * app/core/gimpcontext.[ch]: added a GimpBuffer attribute. * app/core/gimpimage.[ch]: one s/int/gboolean/. * app/core/gimppattern.c: hmm... * app/gui/commands.[ch]: split up in small files: * app/gui/Makefile.am * app/gui/edit-commands.[ch] * app/gui/file-commands.[ch] * app/gui/image-commands.[ch] * app/gui/select-commands.[ch] * app/gui/view-commands.[ch]: new files. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added the named buffer list & grid. * app/gui/file-new-dialog.[ch] * app/gui/menus.c * app/gui/palette-editor.c * app/gui/test-commands.c: changed accordingly. * app/pdb/edit_cmds.c * tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff. * app/widgets/Makefile.am * app/widgets/gimpbufferpreview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcontainereditor.[ch]: new widgets. * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdnd.[ch] * app/widgets/gimpdrawablepreview.c * app/widgets/gimplayerlistview.c * app/widgets/gimppreview.c * app/widgets/widgets-types.h: changed accordingly for the new GimpBuffer object and it's views, misc. cleanups. * pixmaps/Makefile.am * pixmaps/paste-as-new.xpm * pixmaps/paste-into.xpm * pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-) * po/POTFILES.in: added the new files.
2001-06-26 20:09:43 +08:00
}
/***** image related dialogs *****/
GtkWidget *
dialogs_layer_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
GtkWidget *dockable;
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
if (preview_size < 1)
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size, 2,
gimp_context_get_image (context),
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
GIMP_TYPE_LAYER,
"active_layer_changed",
(GimpEditItemFunc) layers_edit_layer_query,
(GimpNewItemFunc) layers_new_layer_query,
(GimpActivateItemFunc) layers_text_tool,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Layers>",
"/layers-popup");
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
dockable = dialogs_dockable_new (view,
_("Layers"), NULL,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_LAYERS,
GIMP_HELP_LAYER_DIALOG);
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
GtkWidget *
dialogs_channel_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
GtkWidget *dockable;
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
if (preview_size < 1)
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size, 1,
gimp_context_get_image (context),
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
GIMP_TYPE_CHANNEL,
"active_channel_changed",
(GimpEditItemFunc) channels_edit_channel_query,
(GimpNewItemFunc) channels_new_channel_query,
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
(GimpActivateItemFunc) channels_edit_channel_query,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Channels>",
"/channels-popup");
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
dockable = dialogs_dockable_new (view,
_("Channels"), NULL,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_CHANNELS,
GIMP_HELP_CHANNEL_DIALOG);
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
app/core/Makefile.am app/core/core-types.h new base class for something 2002-02-25 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimpitem.[ch]: new base class for something which is a child of an image, has a PDB ID, a tattoo, parasites and emits a "removed" signal. * app/core/gimpdrawable.[ch] * app/vectors/gimpvectors.[ch]: derive from GimpItem. Removed lots of stuff from GimpDrawable. * app/core/gimp.[ch]: changed gimp->drawable_table and gimp->next_drawable_ID to gimp->item_table and gimp->next_item_id. * app/undo.[ch]: s/undo_push_drawable_parasite/undo_push_item_parasite/, minor cleanups. * app/core/gimplayer.[ch]: changed gimp_layer_new_from_tiles() and gimp_layer_new_from_drawable() to take the "dest_gimage" as second, not first parameter. * app/image_map.c * app/core/gimpchannel.c * app/core/gimpdrawable-blend.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpdrawable-histogram.c * app/core/gimpdrawable-offset.c * app/core/gimpdrawable-preview.c * app/core/gimpdrawable-transform.c * app/core/gimpedit.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-pick-color.c * app/core/gimpimage.c * app/core/gimplayer-floating-sel.c * app/display/gimpdisplayshell-dnd.c * app/file/file-save.c * app/gui/channels-commands.c * app/gui/file-save-dialog.c * app/gui/layers-commands.c * app/gui/offset-dialog.c * app/gui/paths-dialog.c * app/gui/toolbox.c * app/paint/gimpairbrush.c * app/paint/gimpclone.c * app/paint/gimpconvolve.c * app/paint/gimpdodgeburn.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimppaintcore.c * app/paint/gimppencil.c * app/paint/gimpsmudge.c * app/plug-in/plug-in.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpinktool.c * app/tools/gimppainttool.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/widgets/gimpdrawablepreview.c: changed accordingly. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpitemlistview.[ch]: new widget implementing most of the stuff formerly done by GimpDrawableListView. * app/widgets/gimpchannellistview.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimplayerlistview.c: changed accordingly. * app/widgets/gimpdnd.[ch]: added a vectors DND type. * app/gui/menus.c * app/gui/dialogs.c * app/gui/dialogs-constructors.[ch]: added a vectors dialog and a vectors item_factory. * app/gui/Makefile.am * app/gui/vectors-commands.[ch]: new files implementing the callbacks for the new vectors dialog and item_factory. * app/pdb/pdb_glue.h: some more ugly hacks to keep intermediate perl code working... * tools/pdbgen/pdb.pl: added a vectors type, use GimpItem for all ID lookups. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/misc_tools.pdb * tools/pdbgen/pdb/parasite.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/selection_tools.pdb: misc changes according to stuff above. * app/pdb/channel_cmds.c * app/pdb/color_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/floating_sel_cmds.c * app/pdb/image_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/parasite_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c * app/pdb/text_tool_cmds.c * app/pdb/transform_tools_cmds.c: regenerated.
2002-02-26 01:58:50 +08:00
GtkWidget *
dialogs_vectors_list_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
{
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
GtkWidget *view;
GtkWidget *dockable;
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
if (preview_size < 1)
preview_size = context->gimp->config->layer_preview_size;
view =
gimp_item_tree_view_new (preview_size, 1,
gimp_context_get_image (context),
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
GIMP_TYPE_VECTORS,
"active_vectors_changed",
(GimpEditItemFunc) vectors_edit_vectors_query,
(GimpNewItemFunc) vectors_new_vectors_query,
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
(GimpActivateItemFunc) vectors_vectors_tool,
app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager 2004-04-21 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds API to update all action groups and knows which UIs it can create from which XML files. * app/widgets/gimpmenufactory.[ch]: register the XML file basenames along with path of their toplevel menus. Create GimpUIManagers instead of GtkUIManagers and register the XML files and menu paths with them. * app/gui/menus.c: register all XML files and their toplevel menu paths. * app/widgets/gimpeditor.[ch]: also create a GimpUIManager when creating the GtkItemFactory. Added "const gchar *ui_identifier" parameter to gimp_editor_create_menu(). * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpitemtreeview.[ch]: added "ui_identifier" parameters to all constructors. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.c * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpdocumentview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpfontview.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpimageview.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppatternfactoryview.c * app/widgets/gimptemplateview.c * app/widgets/gimptooloptionseditor.c * app/gui/dialogs-constructors.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: pass UI identifiers to the changed functions above. * app/display/gimpdisplayshell.[ch]: added a GimpUIManager for the menubar (menubar creating code still commented out). * app/display/gimpdisplay.c * app/gui/gui-vtable.c: update the ui manager.
2004-04-22 00:33:17 +08:00
factory->menu_factory, "<Vectors>",
"/vectors-popup");
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
dockable = dialogs_dockable_new (view,
_("Paths"), NULL,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GIMP_STOCK_PATHS,
GIMP_HELP_PATH_DIALOG);
Added GtkTreeView versions of layers/channels/vectors: 2003-03-16 Michael Natterer <mitch@gimp.org> Added GtkTreeView versions of layers/channels/vectors: * app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES to GIMP_UNDO_GROUP_ITEM_PROPERTIES. * app/core/gimpcontainer.c (gimp_container_reorder): don't try to reorder containers with num_children == 1. * app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpchanneltreeview.[ch] * app/widgets/gimpdrawabletreeview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.[ch] * app/widgets/gimpvectorstreeview.[ch]: new widgets. * app/widgets/gimpcellrenderertoggle.c: draw the frame only if the cell is prelit. * app/widgets/gimpcellrendererviewable.[ch]: added "clicked" signal, unref the renderer in finalize(). Set the renderer's border color to black if the cell is not selected (a hack that saves tons of code in GimpLayerTreeView). * app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set() stuff we just got from the store. * app/widgets/gimpcontainertreeview.[ch]: added lots of state used by the new subclasses to the GimpContainerTreeView struct. Create the GtkListStore/GtkTreeView in GObject::constructor() and only collect parameters in init() so subclasses can modify store/view creation. Do most of the button_press_event stuff manually and return TRUE from the handler. * app/widgets/gimpcontainerview.c: cleanup. * app/widgets/gimpitemlistview.h * app/widgets/gimpvectorslistview.h: temp hacks before they die. * app/widgets/gimppreviewrenderer.[ch]: added gimp_preview_renderer_update_idle() which idle-emits "update" without invalidating. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added constructors for the new dialogs. * app/gui/channels-commands.c * app/gui/channels-menu.c * app/gui/layers-commands.c * app/gui/layers-menu.c * app/gui/vectors-commands.c * app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-16 19:14:29 +08:00
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
GtkWidget *
dialogs_indexed_palette_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *view;
GtkWidget *dockable;
view = gimp_colormap_editor_new (gimp_context_get_image (context),
factory->menu_factory);
dockable = dialogs_dockable_new (view,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("Colormap"), _("Indexed Palette"),
GIMP_STOCK_INDEXED_PALETTE,
GIMP_HELP_INDEXED_PALETTE_DIALOG);
app/Makefile.am removed... 2002-05-05 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gimphelp.[ch]: removed... * app/widgets/Makefile.am * app/widgets/gimphelp.[ch]: ...and added here. * app/widgets/widgets-enums.[ch]: added GimpHelpBrowserType here as registered enum. Added an evil hack with GimpCursorType so app/config/gimpguiconfig.h can include this file. * app/widgets/gimpcursor.c: added an assertion because of the changed GimpCursorType. * app/config/gimpguiconfig.[ch]: added a property for the help browser type. * app/gimprc.c * app/libgimp_glue.c * app/gui/preferences-dialog.c * tools/pdbgen/pdb/help.pdb * app/pdb/help_cmds.c: regenerated. Some nav_window cleanup before chopping: * app/nav_window.[ch]: removed the old preview code and use GimpNavigationPreviews only. Namespaceified all functions. Speak in terms of GimpDisplayShell, not GimpDisplay. Lots of internal cleanup. * app/gui/gui-types.h: removed NadiagtionDialog here... * app/display/display-types.h: ...and added it here. * app/display/gimpdisplayshell-callbacks.[ch]: added a callback for the navigation button and call nav_window_show_popup() from there. * app/display/gimpdisplayshell.c: free shell->nav_dialog unconditionally, connect to the new callback. * app/display/gimpdisplayshell-scale.c * app/display/gimpdisplayshell-scroll.c * app/gui/view-commands.c: changed accordingly. * app/widgets/gimppreview.c (gimp_preview_set_viewable): the assertion introduced recently was too tight, breaking GimpNavigationPreview. Changed it to do an "is a" check, not exact preview type matching. * app/widgets/gimpimagepreview.c: added quick-hack support for xres != yres. * app/widgets/gimpnavigationpreview.[ch]: made gimp_navigation_preview_grab_pointer() public so the nav_window can call it. Unrelated: * app/display/gimpdisplay.c: removed the gui/ dependency from this file by removing info_window stuff. * app/display/gimpdisplayshell.c (gimp_display_shell_flush): update the info_window here. * app/gui/dialogs-constructors.c (dialogs_indexed_palette_new): call gimp_dockable_set_context() like all other constructors. * app/undo.c * app/paint/gimppaintcore.h: some more include cleanup.
2002-05-06 03:17:41 +08:00
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
g_signal_connect (view, "selected",
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) 2001-07-24 Michael Natterer <mitch@gimp.org> Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning) * configure.in: require glib/gtk+ >= 1.3.7, commented out the gtkxmhtml stuff. From now on, you will need glib, pango, atk and gtk+ HEAD from CVS to hack or use GIMP HEAD. Beware, it crashes randomly :) * app/core/Makefile.am * app/core/gimpmarshal.list: new file plus rules to generate gimpmarshal.[ch] from it. * app/core/* * app/tools/* * app/widgets/* * libgimpwidgets/*: started to use the glib object system. All core/ objects are still gtk objects however. All signals are created using g_signal_new(). There are many gtk+ artefacts left. Finally, we will _not_ use the gtk_signal_foo() wrappers and friends any more. * app/colormaps.c * app/devices.[ch] * app/disp_callbacks.c * app/errorconsole.c * app/file-save.[ch] * app/interface.c * app/module_db.c * app/nav_window.c * app/ops_buttons.c * app/scroll.c * app/user_install.c * app/gui/about-dialog.c * app/gui/brush-editor.c * app/gui/brushes-commands.c * app/gui/color-notebook.c * app/gui/colormap-dialog.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-dialog-utils.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradients-commands.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.[ch] * app/gui/splash.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.c * libgimp/gimppatternmenu.c * libgimp/gimpui.c * libgimpbase/gimpenv.c: tons and tons of changes like "const gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete and currently disables), lots of s/gtk_signal/g_signal/, removal/replacement of deprecated stuff, s/GtkSignalFunc/GCallback/ and lots of small changes and fixes while I was on it, zillions of warnings left... * modules/Makefile.am: disabled the water color selector temporarily (XInput issues). * plug-ins/Makefile.am * plug-ins/common/.cvsignore * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl: simply excluded all plug-ins which did not build (including Script-Fu). They are trivial to fix.
2001-07-25 05:27:11 +08:00
G_CALLBACK (dialogs_indexed_palette_selected),
dockable);
return dockable;
}
GtkWidget *
dialogs_histogram_editor_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
GtkWidget *view;
GtkWidget *dockable;
view = gimp_histogram_editor_new (gimp_context_get_image (context));
dockable = dialogs_dockable_new (view,
_("Histogram"), NULL,
GIMP_STOCK_HISTOGRAM,
GIMP_HELP_HISTOGRAM_DIALOG);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
GtkWidget *
dialogs_selection_editor_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
GtkWidget *view;
GtkWidget *dockable;
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
view = gimp_selection_editor_new (gimp_context_get_image (context),
factory->menu_factory);
dockable = dialogs_dockable_new (view,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("Selection"), _("Selection Editor"),
GIMP_STOCK_TOOL_RECT_SELECT,
GIMP_HELP_SELECTION_DIALOG);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
GtkWidget *
dialogs_undo_history_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
GtkWidget *editor;
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
GtkWidget *dockable;
GimpImage *gimage;
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
editor = gimp_undo_editor_new (context->gimp->config,
factory->menu_factory);
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
gimage = gimp_context_get_image (context);
if (gimage)
gimp_image_editor_set_image (GIMP_IMAGE_EDITOR (editor), gimage);
dockable = dialogs_dockable_new (editor,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("Undo"), _("Undo History"),
GIMP_STOCK_UNDO_HISTORY,
GIMP_HELP_UNDO_DIALOG);
Reimplemented the undo history: 2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
2003-02-20 20:47:42 +08:00
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
/***** display related dialogs *****/
added virtual functions set_toggles_visible() and set_toggles_sensitive(). 2002-11-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolorselector.[ch]: added virtual functions set_toggles_visible() and set_toggles_sensitive(). Added a stock_id. Emit "color_changed" and "channel_changed" on set_color() and set_channel() resp. * libgimpwidgets/gimpcolornotebook.[ch]: implement the new methods. Added gimp_color_notebook_set_has_page() to control which selectors a notebook contains. * libgimpwidgets/gimpcolorscales.[ch]: removed the toggle API and implement the new methods. * libgimpwidgets/gimpcolorselect.c: added toggle buttons for the channels so the widget doesn't need external ones. * app/gui/color-notebook.c: changed accordingly. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-color-triangle-16.png: added a (bad) icon for the triangle color selector. * modules/colorsel_triangle.c: use the new icon. * modules/colorsel_water.c: use the "Paintbrush" icon for now. * app/widgets/gimpcoloreditor.[ch]: new widget for editing the FG/BG color featuring a color notebook, stock buttons for selecting the pages and a GimpPickButton. * app/widgets/Makefile.am * app/widgets/widgets-types.h: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added a dockable wrapper for GimpColorEditor. * app/gui/menus.c: added it to the menus. Also added separate Layers, Channels and Paths entries. Bind <ctrl>L to the new callback so it doesn't always create a new layers dialog.
2002-11-05 08:02:56 +08:00
GtkWidget *
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
dialogs_navigation_view_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
added virtual functions set_toggles_visible() and set_toggles_sensitive(). 2002-11-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolorselector.[ch]: added virtual functions set_toggles_visible() and set_toggles_sensitive(). Added a stock_id. Emit "color_changed" and "channel_changed" on set_color() and set_channel() resp. * libgimpwidgets/gimpcolornotebook.[ch]: implement the new methods. Added gimp_color_notebook_set_has_page() to control which selectors a notebook contains. * libgimpwidgets/gimpcolorscales.[ch]: removed the toggle API and implement the new methods. * libgimpwidgets/gimpcolorselect.c: added toggle buttons for the channels so the widget doesn't need external ones. * app/gui/color-notebook.c: changed accordingly. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-color-triangle-16.png: added a (bad) icon for the triangle color selector. * modules/colorsel_triangle.c: use the new icon. * modules/colorsel_water.c: use the "Paintbrush" icon for now. * app/widgets/gimpcoloreditor.[ch]: new widget for editing the FG/BG color featuring a color notebook, stock buttons for selecting the pages and a GimpPickButton. * app/widgets/Makefile.am * app/widgets/widgets-types.h: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added a dockable wrapper for GimpColorEditor. * app/gui/menus.c: added it to the menus. Also added separate Layers, Channels and Paths entries. Bind <ctrl>L to the new callback so it doesn't always create a new layers dialog.
2002-11-05 08:02:56 +08:00
{
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GimpDisplay *gdisp;
GimpDisplayShell *shell = NULL;
GtkWidget *view;
added virtual functions set_toggles_visible() and set_toggles_sensitive(). 2002-11-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolorselector.[ch]: added virtual functions set_toggles_visible() and set_toggles_sensitive(). Added a stock_id. Emit "color_changed" and "channel_changed" on set_color() and set_channel() resp. * libgimpwidgets/gimpcolornotebook.[ch]: implement the new methods. Added gimp_color_notebook_set_has_page() to control which selectors a notebook contains. * libgimpwidgets/gimpcolorscales.[ch]: removed the toggle API and implement the new methods. * libgimpwidgets/gimpcolorselect.c: added toggle buttons for the channels so the widget doesn't need external ones. * app/gui/color-notebook.c: changed accordingly. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-color-triangle-16.png: added a (bad) icon for the triangle color selector. * modules/colorsel_triangle.c: use the new icon. * modules/colorsel_water.c: use the "Paintbrush" icon for now. * app/widgets/gimpcoloreditor.[ch]: new widget for editing the FG/BG color featuring a color notebook, stock buttons for selecting the pages and a GimpPickButton. * app/widgets/Makefile.am * app/widgets/widgets-types.h: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added a dockable wrapper for GimpColorEditor. * app/gui/menus.c: added it to the menus. Also added separate Layers, Channels and Paths entries. Bind <ctrl>L to the new callback so it doesn't always create a new layers dialog.
2002-11-05 08:02:56 +08:00
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
gdisp = gimp_context_get_display (context);
added virtual functions set_toggles_visible() and set_toggles_sensitive(). 2002-11-05 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpcolorselector.[ch]: added virtual functions set_toggles_visible() and set_toggles_sensitive(). Added a stock_id. Emit "color_changed" and "channel_changed" on set_color() and set_channel() resp. * libgimpwidgets/gimpcolornotebook.[ch]: implement the new methods. Added gimp_color_notebook_set_has_page() to control which selectors a notebook contains. * libgimpwidgets/gimpcolorscales.[ch]: removed the toggle API and implement the new methods. * libgimpwidgets/gimpcolorselect.c: added toggle buttons for the channels so the widget doesn't need external ones. * app/gui/color-notebook.c: changed accordingly. * libgimpwidgets/gimpstock.[ch] * themes/Default/images/Makefile.am * themes/Default/images/stock-color-triangle-16.png: added a (bad) icon for the triangle color selector. * modules/colorsel_triangle.c: use the new icon. * modules/colorsel_water.c: use the "Paintbrush" icon for now. * app/widgets/gimpcoloreditor.[ch]: new widget for editing the FG/BG color featuring a color notebook, stock buttons for selecting the pages and a GimpPickButton. * app/widgets/Makefile.am * app/widgets/widgets-types.h: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs.c: added a dockable wrapper for GimpColorEditor. * app/gui/menus.c: added it to the menus. Also added separate Layers, Channels and Paths entries. Bind <ctrl>L to the new callback so it doesn't always create a new layers dialog.
2002-11-05 08:02:56 +08:00
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
if (gdisp)
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
view = gimp_navigation_editor_new (shell,
GIMP_DISPLAY_CONFIG (context->gimp->config));
return dialogs_dockable_new (view,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("Navigation"), _("Display Navigation"),
GIMP_STOCK_NAVIGATION,
GIMP_HELP_NAVIGATION_DIALOG);
added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI 2003-02-26 Michael Natterer <mitch@gimp.org> * app/core/gimpviewable.[ch]: added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI if the get_preview() functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION. * app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed the cached GdkPixbuf. Don't implement any preview function so the GUI uses the stock_id. * app/tools/tool_manager.c: removed GdkPixbuf creation, removed the #warning about the buggy way we created the pixbuf. * app/gui/dialogs-constructors.c * app/gui/image-menu.c * app/tools/gimpcroptool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptoolbox.c: use viewable->stock_id instead of tool_info->stock_id. * app/core/gimpbrush.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimpundo.c: simplified get_preview() implementations: - never scale previews up, only down. - don't render white or checks backgrounds but simply return TempBufs with alpha and let the preview system do its job. - don't add padding but simply return previews smaller than requested. * app/display/gimpdisplayshell-render.[ch]: added "render_blend_white", a 2d lookup table for blending on white, just as the check lookup tables. Added "render_white_buf". * app/widgets/gimppreview.[ch]: changed a lot: - don't render the preview's border into the buffer. - added "GdkGC *border_gc" and draw the preview's border in expose() using gdk_draw_rectangle(). - added "GdkPixbuf *no_preview_pixbuf" and create it in gimp_preview_real_render() if gimp_viewable_get_preview() returned NULL. - factored the actual preview rendering out to gimp_preview_render_to_buffer(). Added configurable background rendering for the preview itself and it's padding area (the area the preview is larger than the buffer returned by gimp_viewable_get_preview()). - changed gimp_preview_render_and_flush() to gimp_preview_render_preview() and added "inside_bg" and "outside_bg" parameters. - use the new render buffers for blending on white. * app/widgets/gimpbrushpreview.c * app/widgets/gimpbufferpreview.c * app/widgets/gimpdrawablepreview.c * app/widgets/gimpgradientpreview.c * app/widgets/gimpimagepreview.c * app/widgets/gimppalettepreview.c * app/widgets/gimppatternpreview.c: don't create large white TempBufs to center the previews in but simply set the TempBuf's offsets to get them centered. Simplified & cleaned up many preview render functions. Pass the correct GimpPreviewBG modes to gimp_preview_render_preview(). * app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer class derived from GtkCellRendererPixbuf which knows how to use gimp_viewable_get_preview_size() and renders the viewable's stock item if no preview can be created. * app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc which creates the preview pixbuf if needed so we don't create it unconditionally upon item insertion. Fixed preview size assertion to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed" while reordering the selected item. * app/widgets/gimpcontainerview.c: cosmetic. * app/widgets/gimpimagefilepreview.[ch] * app/widgets/gimptoolinfopreview.[ch] * app/widgets/gimpundopreview.[ch]: removed because the default implementation is good enough. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimppreview-utils.c: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: register grid and tree view variants of the document history. Unrelated: * app/gui/gui.c (gui_exit_finish_callback): disconnect from signals earlier. * app/gui/user-install-dialog.c: create the "tool-options" subdir of the user's ~/.gimp-1.3 directory.
2003-02-27 00:17:10 +08:00
}
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
/***** misc dockables *****/
added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI 2003-02-26 Michael Natterer <mitch@gimp.org> * app/core/gimpviewable.[ch]: added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI if the get_preview() functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION. * app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed the cached GdkPixbuf. Don't implement any preview function so the GUI uses the stock_id. * app/tools/tool_manager.c: removed GdkPixbuf creation, removed the #warning about the buggy way we created the pixbuf. * app/gui/dialogs-constructors.c * app/gui/image-menu.c * app/tools/gimpcroptool.c * app/tools/gimphistogramtool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * app/widgets/gimptoolbox.c: use viewable->stock_id instead of tool_info->stock_id. * app/core/gimpbrush.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimpundo.c: simplified get_preview() implementations: - never scale previews up, only down. - don't render white or checks backgrounds but simply return TempBufs with alpha and let the preview system do its job. - don't add padding but simply return previews smaller than requested. * app/display/gimpdisplayshell-render.[ch]: added "render_blend_white", a 2d lookup table for blending on white, just as the check lookup tables. Added "render_white_buf". * app/widgets/gimppreview.[ch]: changed a lot: - don't render the preview's border into the buffer. - added "GdkGC *border_gc" and draw the preview's border in expose() using gdk_draw_rectangle(). - added "GdkPixbuf *no_preview_pixbuf" and create it in gimp_preview_real_render() if gimp_viewable_get_preview() returned NULL. - factored the actual preview rendering out to gimp_preview_render_to_buffer(). Added configurable background rendering for the preview itself and it's padding area (the area the preview is larger than the buffer returned by gimp_viewable_get_preview()). - changed gimp_preview_render_and_flush() to gimp_preview_render_preview() and added "inside_bg" and "outside_bg" parameters. - use the new render buffers for blending on white. * app/widgets/gimpbrushpreview.c * app/widgets/gimpbufferpreview.c * app/widgets/gimpdrawablepreview.c * app/widgets/gimpgradientpreview.c * app/widgets/gimpimagepreview.c * app/widgets/gimppalettepreview.c * app/widgets/gimppatternpreview.c: don't create large white TempBufs to center the previews in but simply set the TempBuf's offsets to get them centered. Simplified & cleaned up many preview render functions. Pass the correct GimpPreviewBG modes to gimp_preview_render_preview(). * app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer class derived from GtkCellRendererPixbuf which knows how to use gimp_viewable_get_preview_size() and renders the viewable's stock item if no preview can be created. * app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc which creates the preview pixbuf if needed so we don't create it unconditionally upon item insertion. Fixed preview size assertion to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed" while reordering the selected item. * app/widgets/gimpcontainerview.c: cosmetic. * app/widgets/gimpimagefilepreview.[ch] * app/widgets/gimptoolinfopreview.[ch] * app/widgets/gimpundopreview.[ch]: removed because the default implementation is good enough. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimppreview-utils.c: changed accordingly. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: register grid and tree view variants of the document history. Unrelated: * app/gui/gui.c (gui_exit_finish_callback): disconnect from signals earlier. * app/gui/user-install-dialog.c: create the "tool-options" subdir of the user's ~/.gimp-1.3 directory.
2003-02-27 00:17:10 +08:00
GtkWidget *
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
dialogs_color_editor_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
GtkWidget *view;
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
view = gimp_color_editor_new (context);
return dialogs_dockable_new (view,
Added configurable styles for dockable tabs (fixes bug #87376): 2003-07-08 Michael Natterer <mitch@gimp.org> Added configurable styles for dockable tabs (fixes bug #87376): * app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }. * app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON. Renamed "short_name" to "name" and "name" to "blurb". Renamed GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all tab styles in gimp_dockable_real_get_tab_widget() and use the "get_icon_func" only for creating the tab's icon, not the entire tab widget. * app/widgets/gimpdockbook.[ch]: changed accordingly. Create the menu widgets and the DND icon using gimp_dockable_get_tab_widget() with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating tons of code. Made gimp_dockbook_get_tab_widget() public because it's needed for exchanging tabs on-the-fly. * app/widgets/gimpimagedock.c: changed accordingly. * app/widgets/gimpdialogfactory.c: remember the dockables' tab style in sessionrc. * app/gui/dialogs-menu.c: added a submenu to select the tab style for each dockable. * app/gui/dialogs-commands.[ch]: new callback dialogs_tab_style_cmd_callback(). * app/gui/dialogs-constructors.[ch]: added stock_ids to all dockables, swapped the "name" and "blurb" parameters, reordered functions, cleanup. * app/gui/dialogs-menu.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the color editor dockable and renamed it to "FG/BG Color".
2003-07-08 23:07:56 +08:00
_("FG/BG"), _("FG/BG Color"),
GIMP_STOCK_DEFAULT_COLORS,
GIMP_HELP_COLOR_DIALOG);
}
/***** editors *****/
/* the brush editor */
static GimpDataEditor *brush_editor = NULL;
GtkWidget *
dialogs_brush_editor_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
brush_editor = gimp_brush_editor_new (context->gimp);
return dialogs_dockable_new (GTK_WIDGET (brush_editor),
_("Brush Editor"), NULL,
GIMP_STOCK_BRUSH,
GIMP_HELP_BRUSH_EDITOR_DIALOG);
}
void
dialogs_edit_brush_func (GimpData *data,
GtkWidget *parent)
{
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (parent),
./mitch --sanitize-identifier-namespace 2002-03-20 Michael Natterer <mitch@gimp.org> ./mitch --sanitize-identifier-namespace * app/core/gimpcontext.c * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-dnd.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/edit-commands.c * app/gui/gui.c * app/gui/menus.c * app/gui/vectors-commands.c * app/gui/view-commands.c * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimpvectortool.c * app/widgets/gimpdnd.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptoolbox.c: s/gimp:/gimp-/g and s/_/-/g for all identifier strings (e.g. gimp:eraser_tool -> gimp-eraser-tool, gimp:layer-list -> gimp-layer-list, ...) * plug-ins/tools/common/gimpbrushselecttool.c: s/gimp:brush_select_tool/gimp-brush-select-tool-module/ Don't quite remember why I introduced the "gimp:" prefix in the first place, but we can always add it back if we need it (for whatever reason) You may want to edit your ~/.gimp-1.3/sessionrc and devicerc or all session settings will be lost due to parse errors.
2002-03-21 20:17:17 +08:00
"gimp-brush-editor",
-1);
gimp_data_editor_set_data (brush_editor, data);
}
/* the gradient editor */
static GimpDataEditor *gradient_editor = NULL;
GtkWidget *
dialogs_gradient_editor_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
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
gradient_editor = gimp_gradient_editor_new (context->gimp,
factory->menu_factory);
return dialogs_dockable_new (GTK_WIDGET (gradient_editor),
_("Gradient Editor"), NULL,
GIMP_STOCK_GRADIENT,
GIMP_HELP_GRADIENT_EDITOR_DIALOG);
}
void
dialogs_edit_gradient_func (GimpData *data,
GtkWidget *parent)
{
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (parent),
./mitch --sanitize-identifier-namespace 2002-03-20 Michael Natterer <mitch@gimp.org> ./mitch --sanitize-identifier-namespace * app/core/gimpcontext.c * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-dnd.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/edit-commands.c * app/gui/gui.c * app/gui/menus.c * app/gui/vectors-commands.c * app/gui/view-commands.c * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimpvectortool.c * app/widgets/gimpdnd.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptoolbox.c: s/gimp:/gimp-/g and s/_/-/g for all identifier strings (e.g. gimp:eraser_tool -> gimp-eraser-tool, gimp:layer-list -> gimp-layer-list, ...) * plug-ins/tools/common/gimpbrushselecttool.c: s/gimp:brush_select_tool/gimp-brush-select-tool-module/ Don't quite remember why I introduced the "gimp:" prefix in the first place, but we can always add it back if we need it (for whatever reason) You may want to edit your ~/.gimp-1.3/sessionrc and devicerc or all session settings will be lost due to parse errors.
2002-03-21 20:17:17 +08:00
"gimp-gradient-editor",
-1);
gimp_data_editor_set_data (gradient_editor, data);
}
/* the palette editor */
static GimpDataEditor *palette_editor = NULL;
GtkWidget *
dialogs_palette_editor_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
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
palette_editor = gimp_palette_editor_new (context->gimp,
factory->menu_factory);
return dialogs_dockable_new (GTK_WIDGET (palette_editor),
_("Palette Editor"), NULL,
GIMP_STOCK_PALETTE,
GIMP_HELP_PALETTE_EDITOR_DIALOG);
}
void
dialogs_edit_palette_func (GimpData *data,
GtkWidget *parent)
{
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (parent),
./mitch --sanitize-identifier-namespace 2002-03-20 Michael Natterer <mitch@gimp.org> ./mitch --sanitize-identifier-namespace * app/core/gimpcontext.c * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell-dnd.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/edit-commands.c * app/gui/gui.c * app/gui/menus.c * app/gui/vectors-commands.c * app/gui/view-commands.c * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimpvectortool.c * app/widgets/gimpdnd.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptoolbox.c: s/gimp:/gimp-/g and s/_/-/g for all identifier strings (e.g. gimp:eraser_tool -> gimp-eraser-tool, gimp:layer-list -> gimp-layer-list, ...) * plug-ins/tools/common/gimpbrushselecttool.c: s/gimp:brush_select_tool/gimp-brush-select-tool-module/ Don't quite remember why I introduced the "gimp:" prefix in the first place, but we can always add it back if we need it (for whatever reason) You may want to edit your ~/.gimp-1.3/sessionrc and devicerc or all session settings will be lost due to parse errors.
2002-03-21 20:17:17 +08:00
"gimp-palette-editor",
-1);
gimp_data_editor_set_data (palette_editor, data);
}
/* private functions */
static GtkWidget *
dialogs_dockable_new (GtkWidget *widget,
const gchar *name,
const gchar *blurb,
const gchar *stock_id,
const gchar *help_id)
{
GtkWidget *dockable;
dockable = gimp_dockable_new (name, blurb, stock_id, help_id);
gtk_container_add (GTK_CONTAINER (dockable), widget);
gtk_widget_show (widget);
return dockable;
}
static void
dialogs_indexed_palette_selected (GimpColormapEditor *editor,
Cleaned up all places which pick colors to work consistently: the concept 2003-09-26 Michael Natterer <mitch@gimp.org> Cleaned up all places which pick colors to work consistently: the concept of an "active color" has disappeared, instead <ctrl> picks the BG color all over the place (fixes bug #122931). * app/tools/tools-enums.[ch]: added enum GimpColorPickMode which can be one of { FOREGROUND, BACKGROUND }. Reordered enums so non-registered ones are at the end of the file. Removed trailing whitespace. * app/tools/gimpcolorpickeroptions.[ch]: added a "pick-mode" property and a GUI for it. Renamed the "update-active" property to "update-toolbox". * app/tools/gimpcolorpickertool.c: honor the new option. Toggle pick-mode on <ctrl>. * app/tools/gimpcolortool.[ch]: added pick_mode member and change the cursor accordingly. * app/widgets/gimpcolormapeditor.[ch]: added "GdkModifierType state" to the "selected" signal. Removed the signal's default implementation. * app/gui/dialogs-constructors.c: fixed the signal handler which lives here and set BG if <ctrl> was pressed. * app/widgets/gimppaletteeditor.c: removed weird <ctrl> <-> active_color interaction and pick BG on <ctrl>. Don't change the toolbox color when editing a color in the palette. * app/widgets/gimptoolbox-color-area.[ch]: made the whole active_color stuff private. Will remove these artefacts soon... * app/gui/colormap-editor-menu.c * app/gui/palette-editor-menu.c: added separate menu entries for adding a color from the current FG and BG. * app/gui/colormap-editor-commands.c * app/gui/palette-editor-commands.[ch]: changed callbacks accordingly. * cursors/background.xbm * cursors/background_mask.xbm * cursors/foreground.xbm * cursors/foreground_mask.xbm * cursors/gimp-tool-cursors.xcf: moved the FG/BG cursor modifiers closer to the upper right corner. * app/widgets/gimpcursor.c: ignore the cursor modifiers' hotspots since they are not relevant and I didn't save the hotspot in the updated cursor files for that reason.
2003-09-26 21:33:54 +08:00
GdkModifierType state,
GimpDockable *dockable)
{
GimpImage *gimage = GIMP_IMAGE_EDITOR (editor)->gimage;
Cleaned up all places which pick colors to work consistently: the concept 2003-09-26 Michael Natterer <mitch@gimp.org> Cleaned up all places which pick colors to work consistently: the concept of an "active color" has disappeared, instead <ctrl> picks the BG color all over the place (fixes bug #122931). * app/tools/tools-enums.[ch]: added enum GimpColorPickMode which can be one of { FOREGROUND, BACKGROUND }. Reordered enums so non-registered ones are at the end of the file. Removed trailing whitespace. * app/tools/gimpcolorpickeroptions.[ch]: added a "pick-mode" property and a GUI for it. Renamed the "update-active" property to "update-toolbox". * app/tools/gimpcolorpickertool.c: honor the new option. Toggle pick-mode on <ctrl>. * app/tools/gimpcolortool.[ch]: added pick_mode member and change the cursor accordingly. * app/widgets/gimpcolormapeditor.[ch]: added "GdkModifierType state" to the "selected" signal. Removed the signal's default implementation. * app/gui/dialogs-constructors.c: fixed the signal handler which lives here and set BG if <ctrl> was pressed. * app/widgets/gimppaletteeditor.c: removed weird <ctrl> <-> active_color interaction and pick BG on <ctrl>. Don't change the toolbox color when editing a color in the palette. * app/widgets/gimptoolbox-color-area.[ch]: made the whole active_color stuff private. Will remove these artefacts soon... * app/gui/colormap-editor-menu.c * app/gui/palette-editor-menu.c: added separate menu entries for adding a color from the current FG and BG. * app/gui/colormap-editor-commands.c * app/gui/palette-editor-commands.[ch]: changed callbacks accordingly. * cursors/background.xbm * cursors/background_mask.xbm * cursors/foreground.xbm * cursors/foreground_mask.xbm * cursors/gimp-tool-cursors.xcf: moved the FG/BG cursor modifiers closer to the upper right corner. * app/widgets/gimpcursor.c: ignore the cursor modifiers' hotspots since they are not relevant and I didn't save the hotspot in the updated cursor files for that reason.
2003-09-26 21:33:54 +08:00
if (gimage)
{
Cleaned up all places which pick colors to work consistently: the concept 2003-09-26 Michael Natterer <mitch@gimp.org> Cleaned up all places which pick colors to work consistently: the concept of an "active color" has disappeared, instead <ctrl> picks the BG color all over the place (fixes bug #122931). * app/tools/tools-enums.[ch]: added enum GimpColorPickMode which can be one of { FOREGROUND, BACKGROUND }. Reordered enums so non-registered ones are at the end of the file. Removed trailing whitespace. * app/tools/gimpcolorpickeroptions.[ch]: added a "pick-mode" property and a GUI for it. Renamed the "update-active" property to "update-toolbox". * app/tools/gimpcolorpickertool.c: honor the new option. Toggle pick-mode on <ctrl>. * app/tools/gimpcolortool.[ch]: added pick_mode member and change the cursor accordingly. * app/widgets/gimpcolormapeditor.[ch]: added "GdkModifierType state" to the "selected" signal. Removed the signal's default implementation. * app/gui/dialogs-constructors.c: fixed the signal handler which lives here and set BG if <ctrl> was pressed. * app/widgets/gimppaletteeditor.c: removed weird <ctrl> <-> active_color interaction and pick BG on <ctrl>. Don't change the toolbox color when editing a color in the palette. * app/widgets/gimptoolbox-color-area.[ch]: made the whole active_color stuff private. Will remove these artefacts soon... * app/gui/colormap-editor-menu.c * app/gui/palette-editor-menu.c: added separate menu entries for adding a color from the current FG and BG. * app/gui/colormap-editor-commands.c * app/gui/palette-editor-commands.[ch]: changed callbacks accordingly. * cursors/background.xbm * cursors/background_mask.xbm * cursors/foreground.xbm * cursors/foreground_mask.xbm * cursors/gimp-tool-cursors.xcf: moved the FG/BG cursor modifiers closer to the upper right corner. * app/widgets/gimpcursor.c: ignore the cursor modifiers' hotspots since they are not relevant and I didn't save the hotspot in the updated cursor files for that reason.
2003-09-26 21:33:54 +08:00
GimpRGB color;
gint index;
index = gimp_colormap_editor_col_index (editor);
gimp_image_get_colormap_entry (gimage, index, &color);
if (state & GDK_CONTROL_MASK)
gimp_context_set_background (dockable->context, &color);
else
gimp_context_set_foreground (dockable->context, &color);
}
}