Bug 104741

Summary: "Save Sessions Profile" does not save scrollbar position correctly
Product: [Applications] konsole Reporter: Justin Mason <jm-kde>
Component: generalAssignee: Konsole Developer <konsole-devel>
Severity: normal    
Priority: NOR    
Version: 1.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Justin Mason 2005-04-28 23:35:34 UTC
Version:           1.5 (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package
OS:                Linux

I commonly use a 3-tab profile in my konsoles; two of those sessions always come out looking great, but one always has the scrollbar on the wrong side (on the right, instead of my preference -- left).

If I set up the 3 sessions as desired, and do Settings -> Save Sessions Profile... and save under "jm", it creates ~/.kde/share/apps/konsole/profiles/jm with:


If I then run "konsole --profile jm" it still has the scrollbar on the right. Strangely, the 2 other sessions have the scrollbar on the left.

If I manually edit that and change to


it works as expected.  

I have done a "Save As Default" with the scrollbar on the left, btw, if that's relevant.  I'm using the Kubuntu "Hoary" deb packages of KDE 3.4.
Comment 1 Kurt Hindenburg 2005-04-29 19:17:58 UTC
Yea, it is confirmed.... I'll see what I can do about it shortly.
Comment 2 Kurt Hindenburg 2005-09-18 01:46:53 UTC
SVN commit 461550 by hindenburg:

Use correct scrollbar location for all sessions when using --profile=file

BUG: 104741

 M  +1 -0      TEWidget.h  
 M  +8 -0      konsole.cpp  

--- branches/KDE/3.5/kdebase/konsole/konsole/TEWidget.h #461549:461550
@@ -50,6 +50,7 @@
     void              setColorTable(const ColorEntry table[]);
     void setScrollbarLocation(int loc);
+    int  getScrollbarLocation() { return scrollLoc; }
     enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 };
     void setScroll(int cursor, int lines);
--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.cpp #461549:461550
@@ -1614,6 +1614,14 @@
       b_autoResizeTabs = config->readBoolEntry("AutoResizeTabs", false);
       s_encodingName = config->readEntry( "EncodingName", "" ).lower();
+      // The scrollbar location only needs to be changed when the given
+      // profile scrollbar entry differs from the konsolerc scrollbar entry.
+      QPtrList<TEWidget> tes = activeTEs();
+      for (TEWidget *_te = tes.first(); _te; _te = tes.next()) {
+        if (_te->getScrollbarLocation() != n_scroll) 
+           _te->setScrollbarLocation(n_scroll);
+      }
    if (m_menuCreated)