Make Switch to Editor keybinding reshow the document statistics

line, so user doesn't have to move the cursor.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4700 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-02-24 15:08:41 +00:00
parent 39c12b0aff
commit 483742b69f
3 changed files with 930 additions and 905 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1645,6 +1645,11 @@ Suppress status messages in the status bar
Remove all messages from the status bar. The messages are still displayed Remove all messages from the status bar. The messages are still displayed
in the status messages window. in the status messages window.
.. tip::
Another option is to use the *Switch to Editor* keybinding - it
reshows the document statistics on the status bar. See `Focus
keybindings`_.
Auto-focus widgets (focus follows mouse) Auto-focus widgets (focus follows mouse)
Give the focus automatically to widgets below the mouse cursor. Give the focus automatically to widgets below the mouse cursor.
This works for the main editor widget, the scribble, the toolbar search field This works for the main editor widget, the scribble, the toolbar search field
@ -3182,7 +3187,7 @@ Toggle Sidebar Shows or hides the sid
Toggle all additional widgets Hide and show all additional widgets like the Toggle all additional widgets Hide and show all additional widgets like the
notebook tabs, the toolbar, the messages window notebook tabs, the toolbar, the messages window
and the statusbar. and the status bar.
Zoom In Ctrl-+ (C) Zooms in the text Zoom In Ctrl-+ (C) Zooms in the text
@ -3195,6 +3200,8 @@ Focus keybindings
Action Default shortcut Description Action Default shortcut Description
================================ ========================= ================================================== ================================ ========================= ==================================================
Switch to Editor F2 Switches to editor widget. Switch to Editor F2 Switches to editor widget.
Also reshows the document statistics line
(after a short timeout).
Switch to Scribble F6 Switches to scribble widget. Switch to Scribble F6 Switches to scribble widget.

View File

@ -1637,7 +1637,13 @@ static gboolean cb_func_switch_action(guint key_id)
{ {
GeanyDocument *doc = document_get_current(); GeanyDocument *doc = document_get_current();
if (doc != NULL) if (doc != NULL)
gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); {
GtkWidget *sci = GTK_WIDGET(doc->editor->sci);
if (GTK_WIDGET_HAS_FOCUS(sci))
ui_update_statusbar(doc, -1);
else
gtk_widget_grab_focus(sci);
}
break; break;
} }
case GEANY_KEYS_FOCUS_SCRIBBLE: case GEANY_KEYS_FOCUS_SCRIBBLE: