Skip to content

Commit

Permalink
Add 'Open Project' keybinding
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel committed Jan 8, 2012
1 parent 6935af0 commit 8f44132
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/geany.txt
Expand Up @@ -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
`````````````````
=============================== ========================= ==================================================
Expand Down
5 changes: 5 additions & 0 deletions src/keybindings.c
Expand Up @@ -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));

Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/keybindings.h
Expand Up @@ -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 */
};

Expand Down

0 comments on commit 8f44132

Please sign in to comment.