[gnome-taquin/arnaudb/wip/gtk4: 26/56] Use <Control>.




commit 2df0b268c961d3847796bcd363bdfe417152dcfb
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Apr 7 09:30:55 2020 +0200

    Use <Control>.

 data/ui/help-overlay.ui | 14 +++++++-------
 src/base-window.vala    |  2 +-
 src/game-window.vala    |  2 +-
 src/taquin-main.vala    | 28 ++++++++++++++--------------
 4 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/data/ui/help-overlay.ui b/data/ui/help-overlay.ui
index 034b5a4..7dd71b1 100644
--- a/data/ui/help-overlay.ui
+++ b/data/ui/help-overlay.ui
@@ -29,7 +29,7 @@
               <object class="GtkShortcutsShortcut">
                 <!-- Translators: in the Keyboard Shortcuts window, section "During game selection" -->
                 <property name="title" translatable="yes" context="shortcut window">Start new game</property>
-                <property name="accelerator">&lt;Primary&gt;&lt;Shift&gt;n</property>
+                <property name="accelerator">&lt;Control&gt;&lt;Shift&gt;n</property>
               </object>
             </child>
             <child>
@@ -49,21 +49,21 @@
               <object class="GtkShortcutsShortcut">
                 <!-- Translators: in the Keyboard Shortcuts window, section "During a game" -->
                 <property name="title" translatable="yes" context="shortcut window">New game</property>
-                <property name="accelerator">&lt;Primary&gt;n</property>
+                <property name="accelerator">&lt;Control&gt;n</property>
               </object>
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
                 <!-- Translators: in the Keyboard Shortcuts window, section "During a game" -->
                 <property name="title" translatable="yes" context="shortcut window">Restart game</property>
-                <property name="accelerator">&lt;Primary&gt;&lt;Shift&gt;n</property>
+                <property name="accelerator">&lt;Control&gt;&lt;Shift&gt;n</property>
               </object>
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
                 <!-- Translators: in the Keyboard Shortcuts window, section "During a game" -->
                 <property name="title" translatable="yes" context="shortcut window">Undo last move</property>
-                <property name="accelerator">&lt;Primary&gt;z</property>
+                <property name="accelerator">&lt;Control&gt;z</property>
               </object>
             </child>
             <child>
@@ -71,7 +71,7 @@
                 <property name="visible">False</property>
                 <!-- Translators: in the Keyboard Shortcuts window, section "During a game" -->
                 <property name="title" translatable="yes" context="shortcut window">Toggle game 
menu</property>
-                <property name="accelerator">&lt;Primary&gt;F10</property>
+                <property name="accelerator">&lt;Control&gt;F10</property>
               </object>
             </child>
           </object>
@@ -145,7 +145,7 @@
               <object class="GtkShortcutsShortcut">
                 <!-- Translators: in the Keyboard Shortcuts window, section "Generic" -->
                 <property name="title" translatable="yes" context="shortcut window">Keyboard 
shortcuts</property>
-                <property name="accelerator">&lt;Primary&gt;question &lt;Primary&gt;F1</property>
+                <property name="accelerator">&lt;Control&gt;question &lt;Control&gt;F1</property>
               </object>
             </child>
             <child>
@@ -166,7 +166,7 @@
               <object class="GtkShortcutsShortcut">
                 <!-- Translators: in the Keyboard Shortcuts window, section "Generic" -->
                 <property name="title" translatable="yes" context="shortcut window">Quit</property>
-                <property name="accelerator">&lt;Primary&gt;q</property>
+                <property name="accelerator">&lt;Control&gt;q</property>
               </object>
             </child>
           </object>
diff --git a/src/base-window.vala b/src/base-window.vala
index 810b093..f56b05d 100644
--- a/src/base-window.vala
+++ b/src/base-window.vala
@@ -328,7 +328,7 @@ private class BaseWindow : AdaptativeWindow, AdaptativeWidget
     {
         string name = (!) (Gdk.keyval_name (keyval) ?? "");
 
-        if (name == "F1") // TODO fix dance done with the F1 & <Primary>F1 shortcuts that show help overlay
+        if (name == "F1") // TODO fix dance done with the F1 & <Control>F1 shortcuts that show help overlay
         {
             headerbar.close_popovers ();
             main_view.close_popovers ();
diff --git a/src/game-window.vala b/src/game-window.vala
index a21470d..26d2a66 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -205,7 +205,7 @@ private class GameWindow : BaseWindow, AdaptativeWidget
 
     private const GLib.ActionEntry [] ui_action_entries =
     {
-        { "start-or-restart",   start_or_restart_cb },  // "Start new game" button or <Shift><Primary>n
+        { "start-or-restart",   start_or_restart_cb },  // "Start new game" button or <Shift><Control>n
         { "new-game",           new_game_cb },          // "New game" button or <Shift>n
         { "restart",            restart_cb },           // "Restart" menu entry; keep action to allow 
disabling menu entry
 
diff --git a/src/taquin-main.vala b/src/taquin-main.vala
index 7416804..df76cbc 100644
--- a/src/taquin-main.vala
+++ b/src/taquin-main.vala
@@ -232,27 +232,27 @@ private class Taquin : Gtk.Application, BaseApplication
         window.undo.connect (undo_cb);
         window.restart.connect (restart_cb);
 
-        set_accels_for_action ("base.copy",             {        "<Primary>c"       });
-        set_accels_for_action ("base.copy-alt",         { "<Shift><Primary>c"       });
-        set_accels_for_action ("ui.new-game",           {        "<Primary>n"       });
-        set_accels_for_action ("ui.start-or-restart",   { "<Shift><Primary>n"       });
-        set_accels_for_action ("app.quit",              {        "<Primary>q",
-                                                          "<Shift><Primary>q"       });
-        set_accels_for_action ("base.paste",            {        "<Primary>v"       });
-        set_accels_for_action ("base.paste-alt",        { "<Shift><Primary>v"       });
-        set_accels_for_action ("ui.undo",               {        "<Primary>z"       });
+        set_accels_for_action ("base.copy",             {        "<Control>c"       });
+        set_accels_for_action ("base.copy-alt",         { "<Shift><Control>c"       });
+        set_accels_for_action ("ui.new-game",           {        "<Control>n"       });
+        set_accels_for_action ("ui.start-or-restart",   { "<Shift><Control>n"       });
+        set_accels_for_action ("app.quit",              {        "<Control>q",
+                                                          "<Shift><Control>q"       });
+        set_accels_for_action ("base.paste",            {        "<Control>v"       });
+        set_accels_for_action ("base.paste-alt",        { "<Shift><Control>v"       });
+        set_accels_for_action ("ui.undo",               {        "<Control>z"       });
      // set_accels_for_action ("ui.restart" // TODO
-     // set_accels_for_action ("ui.redo",               { "<Shift><Primary>z"       });
+     // set_accels_for_action ("ui.redo",               { "<Shift><Control>z"       });
         set_accels_for_action ("base.escape",           {                 "Escape"  });
         set_accels_for_action ("base.toggle-hamburger", {                 "F10",
                                                                           "Menu"    });
 //        set_accels_for_action ("app.help",              {                 "F1"      });
 //        set_accels_for_action ("base.about",            {          "<Shift>F1"      });
         set_accels_for_action ("win.show-help-overlay", {                 "F1", // TODO test: if showing 
Yelp fails, should fallback there
-                                                                 "<Primary>F1",
-                                                          "<Shift><Primary>F1",
-                                                                 "<Primary>question",
-                                                          "<Shift><Primary>question"});
+                                                                 "<Control>F1",
+                                                          "<Shift><Control>F1",
+                                                                 "<Control>question",
+                                                          "<Shift><Control>question"});
 
         /* New-game screen signals */
         settings.changed ["size"].connect (() => {


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