[epiphany/wip/gtkaction-to-gaction: 46/54] Fix accels for proted actions



commit 94a757cacfd2d0cbc6fb2fde1d3b8e2ffdc43888
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Sat May 14 18:44:44 2016 +0300

    Fix accels for proted actions

 src/ephy-window.c |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9f103a4..38121d1 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -312,13 +312,19 @@ const struct {
   const gchar *action_and_target;
   const gchar *accelerators[5];
 } accels [] = {
-  { "win.zoom-in", { "<control>plus", "<control>KP_Add", "<control>equal", "ZoomIn", NULL } },
-  { "win.zoom-out", { "<control>minus", "<control>KP_Subtract", "ZoomOut", NULL } },
-  { "win.zoom-normal", { "<control>0", "<control>KP_0", NULL } },
-  { "win.print", { "<control>P", NULL } },
-  { "win.find", { "<control>F", "Search", NULL } },
-  { "win.find-prev", { "<shift><control>G", "Search", NULL } },
-  { "win.find-next", { "<control>G", NULL } }
+  { "win.undo", { "<Primary>Z", NULL } },
+  { "win.redo", { "<shift><Primary>Z", NULL } },
+  { "win.copy", { "<Primary>C", NULL } },
+  { "win.cut", { "<Primary>X", NULL } },
+  { "win.paste", { "<Primary>V", NULL } },
+  { "win.select-all", { "<Primary>A", NULL } },
+  { "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", "Search", NULL } },
+  { "win.find-prev", { "<shift><Primary>G", "Search", NULL } },
+  { "win.find-next", { "<Primary>G", NULL } }
 };
 
 #define SETTINGS_CONNECTION_DATA_KEY    "EphyWindowSettings"
@@ -877,6 +883,8 @@ update_edit_action_sensitivity (EphyWindow *window, const gchar *action_name, gb
   action = g_action_map_lookup_action (G_ACTION_MAP (window), action_name);
   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), sensitive);
   // TODO: do something with hide
+  // TODO: see why PageMenu Actions don't have their sensitivity changed
+  // (probably because it's set back to enabled in 'context-menu-dismissed''s callback)
 }
 
 typedef struct {


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