2003-07-17 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-params.[ch]: added "gboolean allow_percent"
to gimp_param_spec_unit() and to the GIMP_CONFIG_INSTALL_PROP_UNIT()
macro. Changed value validation accordingly.
* app/config/gimpconfig-types.c (string_to_unit): parse "percent"
correctly.
* app/widgets/gimppropwidgets.c (gimp_prop_unit_menu_new): show
the "Percent" menu entry if the param_spec allows percent.
* app/config/gimpcoreconfig.c
* app/core/gimpgrid.c
* app/core/gimptemplate.c
* app/text/gimptext.c: pass FALSE to disallow percent.
* app/paint/gimppaintoptions.c
* app/tools/gimpselectionoptions.c: pass TRUE. Brings back the
percent feature for fade_length, gradient_length and fixed_size
rect/ellipse select.
* app/tools/gimpbucketfilloptions.c
* app/tools/gimpmagnifyoptions.c
* app/tools/gimpselectionoptions.c
* app/tools/gimptransformoptions.c: don't call the the reset()
functions from the GUI constructors (and reset the options just
deserialized from disk). Instead, added set_defaults() functions
which do everything the old reset() functions did (except
upchaining) and call set_defaults() from reset() and from the GUI
constructors.
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/core/gimptemplate.c (gimp_template_notify): invalidate
the preview when the stock_id changes.
* app/widgets/gimptemplateeditor.[ch]: added an optional entry
to edit the template's name.
* app/widgets/gimptemplateview.[ch]: added a "duplicate" button and
function pointers for creating templates, editing templates and
creating images from templates.
* app/gui/file-new-dialog.[ch] (file_new_dialog_create): added an
optional template parameter.
* app/gui/file-commands.c: pass template == NULL.
* app/gui/templates-menu.c: added a "Duplicate Template" menu entry.
* app/gui/templates-commands.[ch]: added the callback for the
duplicate menu item. Added "New Template" and "Edit Template"
dialogs. Added a function which opens a file_new_dialog with
a template preselected.
* app/gui/dialogs-constructors.c: let GimpTemplateView know
about the functions.
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.