Make Ctrl-click on any notebook tab switch to the last used

document.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4800 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-04-05 11:44:56 +00:00
parent ab8d1b20d9
commit cf30b64029
4 changed files with 22 additions and 8 deletions

View File

@ -2,6 +2,9 @@
* src/keybindings.c, src/keybindings.h, doc/plugins.dox:
Add API docs for keybinding enums.
* src/notebook.c, doc/geany.txt, doc/geany.html:
Make Ctrl-click on any notebook tab switch to the last used
document.
2010-04-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -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="2010-03-09" />
<meta name="date" content="2010-03-10" />
<style type="text/css">
/*
@ -139,7 +139,7 @@ Stylesheet for Geany's documentation based on a version of John Gabriele.
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>2010-03-09</td></tr>
<td>2010-03-10</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.19</td></tr>
</tbody>
@ -3257,7 +3257,7 @@ available, it shows document word completion.</td>
</tr>
<tr><td>Show calltip</td>
<td>Ctrl-Shift-Space</td>
<td>Shows call tips for the current function or
<td>Shows a calltip for the current function or
method.</td>
</tr>
<tr><td>Show macro list</td>
@ -5290,10 +5290,12 @@ menus. Some less common commands with no menu equivalent are:</p>
<ul class="simple">
<li>Double-click on empty space in the notebook tab bar to open a
new document.</li>
<li>Middle-click on a document's notebook tab to close the document.</li>
<li>Hold <cite>Ctrl</cite> and click on any notebook tab to switch to the last used
document.</li>
<li>Double-click on a document's notebook tab to toggle all additional
widgets (to show them again use the View menu or the keyboard
shortcut). The interface pref must be enabled for this to work.</li>
<li>Middle-click on a document's notebook tab to close the document.</li>
</ul>
</div>
<div class="section">
@ -5955,7 +5957,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
Generated on: 2010-03-10 13:48 UTC.
Generated on: 2010-04-01 16:25 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>

View File

@ -2944,7 +2944,7 @@ Complete word Ctrl-Space Shows the autocompleti
completion. Likewise if no tag suggestions are
available, it shows document word completion.
Show calltip Ctrl-Shift-Space Shows call tips for the current function or
Show calltip Ctrl-Shift-Space Shows a calltip for the current function or
method.
Show macro list Ctrl-Return Shows a list of available macros and variables in
@ -4511,10 +4511,12 @@ Document notebook
* Double-click on empty space in the notebook tab bar to open a
new document.
* Middle-click on a document's notebook tab to close the document.
* Hold `Ctrl` and click on any notebook tab to switch to the last used
document.
* Double-click on a document's notebook tab to toggle all additional
widgets (to show them again use the View menu or the keyboard
shortcut). The interface pref must be enabled for this to work.
* Middle-click on a document's notebook tab to close the document.
Editor
------

View File

@ -35,6 +35,7 @@
#include "support.h"
#include "callbacks.h"
#include "utils.h"
#include "keybindings.h"
#define GEANY_DND_NOTEBOOK_TAB_TYPE "geany_dnd_notebook_tab"
@ -435,7 +436,13 @@ static gboolean notebook_tab_click(GtkWidget *widget, GdkEventButton *event, gpo
GTK_WIDGET(data)));
return TRUE; /* stop other handlers like notebook_tab_bar_click_cb() */
}
/* switch last used tab on ctrl-click */
if (event->button == 1 && event->state == GDK_CONTROL_MASK)
{
keybindings_send_command(GEANY_KEY_GROUP_NOTEBOOK,
GEANY_KEYS_NOTEBOOK_SWITCHTABLASTUSED);
return TRUE;
}
return FALSE;
}