Allow Quit keybinding to be configured

This removes the last unmodifiable keybinding relying on GTK's
defaults, and allows somebody to change this keybinding.
This commit is contained in:
Colomban Wendling 2013-02-21 01:16:04 +01:00
parent a0dc8af9c4
commit dba93f3854
4 changed files with 8 additions and 1 deletions

View File

@ -7551,7 +7551,6 @@
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
<signal name="activate" handler="on_quit1_activate" swapped="no"/>
</object>
</child>

View File

@ -3235,6 +3235,8 @@ Reload file Ctrl-R (C) Reloads the current fi
will be lost.
Print Ctrl-P (C) Prints the current file.
Quit Ctrl-Q (C) Quits Geany.
=============================== ========================= ==================================================

View File

@ -272,6 +272,8 @@ static void init_default_kb(void)
GDK_r, GDK_CONTROL_MASK, "menu_reloadfile", _("Reload file"), "menu_reload1");
add_kb(group, GEANY_KEYS_FILE_OPENLASTTAB, NULL,
0, 0, "file_openlasttab", _("Re-open last closed tab"), NULL);
add_kb(group, GEANY_KEYS_FILE_QUIT, NULL,
GDK_q, GDK_CONTROL_MASK, "menu_quit", _("Quit"), "menu_quit1");
group = keybindings_get_core_group(GEANY_KEY_GROUP_PROJECT);
@ -1335,6 +1337,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_QUIT:
on_quit1_activate(NULL, NULL);
break;
}
return TRUE;
}

View File

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