Revision: 1881 http://geany.svn.sourceforge.net/geany/?rev=1881&view=rev Author: ntrel Date: 2007-09-13 09:40:19 -0700 (Thu, 13 Sep 2007)
Log Message: ----------- Add Find keybinding (re-uses existing string). Group search-related callbacks together. Docs: Add table headings to group related keybindings together.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.html trunk/doc/geany.txt trunk/src/keybindings.c trunk/src/keybindings.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-09-13 12:38:14 UTC (rev 1880) +++ trunk/ChangeLog 2007-09-13 16:40:19 UTC (rev 1881) @@ -7,6 +7,10 @@ Change scroll by line default keybindings to Alt-{Up, Down}. Change Previous/Next Paragraph Scintilla commands to Ctrl-{Up, Down}. Adding Shift extends selection by paragraph. + * src/keybindings.c, src/keybindings.h, doc/geany.txt, doc/geany.html: + Add Find keybinding (re-uses existing string). + Group search-related callbacks together. + Docs: Add table headings to group related keybindings together.
2007-09-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2007-09-13 12:38:14 UTC (rev 1880) +++ trunk/doc/geany.html 2007-09-13 16:40:19 UTC (rev 1881) @@ -6,7 +6,7 @@ <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> -<meta name="date" content="2007-09-12" /> +<meta name="date" content="2007-09-13" /> <style type="text/css">
/* @@ -133,7 +133,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2007-09-12</td></tr> +<td>2007-09-13</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.12</td></tr> </tbody> @@ -1554,7 +1554,7 @@ </tr> </thead> <tbody valign="top"> -<tr><td><strong>Menu items</strong></td> +<tr><td><strong>File menu</strong></td> <td> </td> </tr> <tr><td>New</td> @@ -1585,6 +1585,9 @@ <tr><td>Print</td> <td>Prints the current file.</td> </tr> +<tr><td><strong>Edit menu</strong></td> +<td> </td> +</tr> <tr><td>Undo</td> <td>Un-does the last action.</td> </tr> @@ -1601,9 +1604,12 @@ <tr><td>Preferences</td> <td>Opens preferences dialog.</td> </tr> -<tr><td>Help</td> -<td>Opens the manual.</td> +<tr><td><strong>Search menu</strong></td> +<td> </td> </tr> +<tr><td>Find</td> +<td>Opens the Find dialog.</td> +</tr> <tr><td>Find Next</td> <td>Finds next result.</td> </tr> @@ -1623,8 +1629,8 @@ <tr><td>Go to line</td> <td>Opens the Go to line dialog.</td> </tr> -<tr><td>Show Colour Chooser</td> -<td>Opens the Colour Chooser dialog.</td> +<tr><td><strong>View menu</strong></td> +<td> </td> </tr> <tr><td>Fullscreen</td> <td>Switches to fullscreen mode.</td> @@ -1641,6 +1647,9 @@ notebook tabs, the toolbar, the messages window and the statusbar.</td> </tr> +<tr><td><strong>Document menu</strong></td> +<td> </td> +</tr> <tr><td>Zoom In</td> <td>Zooms in the text</td> </tr> @@ -1656,7 +1665,7 @@ <tr><td>Unfold all</td> <td>Unfolds all contracted code blocks.</td> </tr> -<tr><td><strong>Build options</strong></td> +<tr><td><strong>Build menu</strong></td> <td> </td> </tr> <tr><td>Compile</td> @@ -1689,6 +1698,18 @@ <tr><td>Build options</td> <td>Opens the build options dialog.</td> </tr> +<tr><td><strong>Tools menu</strong></td> +<td> </td> +</tr> +<tr><td>Show Colour Chooser</td> +<td>Opens the Colour Chooser dialog.</td> +</tr> +<tr><td><strong>Help menu</strong></td> +<td> </td> +</tr> +<tr><td>Help</td> +<td>Opens the manual.</td> +</tr> <tr><td><strong>Miscellaneous</strong></td> <td> </td> </tr> @@ -1851,6 +1872,9 @@ characters of the amount of a tabulator width when tabulators should be used for indentation.</td> </tr> +<tr><td><strong>Popup menu</strong></td> +<td> </td> +</tr> <tr><td>Find Usage</td> <td>Finds all occurrences of the current word (near the keyboard cursor) or selection and displays @@ -3042,7 +3066,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference" href="geany.txt">View document source</a>. -Generated on: 2007-09-13 12:33 UTC. +Generated on: 2007-09-13 16:43 UTC. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2007-09-13 12:38:14 UTC (rev 1880) +++ trunk/doc/geany.txt 2007-09-13 16:40:19 UTC (rev 1881) @@ -1440,7 +1440,7 @@ =============================== ========================================= Action Description =============================== ========================================= -**Menu items** +**File menu**
New Creates a new file.
@@ -1461,6 +1461,8 @@
Print Prints the current file.
+**Edit menu** + Undo Un-does the last action.
Redo Re-does the last action. @@ -1472,8 +1474,10 @@
Preferences Opens preferences dialog.
-Help Opens the manual. +**Search menu**
+Find Opens the Find dialog. + Find Next Finds next result.
Find Previous Finds previous result. @@ -1487,7 +1491,7 @@
Go to line Opens the Go to line dialog.
-Show Colour Chooser Opens the Colour Chooser dialog. +**View menu**
Fullscreen Switches to fullscreen mode.
@@ -1500,6 +1504,8 @@ notebook tabs, the toolbar, the messages window and the statusbar.
+**Document menu** + Zoom In Zooms in the text
Zoom Out Zooms out the text @@ -1510,7 +1516,7 @@
Unfold all Unfolds all contracted code blocks.
-**Build options** +**Build menu**
Compile Compiles the current file.
@@ -1533,6 +1539,14 @@
Build options Opens the build options dialog.
+**Tools menu** + +Show Colour Chooser Opens the Colour Chooser dialog. + +**Help menu** + +Help Opens the manual. + **Miscellaneous**
Reload symbol list Reloads the tag/symbol list. @@ -1655,6 +1669,8 @@ characters of the amount of a tabulator width when tabulators should be used for indentation.
+**Popup menu** + Find Usage Finds all occurrences of the current word (near the keyboard cursor) or selection and displays them in the messages window.
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2007-09-13 12:38:14 UTC (rev 1880) +++ trunk/src/keybindings.c 2007-09-13 16:40:19 UTC (rev 1881) @@ -65,14 +65,7 @@ static void cb_func_menu_preferences(guint key_id); static void cb_func_menu_insert_date(guint key_id);
-static void cb_func_menu_findnext(guint key_id); -static void cb_func_menu_findprevious(guint key_id); -static void cb_func_menu_findnextsel(guint key_id); -static void cb_func_menu_findprevsel(guint key_id); -static void cb_func_menu_replace(guint key_id); -static void cb_func_menu_findinfiles(guint key_id); -static void cb_func_menu_nextmessage(guint key_id); -static void cb_func_menu_gotoline(guint key_id); +static void cb_func_menu_search(guint key_id);
static void cb_func_menu_toggle_all(guint key_id); static void cb_func_menu_fullscreen(guint key_id); @@ -158,21 +151,24 @@ keys[GEANY_KEYS_MENU_PREFERENCES] = fill(cb_func_menu_preferences, 0, 0, "menu_preferences", _("Preferences"));
- keys[GEANY_KEYS_MENU_FINDNEXT] = fill(cb_func_menu_findnext, + // search + keys[GEANY_KEYS_MENU_FIND] = fill(cb_func_menu_search, + GDK_f, GDK_CONTROL_MASK, "menu_find", _("Find")); + keys[GEANY_KEYS_MENU_FINDNEXT] = fill(cb_func_menu_search, GDK_g, GDK_CONTROL_MASK, "menu_findnext", _("Find Next")); - keys[GEANY_KEYS_MENU_FINDPREVIOUS] = fill(cb_func_menu_findprevious, + keys[GEANY_KEYS_MENU_FINDPREVIOUS] = fill(cb_func_menu_search, GDK_g, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "menu_findprevious", _("Find Previous")); - keys[GEANY_KEYS_MENU_FINDNEXTSEL] = fill(cb_func_menu_findnextsel, + keys[GEANY_KEYS_MENU_FINDNEXTSEL] = fill(cb_func_menu_search, 0, 0, "menu_findnextsel", _("Find Next Selection")); - keys[GEANY_KEYS_MENU_FINDPREVSEL] = fill(cb_func_menu_findprevsel, + keys[GEANY_KEYS_MENU_FINDPREVSEL] = fill(cb_func_menu_search, 0, 0, "menu_findprevsel", _("Find Previous Selection")); - keys[GEANY_KEYS_MENU_REPLACE] = fill(cb_func_menu_replace, + keys[GEANY_KEYS_MENU_REPLACE] = fill(cb_func_menu_search, GDK_h, GDK_CONTROL_MASK, "menu_replace", _("Replace")); - keys[GEANY_KEYS_MENU_FINDINFILES] = fill(cb_func_menu_findinfiles, GDK_f, + keys[GEANY_KEYS_MENU_FINDINFILES] = fill(cb_func_menu_search, GDK_f, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "menu_findinfiles", _("Find in files")); - keys[GEANY_KEYS_MENU_NEXTMESSAGE] = fill(cb_func_menu_nextmessage, + keys[GEANY_KEYS_MENU_NEXTMESSAGE] = fill(cb_func_menu_search, 0, 0, "menu_nextmessage", _("Next Message")); - keys[GEANY_KEYS_MENU_GOTOLINE] = fill(cb_func_menu_gotoline, + keys[GEANY_KEYS_MENU_GOTOLINE] = fill(cb_func_menu_search, GDK_l, GDK_CONTROL_MASK, "menu_gotoline", _("Go to line"));
keys[GEANY_KEYS_MENU_TOGGLEALL] = fill(cb_func_menu_toggle_all, @@ -350,7 +346,7 @@ // set section name keys[GEANY_KEYS_MENU_NEW]->section = _("File menu"); keys[GEANY_KEYS_MENU_UNDO]->section = _("Edit menu"); - keys[GEANY_KEYS_MENU_FINDNEXT]->section = _("Search menu"); + keys[GEANY_KEYS_MENU_FIND]->section = _("Search menu"); keys[GEANY_KEYS_MENU_TOGGLEALL]->section = _("View menu"); keys[GEANY_KEYS_MENU_REPLACETABS]->section = _("Document menu"); keys[GEANY_KEYS_BUILD_COMPILE]->section = _("Build menu"); @@ -399,6 +395,8 @@ GEANY_ADD_ACCEL(GEANY_KEYS_MENU_INSERTDATE, insert_date_custom1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_PREFERENCES, preferences1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_HELP, help1); + + GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FIND, find1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDNEXT, find_next1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDPREVIOUS, find_previous1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDNEXTSEL, find_nextsel1); @@ -407,6 +405,7 @@ GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDINFILES, find_in_files1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_NEXTMESSAGE, next_message1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_GOTOLINE, go_to_line1); + GEANY_ADD_ACCEL(GEANY_KEYS_MENU_TOGGLEALL, menu_toggle_all_additional_widgets1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FULLSCREEN, menu_fullscreen1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_MESSAGEWINDOW, menu_show_messages_window1); @@ -800,46 +799,31 @@ on_help1_activate(NULL, NULL); }
-static void cb_func_menu_findnext(G_GNUC_UNUSED guint key_id) +static void cb_func_menu_search(guint key_id) { - on_find_next1_activate(NULL, NULL); + switch (key_id) + { + case GEANY_KEYS_MENU_FIND: + on_find1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_FINDNEXT: + on_find_next1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_FINDPREVIOUS: + on_find_previous1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_FINDPREVSEL: + on_find_prevsel1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_FINDNEXTSEL: + on_find_nextsel1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_REPLACE: + on_replace1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_FINDINFILES: + on_find_in_files1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_NEXTMESSAGE: + on_next_message1_activate(NULL, NULL); break; + case GEANY_KEYS_MENU_GOTOLINE: + on_go_to_line1_activate(NULL, NULL); break; + } }
-static void cb_func_menu_findprevious(G_GNUC_UNUSED guint key_id) -{ - on_find_previous1_activate(NULL, NULL); -} - -static void cb_func_menu_findprevsel(G_GNUC_UNUSED guint key_id) -{ - on_find_prevsel1_activate(NULL, NULL); -} - -static void cb_func_menu_findnextsel(G_GNUC_UNUSED guint key_id) -{ - on_find_nextsel1_activate(NULL, NULL); -} - -static void cb_func_menu_replace(G_GNUC_UNUSED guint key_id) -{ - on_replace1_activate(NULL, NULL); -} - -static void cb_func_menu_findinfiles(G_GNUC_UNUSED guint key_id) -{ - on_find_in_files1_activate(NULL, NULL); -} - -static void cb_func_menu_nextmessage(guint key_id) -{ - on_next_message1_activate(NULL, NULL); -} - -static void cb_func_menu_gotoline(G_GNUC_UNUSED guint key_id) -{ - on_go_to_line1_activate(NULL, NULL); -} - static void cb_func_menu_opencolorchooser(G_GNUC_UNUSED guint key_id) { on_show_color_chooser1_activate(NULL, NULL);
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2007-09-13 12:38:14 UTC (rev 1880) +++ trunk/src/keybindings.h 2007-09-13 16:40:19 UTC (rev 1881) @@ -65,6 +65,7 @@ GEANY_KEYS_MENU_INSERTDATE, GEANY_KEYS_MENU_PREFERENCES,
+ GEANY_KEYS_MENU_FIND, GEANY_KEYS_MENU_FINDNEXT, GEANY_KEYS_MENU_FINDPREVIOUS, GEANY_KEYS_MENU_FINDINFILES, @@ -73,10 +74,6 @@ GEANY_KEYS_MENU_FINDPREVSEL, GEANY_KEYS_MENU_NEXTMESSAGE, GEANY_KEYS_MENU_GOTOLINE, - GEANY_KEYS_POPUP_FINDUSAGE, - GEANY_KEYS_POPUP_GOTOTAGDEFINITION, - GEANY_KEYS_POPUP_GOTOTAGDECLARATION, - GEANY_KEYS_POPUP_CONTEXTACTION,
GEANY_KEYS_MENU_TOGGLEALL, GEANY_KEYS_MENU_FULLSCREEN, @@ -146,6 +143,11 @@ GEANY_KEYS_EDIT_SCROLLLINEDOWN, GEANY_KEYS_EDIT_INSERTALTWHITESPACE,
+ GEANY_KEYS_POPUP_FINDUSAGE, + GEANY_KEYS_POPUP_GOTOTAGDEFINITION, + GEANY_KEYS_POPUP_GOTOTAGDECLARATION, + GEANY_KEYS_POPUP_CONTEXTACTION, + GEANY_KEYS_EDIT_AUTOCOMPLETE, GEANY_KEYS_EDIT_CALLTIP, GEANY_KEYS_EDIT_MACROLIST,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.