1. 26 Sep, 2003 1 commit
    • Michael Natterer's avatar
      Cleaned up all places which pick colors to work consistently: the concept · e13afaf2
      Michael Natterer authored
      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
      	* app/tools/gimpcolorpickeroptions.[ch]: added a "pick-mode"
      	property and a GUI for it. Renamed the "update-active" property to
      	* 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
      	* 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
      	* 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.
  2. 24 Sep, 2003 1 commit
    • Michael Natterer's avatar
      using gimp_container_view_get_by_dockable() was a bad idea since not all · 55f938fa
      Michael Natterer authored
      2003-09-24  Michael Natterer  <mitch@gimp.org>
      	* app/gui/dialogs-constructors.c (dialogs_get_view_menu_func):
      	using gimp_container_view_get_by_dockable() was a bad idea since
      	not all our GimpEditor subclasses actually are GimpContainerViews.
      	Find the right GimpEditor manually instead (fixes missing popup
      	* app/gui/colormap-editor-menu.c (colormap_editor_menu_update):
      	make the menu entries insensitive if the image is not indexed.
      	fixes bug #123066.
  3. 23 Sep, 2003 1 commit
    • Michael Natterer's avatar
      added a "menu_title" which is registered with each menu. · c5fd48f2
      Michael Natterer authored
      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.
  4. 21 Sep, 2003 1 commit
    • Michael Natterer's avatar
      added a title bar showing the dockable's name, a "close" and a "menu" · 47b1e3ee
      Michael Natterer authored
      2003-09-21  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/gimpdockable.[ch]: added a title bar showing the
      	dockable's name, a "close" and a "menu" button. Not quite
      	finished, but almost...
      	* app/gui/dialogs-constructors.c: changed accordingly.
      	* themes/Default/images/Makefile.am
      	* themes/Default/images/stock-close-12.png
      	* themes/Default/images/stock-menu-12.png: new icons for the above.
      	* libgimpwidgets/gimpstock.[ch]: register them.
      	* themes/Default/gtkrc: remove any focus spacing from the
      	dockables' new buttons since they can't get the focus anyway.
  5. 17 Sep, 2003 1 commit
    • Michael Natterer's avatar
      app/widgets/gimpdatafactoryview.[ch] app/widgets/gimpitemtreeview.[ch] · 5ebce856
      Michael Natterer authored
      2003-09-18  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/gimpdatafactoryview.[ch]
      	* app/widgets/gimpitemtreeview.[ch]
      	* app/widgets/gimppaletteeditor.[ch]
      	* app/widgets/gimptemplateview.[ch]: order the button boxes in
      	these dialogs like the entries their popup menus: The default
      	(double click) action is the first menu entry / button. In an
      	attack of consistency, also reordered functions and function
      	parameters all over the place to match the new order.
      	* app/widgets/gimpchanneltreeview.c
      	* app/widgets/gimplayertreeview.c
      	* app/widgets/gimpvectorstreeview.c
      	* app/gui/dialogs-constructors.c: changed accordingly.
  6. 01 Sep, 2003 1 commit
    • Michael Natterer's avatar
      added new virtual function GimpItem::stroke(). · dcb6f225
      Michael Natterer authored
      2003-09-01  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimpitem.[ch]: added new virtual function
      	* app/core/gimpchannel.c
      	* app/vectors/gimpvectors.c: implement GimpItem::stroke().
      	* app/core/gimpimage-mask.[ch] (gimp_image_mask_stroke): changed
      	signature to match gimp_item_stroke() (the selection mask *really*
      	should be a GimpChannel subclass).
      	Removed global variable "gboolean gimp_image_mask_stroking"...
      	* app/core/gimpimage.[ch]: ...and added "gboolean mask_stroking"
      	to the GimpImage struct.
      	* app/gui/vectors-commands.[ch]: removed vectors_stroke_vectors().
      	* app/widgets/widgets-types.h: removed GimpStrokeItemFunc typedef.
      	* app/widgets/gimpvectorstreeview.[ch]: removed "stroke_item_func"
      	member and use gimp_item_stroke() instead.
      	* app/gui/dialogs-constructors.c (dialogs_vectors_list_view_new)
      	* app/gui/edit-commands.c (edit_stroke_cmd_callback)
      	* app/gui/vectors-commands. (vectors_stroke_cmd_callback)
      	* app/widgets/gimpselectioneditor.c
      	* tools/pdbgen/pdb/edit.pdb (gimp_edit_stroke): changed accordingly.
      	* app/pdb/edit_cmds.c: regenerated.
      	Note that there is no GUI for "stroke channel", although it would
      	be utterly cool to have one, since currently slelection stroking
      	cannot be masked by a selection (because we stroke the selection).
      	Anyway, if anyone has an idea how to trigger "stroke channel" with
      	another drawable active (the one to stroke to), please let me
  7. 25 Aug, 2003 1 commit
    • Michael Natterer's avatar
      added "gchar *help_id" member to the GimpDockable struct and "const gchar · 8c8274e2
      Michael Natterer authored
      2003-08-25  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/gimpdockable.[ch]: added "gchar *help_id" member to
      	the GimpDockable struct and "const gchar *help_id" parameter to
      	* app/widgets/gimphelp-ids.h: added help IDs for the tool list/grid
      	and the palette editor.
      	* app/widgets/gimpdockbook.c
      	* app/gui/dialogs-constructors.c
      	* app/gui/dialogs-menu.c: changed accordingly.
  8. 23 Aug, 2003 1 commit
    • Michael Natterer's avatar
      changed GimpHelpFunc typedef: - renamed "const gchar *help_data" to "const · ba70ce9a
      Michael Natterer authored
      2003-08-23  Michael Natterer  <mitch@gimp.org>
      	* libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef:
      	- renamed "const gchar *help_data" to "const gchar *help_id".
      	- added "gpointer help_data".
      	* libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to
      	gimp_help_connect(). Removed all fiddling with html links and
      	treat all help IDs as opaque identifiers.
      	* app/core/gimptoolinfo.[ch]: changed "help_data" member to
      	* app/widgets/gimpitemfactory.[ch]: removed the "help_path"
      	parameter from gimp_item_factory_new() since we don't fiddle with
      	html file paths any more. Simplifies menu item help a lot.
      	Renamed "help_data" member of struct GimpItemFactoryEntry to
      	* app/gui/plug-in-menus.c: changed accordingly. 3rd party
      	plug-ins' menu item help IDs are now encoded as
      	* app/gui/file-open-menu.c
      	* app/gui/file-save-menu.c: when constructing the <Load> and
      	<Save> menus, take the resp. procedures' locale_domain and
      	help_path into account. Fixes translation of 3rd party menu items.
      	Also do the right thing for load/save procs which are implemented
      	as temporary procedures (they are impossible to implement
      	currently but it's nice to do the right thing anyway...).
      	* app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier.
      	* libgimpwidgets/gimpdialog.[ch]
      	* libgimpwidgets/gimpwidgets.[ch]
      	* libgimp/gimpui.c
      	* app/display/gimpdisplayshell.c
      	* app/gui/gui.c
      	* app/gui/about-dialog.c
      	* app/gui/color-notebook.c
      	* app/gui/dialogs-constructors.c
      	* app/gui/file-dialog-utils.[ch]
      	* app/gui/gradients-commands.c
      	* app/gui/help-commands.c
      	* app/gui/image-menu.c
      	* app/gui/menus.c
      	* app/gui/preferences-dialog.c
      	* app/gui/tips-dialog.c
      	* app/tools/gimpcolorpickertool.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimpcurvestool.c
      	* app/tools/gimphistogramtool.c
      	* app/tools/gimpimagemaptool.c
      	* app/tools/gimplevelstool.c
      	* app/tools/gimpmeasuretool.c
      	* app/tools/gimptransformtool.c
      	* app/widgets/gimperrorconsole.c
      	* app/widgets/gimphelp.[ch]
      	* app/widgets/gimpmenufactory.[ch]
      	* app/widgets/gimptexteditor.c
      	* app/widgets/gimptoolbox.c
      	* app/widgets/gimpviewabledialog.[ch]
      	* plug-ins/common/CEL.c
      	* plug-ins/common/CML_explorer.c
      	* plug-ins/common/gee.c
      	* plug-ins/common/gee_zoom.c
      	* plug-ins/common/gqbist.c
      	* plug-ins/common/spheredesigner.c
      	* plug-ins/flame/flame.c
      	* plug-ins/fp/fp_gtk.c
      	* plug-ins/helpbrowser/helpbrowser.c
      	* plug-ins/ifscompose/ifscompose.c
      	* plug-ins/imagemap/imap_main.c: changed accordingly. Removed
      	trailing whitespace all over the place.
  9. 19 Aug, 2003 1 commit
    • Sven Neumann's avatar
      themes/Default/images/Makefile.am · 1f39a829
      Sven Neumann authored
      2003-08-19  Sven Neumann  <sven@gimp.org>
      	* themes/Default/images/Makefile.am
      	* themes/Default/images/stock-indexed-palette-[16|24].png
      	* themes/Default/images/stock-undo-history-[16|24].png: added new
      	icons drawn by Jimmac.
      	* libgimpwidgets/gimpstock.[ch]
      	* app/gui/dialogs-constructors.c
      	* app/gui/dialogs-menu.c
      	* app/gui/image-menu.c: register and use them.
  10. 15 Aug, 2003 1 commit
    • Michael Natterer's avatar
      extended GimpTabStyle enum so we are able to distinguish icon and preview · 375d479d
      Michael Natterer authored
      2003-08-15  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/widgets-enums.[ch]: extended GimpTabStyle enum so we
      	are able to distinguish icon and preview tabs.
      	* app/widgets/gimpdockable.[ch]: renamed GimpDockableGetIconFunc
      	to GimpDockableGetPreviewFunc. Always create stock icons for
      	"icon" tab styles and use the get_preview_func only for "preview"
      	tab styles.
      	* app/gui/dialogs-constructors.c: changed accordingly.
      	* app/gui/dialogs-menu.c: Added "Current Status" options to the
      	"Tab Style" menu and grey them out if the dockable has no
  11. 08 Jul, 2003 1 commit
    • Michael Natterer's avatar
      Added configurable styles for dockable tabs (fixes bug #87376): · 6fabca2e
      Michael Natterer authored
      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
      	* 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".
  12. 07 Jul, 2003 1 commit
    • Michael Natterer's avatar
      app/gui/Makefile.am removed... · 878ee7b0
      Michael Natterer authored
      2003-07-07  Michael Natterer  <mitch@gimp.org>
      	* app/gui/Makefile.am
      	* app/gui/device-status-dialog.[ch]: removed...
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpdevicestatus.[ch]: ...added here as widget. The
      	thing is narrower now but not nicer and needs some polishing.
      	* app/widgets/gimppropwidgets.[ch]: added gimp_prop_color_area_new()
      	and gimp_prop_stock_image_new() (the latter is still unused).
      	* app/gui/dialogs-constructors.[ch]
      	* app/gui/dialogs.c: made the device status a dockable.
      	* app/gui/dialogs-menu.c
      	* app/gui/image-menu.c
      	* app/gui/toolbox-menu.c: changed accordingly.
      	* app/gui/gui.c: update the device status dialog indirectly now
      	using the new gui_device_change_notify() callback.
  13. 13 Jun, 2003 1 commit
    • Michael Natterer's avatar
      Cleaned up and improved the message system: · 5e950b55
      Michael Natterer authored
      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).
      	- Cleaned up indentation, spacing, #includes, coding style and
      	  other stuff while I was at all these files.
  14. 02 Jun, 2003 1 commit
    • Sven Neumann's avatar
      app/widgets/gimpvectorstreeview.h moved function definitions to the · 46d726d0
      Sven Neumann authored
      2003-06-02  Sven Neumann  <sven@gimp.org>
      	* app/widgets/gimpvectorstreeview.h
      	* app/widgets/widgets-types.h: moved function definitions to the
      	widgets-types header file.
      	* app/gui/dialogs-constructors.c
      	* app/widgets/gimpselectioneditor.[ch]: added a "Selection to
      	Path" button as suggested in bug #112448.
  15. 21 May, 2003 1 commit
    • Michael Natterer's avatar
      Removed the old paths and the remaining legacy stuff it needed. Fixes bug · 487f71ba
      Michael Natterer authored
      2003-05-21  Michael Natterer  <mitch@gimp.org>
      	Removed the old paths and the remaining legacy stuff it needed.
      	Fixes bug #104471.
      	* Makefile.am
      	* configure.in
      	* pixmaps/*: removed the pixmaps/ directory.
      	* app/ops_buttons.[ch]
      	* app/path.[ch]
      	* app/pathP.h
      	* app/path_transform.h
      	* app/gui/paths-dialog.[ch]
      	* app/tools/gimpbezierselecttool.[ch]: removed these files.
      	* app/Makefile.am
      	* app/gui/Makefile.am
      	* app/tools/Makefile.am: changed accordingly.
      	* app/core/core-types.h: removed the Path* types.
      	* app/core/gimpimage.[ch]
      	* app/core/gimpimage-duplicate.c: removed gimage->paths.
      	* app/gui/about-dialog.c: inline wilber2_xpm for now.
      	* app/gui/dialogs-constructors.c
      	* app/gui/dialogs-menu.c
      	* app/gui/dialogs.c
      	* app/gui/menus.c: removed the old paths dialog.
      	* app/gui/gui.c: removed gui_rotate_the_shield_harmonics() hack
      	which was broken anyway.
      	* app/tools/gimptransformtool.c: #if 0 path_transform preview stuff.
      	* app/tools/gimpiscissorstool.c: removed useless include.
      	* app/tools/tools.c: removed the bezier select tool.
      	* app/vectors/gimpvectors.c (gimp_vectors_real_stroke_add): use
      	g_list_append(), not g_list_prepend() so some ugly side conditions
      	of legacy path loading are honored.
      	* app/xcf/xcf-load.c
      	* app/xcf/xcf-save.c: load and save only GimpVectors.
  16. 15 May, 2003 1 commit
    • Michael Natterer's avatar
      added new function vectors_selection_to_vectors() which invokes the · 984eef25
      Michael Natterer authored
      2003-05-15  Michael Natterer  <mitch@gimp.org>
      	* app/gui/vectors-commands.[ch]: added new function
      	vectors_selection_to_vectors() which invokes the sel2path Plug-In.
      	* app/gui/dialogs-constructors.c: make the new function known to
      	* app/widgets/gimpvectorstreeview.[ch]: Added a "Selection to Path"
      	button anc call the new function.
  17. 02 May, 2003 1 commit
    • Michael Natterer's avatar
      added new function gimp_dialog_factory_add_foreign() which adds a dialog · fefaf61b
      Michael Natterer authored
      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.
      	* app/tools/gimptool.c: no need to cast the return value of
  18. 13 Apr, 2003 1 commit
    • Michael Natterer's avatar
      invalidate the preview when the stock_id changes. · 6663cee5
      Michael Natterer authored
      2003-04-13  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimptemplate.c (gimp_template_notify): invalidate
      	the preview when the stock_id changes.
      	* app/widgets/gimptemplateeditor.[ch]: added an optional entry
      	to edit the template's name.
      	* app/widgets/gimptemplateview.[ch]: added a "duplicate" button and
      	function pointers for creating templates, editing templates and
      	creating images from templates.
      	* app/gui/file-new-dialog.[ch] (file_new_dialog_create): added an
      	optional template parameter.
      	* app/gui/file-commands.c: pass template == NULL.
      	* app/gui/templates-menu.c: added a "Duplicate Template" menu entry.
      	* app/gui/templates-commands.[ch]: added the callback for the
      	duplicate menu item. Added "New Template" and "Edit Template"
      	dialogs. Added a function which opens a file_new_dialog with
      	a template preselected.
      	* app/gui/dialogs-constructors.c: let GimpTemplateView know
      	about the functions.
  19. 11 Apr, 2003 1 commit
    • Sven Neumann's avatar
      app/widgets/gimppreview.[ch] moved background functionality into the · a8697d3e
      Sven Neumann authored
      2003-04-11  Sven Neumann  <sven@gimp.org>
      	* app/widgets/gimppreview.[ch]
      	* app/widgets/gimppreviewrenderer.[ch]: moved background
      	functionality into the renderer. Removed some GimpPreview
      	functions that used to wrap GimpPreviewRenderer functionality.
      	* app/display/gimpdisplayshell-layer-select.c
      	* app/display/gimpnavigationview.c
      	* app/gui/dialogs-constructors.c
      	* app/widgets/gimpcontainergridview.c
      	* app/widgets/gimpcontainermenuimpl.c
      	* app/widgets/gimppreview-popup.c
      	* app/widgets/gimpselectioneditor.[ch]: changed accordingly.
  20. 08 Apr, 2003 2 commits
    • Michael Natterer's avatar
      Added "gpointer get_tab_data" to GimpDockableGetTabFunc and to · e9d617b5
      Michael Natterer authored
      2003-04-08  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/gimpdockable.[ch]: Added "gpointer get_tab_data" to
      	GimpDockableGetTabFunc and to gimp_dockable_new().
      	* app/gui/dialogs-constructors.c: changed accordingly. Replaced
      	dialogs_[brush,pattern,gradient,palette,font]_tab_func() by
      	dialogs_viewable_tab_func() which gets passed the GType as
    • Michael Natterer's avatar
      app/widgets/gimpbrushfactoryview.[ch] app/widgets/gimpbufferview.[ch] · f20e559b
      Michael Natterer authored
      2003-04-08  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/gimpbrushfactoryview.[ch]
      	* app/widgets/gimpbufferview.[ch]
      	* app/widgets/gimpcontainereditor.[ch]
      	* app/widgets/gimpcontainergridview.[ch]
      	* app/widgets/gimpcontainertreeview.[ch]
      	* app/widgets/gimpcontainerview.[ch]
      	* app/widgets/gimpdatafactoryview.[ch]
      	* app/widgets/gimpdocumentview.[ch]
      	* app/widgets/gimpimageview.[ch]
      	* app/widgets/gimpitemtreeview.[ch]
      	* app/widgets/gimptemplateview.[ch]: removed "min_item_x" and
      	"min_item_y" parameters all over the place. Added
      	"preview_border_width" instead.
      	* app/widgets/gimpmenuitem.c: ensure that all menu items have the
      	same height.
      	* app/widgets/gimpcontainerpopup.c
      	* app/widgets/gimplayertreeview.c
      	* app/widgets/gimpundoeditor.c
      	* app/gui/brush-select.c
      	* app/gui/dialogs-commands.c
      	* app/gui/dialogs-constructors.c
      	* app/gui/font-select.c
      	* app/gui/gradient-select.c
      	* app/gui/palette-select.c
      	* app/gui/pattern-select.c: changed accordingly.
      	* app/gui/dialogs-constructors.c: removed the borders from the tool
      	and template lists.
  21. 06 Apr, 2003 1 commit
    • Michael Natterer's avatar
      added gimp_list_uniquefy_name() utility function. · 9827ceac
      Michael Natterer authored
      2003-04-06  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimplist.[ch]: added gimp_list_uniquefy_name() utility
      	* app/core/gimpdatalist.c
      	* app/core/gimpitem.c: use it here instead of duplicating almost
      	the same code.
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimptemplateview.[ch]: new widget for editing the
      	template list.
      	* app/gui/dialogs-constructors.c: use it.
      	* app/gui/Makefile.am
      	* app/gui/templates-commands.[ch]
      	* app/gui/templates-menu.[ch]: new files implementing the context
      	menu for the template list.
      	* app/gui/menus.c: register the new menu with the menu factory.
      	* app/gui/file-commands.c (file_new_template_callback): uniquefy
      	the new template's name.
      	* app/gui/documents-commands.c: fixed typo.
  22. 05 Apr, 2003 1 commit
    • Michael Natterer's avatar
      reset object properties only if they are GIMP_PARAM_SERIALIZABLE. · e7fbd810
      Michael Natterer authored
      2003-04-05  Michael Natterer  <mitch@gimp.org>
      	* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
      	reset object properties only if they are GIMP_PARAM_SERIALIZABLE.
      	* app/core/gimpcontext.[ch]: added a GimpTemplate property.
      	* app/gui/dialogs-constructors.[ch]
      	* app/gui/dialogs.c: added a template dialog.
      	* app/gui/dialogs-menu.c
      	* app/gui/image-menu.c
      	* app/gui/toolbox-menu.c: and menu entries to open it.
      	* app/widgets/gimpdnd.[ch]: added DND for GimpTemplates.
  23. 03 Apr, 2003 1 commit
    • Sven Neumann's avatar
      themes/Default/images/Makefile.am · c556c957
      Sven Neumann authored
      2003-04-03  Sven Neumann  <sven@gimp.org>
      	* themes/Default/images/Makefile.am
      	* themes/Default/images/stock-template-16.png
      	* themes/Default/images/stock-texture-64.png: new icons by Jimmac.
      	* libgimpwidgets/gimpstock.[ch]: register the new icons.
      	* app/widgets/gimppreview.[ch]: added the possibility to set a
      	background pixmap on the preview widget.
      	* app/gui/dialogs-constructors.c
      	* app/display/gimpnavigationview.[ch]
      	* app/widgets/gimpselectioneditor.[ch]: set a background on the
      	navigation and selection previews when layer previews are disabled
      	in the preferences.
  24. 25 Mar, 2003 2 commits
    • Michael Natterer's avatar
      added gimp_font_list_restore() which loads the fonts (not yet). · c2a22d5d
      Michael Natterer authored
      2003-03-25  Michael Natterer  <mitch@gimp.org>
      	* app/text/gimpfontlist.[ch]: added gimp_font_list_restore()
      	which loads the fonts (not yet).
      	* app/core/gimp.c: call it.
      	* app/gui/dialogs-constructors.[ch]
      	* app/gui/dialogs-menu.c
      	* app/gui/dialogs.c
      	* app/gui/image-menu.c
      	* app/gui/toolbox-menu.c: added font list and grid views.
      	* app/gui/menus.c: cosmetic.
    • Sven Neumann's avatar
      Makefile.am removed this header file. · 28fddfd5
      Sven Neumann authored
      2003-03-25  Sven Neumann  <sven@gimp.org>
      	* Makefile.am
      	* gimpintl.h: removed this header file.
      	* gimpmiscui.c: include libgimp-intl.h.
      	* gimp.c (gimp_main): call setlocale() and bind to the libgimp
      	textdomain so that plug-ins don't need to do that explicitely.
      	* libgimp/stdplugins-intl.h: added the functionality that used to
      	live in gimpintl.h and removed the libgimp related stuff. Got rid
      	of the INIT_I18N_UI() macro.
      	* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
      	Plug-ins simply call INIT_I18N() once in their run() function.
      	* plug-ins/script-fu/script-fu-intl.h: added the functionality
      	that used to live in gimpintl.h and removed the libgimp related
      	* app/Makefile.am
      	* app/gimp-intl.h: new file that defines the gettext macros for
      	the GIMP core.
      	* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
      	* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
  25. 20 Mar, 2003 1 commit
    • Michael Natterer's avatar
      Removed deprecated and broken list views based on GtkList[Item] (fixes bug · c1dffc05
      Michael Natterer authored
      2003-03-20  Michael Natterer  <mitch@gimp.org>
      	Removed deprecated and broken list views
      	based on GtkList[Item] (fixes bug #90965):
      	* app/widgets/gimpchannellistitem.[ch]
      	* app/widgets/gimpchannellistview.[ch]
      	* app/widgets/gimpcontainerlistview.[ch]
      	* app/widgets/gimpdrawablelistitem.[ch]
      	* app/widgets/gimpdrawablelistview.[ch]
      	* app/widgets/gimpitemlistitem.[ch]
      	* app/widgets/gimpitemlistview.[ch]
      	* app/widgets/gimplayerlistitem.[ch]
      	* app/widgets/gimplayerlistview.[ch]
      	* app/widgets/gimplistitem.[ch]
      	* app/widgets/gimpvectorslistview.[ch]: removed.
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/widgets-enums.h
      	* app/widgets/gimpcontainereditor.c
      	* app/widgets/gimpcontainerview-utils.c
      	* app/widgets/gimpdatafactoryview.c
      	* app/gui/channels-commands.c
      	* app/gui/channels-menu.c
      	* app/gui/drawable-commands.c
      	* app/gui/layers-commands.c
      	* app/gui/layers-menu.c
      	* app/gui/palettes-commands.c
      	* app/gui/test-commands.c
      	* app/gui/vectors-commands.c
      	* app/gui/vectors-menu.c: changed accordingly.
      	* app/gui/dialogs-commands.c
      	* app/gui/dialogs-constructors.[ch]
      	* app/gui/dialogs-menu.c
      	* app/gui/dialogs.c: removed the term "tree" from all user visible
      	places and create tree views when lists are requested.
      2003-03-20  Michael Natterer  <mitch@gimp.org>
      	* POTFILES.in: app/widgets/*list* -> *tree*
  26. 16 Mar, 2003 1 commit
    • Michael Natterer's avatar
      Added GtkTreeView versions of layers/channels/vectors: · 205cdf13
      Michael Natterer authored
      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
      	* 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.
  27. 10 Mar, 2003 1 commit
    • Michael Natterer's avatar
      added GimpData::duplicate() implementation so read-only palettes can be · a00a565c
      Michael Natterer authored
      2003-03-10  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimppalette.[ch]: added GimpData::duplicate()
      	implementation so read-only palettes can be edited again by
      	duplicating them first.
      	* app/gui/dialogs-constructors.c: pass the <Palettes>, not the
      	<Gradients> menu identifier to the palette grid and tree view
      	constructors (spotted by Tigert).
  28. 06 Mar, 2003 1 commit
    • Michael Natterer's avatar
      themes/Default/images/stock-delete-16.png · 3c33140f
      Michael Natterer authored
      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
      	* 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
      	* 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...
  29. 26 Feb, 2003 2 commits
    • Sven Neumann's avatar
      added a writeable field to GimpData and set it from · 0ceeeb02
      Sven Neumann authored
      2003-02-26  Sven Neumann  <sven@gimp.org>
      	* app/core/gimpdata.[ch]: added a writeable field to GimpData and
      	set it from gimp_data_set_filename().
      	* app/gui/brushes-menu.c
      	* app/gui/gradients-menu.c
      	* app/gui/palettes-menu.c
      	* app/gui/patterns-menu.c
      	* app/widgets/gimpbrushfactoryview.c
      	* app/widgets/gimpdatafactoryview.c
      	* app/widgets/gimpgradienteditor.c: look at data->writeable when
      	setting widgets sensitivity.
      	* app/gui/user-install-dialog.c (user_install_dialog_create): reduce
      	some of the dialog clutter by not showing the directories created for
      	* app/core/gimpviewable.[ch]: added a default_stock_id to
      	GimpViewableClass so we don't need to hold a copy in each instance.
      	Added accessor functions to set and get the stock_id.
      	* app/core/gimptoolinfo.c
      	* 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/gimpcellrendererviewable.c
      	* app/widgets/gimppreview.c
      	* app/widgets/gimptoolbox.c: use gimp_viewable_get_stock_id().
      	* app/text/gimptextlayer.c: set a text icon as default stock_id.
    • Michael Natterer's avatar
      added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI · 305db405
      Michael Natterer authored
      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
      	* 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
      	* 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.
      	* 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.
  30. 21 Feb, 2003 1 commit
    • Michael Natterer's avatar
      Started migration from GtkList to GtkTreeView: · 9ee632a6
      Michael Natterer authored
      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.
  31. 20 Feb, 2003 2 commits
    • Michael Natterer's avatar
      app/widgets/Makefile.am app/widgets/widgets-types.h new GimpEditor · 94bdcbcc
      Michael Natterer authored
      2003-02-20  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpimageeditor.[ch]: new GimpEditor subclass adding
      	a GimpImage pointer and a virtual set_image() function.
      	* app/widgets/gimpcolormapeditor.[ch]
      	* app/widgets/gimpselectioneditor.[ch]
      	* app/widgets/gimpundoeditor.[ch]: derive them from GimpImageEditor.
      	Removed the public set_image() functions.
      	* app/gui/colormap-editor-commands.c
      	* app/gui/colormap-editor-menu.c: changed accordingly.
      	* app/gui/dialogs-constructors.c: removed lots of code duplication
      	and use the uniform GimpImageEditor API. Misc cleanups.
    • Michael Natterer's avatar
      Reimplemented the undo history: · c8b4394d
      Michael Natterer authored
      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
      	* 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
      	* 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
  32. 17 Feb, 2003 1 commit
    • Michael Natterer's avatar
      added "undo_desc" parameters. · fefaa309
      Michael Natterer authored
      2003-02-17  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimpimage.[ch] (gimp_image_position_*): added
      	"undo_desc" parameters.
      	* app/core/gimpimage-undo-push.c: changed accordingly.
      	* app/widgets/gimpitemlistview.[ch]: moved the item stack
      	manipulation function pointers from the instance to the class
      	struct. Added lots of descriptive strings to be used by tooltips
      	and undo steps.
      	* app/widgets/gimpchannellistview.c
      	* app/widgets/gimpitemlistitem.c
      	* app/widgets/gimplayerlistview.[ch]
      	* app/widgets/gimpvectorslistview.c
      	* app/gui/dialogs-constructors.c
      	* app/gui/layers-commands.[ch]
      	* app/gui/vectors-commands.c: changed accordingly. Cleanup.
  33. 11 Feb, 2003 1 commit
    • Michael Natterer's avatar
      added new virtual function duplicate() as replacement for all · 436ed648
      Michael Natterer authored
      2003-02-11  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimpitem.[ch]: added new virtual function duplicate()
      	as replacement for all gimp_*_copy() functions.
      	* app/core/gimpchannel.[ch]
      	* app/core/gimpdrawable.[ch]
      	* app/core/gimplayer.[ch]
      	* app/core/gimplayermask.[ch]
      	* app/vectors/gimpvectors.[ch]: replaced public copy() functions
      	by duplicate() implementations.
      	* app/text/gimptextlayer.c: added a duplicate() implementation.
      	* app/widgets/gimpitemlistview.[ch]: removed the "copy_item_func"
      	and simply call gimp_item_duplicate().
      	* app/undo.c
      	* app/core/gimpimage-duplicate.c
      	* app/core/gimpimage-mask.c
      	* app/core/gimpimage-qmask.c
      	* app/gui/channels-commands.c
      	* app/gui/dialogs-constructors.c
      	* app/gui/layers-commands.c
      	* app/gui/vectors-commands.c
      	* app/widgets/gimptoolbox.c
      	* tools/pdbgen/pdb/channel.pdb
      	* tools/pdbgen/pdb/layer.pdb
      	* tools/pdbgen/pdb/selection.pdb: changed accordingly.
      	* app/pdb/channel_cmds.c
      	* app/pdb/layer_cmds.c
      	* app/pdb/selection_cmds.c: regenerated.
  34. 31 Jan, 2003 1 commit
    • Michael Natterer's avatar
      added gimp_item_configure() and gimp_item_copy(). · 794885e2
      Michael Natterer authored
      2003-01-31  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimpitem.[ch]: added gimp_item_configure() and
      	* app/core/gimpdrawable.c (gimp_drawable_configure,copy): use them.
      	* app/vectors/gimpvectors.[ch]: added gimp_vectors_new(),
      	gimp_vectors_copy() and gimp_vectors_copy_points(). Use the new
      	GimpItem functions just as GimpDrawable does. Added a
      	get_memsize() implementation.
      	* app/vectors/gimpstroke.[ch]: made it a GimpObject and added
      	a get_memsize() implementation.
      	* app/undo.c: implemented vectors undo as if the new GimpVectors
      	functions above worked.
      	* app/gui/dialogs-constructors.c
      	* app/gui/vectors-commands.c
      	* app/tools/gimpvectortool.c: use gimp_vectors_new,copy().
  35. 13 Jan, 2003 1 commit
    • Michael Natterer's avatar
      app/gui/brushes-menu.[ch] app/gui/buffers-menu.[ch] · 6f29b766
      Michael Natterer authored
      2003-01-13  Michael Natterer  <mitch@gimp.org>
      	* app/gui/brushes-menu.[ch]
      	* app/gui/buffers-menu.[ch]
      	* app/gui/channels-menu.[ch]
      	* app/gui/colormap-editor-menu.[ch]
      	* app/gui/dialogs-menu.[ch]
      	* app/gui/documents-menu.[ch]
      	* app/gui/file-open-menu.[ch]
      	* app/gui/file-save-menu.[ch]
      	* app/gui/gradient-editor-menu.[ch]
      	* app/gui/gradients-menu.[ch]
      	* app/gui/image-menu.[ch]
      	* app/gui/images-menu.[ch]
      	* app/gui/layers-menu.[ch]
      	* app/gui/palette-editor-menu.[ch]
      	* app/gui/palettes-menu.[ch]
      	* app/gui/patterns-menu.[ch]
      	* app/gui/qmask-menu.[ch]
      	* app/gui/toolbox-menu.[ch]
      	* app/gui/vectors-menu.[ch]: new files, one per GimpItemFactory,
      	containing the menu entries and their setup and update funcs.
      	* app/gui/brushes-commands.[ch]
      	* app/gui/patterns-commands.[ch]: removed because they contained
      	only update funcs.
      	* app/gui/Makefile.am: changed accordingly. Split the huge
      	SOURCES list in smaller ones for menus and dialogs.
      	* app/gui/menus.[ch]: removed the menu entries and setup funcs.
      	Added MENU_SEPARATOR() and MENU_BRANCH() macros to the header.
      	Made some utility functions public.
      	* app/display/gimpdisplayshell.[ch]
      	* app/gui/buffers-commands.[ch]
      	* app/gui/channels-commands.[ch]
      	* app/gui/colormap-editor-commands.[ch]
      	* app/gui/dialogs-commands.[ch]
      	* app/gui/documents-commands.[ch]
      	* app/gui/gradient-editor-commands.[ch]
      	* app/gui/gradients-commands.[ch]
      	* app/gui/images-commands.[ch]
      	* app/gui/layers-commands.[ch]
      	* app/gui/palette-editor-commands.[ch]
      	* app/gui/palettes-commands.[ch]
      	* app/gui/qmask-commands.[ch]
      	* app/gui/vectors-commands.[ch]: removed the update funcs.
      	* app/gui/plug-in-menus.[ch]: renamed plug_in_set_menu_sensitivity()
      	to plug_in_menus_update(). Cleanup.
      	* app/gui/paths-dialog.[ch]: added the <Paths> entries here
      	so they will go away together with these files.
      	* app/gui/dialogs-constructors.c
      	* app/gui/drawable-commands.c: removed useless #includes.
  36. 10 Jan, 2003 1 commit
    • Michael Natterer's avatar
      Move away from creating all item_factories statically in menus_init() but · 8d86ec25
      Michael Natterer authored
      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
      	* 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
      	* 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
      	* 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.