Skip to content

Commit

Permalink
changed default keyboard shortcuts to move tree nodes as disrupting f…
Browse files Browse the repository at this point in the history
…unctionality of text selection with Shift+Arrows (#2397)
  • Loading branch information
giuspen committed Dec 11, 2023
1 parent deb338b commit 7094576
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
20 changes: 0 additions & 20 deletions src/ct/ct_main_win_events.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,6 @@ bool CtMainWin::_on_treeview_key_press_event(GdkEventKey* event)
{
if (not curr_tree_iter()) return false;
if (event->state & GDK_SHIFT_MASK) {
if (event->state & GDK_CONTROL_MASK && event->keyval == GDK_KEY_Right) {
_uCtActions->node_change_father();
return true;
}
else if (event->keyval == GDK_KEY_Up) {
_uCtActions->node_up();
return true;
}
else if (event->keyval == GDK_KEY_Down) {
_uCtActions->node_down();
return true;
}
else if (event->keyval == GDK_KEY_Left) {
_uCtActions->node_left();
return true;
}
else if (event->keyval == GDK_KEY_Right) {
_uCtActions->node_right();
return true;
}
}
else if (event->state & GDK_MOD1_MASK) {
}
Expand Down
10 changes: 5 additions & 5 deletions src/ct/ct_menu_actions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,15 @@ void CtMenu::init_actions(CtActions* pActions)
_("Expand All the Tree Nodes"), sigc::mem_fun(*pActions, &CtActions::nodes_expand_all)});
_actions.push_back(CtMenuAction{tree_cat, "nodes_all_collapse", "ct_zoom-out", _("_Collapse All Nodes"), KB_CONTROL+KB_SHIFT+"l",
_("Collapse All the Tree Nodes"), sigc::mem_fun(*pActions, &CtActions::nodes_collapse_all)});
_actions.push_back(CtMenuAction{tree_cat, "tree_node_up", "ct_go-up", _("Node _Up"), KB_SHIFT+CtConst::STR_KEY_UP,
_actions.push_back(CtMenuAction{tree_cat, "tree_node_up", "ct_go-up", _("Node _Up"), KB_SHIFT+KB_ALT+CtConst::STR_KEY_UP,
_("Move the Selected Node Up"), sigc::mem_fun(*pActions, &CtActions::node_up)});
_actions.push_back(CtMenuAction{tree_cat, "tree_node_down", "ct_go-down", _("Node _Down"), KB_SHIFT+CtConst::STR_KEY_DOWN,
_actions.push_back(CtMenuAction{tree_cat, "tree_node_down", "ct_go-down", _("Node _Down"), KB_SHIFT+KB_ALT+CtConst::STR_KEY_DOWN,
_("Move the Selected Node Down"), sigc::mem_fun(*pActions, &CtActions::node_down)});
_actions.push_back(CtMenuAction{tree_cat, "tree_node_left", "ct_go-back", _("Node _Left"), KB_SHIFT+CtConst::STR_KEY_LEFT,
_actions.push_back(CtMenuAction{tree_cat, "tree_node_left", "ct_go-back", _("Node _Left"), KB_SHIFT+KB_ALT+CtConst::STR_KEY_LEFT,
_("Move the Selected Node Left"), sigc::mem_fun(*pActions, &CtActions::node_left)});
_actions.push_back(CtMenuAction{tree_cat, "tree_node_right", "ct_go-forward", _("Node _Right"), KB_SHIFT+CtConst::STR_KEY_RIGHT,
_actions.push_back(CtMenuAction{tree_cat, "tree_node_right", "ct_go-forward", _("Node _Right"), KB_SHIFT+KB_ALT+CtConst::STR_KEY_RIGHT,
_("Move the Selected Node Right"), sigc::mem_fun(*pActions, &CtActions::node_right)});
_actions.push_back(CtMenuAction{tree_cat, "tree_node_new_father", "ct_go-jump", _("Node Change _Parent..."), KB_CONTROL+KB_SHIFT+CtConst::STR_KEY_RIGHT,
_actions.push_back(CtMenuAction{tree_cat, "tree_node_new_father", "ct_go-jump", _("Node Change _Parent..."), KB_SHIFT+KB_ALT+"j",
_("Change the Selected Node's Parent"), sigc::mem_fun(*pActions, &CtActions::node_change_father)});
_actions.push_back(CtMenuAction{tree_cat, "tree_all_sort_asc", "ct_sort-asc", _("Sort Tree _Ascending"), None,
_("Sort the Tree Ascending"), sigc::mem_fun(*pActions, &CtActions::tree_sort_ascending)});
Expand Down

0 comments on commit 7094576

Please sign in to comment.