[epiphany] Change ephy-window to DzlApplicationWindow
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Change ephy-window to DzlApplicationWindow
- Date: Sun, 22 Jul 2018 16:33:38 +0000 (UTC)
commit c81abeab99e2f8f48ab52557aa168eafa31677f4
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Mon Jul 2 22:09:13 2018 +0200
Change ephy-window to DzlApplicationWindow
Change from GtkApplicationWindow to DzlApplicationWindow comes with the benefit of showing header bar
within fullscreen on mouse moving.
meson.build | 2 +-
src/ephy-window.c | 9 ++++-----
src/ephy-window.h | 2 +-
subprojects/libdazzle.wrap | 4 ++++
4 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index cd84e4825..170cb6953 100644
--- a/meson.build
+++ b/meson.build
@@ -70,7 +70,7 @@ nettle_requirement = '>= 3.2'
webkitgtk_requirement = '>= 2.21.5'
cairo_dep = dependency('cairo', version: '>= 1.2')
-dazzle_dep = dependency('libdazzle-1.0', version: '>= 3.28.0')
+dazzle_dep = dependency('libdazzle-1.0', version: '>= 3.29.4', fallback : ['libdazzle', 'libdazzle_dep'])
gcr_dep = dependency('gcr-3', version: '>= 3.5.5')
gdk_dep = dependency('gdk-3.0', version: gtk_requirement)
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.36.5')
diff --git a/src/ephy-window.c b/src/ephy-window.c
index a86fd45b2..ab7e0c000 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -136,7 +136,7 @@ const struct {
#define SETTINGS_CONNECTION_DATA_KEY "EphyWindowSettings"
struct _EphyWindow {
- GtkApplicationWindow parent_instance;
+ DzlApplicationWindow parent_instance;
GtkWidget *header_bar;
EphyBookmarksManager *bookmarks_manager;
@@ -392,7 +392,7 @@ ephy_window_link_iface_init (EphyLinkInterface *iface)
iface->open_link = ephy_window_open_link;
}
-G_DEFINE_TYPE_WITH_CODE (EphyWindow, ephy_window, GTK_TYPE_APPLICATION_WINDOW,
+G_DEFINE_TYPE_WITH_CODE (EphyWindow, ephy_window, DZL_TYPE_APPLICATION_WINDOW,
G_IMPLEMENT_INTERFACE (EPHY_TYPE_LINK,
ephy_window_link_iface_init)
G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_CONTAINER,
@@ -490,7 +490,6 @@ ephy_window_fullscreen (EphyWindow *window)
sync_tab_security (ephy_embed_get_web_view (embed), NULL, window);
sync_chromes_visibility (window);
- gtk_widget_hide (window->header_bar);
ephy_embed_entering_fullscreen (embed);
}
@@ -499,7 +498,6 @@ ephy_window_unfullscreen (EphyWindow *window)
{
window->is_fullscreen = FALSE;
- gtk_widget_show (window->header_bar);
sync_chromes_visibility (window);
ephy_embed_leaving_fullscreen (window->active_embed);
}
@@ -2846,6 +2844,7 @@ ephy_window_state_event (GtkWidget *widget,
} else {
ephy_window_unfullscreen (window);
}
+ dzl_application_window_set_fullscreen (DZL_APPLICATION_WINDOW (window), fullscreen);
action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "fullscreen");
@@ -3075,7 +3074,7 @@ setup_header_bar (EphyWindow *window)
EphyTitleWidget *title_widget;
header_bar = ephy_header_bar_new (window);
- gtk_window_set_titlebar (GTK_WINDOW (window), header_bar);
+ dzl_application_window_set_titlebar (DZL_APPLICATION_WINDOW (window), header_bar);
gtk_widget_show (header_bar);
app_mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 1a6feab4d..db9fa5cdd 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
#define EPHY_TYPE_WINDOW (ephy_window_get_type ())
-G_DECLARE_FINAL_TYPE (EphyWindow, ephy_window, EPHY, WINDOW, GtkApplicationWindow)
+G_DECLARE_FINAL_TYPE (EphyWindow, ephy_window, EPHY, WINDOW, DzlApplicationWindow)
typedef enum
{
diff --git a/subprojects/libdazzle.wrap b/subprojects/libdazzle.wrap
new file mode 100644
index 000000000..a4736f3ca
--- /dev/null
+++ b/subprojects/libdazzle.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+directory=libdazzle
+url=https://gitlab.gnome.org/GNOME/libdazzle.git
+revision=2f3ad0f1c5c1a0a28c4b211f2a1bc5179eed4eb7
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]