Skip to content

Commit

Permalink
Add keybindings for "Project->New from Folder"
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Mar 19, 2022
1 parent ce66dc9 commit 0837989
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/keybindings.c
Expand Up @@ -366,6 +366,8 @@ static void init_default_kb(void)

add_kb(group, GEANY_KEYS_PROJECT_NEW, NULL,
0, 0, "project_new", _("New"), "project_new1");
add_kb(group, GEANY_KEYS_PROJECT_NEW_FROM_FOLDER, NULL,
0, 0, "project_new_from_folder", _("New from Folder"), "project_new_from_folder1");
add_kb(group, GEANY_KEYS_PROJECT_OPEN, NULL,
0, 0, "project_open", _("Open"), "project_open1");
add_kb(group, GEANY_KEYS_PROJECT_PROPERTIES, NULL,
Expand Down Expand Up @@ -1502,6 +1504,9 @@ static gboolean cb_func_project_action(guint key_id)
case GEANY_KEYS_PROJECT_NEW:
on_project_new1_activate(NULL, NULL);
break;
case GEANY_KEYS_PROJECT_NEW_FROM_FOLDER:
on_project_new_from_folder1_activate(NULL, NULL);
break;
case GEANY_KEYS_PROJECT_OPEN:
on_project_open1_activate(NULL, NULL);
break;
Expand Down
2 changes: 2 additions & 0 deletions src/keybindings.h
Expand Up @@ -277,6 +277,8 @@ enum GeanyKeyBindingID
* @since 1.34 (API 238) */
GEANY_KEYS_FILE_RELOAD_ALL, /**< Keybinding.
* @since 1.38 (API 240) */
GEANY_KEYS_PROJECT_NEW_FROM_FOLDER, /**< Keybinding.
* @since 1.39 (API 243) */
GEANY_KEYS_COUNT /* must not be used by plugins */
};

Expand Down
2 changes: 1 addition & 1 deletion src/plugindata.h
Expand Up @@ -58,7 +58,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
#define GEANY_API_VERSION 243
#define GEANY_API_VERSION 244

/* hack to have a different ABI when built with different GTK major versions
* because loading plugins linked to a different one leads to crashes.
Expand Down

0 comments on commit 0837989

Please sign in to comment.