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 Martin Nordholts <martin@svn.gnome.org>
* plug-ins/common/svg.c (run): Added comment to explain why the
svg file provided resolution is not clamped against
GIMP_MIN/MAX_RESOLUTION.
svn path=/trunk/; revision=22159
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-19 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: changed labels for
GimpTransformDirection to make the corrective transform feature
more obvious.
svn path=/trunk/; revision=22146
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 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/scripts/script-fu-compat.init: Fixed syntax
error in string-trim-left function (spotted by Saul Goode). Added
compatability routine for 'verbose'.
svn path=/trunk/; revision=22136
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>
* plug-ins/script-fu/script-fu.c: remove N_() from calls to
gimp_plugin_menu_register().
svn path=/trunk/; revision=22133
2007-03-16 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/spyrogimp.scm: update the progress
to avoid looking like the script hangs. Fixes bug #356677.
* plug-ins/script-fu/script-fu-interface.c
(script_fu_interface_report_cc): if the command starts with
"gimp-progress-", the script is obviously showing a progress bar
for itself, so clear the text instead of showing an endless number
of "gimp-progress-update" messages. Also fixed manual main loop
iteration.
svn path=/trunk/; revision=22132
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-13 Raphael Quinet <raphael@gimp.org>
* plug-ins/script-fu/script-fu-console.c: Fix for bug #417467
based on modified patch by Eric Lamarque and suggested by Mitch.
Allows build without warnings and correct localization for Solaris
and other platforms.
svn path=/trunk/; revision=22109
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