Add 'Open Project' keybinding

This commit is contained in:
Nick Treleaven 2012-01-08 17:14:04 +00:00
parent 6935af0485
commit 8f44132dcd
3 changed files with 16 additions and 0 deletions

View File

@ -3626,6 +3626,16 @@ Remove Markers and Error Indicators Combines ``Remove Mark
==================================== ==================== ==================================================
Project keybindings
```````````````````
=============================== ========================= ==================================================
Action Default shortcut Description
=============================== ========================= ==================================================
Open Opens a project file.
Properties Shows the `Project properties`_.
=============================== ========================= ==================================================
Build keybindings
`````````````````
=============================== ========================= ==================================================

View File

@ -262,6 +262,8 @@ static void init_default_kb(void)
group = keybindings_get_core_group(GEANY_KEY_GROUP_PROJECT);
keybindings_set_item(group, GEANY_KEYS_PROJECT_OPEN, NULL,
0, 0, "project_open", _("Open"), LW(project_open1));
keybindings_set_item(group, GEANY_KEYS_PROJECT_PROPERTIES, NULL,
0, 0, "project_properties", _("Project properties"), LW(project_properties1));
@ -1301,6 +1303,9 @@ static gboolean cb_func_project_action(guint key_id)
{
switch (key_id)
{
case GEANY_KEYS_PROJECT_OPEN:
on_project_open1_activate(NULL, NULL);
break;
case GEANY_KEYS_PROJECT_PROPERTIES:
if (app->project)
on_project_properties1_activate(NULL, NULL);

View File

@ -237,6 +237,7 @@ enum GeanyKeyBindingID
GEANY_KEYS_INSERT_LINEAFTER, /**< Keybinding. */
GEANY_KEYS_INSERT_LINEBEFORE, /**< Keybinding. */
GEANY_KEYS_DOCUMENT_REMOVE_MARKERS_INDICATORS, /**< Keybinding. */
GEANY_KEYS_PROJECT_OPEN, /**< Keybinding. */
GEANY_KEYS_COUNT /* must not be used by plugins */
};