[epiphany] Revert "ephy-window: Fix the accelerators for back/forward in RTL"



commit 1dc8f2bdeca67dd9d21389abb9329119458bf7ad
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Sat Aug 9 21:29:04 2014 +0300

    Revert "ephy-window: Fix the accelerators for back/forward in RTL"
    
    This reverts commit 1ff07bb8fb954d50561164e4060f4b597a5dea4e.

 src/ephy-window.c |   38 +++++---------------------------------
 1 files changed, 5 insertions(+), 33 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 597a0b7..0b279fe 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -294,7 +294,11 @@ static const struct
         * when NumLock is on they are KP_9/3 and with NumLock and Control+Shift
         * They're KP_PageUp/Down again!
         */
+       { GDK_KEY_Left,         GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE },
+       { GDK_KEY_KP_Left,      GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE },
        { GDK_KEY_KP_4,         GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE },
+       { GDK_KEY_Right,        GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE },
+       { GDK_KEY_KP_Right,     GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE },
        { GDK_KEY_KP_6,         GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE },
        { GDK_KEY_KP_Page_Up,   GDK_CONTROL_MASK,       "TabsPrevious",         FALSE },
        { GDK_KEY_KP_9,         GDK_CONTROL_MASK,       "TabsPrevious",         FALSE },
@@ -319,17 +323,7 @@ static const struct
        { XF86XK_ZoomOut,       0,                      "ViewZoomOut",          FALSE }
        /* FIXME: what about ScrollUp, ScrollDown, Menu*, Option, LogOff, Save,.. any others? */
 #endif /* HAVE_X11_XF86KEYSYM_H */
-}, navigation_keybindings_ltr [] = {
-       { GDK_KEY_Left,         GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE },
-       { GDK_KEY_KP_Left,      GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE },
-       { GDK_KEY_Right,        GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE },
-       { GDK_KEY_KP_Right,     GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE }
-}, navigation_keybindings_rtl [] = {
-       { GDK_KEY_Left,         GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE },
-       { GDK_KEY_KP_Left,      GDK_MOD1_MASK /*Alt*/,  "NavigationForward",    TRUE },
-       { GDK_KEY_Right,        GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE },
-       { GDK_KEY_KP_Right,     GDK_MOD1_MASK /*Alt*/,  "NavigationBack",       TRUE }
-}, *navigation_keybindings_rtl_ltr;
+};
 
 #define SETTINGS_CONNECTION_DATA_KEY   "EphyWindowSettings"
 
@@ -814,9 +808,6 @@ ephy_window_key_press_event (GtkWidget *widget,
        guint modifier = event->state & gtk_accelerator_get_default_mod_mask ();
        guint i;
 
-       navigation_keybindings_rtl_ltr = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL ?
-                                        navigation_keybindings_rtl : navigation_keybindings_ltr;
-
        /* In an attempt to get the mozembed playing nice with things like emacs keybindings
         * we are passing important events to the focused child widget before letting the window's
         * base handler see them. This is *completely against* stated gtk2 policy but the 
@@ -887,25 +878,6 @@ ephy_window_key_press_event (GtkWidget *widget,
                }
        }
 
-       for (i = 0; i < G_N_ELEMENTS (navigation_keybindings_rtl); i++)
-       {
-               if (event->keyval == navigation_keybindings_rtl_ltr[i].keyval &&
-                   modifier == navigation_keybindings_rtl_ltr[i].modifier)
-               {
-                       GtkAction * action = gtk_action_group_get_action
-                               (navigation_keybindings_rtl_ltr[i].fromToolbar ?
-                                       priv->toolbar_action_group :
-                                       priv->action_group,
-                               navigation_keybindings_rtl_ltr[i].action);
-                       if (gtk_action_is_sensitive (action))
-                       {
-                               gtk_action_activate (action);
-                               return TRUE;
-                       }
-                       break;
-               }
-       }
-
        return GTK_WIDGET_CLASS (ephy_window_parent_class)->key_press_event (widget, event);
 }
 


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