2003-05-26 Pedro Gimeno <pggimeno@wanadoo.es>
* app/tools/gimpeditselectiontool.c (selection_transform_segs):
Fix off-by-one when dragging the selection. Fixes the last pending
issue of bug #17904. Use temporary variables for clamp values.
* app/display/gimpdisplayshell-selection.c
(selection_transform_segs): Perform the clamping that fixes
bug #110014 here instead of in the callers. Solves a rare case
that was not properly handled before.
(selection_render_points, selection_generate_segs): Remove the
clamping code from here.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_rectangle): More
clampings to avoid overflow of 16-bit coordinates.
2003-05-20 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]
* app/display/gimpdisplayshell-callbacks.c: removed padding_gc from
the GimpDisplayShell struct. Don't draw the padding color manually.
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_set_padding): set the canvas background color
using gdk_window_set_background().
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): update the cursor on
GDK_ENTER_NOTIFY.
* app/display/gimpdisplayshell-cursor.c
(gimp_display_shell_update_cursor): argh, "0" coordinates are
*inside* the canvas.
Together fixes bug #113239.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.[ch]
* app/display/gimpdisplayshell.c: enabled dropping of vectors to
the display to copy them between images.
2003-05-17 Michael Natterer <mitch@gimp.org>
Fixed File->Revert, which was completely broken before:
* app/gui/file-commands.c (file_revert_confirm_callback): set the
new image on all GimpContexts which had the old image set. Unref
the new image after the displays are reconnected.
Added some paranoia code for similar future situations (the
functions below were not broken, but affected by the above bug):
* app/display/gimpdisplay-handlers.c (gimp_display_disconnect):
set gdisp->gimage to NULL before unrefing the image.
* app/widgets/gimpimagedock.c (gimp_image_dock_image_changed):
unref the gimage pointer returned by g_object_get() only if it is
non-NULL. Cleanup.
2003-05-12 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_invalidate_preview_handler): use a low-priority
timeout for updating the WM icon.
2003-05-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-scale.[ch]
(gimp_display_shell_scale_zoom_fraction): new utility function
which takes GimpZoomType and zooms "scalesrc" and "scaledest".
(gimp_display_shell_scale_calc_fraction): new utility function
which takes an exact double scale factor and calculates "scalesrc"
and "scaledest".
(gimp_display_shell_scale): use the first.
(gimp_display_shell_scale_fit): use the second.
* app/tools/gimpmagnifytool.[ch]: use the first to click-zoom and
the second to area-zoom. Fixes bug #112115. Removed zoom_in() and
zoom_out() utiliy functions. Removed "GimpZoomType op" from the
GimpMagnifyTool struct. Cleanup.
2003-05-05 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_snap_coords):
don't change the passed GimpCoords if we didn't snap.
2003-04-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimptoolcontrol.[ch]: added an API to specify a
"snap_offset" and a "snap_width/height". Needed for tools which
want to snap to a rectangle and/or a position which is not the
current cursor position.
* app/display/gimpdisplayshell.[ch]: removed
gimp_display_shell_find_guide(), gimp_display_shell_snap_point()
and gimp_display_shell_snap_rectangle().
Added gimp_display_shell_snap_coords() which works on GimpCoords
and gets passed the above snap offsets.
* app/display/gimpdisplayshell-callbacks.c: use the new snap
function, using the values from GimpToolControl.
* app/tools/gimpcroptool.c: set snap offsets so the handles can be
guide-aligned after creating. Fixes bug #110957.
* app/tools/gimpeditselectiontool.c: removed snapping code (which
was broken anyway) and set appropriate snap offsets in
init_edit_selection().
2003-04-11 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_dialog): fixed fnord that caused the
dialog to sometimes show a ratio of 0:0.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimppreview.[ch]
* app/widgets/gimppreviewrenderer.[ch]: moved background
functionality into the renderer. Removed some GimpPreview
functions that used to wrap GimpPreviewRenderer functionality.
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationview.c
* app/gui/dialogs-constructors.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimpselectioneditor.[ch]: changed accordingly.
2003-04-05 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.c: applied a patch from
Pedro Gimeno that fixes incorrect drawing of the selection border
caused by overflowing 16bit X coordinates (bug #110014).
2003-04-04 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimplimits.h: reduced GIMP_MAX_IMAGE_SIZE to 2^18.
* libgimpbase/gimputils.[ch]: added gimp_memsize_to_string()
utility function (which is definitely broken on 64bit systems).
* app/core/gimpimage-new.[ch]: removed
gimp_image_new_get_memsize_string() and gimp_image_new_create_image().
Renamed gimp_image_new_template_new() to
gimp_image_new_get_last_template().
* app/core/gimpimagefile.c
* app/display/gimpdisplayshell-title.c: changed accordingly.
* app/core/gimp-templates.c: changed filename from "templates"
to "templaterc".
* app/core/gimp.[ch]
* app/core/gimpimage-duplicate.c: don't include "gimpimage-new.h".
* app/core/gimptemplate.[ch]: removed
gimp_template_calc_memsize(). Instead, added the size and a
boolean indicating that it is valid to the GimpTemplate
struct. Added GObject::notify() implementation and update the
values there.
* app/widgets/gimppropwidgets.c: connect to the unit property
correctly.
* app/gui/file-new-dialog.c: changed accordingly. Disconnect
from the template's "notify" signal while changing all values.
2003-04-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c: applied a patch from
Pedro Gimeno that fixes the display render problems at high zoom
levels (bug #109933).
2003-04-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_fit): extended range of possible zoom
ratios like in the other scaling routines.
* app/display/gimpdisplayshell-scale.[ch]
* app/display/gimpdisplayshell.[ch]
* app/gui/image-menu.c
* app/gui/view-commands.[ch]: added a dialog to menually enter the
zoom ratio. Fixes bug #65057.
2003-04-03 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-template-16.png
* themes/Default/images/stock-texture-64.png: new icons by Jimmac.
* libgimpwidgets/gimpstock.[ch]: register the new icons.
* app/widgets/gimppreview.[ch]: added the possibility to set a
background pixmap on the preview widget.
* app/gui/dialogs-constructors.c
* app/display/gimpnavigationview.[ch]
* app/widgets/gimpselectioneditor.[ch]: set a background on the
navigation and selection previews when layer previews are disabled
in the preferences.
2003-04-01 Michael Natterer <mitch@gimp.org>
* app/config/gimpdisplayconfig.[ch]: added gboolean show_scrollbars
to be consistent with show_menubar etc.
* app/config/gimprc-blurbs.h: added its blurb and made all
SHOW_FOO_BLURBs consistent.
* app/display/gimpdisplayshell.c: take the scrollbar visibility
default value from GimpDisplayConfig.
* app/gui/preferences-dialog.c: GUI for the new property.
2003-04-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list: added VOID__DOUBLE_DOUBLE
* app/widgets/gimpnavigationpreview.[ch]: applied patch from
Pedro Gimeno that fixes mapping of preview scroll offsets to
image scroll offsets. Changed the x, y, width, height members
from gint to gdouble. Changed the external API to use exact
doubles instead of rounded ints.
* app/display/gimpnavigationview.c: speak to the navigation
preview in exact double values.
Alltogether fixes bug #109648.
2003-03-30 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_origin_menu_popup): set the active display
before showing the menu (fixes bug #109472).
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-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-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-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-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-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/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 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-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 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-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-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-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 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-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-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/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.