2003-04-11 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimptemplateeditor.[ch]: new widget chopped out
of file-new-dialog.c
* app/gui/file-new-dialog.c: use it.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_create_gc):
lookup the border color in the window's colormap.
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-11 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpnavigationpreview.c: set the cursor on
preview->event_window, not widget->window. Use
preview->renderer->viewable, not preview->viewable.
2003-04-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimppreview.[ch]: made GimpPreview a NO_WINDOW
widget that draws on the parent window. Added an INPUT_ONLY window
for events.
* app/widgets/gimpnavigationpreview.c: take the widget's
allocation into account when rendering the marker and grab the
mouse on the preview's event_window.
* app/widgets/gimppreviewrenderer.[ch]: pass GdkRectangles as const.
2003-04-10 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-portrait-16.png
* themes/Default/images/stock-landscape-16.png: new icons by Jimmac.
* libgimpwidgets/gimpstock.[ch]: register the new icons.
* app/widgets/widgets-enums.[ch]: added new enum GimpAspectType.
2003-04-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: added gimp_context_type_to_prop_name().
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpviewablebutton.[ch]: new widget implementing
the wheel-scrollable preview button.
* app/tools/gimptextoptions.c
* app/tools/paint_options.[ch]: removed the code implementing the
same and use GimpViewableButton.
* app/tools/tool_manager.c: added the font to the context
properties which are remembered per tool. Added an evil hack
using g_object_set_data() to pass the global_dock_factory to
tool option GUI constructors.
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockable.[ch]: Added "gpointer get_tab_data" to
GimpDockableGetTabFunc and to gimp_dockable_new().
* app/gui/dialogs-constructors.c: changed accordingly. Replaced
dialogs_[brush,pattern,gradient,palette,font]_tab_func() by
dialogs_viewable_tab_func() which gets passed the GType as
get_tab_data.
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added vitrual function
GimpViewable::get_description() which returns the string that
should be presented to the user plus an optional tooltip with more
information. The default implementation just returns the object's
name and no tooltip.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimptoolinfo.c: implement get_description().
* app/core/gimpimagefile.[ch]: ditto. Renamed
gimp_imagefile_get_description() to
gimp_imagefile_get_desc_string(). Well, um, gimme a better name...
* app/gui/file-open-dialog.c: changed accordingly.
* app/file/file-utils.[ch]: renamed readXVThumb() to
file_utils_readXVThumb().
* tools/pdbgen/pdb/fileops.pdb: changed accordingly.
* app/widgets/widgets-types.h: removed GimpItemGetNameFunc typedef.
* app/widgets/gimpcontainerview-utils.[ch]: removed the the actual
get_name_funcs. They now live in the core as
GimpViewable::get_description() implementations.
* app/widgets/gimpcontainermenu.[ch]
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview.[ch]
* app/widgets/gimpmenuitem.[ch]
* app/widgets/gimpviewabledialog.c: removed get_name_func stuff
and use gimp_viewable_get_description().
* app/widgets/gimpcontainermenu.[ch]: added "preview_border_width"
to gimp_container_menu_set_preview_size().
* app/widgets/gimpimagedock.c: changed accordingly.
* app/pdb/fileops_cmds.c: regenerated.
2003-04-06 Michael Natterer <mitch@gimp.org>
* app/core/gimplist.[ch]: added gimp_list_uniquefy_name() utility
function.
* app/core/gimpdatalist.c
* app/core/gimpitem.c: use it here instead of duplicating almost
the same code.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimptemplateview.[ch]: new widget for editing the
template list.
* app/gui/dialogs-constructors.c: use it.
* app/gui/Makefile.am
* app/gui/templates-commands.[ch]
* app/gui/templates-menu.[ch]: new files implementing the context
menu for the template list.
* app/gui/menus.c: register the new menu with the menu factory.
* app/gui/file-commands.c (file_new_template_callback): uniquefy
the new template's name.
* app/gui/documents-commands.c: fixed typo.
2003-04-05 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
reset object properties only if they are GIMP_PARAM_SERIALIZABLE.
* app/core/gimpcontext.[ch]: added a GimpTemplate property.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c: added a template dialog.
* app/gui/dialogs-menu.c
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: and menu entries to open it.
* app/widgets/gimpdnd.[ch]: added DND for GimpTemplates.
2003-04-05 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainermenu.c
(gimp_container_menu_item_selected): call
gimp_cotainer_menu_select_item() before notifying the context of
the change.
2003-04-04 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: removed
tree_view->preview_border_width.
* app/widgets/gimpcontainermenu.[ch]
* app/widgets/gimpcontainerview.[ch]: and added it here so it is
configurable in all views. Synced the changes in both classes.
* app/widgets/gimpcontainermenuimpl.[ch]
* app/widgets/gimpmenuitem.[ch]: made preview_border_size
configurable here, too.
* app/widgets/gimplayertreeview.c
* app/widgets/gimpimagedock.c
* app/gui/palette-import-dialog.c: changed accordingly.
* app/gui/file-new-dialog.c: Removed the border from the template
menu previews.
2003-04-04 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpnavigationpreview.c
(gimp_navigation_preview_move_to): applied another patch from Pedro
Gimeno that fixes even the most evil zoom ratios.
(gimp_navigation_preview_draw_marker): fixed marker drawing for
very large zoom ratios.
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-03 Michael Natterer <mitch@gimp.org>
Added preliminary support for image templates. Not finished
yet. Addresses bug #96059. Now we need a volunteer to create
a nice collection of default templates...
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimptemplate.[ch]
* app/core/gimp-templates.[ch]: new files implementing the new
GimpTemplate object and the list of available image templates.
* app/core/gimp.[ch]: keep a container of templates around.
* app/core/gimpimage-new.[ch]: ported to use GimpTemplate. Removed
struct GimpImageNewValues.
* app/widgets/gimpcontainermenuimpl.c: changed to show the
"(none)" item for a NULL selection also, not only for an empty
container.
* app/widgets/gimppropwidgets.[ch]: added
gimp_prop_size_entry_connect() which connects an externally
created GimpSizeEntry to object properties. Fixed the size entry
code to actually work.
* app/gui/image-menu.c
* app/gui/file-commands.[ch]: added "Save as Template" which
creates a new template from any image's properties.
* app/gui/file-new-dialog.c: use prop_widgets and GimpTemplate.
Offer the available templates in a menu at the top of the dialog.
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/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-31 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.[ch]: when the user has changed the layer
name from the layers dialog, don't change it with the text any longer.
* app/tools/gimpmovetool.c: removed redundant include.
* app/widgets/gimpcontainerpopup.c
* app/widgets/widgets-enums.[ch]: fixed spelling.
2003-03-31 Sven Neumann <sven@gimp.org>
* themes/Default/images/Makefile.am
* themes/Default/images/stock-text-dir-ltr-24.png
* themes/Default/images/stock-text-dir-rtl-24.png: placeholders
for new icons.
* libgimpwidgets/gimpstock.[ch]: register the new icons.
* themes/Default/gtkrc: tweak GtkDialog in "gimp-default-style".
* app/text/text-enums.[ch]
* app/text/gimptext.[ch]
* app/text/gimptextlayout.c: added new enum GimpTextDirection and
use it instead of PangoDirection.
* app/widgets/widgets-types.h
* app/widgets/gimptexteditor.[ch]: made GimpTextEditor a real widget
and added buttons to switch the text direction.
* app/tools/gimptextoptions.[ch]
* app/tools/gimptexttool.c: moved creation of the text editor to the
text tool options, take care of GimpText::base-direction here.
2003-03-31 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpenummenu.[ch]: added "icon_size" parameters
to gimp_enum_stock_box_new[_with_range]().
* app/tools/gimpcurvestool.c
* app/widgets/gimppropwidgets.c: changed accordingly.
* app/widgets/gimpeditor.[ch]: added gimp_editor_add_stock_box().
* app/widgets/widgets-enums.[ch]: register GimpViewType with
the type system.
* app/widgets/gimpcontainerpopup.c: use a stock box for the
view as list/grid buttons.
2003-03-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_select_item): call
gtk_tree_selection_select_iter() in addition to
gtk_tree_view_set_cursor() so we get the focus *and* the selection
right in all cases.
2003-03-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcellrenderertoggle.c
(gimp_cell_renderer_toggle_activate) *
app/widgets/gimpcellrendererviewable.c
(gimp_cell_renderer_viewable_activate): allow keyboard activation.
* app/widgets/gimpcellrendererviewable.c
(gimp_cell_renderer_viewable_render): fixed the if() which resets
the renderer's border color to black. Fixes layer borders to be
always correct now.
2003-03-28 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcellrenderertoggle.c
(gimp_cell_renderer_toggle_activate): check for event != NULL to
avoid crashing when the cell is activated using the keyboard.
2003-03-27 Michael Natterer <mitch@gimp.org>
Someone produces icons faster than I can commit...
* themes/Default/images/stock-channel-alpha-16.png
* themes/Default/images/stock-channel-alpha-24.png: updated.
* themes/Default/images/stock-channel-alpha-32.png
* themes/Default/images/stock-channel-alpha-48.png: new.
* themes/Default/images/Makefile.am
* libgimpwidgets/gimpstock.[ch]: added them to the stock system.
* app/widgets/gimpcontainerpopup.c: use the new "view as list" and
"view as grid" icons.
2003-03-27 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added a new marshaller.
* app/widgets/gimpcontainergridview.[ch]: added a "move_cursor"
signal and added keybindings for PageUp/PageDown and Home/End.
2003-03-26 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerview.[ch]: added
gimp_container_view_construct(). The new function calls
gimp_container_view_set_preview_size() instead of simply assigning
view->preview_size (Fixes wrongly-sized toggle cells spotted by
Jimmac).
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpitemtreeview.c: call when creating a view.
* app/widgets/gimpchanneltreeview.c: check view->component_editor
for being non-NULL before accessing it.
2003-03-26 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerview.[ch]: added the scrolled_win
to the GimpContainerView struct. Create it in init().
Added gimp_container_view_set_size_request() which adds the
scrolled_window's scrollbar and frames sizes correctly.
* app/widgets/gimpcontainergridview.[ch]
* app/widgets/gimpcontainertreeview.[ch]: removed scrolled windows
here and use the one from the parent_instance. Use the new utility
function.
* app/widgets/gimpcontainertreeview.c: enable searching in the
name column. Grab the focus in button_press.
* app/widgets/gimpcontainerpopup.[ch]: added a button_box containing
zoom in/out, view as list/grid and a button to show the permanently
open dialog. Added more parameters to gimp_container_popup_new().
* app/tools/gimpblendoptions.c
* app/tools/gimpbucketfilloptions.c
* app/tools/gimptextoptions.c
* app/tools/paint_options.c: changed accordingly.
2003-03-26 Sven Neumann <sven@gimp.org>
* app/gui/tool-options-dialog.c (tool_options_dialog_restore_callback):
reset the tool-options before loading the user settings. Don't warn if
loading fails.
2003-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfontselection-dialog.c
(gimp_font_selection_dialog_set_font_desc): fixed braino that
caused the wrong family to be selected.
2003-03-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext.c: include locale.h for setlocale().
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/widgets/Makefile.am: changed rules that generate enums code
to include gimp-intl.h instead of libgimp-intl.h.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/*.pdb: include gimp-intl.h.
2003-03-25 Sven Neumann <sven@gimp.org>
* Makefile.am
* gimpintl.h: removed this header file.
* gimpmiscui.c: include libgimp-intl.h.
* gimp.c (gimp_main): call setlocale() and bind to the libgimp
textdomain so that plug-ins don't need to do that explicitely.
* libgimp/stdplugins-intl.h: added the functionality that used to
live in gimpintl.h and removed the libgimp related stuff. Got rid
of the INIT_I18N_UI() macro.
* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
Plug-ins simply call INIT_I18N() once in their run() function.
* plug-ins/script-fu/script-fu-intl.h: added the functionality
that used to live in gimpintl.h and removed the libgimp related
stuff.
* app/Makefile.am
* app/gimp-intl.h: new file that defines the gettext macros for
the GIMP core.
* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/app_procs.c (app_init): cast batch_cmds to (const gchar **)
when passing them to batch_init().
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): moved the call just added
inside the if(view->container) because it will fail if selecting
the item destroyed the widget.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerpopup.c
(gimp_container_popup_real_confirm): don't use
gimp_context_copy_property() but gimp_context_get_by_type()
followed by gimp_context_set_by_type() because GimpContext's
"copy" functions are special and skip the normal parent_context
logic intentionally (fixes bug #109115).
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_button_press): need to call
gtk_tree_view_column_cell_set_cell_data() again after fiddling
with the GtkTreeView (fixes bug #109121).
2003-03-24 Sven Neumann <sven@gimp.org>
* app/widgets/gimpenummenu.[ch]: added new functions
gimp_enum_menu_set_stock_prefix() and
gimp_enum_option_menu_set_stock_prefix() that allow to
conveniently add stock icons to enum menus.
* app/tools/gimpcurvestool.c
* app/tools/gimphistogramtool.c
* app/tools/gimplevelstool.c: use the new functions here.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_separator_drag_drop): don't
try to reorder dockables in a dock containing exactly one dockable
(fixes bug #109042)
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/paint/paint-enums.[ch]: register GimpPaintApplicationMode
with the type system.
* app/paint/gimppaintoptions.[ch]: replaced "gboolean incremental"
with "GimpPaintApplicationMode application_mode"
* app/paint/gimpairbrush.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimppencil.c: changed accordingly.
* tools/pdbgen/pdb/paint_tools.pdb: ditto. Set all paint options
values using g_object_set().
* app/widgets/gimppropwidgets.[ch]: added
gimp_prop_enum_check_button_new() which can represent two
specified enum values and renders itself "inconsistent" for all
other values.
* app/tools/paint_options.c: use it for the "Incremental" toggle.
* app/pdb/paint_tools_cmds.c
* tools/pdbgen/enums.pl: regenerated.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c: use GIMP_STOCK_IMAGE as default_stock_id.
* app/widgets/gimppreviewrendererimage.[ch]: use GimpChannelType
to specify the channel to render and convert it to the pixel index
using gimp_image_get_component_index() when needed. Use the new
red, green, blue, gray and alpha icons when layer_previews is
FALSE.
* app/widgets/gimpcomponenteditor.c: changed accordingly.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-preview.c
* app/core/gimpimage.c (get_preview_size): return square
dimensions in config->layer_previews is FALSE (except if the size
is requested for a popup).
(get_popup_size): don't crete popups if config->layer_previews
is FALSE.
* app/core/gimpimage.c: added utility function
gimp_image_previews_resize() and call it on "notify::layer-previews".
Calls gimp_viewable_size_changed() on all drawables of the image
and on the image itself. Ensures that drawable/image previews
toggle their size correctly when toggling layer_previews.
* app/widgets/gimpselectioneditor.c: create the selection preview
as a popup so it keeps the image's aspect ratio when
layer_previews is FALSE.
2003-03-22 Sven Neumann <sven@gimp.org>
* app/gui/layers-commands.c: always flush the image when applying
or discarding a layer mask. The active drawable may change and
make a menu update necessary (fixes bug #108958).
* app/widgets/gimplayertreeview.c: call gimp_image_flush() when
switching between layer and mask editing so the menus get updated.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainereditor.c: allow to create a
GimpContainerEditor without a popup menu.
* app/widgets/gimpcellrendererviewable.c: free the event we
got from gdk_get_current_event().
* app/widgets/gimpcontainerview.c: check view->hash_table for
being non-NULL before using it. Be prepared to be destroyed by as
a result of calling gimp_context_set_foo(view->context, foo).
* app/widgets/gimpcontainertreeview.[ch]: added
tree_view->editable_cells and handle *all* mouse clicks in
gimp_container_tree_view_button_press() (by returning TRUE). Start
editing on double-click only. Use gtk_tree_view_set_cursor()
instead of gtk_tree_selection_select_path() to avoid
selected/focus confusion when the focus enters the widget. Be
prepeared to be destroyed as a result of item selection.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcontainerpopup.[ch]: new GtkWindow derived
widget which pops up a selection of any GimpContainer/GimpContext
combo.
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c: add the name cell to
tree_view->editable_cells so it becomes editable.
* app/tools/gimpblendoptions.c
* app/tools/paint_options.c: use the new container popup for
selecting brushes and gradients.
2003-03-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_set_viewable)
(gimp_preview_renderer_size_changed): don't rely on
gimp_preview_renderer_set_size() to invalidate the
renderer. Instead, call gimp_preview_renderer_invalidate() after
resizing the renderer.
2003-03-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpeditor.[ch]: added a GimpItemFactory to the
GimpEditor struct. Added gimp_editor_create_menu().
* app/widgets/gimpcolormapeditor.[ch]
* app/widgets/gimpcomponenteditor.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpitemtreeview.[ch]: removed item_factory pointers
and lots of inalizers which just unref'ed the item_factory. Use
gimp_editor_create_menu() instead.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimppaletteeditor.c: changed accordingly.
2003-03-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-new.c (gimp_image_new_values_new): default
the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()).
* app/gui/file-commands.c
* app/gui/file-new-dialog.c: made more dialogs transient for their
parent window.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpimageeditor.c
* app/widgets/gimpundoeditor.c: simplified a little bit.
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
GdkModifierType instead of guint.
* app/core/gimpmarshal.list
* app/widgets/gimpcellrenderertoggle.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c: use proper marshallers for signals
that take flags as parameters.
* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
to the GimpRGB signal parameter.
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/libgimpwidgets.types
* libgimpwidgets/tmpl/gimpbutton.sgml
* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcomponenteditor.c: need to connect to the cell
renderer's "clicked" signal because "toggled" is not emitted any
longer.
* app/widgets/gimpdrawabletreeview.c: removed debugging output.
* app/widgets/gimpitemtreeview.[ch]: added "const gchar *reorder_desc"
to the class scruct and use it as undo_desc for DND reordering.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: set reorder_desc.
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcellrenderertoggle.[ch]
* app/widgets/gimpcellrendererviewable.[ch]: added public
functions to emit the "clicked" signal.
* app/widgets/gimpcontainertreeview.c: use them instead of
g_signal_emit_by_name().
* app/widgets/Makefile.am
* app/widgets/gimpcontainertreeview-dnd.[ch]: new files
implementing DND for tree views.
* app/widgets/gimpcontainertreeview.[ch]: added virtual
functions drop_possible() and drop().
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: implement drop_possible()
and drop().
2003-03-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch] (gimp_image_mask_translate)
* app/core/gimplayer.[ch] (gimp_layer_translate): added
"gboolean push_undo" parameters.
* app/core/gimpimage-crop.c
* app/core/gimpimage-resize.c
* app/display/gimpdisplayshell-dnd.c
* app/gui/layers-commands.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/layer_cmds.c
* app/pdb/selection_cmds.c: regenerated.
* app/core/gimpimage-undo-push.c (undo_pop_layer_displace): call
gimp_layer_translate() with "push_undo == FALSE" instead of
duplicating gimp_layer_translate()'s code. Use GimpItemUndo for
GIMP_UNDO_MASK.
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_cursor_key): check if the top undo on
the stack is of exactly the same type as the undo we would push
and just don't push it then (compresses layer translate undos and
fixes bug #86362). Changed stuff work with CAPS_LOCK or other
modifiers pressed.
2003-03-18 Michael Natterer <mitch@gimp.org>
Added an API for image colormap manupulation and made colormap
changes undoable (fixes bug #25963).
* app/core/Makefile.am
* app/core/gimpimage-colormap.[ch]: new files implementing
colormap getters/setters. The setters push undos using the
new function below.
* app/core/core-enums.[ch]: added GIMP_UNDO_IMAGE_COLORMAP.
* app/core/gimpimage-undo-push.[ch]: added
gimp_image_undo_push_image_colormap(). Use GimpItemUndo even more
often. Cleanup.
* app/core/gimpimage.[ch]: removed gimp_image_get_colormap() here.
* app/core/gimpimage-convert.c
* app/gui/colormap-editor-commands.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/image.pdb: use the new API.
* app/pdb/image_cmds.c: regenerated.
* plug-ins/common/vinvert.c: removed the comment about the bug,
cosmetic cleanup.
Unrelated:
* app/gui/splash.c: added a frame around the splash. Please eek
if it doesn't please you.
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added virtual function rename() which
pushes an item rename undo. Added "default_name" and "rename_desc"
to the GimpItemClass struct which are used as default values.
* app/core/gimplayer.c: implement it and special-case floating
selections. set item_clas->default_name and item_class->rename_desc.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: set item_class->default_name and
item_class->rename_desc.
* app/widgets/gimpitemtreeview.[ch]: removed rename_item() virtual
function and call gimp_item_rename().
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly.
2003-03-16 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: added utility function
gimp_container_tree_view_find_click_cell(). Don't select the
row if one of tree_view->toggle_cells was clicked. Removed
"GList *toggle_columns" from the struct.
* app/widgets/gimpdrawabletreeview.[ch]: added a
GtkTreeSelectionFunc which ensures that nothing but the floating
selection can be selected. Removed the "eye_column" from the
struct.
* app/widgets/gimpitemtreeview.[ch]: added virtual function
rename_item() and a default implementation.
* app/widgets/gimplayertreeview.[ch]: implement rename_item() and
special case floating selections. Added
gimp_layer_tree_view_mask_update() utility function to factor out
duplicated code. Removed "chain_column" from the struct. Cleanup.
2003-03-16 Michael Natterer <mitch@gimp.org>
Added GtkTreeView versions of layers/channels/vectors:
* app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES
to GIMP_UNDO_GROUP_ITEM_PROPERTIES.
* app/core/gimpcontainer.c (gimp_container_reorder): don't try
to reorder containers with num_children == 1.
* app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpchanneltreeview.[ch]
* app/widgets/gimpdrawabletreeview.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimplayertreeview.[ch]
* app/widgets/gimpvectorstreeview.[ch]: new widgets.
* app/widgets/gimpcellrenderertoggle.c: draw the frame only if the
cell is prelit.
* app/widgets/gimpcellrendererviewable.[ch]: added "clicked"
signal, unref the renderer in finalize(). Set the renderer's
border color to black if the cell is not selected (a hack that
saves tons of code in GimpLayerTreeView).
* app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set()
stuff we just got from the store.
* app/widgets/gimpcontainertreeview.[ch]: added lots of state used
by the new subclasses to the GimpContainerTreeView struct. Create
the GtkListStore/GtkTreeView in GObject::constructor() and only
collect parameters in init() so subclasses can modify store/view
creation. Do most of the button_press_event stuff manually and
return TRUE from the handler.
* app/widgets/gimpcontainerview.c: cleanup.
* app/widgets/gimpitemlistview.h
* app/widgets/gimpvectorslistview.h: temp hacks before they die.
* app/widgets/gimppreviewrenderer.[ch]: added
gimp_preview_renderer_update_idle() which idle-emits "update"
without invalidating.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c: added constructors for the new dialogs.
* app/gui/channels-commands.c
* app/gui/channels-menu.c
* app/gui/layers-commands.c
* app/gui/layers-menu.c
* app/gui/vectors-commands.c
* app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimpitemfactory.c (gimp_item_factory_translate_func):
simplified.
* app/gui/image-menu.c: some minor menu cleanups.
2003-03-14 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdock.c: fiddle with the color of the dock
separator to make the drop area stand out. Added a tooltip.
* etc/gtkrc_user: document how the color can be customized.
2003-03-14 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcolorarea.[ch]: let GimpColorArea optionally
draw a thin border around itself.
* app/widgets/gimpitemfactory.c (gimp_item_factory_set_color): use
a GimpColorArea instead of a deprecated GtkPreview.
2003-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcomponenteditor.c: disable expensive column
auto-resizing and call gtk_tree_view_columns_autosize() in
gimp_component_editor_set_preview_size().
* app/widgets/gimpcontainertreeview.[ch]: ditto. Changed the
GtkListStore pointer in the GimpContainerTreeView struct to
GtkTreeModel.
2003-03-13 Sven Neumann <sven@gimp.org>
* app/widgets/gimptoolbox.c (gimp_toolbox_init): set a window type
hint of GDK_WINDOW_TYPE_HINT_NORMAL for the toolbox since UTILITY
doesn't match here.
2003-03-13 Sven Neumann <sven@gimp.org>
* app/gui/channels-commands.c: don't expose the internal term
"component", use "channel" instead.
2003-03-13 Sven Neumann <sven@gimp.org>
* POTFILES.in
* de.po: updated.
2003-03-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcellrenderertoggle.c: fixed size calculation,
removed padding and the spacing between the icon and the frame
around it.
* app/widgets/gimpwidgets-utils.[ch]: added gimp_get_icon_size()
which returns the best matching icon size for a given allocation.
* app/widgets/gimpcomponenteditor.[ch]: adjust the eye icon's
size according to the preview_size.
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_default_render_stock): use gimp_get_icon_size()
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainertreeview.c: iterate the tree model
using a for() loop instead of nested if() { do { } while() }
stuff.
2003-03-12 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcellrenderertoggle.[ch]: added a new cell_renderer
derived from GtkCellRendererToggle.
* app/widgets/gimpcomponenteditor.c: use the new cell_renderer.
* app/widgets/gimpcellrendererviewable.[ch]: fixed a few typos and
removed some redundant casts.
2003-03-12 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added descriptions to the
GimpChannelType enum.
* app/core/gimpimage.[ch]: added gimp_image_get_component_index()
utility function which does the GIMP_RED_CHANNEL -> RED_PIX etc.
mapping. Use it in all component getters/setters.
* app/widgets/gimpcomponenteditor.[ch]: new widget implementing
the component list using GtkListStore/GtkTreeView. Still a bit
ugly because it uses the standard check instead of the eye icon.
* app/widgets/gimpcomponentlistitem.[ch]: removed.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpvectorslistview.c: changed accordingly.
* app/widgets/gimpchannellistview.[ch]: create a GimpComponentEditor
and removed the old GtkList based stuff.
* app/widgets/gimpitemlistview.[ch]: keep around a pointer to the
GimpMenuFactory passed to the constructor.
* app/gui/channels-menu.c (channels_menu_update): do the right
thing if "data" is a GimpComponentEditor.
* app/gui/channels-commands.[ch]: ditto. Implemented duplicating
of components and component to selection (bug #61018).
2003-03-12 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_init): set a window type hint
of GDK_WINDOW_TYPE_HINT_UTILITY for dock windows (fixes bug #94669).
* app/gui/splash.c (splash_create): set a window type hint of
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN.
2003-03-10 Sven Neumann <sven@gimp.org>
* app/config/gimpscanner.[ch]: removed gimp_scanner_parse_string_list()
since the format it read wasn't proper s-expressions syntax.
* app/config/gimpconfigwriter.c: a couple of minor cleanups.
* app/gui/color-history.[ch]
* app/gui/session.c
* app/widgets/gimpdialogfactory.[ch]: use GimpConfigWriter to
write the sessionrc. Had to do some minor changes to the file
format.
2003-03-10 Michael Natterer <mitch@gimp.org>
* app/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-06 Michael Natterer <mitch@gimp.org>
* themes/Default/images/stock-delete-16.png
* themes/Default/images/stock-lower-16.png
* themes/Default/images/stock-new-16.png
* themes/Default/images/stock-paste-16.png
* themes/Default/images/stock-raise-16.png
* themes/Default/images/stock-refresh-16.png: removed these files
since we use the icons provided by GTK+ now.
* themes/Default/gtkrc
* themes/Default/images/Makefile.am: removed them here hoo.
* libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent
in the header and the .c file. Added GIMP_STOCK_ERROR and
GIMP_STOCK_QUESTION which are available in all sizes (unlike
GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION).
* app/core/gimpviewable.c
* app/display/gimpdisplayshell.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/widgets/gimpwidgets-utils.c
* app/widgets/gimpdatafactoryview.c: use the new stock IDs.
* app/config/gimpcoreconfig.[ch]: renamed "preview_size" to
"layer_preview_size" and added "gboolean layer_previews" which
switches layer previews on/off independent of their size.
* app/config/gimprc-blurbs.h: added/changed their blurbs.
* app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE.
* app/core/gimpdrawable-preview.c
* app/core/gimpdrawable.c
* app/core/gimpimage.c: return NULL previews if
core_config->layer_previews is FALSE. Invalidate all layer/channel
previews whenever "layer_previews" changes.
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererimage.c: render the stock_id
if the drawable/image returns a NULL preview. Fixes bug #107242.
* app/display/gimpdisplayshell-handlers.c: don't set the
sensitivity of the navigation button because it can no longer be
disabled.
* app/display/gimpdisplayshell-layer-select.c
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c
* app/gui/paths-dialog.c: changed accordingly.
* app/gui/preferences-dialog.c: added a toggle button for the new
"layer_previews" boolean.
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerlistview.c: chain up unconditionally
in GimpContainerView::clear_items().
* app/widgets/gimpcontainertreeview.c: ditto. Made the reorder()
implementation lengthy and eeky (but working) again... Stop signal
emission on double clicks so GtkTreeView doesn't re-select the
item we are about change.
* app/widgets/gimpcontainerview.c
(gimp_container_view_real_clear_items): need to use
g_hash_table_new_full() here too or everything will b0rk.
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_default_render_stock): use
gtk_widget_render_icon() instead of gtk_icon_set_render_icon().
* tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-06 Sven Neumann <sven@gimp.org>
* app/core/gimpparasitelist.c: fixed parasite serialization that
I broke yesterday.
* app/widgets/gimpenummenu.c: added support for mnemonics.
* app/core/core-enums.h: removed the inverted variants from the
GimpAddMaskType enum. Registered the enum with the type system.
* app/core/gimplayer.c: changed accordingly.
* app/gui/layers-commands.c (layers_add_mask_query): use an enum
frame and added a check button that allows to invert the inital
layer mask.
* tools/pdbgen/pdb/layer.pdb: updated documentation for the
gimp-layer-create-mask PDB function.
* plug-ins/script-fu/siod-wrapper.c: removed new enum values from
the compatibility defines.
* app/core/core-enums.c
* app/pdb/layer_cmds.c
* libgimp/gimpenums.h
* libgimp/gimplayer_pdb.c
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2003-03-05 Manish Singh <yosh@gimp.org>
* configure.in: require GTK+ 2.2. The 2.0.x series is no longer
maintained, and there are some very real bugs that won't go away.
* app/gui/about-dialog.c
* app/widgets/gimppreviewrenderer.c
* app/widgets/gimptoolbox-color-area.c
* plug-ins/common/uniteditor.c: remove special casing for GTK+ 2.0
vs. 2.2
* app/widgets/gtkwrapbox.[ch]
* app/widgets/gtkhwrapbox.[ch]
* app/widgets/gtkvwrapbox.[ch]: remove deprecated functions
* app/gui/gui.c: free return value of gdk_get_display ()
* app/widgets/gimpcontainertreeview.c: use gtk_list_store_move_before () for reordering.
2003-03-05 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpbrusheditor.[ch]: undeprecated and simplified a
lot by using GimpPreview instead of handmade preview stuff.
2003-03-05 Michael Natterer <mitch@gimp.org>
* app/file/file-save.[ch]: added GError reporting, removed
g_message() stuff.
* app/gui/file-commands.c
* app/gui/file-save-dialog.c: g_message() here if file_save_*()
returns an error.
* app/file/file-open.c: use the G_FILE_ERROR quark and the
GFileError enum for reporting errors. Removed g_message() if the
passed in GError** pointer is NULL (passing NULL as error return
location should never mean "show the error message yourself").
* app/app_procs.c
* app/gui/file-commands.c
* app/gui/file-open-dialog.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdocumentview.c: g_message() here if file_open_*()
returns an error.
2003-03-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcolormapeditor.[ch]: set the active color from
GimpColormapEditor::selected so you can pick colors from an
indexed palette again.
2003-03-03 Hans Breuer <hans@breuer.org>
* app/text/makefile.msc (new file)
*/makefile.msc */*/makefile.msc : updated
* app/core/gimpdata.c : define access() constants
for G_OS_WIN32 case
* app/text/gimptext.c : <stdlib.h> for getenv()
* libgimp/gimp.def libgimp/gimpui.def : updated externals
* libgimpwidgets/libgimp-glue.c : make dynamic_resolve
actually work again for 'my' DLL naming convention
* plug-ins/gap/gap_pdb_calls.c : reflect renaming
of GIMP_VERTICAL to GIMP_ORIENTATION_VERTICAL
2003-03-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: made the default buffer
and stock rendering functions public so derived renderers
can use them. Renamed gimp_preview_renderer_render_preview()
to gimp_preview_renderer_render_buffer().
* app/widgets/gimppreviewrendererbrush.c
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererimage.c: changed accordingly.
* app/widgets/gimppreviewrenderertextlayer.[ch]: new renderer
for text layers which always renders the stock icon.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppreviewrenderer-utils.c: changed accordingly.
2003-03-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: removed the constructors
with a GimpViewable parameter and always create renderers from
viewable types only. Made gimp_preview_renderer_update() emit only
the "update" signal and added the new function
gimp_preview_renderer_invalidate() which does what the old
_update() did (invalidating and adding an idle function which
emits "update"). Added gimp_preview_renderer_remove_idle() so
renderer updating can be fully controlled using public functions.
* app/widgets/gimppreviewrendererbrush.[ch]: no need to remember
the widget for the brushpipe animation, simply call
gimp_preview_renderer_update() in the animation timeout.
* app/widgets/gimppreview.[ch]
* app/widgets/gimpcontainertreeview.c: changed accordingly. Call
gimp_preview_renderer_remove_idle() after setting the initial
viewable because we will be updated anyway by the first expose.
* app/widgets/gimppreview.[ch]: Added a size_request()
implementation. Removed gimp_preview_update(). Added new
constructor gimp_preview_new_full_by_types() to make the
constructor API symmetric. Removed code duplication by calling the
_by_types() constructors from the ones taking GimpViewable
parameters.
* app/gui/palette-import-dialog.c
* app/widgets/gimppropwidgets.c
* app/widgets/gimpselectioneditor.c: changed accordingly.
2003-03-01 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: added "gint bytes" to the
GimpPreviewRenderer struct and pass it to
gimp_preview_render_to_buffer().
* app/widgets/gimppreviewrendererbrush.[ch]: render the indicators
to the renderer's buffer, not to the TempBuf so they always appear
in the corner again.
Misc cleanups:
* app/core/gimpbuffer.c (gimp_buffer_get_new_preview)
* app/core/gimppattern.c (gimp_pattern_get_new_preview): no need
to center the TempBuf if smaller than requested because
GimpPreviewRenderer::render()'s default implementation adjusts the
offsets itself.
* app/widgets/gimppreview.c (gimp_preview_set_viewable): no need
to update ourselves after we changed the renderer because the
renderer's signal will update us.
* app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_draw):
replaced my stupid buf_rect calculation overkill by something
simple that does the same.
2003-03-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpbuffer.c: don't scale the preview up if the
buffer is too small.
* app/core/gimppattern.c: don't add a white border around the
preview if the pattern is too small.
* app/widgets/gimppreviewrenderer.[ch]: new object. A buffer
that updates itself on GimpViewable changes and can render
itself to any widget. Basically GimpPreview reduced to the
render and draw code.
* app/widgets/gimppreview.[ch]: removed all rendering and drawing
code and keep a GimpPreviewRenderer instance. Connect to its
"update" signal for queuing draws on the preview.
* app/widgets/gimpcellrendererviewable.[ch]
* app/widgets/gimpcontainertreeview.c: same here: removed
rendering and drawing code and keep GimpPreviewRenderers in the
list store. Delays preview creation for GtkTreeViews until the
buffer is really needed for drawing and adds idle preview updating
on viewable changes.
* app/widgets/gimppreview-utils.[ch]
* app/widgets/gimpbrushpreview.[ch]
* app/widgets/gimpbufferpreview.[ch]
* app/widgets/gimpdrawablepreview.[ch]
* app/widgets/gimpimagepreview.[ch]: removed...
* app/widgets/gimppreviewrenderer-utils.[ch]
* app/widgets/gimppreviewrendererbrush.[ch]
* app/widgets/gimppreviewrendererdrawable.[ch]
* app/widgets/gimppreviewrendererimage.[ch]: ...and converted to
GimpPreviewRenderer subclasses.
* app/display/gimpnavigationview.c
* app/gui/palette-import-dialog.c
* app/widgets/Makefile.am
* app/widgets/widgets-enums.h
* app/widgets/widgets-types.h
* app/widgets/gimpchannellistview.c
* app/widgets/gimpcomponentlistitem.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplistitem.c
* app/widgets/gimpnavigationpreview.[ch]
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorslistview.c: changed accordingly.
2003-02-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added virtual function
get_popup_size() which returns a boolean indicating if a popup is
needed and its size.
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable-preview.[ch]
* app/core/gimpdrawable.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimpundo.c: implement it.
* app/widgets/gimppreview.[ch]: removed virtual functions
needs_popup() and create_popup(). Removed the code which creates
the popup and the popup members of the GimpPreview struct.
* app/widgets/gimppreview-popup.[ch]: new files providing the
utility function gimp_preview_popup_show() which can show popups
from any widget, not just from a GimpPreview. Checks if a popup is
needed using gimp_viewable_get_popup_size().
* app/widgets/gimpcellrendererviewable.c: show popups here too.
* app/widgets/gimpbrushpreview.c
* app/widgets/gimpbufferpreview.c
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpimagepreview.c: removed needs_popup() and
create_popup() implementations.
* app/widgets/gimpnavigationpreview.c: removed empty render()
implementation.
* app/widgets/gimpundoeditor.c: use a tree instead of a list view.
* app/widgets/gimpgradientpreview.[ch]
* app/widgets/gimppalettepreview.[ch]
* app/widgets/gimppatternpreview.[ch]: removed because they only
implemented the removed popup functions.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpmenuitem.c
* app/widgets/gimppreview-utils.c: changed accordingly
2003-02-26 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch]: added a writeable field to GimpData and
set it from gimp_data_set_filename().
* app/gui/brushes-menu.c
* app/gui/gradients-menu.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpgradienteditor.c: look at data->writeable when
setting widgets sensitivity.
* app/gui/user-install-dialog.c (user_install_dialog_create): reduce
some of the dialog clutter by not showing the directories created for
plug-ins.
* app/core/gimpviewable.[ch]: added a default_stock_id to
GimpViewableClass so we don't need to hold a copy in each instance.
Added accessor functions to set and get the stock_id.
* app/core/gimptoolinfo.c
* app/gui/dialogs-constructors.c
* app/gui/image-menu.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c
* app/widgets/gimptoolbox.c: use gimp_viewable_get_stock_id().
* app/text/gimptextlayer.c: set a text icon as default stock_id.
2003-02-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
GimpViewable struct. It is used by the GUI if the get_preview()
functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION.
* app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed
the cached GdkPixbuf. Don't implement any preview function
so the GUI uses the stock_id.
* app/tools/tool_manager.c: removed GdkPixbuf creation, removed
the #warning about the buggy way we created the pixbuf.
* app/gui/dialogs-constructors.c
* app/gui/image-menu.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* app/widgets/gimptoolbox.c: use viewable->stock_id instead
of tool_info->stock_id.
* app/core/gimpbrush.c
* app/core/gimpgradient.c
* app/core/gimpimagefile.c
* app/core/gimpundo.c: simplified get_preview() implementations:
- never scale previews up, only down.
- don't render white or checks backgrounds but simply return
TempBufs with alpha and let the preview system do its job.
- don't add padding but simply return previews smaller than
requested.
* app/display/gimpdisplayshell-render.[ch]: added
"render_blend_white", a 2d lookup table for blending on white,
just as the check lookup tables. Added "render_white_buf".
* app/widgets/gimppreview.[ch]: changed a lot:
- don't render the preview's border into the buffer.
- added "GdkGC *border_gc" and draw the preview's border in expose()
using gdk_draw_rectangle().
- added "GdkPixbuf *no_preview_pixbuf" and create it in
gimp_preview_real_render() if gimp_viewable_get_preview()
returned NULL.
- factored the actual preview rendering out to
gimp_preview_render_to_buffer(). Added configurable background
rendering for the preview itself and it's padding area
(the area the preview is larger than the buffer returned
by gimp_viewable_get_preview()).
- changed gimp_preview_render_and_flush() to
gimp_preview_render_preview() and added "inside_bg" and
"outside_bg" parameters.
- use the new render buffers for blending on white.
* app/widgets/gimpbrushpreview.c
* app/widgets/gimpbufferpreview.c
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpgradientpreview.c
* app/widgets/gimpimagepreview.c
* app/widgets/gimppalettepreview.c
* app/widgets/gimppatternpreview.c: don't create large white
TempBufs to center the previews in but simply set the TempBuf's
offsets to get them centered. Simplified & cleaned up many preview
render functions. Pass the correct GimpPreviewBG modes to
gimp_preview_render_preview().
* app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer
class derived from GtkCellRendererPixbuf which knows how
to use gimp_viewable_get_preview_size() and renders the
viewable's stock item if no preview can be created.
* app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc
which creates the preview pixbuf if needed so we don't create it
unconditionally upon item insertion. Fixed preview size assertion
to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed"
while reordering the selected item.
* app/widgets/gimpcontainerview.c: cosmetic.
* app/widgets/gimpimagefilepreview.[ch]
* app/widgets/gimptoolinfopreview.[ch]
* app/widgets/gimpundopreview.[ch]: removed because the default
implementation is good enough.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppreview-utils.c: changed accordingly.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs-menu.c
* app/gui/dialogs.c
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: register grid and tree view variants
of the document history.
Unrelated:
* app/gui/gui.c (gui_exit_finish_callback): disconnect from
signals earlier.
* app/gui/user-install-dialog.c: create the "tool-options" subdir
of the user's ~/.gimp-1.3 directory.