Bug 210276 - [GTK4] Get MiniBrowser ready for GTK4
Summary: [GTK4] Get MiniBrowser ready for GTK4
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 211171 212740 212817 212898
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-04-09 07:10 PDT by Claudio Saavedra
Modified: 2020-06-12 01:42 PDT (History)
3 users (show)

See Also:


Attachments
Patch (95.66 KB, patch)
2020-06-11 04:37 PDT, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Claudio Saavedra 2020-04-09 07:10:06 PDT
There are several widgets that are no longer available in GTK4: toolbars, tool menu items, etc. Also GtkAction is gone. The MiniBrowser UI should be rewritten to use widgets that are both available in GTK3 and GTK4.
Comment 1 Carlos Garcia Campos 2020-06-11 04:37:40 PDT
Created attachment 401632 [details]
Patch
Comment 2 Adrian Perez 2020-06-12 01:10:38 PDT
Comment on attachment 401632 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401632&action=review

> Tools/MiniBrowser/gtk/BrowserSearchBox.c:74
> +    action = g_action_map_lookup_action(G_ACTION_MAP(searchBox->actionGroup), "beginnig-word");

Typo: beginnig → beginning.

I saw this in one of the dependant patches, so if you fix it on the other
patch first I suppose when you rebase this one you'll get it fixed, too :)

> Tools/MiniBrowser/gtk/BrowserSearchBox.c:131
> +    gtk_editable_set_text(GTK_EDITABLE(searchBox->entry), "");

I was about to mention this could be in “GtkVersioning.h”, but of
course we only want to use public headers in the MiniBrowser 😅️

Maybe it would be neat to have such a header for the MiniBrowser?
My feeling is that it would simplify quite a lot the #if-#endif
churn in many places along this patch.
Comment 3 Carlos Garcia Campos 2020-06-12 01:30:47 PDT
(In reply to Adrian Perez from comment #2)
> Comment on attachment 401632 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=401632&action=review
> 
> > Tools/MiniBrowser/gtk/BrowserSearchBox.c:74
> > +    action = g_action_map_lookup_action(G_ACTION_MAP(searchBox->actionGroup), "beginnig-word");
> 
> Typo: beginnig → beginning.
> 
> I saw this in one of the dependant patches, so if you fix it on the other
> patch first I suppose when you rebase this one you'll get it fixed, too :)
> 
> > Tools/MiniBrowser/gtk/BrowserSearchBox.c:131
> > +    gtk_editable_set_text(GTK_EDITABLE(searchBox->entry), "");
> 
> I was about to mention this could be in “GtkVersioning.h”, but of
> course we only want to use public headers in the MiniBrowser 😅️
> 
> Maybe it would be neat to have such a header for the MiniBrowser?
> My feeling is that it would simplify quite a lot the #if-#endif
> churn in many places along this patch.

I thought about this, but MiniBrowser code doesn't change that much and I think it will be easier to remove the code when we stop supporting gtk3.
Comment 4 Carlos Garcia Campos 2020-06-12 01:42:57 PDT
Committed r262939: <https://trac.webkit.org/changeset/262939>