New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

MRU for tabs - development proposal

General discussion

MRU for tabs - development proposal

Postby abirvalg » Fri Jul 08, 2011 10:35 pm

Hello, this is a development proposal.
Even though there is a Development section in Russian, I decided not to clutter it with English text and so I'm posting here.

gd's tabs use default QTabWidget's Ctrl+Tab behaviour, which is switching to the next tab in line.
It would nice to have a most-recently-used tab switching order (MRU), pretty much what Opera browser does when you press Ctrl and start pressing Tab and then release Ctrl.
If a translator like my wife has many tabs open and compares them, MRU greatly increases productivity/ decreases annoyance.
Implementing it would be pretty easy and I would like to do it myself. I'm asking whether such a feature would be welcome.

The workflow would be:
Implement a custom KeyPressEvent for QTabWidget to react to Ctrl+Tab
Have a QList<int> which keeps the MRU order of tabs
Update QList on CloseTab, NewTab, whenever user clicks a tab etc.
Modify tablist widget to show tabs in MRU order
Optionally tablist widget could popup on Ctrl+Tab just like in Opera.

Please let me know what you think.
abirvalg
 
Posts: 2
Joined: Mon Jul 04, 2011 10:50 pm

Re: MRU for tabs - development proposal

Postby ikm » Sat Jul 09, 2011 1:48 am

Sure, you are welcome to implement it. The best workflow is to create your own clone of the repository at github and make a pull request when you're ready.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: MRU for tabs - development proposal

Postby Tvangeste » Sat Jul 09, 2011 6:41 am

Good idea worth implementing, yeah.

And we have a special place for Tab options, F4 -> Interface -> Tabbed browsing. There could be a new option there, specifying which behavior to use, the default one or the MRU.

Personally, I very much prefer MRU tab switching in browsers. But Chrome, my main browser, just decided not to support this at all, and I'm getting used to old default tab behavior.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: MRU for tabs - development proposal

Postby ikm » Sat Jul 09, 2011 6:59 am

Tvangeste wrote:which behavior to use, the default one or the MRU.

I had a feeling that we don't have any existing Ctrl-Tab behavior at all right now.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: MRU for tabs - development proposal

Postby Tvangeste » Sat Jul 09, 2011 7:00 am

ikm wrote:I had a feeling that we don't have any existing Ctrl-Tab behavior at all right now.

Ctrl-Tab works just fine by default now, it switches to the next Tab. Ctrl-Shift-Tab - goes to the previous tab.

P.S. Assuming that the QTabWidget is the currently focused component. When the focus on something else (translate line, for example), Ctrl-Tab doesn't work, which is expected, I guess.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: MRU for tabs - development proposal

Postby ikm » Sat Jul 09, 2011 7:03 am

Right - I was trying Ctrl-Tab from the word input line. That didn't work. Switching while an article is focused works indeed.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: MRU for tabs - development proposal

Postby abirvalg » Tue Feb 07, 2012 10:44 am

Hi, I have submitted a pull request to github 3 months ago.
https://github.com/goldendict/goldendict/pull/62

Could I please have any feedback on it?
Cheers.
abirvalg
 
Posts: 2
Joined: Mon Jul 04, 2011 10:50 pm


Return to General

Who is online

Users browsing this forum: No registered users and 62 guests