[Konsole-devel] [Bug 120046] history information not used from saved profile
Kurt V.Hindenburg
kurt.hindenburg at kdemail.net
Sat Jan 14 18:28:14 UTC 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=120046
kurt.hindenburg kdemail net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From kurt.hindenburg kdemail net 2006-01-14 19:28 -------
SVN commit 498108 by hindenburg:
The history options (line #/enabled) are now used in the profiles.
BUG: 120046
M +16 -0 konsole.cpp
M +1 -0 konsole.h
M +8 -0 main.cpp
--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.cpp #498107:498108
@ -1458,6 +1458,10 @
config->writeEntry(key, sessions.current()->isMasterMode());
key = QString("TabColor%1").arg(counter);
config->writeEntry(key, tabwidget->tabColor((sessions.current())->widget()));
+ key = QString("History%1").arg(counter);
+ config->writeEntry(key, sessions.current()->history().getSize());
+ key = QString("HistoryEnabled%1").arg(counter);
+ config->writeEntry(key, sessions.current()->history().isOn());
QString cwd=sessions.current()->getCwd();
if (cwd.isEmpty())
@ -3184,6 +3188,18 @
tabwidget->setTabColor( se->widget(), color );
}
+void Konsole::initHistory(int lines, bool enable)
+{
+ // If no History#= is given in the profile, use the history
+ // parameter saved in konsolerc.
+ if ( lines < 0 ) lines = m_histSize;
+
+ if ( enable )
+ se->setHistory( HistoryTypeBuffer( lines ) );
+ else
+ se->setHistory( HistoryTypeNone() );
+}
+
void Konsole::slotToggleMasterMode()
{
setMasterMode( masterMode->isChecked() );
--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.h #498107:498108
@ -82,6 +82,7 @
void initMonitorSilence(bool on);
void initMasterMode(bool on);
void initTabColor(QColor color);
+ void initHistory(int lines, bool enable);
void newSession(const QString &program, const QStrList &args, const QString &term, const QString &icon, const QString &title, const QString &cwd);
void setSchema(const QString & path);
void setEncoding(int);
--- branches/KDE/3.5/kdebase/konsole/konsole/main.cpp #498107:498108
@ -514,6 +514,9 @
m->initMonitorSilence(sessionconfig->readBoolEntry("MonitorSilence0",false));
m->initMasterMode(sessionconfig->readBoolEntry("MasterMode0",false));
m->initTabColor(sessionconfig->readColorEntry("TabColor0"));
+ // -1 will be changed to the default history in konsolerc
+ m->initHistory(sessionconfig->readNumEntry("History0", -1),
+ sessionconfig->readBoolEntry("HistoryEnabled0", true));
counter++;
// show() before 2nd+ sessions are created allows --profile to
@ -553,6 +556,11 @
m->initMasterMode(sessionconfig->readBoolEntry(key,false));
key = QString("TabColor%1").arg(counter);
m->initTabColor(sessionconfig->readColorEntry(key));
+ // -1 will be changed to the default history in konsolerc
+ key = QString("History%1").arg(counter);
+ QString key2 = QString("HistoryEnabled%1").arg(counter);
+ m->initHistory(sessionconfig->readNumEntry(key, -1),
+ sessionconfig->readBoolEntry(key2, true));
counter++;
}
m->setDefaultSession( sessionconfig->readEntry("DefaultSession","shell.desktop") );
More information about the konsole-devel
mailing list