Summary: | konsole session does not honor keytab in .kde | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Guenther Palfinger <guenther.palfinger> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch to fix KeyTab= filename. |
Description
Guenther Palfinger
2004-03-08 14:35:18 UTC
Confirmed on Konsole 1.3.2 (Using KDE 3.2.2-3.0.rh7.3.kde). It shows immediately when choosing a keytab for a session in the Configure Konsole dialogue and Applying the changes. Only [XTerm (XFree 4.x.x)] and [XTerm (XFree 3.x.x)] are accepted. So it might have nothing to do with the directory the keytab file is in as others a not accepted either. This patches fixes this... Index: keytrans.cpp =================================================================== RCS file: /home/kde/kdebase/konsole/konsole/keytrans.cpp,v retrieving revision 1.46 diff -u -p -r1.46 keytrans.cpp --- keytrans.cpp 26 Jul 2003 10:41:25 -0000 1.46 +++ keytrans.cpp 5 Jun 2004 22:48:05 -0000 @@ -649,9 +649,14 @@ KeyTrans* KeyTrans::find(int numb) KeyTrans* KeyTrans::find(const QString &id) { QIntDictIterator<KeyTrans> it(*numb2keymap); + + QString key = id; + if (key.endsWith(".keytab")) + key.remove(".keytab"); + while(it.current()) { - if (it.current()->id() == id) + if (it.current()->id() == key) return it.current(); ++it; } Hmm, this could be done in konsole.cpp Konsole::newSession instead. if (key.isEmpty()) s->setKeymapNo(n_defaultKeytab); else s->setKeymap(key); I think the patch in comment #2 will catch all occurances.. since numb2keymap stores the filename without the .keytab. Will there be a performance hit in find(QString)? Index: konsole.cpp =================================================================== RCS file: /home/kde/kdebase/konsole/konsole/konsole.cpp,v retrieving revision 1.463 diff -u -p -r1.463 konsole.cpp --- konsole.cpp 5 Jun 2004 19:17:27 -0000 1.463 +++ konsole.cpp 6 Jun 2004 00:45:47 -0000 @@ -2701,8 +2701,12 @@ QString Konsole::newSession(KSimpleConfi s->setSchemaNo(schmno); if (key.isEmpty()) s->setKeymapNo(n_defaultKeytab); - else + else { + if (key.endsWith(".keytab")) + key.remove(".keytab"); s->setKeymap(key); + } + s->setTitle(txt); s->setIconName(icon); s->setAddToUtmp(b_addToUtmp); Created attachment 6266 [details]
Patch to fix KeyTab= filename.
This fixes this bug; however, there is a bigger issue that needs fixed. See
the patch comments for more info.
1. The schemas are stored internally as name.schema
2. The keytabs are stored as name.
Some consistency would be in order.
Since this bug is on the 'most hated' this patch should be applied and later
I'll look at the overall view.
Applied. Index: konsole.cpp =================================================================== RCS file: /home/kde/kdebase/konsole/konsole/konsole.cpp,v retrieving revision 1.463 diff -u -p -r1.463 konsole.cpp --- konsole.cpp 5 Jun 2004 19:17:27 -0000 1.463 +++ konsole.cpp 7 Jun 2004 16:23:50 -0000 @@ -2701,8 +2701,13 @@ QString Konsole::newSession(KSimpleConfi s->setSchemaNo(schmno); if (key.isEmpty()) s->setKeymapNo(n_defaultKeytab); - else + else { + // TODO: Fixes BR77018, see BR83000. + if (key.endsWith(".keytab")) + key.remove(".keytab"); s->setKeymap(key); + } + s->setTitle(txt); s->setIconName(icon); s->setAddToUtmp(b_addToUtmp); |