Kaydet (Commit) 424bfd32 authored tarafından Enrico Tröger's avatar Enrico Tröger

Added shortcut for Select All.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@517 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst cee4ebf3
2006-07-01 Enrico Tröger <enrico.troeger@uvena.de>
* src/document.c, src/keybindings.c: Added shortcut for Select All.
2006-07-01 Nick Treleaven <nick.treleaven@btinternet.com>
* src/notebook.c: Don't prevent notebook tab focus because this
......
......@@ -222,6 +222,8 @@ gint document_create_new_sci(const gchar *filename)
sci_use_popup(sci, FALSE);
sci_assign_cmdkey(sci, SCK_HOME, SCI_VCHOMEWRAP);
sci_assign_cmdkey(sci, SCK_END, SCI_LINEENDWRAP);
// disable select all to be able to redefine it
sci_clear_cmdkey(sci, 'A' | (SCMOD_CTRL << 16));
sci_set_mark_long_lines(sci, app->long_line_type, app->long_line_column, app->long_line_color);
sci_set_symbol_margin(sci, app->show_markers_margin);
sci_set_folding_margin_visible(sci, app->pref_editor_folding);
......
......@@ -53,6 +53,7 @@ static void cb_func_menu_closeall(void);
static void cb_func_menu_reloadfile(void);
static void cb_func_menu_undo(void);
static void cb_func_menu_redo(void);
static void cb_func_menu_selectall(void);
static void cb_func_menu_preferences(void);
static void cb_func_menu_findnext(void);
static void cb_func_menu_findprevious(void);
......@@ -124,6 +125,8 @@ void keybindings_init(void)
GDK_z, GDK_CONTROL_MASK, "menu_undo", _("Undo"));
keys[GEANY_KEYS_MENU_REDO] = fill(cb_func_menu_redo,
GDK_y, GDK_CONTROL_MASK, "menu_redo", _("Redo"));
keys[GEANY_KEYS_MENU_SELECTALL] = fill(cb_func_menu_selectall,
GDK_a, GDK_CONTROL_MASK, "menu_selectall", _("Select All"));
keys[GEANY_KEYS_MENU_PREFERENCES] = fill(cb_func_menu_preferences,
GDK_p, GDK_CONTROL_MASK, "menu_preferences", _("Preferences"));
keys[GEANY_KEYS_MENU_FIND_NEXT] = fill(cb_func_menu_findnext,
......@@ -246,6 +249,7 @@ static void keybindings_add_accels()
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_RELOADFILE, revert1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_UNDO, menu_undo2);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_REDO, menu_redo2);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_SELECTALL, menu_select_all1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_PREFERENCES, preferences1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FIND_NEXT, find_next1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDPREVIOUS, find_previous1);
......@@ -262,6 +266,7 @@ static void keybindings_add_accels()
GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_MENU_UNDO, undo1);
GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_MENU_REDO, redo1);
GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_MENU_SELECTALL, menu_select_all2);
GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_MENU_ZOOMIN, zoom_in1);
GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_MENU_ZOOMOUT, zoom_out1);
GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_POPUP_FINDUSAGE, find_usage1);
......@@ -410,6 +415,11 @@ static void cb_func_menu_redo(void)
on_redo1_activate(NULL, NULL);
}
static void cb_func_menu_selectall(void)
{
on_menu_select_all1_activate(NULL, NULL);
}
static void cb_func_menu_preferences(void)
{
dialogs_show_prefs_dialog();
......
......@@ -51,6 +51,7 @@ enum
GEANY_KEYS_MENU_RELOADFILE,
GEANY_KEYS_MENU_UNDO,
GEANY_KEYS_MENU_REDO,
GEANY_KEYS_MENU_SELECTALL,
GEANY_KEYS_MENU_PREFERENCES,
GEANY_KEYS_MENU_FIND_NEXT,
GEANY_KEYS_MENU_FINDPREVIOUS,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment