Commit f2b48590 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko
Browse files

Update patches

parent 1f6bad6b
......@@ -3,14 +3,14 @@ Date: Fri, 2 Jul 2010 23:20:04 +0000
Subject: Install as epiphany-browser not epiphany
---
meson.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: epiphany-3.33.91/meson.build
===================================================================
--- epiphany-3.33.91.orig/meson.build
+++ epiphany-3.33.91/meson.build
@@ -23,9 +23,9 @@ libdir = join_paths(prefix, get_option('
diff --git a/meson.build b/meson.build
index e447f69..2ec5113 100644
--- a/meson.build
+++ b/meson.build
@@ -23,9 +23,9 @@ libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
liblocaledir = join_paths(prefix, libdir, 'locale')
localedir = join_paths(prefix, get_option('localedir'))
......@@ -23,4 +23,3 @@ Index: epiphany-3.33.91/meson.build
servicedir = join_paths(datadir, 'dbus-1', 'services')
webprocessextensionsdir = join_paths(pkglibdir, 'web-process-extensions')
......@@ -10,13 +10,13 @@ Allow users to uninstall this app if they wish.
Applied-upstream: no
Forwarded: https://gitlab.gnome.org/GNOME/epiphany/merge_requests/31
---
data/org.gnome.Epiphany.appdata.xml.in | 1 -
data/org.gnome.Epiphany.appdata.xml.in.in | 1 -
1 file changed, 1 deletion(-)
Index: epiphany-3.33.91/data/org.gnome.Epiphany.appdata.xml.in.in
===================================================================
--- epiphany-3.33.91.orig/data/org.gnome.Epiphany.appdata.xml.in.in
+++ epiphany-3.33.91/data/org.gnome.Epiphany.appdata.xml.in.in
diff --git a/data/org.gnome.Epiphany.appdata.xml.in.in b/data/org.gnome.Epiphany.appdata.xml.in.in
index 3790acf..27b5799 100644
--- a/data/org.gnome.Epiphany.appdata.xml.in.in
+++ b/data/org.gnome.Epiphany.appdata.xml.in.in
@@ -32,7 +32,6 @@
<kudo>UserDocs</kudo>
</kudos>
......
From: Alexander Mikhaylenko <alexander.mikhaylenko@puri.sm>
Date: Tue, 22 Sep 2020 14:42:12 +0500
Subject: librem5: Bring back libdazzle submodule
---
.gitmodules | 3 +++
meson.build | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 .gitmodules
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..5083fc2
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "subprojects/libdazzle"]
+ path = subprojects/libdazzle
+ url = https://gitlab.gnome.org/GNOME/libdazzle.git
diff --git a/meson.build b/meson.build
index a30d22b..953716c 100644
--- a/meson.build
+++ b/meson.build
@@ -81,7 +81,7 @@ gtk_unix_print_dep = dependency('gtk+-unix-print-3.0', version: gtk_requirement)
hogweed_dep = dependency('hogweed', version: nettle_requirement)
iso_codes_dep = dependency('iso-codes', version: '>= 0.35')
json_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.4')
-libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.1')
+libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.1', required: false)
libhandy_dep = dependency('libhandy-1', version: '>= 1.0.0')
libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0')
libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0')
@@ -92,6 +92,14 @@ sqlite3_dep = dependency('sqlite3', version: '>= 3.22')
webkit2gtk_dep = dependency('webkit2gtk-4.0', version: webkitgtk_requirement)
webkit2gtk_web_extension_dep = dependency('webkit2gtk-web-extension-4.0', version: webkitgtk_requirement)
+# PureOS has libdazzle 3.30, that's too old, so bundle it again.
+if not libdazzle_dep.found()
+ libdazzle_dep = subproject('libdazzle', default_options: ['package_subdir=epiphany-browser',
+ 'enable_tools=false',
+ 'with_introspection=false',
+ 'with_vapi=false']).get_variable('libdazzle_dep')
+endif
+
conf.set10('USE_LIBPORTAL', portal_dep.found())
config_h = declare_dependency(
From: Alexander Mikhaylenko <alexander.mikhaylenko@puri.sm>
Date: Tue, 22 Sep 2020 17:43:19 +0500
Subject: librem5: Disable WebKit fullscreen
This lets WebKit and websites they don't have the right to make the
window fullscreen.
---
embed/ephy-embed-prefs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 3120897..e9ec876 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -566,6 +566,7 @@ ephy_embed_prefs_init (gpointer user_data)
webkit_settings = webkit_settings_new_with_settings ("enable-back-forward-navigation-gestures", TRUE,
"enable-developer-extras", TRUE,
"enable-dns-prefetching", TRUE,
+ "enable-fullscreen", FALSE,
"enable-plugins", FALSE,
NULL);
From: Alexander Mikhaylenko <alexander.mikhaylenko@puri.sm>
Date: Tue, 29 Sep 2020 13:13:55 +0500
Subject: librem5: Disable create_delete_dir test
While it works locally and on arm01, it fails in gitlab CI, presumably
because all 3 directories are writable there. Let's disable it for now.
---
tests/ephy-file-helpers-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ephy-file-helpers-test.c b/tests/ephy-file-helpers-test.c
index b3139b6..2cfef89 100644
--- a/tests/ephy-file-helpers-test.c
+++ b/tests/ephy-file-helpers-test.c
@@ -348,7 +348,7 @@ main (int argc,
g_test_add_func ("/lib/ephy-file-helpers/get_downloads_dir",
test_ephy_file_get_downloads_dir);
- if (!ephy_is_running_inside_flatpak ())
+ if (!ephy_is_running_inside_flatpak () && FALSE)
g_test_add_func ("/lib/ephy-file-helpers/create_delete_dir",
test_ephy_file_create_delete_dir);
From: Adrien Plazas <kekun.plazas@laposte.net>
Date: Wed, 10 Jul 2019 19:17:38 +0200
Subject: librem5: Disable fullscreen
This prevent the windows from going fullscreen, as we currently have no
way to exit fullscreen from a touch screen only.
---
src/ephy-lockdown.c | 18 ------------------
src/ephy-window.c | 40 ++++------------------------------------
src/window-commands.c | 24 ------------------------
src/window-commands.h | 3 ---
4 files changed, 4 insertions(+), 81 deletions(-)
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index 43f3113..fe08141 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -65,17 +65,6 @@ arbitrary_url_cb (GSettings *settings,
}
}
-static void
-fullscreen_cb (GSettings *settings,
- const char *key,
- EphyWindow *window)
-{
- if (g_settings_get_boolean (settings, key))
- gtk_window_fullscreen (GTK_WINDOW (window));
- else
- gtk_window_unfullscreen (GTK_WINDOW (window));
-}
-
typedef struct {
const char *key;
const char *action;
@@ -96,8 +85,6 @@ static const BindAction window_actions[] = {
{ EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING, "bookmark-page", "enabled" },
- { EPHY_PREFS_LOCKDOWN_FULLSCREEN, "fullscreen", "enabled" },
-
{ EPHY_PREFS_LOCKDOWN_PRINTING, "print", "enabled" },
{ EPHY_PREFS_LOCKDOWN_SAVE_TO_DISK, "save-as", "enabled" }
@@ -194,16 +181,11 @@ window_added_cb (GtkApplication *application,
if (!EPHY_IS_WINDOW (window))
return;
- g_signal_connect (EPHY_SETTINGS_LOCKDOWN,
- "changed::" EPHY_PREFS_LOCKDOWN_FULLSCREEN,
- G_CALLBACK (fullscreen_cb), window);
g_signal_connect (EPHY_SETTINGS_LOCKDOWN,
"changed::" EPHY_PREFS_LOCKDOWN_ARBITRARY_URL,
G_CALLBACK (arbitrary_url_cb), window);
/* Trigger an initial state on these elements. */
- fullscreen_cb (EPHY_SETTINGS_LOCKDOWN,
- EPHY_PREFS_LOCKDOWN_FULLSCREEN, EPHY_WINDOW (window));
arbitrary_url_cb (EPHY_SETTINGS_LOCKDOWN,
EPHY_PREFS_LOCKDOWN_ARBITRARY_URL, EPHY_WINDOW (window));
diff --git a/src/ephy-window.c b/src/ephy-window.c
index d6adfb2..46b592f 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -120,7 +120,6 @@ const struct {
/* Toggle actions */
{ "win.browse-with-caret", { "F7", NULL } },
- { "win.fullscreen", { "F11", NULL } },
/* Navigation */
{ "toolbar.stop", { "Escape", "Stop", NULL } },
@@ -554,23 +553,6 @@ update_adaptive_mode (EphyWindow *window)
ephy_window_close_pages_view (window);
}
-static void
-ephy_window_fullscreen (EphyWindow *window)
-{
- EphyEmbed *embed;
-
- window->is_fullscreen = TRUE;
-
- /* sync status */
- embed = window->active_embed;
- sync_tab_load_status (ephy_embed_get_web_view (embed), WEBKIT_LOAD_STARTED, window);
- sync_tab_security (ephy_embed_get_web_view (embed), NULL, window);
-
- update_adaptive_mode (window);
- sync_chromes_visibility (window);
- ephy_embed_entering_fullscreen (embed);
-}
-
static void
ephy_window_unfullscreen (EphyWindow *window)
{
@@ -871,7 +853,6 @@ static const GActionEntry window_entries [] = {
/* Toggle actions */
{ "browse-with-caret", NULL, NULL, "false", window_cmd_change_browse_with_caret_state },
- { "fullscreen", NULL, NULL, "false", window_cmd_change_fullscreen_state },
};
static const GActionEntry tab_entries [] = {
@@ -3309,28 +3290,15 @@ ephy_window_state_event (GtkWidget *widget,
}
if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) {
- GActionGroup *action_group;
- GAction *action;
- gboolean fullscreen;
+ if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
+ gtk_window_unfullscreen (GTK_WINDOW (window));
- fullscreen = !!(event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN);
-
- if (fullscreen) {
- ephy_window_fullscreen (window);
- } else {
- ephy_window_unfullscreen (window);
- }
+ ephy_window_unfullscreen (window);
if (window->show_fullscreen_header_bar)
- dzl_application_window_set_fullscreen (DZL_APPLICATION_WINDOW (window), fullscreen);
+ dzl_application_window_set_fullscreen (DZL_APPLICATION_WINDOW (window), FALSE);
window->show_fullscreen_header_bar = FALSE;
-
- action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
- action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "fullscreen");
-
- g_simple_action_set_state (G_SIMPLE_ACTION (action),
- g_variant_new_boolean (fullscreen));
} else if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
window->is_maximized = !!(event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED);
}
diff --git a/src/window-commands.c b/src/window-commands.c
index fd4dafc..4ed4184 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2616,30 +2616,6 @@ window_cmd_change_browse_with_caret_state (GSimpleAction *action,
EPHY_PREFS_ENABLE_CARET_BROWSING, active);
}
-void
-window_cmd_change_fullscreen_state (GSimpleAction *action,
- GVariant *state,
- gpointer user_data)
-{
- EphyWindow *window = EPHY_WINDOW (user_data);
- gboolean active;
-
- active = g_variant_get_boolean (state);
-
- /* This is performed only here because we don't want it occuring when a window
- * enters fullscreen mode for some other reason other than action activation.
- * E.g. we don't want it appearing for fullscreen video.
- */
- ephy_window_show_fullscreen_header_bar (window);
-
- if (active)
- gtk_window_fullscreen (GTK_WINDOW (window));
- else
- gtk_window_unfullscreen (GTK_WINDOW (window));
-
- g_simple_action_set_state (action, g_variant_new_boolean (active));
-}
-
void
window_cmd_tabs_previous (GSimpleAction *action,
GVariant *variant,
diff --git a/src/window-commands.h b/src/window-commands.h
index ca80dcf..784363b 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -173,9 +173,6 @@ void window_cmd_go_tabs_view (GSimpleAction *action,
void window_cmd_change_browse_with_caret_state (GSimpleAction *action,
GVariant *state,
gpointer user_data);
-void window_cmd_change_fullscreen_state (GSimpleAction *action,
- GVariant *state,
- gpointer user_data);
void window_cmd_tabs_previous (GSimpleAction *action,
GVariant *state,
gpointer user_data);
From: Adrien Plazas <kekun.plazas@laposte.net>
Date: Wed, 10 Jul 2019 19:22:48 +0200
Subject: librem5: Disable print
The GTK widget can't fit in the screen yet, so we better disable it for
now.
---
src/ephy-lockdown.c | 2 --
src/ephy-window.c | 12 +-----------
src/window-commands.c | 17 -----------------
src/window-commands.h | 3 ---
4 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index fe08141..13362ad 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -85,8 +85,6 @@ static const BindAction window_actions[] = {
{ EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING, "bookmark-page", "enabled" },
- { EPHY_PREFS_LOCKDOWN_PRINTING, "print", "enabled" },
-
{ EPHY_PREFS_LOCKDOWN_SAVE_TO_DISK, "save-as", "enabled" }
};
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 46b592f..a4bd4cf 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -100,7 +100,6 @@ const struct {
{ "win.zoom-in", { "<Primary>plus", "<Primary>KP_Add", "<Primary>equal", "ZoomIn", NULL } },
{ "win.zoom-out", { "<Primary>minus", "<Primary>KP_Subtract", "ZoomOut", NULL } },
{ "win.zoom-normal", { "<Primary>0", "<Primary>KP_0", NULL } },
- { "win.print", { "<Primary>P", NULL } },
{ "win.find", { "<Primary>F", NULL } },
{ "win.find-prev", { "<shift><Primary>G", NULL } },
{ "win.find-next", { "<Primary>G", NULL } },
@@ -470,14 +469,6 @@ sync_tab_load_status (EphyWebView *view,
loading = ephy_web_view_is_loading (view);
- action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
-
- /* disable print while loading, see bug #116344 */
- action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
- "print");
- ephy_action_change_sensitivity_flags (G_SIMPLE_ACTION (action),
- SENS_FLAG_LOADING, loading);
-
action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "toolbar");
action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
@@ -829,7 +820,6 @@ static const GActionEntry window_entries [] = {
{ "zoom-in", window_cmd_zoom_in },
{ "zoom-out", window_cmd_zoom_out },
{ "zoom-normal", window_cmd_zoom_normal },
- { "print", window_cmd_print },
{ "find", window_cmd_find },
{ "find-prev", window_cmd_find_prev },
{ "find-next", window_cmd_find_next },
@@ -1015,7 +1005,7 @@ _ephy_window_set_default_actions_sensitive (EphyWindow *window,
int i;
const char *action_group_actions[] = {
- "save-as", "save-as-application", "print",
+ "save-as", "save-as-application",
"find", "find-prev", "find-next",
"bookmark-page", "encoding", "page-source",
"send-to",
diff --git a/src/window-commands.c b/src/window-commands.c
index 4ed4184..b71321b 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2271,23 +2271,6 @@ window_cmd_delete (GSimpleAction *action,
}
}
-void
-window_cmd_print (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- EphyWindow *window = user_data;
- EphyEmbed *embed;
- EphyWebView *view;
-
- embed = ephy_embed_container_get_active_child
- (EPHY_EMBED_CONTAINER (window));
- g_assert (EPHY_IS_EMBED (embed));
- view = ephy_embed_get_web_view (embed);
-
- ephy_web_view_print (view);
-}
-
void
window_cmd_find (GSimpleAction *action,
GVariant *parameter,
diff --git a/src/window-commands.h b/src/window-commands.h
index 784363b..b96e98e 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -113,9 +113,6 @@ void window_cmd_paste_as_plain_text (GSimpleAction *action,
void window_cmd_delete (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_print (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data);
void window_cmd_find (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
From: Adrien Plazas <kekun.plazas@laposte.net>
Date: Wed, 10 Jul 2019 19:24:33 +0200
Subject: librem5: Drop the shortcuts window
The window doesn't fit on the screen and it's not very relevant.
---
src/resources/gtk/page-menu-popover.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/resources/gtk/page-menu-popover.ui b/src/resources/gtk/page-menu-popover.ui
index 6942c99..a631085 100644
--- a/src/resources/gtk/page-menu-popover.ui
+++ b/src/resources/gtk/page-menu-popover.ui
@@ -305,7 +305,7 @@
<property name="can_focus">True</property>
<property name="text" translatable="yes">_Keyboard Shortcuts</property>
<property name="action-name">app.shortcuts</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
</object>
</child>
<!-- FRAGILE: This button is manually removed for app mode/Pantheon in ephy-header-bar.c. -->
From: Alexander Mikhaylenko <alexander.mikhaylenko@puri.sm>
Date: Fri, 25 Sep 2020 15:31:11 +0500
Subject: librem5: Hide web app preferences for system apps
Since system web apps have desktop file in /usr, they cannot be edited and
the preferences do nothing.
Introduce EPHY_WEB_APPLICATION_SYSTEM option, set it for any applications
created via ephy_web_application_ensure_for_app_info(). Hide preferences
for those apps.
Upstreamed in https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/835
---
data/org.gnome.epiphany.gschema.xml | 5 +++++
lib/ephy-prefs.h | 1 +
lib/ephy-web-app-utils.c | 11 ++++++++---
lib/ephy-web-app-utils.h | 1 +
src/preferences/prefs-general-page.c | 17 +++++++++++------
5 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index be60ff9..d1341d4 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -257,6 +257,11 @@
<summary>Run in background</summary>
<description>If enabled, application continues running in the background after closing the window.</description>
</key>
+ <key type="b" name="system">
+ <default>false</default>
+ <summary>WebApp is system-wide</summary>
+ <description>If enabled, application cannot be edited or removed.</description>
+ </key>
</schema>
<schema id="org.gnome.Epiphany.state">
<key type="s" name="download-dir">
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index d423441..6158df1 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -198,6 +198,7 @@ static const char * const ephy_prefs_web_schema[] = {
#define EPHY_PREFS_WEB_APP_ADDITIONAL_URLS "additional-urls"
#define EPHY_PREFS_WEB_APP_MOBILE_CAPABLE "mobile-capable"
#define EPHY_PREFS_WEB_APP_RUN_IN_BACKGROUND "run-in-background"
+#define EPHY_PREFS_WEB_APP_SYSTEM "system"
static struct {
const char *schema;
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index aff0bc2..086d794 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -467,7 +467,7 @@ ephy_web_application_ensure_for_app_info (GAppInfo *app_info)
if (error)
g_warning ("Couldn't copy desktop file: %s", error->message);
- ephy_web_application_initialize_settings (profile_dir, EPHY_WEB_APPLICATION_NONE);
+ ephy_web_application_initialize_settings (profile_dir, EPHY_WEB_APPLICATION_SYSTEM);
}
return g_steal_pointer (&profile_dir);
@@ -793,12 +793,17 @@ ephy_web_application_initialize_settings (const char *profile_dir
g_object_unref (settings);
g_object_unref (web_app_settings);
- if (options & EPHY_WEB_APPLICATION_MOBILE_CAPABLE) {
+ if (options) {
path = g_build_path ("/", "/org/gnome/epiphany/web-apps/", name, "webapp/", NULL);
web_app_settings = g_settings_new_with_path (EPHY_PREFS_WEB_APP_SCHEMA, path);
g_free (path);
- g_settings_set_boolean (web_app_settings, EPHY_PREFS_WEB_APP_MOBILE_CAPABLE, TRUE);
+ if (options & EPHY_WEB_APPLICATION_MOBILE_CAPABLE)
+ g_settings_set_boolean (web_app_settings, EPHY_PREFS_WEB_APP_MOBILE_CAPABLE, TRUE);
+
+ if (options & EPHY_WEB_APPLICATION_SYSTEM)
+ g_settings_set_boolean (web_app_settings, EPHY_PREFS_WEB_APP_SYSTEM, TRUE);
+
g_object_unref (web_app_settings);
}
diff --git a/lib/ephy-web-app-utils.h b/lib/ephy-web-app-utils.h
index b51fdaf..0044abf 100644
--- a/lib/ephy-web-app-utils.h
+++ b/lib/ephy-web-app-utils.h
@@ -38,6 +38,7 @@ typedef struct {
typedef enum {
EPHY_WEB_APPLICATION_NONE,
EPHY_WEB_APPLICATION_MOBILE_CAPABLE,
+ EPHY_WEB_APPLICATION_SYSTEM,
} EphyWebApplicationOptions;
#define EPHY_WEB_APP_ICON_NAME "app-icon.png"
diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c
index defb8a2..ac3d820 100644
--- a/src/preferences/prefs-general-page.c
+++ b/src/preferences/prefs-general-page.c
@@ -1209,9 +1209,12 @@ setup_general_page (PrefsGeneralPage *general_page)
if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION) {
general_page->webapp = ephy_web_application_for_profile_directory (ephy_profile_dir ());
g_assert (general_page->webapp);
- prefs_general_page_update_webapp_icon (general_page, general_page->webapp->icon_url);
- gtk_entry_set_text (GTK_ENTRY (general_page->webapp_url), general_page->webapp->url);
- gtk_entry_set_text (GTK_ENTRY (general_page->webapp_title), general_page->webapp->name);
+
+ if (!g_settings_get_boolean (EPHY_SETTINGS_WEB_APP, EPHY_PREFS_WEB_APP_SYSTEM)) {
+ prefs_general_page_update_webapp_icon (general_page, general_page->webapp->icon_url);
+ gtk_entry_set_text (GTK_ENTRY (general_page->webapp_url), general_page->webapp->url);
+ gtk_entry_set_text (GTK_ENTRY (general_page->webapp_title), general_page->webapp->name);
+ }
}
/* ======================================================================== */
@@ -1356,8 +1359,12 @@ prefs_general_page_init (PrefsGeneralPage *general_page)
gtk_widget_init_template (GTK_WIDGET (general_page));
+ setup_general_page (general_page);
+
gtk_widget_set_visible (general_page->webapp_box,
- mode == EPHY_EMBED_SHELL_MODE_APPLICATION);
+ mode == EPHY_EMBED_SHELL_MODE_APPLICATION &&
+ !g_settings_get_boolean (EPHY_SETTINGS_WEB_APP,
+ EPHY_PREFS_WEB_APP_SYSTEM));
gtk_widget_set_visible (general_page->homepage_box,
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
gtk_widget_set_visible (general_page->search_box,
@@ -1366,6 +1373,4 @@ prefs_general_page_init (PrefsGeneralPage *general_page)
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
gtk_widget_set_visible (general_page->browsing_box,
mode != EPHY_EMBED_SHELL_MODE_APPLICATION);
-
- setup_general_page (general_page);
}
This diff is collapsed.
From: Alexander Mikhaylenko <alexander.mikhaylenko@puri.sm>
Date: Tue, 22 Sep 2020 14:42:12 +0500
Subject: librem5: Lower glib version requirement
With the last 2 commits, all uses of newer glib have been removed, so we