Bug 29481 - Ctrl-Alt-N doesn't work in session-restored Konsole instances
Summary: Ctrl-Alt-N doesn't work in session-restored Konsole instances
Status: CLOSED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Other
: NOR grave
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-07-21 20:33 UTC by Stephan Binner
Modified: 2004-10-21 21:51 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 Stephan Binner 2001-07-21 20:23:21 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konsole
Version:           KDE 2.2.0 CVS/CVSup/Snapshot
Severity:          normal
Installed from:    Compiled sources

Ctrl-Alt-N and clicking on "New" without selecting a session type doesn't
work anymore if Konsole was restored. No problem in new started ones.
Comment 1 Stephan Binner 2001-07-26 11:04:09 UTC
http://lists.kde.org/?l=kde-devel&m=99585524400829&w=2 solved it for me.
Here are the generated patches please somebody applies this before 2.2:

Index: main.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/main.Cv
retrieving revision 1.189
diff -b -u -3 -p -r1.189 main.C
--- main.C2001/07/13 21:10:151.189
+++ main.C2001/07/26 10:18:54
@@ -2547 +2547 @@ int main(int argc char* argv[])
         //wname = sessionconfig->readEntry("class"wname).latin1();
         //shell = "";
         //FIXME If we can just restore the command to a char * we'd be golden.
-        sPgm = sessionconfig->readEntry("Pgm0" "failed").latin1();
+        sPgm = sessionconfig->readEntry("Pgm0" "failed");
         //*cTitle = sPgm;
         //cTitle+=" : ";
         const char * myCmd = strdup(sPgm.latin1());
@@ -2877 +2877 @@ int main(int argc char* argv[])
           tmpPgm+= (char) (n2+49);
           sPgm=sessionconfig->readEntry(tmpPgm shell);
           m->setArgs(eargs);
-          m->setPgm(sPgm);
+          m->setPgm(myCmd);
 //          QTimer::singleShot(5000mSLOT(newSession()));
           m->newSession();
 //          kdDebug(1211) << "Adding title tmpTitle = " << sessionconfig->readEntry(tmpTitle m->title);
Index: konsole.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/konsole.Cv
retrieving revision 1.147
diff -b -u -3 -p -r1.147 konsole.C
--- konsole.C2001/07/16 23:56:251.147
+++ konsole.C2001/07/26 10:19:24
@@ -18317 +18317 @@ void Konsole::setArgs(QStrList newArgs)
 void Konsole::setPgm(QString newPgm)
 {
 //  QStrList args = new QStrList();
-  pgm = newPgm.latin1();
+  pgm = strdup(newPgm.latin1());
 }

 #include "konsole.moc"
Comment 2 Chris Machemer 2001-07-28 04:44:32 UTC
Sorry.  I fixed this 6 days ago but didn't have access to cvs from my 
vacation spot.  Its committed now.

-Chris