[epiphany/mwleeds/webapp-dbus-api: 4/4] WIP: Enable web apps under Flatpak




commit e21153f236677466c24556f132bde8bc79d2defd
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Fri Dec 17 14:37:56 2021 -0800

    WIP: Enable web apps under Flatpak

 embed/ephy-about-handler.c | 2 +-
 src/ephy-header-bar.c      | 3 ---
 src/window-commands.c      | 6 ++----
 3 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index 4e570d473..a93db09c2 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -584,7 +584,7 @@ ephy_about_handler_handle_request (EphyAboutHandler       *handler,
     handled = ephy_about_handler_handle_memory (handler, request);
   else if (!g_strcmp0 (path, "epiphany"))
     handled = ephy_about_handler_handle_epiphany (handler, request);
-  else if (!g_strcmp0 (path, "applications") && !ephy_is_running_inside_sandbox ())
+  else if (!g_strcmp0 (path, "applications") && !ephy_can_install_web_apps ())
     handled = ephy_about_handler_handle_applications (handler, request);
   else if (!g_strcmp0 (path, "newtab"))
     handled = ephy_about_handler_handle_newtab (handler, request);
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 285288189..bc472d502 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -311,9 +311,6 @@ ephy_header_bar_constructed (GObject *object)
   } else if (ephy_is_running_inside_sandbox ()) {
     gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "run-in-background-separator")));
     gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "run-in-background-button")));
-    gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "save-as-application-separator")));
-    gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "save-as-application-button")));
-    gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "application-manager-button")));
 
     if (is_desktop_pantheon ())
       gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "help-button")));
diff --git a/src/window-commands.c b/src/window-commands.c
index ab629630a..cb4c63b9d 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -901,8 +901,7 @@ window_cmd_show_shortcuts (GSimpleAction *action,
     builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/shortcuts-dialog.ui");
     shortcuts_window = GTK_WIDGET (gtk_builder_get_object (builder, "shortcuts-dialog"));
 
-    if (ephy_is_running_inside_sandbox ())
-      gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shortcuts-web-apps-group")));
+    gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shortcuts-web-apps-group")));
 
     if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) {
       GtkShortcutsShortcut *shortcut;
@@ -1904,8 +1903,7 @@ window_cmd_save_as_application (GSimpleAction *action,
   char *markup;
   char *escaped_address;
 
-  if (ephy_is_running_inside_sandbox ())
-    return;
+  //TODO use portal here instead
 
   embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
   g_assert (embed != NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]