GNOME Bugzilla – Bug 768659
gtk/gtkfilechoosernativeportal.c: Don't use g_autoptr()
Last modified: 2017-04-04 16:22:27 UTC
Hi, Lately there has been works to use xdg-desktop-portal/flatpak in the various parts of GTK, where an oversight crept into the code due to the use of g_autoptr() that is available to GCC and CLang. I will post a patch to address this. With blessings, thank you!
Created attachment 331198 [details] [review] gtk/gtkfilechoosernativeportal.c: Don't use g_autoptr() Hi, Here's the patch. With blessings, thank you!
Since the portal file chooser is not supposed to be used on platforms without flatpak/portal, I think it would be better to not build it at all on those platforms.
Review of attachment 331198 [details] [review]: While it is true that the portal code is only targeting Unix, the autoptr was still an oversight, didn't mean to start sneak those into gtk through the backdoor.
Created attachment 331231 [details] [review] gtk: Build portal items only on *NIX Hi Matthias/Emmanuele, Thanks, but I thought it might be better to have a new patch to build the portal stuff only on *NIX, in addition to getting rid of the g_autoptr() usage, which is incorporated in this patch. With blessings, thank you!
Not sure I like unnecessary ifdefs cluttering up the code - if it builds on win32 and does no harm, can't we just leave it as is ?
Comment on attachment 331198 [details] [review] gtk/gtkfilechoosernativeportal.c: Don't use g_autoptr() Hi, Since the initial intent of this is to fix the build on non-GCC/CLang, I thought I would push the first patch[1], as it was ack'ed. Please let me know if excluding the portal items here is still the preferred way to go, as that would involve the #ifdef's, as in the second patch. I will keep the bug open for now. [1]: Attachment 331198 [details] was pushed as d8815f3. With blessings, thank you!
So this is fixed?
Hi Timm, Since the consensus is to leave the portal items as-is, so I think we can close this as fixed. Sorry for not updating this! With blessings, and cheers!