[epiphany/wip/exalm/gtk4-overview: 9/9] Port to AdwTabOverview
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4-overview: 9/9] Port to AdwTabOverview
- Date: Mon, 29 Aug 2022 13:36:43 +0000 (UTC)
commit fb4f1152aa6924129fe08a8330ef7f66291a7703
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Aug 16 23:21:21 2022 +0400
Port to AdwTabOverview
org.gnome.Epiphany.json | 11 ++
src/ephy-action-bar-end.c | 12 ++
src/ephy-action-bar-end.h | 8 +-
src/ephy-action-bar.c | 17 +--
src/ephy-page-row.c | 219 ---------------------------
src/ephy-page-row.h | 42 -----
src/ephy-pages-button.c | 203 -------------------------
src/ephy-pages-button.h | 38 -----
src/ephy-pages-popover.c | 180 ----------------------
src/ephy-pages-popover.h | 40 -----
src/ephy-pages-view.c | 161 --------------------
src/ephy-pages-view.h | 39 -----
src/ephy-tab-view.c | 46 +++++-
src/ephy-tab-view.h | 7 +-
src/ephy-window.c | 116 +++++---------
src/meson.build | 4 -
src/resources/ephy-tab-counter-symbolic.svg | 3 -
src/resources/ephy-tab-overflow-symbolic.svg | 4 -
src/resources/epiphany.gresource.xml | 7 +-
src/resources/gtk/action-bar-end.ui | 6 +
src/resources/gtk/action-bar.ui | 4 +-
src/resources/gtk/page-row.ui | 65 --------
src/resources/gtk/pages-button.ui | 27 ----
src/resources/gtk/pages-popover.ui | 26 ----
src/resources/gtk/pages-view.ui | 46 ------
src/resources/gtk/tab-overview-menu.ui | 21 +++
src/resources/style.css | 17 ---
src/window-commands.c | 1 -
28 files changed, 152 insertions(+), 1218 deletions(-)
---
diff --git a/org.gnome.Epiphany.json b/org.gnome.Epiphany.json
index 8ac8d797b..c9f5b41c6 100644
--- a/org.gnome.Epiphany.json
+++ b/org.gnome.Epiphany.json
@@ -123,6 +123,17 @@
}
]
},
+ {
+ "name": "libadwaita",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/libadwaita.git",
+ "branch" : "wip/exalm/tab-overview"
+ }
+ ]
+ },
{
"name" : "epiphany",
"buildsystem" : "meson",
diff --git a/src/ephy-action-bar-end.c b/src/ephy-action-bar-end.c
index bc5d1200a..46f42ef2a 100644
--- a/src/ephy-action-bar-end.c
+++ b/src/ephy-action-bar-end.c
@@ -39,6 +39,7 @@ struct _EphyActionBarEnd {
GtkWidget *downloads_popover;
GtkWidget *downloads_icon;
GtkWidget *browser_action_box;
+ GtkWidget *overview_button;
GdkPaintable *downloads_paintable;
@@ -142,6 +143,9 @@ ephy_action_bar_end_class_init (EphyActionBarEndClass *klass)
gtk_widget_class_bind_template_child (widget_class,
EphyActionBarEnd,
browser_action_box);
+ gtk_widget_class_bind_template_child (widget_class,
+ EphyActionBarEnd,
+ overview_button);
}
static void
@@ -273,3 +277,11 @@ ephy_action_bar_end_set_bookmark_icon_state (EphyActionBarEnd *action_bar_e
g_assert_not_reached ();
}
}
+
+void
+ephy_action_bar_end_set_adaptive_mode (EphyActionBarEnd *action_bar_end,
+ EphyAdaptiveMode adaptive_mode)
+{
+ gtk_widget_set_visible (action_bar_end->overview_button,
+ adaptive_mode == EPHY_ADAPTIVE_MODE_NORMAL);
+}
diff --git a/src/ephy-action-bar-end.h b/src/ephy-action-bar-end.h
index ffecf9596..b9cf0219e 100644
--- a/src/ephy-action-bar-end.h
+++ b/src/ephy-action-bar-end.h
@@ -21,10 +21,11 @@
#pragma once
-#include "ephy-bookmark-states.h"
-
#include <gtk/gtk.h>
+#include "ephy-adaptive-mode.h"
+#include "ephy-bookmark-states.h"
+
G_BEGIN_DECLS
#define EPHY_TYPE_ACTION_BAR_END (ephy_action_bar_end_get_type ())
@@ -47,4 +48,7 @@ void ephy_action_bar_end_set_show_bookmark_button (EphyActionBarEnd
void ephy_action_bar_end_set_bookmark_icon_state (EphyActionBarEnd *action_bar_end,
EphyBookmarkIconState state);
+void ephy_action_bar_end_set_adaptive_mode (EphyActionBarEnd *action_bar_end,
+ EphyAdaptiveMode adaptive_mode);
+
G_END_DECLS
diff --git a/src/ephy-action-bar.c b/src/ephy-action-bar.c
index a381a8756..1f919ac38 100644
--- a/src/ephy-action-bar.c
+++ b/src/ephy-action-bar.c
@@ -21,7 +21,6 @@
#include "ephy-action-bar.h"
#include "ephy-add-bookmark-popover.h"
-#include "ephy-pages-button.h"
#include "ephy-settings.h"
#include "ephy-shell.h"
#include "ephy-tab-view.h"
@@ -42,7 +41,7 @@ struct _EphyActionBar {
GtkRevealer *revealer;
EphyActionBarStart *action_bar_start;
EphyActionBarEnd *action_bar_end;
- EphyPagesButton *pages_button;
+ AdwTabButton *pages_button;
EphyAdaptiveMode adaptive_mode;
gboolean can_reveal;
@@ -131,9 +130,8 @@ ephy_action_bar_constructed (GObject *object)
G_CALLBACK (sync_chromes_visibility), action_bar,
G_CONNECT_SWAPPED);
- g_object_bind_property (view, "n-pages",
- action_bar->pages_button, "n-pages",
- G_BINDING_SYNC_CREATE);
+ adw_tab_button_set_view (ADW_TAB_BUTTON (action_bar->pages_button),
+ ephy_tab_view_get_tab_view (view));
}
static void
@@ -184,21 +182,16 @@ ephy_action_bar_class_init (EphyActionBarClass *klass)
static void
ephy_action_bar_init (EphyActionBar *action_bar)
{
- EphyEmbedShellMode mode;
-
/* Ensure the types used by the template have been initialized. */
EPHY_TYPE_ACTION_BAR_END;
EPHY_TYPE_ACTION_BAR_START;
- EPHY_TYPE_PAGES_BUTTON;
gtk_widget_init_template (GTK_WIDGET (action_bar));
- mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (ephy_shell_get_default ()));
- gtk_widget_set_visible (GTK_WIDGET (action_bar->pages_button),
- mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
-
ephy_action_bar_start_set_adaptive_mode (action_bar->action_bar_start,
EPHY_ADAPTIVE_MODE_NARROW);
+ ephy_action_bar_end_set_adaptive_mode (action_bar->action_bar_end,
+ EPHY_ADAPTIVE_MODE_NARROW);
g_object_bind_property (action_bar->revealer, "child-revealed",
action_bar, "visible",
diff --git a/src/ephy-tab-view.c b/src/ephy-tab-view.c
index b80c4e6e5..075018582 100644
--- a/src/ephy-tab-view.c
+++ b/src/ephy-tab-view.c
@@ -34,6 +34,7 @@ struct _EphyTabView {
AdwTabView *tab_view;
AdwTabBar *tab_bar;
+ AdwTabOverview *tab_overview;
AdwTabPage *current_page;
};
@@ -402,6 +403,20 @@ update_icon_cb (AdwTabPage *page)
adw_tab_page_set_icon (page, placeholder_icon);
}
+static void
+update_uri_cb (AdwTabPage *page)
+{
+ EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
+ EphyWebView *view = ephy_embed_get_web_view (embed);
+ const char *uri;
+
+ update_icon_cb (page);
+
+ uri = webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view));
+
+ adw_tab_page_set_keyword (page, uri);
+}
+
static void
update_indicator_cb (AdwTabPage *page)
{
@@ -459,7 +474,7 @@ ephy_tab_view_add_tab (EphyTabView *self,
G_CALLBACK (update_icon_cb), page,
G_CONNECT_SWAPPED);
g_signal_connect_object (view, "notify::uri",
- G_CALLBACK (update_icon_cb), page,
+ G_CALLBACK (update_uri_cb), page,
G_CONNECT_SWAPPED);
g_signal_connect_object (view, "notify::is-playing-audio",
G_CALLBACK (update_indicator_cb), page,
@@ -469,7 +484,7 @@ ephy_tab_view_add_tab (EphyTabView *self,
G_CONNECT_SWAPPED);
update_title_cb (page);
- update_icon_cb (page);
+ update_uri_cb (page);
update_indicator_cb (page);
return adw_tab_view_get_page_position (self->tab_view, page);
@@ -588,7 +603,13 @@ is_layout_reversed (void)
static void
notify_decoration_layout_cb (EphyTabView *self)
{
- adw_tab_bar_set_inverted (self->tab_bar, is_layout_reversed ());
+ gboolean inverted = is_layout_reversed ();
+
+ if (self->tab_bar)
+ adw_tab_bar_set_inverted (self->tab_bar, inverted);
+
+ if (self->tab_overview)
+ adw_tab_overview_set_inverted (self->tab_overview, inverted);
}
void
@@ -645,3 +666,22 @@ ephy_tab_view_set_tab_bar (EphyTabView *self,
visibility_policy_changed_cb (self);
notify_decoration_layout_cb (self);
}
+
+void
+ephy_tab_view_set_tab_overview (EphyTabView *self,
+ AdwTabOverview *tab_overview)
+{
+ self->tab_overview = tab_overview;
+
+ adw_tab_overview_setup_extra_drop_target (tab_overview, GDK_ACTION_COPY, (GType[3]) {
+ G_TYPE_STRING,
+ G_TYPE_FILE,
+ GDK_TYPE_FILE_LIST,
+ }, 3);
+
+ g_signal_connect_object (tab_overview, "extra-drag-drop",
+ G_CALLBACK (drag_drop_cb), self,
+ G_CONNECT_SWAPPED);
+
+ notify_decoration_layout_cb (self);
+}
diff --git a/src/ephy-tab-view.h b/src/ephy-tab-view.h
index fd6c04484..c74f675cf 100644
--- a/src/ephy-tab-view.h
+++ b/src/ephy-tab-view.h
@@ -81,7 +81,8 @@ gint ephy_tab_view_add_tab (EphyTabView *self,
GtkWidget *ephy_tab_view_get_current_page (EphyTabView *self);
-void ephy_tab_view_set_tab_bar (EphyTabView *self,
- AdwTabBar *tab_bar);
-
+void ephy_tab_view_set_tab_bar (EphyTabView *self,
+ AdwTabBar *tab_bar);
+void ephy_tab_view_set_tab_overview (EphyTabView *self,
+ AdwTabOverview *tab_overview);
G_END_DECLS
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 365f73867..17ca81569 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -47,8 +47,6 @@
#include "ephy-link.h"
#include "ephy-location-entry.h"
#include "ephy-mouse-gesture-controller.h"
-#include "ephy-pages-popover.h"
-#include "ephy-pages-view.h"
#include "ephy-permissions-manager.h"
#include "ephy-prefs.h"
#include "ephy-security-popover.h"
@@ -151,18 +149,15 @@ static guint64 window_uid = 1;
struct _EphyWindow {
AdwApplicationWindow parent_instance;
- GtkWidget *main_leaflet;
+ GtkWidget *overview;
EphyFullscreenBox *fullscreen_box;
GtkBox *titlebar_box;
GtkWidget *header_bar;
- EphyPagesView *pages_view;
EphyBookmarksManager *bookmarks_manager;
GHashTable *action_labels;
EphyTabView *tab_view;
AdwTabBar *tab_bar;
GtkRevealer *tab_bar_revealer;
- GtkRevealer *pages_menu_revealer;
- EphyPagesPopover *pages_popover;
GtkWidget *action_bar;
EphyEmbed *active_embed;
EphyWindowChrome chrome;
@@ -351,7 +346,12 @@ ephy_window_open_link (EphyLink *link,
EPHY_LINK_NEW_TAB |
EPHY_LINK_NEW_WINDOW)) {
EphyNewTabFlags ntflags = 0;
- EphyWindow *target_window = EPHY_WINDOW (gtk_widget_get_root (GTK_WIDGET (embed)));
+ EphyWindow *target_window;
+
+ if (embed == NULL)
+ target_window = window;
+ else
+ target_window = EPHY_WINDOW (gtk_widget_get_root (GTK_WIDGET (embed)));
if (flags & EPHY_LINK_JUMP_TO) {
ntflags |= EPHY_NEW_TAB_JUMP;
@@ -533,12 +533,6 @@ update_adaptive_mode (EphyWindow *window)
gtk_revealer_set_reveal_child (window->tab_bar_revealer,
adaptive_mode == EPHY_ADAPTIVE_MODE_NORMAL);
-
- /* When switching to desktop sizes, drop the tabs view and go back
- * to the main view.
- */
- if (adaptive_mode == EPHY_ADAPTIVE_MODE_NORMAL)
- ephy_window_close_pages_view (window);
}
static void
@@ -2726,6 +2720,9 @@ tab_view_page_detached_cb (AdwTabView *tab_view,
g_signal_handlers_disconnect_by_func
(ephy_embed_get_web_view (EPHY_EMBED (content)), G_CALLBACK (download_only_load_cb), window);
+
+ if (ephy_tab_view_get_n_pages (window->tab_view) == 0)
+ window->active_embed = NULL;
}
static void
@@ -2765,7 +2762,8 @@ ephy_window_close_tab (EphyWindow *window,
* Beware: window->closing could be true now, after destroying the
* tab, even if it wasn't at the start of this function.
*/
- if (!window->closing && ephy_tab_view_get_n_pages (window->tab_view) == 0)
+ if (!window->closing && ephy_tab_view_get_n_pages (window->tab_view) == 0 &&
+ !adw_tab_overview_get_open (ADW_TAB_OVERVIEW (window->overview)))
gtk_window_destroy (GTK_WINDOW (window));
}
@@ -3323,48 +3321,6 @@ setup_header_bar (EphyWindow *window)
return header_bar;
}
-static void
-update_pages_menu_revealer (EphyWindow *window)
-{
- gtk_revealer_set_reveal_child (window->pages_menu_revealer,
- adw_tab_bar_get_is_overflowing (window->tab_bar) ||
- gtk_widget_get_visible (GTK_WIDGET (window->pages_popover)));
-}
-
-static void
-setup_tabs_menu (EphyWindow *window)
-{
- GtkRevealer *revealer;
- GtkWidget *menu_button;
- EphyPagesPopover *popover;
-
- revealer = GTK_REVEALER (gtk_revealer_new ());
- gtk_revealer_set_transition_type (revealer,
- GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT);
- adw_tab_bar_set_end_action_widget (window->tab_bar, GTK_WIDGET (revealer));
- window->pages_menu_revealer = revealer;
-
- menu_button = gtk_menu_button_new ();
- gtk_widget_add_css_class (menu_button, "flat");
- /* Translators: tooltip for the tab switcher menu button */
- gtk_widget_set_tooltip_text (menu_button, _("View open tabs"));
- gtk_widget_set_margin_start (menu_button, 1);
- gtk_revealer_set_child (revealer, menu_button);
-
- popover = ephy_pages_popover_new ();
- ephy_pages_popover_set_tab_view (popover, window->tab_view);
- gtk_menu_button_set_popover (GTK_MENU_BUTTON (menu_button),
- GTK_WIDGET (popover));
- window->pages_popover = popover;
-
- g_signal_connect_object (window->tab_bar, "notify::is-overflowing",
- G_CALLBACK (update_pages_menu_revealer), window,
- G_CONNECT_SWAPPED);
- g_signal_connect_object (window->pages_popover, "notify::visible",
- G_CALLBACK (update_pages_menu_revealer), window,
- G_CONNECT_SWAPPED);
-}
-
static EphyLocationController *
setup_location_controller (EphyWindow *window,
EphyHeaderBar *header_bar)
@@ -3534,13 +3490,13 @@ download_completed_cb (EphyDownload *download,
}
static void
-notify_leaflet_child_cb (EphyWindow *window)
+notify_overview_open_cb (EphyWindow *window)
{
GActionGroup *action_group;
GAction *action;
gboolean pages_open;
- pages_open = adw_leaflet_get_visible_child (ADW_LEAFLET (window->main_leaflet)) == GTK_WIDGET
(window->pages_view);
+ pages_open = adw_tab_overview_get_open (ADW_TAB_OVERVIEW (window->overview));
action_group = ephy_window_get_action_group (window, "win");
action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "content");
@@ -3550,6 +3506,16 @@ notify_leaflet_child_cb (EphyWindow *window)
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), !pages_open);
}
+static AdwTabPage *
+create_tab_cb (EphyWindow *window)
+{
+ AdwTabView *view = ephy_tab_view_get_tab_view (window->tab_view);
+
+ window_cmd_new_tab (NULL, NULL, window);
+
+ return adw_tab_view_get_selected_page (view);
+}
+
static void
insert_action_group (const char *prefix,
GActionGroup *group,
@@ -3572,6 +3538,7 @@ ephy_window_constructed (GObject *object)
EphyWindowChrome chrome = EPHY_WINDOW_CHROME_DEFAULT;
GApplication *app;
GtkEventController *controller;
+ g_autoptr (GtkBuilder) builder = NULL;
G_OBJECT_CLASS (ephy_window_parent_class)->constructed (object);
@@ -3649,19 +3616,22 @@ ephy_window_constructed (GObject *object)
window->tab_view = setup_tab_view (window);
window->tab_bar = adw_tab_bar_new ();
window->tab_bar_revealer = GTK_REVEALER (gtk_revealer_new ());
- window->main_leaflet = adw_leaflet_new ();
+ window->overview = adw_tab_overview_new ();
window->fullscreen_box = ephy_fullscreen_box_new ();
- window->pages_view = ephy_pages_view_new ();
- adw_leaflet_set_can_unfold (ADW_LEAFLET (window->main_leaflet), FALSE);
- g_signal_connect_swapped (window->main_leaflet, "notify::visible-child",
- G_CALLBACK (notify_leaflet_child_cb), window);
+ builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/tab-overview-menu.ui");
+
+ adw_tab_overview_set_enable_new_tab (ADW_TAB_OVERVIEW (window->overview), TRUE);
+ adw_tab_overview_set_extra_menu (ADW_TAB_OVERVIEW (window->overview),
+ G_MENU_MODEL (gtk_builder_get_object (builder, "overview-menu")));
+ g_signal_connect_swapped (window->overview, "notify::open",
+ G_CALLBACK (notify_overview_open_cb), window);
+ g_signal_connect_swapped (window->overview, "create-tab",
+ G_CALLBACK (create_tab_cb), window);
gtk_revealer_set_transition_type (window->tab_bar_revealer, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
adw_tab_bar_set_view (window->tab_bar, ephy_tab_view_get_tab_view (window->tab_view));
- ephy_pages_view_set_tab_view (window->pages_view, window->tab_view);
-
- setup_tabs_menu (window);
+ adw_tab_overview_set_view (ADW_TAB_OVERVIEW (window->overview), ephy_tab_view_get_tab_view
(window->tab_view));
shell = ephy_shell_get_default ();
mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (shell));
@@ -3692,14 +3662,12 @@ ephy_window_constructed (GObject *object)
ephy_fullscreen_box_set_content (window->fullscreen_box, GTK_WIDGET (box));
ephy_fullscreen_box_set_titlebar (window->fullscreen_box, GTK_WIDGET (window->titlebar_box));
- adw_leaflet_append (ADW_LEAFLET (window->main_leaflet), GTK_WIDGET (window->fullscreen_box));
- adw_leaflet_append (ADW_LEAFLET (window->main_leaflet), GTK_WIDGET (window->pages_view));
- adw_application_window_set_content (ADW_APPLICATION_WINDOW (window), GTK_WIDGET (window->main_leaflet));
+ adw_tab_overview_set_child (ADW_TAB_OVERVIEW (window->overview),
+ GTK_WIDGET (window->fullscreen_box));
+ adw_application_window_set_content (ADW_APPLICATION_WINDOW (window), GTK_WIDGET (window->overview));
ephy_tab_view_set_tab_bar (window->tab_view, window->tab_bar);
-
- adw_leaflet_set_visible_child (ADW_LEAFLET (window->main_leaflet), GTK_WIDGET (window->fullscreen_box));
- adw_leaflet_set_can_navigate_back (ADW_LEAFLET (window->main_leaflet), TRUE);
+ ephy_tab_view_set_tab_overview (window->tab_view, ADW_TAB_OVERVIEW (window->overview));
/* other notifiers */
action_group = ephy_window_get_action_group (window, "win");
@@ -3875,7 +3843,7 @@ ephy_window_open_pages_view (EphyWindow *window)
{
g_assert (EPHY_IS_WINDOW (window));
- adw_leaflet_navigate (ADW_LEAFLET (window->main_leaflet), ADW_NAVIGATION_DIRECTION_FORWARD);
+ adw_tab_overview_set_open (ADW_TAB_OVERVIEW (window->overview), TRUE);
}
/**
@@ -3889,7 +3857,7 @@ ephy_window_close_pages_view (EphyWindow *window)
{
g_assert (EPHY_IS_WINDOW (window));
- adw_leaflet_navigate (ADW_LEAFLET (window->main_leaflet), ADW_NAVIGATION_DIRECTION_BACK);
+ adw_tab_overview_set_open (ADW_TAB_OVERVIEW (window->overview), FALSE);
}
/**
diff --git a/src/meson.build b/src/meson.build
index 7e0b52438..1aa1f6b8a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -36,10 +36,6 @@ libephymain_sources = [
'ephy-location-controller.c',
'ephy-lockdown.c',
'ephy-mouse-gesture-controller.c',
- 'ephy-page-row.c',
- 'ephy-pages-button.c',
- 'ephy-pages-popover.c',
- 'ephy-pages-view.c',
'ephy-session.c',
'ephy-shell.c',
'ephy-suggestion-model.c',
diff --git a/src/resources/epiphany.gresource.xml b/src/resources/epiphany.gresource.xml
index 120497952..27b389897 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -18,10 +18,6 @@
<file preprocess="xml-stripblanks" compressed="true">gtk/location-entry.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/notebook-context-menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/page-menu-popover.ui</file>
- <file preprocess="xml-stripblanks" compressed="true">gtk/page-row.ui</file>
- <file preprocess="xml-stripblanks" compressed="true">gtk/pages-button.ui</file>
- <file preprocess="xml-stripblanks" compressed="true">gtk/pages-popover.ui</file>
- <file preprocess="xml-stripblanks" compressed="true">gtk/pages-view.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/passwords-view.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/prefs-appearance-page.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/prefs-dialog.ui</file>
@@ -32,6 +28,7 @@
<file preprocess="xml-stripblanks" compressed="true">gtk/search-engine-row.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/synced-tabs-dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/shortcuts-dialog.ui</file>
+ <file preprocess="xml-stripblanks" compressed="true">gtk/tab-overview-menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/webapp-additional-urls-dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/web-extensions-dialog.ui</file>
</gresource>
@@ -59,8 +56,6 @@
<file compressed="true"
alias="scalable/status/ephy-non-starred-symbolic.svg">ephy-non-starred-symbolic.svg</file>
<file compressed="true"
alias="scalable/status/ephy-open-link-symbolic.svg">ephy-open-link-symbolic.svg</file>
<file compressed="true"
alias="scalable/status/ephy-starred-symbolic.svg">ephy-starred-symbolic.svg</file>
- <file compressed="true"
alias="scalable/status/ephy-tab-counter-symbolic.svg">ephy-tab-counter-symbolic.svg</file>
- <file compressed="true"
alias="scalable/status/ephy-tab-overflow-symbolic.svg">ephy-tab-overflow-symbolic.svg</file>
<file compressed="true"
alias="scalable/status/ephy-library-symbolic.svg">ephy-library-symbolic.svg</file>
<file compressed="true"
alias="scalable/status/ephy-webpage-symbolic.svg">ephy-webpage-symbolic.svg</file>
</gresource>
diff --git a/src/resources/gtk/action-bar-end.ui b/src/resources/gtk/action-bar-end.ui
index 08ac80396..05676cbf8 100644
--- a/src/resources/gtk/action-bar-end.ui
+++ b/src/resources/gtk/action-bar-end.ui
@@ -27,6 +27,12 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkButton" id="overview_button">
+ <property name="icon-name">view-grid-symbolic</property>
+ <property name="action-name">win.tabs-view</property>
+ </object>
+ </child>
<child>
<object class="GtkMenuButton" id="bookmark_button">
<!-- Translators: tooltip for the bookmark button -->
diff --git a/src/resources/gtk/action-bar.ui b/src/resources/gtk/action-bar.ui
index dc1851c20..162035fb8 100644
--- a/src/resources/gtk/action-bar.ui
+++ b/src/resources/gtk/action-bar.ui
@@ -10,9 +10,7 @@
<object class="EphyActionBarStart" id="action_bar_start"/>
</child>
<child type="end">
- <object class="EphyPagesButton" id="pages_button">
- <!-- Translators: tooltip for the page switcher button -->
- <property name="tooltip_text" translatable="yes">View open pages</property>
+ <object class="AdwTabButton" id="pages_button">
<property name="action_name">win.tabs-view</property>
</object>
</child>
diff --git a/src/resources/gtk/tab-overview-menu.ui b/src/resources/gtk/tab-overview-menu.ui
new file mode 100644
index 000000000..13e87290c
--- /dev/null
+++ b/src/resources/gtk/tab-overview-menu.ui
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <menu id="overview-menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_New Window</attribute>
+ <attribute name="action">app.new-window</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">New _Incognito Window</attribute>
+ <attribute name="action">app.new-incognito</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Reopen Closed _Tab</attribute>
+ <attribute name="action">app.reopen-closed-tab</attribute>
+ </item>
+ </section>
+ </menu>
+</interface>
diff --git a/src/resources/style.css b/src/resources/style.css
index e86eb4c84..120d7b4a8 100644
--- a/src/resources/style.css
+++ b/src/resources/style.css
@@ -187,23 +187,6 @@ fullscreenbox > flap > shadow {
background: linear-gradient(to bottom, alpha(black, .1), alpha(black, .0));
}
-.pages-list row {
- min-height: 30px;
- padding: 3px;
-}
-
-.pages-list .close-button {
- border-radius: 100%;
- padding: 0;
- min-width: 28px;
- min-height: 28px;
-}
-
-#pages-view .close-button {
- min-width: 36px;
- min-height: 36px;
-}
-
dnd > .boxed-list {
margin: 6px;
background-color: @window_bg_color;
diff --git a/src/window-commands.c b/src/window-commands.c
index 215fa2187..265e76fc7 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -1338,7 +1338,6 @@ window_cmd_new_tab (GSimpleAction *action,
ephy_link_open (EPHY_LINK (window),
url, NULL,
EPHY_LINK_NEW_TAB | EPHY_LINK_JUMP_TO);
- ephy_window_close_pages_view (window);
g_free (url);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]