Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX] Gesture manager: corner gestures #4878

Merged
merged 20 commits into from Apr 7, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

fix stupid mistake in menu text

  • Loading branch information...
Frenzie committed Apr 6, 2019
commit 7bdd06ee839be8b56eb99a17ce139f4979a9015e
@@ -223,30 +223,29 @@ end
function ReaderGesture:addToMainMenu(menu_items)
local gesture_manager = G_reader_settings:readSetting(self.ges_mode)

local actionTextFunc = function(gesture)
local actionTextFunc = function(gesture, gesture_name)
local action_name = gesture_manager[gesture] ~= "nothing" and action_strings[gesture_manager[gesture]] or _("Available")
return T(_("%1 (%2)"), gesture, action_name)
return T(_("%1 (%2)"), gesture_name, action_name)
end
local corner_hold_submenu = {
text = _("Hold corner"),
sub_item_table = {
{
text_func = function() return actionTextFunc(_("Top left")) end,
text_func = function() return actionTextFunc("hold_top_left_corner", _("Top left")) end,
enabled_func = function() return self.ges_mode == "gesture_reader" end,
sub_item_table = self:buildMenu("hold_top_left_corner", self.default_gesture["hold_top_left_corner"]),
},
{
text_func = function() return actionTextFunc(_("Top right")) end,
text_func = function() return actionTextFunc("hold_top_right_corner", _("Top right")) end,
sub_item_table = self:buildMenu("hold_top_right_corner", self.default_gesture["hold_top_right_corner"]),
},
{
text_func = function() return actionTextFunc(_("Bottom left")) end,
text_func = function() return actionTextFunc("hold_bottom_left_corner", _("Bottom left")) end,
sub_item_table = self:buildMenu("hold_bottom_left_corner", self.default_gesture["hold_bottom_left_corner"]),
},
{
text_func = function() return actionTextFunc(_("Bottom right")) end,
text_func = function() return actionTextFunc("hold_bottom_right_corner", _("Bottom right")) end,
sub_item_table = self:buildMenu("hold_bottom_right_corner", self.default_gesture["hold_bottom_right_corner"]),
separator = true,
},
},
}
@@ -363,21 +362,21 @@ function ReaderGesture:addToMainMenu(menu_items)
text = _("Two-finger tap corner"),
sub_item_table = {
{
text_func = function() return actionTextFunc(_("Top left")) end,
text_func = function() return actionTextFunc("two_finger_tap_top_left_corner", _("Top left")) end,
enabled_func = function() return self.ges_mode == "gesture_reader" end,
sub_item_table = self:buildMenu("two_finger_tap_top_left_corner", self.default_gesture["two_finger_tap_top_left_corner"]),
},
{
text_func = function() return actionTextFunc(_("Top right")) end,
text_func = function() return actionTextFunc("two_finger_tap_top_right_corner", _("Top right")) end,
sub_item_table = self:buildMenu("two_finger_tap_top_right_corner", self.default_gesture["two_finger_tap_top_right_corner"]),
},
{
text_func = function() return actionTextFunc(_("Bottom left")) end,
text_func = function() return actionTextFunc("two_finger_tap_bottom_left_corner", _("Bottom left")) end,
sub_item_table = self:buildMenu("two_finger_tap_bottom_left_corner", self.default_gesture["two_finger_tap_bottom_left_corner"]),
},
{
text_func = function() return actionTextFunc(_("Bottom right")) end,
text_func = function() return actionTextFunc("two_finger_tap_bottom_right_corner", _("Bottom right")) end,
sub_item_table = self:buildMenu("two_finger_tap_bottom_right_corner", self.default_gesture["two_finger_tap_bottom_right_corner"]),
separator = true,
},
},
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.