[Webkit-unassigned] [Bug 212322] [GTK4] Implement file chooser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 2 05:11:12 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=212322

--- Comment #12 from Santosh Mahto <santosh.mahto at collabora.com> ---
(In reply to Carlos Garcia Campos from comment #9)
> Comment on attachment 400733 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=400733&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +
> > +        Added two function in GtkVersioning.h required
> > +        to make FileChooser working with gtk4.
> > +
> > +        Covered by existing tests.
> 
> You should keep the Reviewed by nobody line in the changelog, it will be
> filled automatically once the patch is accepted.
> 
> > Source/WebKit/ChangeLog:7
> > +
> > +        Enable FileChooser launch with gtk4.
> > +
> 
> Ditto.
> 
> > Source/WebCore/platform/gtk/GtkVersioning.h:23
> > +#include <wtf/glib/GRefPtr.h>
> 
> We have avoided other dependencies to this file, keeping it gtk only. Maybe
> wtf could be the only acceptable dep since all other layers depend on wtf.
> 
> > Source/WebCore/platform/gtk/GtkVersioning.h:166
> > +    if (filename) {
> 
> gtk_file_chooser_select_filename in gtk3 doesn't allow to pass a null
> filename, so we shouldn't here either. Add g_return macros to check
> parameters instead.
> 
> > Source/WebCore/platform/gtk/GtkVersioning.h:168
> > +        return gtk_file_chooser_select_file(chooser, file.get(), NULL);
> 
> This is also present in gtk3, so I think it's better to use
> gtk_file_chooser_select_file instead of adding
> gtk_file_chooser_select_filename definition.
> 
> > Source/WebCore/platform/gtk/GtkVersioning.h:178
> > +    files = gtk_file_chooser_get_files(chooser);
> 
> Same here. We can just use gtk_file_chooser_get_files() for both gtk3 and
> gtk4.


Good idea, this way we don't need to add new functions in GtkVersioning.h, thanks for hinting that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200602/e07c2421/attachment.htm>


More information about the webkit-unassigned mailing list