#195 [PATCH] Switch to session with most recent activity


This patch adds a (IMHO useful) feature to the "Change Page" keyboard shortcut action. It allows the user to switch to the query/channel with the most recent activity. irssi has a similar feature (triggered by Alt-A). In decreasing priority, the candidate new session is looked for in these categories:
- queries with hilight
- queries
- channels with hilight
- channels with messages
- channels with other data

The patch applies to the current CVS snapshot and affects both the common/ subtree (adding a priority queue where sessions are dynamically added when new events occur) and the fe-gtk/ one (where the data from the priority queue is used to react to the keyboard shortcut). Detached channels/queries are skipped (the shortcut does not change the focus to a different window). I kept the common/ part UI-unaware.

From the user point of view, it's enough to add a new shortcut with Change Page and Data 1 set to "auto". The default configuration has this command assigned to Alt-` (which on US keyboards is just on the left of the common Alt-[1-9] keys used for tab switching.

I hope this patch will be considered for inclusion in the official tree.

Thanks. :-)


P.S. I also have a new Italian translation for the Change Page help text, but I'm not sure which is the best method to submit that change. So I'm just pasting here the new msgstr:

#: src/fe-gtk/fkeys.c:161
msgid ""
"The ^BChange Page^B command switches between pages in the notebook. Set Data 1 "
"to the page you want to switch to. If Data 2 is set to anything then the "
"switch will be relative to the current position. Set Data 1 to auto to "
"switch to the page with the most recent and important activity (queries "
"first, then channels with hilight, channels with dialogue, channels with "
"other data)"
msgstr ""
"Il comando ^BChange Page^B cambia pagine. Imposta Data 1 alla pagina a cui vuoi "
"cambiare. Se Data 2 è impostata a qualcosa allora il cambio sarà relativo "
"alla posizione corrente. Imposta Data 1 a auto per andare alla pagina con "
"l'attività piú recente e importante (prima i messaggi privati, poi i "
"canali con messaggi evidenziati, poi i canali con messaggi, poi i canali con "
"altri dati)"


  • Ludovico Gardenghi

    Logged In: YES
    Originator: YES

    File Added: xchat.changepage-activity.r2.patch


Log in to post a comment.