Bug 98472

Summary: Incorrect schema in detached sessions
Product: [Applications] konsole Reporter: Hackeron <hackeron>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Hackeron 2005-02-03 02:59:56 UTC
Version:           1.5 Beta (using KDE 3.3.91 (beta1), Gentoo)
Compiler:          gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.10-ck5_Hackeron

Steps to reproduce.
1) Open konsole, set schema in settings (you can save as default as well)
2) Close and re-open konsole opening several new sessions.
3) Right click on the 'Shell No. 2' tab and detach session.
4) Watch session get detached with different font and background
5) Close detached session and watch it disappear rather than re-attach
6) Go back to your original konsole and detach 'Shell No. 3'
7) This time, it keeps your settings, but again, doesnt re-attach

A very annoying bug. I find it very useful to detach a session, put 2 sessions side by side, then re-attach. Now I cant do that, whats more annoying is after session detaches incorrectly, I close it by instinct only to see I cant re-detach :(
Comment 1 Kurt Hindenburg 2005-02-03 06:41:43 UTC
First off, re-attaching has been dropped.


On times there are some problems with the schema of detached sessions.

konsole: WARNING: No schema found. Using default.
konsole: WARNING: No schema with number 9


Comment 2 Hackeron 2005-02-03 14:06:10 UTC
> First off, re-attaching has been dropped. 
Really? -- any chance you could re-consider and make re-attaching optional via a tick box?

Its a feature that I would really miss.
Comment 3 Hackeron 2005-02-10 14:58:33 UTC
Still problems with the schema of detached sessions in beta2 :(
Comment 4 Mathieu Bouchard 2005-03-19 00:24:14 UTC
Confirming it for kde 3.4 rc1 and kde 3.4 final.

This only happens with the first detached session.

konsole: WARNING: No schema found. Using default.
konsole: WARNING: No schema with number 13
Comment 5 Mircea Bardac 2005-04-17 12:55:54 UTC
I can also confirm it.
In KDE 3.4. it happens for all the detached sessions, not only for the first one.
Comment 6 Hackeron 2005-04-17 13:01:47 UTC
Will we ever see a fix? :'(
Comment 7 Zack Cerza 2005-04-17 19:57:07 UTC
Re-attaching should be filed separately. As for the issue in the bug's title, "Incorrect schema in detached sessions", I can confirm it with Konsole 1.5.
Comment 8 Hackeron 2005-04-17 20:02:29 UTC
>> Re-attaching should be filed separately

OK, will do. Thanks for officially confirming this bug though.
Comment 9 Kurt Hindenburg 2005-04-17 20:15:45 UTC
I'm aware of this report (and should have confirmed it earlier).  Anyway, when I last looked at this it appears that the Schema class (schema.cpp|h) needs reworked.  The way it handles the serialization is mesed up.
Comment 10 Kurt Hindenburg 2005-04-20 20:20:36 UTC
It appears the fix is much simplier than I thought, may have to wait for subversion move; should be in KDE 3.4.1

Index: schema.cpp
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/schema.cpp,v
retrieving revision 1.55
diff -u -p -r1.55 schema.cpp
--- schema.cpp 4 Feb 2004 16:48:06 -0000  1.55
+++ schema.cpp 20 Apr 2005 18:17:56 -0000
@@ -463,6 +463,8 @@ ColorSchemaList::ColorSchemaList() :
   defaultSchema = new ColorSchema();
   append(defaultSchema);
   setAutoDelete(true);
+
+  ColorSchema::serial=1;   // Needed for detaching sessions
 }

 ColorSchemaList::~ColorSchemaList()
Comment 11 Kurt Hindenburg 2005-04-21 18:13:01 UTC
CVS commit by hindenburg: 

Fix incorrect schema in detached sessions.

Note that in testing I notice that adding/deleting Schemata result in
unpleasant behavior.

BUG: 98472


  M +2 -0      schema.cpp   1.56


--- kdebase/konsole/konsole/schema.cpp  #1.55:1.56
@@ -464,4 +464,6 @@ ColorSchemaList::ColorSchemaList() :
   append(defaultSchema);
   setAutoDelete(true);
+
+  ColorSchema::serial=1;   // Needed for detached sessions
 }
 
Comment 12 Mathieu Bouchard 2005-04-22 05:20:29 UTC
It's working great for me
Comment 13 Kurt Hindenburg 2005-04-22 19:38:41 UTC
CVS commit by hindenburg: 

Fix incorrect schema in detached sessions.

CCBUG: 98472


  M +2 -0      schema.cpp   1.55.4.1


--- kdebase/konsole/konsole/schema.cpp  #1.55:1.55.4.1
@@ -464,4 +464,6 @@ ColorSchemaList::ColorSchemaList() :
   append(defaultSchema);
   setAutoDelete(true);
+
+  ColorSchema::serial=1;   // Needed for detached sessions
 }