Fixed warning about shadowing a local variable.

Add keybinding for switching to the search bar (as suggested by Nikolas Arend).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1430 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2007-03-30 10:38:13 +00:00
parent 7dc7e55951
commit e123af1c55
5 changed files with 25 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2007-03-30 Enrico Tröger <enrico.troeger@uvena.de>
* src/sci_cb.c: Fixed warning about shadowing a local variable.
* doc_geany.docbook, src/keybindings.c, src/keybindings.h:
Add keybinding for switching to the search bar
(as suggested by Nikolas Arend).
2007-03-29 Nick Treleaven <nick.treleaven@btinternet.com>
* src/sci_cb.c:

View File

@ -1420,6 +1420,10 @@
<entry>Switch to VTE</entry>
<entry>Switches to VTE widget.</entry>
</row>
<row>
<entry>Switch to Search Bar</entry>
<entry>Switches to the search bar in the toolbar (if visible).</entry>
</row>
<row>
<entry>Switch to left document</entry>
<entry>Switches to the previous open document.</entry>

View File

@ -90,6 +90,7 @@ static void cb_func_reloadtaglist(guint key_id);
static void cb_func_switch_editor(guint key_id);
static void cb_func_switch_scribble(guint key_id);
static void cb_func_switch_vte(guint key_id);
static void cb_func_switch_search_bar(guint key_id);
static void cb_func_switch_tableft(guint key_id);
static void cb_func_switch_tabright(guint key_id);
static void cb_func_switch_tablastused(guint key_id);
@ -207,6 +208,8 @@ void keybindings_init(void)
GDK_F6, 0, "switch_scribble", _("Switch to Scribble"));
keys[GEANY_KEYS_SWITCH_VTE] = fill(cb_func_switch_vte,
GDK_F4, 0, "switch_vte", _("Switch to VTE"));
keys[GEANY_KEYS_SWITCH_SEARCH_BAR] = fill(cb_func_switch_search_bar,
GDK_F7, 0, "switch_search_bar", _("Switch to Search Bar"));
keys[GEANY_KEYS_SWITCH_TABLEFT] = fill(cb_func_switch_tableft,
GDK_Page_Up, GDK_CONTROL_MASK, "switch_tableft", _("Switch to left document"));
keys[GEANY_KEYS_SWITCH_TABRIGHT] = fill(cb_func_switch_tabright,
@ -918,6 +921,12 @@ static void cb_func_switch_scribble(G_GNUC_UNUSED guint key_id)
gtk_widget_grab_focus(lookup_widget(app->window, "textview_scribble"));
}
static void cb_func_switch_search_bar(G_GNUC_UNUSED guint key_id)
{
if (app->toolbar_visible && app->pref_toolbar_show_search)
gtk_widget_grab_focus(lookup_widget(app->window, "entry1"));
}
static void cb_func_switch_vte(G_GNUC_UNUSED guint key_id)
{
#ifdef HAVE_VTE

View File

@ -100,6 +100,7 @@ enum
GEANY_KEYS_SWITCH_EDITOR,
GEANY_KEYS_SWITCH_SCRIBBLE,
GEANY_KEYS_SWITCH_VTE,
GEANY_KEYS_SWITCH_SEARCH_BAR,
GEANY_KEYS_SWITCH_TABLEFT,
GEANY_KEYS_SWITCH_TABRIGHT,
GEANY_KEYS_SWITCH_TABLASTUSED,

View File

@ -396,9 +396,9 @@ static gboolean lexer_has_braces(ScintillaObject *sci)
// in place indentation of one tab or equivalent spaces
static void do_indent(gchar *buf, gsize len, guint *index)
static void do_indent(gchar *buf, gsize len, guint *idx)
{
guint j = *index;
guint j = *idx;
if (app->pref_editor_use_tabs)
{
@ -411,7 +411,7 @@ static void do_indent(gchar *buf, gsize len, guint *index)
for (k = 0; k < (guint) app->pref_editor_tab_width && k < len - 1; k++)
buf[j++] = ' ';
}
*index = j;
*idx = j;
}