2007-05-02 Martin Nordholts <martinn@svn.gnome.org>
When adjusting a rectangle it feels unintuitive that the center of
the rectangle when Ctrl is used lands on the corner that was used
to resize the rectangle. This commit changes the center of the
rectangle when Ctrl is used on a already-created rectangle to the
center of the rectangle when the user starts adjusting the size.
* app/tools/gimprectangletool.c (struct
_GimpRectangleToolPrivate): Added center_[xy]_on_fixed_center
members that keeps track on where the center of the rectangle
should be when the Ctrl modifier is used.
* app/tools/gimprectangletool.c: Added convenience function
gimp_rectangle_tool_get_fixed_center_coords.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_button_press): Sets the
center_[xy]_on_fixed_center members depending on whether the button
press modifies an existing rectangle or creates a new one.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_active_modifier_key): Adjusted to accomodate to
above mentioned changes.
svn path=/trunk/; revision=22374
2007-04-30 Michael Natterer <mitch@gimp.org>
* app/core/gimpselection.[ch] (gimp_selection_extract): changed
"drawable" parameter to "pickable" and added some special casing
for the GIMP_IS_DRAWABLE(pickable) case in the implementation.
* app/core/gimpdrawable-transform.c: changed accordingly.
* app/core/gimp-edit.c: ditto. Removed utility function
gimp_edit_extract_visible() and simply use gimp_edit_extract() for
"copy visible", passing image->projection. Fixes bug #434102.
svn path=/trunk/; revision=22368
2007-04-27 Sven Neumann <sven@gimp.org>
* app/core/gimppickable.[ch]: added get_pixel_at() method to the
GimpPickable interface. This gives direct access to the pixel
without converting it to an RGB color.
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: implement the new method and also use
it to reimplement get_color_at().
* app/core/gimpimage-crop.c (gimp_image_crop_guess_bgcolor): use
gimp_pickable_get_pixel_at(). Fixes auto-shrink on indexed and
grayscale images.
svn path=/trunk/; revision=22359
2007-04-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: renamed GimpParamSpecString's
flag "no_validate" to "allow_non_utf8".
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/*.pdb: renamed argument flag
"no_validate" (which turns off utf8-validation for strings) to
"allow_non_utf8" and renamed "no_success" (which turns off
argument validation alltogether) to "no_validate".
Doesn't affect generated code.
svn path=/trunk/; revision=22350
2007-04-26 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/display.pdb (diplay_is_valid)
* tools/pdbgen/pdb/drawable.pdb (drawable_is_valid)
* tools/pdbgen/pdb/image.pdb (image_is_valid)
* tools/pdbgen/pdb/vectors.pdb (vectors_is_valid): it's the
argument flag "no_success" which turns off validation, not
"no_validate" (how obvious). Also fixed drawable and vectors
procedures to check for !gimp_item_is_removed() instead of
gimp_item_is_attached() (a newly created item is unattached
but valid).
* app/pdb/display_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* app/pdb/vectors_cmds.c: regenerated.
svn path=/trunk/; revision=22349
2007-04-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.c (gimp_param_string_validate): added
#warning to use GParamSpecString's features once we depend on a
fixed version.
svn path=/trunk/; revision=22330
2007-04-25 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.c (convolve_region): round pixel values
instead if just casting the float to an integer. Fixes bug #432978.
svn path=/trunk/; revision=22322
2007-04-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpscrolledpreview.c: also use the middle mouse
button for panning.
* plug-ins/common/nova.c: override the default mouse handling of
the GimpScrolledPreview and allow to reposition the center using
the left mouse button. Fixes bug #364432.
* app/tools/gimprectangletool.c: formatting.
svn path=/trunk/; revision=22319
2007-04-24 Sven Neumann <sven@gimp.org>
* app/config/Makefile.am: fiddle with test_config_LDFLAGS to make
test-config link again.
svn path=/trunk/; revision=22309
2007-04-24 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.[ch]: use GQuark for locale and
help domains to avoid duplicating the same strings many times.
* app/plug-in/gimppluginmanager-restore.c: removed FIXME.
svn path=/trunk/; revision=22304
2007-04-24 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginmanager-restore.c
(gimp_plug_in_manager_restore): set the default plug-in locale
domain on all GimpPlugInDefs which don't register a locale domain
themselves. Fixes bug #430146.
svn path=/trunk/; revision=22303
2007-04-21 Sven Neumann <sven@gimp.org>
* app/widgets/dbus-service.xml
* app/widgets/gimpdbusservice.[ch]: use "uri" instead of
"filename"
in the D-Bus methods.
svn path=/trunk/; revision=22298
2007-04-18 Sven Neumann <sven@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/gimppluginmanager.[ch]
* app/plug-in/gimppluginmanager-restore.[ch]: moved
gimp_plug_in_manager_restore() to it's own file.
* app/core/gimp.c: changed accordingly.
* app/Makefile.am (LDFLAGS): convince the linker to do its job.
svn path=/trunk/; revision=22286
2007-04-18 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore):
try to improve readability by moving code to helper functions.
svn path=/trunk/; revision=22283
2007-04-18 Sven Neumann <sven@gimp.org>
* app/plug-in/gimpinterpreterdb.[ch]: added a function that
returns all file extensions registered in the interpreter db.
* app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore):
if the PATHEXT environment variable is set, append all registered
file extensions to it. This way GIMP can recognize Python scripts
as plug-ins on platforms where the executable bit is unknown.
svn path=/trunk/; revision=22282
2007-04-17 Sven Neumann <sven@gimp.org>
Allow other applications to open images in GIMP as if they were
new images (without associating a filename). Fixes bug #423118.
* app/file/file-open.[ch]: added parameter 'as_new' to
file_open_image() and its variants.
* app/actions/data-commands.c
* app/actions/documents-commands.c
* app/actions/file-commands.c
* app/core/gimpimagefile.c
* app/dialogs/file-open-dialog.c
* app/dialogs/file-open-location-dialog.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptoolbox-dnd.c: changed accordingly.
* app/app.[ch]
* app/main.c: added new command-line option '--as-new'.
* app/widgets/gimpdbusservice.[ch]
* app/widgets/dbus-service.xml: added new method "OpenAsNew" to the
D-Bus interface.
* docs/gimp.1.in: document the new command-line option.
svn path=/trunk/; revision=22264
2007-04-17 Michael Natterer <mitch@gimp.org>
* app/config/gimprc.c
* app/plug-in/gimppluginmanager.c
* app/plug-in/gimpplugin.c
* app/gui/themes.c: don't translate --verbose or g_printerr()
messages, they are debugging output that often end up in bugzilla
and should not depend on the locale.
svn path=/trunk/; revision=22262
2007-04-16 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcellrendereraccel.[ch]: remove GimpCellRenererAccel.
* app/widgets/gimpactionview.c: use GtkCellRendererAccel instead.
If an action has no label, use its name as label. Always show the
"Name" column because there are too many actions with confusingly
similar names.
svn path=/trunk/; revision=22256
2007-04-13 Michael Natterer <mitch@gimp.org>
* app/base/base-types.h
* app/base/temp-buf.[ch]: remove redundant and inconsistently used
MaskBuf type and API.
* app/core/gimpbrush-scale.c
* app/paint/gimpbrushcore.[ch]: use TempBuf and its API instead.
This also optimizes away a useless memset() on brush scaling,
we completely fill each of the created buffers anyway.
svn path=/trunk/; revision=22249
2007-04-12 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleselecttool.c: implement
GimpTool::key_press and delegate to the rectangle tool or the
edit
selection tool. This resurrects positioning of floating
selections
with the cursor keys.
svn path=/trunk/; revision=22244
2007-04-12 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/display.pdb (display_delete): added a note that
calling this function may cause data loss.
* app/pdb/display_cmds.c
* libgimp/gimpdisplay_pdb.c: regenerated.
svn path=/trunk/; revision=22243
2007-04-12 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-commands.c: if a plug-in or script
registered with a DISPLAY argument after the run-mode argument,
then pass the ID of the active display to the script, optionally
followed by image and drawable IDs.
* plug-ins/script-fu/scheme-wrapper.c
* plug-ins/script-fu/script-fu-enums.h
* plug-ins/script-fu/script-fu-interface.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-types.h: added SF-DISPLAY parameter.
svn path=/trunk/; revision=22241
2007-04-11 Mukund Sivaraman <muks@mukund.org>
* app/display/gimpstatusbar.c: Fixes a bug (#428493) where
gimp_statusbar_push_temp() expects vaargs and
gimp_statusbar_progress_message() directly passes a message
to it as the format string.. in this case the message
contains % (in the filename) and no arguments.
svn path=/trunk/; revision=22231
2007-04-01 Michael Natterer <mitch@gimp.org>
* app/base/Makefile.am
* app/base/brush-scale.[ch]: removed these files.
* app/core/Makefile.am
* app/core/gimpbrush-scale.[ch]: added the functions here as
static utility functions. Also move the default implementations of
GimpBrush::scale_size(), ::scale_mask() and ::scale_pixmap() here,
including their utility functions.
* app/core/gimpbrush.c: remove all scale stuff and
include "gimpbrush-scale.h" instead.
(gimp_brush_get_new_preview): use GimpBrush's scale functions
instead of the now private ones. Cleanup.
(gimp_brush_scale_mask)
(gimp_brush_scale_pixmap): return a copy of the buf for
scale == 1.0.
svn path=/trunk/; revision=22213
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleoptions.[ch]: made the
GimpRectangleOptionsPrivate struct public (ha ha).
(gimp_rectangle_options_gui): replaced the "Auto shrink selection"
toggle by a normal button that needs to be clicked explicitely.
* app/tools/gimprectangletool.c: access members of
GimpRectangleOptionsPrivate directly instead of reading them into
local variables using g_object_get(), this makes the code quite
more readable. Some code cleanup.
(gimp_rectangle_tool_button_release): get rid of the confusing
auto-shrink madness on button release...
(gimp_rectangle_tool_start)
(gimp_rectangle_tool_halt): ...instead, connect to the option's
auto shrink button and shrink on "clicked".
svn path=/trunk/; revision=22209
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleselecttool.c: read the "operation" member
of GimpSelectionOptions directly.
* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
chain up instead of calling gimp_rectangle_tool_draw() directly,
don't #include "gimprectantletool.h".
svn path=/trunk/; revision=22208
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcroptool.c: access the GimpCropOptions structure
directly to read the "layer_only" option (don't use g_object_get),
some code cleanup.
svn path=/trunk/; revision=22207
2007-03-31 Michael Natterer <mitch@gimp.org>
Statusbar messages shouldn't depend on the emission of unrelated
signals:
* app/widgets/gimpuimanager.c (gimp_ui_manager_connect_proxy):
connect to the menu items' "select" and "deselect" signals here...
(gimp_ui_manager_item_realize): ...instead of here.
svn path=/trunk/; revision=22206
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/actions/dialogs-actions.c
* app/actions/dock-actions.c
* app/actions/edit-actions.c
* app/actions/file-actions.c
* app/actions/help-actions.c
* app/actions/layers-actions.c
* app/actions/plug-in-actions.c
* app/actions/tools-actions.c
* app/actions/vectors-actions.c
* app/actions/view-actions.c
* app/actions/window-actions.c: add many missing action tooltips
and fixed some broken/inconsistent ones. Sorry for the big string
change but the inconsistenties were just too big to ship 2.4 like
that.
svn path=/trunk/; revision=22204
2007-03-30 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.c: hardcode the result of
log (1.0 / 255.0) and avoid a useless call to sqrt().
svn path=/trunk/; revision=22201
2007-03-30 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw_guides):
hardcode the result of sqrt(5).
svn path=/trunk/; revision=22196
2007-03-29 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_check_click_distance): don't
compare the result of sqrt() with something, compare the original
value with something's square instead.
svn path=/trunk/; revision=22195
2007-03-29 Sven Neumann <sven@gimp.org>
* app/core/gimpbrushgenerated.c (gimp_brush_generated_calc): moved
generation of the lookup table to it's own function. Also changed
SUPERSAMPLING from 5 to 4. Let's see if someone complains...
svn path=/trunk/; revision=22193
2007-03-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdbusservice.[ch]
* app/widgets/dbus-service.xml: added a boolean return value to
the D-Bus Open method.
svn path=/trunk/; revision=22182
2007-03-27 Sven Neumann <sven@gimp.org>
* app/file/file-open.[ch]: changed file_open_from_command_line()
to deal with a single filename only.
* app/widgets/gimpdbusservice.[ch]
* app/widgets/dbus-service.xml: changed the D-Bus Open method to
take only a single filename.
* app/app.c
* app/main.c: changed accordingly.
svn path=/trunk/; revision=22181
2007-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/dbus-service.xml
* app/widgets/gimpdbusservice.h: be more specific in the D-Bus
service and interface name.
svn path=/trunk/; revision=22171
2007-03-23 Sven Neumann <sven@gimp.org>
Make XOR color configurable (bug #421466):
* app/config/gimprc-blurbs.h
* app/config/gimpdisplayconfig.[ch]: added gimprc option for the
XOR color.
* app/display/gimpcanvas.[ch]: keep a reference to the Gimp object
and take the XOR color from GimpDisplayConfig.
* app/display/gimpdisplayshell.c: pass gimp to gimp_canvas_new().
svn path=/trunk/; revision=22164
2007-03-22 Sven Neumann <sven@gimp.org>
* app/core/gimplayer.c (gimp_layer_add_mask): allow adding a mask
to a layer without alpha channel (bug #316207).
svn path=/trunk/; revision=22163
2007-03-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-preview.c
(gimp_display_shell_trace_tri_edge): be more robust to avoid
crashes like bug #420595.
svn path=/trunk/; revision=22155
2007-03-20 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcursorview.[ch] (gimp_color_frame_update_cursor):
disallow passing a NULL image.
(gimp_color_frame_clear_cursor): new function that clears the
cursor view.
* app/widgets/gimpcolorframe.c (gimp_color_frame_update): if
color_frame->sample_valid is FALSE, don't do any color
transformations and don't construct any string because none
of them is going to be used (all labels will show "n/a").
* app/display/gimpstatusbar.[ch]: renamed set_cursor() API
to update_cursor().
* app/display/gimpdisplayshell-cursor.c
(gimp_display_shell_update_cursor): move variables to local
scopes. Follow GimpStatusbar API change. Cleanup.
(gimp_display_shell_clear_cursor): ditto. Follow GimpColorFrame
API change.
svn path=/trunk/; revision=22153
2007-03-19 Michael Natterer <mitch@gimp.org>
* app/actions/plug-in-actions.c
* app/menus/plug-in-menus.c: GimpPlugInProcedure has a boolean
member "file_proc" now, use it instead of checking prefixes,
extensions and magics manually.
* app/plug-in/gimppluginprocedure.c
(gimp_plug_in_procedure_set_mime_type)
(gimp_plug_in_procedure_set_thumb_loader): set
plug_in_proc->file_proc to TRUE here too.
* plug-ins/common/pnm.c: register "image/x-portable-anymap" as
mime-type and "pnm" as extension for file-pnm-save so it's
recognized as file procedure.
svn path=/trunk/; revision=22152
2007-03-19 Michael Natterer <mitch@gimp.org>
Make sure we create actions for all plug-in procedures which have
a menu_label, so it's possible to assign shortcuts to them.
Fixes bug #371300.
* app/actions/plug-in-actions.c (plug_in_actions_setup): removed
duplicate code and simply call plug_in_actions_register_procedure()
on all actions, it already does all needed checks and signal
connections by itself.
(plug_in_actions_update)
(plug_in_actions_register_procedure)
(plug_in_actions_unregister_procedure): unified checks for whether
a plug-in procedure needs an action or not: it needs either a
menu_label or menu_paths and must not have extensions, prefixes or
magics.
* libgimp/gimp.c (gimp_install_procedure): document that it's
possible to install shortcut-only procedures by registering a
menu_label but no menu_paths.
svn path=/trunk/; revision=22147
2007-03-18 Michael Natterer <mitch@gimp.org>
* app/paint/gimpbrushcore.c: simplified brush scale calculation by
making sure that brush_core->scale always contains a value that's
suited as input for gimp_brush_scale_mask/pixmap() (bug #419290).
(gimp_brush_core_calc_brush_size): removed this function. All
places can now call gimp_brush_scale_size() directly with
core->scale as parameter.
(gimp_brush_core_calc_brush_scale): new function which returns
a linear scale factor which contains both the area-based pressure
scale factor and the linear paint options scale factor.
(gimp_brush_core_start)
(gimp_brush_core_get_paint_area): use the new function instead
of doing these calculations manually.
(gimp_brush_core_interpolate): remove call to
gimp_brush_core_scale_brush_size() and use core->scale directly.
(gimp_brush_core_get_paint_area)
(gimp_brush_core_scale_mask)
(gimp_brush_core_scale_pixmap): use gimp_brush_scale_size()
instead of the removed gimp_brush_core_scale_brush_size().
(gimp_brush_core_create_bound_segs): use only
paint_options->brush_scale here since the canvas brush preview
always has to asume full pressure.
* app/core/gimpbrush.c (gimp_brush_scale_size): special case
scale == 1.0 and return the mask's width/height without calling
the virtual function.
svn path=/trunk/; revision=22141
2007-03-18 Michael Natterer <mitch@gimp.org>
* app/file/file-utils.c (file_check_single_magic): jikes, the
offset is to be interpreted as offset from the start of the file
for offset >= 0, not offset > 0.
svn path=/trunk/; revision=22140
2007-03-17 Michael Natterer <mitch@gimp.org>
* app/file/file-utils.c (file_check_single_magic): alow negative
offsets in magics and interpret them as relative to the end of the
file.
(file_utils_find_proc)
(file_check_magic_list): some cleanup.
* plug-ins/common/tga.c (query): register the magic string
"TRUEVISION-XFILE.\0" 18 bytes before the end of the file.
This way, "new style" TGA files are detected regardless of
their filename. "old style" TGA files still need the right
extension to be treated as TGA. Added "vda", "icb" and "vst"
to the list of extensions. Fixes bug #133798.
svn path=/trunk/; revision=22138
2007-03-17 Michael Natterer <mitch@gimp.org>
Make the height of the previews in data editors configurable.
Fixes bug #337757.
* app/widgets/gimpdataeditor.[ch]: add member "view" which needs
to be set by subclasses. Add style property "minimal-height" which
defaults to 96. Add style_set() implementation which sets
editor->view's height to the configured value.
* app/widgets/gimpbrusheditor.[ch]
* app/widgets/gimpgradienteditor.[ch]
* app/widgets/gimppaletteeditor.[ch]: use data_editor->view for
storing the view widget and removed own view members. Remove
separate #defines for the view's default width and height, it's
width follows the dialog anyway.
* themes/Default/gtkrc: document the default value of 96.
* themes/Small/gtkrc: set it to 64.
svn path=/trunk/; revision=22137
2007-03-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c (gimp_vector_tool_register):
register the tool with GIMP_PAINT_OPTIONS_CONTEXT_MASK and
GIMP_CONTEXT_GRADIENT_MASK so its tool options are suited
as parameter object for stroking (the stroke button in the
tool options was using default values before).
svn path=/trunk/; revision=22135
2007-03-16 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_get_return_vals): don't just g_free() the
GValueArray after we memcpy()-stole its values because this both
leaks the contained array of GValues and crashes with glib trunk
where GValueArray is slice-allocated. Instead, free the array of
GValues manually, set it to NULL and use g_value_array_free().
svn path=/trunk/; revision=22134
2007-03-16 Michael Natterer <mitch@gimp.org>
Fix stuck progress bars (bug #393832):
* app/plug-in/gimpplugin-progress.[ch] (gimp_plug_in_progress_end):
added PlugInProcFrame parameter instead of blindly using the topmost
in the procedure stack...
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_dispose): ...because we call it from here,
when the proc_frame is already removed from the procedure stack.
Unrelated:
* plug-ins/script-fu/scripts/difference-clouds.scm: use
RUN-INTERACTVE instead of 0, added (gimp-displays-flush)
* plug-ins/common/snoise.c (solid_noide): update the progress to
1.0 after rendering.
svn path=/trunk/; revision=22131
2007-03-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimpaligntool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimppainttool.c
* app/tools/gimpvectortool.c: remove gimp_tool_pop_status() from
control() implementations because GimpTool does this generically now.
* app/tools/gimpblendtool.c
* app/tools/gimpselectiontool.c: remove entire control()
implementations because they were doing nothing else.
svn path=/trunk/; revision=22128
2007-03-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): "adj"
is a GtkObject not a GtkWidget, also moved it to its local scope.
svn path=/trunk/; revision=22127
2007-03-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_halt): check
if tool->display is there before dereferencing it (bug #418504).
(gimp_rectangle_tool_start): add "display" parameter and set
tool->display here.
(gimp_rectangle_tool_button_press): pass the display to start()
and don't set tool->display here.
svn path=/trunk/; revision=22125
2007-03-14 Michael Natterer <mitch@gimp.org>
Make the status display stuff local to GimpTool:
* app/tools/tool_manager.c (tool_manager_control_active): don't
call gimp_tool_clear_status().
* app/tools/gimptool.[ch]: make gimp_tool_clear_status() a
private function. Move call to gimp_tool_clear_status() from
real_control() to control(). Check the status_displays too in
gimp_tool_real_has_display() and gimp_tool_has_image() so the
normal mechanism of control(HALT)ing (and thus popping all
status messages) the tool on display close works.
svn path=/trunk/; revision=22124
2007-03-14 Michael Natterer <mitch@gimp.org>
Fix stuck statusbar messages when changing tools (bug #398913):
* app/tools/gimptool.[ch]: keep a list of status_displays around.
Update the list in all status push, replace and pop functions.
Added gimp_tool_clear_status() which removes the status messages
from all displays in the list. Call the function from
gimp_tool_real_control(HALT).
* app/tools/tool_manager.c (tool_manager_control_active): if we
can't call gimp_tool_control() because we have no display to pass,
still call gimp_tool_clear_status() so the messages go away from
displays the tool was only hovering.
svn path=/trunk/; revision=22123
2007-03-14 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimpplugin.c (gimp_plug_in_new): require either
"procedure" or "prog" being non-NULL, not both of them at the same
time. Get the executable name from the procedure if the procedure
was passed.
* app/plug-in/gimppluginmanager-call.c
(gimp_plug_in_manager_call_run): pass a NULL prog since we already
pass the procedure.
svn path=/trunk/; revision=22122
2007-03-14 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c: sprinkled some const
qualifiers and removed obscure shift code in favor of letting the
compiler do this optimization.
svn path=/trunk/; revision=22121
2007-03-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c: some minor fixes and stylistic
paranoia i overlooked in last night's late review.
svn path=/trunk/; revision=22119
2007-03-14 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]: cache the display scale
factors in the GimpDisplayShell struct and recalculate it in
gimp_display_shell_scale_factor_changed().
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_set_dot_for_dot)
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_resolution_changed_handler)
(gimp_display_shell_monitor_res_notify_handler): update the scale
factors by calling gimp_display_shell_scale_factor_changed().
* app/display/gimpdisplayshell-transform.c
* app/display/gimpnavigationeditor.c: code cleanup.
svn path=/trunk/; revision=22118
2007-03-14 Sven Neumann <sven@gimp.org>
* app/base/brush-scale.c: minor cleanups, moved calculations out
of the MIN() macro, avoid unneeded floating-point calculations.
svn path=/trunk/; revision=22114
2007-03-14 Martin Nordholts <martinn@svn.gnome.org>
Made brushes upscalable by using scale_region. Downscaling still
uses functions in app/base/brush-scale.c (because of better
performance). Parametric brushes of course recalculates masks
instead of using bitmap scaling. Fixes bug #65030.
* app/core/gimpbrush.[ch]: Added a private scale_buf method which
uses scale_region (with GIMP_INTERPOLATION_LINEAR) to scale its
masks and pixmaps. Also added public virtual method scale_size to
GimpBrush (overridden by GimpBrushGenerated) which calculates the
buffer sizes for a given brush scaled with a given scale.
* app/core/gimpbrushgenerated.c: Implemented the new scale_size
method inherited from GimpBrush, and modified
gimp_brush_generated_calc to use this helper function.
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
the brush Scale-slider logarithmic.
* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
Changed Scale scale to [0.0, 10.0].
* app/paint/gimpbrushcore.c:
(gimp_brush_core_calc_brush_size): Refactored 'get brush size' code
to where it belongs, in GimpBrush-classes, and allowed scales
larger than 1.0.
svn path=/trunk/; revision=22113
2007-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: added new ugly function
gimp_dialog_factory_hide_dialog() which does gtk_widget_hide() and
sets the stored visibility state to GIMP_DIALOG_VISIBILITY_INVISIBLE
in order to avoid re-showing dialogs that were already insivible due
to TAB-toggling when we gtk_widget_hided them.
* app/tools/gimptransformtool.c
* app/tools/gimpimagemaptool.c: use the new function instead of
gtk_widget_hide() to hide tool dialogs. Fixes bug #414006.
svn path=/trunk/; revision=22111
2007-03-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmagnifytool.[ch]: lots of fixes and changes:
- Request click events and use them instead of looking at the
distance the mouse travelled ourselves.
- Also zoom when the user draws a very thin rectangle or just a
line, there is no reason to treat that as click.
- Changed all calculations and stored values to double so the tool
continues to work smoothly at high zoom levels.
- Fix scale calculation when zooming out (was totally b0rk).
- Changed offset calculation when zooming out so that the current
viewport ends up within the drawn rectangle (which is the
opposite of what zooming in does).
svn path=/trunk/; revision=22105
2007-03-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/tools/gimppaintoptions-gui.c
* app/base/brush-scale.[ch]
* app/base/temp-buf.[ch]
* app/paint/gimppaintoptions.c
* app/paint/gimpbrushcore.c: revert last commit. The patch needs
more review and it's easier to start from quare one than have
patches on top of patches.
svn path=/trunk/; revision=22101
2007-03-11 Michael Schumacher <schumaml@cvs.gnome.org>
Made brushes scalable (both up and down) by using existing
scaling routines, and also refactored some brush-code. Patch by
Martin Nordholts. Fixes bug #65030.
* app/paint/gimpbrushcore.c:
(gimp_brush_core_calc_brush_length_scale) Refactored 'get brush
size' code to where it belongs, in GimpBrush-classes, and renamed
gimp_brush_core_calc_brush_size to
gimp_brush_core_calc_brush_length_scale.
* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
Changed Scale scale to [0.0, 100.0].
* app/base/temp-buf.[ch] (mask_buf_new): Change signature to also
take a bpp parameter.
* app/base/brush-scale.[ch]: Changed brush_scale_(mask|pixmap) to
the new brush_scale_buf, which uses existing scaling routines
(scale_region) instead of dedicated down-scaling only routines.
* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
the brush Scale-slider logarithmic.
* app/core/gimpbrushgenerated.c: Implemented the new
get_scaled_size method inherited from GimpBrush, and modified
gimp_brush_generated_calc to use this helper function.
* app/core/gimpbrush.[ch]: Added public virtual method
get_scaled_size to GimpBrush, overridden by GimpBrushGenerated,
which calculates the buffer sizes for a given brush scaled with a
given scale. Also changed calls to brush_scale_(mask|pixmap) to
the new brush_scale_buf.
svn path=/trunk/; revision=22099
2007-03-10 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c (gimp_statusbar_update): while the
statusbar is being used as a progress bar, only show progress
messages.
svn path=/trunk/; revision=22096
2007-03-10 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.[ch]: cache the result of
gimp_plug_in_procedure_get_label() and made the return value
const.
* app/actions/plug-in-actions.c
* app/plug-in/gimpplugin-cleanup.c
* app/plug-in/gimppluginmanager.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpfileprocview.c
* app/widgets/gimpimagepropview.c: changed accordingly.
* app/file/file-open.c
* app/file/file-save.c: include the plug-in name (or actually
the
label) in the error messages.
svn path=/trunk/; revision=22095
2007-03-10 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: don't include libgimpmath/gimpmathtypes.h
* app/base/base-types.h: include it here. Also include
libgimpcolor/gimpcolortypes.h
svn path=/trunk/; revision=22094
2007-03-10 Michael Natterer <mitch@gimp.org>
* app/tools/tools-enums.[ch] (enum GimpButtonReleaseType): added
value GIMP_BUTTON_RELEASE_NO_MOTION.
* app/tools/gimptool.[ch]: when click events are requested and the
click was too long for a "click" event, send a NO_MOTION event if
the pointer didn't move at all.
* app/tools/gimpbucketfilltool.c: treat NO_MOTION as tool
confirmation too.
* app/tools/gimpfreeselecttool.c: request click events and treat
both CLICK and NO_MOTION as tool confirmation.
* app/tools/gimprectangletool.c: ignore NO_MOTION.
svn path=/trunk/; revision=22091
2007-03-09 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
instead of "libgimpmath/gimpmath.h".
* app/core/gimpbrush.h
* app/paint/gimppaintcore.h
* app/paint/gimpperspectiveclone.h
* app/text/gimptext.h
* app/tools/gimptransformtool.h: include gimpvector.h and
gimpmatrix.h explicitely where they are needed in public structs.
* app/*/*.c
* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
where needed.
* app/pdb/paths_cmds.c: regenerated.
svn path=/trunk/; revision=22084
2007-03-09 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpblendtool.c (gimp_blend_tool_push_status): make
the new feature visible in the status bar (alas, this implies a
new translatable string).
svn path=/trunk/; revision=22078
2007-03-08 Michael Natterer <mitch@gimp.org>
* app/tools/gimpblendtool.h (struct GimpBlendTool): renamed
members and added last_x and last_y to remember the last mouse
coords.
* app/tools/gimpblendtool.c: changed accordingly. Take drawable
offset into account in button_release() and remove offset
calculations from all other places. Enabled using ALT for moving
the entire line.
svn path=/trunk/; revision=22077
2007-03-08 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.c (pixel_surround_get_data): do one less
call to tile_manager_get_tile().
svn path=/trunk/; revision=22076
2007-03-08 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbucketfilltool.[ch]: request click events, removed
target_x,y struct members and button_press() implementation and
use the coords passed in button_release(). Also make sure that
a click has no effect in areas where we show the bad corsor.
svn path=/trunk/; revision=22075
2007-03-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpperspectivetool.c
* app/tools/gimpscaletool.c
* app/tools/gimprotatetool.c
* app/tools/gimpfliptool.c
* app/tools/gimpsheartool.c
* app/tools/gimptransformtool.[ch]: removed shell_desc member
from
GimpTransformToolClass and just use the tool blurb instead.
svn path=/trunk/; revision=22067
2007-03-07 Sven Neumann <sven@gimp.org>
* app/tools/gimpvectoroptions.c (gimp_vector_options_gui):
describe
usage of modifiers as suggested in bug #415796.
svn path=/trunk/; revision=22065
2007-03-07 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.c (pixel_surround_lock): reduced number
of calls to tile_manager_get_tile().
svn path=/trunk/; revision=22064
2007-03-07 Michael Natterer <mitch@gimp.org>
Clean up fix for bug #328001:
* app/tools/gimpeditselectiontool.[ch] (process_event_queue_keys):
made private again.
(gimp_edit_selection_tool_translate): new function which has an
additional GimpTransformType parameter to determine what transform
to perform. Do all the work here, ignoring the key event's
modifier state.
(gimp_edit_selection_tool_key_press): just determine the transform
type from the key event's modifier state and call
gimp_edit_selection_tool_translate().
* app/tools/gimpmovetool.c (gimp_move_tool_key_press): removed all
code and call gimp_edit_selection_tool_translate() with
options->move_type. Moved the function to its proper place in the
file.
svn path=/trunk/; revision=22063
2007-03-07 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.c: keep an internal buffer filled with
the background color and use it for out of bounds requests.
Speed
up filling the internal buffer by copying data row-by-row.
svn path=/trunk/; revision=22062
2007-03-06 Sven Neumann <sven@gimp.org>
Patch by Martin Nordholts. Fixes bug #328001.
* app/tools/gimpeditselectiontool.[ch]
(process_event_queue_keys):
Made process_event_queue_keys public for use of gimpmovetool.c.
Still needs to be renamed and moved to another place.
* app/tools/gimpmovetool.c (gimp_move_tool_key_press): Created
gimp_move_tool_key_press() which takes care of events that
gimp_edit_selection_tool_key_press() is not is able to
handle. Otherwise just pass key events on to that method.
svn path=/trunk/; revision=22058
2007-03-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_execute): if the user clicks inside an
existing selection, initialize the rectangle tool to the entire
selection, not just to the part of it that is within the active
drawable. Also removed some dead code.
svn path=/trunk/; revision=22049
2007-03-05 Michael Natterer <mitch@gimp.org>
Makes default Select -> Border behaviour consistent, and makes
'sticky image edges' optional by adding a checkbox in the Border
Selection dialog. Patch by Martin Nordholts. Fixes bug #350009.
* app/actions/select-commands.c (select_border_cmd_callback)
(select_border_callback): Added edge-lock checkbox to dialog and
modified calls accordingly.
* app/paint-funcs/paint-funcs.c (border_region)
(compute_transition): Fixed algorithm. (compute_transition is a
helper function to the algorithm). Also clarified many parts of
the algorithm with comments.
* app/paint-funcs/paint-funcs.h
* app/core/gimpchannel.[ch]
* app/core/gimpselection.c: Added gboolean edge_lock to function
calls/signatures.
* app/pdb/selection_cmds.c: Regenerated.
svn path=/trunk/; revision=22047
2007-03-05 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: added typdef GimpMemsizeFunc.
* app/core/gimp-utils.[ch]: added _foreach() variants of
GHashTable, GList and GSList functions which take GimpMemsizeFunc
callbacks. Added gimp_parasite_get_memsize(). Added "data_size"
parameter to gimp_g_hash_table_get_memsize().
* app/core/gimp.c
* app/core/gimppalette.c
* app/core/gimpparasitelist.c
* app/pdb/gimppdb.c
* app/plug-in/gimppluginmanager.c: use the new functions instead
of itering manually or ignoring the containers' elements. Changed
callers of gimp_g_hash_table_get_memsize().
svn path=/trunk/; revision=22046
2007-03-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpobject.c (gimp_object_get_memsize): don't pass
random strings to g_print() without running them through %s.
Fixes crash/warning when the string contains '%'.
svn path=/trunk/; revision=22042
2007-03-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]
* app/display/gimpdisplayshell-scale.c: only change the
remembered
last scale value if the last change occured more than a second
ago.
* app/tools/gimprectangletool.c: fixed compiler warnings.
svn path=/trunk/; revision=22040
2007-03-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-blend.c (gimp_drawable_blend): use
gimp_drawable_bytes_with_alpha() instead of manually adding
alpha to the value returned by gimp_drawable_bytes()
svn path=/trunk/; revision=22037
2007-02-29 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update):
don't suggest Shift when a new point cannot be added to point 0.
svn path=/trunk/; revision=22031
2007-02-28 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpmeasuretool.[ch]: added status bar help messages
explaining the usage of the modifiers.
* app/tools/gimpvectortool.c (gimp_vector_tool_status_update):
suggest Ctrl for edit mode, to close the path or move handles.
* app/tools/gimpcroptool.c (gimp_crop_tool_button_release):
"press enter" should be "press Enter", as in the other tools.
svn path=/trunk/; revision=22030
2007-02-28 Sven Neumann <sven@gimp.org>
* app/tools/gimptool.c (gimp_tool_check_click_distance):
simplified callers and moved calculations out of the SQR() macro.
svn path=/trunk/; revision=22027
2007-02-28 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleselecttool.c
(gimp_rect_select_tool_rectangle_changed): don't change the
selection while the tool is active. Fixes bug #398185. Thanks to
Martin Nordholts for investigating this problem.
* app/tools/gimprectangletool.c: minor cleanup.
svn path=/trunk/; revision=22025
2007-02-28 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_check_click_distance): need to
check the distance in screen coords, not image coords.
* app/tools/gimpmovetool.c (gimp_move_tool_button_release): forgot
two manual checks for GDK_BUTTON3_MASK.
svn path=/trunk/; revision=22024
2007-02-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: clean up last commit a bit. Pass the
recorded button_press_coords to GimpTool::button_release() when a
click was detected.
svn path=/trunk/; revision=22019
2007-02-27 Sven Neumann <sven@gimp.org>
* app/config/gimpcoreconfig.c: increased default value for
"undo-size" to 64 MB.
* app/config/gimpguiconfig.c: increased default value for
'max-new-image-size' to 128 MB.
svn path=/trunk/; revision=22017
2007-02-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimptoolcontrol.[ch]: added "gboolean wants_click"
member and getters/setters.
* app/tools/gimptool.[ch] (struct GimpTool): added members
in_click_distance, press_coords and press_time.
(gimp_tool_button_press): if the tool wants click events, record
press_coords and press_time.
(gimp_tool_motion): check if we are still in click distance.
(gimp_tool_button_release): ditto. If we are still in click
distance, synthesize a motion event back to the recorded
press_coords and send the tool release_type = CLICK.
(gimp_tool_check_click_distance): utility function which checks
the current coords and time against the recorded ones, using
gtk-double-click-time and gtk-double-click-distance as thresholds.
* app/tools/gimpcroptool.c
* app/tools/gimprectangleselecttool.c: request click events
and handle them.
* app/tools/gimprectangletool.[ch]: handle click events. Removed
gimp_rectangle_tool_no_movement().
svn path=/trunk/; revision=22016
2007-02-27 Michael Natterer <mitch@gimp.org>
Step one towards enabling tool cancellation by other means than
mouse button 3 and towards proper "clicked" semantics.
* app/tools/tools-enums.[ch]: added enum GimpButtonReleaseType
which can be one of { NORMAL, CANCEL, CLICK } (click is curently
unused).
* app/tools/gimptool.[ch] (GimpTool::button_release): added
"release_type" parameter.
(gimp_tool_button_release): if the state contains
GDK_BUTTON3_MASK, call the tool's button_release() with CANCEL,
use NORMAL otherwise.
* app/tools/gimpaligntool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.[ch]
* app/tools/gimpregionselecttool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c (button_release): added
"release_type" parameters and get rid of own checks for
GDK_BUTTON3_MASK.
svn path=/trunk/; revision=22015
2007-02-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpblendoptions.c (gimp_blend_options_gui): set the
gradient-type and gradient-repeat combo boxes to ELLIPSIZE_END so
the blend options can be one tool icon size smaller without
scrolling horizontally.
svn path=/trunk/; revision=22014