Since it appeared with GLib 2.68.0, we could not change this until we
bumped the dependency which has only become possible a few days ago
(since Debian testing is our baseline for dependency bumps). Cf.
previous commit.
As this is a drop-in replacement (just a guint parameter changed to
gsize to avoid integer overflow), search-and-replace with:
> sed -i 's/g_memdup\>/g_memdup2/g' `grep -rIl 'g_memdup\>' *`
… followed by a few manual alignment tweaks when necessary.
This gets rid of the many deprecation warnings which we had lately when
building with a recent GLib version.
This fixes the following warning (and 4 similar others):
> libgimp/gimpimagecombobox.c:133: Warning: GimpUi: "destroy" annotation needs one option, none given
Brought by commit df766d5443. It's my fault for not properly reviewing
the patch as I failed to notice the new warnings.
Seems underscored APIs are not visible on Win32. Anyway even if we fixed
this, this would only be temporary as all these deprecated APIs are only
meant to stay around temporarily, then be actually unavailable.
I hesitated to actually undeprecate the `_gimp_*_is_valid()` (like
making a `gimp_image_is_valid_id()` API for instance) but this is
actually quite similar to just create the GimpImage: if
gimp_image_get_by_id() returns NULL, then the ID was not valid.
We now have both variants, one returning a GList, and another
returning an array. Turns out that while a list is often nicer,
sometimes a random-access array really keeps the code much simpler.
Adapt all plug-ins, and clean up a bit (like use g_list_reverse() once
instead of iterating the list reversed).
This means that images' ownership is not given to caller in particular.
libgimp will now keep a reference of all GimpImage-s it creates and
return this same reference if called again. It also means that you can
now compare images by pointer comparison (as 2 GimpImage objects
representing the same image ID will be equal).
Obviously as a side effect, gimp_image_list() is changed to (transfer
container) as you must only free the container now, not the elements.
Also various other functions creating new images are now (transfer none)
too.
Long-time plug-ins will have to be taken in consideration in a further
step (we currently never free GimpImage for destroyed images in
particular).
I.e.: gimp_image_get_(layers|channels|vectors)(), gimp_image_list() and
gimp_item_get_children().
Instead of returning an array of IDs, these will now return a GList with
the right objects ready to use.
I did the same trick with GIMP_DEPRECATED_REPLACE_NEW_API macro, apart
for some minor widget API to preview drawable, which I will fix right
away in our plug-ins.
Same as previous commit: by default the new API will be used. But if a
plug-in builds with GIMP_DEPRECATED_REPLACE_NEW_API macro, then the same
function names will call the old API with ids.
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
Fix my last commit and don't delete items in the foreach() callback,
because it's impossible to delete items in foreach(). Instead, collect
them in a list and remove them after foreach().
Remove the privately added GimpItemComboBox class instead, it confuses
the hell out of python. Instead, use g_object_set,get_data() to manage
the newly needed members, and code duplication.
Let image and item combo boxes connect to their own "changed" signal
first, and if the chosen image/item doesn't exist any longer,
reinitialize the combo box and select the first item instead.
Also fixes the type macros in gimpitemcombobox.h which were lacking a
')' and introduces an internal GimpItemComboBox class to hold the
common functionality.
Add all a tree's items to the combo boxes. Try to visualize the tree
structure by prepending '-'s, but that could probably need some
suggestions for improvement.
2009-03-22 Michael Natterer <mitch@gimp.org>
* libgimp/gimpbrushselectbutton.c
* libgimp/gimpexport.c
* libgimp/gimpfontselectbutton.c
* libgimp/gimpgradientselectbutton.c
* libgimp/gimpimagecombobox.c
* libgimp/gimpitemcombobox.c
* libgimp/gimppaletteselectbutton.c
* libgimp/gimppatternselectbutton.c
* libgimp/gimpprogressbar.c
* libgimp/gimpui.c
* libgimp/gimpzoompreview.c
* tools/test-clipboard.c: use accessors for various members of
GTK+ structures that don't exist any longer when GSEAL_ENABLE is
defined.
svn path=/trunk/; revision=28191
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2007-04-12 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpprotocol.[ch] (struct _GPParam): don't redefine
the GimpParasite struct, just use it.
* libgimp/gimp.c: include gimpparasite.h.
* libgimp/gimpitemcombobox.c (gimp_item_combo_box_new): initialize
combo_box_type to suppress a compiler warning.
* libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_new):
avoid dereferencing a type-punned pointer.
svn path=/trunk/; revision=22237
2006-11-16 Simon Budig <simon@gimp.org>
* libgimp/gimpdrawablecombobox.[ch]: removed...
* libgimp/gimpitemcombobox.[ch]: and added here. Factored out
a lot of common code and added a combo box for vectors objects.
* libgimp/Makefile.am
* libgimp/gimpui.h
* libgimp/gimpuitypes.h: changed accordingly.
2005-07-25 Michael Natterer <mitch@gimp.org>
Some DND fixes / cleanup:
* app/widgets/widgets-enums.h: renamed GIMP_DND_TYPE_TOOL to
GIMP_DND_TYPE_TOOL_INFO.
* app/widgets/gimpselectiondata.[ch]: s/tool/tool_info/g. Moved
private functions to the end of the file. Include GIMP's PID in
all GtkSelectionData strings which are used to pass around stuff
by reference. For things which are referenced by name, also encode
the object's address in the GtkSelectionData so having a brush
called "Standard" or a named buffer called "Global Buffer" will
work together with DND.
* app/widgets/gimpdnd.[ch]: s/tool/tool_info/g. Renamed
gimp_dnd_get_data_data() to gimp_dnd_get_object_data() since it's
not limited to GimpData objects. Follow above selection data API
changes. Cleanup.
* libgimp/gimpbrushmenu.c
* libgimp/gimpdrawablecombobox.c
* libgimp/gimpfontselectbutton.c
* libgimp/gimpgradientmenu.c
* libgimp/gimpimagecombobox.c
* libgimp/gimppalettemenu.c
* libgimp/gimppatternmenu.c: follow GtkSelectionData format change
and check the dropped things' PID against the return value of
gimp_getpid().
2005-06-03 Manish Singh <yosh@gimp.org>
* libgimpcolor/gimprgb.h: whitespace fix.
* libgimpwidgets/gimpchainbutton.h
* libgimpwidgets/gimpwidgetsenums.[ch]: move GimpChainPosition
to a registered enum, and register GimpSizeEntryUpdatePolicy as
as well.
* libgimp/gimpuitypes.h
* libgimp/gimpdrawablecombobox.[ch]: turn these into GObjects
with their own types.
* libgimp/gimpimagecombobox.c: use G_DEFINE_TYPE.
2005-03-03 Sven Neumann <sven@gimp.org>
* libgimp/gimpdrawablecombobox.c
* libgimp/gimpimagecombobox.c: set a width request on the combo boxes.
* plug-ins/common/bumpmap.c (SCALE_WIDTH): set a minimum width on
the scales.
2005-02-27 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpintcombobox.c: added an "ellipsize" construct
property and changed the default behaviour back to not doing
ellipsation on the text.
* libgimp/gimpimagecombobox.c
* libgimp/gimpdrawablecombobox.c: set "ellipsize" to middle for
drawable and image combo boxes.
2004-10-28 Sven Neumann <sven@gimp.org>
* libgimp/gimpdrawablecombobox.c
* libgimp/gimpimagecombobox.c: changed the API docs to suggest to
use gimp_int_combo_box_connect() with these widgets. We don't want
more people to be caught by bug #156659.
2004-04-22 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpintstore.[ch]: automatically add an "(Empty)"
item if the store is empty and remove it as soon as other items
are being added.
* libgimp/gimpdrawablecombobox.c
* libgimp/gimpimagecombobox.c: removed handling of the empty list;
the store does this for us now.
2004-04-21 Sven Neumann <sven@gimp.org>
* libgimp/gimpdrawablecombobox.c
* libgimp/gimpimagecombobox.c
* libgimp/gimpmenu.c: changed the label for the empty menu from
"None" to "Empty" since that's what GTK+ uses.
* libgimpwidgets/gimpintcombobox.[ch]: added convenience function
gimp_int_combo_box_connect().
* plug-ins/common/bumpmap.c
* plug-ins/common/compose.c
* plug-ins/common/depthmerge.c
* plug-ins/common/displace.c
* plug-ins/common/lic.c
* plug-ins/common/warp.c: ported to GimpDrawableComboBox.
* plug-ins/Lighting/lighting_ui.c
* plug-ins/MapObject/mapobject_ui.c
* plug-ins/common/sample_colorize.c: use
gimp_int_combo_box_connect(). This restores the correct behaviour
of setting the drawable_ID to the first drawable from the list if
it's invalid.