Added keyboard shortcut for Save As.

Added missing documentation for some keyboard shortcuts.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1169 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2007-01-08 18:15:06 +00:00
parent 2bcc43c152
commit 692d2aa731
4 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2007-01-08 Enrico Tröger <enrico.troeger@uvena.de>
* doc/geany.docbook, src/keybindings.c, src/keybindings.h:
Added keyboard shortcut for Save As.
Added missing documentation for some keyboard shortcuts.
2007-01-07 Nick Treleaven <nick.treleaven@btinternet.com>
* src/utils.c, src/utils.h, src/encodings.c, src/document.c,

View File

@ -1145,6 +1145,10 @@
<entry>Save</entry>
<entry>Saves the current file.</entry>
</row>
<row>
<entry>Save As</entry>
<entry>Saves the current file under a new name.</entry>
</row>
<row>
<entry>Save all</entry>
<entry>Saves all open files.</entry>
@ -1179,6 +1183,10 @@
<entry>Makes a selection of all text in the current document.
</entry>
</row>
<row>
<entry>Insert date</entry>
<entry>Inserts a customisable date.</entry>
</row>
<row>
<entry>Preferences</entry>
<entry>Opens preferences dialog.</entry>
@ -1199,6 +1207,11 @@
<entry>Find in files</entry>
<entry>Opens the Find in files dialog.</entry>
</row>
<row>
<entry>Next message</entry>
<entry>Jumps to the line with the next message from the last call
to Find usage.</entry>
</row>
<row>
<entry>Go to line</entry>
<entry>Opens the Go to line dialog.</entry>
@ -1267,6 +1280,12 @@
<entry>Compiles the current file with the Make tool.
</entry>
</row>
<row>
<entry>Next error</entry>
<entry>Jumps to the line with the next error from the last build
process.
</entry>
</row>
<row>
<entry>Run</entry>
<entry>Executes the current file in a terminal emulation.</entry>
@ -1309,6 +1328,14 @@
<row>
<entry align="left" spanname="hspan">Editing operations</entry>
</row>
<row>
<entry>Convert selection to lower case</entry>
<entry>Converts the current selection to lower case.</entry>
</row>
<row>
<entry>Convert selection to upper case</entry>
<entry>Converts the current selection to upper case.</entry>
</row>
<row>
<entry>Duplicate line or selection</entry>
<entry>Duplicates the current line or selection.</entry>

View File

@ -52,6 +52,7 @@ static void cb_func_menu_new(guint key_id);
static void cb_func_menu_open(guint key_id);
static void cb_func_menu_save(guint key_id);
static void cb_func_menu_saveall(guint key_id);
static void cb_func_menu_saveas(guint key_id);
static void cb_func_menu_print(guint key_id);
static void cb_func_menu_close(guint key_id);
static void cb_func_menu_closeall(guint key_id);
@ -110,6 +111,8 @@ void keybindings_init(void)
GDK_o, GDK_CONTROL_MASK, "menu_open", _("Open"));
keys[GEANY_KEYS_MENU_SAVE] = fill(cb_func_menu_save,
GDK_s, GDK_CONTROL_MASK, "menu_save", _("Save"));
keys[GEANY_KEYS_MENU_SAVEAS] = fill(cb_func_menu_saveas,
0, 0, "menu_saveas", _("Save as"));
keys[GEANY_KEYS_MENU_SAVEALL] = fill(cb_func_menu_saveall,
GDK_S, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "menu_saveall", _("Save all"));
keys[GEANY_KEYS_MENU_PRINT] = fill(cb_func_menu_print,
@ -278,6 +281,7 @@ static void keybindings_add_accels()
// apply the settings
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_SAVEALL, menu_save_all1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_SAVEAS, menu_save_as1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_PRINT, print1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_CLOSE, menu_close1);
GEANY_ADD_ACCEL(GEANY_KEYS_MENU_CLOSEALL, menu_close_all1);
@ -471,6 +475,11 @@ static void cb_func_menu_saveall(G_GNUC_UNUSED guint key_id)
on_save_all1_activate(NULL, NULL);
}
static void cb_func_menu_saveas(G_GNUC_UNUSED guint key_id)
{
on_save_as1_activate(NULL, NULL);
}
static void cb_func_menu_close(G_GNUC_UNUSED guint key_id)
{
on_close1_activate(NULL, NULL);

View File

@ -46,6 +46,7 @@ enum
GEANY_KEYS_MENU_NEW = 0,
GEANY_KEYS_MENU_OPEN,
GEANY_KEYS_MENU_SAVE,
GEANY_KEYS_MENU_SAVEAS,
GEANY_KEYS_MENU_SAVEALL,
GEANY_KEYS_MENU_PRINT,
GEANY_KEYS_MENU_CLOSE,