After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768043 - Some GdkPixbuf option helpers
Some GdkPixbuf option helpers
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2016-06-25 19:31 UTC by Bastien Nocera
Modified: 2016-08-02 18:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk-pixbuf: Add gdk_pixbuf_copy_options() helper (3.01 KB, patch)
2016-06-25 19:31 UTC, Bastien Nocera
committed Details | Review
gdk-pixbuf: Add gdk_pixbuf_remove_option() helper (3.82 KB, patch)
2016-06-25 19:31 UTC, Bastien Nocera
committed Details | Review
tests: Add tests for new options helpers (1.66 KB, patch)
2016-06-25 19:31 UTC, Bastien Nocera
committed Details | Review
gdk-pixbuf: Mention copy_options() in copy() (967 bytes, patch)
2016-06-25 19:31 UTC, Bastien Nocera
committed Details | Review
gdk-pixbuf: Make set_option() usable in client code (1.81 KB, patch)
2016-06-26 09:55 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-06-25 19:31:37 UTC
.
Comment 1 Bastien Nocera 2016-06-25 19:31:42 UTC
Created attachment 330372 [details] [review]
gdk-pixbuf: Add gdk_pixbuf_copy_options() helper
Comment 2 Bastien Nocera 2016-06-25 19:31:48 UTC
Created attachment 330373 [details] [review]
gdk-pixbuf: Add gdk_pixbuf_remove_option() helper
Comment 3 Bastien Nocera 2016-06-25 19:31:53 UTC
Created attachment 330374 [details] [review]
tests: Add tests for new options helpers

Exercising copy_options() and remove_option().
Comment 4 Bastien Nocera 2016-06-25 19:31:58 UTC
Created attachment 330375 [details] [review]
gdk-pixbuf: Mention copy_options() in copy()
Comment 5 Bastien Nocera 2016-06-26 09:55:47 UTC
Created attachment 330392 [details] [review]
gdk-pixbuf: Make set_option() usable in client code

Not just in loaders.
Comment 6 Matthias Clasen 2016-07-01 13:56:36 UTC
Review of attachment 330372 [details] [review]:

This is just 'g_strdupv with a funny hat' ? I guess it doesn't hurt much...
Comment 7 Matthias Clasen 2016-07-01 13:56:38 UTC
Review of attachment 330372 [details] [review]:

This is just 'g_strdupv with a funny hat' ? I guess it doesn't hurt much...
Comment 8 Matthias Clasen 2016-07-01 14:04:08 UTC
Review of attachment 330373 [details] [review]:

ugh. this is uglier than one would hope for. Maybe we should redo the options storage in a more structured way. Anyway, I don't mind adding this api.
Can you add this to the docs too, please ?
Comment 9 Matthias Clasen 2016-07-01 14:05:25 UTC
Review of attachment 330374 [details] [review]:

Sure

::: tests/pixbuf-save.c
@@ +153,3 @@
+#endif
+  gdk_pixbuf_remove_option (pixbuf2, "tEXt::long-option-name123456789123456789123456789");
+  g_assert_false (gdk_pixbuf_remove_option (pixbuf2, "tEXt::option1"));

Should probably verify that the options on pixbuf2 are what we expect them to be, after this ?
Comment 10 Matthias Clasen 2016-07-01 14:05:52 UTC
Review of attachment 330375 [details] [review]:

sure
Comment 11 Matthias Clasen 2016-07-01 14:06:45 UTC
Review of attachment 330392 [details] [review]:

ok. Is this already in the docs ?
Comment 12 Matthias Clasen 2016-08-02 18:51:28 UTC
Attachment 330372 [details] pushed as f2206a3 - gdk-pixbuf: Add gdk_pixbuf_copy_options() helper
Attachment 330373 [details] pushed as 4d05ef0 - gdk-pixbuf: Add gdk_pixbuf_remove_option() helper
Attachment 330374 [details] pushed as be62101 - tests: Add tests for new options helpers
Attachment 330375 [details] pushed as ce4b2a8 - gdk-pixbuf: Mention copy_options() in copy()
Attachment 330392 [details] pushed as 6b75ef9 - gdk-pixbuf: Make set_option() usable in client code