Summary: | Ability to configure "Focus server tab" with ALT+<num> with the "natural" order of tabs | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Christian Kruse <ckruse> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Christian Kruse
2005-04-07 01:19:11 UTC
ALT shorcuts start from 0 . ALT-0 will activate leftmost tab which happens to be server if you didn't move it. So its reachable. Yes, I know. But to use ALT+1 for the leftmost tab is common use in lot's of tabbed programs. I accustom to this behavior. And Konversation before 0.16 behaved like this, too. And it really sucks that this behavior has been changed w/o even a release note. Please, make it configurable! Hmm so you just want shortcuts starting from 1 ? Alt+1,Alt+2 etc? Yes. ALT+1 for the leftmost tab, ALT+2 for the second and so on. CVS commit by cartman: Start ALT+<int> shortcuts from ALT+1 as one expect from it BUG:103394 M +2 -2 konversationmainwindow.cpp 1.230 --- kdeextragear-2/konversation/konversation/konversationmainwindow.cpp #1.229:1.230 @@ -164,8 +164,8 @@ KonversationMainWindow::KonversationMain connect(tabSelectionMapper, SIGNAL(mapped(int)), this, SLOT(goToTab(int))); - for(uint i = 0; i < 10; ++i) { + for(uint i = 1; i <= 10; ++i) { KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i)), tabSelectionMapper, SLOT(map()), actionCollection(), QString("go_to_tab_%1").arg(i).local8Bit()); - tabSelectionMapper->setMapping( tabSelectionAction, i); + tabSelectionMapper->setMapping( tabSelectionAction, i-1); } Also, if it isn't too much problem, can you set the 10th tab to Alt+0? You're setting it to Alt+10, which is a bit difficult to generate... :-) instead of .arg(i), make it .arg(i % 10) On Friday 08 April 2005 13:55, Thiago Macieira wrote: [bugs.kde.org quoted mail] Hmm 0 % 10 == 0 . But something like : for(uint i = 0; i < 10; ++i) { uint j = (i == 0) ? 10 : i; KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(j), 0, KShortcut(QString("Alt+%1").arg(i)), tabSelectionMapper, SLOT(map()), actionCollection(), QString("go_to_tab_%1").arg(j).local8Bit()); tabSelectionMapper->setMapping( tabSelectionAction, j-1); } should work. What do you say? Regards, ismail On Friday 08 April 2005 14:11, ismail cartman donmez wrote: [bugs.kde.org quoted mail] nm, I got what you mean now :) ismail CVS commit by cartman: ALT+0 for 10th tab. Suggestion by thiago CCBUG:103394 CCMAIL:thiago@kde.org.tr M +3 -3 konversationmainwindow.cpp 1.232 --- kdeextragear-2/konversation/konversation/konversationmainwindow.cpp #1.231:1.232 @@ -164,6 +164,6 @@ KonversationMainWindow::KonversationMain connect(tabSelectionMapper, SIGNAL(mapped(int)), this, SLOT(goToTab(int))); - for(uint i = 1; i < 10; ++i) { - KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i)), + for(uint i = 1; i <= 10; ++i) { + KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i%10)), tabSelectionMapper, SLOT(map()), actionCollection(), QString("go_to_tab_%1").arg(i).local8Bit()); tabSelectionMapper->setMapping( tabSelectionAction, i-1); Thank you very much :) commit 0521aae6aa00d986cd0df4bec8ae749b9e9be910 Author: İsmail Dönmez <ismail@kde.org> Date: Fri Apr 8 09:20:43 2005 +0000 Start ALT+<int> shortcuts from ALT+1 as one expect from it BUG:103394 svn path=/trunk/kdeextragear-2/konversation/; revision=403985 diff --git a/konversation/konversationmainwindow.cpp b/konversation/konversationmainwindow.cpp index a309f60..a7364ca 100644 --- a/konversation/konversationmainwindow.cpp +++ b/konversation/konversationmainwindow.cpp @@ -163,10 +163,10 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", QSignalMapper* tabSelectionMapper = new QSignalMapper(this); connect(tabSelectionMapper, SIGNAL(mapped(int)), this, SLOT(goToTab(int))); - for(uint i = 0; i < 10; ++i) { + for(uint i = 1; i <= 10; ++i) { KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i)), tabSelectionMapper, SLOT(map()), actionCollection(), QString("go_to_tab_%1").arg(i).local8Bit()); - tabSelectionMapper->setMapping( tabSelectionAction, i); + tabSelectionMapper->setMapping( tabSelectionAction, i-1); } action = new KAction(i18n("&Clear Window"),0,KShortcut("Ctrl+L"),this,SLOT(clearWindow()),actionCollection(),"clear_window"); commit 11110a8c22ef918355862b2c3144c39b55c7dbbc Author: İsmail Dönmez <ismail@kde.org> Date: Fri Apr 8 11:17:05 2005 +0000 ALT+0 for 10th tab. Suggestion by thiago CCBUG:103394 CCMAIL:thiago@kde.org.tr svn path=/trunk/kdeextragear-2/konversation/; revision=404024 diff --git a/konversation/konversationmainwindow.cpp b/konversation/konversationmainwindow.cpp index e8493a3..a35daf2 100644 --- a/konversation/konversationmainwindow.cpp +++ b/konversation/konversationmainwindow.cpp @@ -163,12 +163,12 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", QSignalMapper* tabSelectionMapper = new QSignalMapper(this); connect(tabSelectionMapper, SIGNAL(mapped(int)), this, SLOT(goToTab(int))); - for(uint i = 1; i < 10; ++i) { - KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i)), + for(uint i = 1; i <= 10; ++i) { + KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(QString("Alt+%1").arg(i%10)), tabSelectionMapper, SLOT(map()), actionCollection(), QString("go_to_tab_%1").arg(i).local8Bit()); tabSelectionMapper->setMapping( tabSelectionAction, i-1); } - + action = new KAction(i18n("&Clear Window"),0,KShortcut("Ctrl+L"),this,SLOT(clearWindow()),actionCollection(),"clear_window"); action->setToolTip(i18n("Clear content of current window")); action->setEnabled(false); |