Bug 104741 - "Save Sessions Profile" does not save scrollbar position correctly
Summary: "Save Sessions Profile" does not save scrollbar position correctly
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-28 23:35 UTC by Justin Mason
Modified: 2005-09-18 01:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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:

scrollbar=2

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

scrollbar=1

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)