[epiphany] window-commands.c: Expose webapp shortcuts



commit 1f024599fa764a7d40109f24ed0a8f8b773f4e70
Author: Sabri Ünal <libreajans gmail com>
Date:   Fri Jan 31 00:44:41 2020 +0300

    window-commands.c: Expose webapp shortcuts
    
    Shift+Ctrl+A:  Install site as web application
    Shift+Ctrl+C: Open web application manager

 src/resources/gtk/shortcuts-dialog.ui | 22 ++++++++++++++++++++++
 src/window-commands.c                 |  3 +++
 2 files changed, 25 insertions(+)
---
diff --git a/src/resources/gtk/shortcuts-dialog.ui b/src/resources/gtk/shortcuts-dialog.ui
index 915ddf345..37f0fcc2e 100644
--- a/src/resources/gtk/shortcuts-dialog.ui
+++ b/src/resources/gtk/shortcuts-dialog.ui
@@ -250,6 +250,28 @@
           </object>
         </child>
 
+        <!-- Web apps shortcuts -->
+        <child>
+          <object class="GtkShortcutsGroup" id="shortcuts-web-apps-group">
+            <property name="visible">True</property>
+            <property name="title" translatable="yes" context="shortcut window">Web application</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Install site as web 
application</property>
+                <property name="accelerator">&lt;Shift&gt;&lt;Primary&gt;A</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Open web application 
manager</property>
+                <property name="accelerator">&lt;Shift&gt;&lt;Primary&gt;C</property>
+              </object>
+            </child>
+          </object>
+        </child>
+
         <!-- View shortcuts -->
         <child>
           <object class="GtkShortcutsGroup">
diff --git a/src/window-commands.c b/src/window-commands.c
index 7ac98934a..ee7e058b2 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -615,6 +615,9 @@ 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_flatpak ())
+      gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "shortcuts-web-apps-group")));
+
     g_signal_connect (shortcuts_window,
                       "destroy",
                       G_CALLBACK (gtk_widget_destroyed),


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