Allow to set a keybinding for File->Properties

Closes #622.
This commit is contained in:
Colomban Wendling 2015-09-10 19:20:18 +02:00
parent 7c0bb4c6ca
commit 9729f354e5
6 changed files with 11 additions and 3 deletions

View File

@ -6407,7 +6407,7 @@
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="preferences2">
<object class="GtkImageMenuItem" id="properties1">
<property name="label">gtk-properties</property>
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -1134,7 +1134,7 @@ static void on_comments_fileheader_activate(GtkMenuItem *menuitem, gpointer user
}
static void on_file_properties_activate(GtkMenuItem *menuitem, gpointer user_data)
void on_file_properties_activate(GtkMenuItem *menuitem, gpointer user_data)
{
GeanyDocument *doc = document_get_current();
g_return_if_fail(doc != NULL);

View File

@ -117,6 +117,8 @@ void on_menu_remove_indicators1_activate(GtkMenuItem *menuitem, gpointer user_da
void on_print1_activate(GtkMenuItem *menuitem, gpointer user_data);
void on_file_properties_activate(GtkMenuItem *menuitem, gpointer user_data);
void on_menu_select_all1_activate(GtkMenuItem *menuitem, gpointer user_data);
void on_menu_show_sidebar1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);

View File

@ -282,6 +282,8 @@ static void init_default_kb(void)
add_kb(group, GEANY_KEYS_FILE_SAVEALL, NULL,
GDK_s, GDK_SHIFT_MASK | GEANY_PRIMARY_MOD_MASK, "menu_saveall", _("Save all"),
"menu_save_all1");
add_kb(group, GEANY_KEYS_FILE_PROPERTIES, NULL,
0, 0, "file_properties", _("Properties"), "properties1");
add_kb(group, GEANY_KEYS_FILE_PRINT, NULL,
GDK_p, GEANY_PRIMARY_MOD_MASK, "menu_print", _("Print"), "print1");
add_kb(group, GEANY_KEYS_FILE_CLOSE, NULL,
@ -1359,6 +1361,9 @@ static gboolean cb_func_file_action(guint key_id)
case GEANY_KEYS_FILE_PRINT:
on_print1_activate(NULL, NULL);
break;
case GEANY_KEYS_FILE_PROPERTIES:
on_file_properties_activate(NULL, NULL);
break;
case GEANY_KEYS_FILE_QUIT:
main_quit();
break;

View File

@ -245,6 +245,7 @@ enum GeanyKeyBindingID
GEANY_KEYS_GOTO_LINESTARTVISUAL, /**< Keybinding. */
GEANY_KEYS_DOCUMENT_CLONE, /**< Keybinding. */
GEANY_KEYS_FILE_QUIT, /**< Keybinding. */
GEANY_KEYS_FILE_PROPERTIES, /**< Keybinding. */
GEANY_KEYS_COUNT /* must not be used by plugins */
};

View File

@ -875,7 +875,7 @@ static void init_document_widgets(void)
add_doc_widget("add_comments1");
add_doc_widget("menu_paste1");
add_doc_widget("menu_undo2");
add_doc_widget("preferences2");
add_doc_widget("properties1");
add_doc_widget("menu_reload1");
add_doc_widget("menu_document1");
add_doc_widget("menu_choose_color1");