2004-02-04 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-render.c (struct RenderInfo)
(render_image_accelerate_scaling): use gdouble instead of gfloat
for x and y scale factors so gfloat's limited precision can't add
up to off-by-one pixel errors. Fixes display artefacts (missing
updates) at the bottom and right sides of updated areas at certain
irrational zoom factors like 1:3.
2004-02-04 Sven Neumann <sven@gimp.org>
* app/gui/image-menu.c (image_menu_entries): added percentages to
the View->Zoom menu entries as suggested in bug #131563.
2004-02-04 Sven Neumann <sven@gimp.org>
* app/config/gimprc.[ch]: added the new function
gimp_rc_set_unknown_token() to get autosave working for unknown
gimprc tokens.
* app/config/gimpconfig.c: indentation.
* tools/pdbgen/pdb/gimprc.pdb: gimp->edit_config was used for a
good reason, it's the one that's saved. Reverted a change I did
about a month ago. Use gimp_rc_set_unknown_token() so unknown
tokens get saved. This really fixes gimp_gimprc_set().
* app/pdb/gimprc_cmds.c: regenerated.
2004-02-03 Sven Neumann <sven@gimp.org>
* app/gui/image-menu.c (image_menu_set_zoom): don't mark weird
format strings as translatable.
* data/misc/gimp.desktop.in.in (_Name): use "The GIMP" without an
"(unstable)" suffix. Should give translators the chance to update
their translations before the final 2.0 release.
* configure.in: removed now unused GIMP_VISIBLE_NAME variable.
2004-02-03 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.c (plug_ins_init): use g_clear_error()
instead of g_error_free() and re-use the same GError location for
pluginrc parsing and writing.
(plug_ins_proc_def_insert): when overriding a PlugInProcDef, don't
take over the menu_path and menu_accel of the overridden proc
because (a) it's just plain wrong and (b) we don't need to
preserve the proc_defs' order any more (see below).
2004-02-03 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-proc.[ch]: added new function
plug_in_proc_def_compare_menu_path() which is a GCompareDataFunc.
(uses g_utf8_collate() on the translated menu paths).
* app/plug-in/plug-ins.c (plug_ins_init): sort gimp->load_procs
and gimp->save_procs using the new compare function above.
Fixes bug #133180.
(plug_ins_locale_domain)
(plug_ins_help_domain): don't g_return_if_fail() on a NULL
prog_name but return the default locale and help domains
of the GIMP itself.
(plug_ins_proc_def_insert): removed obsolete and broken (not
locale and UTF-8 aware) code which tried to insert new plug-in
menu entries in alphabetical order (was unused except for load
and save procs).
Unrelated:
* app/plug-in/plug-in-proc.[ch]: added const qualifiers.
* app/file/file-open.c
* app/file/file-save.c
* tools/pdbgen/pdb/fileops.pdb: changed accordingly (constify
local variables).
* app/pdb/fileops_cmds.c: regenerated.
* app/display/gimpcanvas.c: gimp_canvas_draw_segments():
Do not call gdk_draw_segments() with more than 32000 segments at a
time, because XDrawSegments should never be called with more
segments than that. This should really be fixed at the gdk level,
though.
This fixes bug #122026.
2004-02-02 Sven Neumann <sven@gimp.org>
* libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save_thumb): use
the UTF-encoded URI in error messages, not the filename.
* app/Makefile.am: use $(EXEEXT) for dist-hook binary dependency.
* tools/gimp-remote.c: include <unistd.h> conditionally.
2004-02-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpimagedock.c (gimp_image_dock_constructor):
also destroy the <Image> factory's "Tools" submenu because menu
shortcuts with no or <shift> modifier prevent this key to be
entered in text entries. This really badly baldy cries for
GTK+ 2.4's GtkActions...
2004-02-01 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-path.c (gimp_config_path_expand_only):
when calculating the length of the expanded path, add the length
of the UTF-8 converted substitution, not its length in filesystem
encoding. Finally enables GIMP2_DIRECTORY containing non-ascii
chars (at least on linux). Should fix bug #130118.
2004-02-01 Michael Natterer <mitch@gimp.org>
Disallow to rename the layer mask. Instead, always name the mask
"<layer name> mask". Fixes bug #133112 along with some other
unreported ones.
* app/core/gimpitem.[ch]: added a boolean return value indicating
success to GimpItem::rename().
(gimp_item_real_rename): push an undo step only if the item is
attached.
* app/core/gimplayer.c (gimp_layer_rename): refuse renaming if
the layer is a floating selection floated from a channel
(renaming a layer's floating selection makes a new layer out
of the floating selection).
(gimp_layer_duplicate): use gimp_layer_add_mask() to attach the
mask's duplicate. Fixes mask refcount brokenness for duplicated
layer masks.
(gimp_layer_name_changed): new function. Automatically renames the
layer mask when the layer's name changes.
* app/core/gimplayermask.c (gimp_layer_mask_rename): new function
which refuses renaming.
(gimp_layer_mask_name_changed): skip the unique name voodoo
GimpItem does by not chaining up.
(gimp_layer_mask_set_layer): change the mask's name whenever it is
attached to a layer.
* app/text/gimptextlayer.c (gimp_text_layer_rename): fiddle with
text_layer->auto_rename only if renaming was successful.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_name_edited):
restore the old name if renaming failed.
* tools/pdbgen/pdb/drawable.pdb (set_name): return an execution
error if renaming failed.
* app/pdb/drawable_cmds.c: regenerated.
2004-02-01 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_layer): no need to set the layer
mask's offsets, gimp_layer_add_mask() does this for us. Simplified
mask property assignments.
2004-02-01 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.c (plug_ins_init): when removing a
duplicate PDB procedure, also remove it from gimp->load_procs and
gimp->save_procs. Fixes bug #133099.
Some general cleanup like moving variables to local scopes.
2004-01-31 Michael Natterer <mitch@gimp.org>
Use the global <Image> accel_group in all docks except the
toolbox (the latter needs GTK+ 2.4's new menu features).
Addresses bug #119878:
* app/gui/buffers-commands.c
* app/gui/channels-commands.c
* app/gui/data-commands.c
* app/gui/documents-commands.c
* app/gui/drawable-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/plug-in-commands.c
* app/gui/select-commands.c
* app/gui/tool-options-commands.c
* app/gui/tools-commands.c
* app/gui/vectors-commands.c
* app/gui/view-commands.c: changed the various return_if_no_foo()
macros to also accept a GimpDock as user_data.
* app/gui/image-menu.c (image_menu_update): don't update the
display related menu items if they don't exist (see below).
* app/gui/gui.c (gui_display_changed): simplified.
* app/widgets/gimpimagedock.[ch]: create an "<Image>" item_factory
and attach its accel_group to the dock. Destroy all display
related menu items. Destroy the layer stack navigation items
because their default shortcuts interfere with tree and grid view
keybindings. Connect to "image_changed" of the dock's private
context and to "flush" of the image container to update the
item_factory's state.
2004-01-31 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_constructor): g_assert() that
we got the essential construct properties.
2004-01-31 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.[ch]: use gboolean instead of gint
for "alpha_dither" and "remove_dups" in all public and private
functions. Properly prototyped private functions. Minor cleanup.
* app/gui/convert-dialog.c: pass FALSE instead of 0.
* tools/pdbgen/pdb/convert.pdb: ditto. Also cleaned up a bit: use
generated checks and documentation for enums, removed duplicate
check for enum range (spotted by Kevin Cozens).
* app/pdb/convert_cmds.c
* libgimp/gimpconvert_pdb.c: regenerated.
2004-01-30 Michael Natterer <mitch@gimp.org>
* app/widgets/gimptooloptionseditor.[ch]: added the scrolled
window to the GimpToolOptionsEditor struct.
(gimp_tool_options_editor_tool_changed): set the active tool's
help ID on the scrolled window. Fixes bug #132969.
2004-01-29 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell.[ch]: Store the zoom factor as
float, not as a ratio.
* app/display/gimpdisplayshell-scale.[ch]: change the API to
expose the Float instead a weirdly encoded integer. Implement
functions to get a ratio from the scale factor. Implement a set
as presets as discussed on the mailinglist. Changed Zoom->Other
dialog to enable entering a float.
* app/display/gimpdisplayshell-title.c
* app/display/gimpnavigationview.c
* app/gui/image-menu.c
* app/gui/info-window.c
* app/tools/gimpmagnifytool.c: changed accordingly.
* app/core/gimp.[ch]
* app/display/gimpdisplay.[ch]
* app/gui/gui-vtable.c
* app/widgets/widgets-enums.h: Made the various display-creating
functions accept a float for the scale. Introduce a new
GimpZoomType: GIMP_ZOOM_TO. Generally adjust the API to use
floats instead of weird integers.
* app/core/gimp-edit.c
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-callbacks.c
* app/file/file-open.c
* app/gui/image-commands.c
* app/gui/view-commands.[ch]
* tools/pdbgen/pdb/display.pdb
* app/widgets/gimpimageview.c
* app/widgets/gimptoolbox-dnd.c: changed accordingly
* app/pdb/display_cmds.c: regenerated
2004-01-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: removed the last artefact of context
signal handling from 1.2:
GimpContext used to connect to e.g. the current brush's
"invalidate_preview" and "name_changed" signals and emitted
"brush_changed" when the callback was invoked. This was needed to
make 1.2 work, but is conceptually broken with the real model <->
view approach implemented in the current code.
This change also optimizes things quite a bit because lots of
signal emissions are saved.
Added utility function which finds a container's current object
after a freeze/thaw.
* app/widgets/gimpcontainerview.[ch]: added new virtual function
GimpContainerView::rename_item(). Connect to "name_changed" of the
corrent container's children and invoke rename_item() accordingly.
* app/widgets/gimpcontainertreeview.[ch]: removed name_changed
handler and implement GimpContainerView::rename_item().
* app/widgets/gimpcontainergridview.c: ditto. the grid view was
still relying on the removed GimpContext behaviour for updating
the label showing the sleected item's name.
2004-01-29 Michael Natterer <mitch@gimp.org>
GimpData code review:
* app/core/gimpdata.c (gimp_data_init): default to
writable = FALSE and dirty = TRUE.
* app/core/gimpbrushgenerated.[ch]: added "const gchar *name" to
gimp_brush_generated_new().
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: set all standard datas to clean and
internal, check for g_path_is_absolute() in all load functions,
pass the data's name as construct property to g_object_new()
instead of calling gimp_object_set_name() after creation, fixed
some UTF-8 handling, spacing, indentation, coding style, general
cleanup.
2004-01-29 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c
* app/tools/gimpinkoptions.c
* app/tools/gimplevelstool.c: removed explicit grabs. The pointer
is already implicitely grabbed while the button is pressed.
2004-01-28 Michael Natterer <mitch@gimp.org>
Added infrastructure to make sure we don't write to the global
brush, pattern etc. directories. Needed to make this configurable
because we can't rely on the global directories being read-only,
having certain names or being otherwise detectable at runtime in a
sane way. Fixes bug #132214.
* libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to
the GimpDataFileData struct so callbacks don't need to call
g_path_get_dirname() for each file.
* libgimpwidgets/gimpfileentry.c: made it work with non UTF-8
encoded filenames.
* libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for
setting/getting a second "writable_path". The widget makes sure
that the writable_path is always a subset of the path.
* app/config/gimpconfig-utils.[ch]: added new function
gimp_config_build_writable_path().
* app/config/gimpcoreconfig.[ch]: added separate properties for
the writable brush, pattern, gradient, palette and font paths.
* app/config/gimprc-blurbs.h: added (still empty) blurbs for the
new properties.
* app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter
"gboolean writable". Set data->writable to FALSE by default. If
"writable" is passed as TRUE, still check if we can write to the
file before setting data->writable to TRUE.
(gimp_data_create_filename): changed "data_path" parameter to
"dest_dir" and assume dest_dir is writable.
(gimp_data_duplicate): set data->dirty to TRUE to make sure
duplicated things will be saved.
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: don't set the data's filename and don't
touch data->dirty in the _load() functions because that's done by
the data factory now. Don't touch data->dirty in the _duplicate()
functions because that's done by gimp_data_duplicate() itself now.
* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added
"writable_property_name" and remember it.
Added utility function gimp_data_factory_get_save_dir() which
determines the directory to save new datas to.
Added public function gimp_data_factory_data_save_single() which
saves a single data object.
Make sure new things get saved to the first writable directory
as specified in preferences.
* app/core/gimp.c (gimp_real_initialize): pass the writable_paths'
property names to gimp_data_factory_new().
* app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use
gimp_data_factory_data_save_single() instead of implementing
saving here.
* app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new):
added "const gchar *writable_property_name" parameter (can be
NULL).
Added the needed callbacks to handle the writable_path and made
the path_editor and file_entry code aware of non UTF-8 filename
encodings. Some general cleanup.
* app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-path.c (gimp_config_path_expand): return
early if gimp_config_path_expand_only() fails.
2004-01-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimphelp-ids.h: updated help IDs for new/reordered
pages in the prefs dialog.
* app/gui/preferences-dialog.c (prefs_dialog_new): changed
accordingly.
2004-01-27 Manish Singh <yosh@gimp.org>
* app/paint-funcs/paint-funcs.c: inlined rotate_pointers, changed
prototypes and casts around so that we're compliant with C99 aliasing
rules.
2004-01-27 Manish Singh <yosh@gimp.org>
* app/composite/gimp-composite-generic.c
(gimp_composite_overlay_any_any_any_generic)
* app/paint-funcs/paint-funcs-generic.h (overlay_pixels): use more
than one temporary when stacking INT_MULTs, to avoid undefined
values.
2004-01-27 Manish Singh <yosh@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_interpolate): Use a real
GimpVector2 for vector operations, instead of stuffing everything
into a GimpCoords. C99 aliasing fix.
2004-01-28 Simon Budig <simon@gimp.org>
Argh, this is getting silly.
* app/core/gimpscanconvert.c: Fix dumb bug I introduced
while fixing bug #132036. Instead of always closing a
polyline to the first point of the vpath close to the
first point of the current polyline
I'll close#132036 for the third time now, feel free to
reopen it when bugs appear...
2004-01-27 Michael Natterer <mitch@gimp.org>
* app/gui/layers-commands.c (layers_add_mask_query): use the
new GIMP_STOCK_LAYER_MASK icon for "Add Layer Mask" dialog.
2004-01-27 Michael Natterer <mitch@gimp.org>
Re-enabled filling the whole selection using the bucket fill
tool. Fixes bug #132649.
* app/tools/gimpbucketfilloptions.[ch]: added boolean property
"fill-selection" and a GUI for it.
* app/tools/gimpbucketfilltool.c: changed accordingly.
2004-01-27 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c (image_menu_entries)
* app/gui/layers-menu.c (layers_menu_entries): use the new
GIMP_STOCK_LAYER_MASK icons for "Add Layer Mask".
2004-01-27 Michael Natterer <mitch@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-channel-indexed-16.png
* themes/Default/images/stock-channel-indexed-24.png
* themes/Default/images/stock-channel-indexed-32.png
* themes/Default/images/stock-channel-indexed-48.png
* libgimpwidgets/gimpstock.[ch]: added placeholders for an INDEXED
channel icon (copied from the GRAY channel icon). To be replaced...
* app/widgets/gimppreviewrendererimage.c: use
GIMP_STOCK_CHANNEL_INDEXED instead of GIMP_STOCK_QUESTION for the
indexed channel.
2004-01-27 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): added '%P' which expands to the
PDB id of the active drawable. Moved local variables to local
scopes where they are needed.
* app/config/gimpconfig-dump.c: document it.
2004-01-27 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.c: some cleanup.
(gimp_display_shell_bucket_fill): don't use the bucket fill
options but behave like "Edit -> Fill" and fill with NORMAL/100%.
Fixes bug #132596.
2004-01-27 Michael Natterer <mitch@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-layer-mask-16.png
* themes/Default/images/stock-layer-mask-24.png
* themes/Default/images/stock-layer-mask-32.png
* themes/Default/images/stock-layer-mask-48.png
* themes/Default/images/stock-selection-border-16.png
* libgimpwidgets/gimpstock.[ch]: added forgotten layer mask and
new "border selection" icons from Jimmac (-32 and -48 ones to be
updated, they are currently copies of the channel icons).
* app/core/gimplayermask.c (gimp_layer_mask_class_init)
* app/gui/image-menu.c (image_menu_entries): use them.
2004-01-26 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c (image_menu_entries): use
GIMP_STOCK_FLOATING_SELECTION for "Select->Float".
(image_menu_update): set "Layer->Merge Down" insensitive for the
bottom layer.
2004-01-26 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.c: use the modern libart way
to uncross/rewind a libart SVP. This time really fixes
bug #132036 (please test it though...).
2004-01-26 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.c: don't draw the
outbounds selection when the selection is hidden (bug #132595).
2004-01-26 Sven Neumann <sven@gimp.org>
* app/text/gimptext-xlfd.c (gimp_text_font_size_from_xlfd):
account for the fact that XLFD stores point sizes in decipoints.
* app/text/gimptext-vectors.c: s/TEXT_DEBUG/GIMP_TEXT_DEBUG/
2004-01-26 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c
* app/widgets/gimphistogramview.c: use dark_gc instead of
text_aa_gc to draw the histogram and curves grid lines. dark_gc is
slightly lighter, looks better and fixes bug #132565.
2004-01-26 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/unsharp-mask.scm: add the layer to
the image before pasting to it. Fixes bug #132504.
Fixed the underlying problem: make it impossible to attach
floating selections to drawables which are not currently part of
the image's layer or channel stacks.
Also cleaned up image <-> floating_sel interaction:
* app/core/gimplayer-floating-sel.[ch] (floating_sel_attach):
added assertion that the drawable is part of the image (see below).
Don't call gimp_image_floating_selection_changed(), it's emitted
by gimp_image_add_layer() now.
(floating_sel_remove)
(floating_sel_anchor): don't emit "floating_selection_changed",
it's emitted by gimp_image_remove_layer() now.
(floating_sel_anchor): removed the fix for bug #132162 because
gimp_image_remove_layer() behaves correctly now (see below).
Renamed floating_sel_reset() to floating_sel_activate_drawable().
Added g_return_if_fail() all over the place.
* app/core/gimpimage.[ch]: added new function gimp_image_owns_item()
which return TRUE if the passed item is part of the image.
(gimp_image_add_layer): emit "floating_selection_changed" here if
needed.
(gimp_image_remove_layer): emit "floating_selection_changed" if
needed, don't try to activate a layer if we called
floating_sel_activate_drawable().
This is the real fix for bug #132162.
* app/core/gimpimage-undo-push.c (undo_pop_layer): apply the same
fixes as to gimp_image_add,remove_layer(). Don't call
gimp_drawable_invalidate_preview() on the previously active layer
because that's done by gimp_image_set_active_layer() now.
* app/xcf/xcf-load.c: remember the "floating_sel_drawable" in the
XcfInfo struct and attach it *after* all layers and channels are
loaded to avoid attaching the floating selection to an
out-of-image drawable.
* app/core/gimp-edit.c (gimp_edit_paste)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine,
gimp_drawable_transform_flip, gimp_drawable_transform_rotate)
* app/core/gimpselection.c (gimp_selection_float)
* app/text/gimptext-compat.c (text_render): added checks for
gimp_image_owns_item() in all functions which can produce
floating selections.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/text_tool.pdb
* tools/pdbgen/pdb/transform_tools.pdb: added checks for
gimp_item_owns_image() and return an execution error if invoked
with a drawable which is not part of the image.
* app/pdb/edit_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-26 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-save.c (xcf_save_channel): store the correct offset
of the floating selection's drawable. This bug has been around
since 1.2 (!!!) and made it impossible to save images correctly
where the floating selection's drawable was a channel or layer
mask.
2004-01-26 Manish Singh <yosh@gimp.org>
* app/core/gimpdrawable-blend.c (gradient_fill_region): use memcpy
instead of casted assignment for storing HSV values in rbd.fg/bg,
for C99 aliasing compliance.
* app/xcf/xcf-load.c (xcf_load_layer_mask): use a GimpChannel *
explictly for xcf_load_channel_props, for the above reason.
* app/xcf/xcf-save.c (xcf_save_prop): use a temporary guint32 for
saving property types, for the above reason.
* app/core/gimpparasitelist.c (gimp_parasite_list_deserialize): plug
a memory leak, since data is copied on parasite creation.
2004-01-26 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: do nothing in _button_press when
the tool is in the VECTORS_FINISHED state.
Fixes bug #132508.