Skip to content

Commit

Permalink
assigned hard coded keyboard shortcut to change codebox properties 'C…
Browse files Browse the repository at this point in the history
…trl'+'[' (#2138)
  • Loading branch information
giuspen committed Oct 26, 2022
1 parent 5959853 commit d54dd23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/ct/ct_codebox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ bool CtCodebox::_on_key_press_event(GdkEventKey* event)
_pCtMainWin->get_text_view().grab_focus();
return true;
}
if (event->keyval == GDK_KEY_bracketleft) {
_pCtMainWin->get_ct_actions()->codebox_change_properties();
return true;
}
if (event->keyval == GDK_KEY_plus || event->keyval == GDK_KEY_KP_Add || event->keyval == GDK_KEY_equal) {
_ctTextview.zoom_text(true, get_syntax_highlighting());
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/ct/ct_menu_actions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ void CtMenu::init_actions(CtActions* pActions)
_("Export Table as CSV File"), sigc::mem_fun(*pActions, &CtActions::table_export)});

const char* codebox_cat = "";
_actions.push_back(CtMenuAction{codebox_cat, "codebox_change_properties", "ct_codebox_edit", _("Change CodeBox _Properties"), None,
_actions.push_back(CtMenuAction{codebox_cat, "codebox_change_properties", "ct_codebox_edit", _("Change CodeBox _Properties"), KB_CONTROL+"bracketleft",
_("Edit the Properties of the CodeBox"), sigc::mem_fun(*pActions, &CtActions::codebox_change_properties)});
_actions.push_back(CtMenuAction{codebox_cat, "codebox_load_from_file", "ct_from_txt", _("CodeBox _Load From Text File"), None,
_("Load the CodeBox Content From a Text File"), sigc::mem_fun(*pActions, &CtActions::codebox_load_from_file)});
Expand Down

0 comments on commit d54dd23

Please sign in to comment.