Bug 103394 - Ability to configure "Focus server tab" with ALT+<num> with the "natural" order of tabs
Summary: Ability to configure "Focus server tab" with ALT+<num> with the "natural" ord...
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-07 01:19 UTC by Christian Kruse
Modified: 2010-07-01 16:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Kruse 2005-04-07 01:19:11 UTC
Version:           0.17 (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4 
OS:                Linux

Since Konversation 0.16 the server tab is not reachable in it's natural order by ALT+num. E.g. the server tab is the left most, followed by a channel tab followed by a query, the server tab is reachable by ALT+3. This _sucks_, I like it to have it reachable by ALT+1. I think this behavior should be configurable.
Comment 1 Ismail Donmez 2005-04-08 09:53:58 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.
Comment 2 Christian Kruse 2005-04-08 10:45:17 UTC
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!
Comment 3 Ismail Donmez 2005-04-08 10:55:30 UTC
Hmm so you just want shortcuts starting from 1 ? Alt+1,Alt+2 etc?
Comment 4 Christian Kruse 2005-04-08 10:57:48 UTC
Yes. ALT+1 for the leftmost tab, ALT+2 for the second and so on.
Comment 5 Ismail Donmez 2005-04-08 11:20:48 UTC
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);
   }
   
Comment 6 Thiago Macieira 2005-04-08 12:55:45 UTC
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)
Comment 7 Ismail Donmez 2005-04-08 13:11:08 UTC
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
Comment 8 Ismail Donmez 2005-04-08 13:14:19 UTC
On Friday 08 April 2005 14:11, ismail cartman donmez wrote:
[bugs.kde.org quoted mail]

nm, I got what you mean now :)

ismail
Comment 9 Ismail Donmez 2005-04-08 13:17:15 UTC
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);
Comment 10 Christian Kruse 2005-04-08 14:27:47 UTC
Thank you very much :)
Comment 11 Ismail Donmez 2010-07-01 16:02:44 UTC
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");
Comment 12 Ismail Donmez 2010-07-01 16:02:49 UTC
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);