diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-02 21:30:11 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-02 21:30:11 +0000 |
| commit | 3e075e587aaa712efb1704478cd1a75131882889 (patch) | |
| tree | 6f13d8df9a58d9895d01b96ef1074ccce7e8fe05 /src/extension/internal/gdkpixbuf-input.cpp | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-3e075e587aaa712efb1704478cd1a75131882889.tar.gz inkscape-3e075e587aaa712efb1704478cd1a75131882889.zip | |
third batch
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index e0dc90981..7af7927f2 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -1,4 +1,6 @@ #include <gdk-pixbuf/gdk-pixbuf.h> +#include <gdkmm/pixbuf.h> +#include <gdkmm/pixbufformat.h> #include <boost/scoped_ptr.hpp> #include <glib/gprintf.h> @@ -163,14 +165,9 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) void GdkpixbufInput::init(void) { - GSList * formatlist, * formatlisthead; - - /* \todo I'm not sure if I need to free this list */ - for (formatlist = formatlisthead = gdk_pixbuf_get_formats(); - formatlist != NULL; - formatlist = g_slist_next(formatlist)) { - - GdkPixbufFormat *pixformat = (GdkPixbufFormat *)formatlist->data; + static std::vector< Gdk::PixbufFormat > formatlist = Gdk::Pixbuf::get_formats(); + for (auto i: formatlist) { + GdkPixbufFormat *pixformat = i.gobj(); gchar *name = gdk_pixbuf_format_get_name(pixformat); gchar *description = gdk_pixbuf_format_get_description(pixformat); @@ -240,8 +237,6 @@ GdkpixbufInput::init(void) g_strfreev(mimetypes); g_strfreev(extensions); } - - g_slist_free(formatlisthead); } } } } /* namespace Inkscape, Extension, Implementation */ |
