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
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)
Give the focus automatically to widgets below the mouse cursor.
This works for the main editor widget, the scribble, the toolbar search field
@ -3195,6 +3200,8 @@ Focus keybindings
Action Default shortcut Description
================================ ========================= ==================================================
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.

View File

@ -1637,7 +1637,13 @@ static gboolean cb_func_switch_action(guint key_id)
{
GeanyDocument *doc = document_get_current();
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;
}
case GEANY_KEYS_FOCUS_SCRIBBLE: