2003-03-26 Sven Neumann <sven@gimp.org>
* app/gui/tool-options-dialog.c (tool_options_dialog_restore_callback):
reset the tool-options before loading the user settings. Don't warn if
loading fails.
2003-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfontselection-dialog.c
(gimp_font_selection_dialog_set_font_desc): fixed braino that
caused the wrong family to be selected.
2003-03-26 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.c: connect the preview on the
context's font object with the font property of the text object
associated to the text tool options.
2003-03-26 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: removed cut'n'paste-duplicated
accelerators from the new font selection menu entries.
2003-03-26 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.c (gimp_text_options_gui): added a
gimp_prop_preview on the font property. Doesn't do anything yet
but has a nice popup...
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/config/gimpcoreconfig.[ch]: added "gchar *default_font".
* app/config/gimprc-blurbs.h: and its blurb.
* app/core/gimp.[ch]: keep a GimpFontList around.
* app/core/gimpcontext.[ch]: added a GimpFont and all needed
fonctions to let it work like brush, pattern etc.
* app/core/gimpdatalist.c: cosmetic.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/tools/tool_manager.c: added GIMP_CONTEXT_PATTERN_MASK to the
context properties which are remembered per tool options.
* app/tools/paint_options.[ch]
* app/tools/gimpblendoptions.c: attach the brush and gradient
preview to the GtkTable that holds opacity and paint mode.
* app/tools/gimpbucketfilloptions.c: added a pattern preview
and popup.
2003-03-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext.c: include locale.h for setlocale().
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/widgets/Makefile.am: changed rules that generate enums code
to include gimp-intl.h instead of libgimp-intl.h.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/*.pdb: include gimp-intl.h.
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
stuff.
* 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.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: added new functions
gimp_image_active_[layer|channel|vectors]_changed() which emit the
resp. signals.
* app/core/gimpimage-undo-push.c (undo_pop_layer,channel,vectors):
fixed them to not leave the image's active layer, channel, vectors
pointers undefined (fixes bug #109110). Call gimp_item_removed()
from all of them.
* app/core/gimpimage-qmask.c: cleanup.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/app_procs.c (app_init): cast batch_cmds to (const gchar **)
when passing them to batch_init().
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): moved the call just added
inside the if(view->container) because it will fail if selecting
the item destroyed the widget.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerpopup.c
(gimp_container_popup_real_confirm): don't use
gimp_context_copy_property() but gimp_context_get_by_type()
followed by gimp_context_set_by_type() because GimpContext's
"copy" functions are special and skip the normal parent_context
logic intentionally (fixes bug #109115).
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): need to call
gtk_tree_view_column_cell_set_cell_data() again after fiddling
with the GtkTreeView (fixes bug #109121).
2003-03-24 Sven Neumann <sven@gimp.org>
* app/widgets/gimpenummenu.[ch]: added new functions
gimp_enum_menu_set_stock_prefix() and
gimp_enum_option_menu_set_stock_prefix() that allow to
conveniently add stock icons to enum menus.
* app/tools/gimpcurvestool.c
* app/tools/gimphistogramtool.c
* app/tools/gimplevelstool.c: use the new functions here.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_separator_drag_drop): don't
try to reorder dockables in a dock containing exactly one dockable
(fixes bug #109042)
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/paint/paint-enums.[ch]: register GimpPaintApplicationMode
with the type system.
* app/paint/gimppaintoptions.[ch]: replaced "gboolean incremental"
with "GimpPaintApplicationMode application_mode"
* app/paint/gimpairbrush.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimppencil.c: changed accordingly.
* tools/pdbgen/pdb/paint_tools.pdb: ditto. Set all paint options
values using g_object_set().
* app/widgets/gimppropwidgets.[ch]: added
gimp_prop_enum_check_button_new() which can represent two
specified enum values and renders itself "inconsistent" for all
other values.
* app/tools/paint_options.c: use it for the "Incremental" toggle.
* app/pdb/paint_tools_cmds.c
* tools/pdbgen/enums.pl: regenerated.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c: use GIMP_STOCK_IMAGE as default_stock_id.
* app/widgets/gimppreviewrendererimage.[ch]: use GimpChannelType
to specify the channel to render and convert it to the pixel index
using gimp_image_get_component_index() when needed. Use the new
red, green, blue, gray and alpha icons when layer_previews is
FALSE.
* app/widgets/gimpcomponenteditor.c: changed accordingly.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-preview.[ch]: moved the image preview code
to separate files.
* app/core/gimpimage.c: removed the functions here. Removed the
new utility function gimp_image_previews_resize() because it
did exactly what gimp_image_size_changed() should do. Moved
the missing bits to gimp_image_size_changed().
* app/core/gimplayer.c (gimp_layer_apply_mask): call
gimp_viewable_invalidate_preview() only if we don't call
gimp_drawable_update(). Calling them both is redundant.
2003-03-23 Sven Neumann <sven@gimp.org>
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/gui/layers-menu.c: there doesn't seem to be a good reason to
disallow the creation of layer masks on indexed images.
2003-03-23 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_new_from_component): use
gimp_image_get_component_index() instead of doing the switch()es
manually.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-preview.c
* app/core/gimpimage.c (get_preview_size): return square
dimensions in config->layer_previews is FALSE (except if the size
is requested for a popup).
(get_popup_size): don't crete popups if config->layer_previews
is FALSE.
* app/core/gimpimage.c: added utility function
gimp_image_previews_resize() and call it on "notify::layer-previews".
Calls gimp_viewable_size_changed() on all drawables of the image
and on the image itself. Ensures that drawable/image previews
toggle their size correctly when toggling layer_previews.
* app/widgets/gimpselectioneditor.c: create the selection preview
as a popup so it keeps the image's aspect ratio when
layer_previews is FALSE.
2003-03-22 Sven Neumann <sven@gimp.org>
* app/gui/layers-commands.c: always flush the image when applying
or discarding a layer mask. The active drawable may change and
make a menu update necessary (fixes bug #108958).
* app/widgets/gimplayertreeview.c: call gimp_image_flush() when
switching between layer and mask editing so the menus get updated.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainereditor.c: allow to create a
GimpContainerEditor without a popup menu.
* app/widgets/gimpcellrendererviewable.c: free the event we
got from gdk_get_current_event().
* app/widgets/gimpcontainerview.c: check view->hash_table for
being non-NULL before using it. Be prepared to be destroyed by as
a result of calling gimp_context_set_foo(view->context, foo).
* app/widgets/gimpcontainertreeview.[ch]: added
tree_view->editable_cells and handle *all* mouse clicks in
gimp_container_tree_view_button_press() (by returning TRUE). Start
editing on double-click only. Use gtk_tree_view_set_cursor()
instead of gtk_tree_selection_select_path() to avoid
selected/focus confusion when the focus enters the widget. Be
prepeared to be destroyed as a result of item selection.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcontainerpopup.[ch]: new GtkWindow derived
widget which pops up a selection of any GimpContainer/GimpContext
combo.
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c: add the name cell to
tree_view->editable_cells so it becomes editable.
* app/tools/gimpblendoptions.c
* app/tools/paint_options.c: use the new container popup for
selecting brushes and gradients.
2003-03-22 Sven Neumann <sven@gimp.org>
* themes/Default/images/stock-channel-16.png
* themes/Default/images/stock-channel-24.png
* themes/Default/images/stock-layer-16.png
* themes/Default/images/stock-layer-24.png: new icons provided by
Jimmac.
* themes/Default/images/stock-eye-12.png
* themes/Default/images/stock-linked-12.png: tiny visibility and
linked icons that I created from Jimmac's small versions by
scaling them down. Should probably be redone.
* libgimpwidgets/gimpstock.[ch]: allow to register multiple sizes
for the same stock_id. Added new icons.
* app/core/gimpchannel.c
* app/core/gimplayer.c: set default stock_ids so the new icons are
used when layer previews are disabled.
2003-03-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_set_viewable)
(gimp_preview_renderer_size_changed): don't rely on
gimp_preview_renderer_set_size() to invalidate the
renderer. Instead, call gimp_preview_renderer_invalidate() after
resizing the renderer.
2003-03-21 Sven Neumann <sven@gimp.org>
* app/plug-in/plug-in.c (plug_in_open): added
G_SPAWN_CHILD_INHERITS_STDIN to the flags passed to g_spawn_async().
Needed to get batch-mode working again.
* app/batch.[ch]: some cleanup.
* plug-ins/script-fu/script-fu-text-console.c: improved error
reporting.
2003-03-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scale.c: don't emit the "scaled"
signal from gimp_display_shell_scale_setup(). Emit it explicitely
from gimp_display_shell_scale_resize() instead.
* app/display/gimpdisplayshell-scroll.c: call
gimp_display_shell_scale_setup() after scrolling in order to
update scrollbars and rulers.
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-handlers.c: emit the "scaled" signal
explicitely.
* app/display/gimpdisplayshell-render.c: minor optimizations.
* app/display/gimpdisplayshell.c: minor cleanup.
2003-03-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpeditor.[ch]: added a GimpItemFactory to the
GimpEditor struct. Added gimp_editor_create_menu().
* app/widgets/gimpcolormapeditor.[ch]
* app/widgets/gimpcomponenteditor.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpitemtreeview.[ch]: removed item_factory pointers
and lots of inalizers which just unref'ed the item_factory. Use
gimp_editor_create_menu() instead.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimppaletteeditor.c: changed accordingly.
2003-03-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-new.c (gimp_image_new_values_new): default
the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()).
* app/gui/file-commands.c
* app/gui/file-new-dialog.c: made more dialogs transient for their
parent window.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpimageeditor.c
* app/widgets/gimpundoeditor.c: simplified a little bit.
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
GdkModifierType instead of guint.
* app/core/gimpmarshal.list
* app/widgets/gimpcellrenderertoggle.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c: use proper marshallers for signals
that take flags as parameters.
* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
to the GimpRGB signal parameter.
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/libgimpwidgets.types
* libgimpwidgets/tmpl/gimpbutton.sgml
* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
2003-03-20 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplay.[ch]: removed gdisp->draw_guides
and gdisp->snap_to_guides.
* app/display/gimpdisplayshell.[ch]: added shell->snap_to_guides.
Added the state of guide, selection and active_layer visibility to
the GimpDisplayShellVisibility struct so they can be configured
separately for fullscreen mode. Update the popup_factory in
gimp_display_shell_real_scaled() only if this is the active
display.
* app/display/gimpdisplayshell-appearance.[ch]: added accessors
for selection, active_layer and guide visibility.
* app/display/gimpdisplayshell-selection.[ch]: changed
accordingly. Changed the selection and active_layer toggle
functions to *_set_hidden().
* app/display/gimpdisplayshell-callbacks.c
* app/gui/image-menu.c
* app/gui/view-commands.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmovetool.c: changed accordingly.
* app/gui/gui.c (gui_display_new): update the menubar_factory
*after* making the new display the active one.
2003-03-20 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]
Fixed crashes and weird problems when the tool changed images or
images got closed. Fixes Bug #108318.
* app/vectors/vectors-types.h: More sane names for the
GimpAnchorType enum.
* app/vectors/gimpbezierstroke.c
* app/vectors/gimpstroke.c: changed accordingly.
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added GIMP_UNDO_GROUP_MASK.
* app/tools/gimpeditselectiontool.c: use it for mask moving.
Made the "undo_desc" strings more specific.
* app/core/gimpundo.c: add it to the list of undo types for
which mask previews are created.
* app/core/gimpimage.c: s/Add Layer to Image/Add Layer/g etc.
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcomponenteditor.c: need to connect to the cell
renderer's "clicked" signal because "toggled" is not emitted any
longer.
* app/widgets/gimpdrawabletreeview.c: removed debugging output.
* app/widgets/gimpitemtreeview.[ch]: added "const gchar *reorder_desc"
to the class scruct and use it as undo_desc for DND reordering.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: set reorder_desc.
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcellrenderertoggle.[ch]
* app/widgets/gimpcellrendererviewable.[ch]: added public
functions to emit the "clicked" signal.
* app/widgets/gimpcontainertreeview.c: use them instead of
g_signal_emit_by_name().
* app/widgets/Makefile.am
* app/widgets/gimpcontainertreeview-dnd.[ch]: new files
implementing DND for tree views.
* app/widgets/gimpcontainertreeview.[ch]: added virtual
functions drop_possible() and drop().
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: implement drop_possible()
and drop().
2003-03-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch] (gimp_image_mask_translate)
* app/core/gimplayer.[ch] (gimp_layer_translate): added
"gboolean push_undo" parameters.
* app/core/gimpimage-crop.c
* app/core/gimpimage-resize.c
* app/display/gimpdisplayshell-dnd.c
* app/gui/layers-commands.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/layer_cmds.c
* app/pdb/selection_cmds.c: regenerated.
* app/core/gimpimage-undo-push.c (undo_pop_layer_displace): call
gimp_layer_translate() with "push_undo == FALSE" instead of
duplicating gimp_layer_translate()'s code. Use GimpItemUndo for
GIMP_UNDO_MASK.
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_cursor_key): check if the top undo on
the stack is of exactly the same type as the undo we would push
and just don't push it then (compresses layer translate undos and
fixes bug #86362). Changed stuff work with CAPS_LOCK or other
modifiers pressed.
2003-03-18 Michael Natterer <mitch@gimp.org>
Added an API for image colormap manupulation and made colormap
changes undoable (fixes bug #25963).
* app/core/Makefile.am
* app/core/gimpimage-colormap.[ch]: new files implementing
colormap getters/setters. The setters push undos using the
new function below.
* app/core/core-enums.[ch]: added GIMP_UNDO_IMAGE_COLORMAP.
* app/core/gimpimage-undo-push.[ch]: added
gimp_image_undo_push_image_colormap(). Use GimpItemUndo even more
often. Cleanup.
* app/core/gimpimage.[ch]: removed gimp_image_get_colormap() here.
* app/core/gimpimage-convert.c
* app/gui/colormap-editor-commands.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/image.pdb: use the new API.
* app/pdb/image_cmds.c: regenerated.
* plug-ins/common/vinvert.c: removed the comment about the bug,
cosmetic cleanup.
Unrelated:
* app/gui/splash.c: added a frame around the splash. Please eek
if it doesn't please you.
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-utils.[ch]: added the new function
gimp_config_string_append_escaped(), see inline docs.
* app/config/gimpconfig-serialize.c
* app/config/gimpconfigwriter.c
* app/core/gimpcontainer.c: use the new function instead of
g_strescape().
2003-03-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added virtual function rename() which
pushes an item rename undo. Added "default_name" and "rename_desc"
to the GimpItemClass struct which are used as default values.
* app/core/gimplayer.c: implement it and special-case floating
selections. set item_clas->default_name and item_class->rename_desc.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: set item_class->default_name and
item_class->rename_desc.
* app/widgets/gimpitemtreeview.[ch]: removed rename_item() virtual
function and call gimp_item_rename().
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly.
2003-03-16 Sven Neumann <sven@gimp.org>
* app/gui/file-save-dialog.c (file_save_overwrite): set the dialog
transient to the file selection dialog (see bug #61092).
2003-03-16 Sven Neumann <sven@gimp.org>
* app/gui/info-dialog.c: set a window type hint of
GDK_WINDOW_TYPE_HINT_UTILITY for info windows (fixes bug #92175).
* app/tools/gimpcolorpickertool.c: give the color area more space.
2003-03-16 Sven Neumann <sven@gimp.org>
* configure.in: check for gdk-pixbuf-csource and allow to override
it by setting the GDK_PIXBUF_CSOURCE environment variable.
* themes/Default/images/Makefile.am: use the gdk-pixbuf-csource
executable that was found at configure time.
* app/base/levels.c: cosmetic change.
* app/tools/gimplevelstool.c: allow to pick white, gray and black
point for all channels. Allows for easy white-point balancing.
* plug-ins/script-fu/scripts/3dTruchet.scm: restore the foreground
color when the script is done (see bug #108473).
2003-03-16 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: added utility function
gimp_container_tree_view_find_click_cell(). Don't select the
row if one of tree_view->toggle_cells was clicked. Removed
"GList *toggle_columns" from the struct.
* app/widgets/gimpdrawabletreeview.[ch]: added a
GtkTreeSelectionFunc which ensures that nothing but the floating
selection can be selected. Removed the "eye_column" from the
struct.
* app/widgets/gimpitemtreeview.[ch]: added virtual function
rename_item() and a default implementation.
* app/widgets/gimplayertreeview.[ch]: implement rename_item() and
special case floating selections. Added
gimp_layer_tree_view_mask_update() utility function to factor out
duplicated code. Removed "chain_column" from the struct. Cleanup.
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-15 Sven Neumann <sven@gimp.org>
* app/base/levels.c (levels_adjust_by_colors): implemented this
function which used to be a an empty stub.
* app/tools/gimplevelstool.c: implemented the missing
functionality behind the color picker buttons I added some time
ago.
2003-03-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimpitemfactory.c (gimp_item_factory_translate_func):
simplified.
* app/gui/image-menu.c: some minor menu cleanups.
2003-03-14 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-curve-free-16.png
* themes/Default/images/stock-curve-smooth-16.png: added new icons
provided by Tuomas Kuosmanen <tigert@gimp.org>.
* libgimpwidgets/gimpstock.[ch]: register the new icons.
* app/tools/gimpcurvestool.[ch]: use radio buttons with the new
curve type icons.
2003-03-14 Sven Neumann <sven@gimp.org>
* app/base/base-enums.[ch]
* app/base/curves.[ch]: changed CurvesType enum GimpCurveType and
register it with the type system.
* app/tools/gimpcurvestool.c: use an enum menu here.
2003-03-14 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdock.c: fiddle with the color of the dock
separator to make the drop area stand out. Added a tooltip.
* etc/gtkrc_user: document how the color can be customized.
2003-03-14 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcolorarea.[ch]: let GimpColorArea optionally
draw a thin border around itself.
* app/widgets/gimpitemfactory.c (gimp_item_factory_set_color): use
a GimpColorArea instead of a deprecated GtkPreview.
2003-03-14 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.[ch]: some cleanup to event handling
and drawing code. Doesn't draw outside the expose_event handler
any longer but could still be improved.
2003-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcomponenteditor.c: disable expensive column
auto-resizing and call gtk_tree_view_columns_autosize() in
gimp_component_editor_set_preview_size().
* app/widgets/gimpcontainertreeview.[ch]: ditto. Changed the
GtkListStore pointer in the GimpContainerTreeView struct to
GtkTreeModel.
2003-03-13 Sven Neumann <sven@gimp.org>
* app/widgets/gimptoolbox.c (gimp_toolbox_init): set a window type
hint of GDK_WINDOW_TYPE_HINT_NORMAL for the toolbox since UTILITY
doesn't match here.
2003-03-13 Sven Neumann <sven@gimp.org>
* app/gui/channels-commands.c: don't expose the internal term
"component", use "channel" instead.
2003-03-13 Sven Neumann <sven@gimp.org>
* POTFILES.in
* de.po: updated.
2003-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcellrenderertoggle.c: fixed size calculation,
removed padding and the spacing between the icon and the frame
around it.
* app/widgets/gimpwidgets-utils.[ch]: added gimp_get_icon_size()
which returns the best matching icon size for a given allocation.
* app/widgets/gimpcomponenteditor.[ch]: adjust the eye icon's
size according to the preview_size.
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_default_render_stock): use gimp_get_icon_size()
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainertreeview.c: iterate the tree model
using a for() loop instead of nested if() { do { } while() }
stuff.
2003-03-13 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: made the GimpPreviewSize enum values a
little bit smaller. What used to be small is now called medium.
* app/config/gimpcoreconfig.c
* app/gui/dialogs.c: changed accordingly.
2003-03-12 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcellrenderertoggle.[ch]: added a new cell_renderer
derived from GtkCellRendererToggle.
* app/widgets/gimpcomponenteditor.c: use the new cell_renderer.
* app/widgets/gimpcellrendererviewable.[ch]: fixed a few typos and
removed some redundant casts.
2003-03-12 Sven Neumann <sven@gimp.org>
* app/gui/image-menu.c: reordered the View menu, moved all
Zoom-related entries into a submenu. Use radio items for the zoom
ratio as suggested in bug #74385.
* app/gui/view-commands.c (view_zoom_cmd_callback): only call
gimp_display_shell_scale() if the item is active and the current
scale is different from the requested one.
* app/display/gimpdisplayshell.c (gimp_display_shell_real_scaled):
update the image menu so that the zoom ratio is displayed correctly.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_realize): don't call
gimp_display_shell_scale_setup(), since it is done in the configure
event handler already.
2003-03-12 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added descriptions to the
GimpChannelType enum.
* app/core/gimpimage.[ch]: added gimp_image_get_component_index()
utility function which does the GIMP_RED_CHANNEL -> RED_PIX etc.
mapping. Use it in all component getters/setters.
* app/widgets/gimpcomponenteditor.[ch]: new widget implementing
the component list using GtkListStore/GtkTreeView. Still a bit
ugly because it uses the standard check instead of the eye icon.
* app/widgets/gimpcomponentlistitem.[ch]: removed.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpvectorslistview.c: changed accordingly.
* app/widgets/gimpchannellistview.[ch]: create a GimpComponentEditor
and removed the old GtkList based stuff.
* app/widgets/gimpitemlistview.[ch]: keep around a pointer to the
GimpMenuFactory passed to the constructor.
* app/gui/channels-menu.c (channels_menu_update): do the right
thing if "data" is a GimpComponentEditor.
* app/gui/channels-commands.[ch]: ditto. Implemented duplicating
of components and component to selection (bug #61018).
2003-03-12 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_init): set a window type hint
of GDK_WINDOW_TYPE_HINT_UTILITY for dock windows (fixes bug #94669).
* app/gui/splash.c (splash_create): set a window type hint of
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN.
2003-03-12 Sven Neumann <sven@gimp.org>
* app/core/gimpchannel.[ch]: added gimp_channel_new_from_component()
which creates a new GimpChannel from an image's color component.
* app/gui/channels-commands.[ch]: added
channels_duplicate_component_cmd_callback().
* app/paint-funcs/paint-funcs-generic.h
* app/paint-funcs/paint-funcs.[ch]: added code to extract a color
component from a PixelRegion (untested!).
* plug-ins/common/checkerboard.c: cosmetics.
2003-03-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_create_thumbnail),
(gimp_imagefile_save_thumbnail)
* app/gui/file-open-dialog.c (file_open_create_thumbnails): don't
create thumbnails if core_config->layer_previews is FALSE
(bug #107242).
* app/file/file-save.c (file_save_as): call
gimp_imagefile_save_thumbnail() unconditionally since it does all
the needed checks itself.
2003-03-11 Michael Natterer <mitch@gimp.org>
* app/display/Makefile.am
* app/display/gimpdisplayshell-appearance.[ch]: new files
implementing canvas padding, fullscreen toggling and utility
functions to show/hide GimpDisplayShell components (menubar,
statusbar, ...) Added the possibility to show/hide the scrollbars.
* app/display/gimpdisplayshell.[ch]: added struct
GimpDisplayShellVisibility which stores the GUI components'
visibility. Added two such structs to the GimpDisplayShell struct:
one for normal mode and one for fullscreen mode. Default to
"everything invisible" for fullscreen. Fixes bug #74383.
* app/display/gimpdisplayshell-callbacks.c: fiddle with the
two visibility structs when toggling fullscreen.
* app/display/gimpdisplayshell-handlers.c: #include
"gimpdisplayshell-appearance.h"
* app/gui/image-menu.c
* app/gui/view-commands.[ch]: added a "Show Scrollbars" menu entry,
use the new widget show/hide utility functions.
2003-03-11 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.[ch]: made gimp_image_get_active_components()
a static function and changed its behaviour so that the image's
active components are only used for layers, not for channels.
Fixes bug #108083.
2003-03-11 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]
* app/gui/image-menu.c
* app/gui/view-commands.c: rewrote the fullscreen mode
implementation so that it doesn't loop infinitely.
2003-03-11 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]
* app/gui/image-menu.c
* app/gui/view-commands.[ch]: added a fullscreen mode for the
image display by means of gtk_window_fullscreen/unfullscreen.
Depends on the window manager implementing _NET_WM_STATE_FULLSCREEN.
* app/tools/gimpcroptool.c: made gimp_crop_tool_draw() static.
* app/tools/gimptexttool.[ch]: derive from GimpDrawTool, no real
changes yet.
2003-03-10 Sven Neumann <sven@gimp.org>
* app/config/gimpscanner.[ch]: removed gimp_scanner_parse_string_list()
since the format it read wasn't proper s-expressions syntax.
* app/config/gimpconfigwriter.c: a couple of minor cleanups.
* app/gui/color-history.[ch]
* app/gui/session.c
* app/widgets/gimpdialogfactory.[ch]: use GimpConfigWriter to
write the sessionrc. Had to do some minor changes to the file
format.
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).
2003-03-10 Sven Neumann <sven@gimp.org>
* app/config/gimpconfigwriter.[ch]: fixed creation of config file,
added new function gimp_config_writer_string() and improved
gimp_config_writer_linefeed().
* app/config/gimpconfig-serialize.c
* app/core/gimpcontext.c
* app/core/gimpdocumentlist.c: use gimp_config_writer_string()
instead of escaping the string manually.
* app/core/gimpunits.c (gimp_unitrc_save): use a GimpConfigWriter.
* app/plug-in/plug-in-rc.[ch] (plug_in_rc_write)
* app/plug-in/plug-ins.c: use a GimpConfigWriter.
2003-03-10 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdataeditor.[ch]: added "gboolean data_editable"
which gets set in gimp_data_editor_real_set_data(). Set the name
entry insensitive if the data is not editable.
* app/widgets/gimpbrusheditor.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimpgradienteditor.c: look at editor->data_editable
instead of duplicating the logic in all subclasses.
* app/widgets/gimppreview.[ch]: added "gboolean expand" and
gimp_preview_set_expand() like in GtkPreview bacause smooth auto
resizing can only be done by the widget itself, not via external
callbacks.
* app/display/gimpnavigationview.c
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpselectioneditor.c: set expand == TRUE. Removed
"size_allocate" callbacks. They resize *much* smoother now.
Various cleanups.
* app/widgets/gimpnavigationpreview.c: recalculate the preview
coordinates when the size changes.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppreviewrenderer-utils.c
* app/widgets/gimppreviewrenderergradient.[ch]: new renderer which
is much faster because it projects the gradient without creating
intermediate buffers. Rendering can be restricted to an interval
from [left...right].
* app/widgets/gimpgradienteditor.[ch]: undeprecated by using
GimpPreview instead of GtkPreview. Cleanup.
* app/gui/gradient-editor-commands.c: changed accordingly.
2003-03-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpdatalist.c (gimp_data_list_uniquefy_data_name): use
gimp_data_list_data_compare_func(), not just strcmp(), so the
ordering of internal items is correct.
2003-03-07 Sven Neumann <sven@gimp.org>
* app/base/hue-saturation.[ch]: changed the hue_saturation()
function as suggested by Martin Weber in bug #94067. Changed the
function signature to use a typed instead of a void pointer.
* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_map):
cast the hue_saturation() function pointer to a GimpImageMapApplyFunc
here.
2003-03-07 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/guides.pdb: allow to add guides with an offset
of 0 (spotted by Paul Doidge, bug #90629).
* app/pdb/guides_cmds.c: regenerated.
2003-03-07 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-scroll.c: need to update the
scrollbars now that the call to gimp_display_shell_scale_setup()
was commented out. Removed the commented stuff and don't #include
"gimpdisplayshell-scale.h". Resume the active tool *after*
calling gdk_window_process_updates() to skip more useless drawing
operations.
2003-03-06 Manish Sing <yosh@gimp.org>
* tools/pdbgen/pdb/guides.pdb: fix find_next_guide to return 0 on
the last guide as documented, instead of failing.
* app/pdb/guides_cmds.c: regenerated
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-06 Sven Neumann <sven@gimp.org>
* app/core/gimpparasitelist.c: fixed parasite serialization that
I broke yesterday.
* app/widgets/gimpenummenu.c: added support for mnemonics.
* app/core/core-enums.h: removed the inverted variants from the
GimpAddMaskType enum. Registered the enum with the type system.
* app/core/gimplayer.c: changed accordingly.
* app/gui/layers-commands.c (layers_add_mask_query): use an enum
frame and added a check button that allows to invert the inital
layer mask.
* tools/pdbgen/pdb/layer.pdb: updated documentation for the
gimp-layer-create-mask PDB function.
* plug-ins/script-fu/siod-wrapper.c: removed new enum values from
the compatibility defines.
* app/core/core-enums.c
* app/pdb/layer_cmds.c
* libgimp/gimpenums.h
* libgimp/gimplayer_pdb.c
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2003-03-05 Manish Singh <yosh@gimp.org>
* configure.in: require GTK+ 2.2. The 2.0.x series is no longer
maintained, and there are some very real bugs that won't go away.
* app/gui/about-dialog.c
* app/widgets/gimppreviewrenderer.c
* app/widgets/gimptoolbox-color-area.c
* plug-ins/common/uniteditor.c: remove special casing for GTK+ 2.0
vs. 2.2
* app/widgets/gtkwrapbox.[ch]
* app/widgets/gtkhwrapbox.[ch]
* app/widgets/gtkvwrapbox.[ch]: remove deprecated functions
* app/gui/gui.c: free return value of gdk_get_display ()
* app/widgets/gimpcontainertreeview.c: use gtk_list_store_move_before () for reordering.
2003-03-05 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpbrusheditor.[ch]: undeprecated and simplified a
lot by using GimpPreview instead of handmade preview stuff.
2003-03-05 Michael Natterer <mitch@gimp.org>
* app/file/file-save.[ch]: added GError reporting, removed
g_message() stuff.
* app/gui/file-commands.c
* app/gui/file-save-dialog.c: g_message() here if file_save_*()
returns an error.
* app/file/file-open.c: use the G_FILE_ERROR quark and the
GFileError enum for reporting errors. Removed g_message() if the
passed in GError** pointer is NULL (passing NULL as error return
location should never mean "show the error message yourself").
* app/app_procs.c
* app/gui/file-commands.c
* app/gui/file-open-dialog.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdocumentview.c: g_message() here if file_open_*()
returns an error.
2003-03-05 Sven Neumann <sven@gimp.org>
* plug-ins/common/compose.c
* plug-ins/common/decompose.c
* plug-ins/fp/fp.c
* plug-ins/rcm/rcm.c: moved these plug-ins to the Filters menu
(fixes bug #107587).
* app/gui/image-menu.c (image_menu_entries): removed a menu
separator which is not needed any longer.
2003-03-04 Sven Neumann <sven@gimp.org>
Based on suggestions by Michael J. Hammel <mjhammel@graphics-muse.org>:
* app/gui/preferences-dialog.c: use US english spelling, fixed a
typo.
* app/config/gimprc-blurbs.h: rephrased some blurbs so they fit
better as tooltips.
2003-03-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcolormapeditor.[ch]: set the active color from
GimpColormapEditor::selected so you can pick colors from an
indexed palette again.
2003-03-04 Michael Natterer <mitch@gimp.org>
* app/file/file-save.[ch]: added new function file_save_as() which
always uses the uri and file_proc parameters passed and never
looks at the image's uri and file_proc. Renamed "gboolean set_uri"
to "set_uri_and_proc" and always set them both if the save
succeeded. Fixes bug #97835. Removed most parameters from
file_save() and made it a small wrapper around file_save_as().
* app/gui/file-commands.c (file_save_cmd_callback): changed
accordingly.
* app/gui/file-save-dialog.c: call file_save_as(), renamed
"set_uri" variables to "set_uri_and_proc".
2003-03-03 Hans Breuer <hans@breuer.org>
* app/text/makefile.msc (new file)
*/makefile.msc */*/makefile.msc : updated
* app/core/gimpdata.c : define access() constants
for G_OS_WIN32 case
* app/text/gimptext.c : <stdlib.h> for getenv()
* libgimp/gimp.def libgimp/gimpui.def : updated externals
* libgimpwidgets/libgimp-glue.c : make dynamic_resolve
actually work again for 'my' DLL naming convention
* plug-ins/gap/gap_pdb_calls.c : reflect renaming
of GIMP_VERTICAL to GIMP_ORIENTATION_VERTICAL
2003-03-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: made the default buffer
and stock rendering functions public so derived renderers
can use them. Renamed gimp_preview_renderer_render_preview()
to gimp_preview_renderer_render_buffer().
* app/widgets/gimppreviewrendererbrush.c
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererimage.c: changed accordingly.
* app/widgets/gimppreviewrenderertextlayer.[ch]: new renderer
for text layers which always renders the stock icon.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppreviewrenderer-utils.c: changed accordingly.
2003-03-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: removed the constructors
with a GimpViewable parameter and always create renderers from
viewable types only. Made gimp_preview_renderer_update() emit only
the "update" signal and added the new function
gimp_preview_renderer_invalidate() which does what the old
_update() did (invalidating and adding an idle function which
emits "update"). Added gimp_preview_renderer_remove_idle() so
renderer updating can be fully controlled using public functions.
* app/widgets/gimppreviewrendererbrush.[ch]: no need to remember
the widget for the brushpipe animation, simply call
gimp_preview_renderer_update() in the animation timeout.
* app/widgets/gimppreview.[ch]
* app/widgets/gimpcontainertreeview.c: changed accordingly. Call
gimp_preview_renderer_remove_idle() after setting the initial
viewable because we will be updated anyway by the first expose.
* app/widgets/gimppreview.[ch]: Added a size_request()
implementation. Removed gimp_preview_update(). Added new
constructor gimp_preview_new_full_by_types() to make the
constructor API symmetric. Removed code duplication by calling the
_by_types() constructors from the ones taking GimpViewable
parameters.
* app/gui/palette-import-dialog.c
* app/widgets/gimppropwidgets.c
* app/widgets/gimpselectioneditor.c: changed accordingly.
2003-03-03 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_create_mask): don't try to
convert a grayscale layer to grayscale. Fixes bug #107422.
2003-03-02 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/guides.pdb
* app/pdb/guides_cmds.c: fixed gimp_image_find_next_guide() which
was broken for the case when the image had no guides at all. Fixes
the hanging rotate plug-in (bug #106823).
2003-03-01 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: added "gint bytes" to the
GimpPreviewRenderer struct and pass it to
gimp_preview_render_to_buffer().
* app/widgets/gimppreviewrendererbrush.[ch]: render the indicators
to the renderer's buffer, not to the TempBuf so they always appear
in the corner again.
Misc cleanups:
* app/core/gimpbuffer.c (gimp_buffer_get_new_preview)
* app/core/gimppattern.c (gimp_pattern_get_new_preview): no need
to center the TempBuf if smaller than requested because
GimpPreviewRenderer::render()'s default implementation adjusts the
offsets itself.
* app/widgets/gimppreview.c (gimp_preview_set_viewable): no need
to update ourselves after we changed the renderer because the
renderer's signal will update us.
* app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_draw):
replaced my stupid buf_rect calculation overkill by something
simple that does the same.
2003-03-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpbuffer.c: don't scale the preview up if the
buffer is too small.
* app/core/gimppattern.c: don't add a white border around the
preview if the pattern is too small.
* app/widgets/gimppreviewrenderer.[ch]: new object. A buffer
that updates itself on GimpViewable changes and can render
itself to any widget. Basically GimpPreview reduced to the
render and draw code.
* app/widgets/gimppreview.[ch]: removed all rendering and drawing
code and keep a GimpPreviewRenderer instance. Connect to its
"update" signal for queuing draws on the preview.
* app/widgets/gimpcellrendererviewable.[ch]
* app/widgets/gimpcontainertreeview.c: same here: removed
rendering and drawing code and keep GimpPreviewRenderers in the
list store. Delays preview creation for GtkTreeViews until the
buffer is really needed for drawing and adds idle preview updating
on viewable changes.
* app/widgets/gimppreview-utils.[ch]
* app/widgets/gimpbrushpreview.[ch]
* app/widgets/gimpbufferpreview.[ch]
* app/widgets/gimpdrawablepreview.[ch]
* app/widgets/gimpimagepreview.[ch]: removed...
* app/widgets/gimppreviewrenderer-utils.[ch]
* app/widgets/gimppreviewrendererbrush.[ch]
* app/widgets/gimppreviewrendererdrawable.[ch]
* app/widgets/gimppreviewrendererimage.[ch]: ...and converted to
GimpPreviewRenderer subclasses.
* app/display/gimpnavigationview.c
* app/gui/palette-import-dialog.c
* app/widgets/Makefile.am
* app/widgets/widgets-enums.h
* app/widgets/widgets-types.h
* app/widgets/gimpchannellistview.c
* app/widgets/gimpcomponentlistitem.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplistitem.c
* app/widgets/gimpnavigationpreview.[ch]
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorslistview.c: changed accordingly.
2003-02-28 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.[ch]: transparently serialize
and deserialize object properties that implement the
GimpConfigInterface.
* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
call reset recursively if properties are itself objects that
implement the GimpConfigInterface.
* app/config/gimpconfig-dump.c: adapt to API changes.
* app/config/gimpconfig-params.h: made object properties installed
using GIMP_CONFIG_INSTALL_PROP_OBJECT() be not writable by default.
* app/core/gimpcontext.c (gimp_context_class_init): made objects
properties explicitely writeable.
* app/tools/gimptextoptions.c: made the GimpText object a property
of GimpTextOptions and removed lots of special handling which is
now transparently done by GimpConfigInterface.
2003-02-28 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.[ch]: renamed
gimp_config_serialize_changed_properties() to
gimp_config_serialize_properties_diff() and added a new function
gimp_config_serialize_changed_properties() that saves only
properties that have been changed from their default values.
* app/config/gimprc.c: follow the function name change.
* app/core/gimpcontext.c: override GimpConfigInterface::serialize
with gimp_config_serialize_changed_properties() so we store only
tool_options that have been changed from their default values.
2003-02-28 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.c
(gimp_config_serialize_changed_properties): simplified by using
gimp_config_serialize_property() instead of doing it all by hand.
2003-02-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added virtual function
get_popup_size() which returns a boolean indicating if a popup is
needed and its size.
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* 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
* app/core/gimppattern.c
* app/core/gimpundo.c: implement it.
* app/widgets/gimppreview.[ch]: removed virtual functions
needs_popup() and create_popup(). Removed the code which creates
the popup and the popup members of the GimpPreview struct.
* app/widgets/gimppreview-popup.[ch]: new files providing the
utility function gimp_preview_popup_show() which can show popups
from any widget, not just from a GimpPreview. Checks if a popup is
needed using gimp_viewable_get_popup_size().
* app/widgets/gimpcellrendererviewable.c: show popups here too.
* app/widgets/gimpbrushpreview.c
* app/widgets/gimpbufferpreview.c
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpimagepreview.c: removed needs_popup() and
create_popup() implementations.
* app/widgets/gimpnavigationpreview.c: removed empty render()
implementation.
* app/widgets/gimpundoeditor.c: use a tree instead of a list view.
* app/widgets/gimpgradientpreview.[ch]
* app/widgets/gimppalettepreview.[ch]
* app/widgets/gimppatternpreview.[ch]: removed because they only
implemented the removed popup functions.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpmenuitem.c
* app/widgets/gimppreview-utils.c: changed accordingly
2003-02-26 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.c (gimp_config_serialize_properties):
don't insert an extra line-break after a serialized property.
* app/config/gimpconfig-serialize.c
* app/config/gimpconfig-dump.c
* app/gui/tips-parser.c: use g_string_truncate (str, 0) instead of
assigning an empty string.
* app/tools/gimptextoptions.c: override the serialize and
deserialize methods of the GimpConfig interface and save/restore
the associated GimpText object instead of GimpTextOptions.
* app/tools/tool_options.c (gimp_tool_options_build_filename):
don't append ".default" if no extension is given.
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
plug-ins.
* 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.
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-25 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-25 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.[ch]
* app/display/gimpdisplayshell.c: override GtkWidget::popup_menu()
so we popup the Image menu on the default shortcut (Shift F10).
* app/gui/image-menu.c (image_menu_entries): removed or replaced
shortcuts that use the Alt key. Added access keys to all toplevel
entries of the Image menu (see bug #106991).
* app/gui/tools-commands.[ch]: removed "Swap Contexts" functionality.
* app/widgets/gimpselectioneditor.[ch]: moved "Invert" button.
2003-02-25 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: replaced the "gboolean
title_dirty" in GimpDisplayShell by "guint title_idle_id".
(gimp_display_shell_flush): Call gimp_display_shell_update_title()
unconditionally. Don't call info_window_update().
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-scale.c: ditto.
* app/display/gimpdisplayshell-title.c: update the title in an
idle function. Call info_window_update() from the idle function.
2003-02-25 Sven Neumann <sven@gimp.org>
* app/config/gimpdisplayconfig.[ch]
* app/config/gimprc-blurbs.h
* app/display/gimpdisplayshell.c
* app/gui/preferences-dialog.c: applied a modified version of a
patch from Toralf Lund <toralf@kscanners.no> that adds a new
preferences option to choose the inital zoom ratio. Fixes bug
#106730 and in my opinion also #103547.
2003-02-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerview.c (gimp_container_view_remove):
remove the insert_data from the hash table *after* calling the
virtual remove_item() functions because GimpContainerTreeView's
GtkTreeIters are freed by the hash table when removing them.
2003-02-25 Sven Neumann <sven@gimp.org>
* app/config/gimprc-blurbs.h
* app/gui/preferences-dialog.c: tried to improve the explanations
of the new undo limits.
2003-02-25 Sven Neumann <sven@gimp.org>
* app/tools/gimprectselecttool.c (gimp_rect_select_tool_motion):
if in free select mode set width and height in the tool options.
* app/tools/gimpselectionoptions.c: relaxed the limits for the
fixed-width and fixed-height properties.
2003-02-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): the gtk_tree_model_get()
argument list ends with -1, not NULL.
2003-02-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerview.[ch]: added "GDestroyNotify
insert_data_free" to the GimpContainerViewClass struct. Pass it as
"value_destroy_func" to g_hash_table_new_full().
* app/widgets/gimpcontainertreeview.[ch]: set g_free() as
insert_data_free, so we don't leak the GtkTreeIters used as
insert_data. Added DND stuff (you can drag any item without
selecting it using mouse button 2). Cleanup.
* app/widgets/gimpcontainereditor.c: cosmetic.
2003-02-24 Sven Neumann <sven@gimp.org>
* app/text/gimptext.[ch]
* app/text/gimptextlayout.c: added a language property to GimpText
which defaults to the language derived from the users locale. Set
the language on the PangoContext.
2003-02-24 Michael Natterer <mitch@gimp.org>
* app/gui/dialogs-commands.c (dialogs_toggle_view_cmd_callback):
fixed strstr() call so we can switch back from tree views again.
2003-02-24 Michael Natterer <mitch@convergence.de>
* app/display/gimpdisplay-foreach.[ch]: removed
gimp_displays_invalidate() again.
* app/display/gimpdisplayshell-render.c: don't call it.
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_check_notify_handler): put the call to
gimp_display_shell_expose_full() back I "optimized" away a few
days ago.
2003-02-23 Sven Neumann <sven@gimp.org>
* app/gui/convert-dialog.c (convert_to_indexed): set the correct
default value for the palette type menu (fixes bug #106798).
2003-02-21 Manish Singh <yosh@gimp.org>
* app/gui/about-dialog.c
* app/widgets/gimpimagefilepreview.c
* app/widgets/gimptoolbox-color-area.c: use gdk_draw_pixbuf with
GTK+ 2.2 or higher instead of gdk_pixbuf_render_to_drawable.
That function will be deprecated in GTK+ 2.4. We should remove the
fallback at some point when we start depending on GTK+ 2.2 for other
stuff.
2003-02-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplay-foreach.[ch]: added new function
gimp_displays_invalidate() which queues a redraw on all displays
by calling gimp_display_shell_expose_full().
* app/display/gimpdisplayshell-render.c (render_setup_notify):
invalidate all displays when the transparency type or size changes.
* app/tools/gimptexttool.c (text_tool_button_press): readded some
code I accidentally removed in my last commit.
* app/text/gimptextlayout.c (gimp_text_layout_new): always set the
font size but make sure it is at least 1.
2003-02-21 Sven Neumann <sven@gimp.org>
* app/widgets/gimpviewabledialog.c: added missing cast.
* app/widgets/gimpcontainertreeview.c: do not include a non-existant
header file.
2003-02-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scroll.c (gimp_display_shell_scroll):
don't wait for graphics expose events. Commented out the call to
gimp_display_shell_scale_setup() since it should not be needed.
2003-02-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c (render_image_rgb):
replaced a for-loop with a call to memcpy().
* app/display/gimpdisplay.c: use g_memdup() instead of g_new()
followed by memcpy().
2003-02-21 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformoptions.c
(gimp_transform_options_class_init): the default value of "clip"
is FALSE, not TRUE. Fixes bug #106644.
2003-02-21 Michael Natterer <mitch@gimp.org>
Refactored the GimpDisplayShell update/draw code:
* app/display/gimpdisplayshell.[ch]: removed the display_areas
list which used to hold the GimpAreas to update. Instead, simply
queue draws using gtk_widget_queue_draw[_area]() in
gimp_display_shell_expose_area(), _expose_full() and
_expose_guide(). Made all _draw() functions public because they
are now called from the "expose_event" handler. Removed rendering
from gimp_display_shell_flush() because stuff is now flushed
automatically by the gtk idle renderer.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_expose): draw everything here (the code
removed from gimp_display_shell_flush() without the GimpArea list).
(gimp_display_shell_canvas_tool_events): return "return_val", not
TRUE if gimp->busy is TRUE. Fixes unupdated (windowk bg color)
display areas. Fixes bug #106595.
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-cursor.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-selection.c
* app/gui/view-commands.c: changed accordingly. Removed calls to
gimp_display_shell_flush() all over the place.
* app/display/gimpdisplayshell-scroll.c: replaced lots of code by
a single call to gdk_window_scroll().
2003-02-21 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.[ch] (gimp_table_attach_stock):
added a colspan parameter and fixed packing of the stock icon.
* app/tools/gimpselectionoptions.c
* app/tools/gimptextoptions.c: improved dialog layout.
2003-02-20 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfontselection-dialog.c
* app/widgets/gimpfontselection.c: connect the dialog to the font
selection widget and block the signal handler when the font is
changed from the dialog. Fixes weird behaviour noted by Jimmac.
2003-02-20 Sven Neumann <sven@gimp.org>
* libgimpbase/gimputils.c (gimp_utf8_strtrim): trim the string
only if necessary.
* app/text/gimptext.c: changed the default text to NULL.
* app/widgets/gimptexteditor.[ch]: replaced Cancel and OK buttons
with a single Close button and removed the callback.
* app/widgets/gimppropwidgets.c: gtk_text_buffer_set_text()
doesn't like NULL pointers, pass it an empty string instead.
* app/tools/gimptexttool.c: create a new text layer as soon as the
user starts editing.
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.
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-19 Sven Neumann <sven@gimp.org>
* app/widgets/gimppropwidgets.[ch]: added a new widget constructor
gimp_prop_opacity_entry_new() which is a scale entry with a display
factor of 100.0.
* app/tools/paint_options.c: use the new opacity scale for opacity
controls.
2003-02-18 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppropwidgets.[ch]: added gimp_prop_preview_new().
* app/tools/gimpblendoptions.c
* app/tools/paint_options.c: use it.
2003-02-18 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/procedural_db.pdb
* app/pdb/procedural_db_cmds.c: use regfree() to free the regex
pattern buffer.
* app/widgets/gimpdnd.c (gimp_dnd_data_dest_add): unref the
GtkTargetList after adding it to the widget.
* app/core/gimpimage.c (gimp_image_get_new_preview): initialize
all fields of the mask pixel_region.
* app/core/gimpviewable.c (gimp_viewable_get_new_preview_pixbuf):
pass a destroy notifier to gdk_pixbuf_new_from_data() so that the
pixel data is freed with the pixbuf.
* libgimptool/gimptool.c (gimp_tool_class_init): register a
finalizer that unrefs the GimpToolControl object.
* app/widgets/gimpenummenu.c (gimp_enum_stock_box_new_with_range):
free the generated stock_id.
2003-02-18 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.[ch]: added plug_ins_proc_def_find() which
takes a ProcRecord and returns the corresponding PlugInProcDef.
* app/plug-in/plug-in.[ch]: added a ProcRecord pointer to the
PlugIn struct so we know which procedure the plug-in is
executing. Replaced "gboolean in_temp_proc" by
"ProcRecord *current_temp_proc". Added plug_in_get_undo_desc()
which uses the new ProcRecord members and plug_ins_proc_def_find()
to return a human readable string.
* app/plug-in/plug-in-run.c: pass the ProcRecord to plug_in_new().
Set plug_in->current_temp_proc while executing a temp_proc.
(The latter won't work since we don't run temp_procs recursively
at the moment).
* app/gui/plug-in-menus.c: translate the plug-in's menu_path
before chopping it for the "Repeat" and "Reshow" menu items.
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/undo.pdb: use plug_in_get_undo_desc() when
pushing plug-in undos.
* app/pdb/drawable_cmds.c
* app/pdb/undo_cmds.c: regenerated.
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.
2003-02-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpedit.c (gimp_edit_fill): pass more detailed
undo_desc strings instead of always "Fill".
* app/core/gimpimage-mask-select.c: changed undo_desc strings
to match the already existing blurbs of the selection tools.
2003-02-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-merge.[ch]: added "const gchar *undo_desc" to
gimp_image_merge_layers() so the undo steps say "Merge Down",
"Flatten Image" etc. instead of always "Merge Layers".
2003-02-15 Larry Ewing <lewing@ximian.com>
* app/tools/gimpinkoptions.c (gimp_ink_options_gui): add a new
variable to hold the brush vbox so the we return the correct
widget.
2003-02-14 Michael Natterer <mitch@gimp.org>
Fixed most of the bugs the Script-Fu logo scripts triggered:
* app/core/gimpdrawable-bucket-fill.[ch]
(gimp_drawable_bucket_fill): added "gboolean do_seed_fill"
parameter instead of assuming TRUE.
(gimp_drawable_bucket_fill_full): moved "color" and "pattern"
parameters to the end.
* app/tools/gimpbucketfilltool.c
* app/display/gimpdisplayshell-dnd.c
* app/widgets/gimpdrawablelistview.c: changed accordingly.
* tools/pdbgen/pdb/misc_tools.pdb: only pass TRUE if the selection
is empty. Restores old PDB behaviour.
* app/core/gimpimage-undo.c (gimp_image_undo_group_end): return
early if gimage->undo_on is FALSE. Fixes bogus criticals.
* app/core/gimpimage.c (gimp_image_add_[layer|channel|vectors]):
clamp the passed position to sane values before calling
gimp_container_insert() (Scripts adding layers at wrong indices
are broken but should not crash the core).
* tools/pdbgen/pdb/paint_tools.pdb: need to copy the relevant
paint parameters from the current context now that the paint
options are contexts themselves.
* tools/pdbgen/pdb/palette.pdb: removed useless includes.
(Mostly) fixed text PDB functions:
* app/text/gimptext-compat.[ch] (text_render): don't set
text->font_size = -1 but get the size from the PangoFontDescrition.
(text_get_extents): return the logical_rect, not the ink_rect
because the size of the created text layer will be the logical_rect.
* tools/pdbgen/pdb/text_tool.pdb: removed text_fontname_create()
utility function and the usage of pass_through and implement all
invokers in-place, using the correct parameters.
* plug-ins/script-fu/siod-wrapper.c: fixed BG-IMAGE-FILL compat
define so we can BG fill again. Cleaned up color handling code.
* plug-ins/script-fu/scripts/coolmetal-logo.scm
* plug-ins/script-fu/scripts/glossy.scm
* plug-ins/script-fu/scripts/land.scm
* plug-ins/script-fu/scripts/lava.scm
* plug-ins/script-fu/scripts/test-sphere.scm: use new gradient names.
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/palette_cmds.c
* app/pdb/text_tool_cmds.c: regenerated.
2003-02-14 Sven Neumann <sven@gimp.org>
* app/core/gimplayermask.c (gimp_layer_mask_duplicate): return the
duplicate, not the original mask. Fixes bug #106010.
2003-02-13 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: fixed use of proxy-resume and proxy-skip
trigraphs. We should get rid of these, they are so confusing.
* app/core/core-enums.c: regenerated.
* libgimpproxy/gimpproxytypes.h: this file was regenerated for no
good reason.
2003-02-12 Michael Natterer <mitch@gimp.org>
Moved the undo system to the core: Keep GimpUndoStack objects as
undo and redo stack. Use GimpUndo objects as members of the
stacks. GimpUndoStack is derived from GimpUndo and keeps undo
groups, so undo group handling is much simpler than before
(the whole group is just a single GimpUndo object on the
stack and not everything between group boundary markers).
* app/Makefile.am
* app/undo_types.h: removed.
* app/config/gimpcoreconfig.[ch]: added "gulong undo_size".
* app/config/gimprc-blurbs.h: and its blurb.
* app/core/core-enums.[ch]: added GimpUndoMode and GimpUndoType.
* app/core/core-types.h: removed UndoType, added GimpUndoAccumulator,
GimpUndoPopFunc and GimpUndoFreeFunc.
* app/core/gimpundo.[ch]: do everything the old "Undo" struct did.
Removed the virtual push() function and added free().
* app/core/gimpundostack.[ch]: keeps the new undo/redo stacks
and also acts as undo group.
* app/core/gimpimage-undo.[ch]: moved the undo apparatus here.
* app/core/gimpimage.[ch]: removed the old stuff.
* app/core/gimpmarshal.list: added marshaller needed for GimpUndo.
* app/undo.[ch]: removed the whole undo mechanism. Only the
actual undo pushing functions are left.
* app/undo_history.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/image-menu.c
* app/gui/preferences-dialog.c
* app/tools/gimpeditselectiontool.c: changed accordingly.
2003-02-10 Manish Singh <yosh@gimp.org>
* app/plug-in/plug-in-debug.c: remove a couple unused vars
* plug-ins/common/spheredesigner.c: G_OBJECT casts not needed
for g_signal_connect.
2003-02-10 Manish Singh <yosh@gimp.org>
* app/plug-in/plug-in.[ch]: added hooks for running plug-ins under
a memory debugger. Also, removed the args array from the PlugIn
structure, replacing with simply a variable for the path to the
plug-in (and one for a precalculated basename).
* app/plug-in/plug-in-debug.[ch]: helper routines for the above
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-proc.c
* app/plug-in/plug-in-progress.c: reflect new and renamed args members
* app/plug-in/Makefile.am: added plug-in-debug.[ch]
* app/core/core-types.h: added forward declaration for GimpPlugInDebug
* app/core/gimp.[ch]: added structure member for GimpPlugInDebug
* devel-docs/debug-plug-ins.txt: documented new feature
2003-02-10 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-utils.[ch]: added new utility functions
gimp_config_connect() and gimp_config_disconnect() and documented
most functions.
* app/tools/gimptexttool.c (gimp_text_tool_connect): use the new
GimpConfig utility functions.
2003-02-10 Sven Neumann <sven@gimp.org>
* app/config/gimprc.c (gimp_rc_query): allow to query for gimp
paths (like "gimp_dir") as it used to work in 1.2.
* libgimpwidgets/gimpunitmenu.[ch]: minor code cleanup.
2003-02-10 Michael Natterer <mitch@gimp.org>
* app/tools/tool_options.[ch]: added a "const gchar *extension"
parameter to gimp_tool_options_[de]serialize(). Default to
"default" if NULL is passed.
* app/tools/tool_manager.[ch]: load the tool_options from the
default files in tool_manager_restore(), added tool_manager_save()
which saves the default files.
* app/app_procs.c: call tool_manager_save() on app exit.
* app/gui/tool-options-dialog.c: pass "user" when loading/saving
the user defaults. Changed tooltips of the load & save buttons.
2003-02-10 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformtool.[ch]: connect to GimpTransformOptions'
"notify" signal and update grid and path drawing accordingly.
* app/tools/gimptransformoptions.c: removed the same stuff here.
Doesn't depend on the tool_manager any more.
* app/tools/gimpselectionoptions.c
* app/tools/paint_options.c: don't #include "tool_manager.h"
2003-02-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: simplified everything a lot by
merging the public GimpContextPropType enum with the internal
anonymous object property id enum. Removed the internal copy_prop
functions and handle property copying in a big switch() in
gimp_context_copy_property(). Removed the separate signal
connections for each property of the parent context and do the
same using a single "notify" handler. Emit "notify" signals all
over the place. Removed internal arrays which are no longer
needed due to enum merge and copy_property simplification.
Removed the array of signal names and use g_signal_name().
Removed gimp_context_unset_parent() and allow "parent" being NULL
in gimp_context_set_parent().
* app/tools/tool_manager.c
* app/widgets/gimpdevices.c: changed accordingly.
* libgimptool/gimptooltypes.h: changed GimpToolOptionsGUIFunc to
return a GtkWidget (the created tool options widget).
* libgimptool/gimptoolmodule.c: #include <gtk/gtk.h>
* app/tools/tool_options.[ch]: removed the "main_vbox" from the
GimpToolOptions struct. Changed gimp_tool_options_gui() to create
and return the main_vbox.
* app/tools/tool_manager.c: create the "This Tool has no Options"
label here if NULL was passed as "options_gui_func". Attach the
options widget to the tool_options object using
g_object_set_data().
* app/gui/tool-options-dialog.c: changed accordingly.
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendoptions.[ch]
* app/tools/gimpbucketfilloptions.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickeroptions.[ch]
* app/tools/gimpconvolvetool.c
* app/tools/gimpcropoptions.[ch]
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpflipoptions.[ch]
* app/tools/gimpinkoptions.[ch]
* app/tools/gimpmagnifyoptions.[ch]
* app/tools/gimpmeasureoptions.[ch]
* app/tools/gimpmoveoptions.[ch]
* app/tools/gimpselectionoptions.[ch]
* app/tools/gimpsmudgetool.c
* app/tools/gimptextoptions.[ch]
* app/tools/gimptransformoptions.[ch]
* app/tools/gimpvectoroptions.[ch]
* app/tools/paint_options.[ch]: return the options vbox from
all tool_options_gui functions.
2003-02-08 Sven Neumann <sven@gimp.org>
* app/text/gimptext.c
* app/tools/gimpbucketfilloptions.c
* app/tools/gimpselectionoptions.c
* app/tools/gimptextoptions.c: use N_() instead of _() with blurbs
of object properties. GimpConfig wants the untranslated string as
well.
* app/widgets/gimpenummenu.c
* app/widgets/gimppropwidgets.c: added gettext() calls.
* app/config/gimpconfig-serialize.c: document the fact that
gimp_config_serialize_comment() only handles ASCII comments.
2003-02-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpselectioneditor.c: changed include to follow
selection options change. Don't use the tool_manager to find
by_color_select's options.