navigation beetwen tabs in notebook

Hi all!!

We are discuting in gedit list about "recent-tab-switching" feature. I paste the text writed by Adam. i think that is a nice idea include it in GtkNoteBook Widget.

What do you think about??

For the sake of completeness, let me describe in short the "recency-aware"
switching between tabs I'm talking about. As I have said, it's a (direct)
analogue to windows switching in (e.g.) metacity with [Alt+Tab]. I'm using
Ctrl+Tab combination throughout the following description. Please substitute
"WinLogo" (or "Super") for Ctrl, if the use of Ctrl+Tab irritates you (Perhaps alt+left goes to previous tab and alt+right goes to next tab in the order like eclipse).

First, there is a "recency list" inside the editor, which is a linked list
of tabs (e.g. tab4 -> tab2 -> tab1 -> tab3). The first tab (tab4 in the
example) is the current, active tab. The precedence of the tabs in this list
is totally disconnected from the order in which the tabs are
listed/displayed on the screen.

To the actual switching: There is a concept of "switching mode",
entered/initiated with pressing and holding Ctrl and the (first) pressing of
Tab. This mode (generally speaking) lasts until Ctrl is released. Repeated
presses of Tab (in this mode) cycles through the tabs, in the order they are
stored in "recency list". Visually, the switch of tab is performed after
each press of Tab. After the tab one wants to switch into is selected/found,
Ctrl is released. That ends the "switching mode".

(let's say the user pressed Ctrl and held it, pressed and released Tab
twice, and then released Ctrl; the tab1 is now selected)

Now comes the rearrangement of the recency list (inside the editor): The
selected tab is placed on top of the list, it is pointed to the previously
first tab of the list. The place from where the new first tab was taken from
in the list is fixed (i.e. the tab pointing to new first tab is repointed to
the tab the new first tab was pointing to (generally speaking)).

(i.e. the recency list after the rearrangement looks like that: tab1 -> tab4
-> tab2 -> tab3)

Switch done.

Rationale: With this attitude, recently used tabs gets automagically grouped
near each other (in the "recency list") and are easily switched between with
just few presses of Tab. There are many cases when this is totally

The "switching mode" can also be left by pressing "Esc" key (while still
holding Ctrl). This is used to cancel the switching. It selects the initial
tab and does not change the recency-list.

This behaviour should/could even be made consistent with Ctrl+Alt+PgUp and
Ctrl+Alt+PgD. For there can also be well defined "switching mode" -
initiated by first press of Ctrl+Alt+Pgup (or PgDn) and lasting until
Ctrl+Alt is released (generally speaking). So that the user could even
combine the switches done with Ctrl+Tab and Ctrl+Alt+PgDn/PgUp (if he/she


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]