mirror of
https://github.com/KDE/konsole.git
synced 2026-05-06 05:36:40 -04:00
Forward port: The history options (line #/enabled) are now used in
the profiles. Currently Konsole crashes with --profile=. The dialogs don't work know anyway... test later. CCBUG: 120046 svn path=/trunk/KDE/kdebase/konsole/; revision=498170
This commit is contained in:
@@ -1467,8 +1467,14 @@ void Konsole::saveProperties(KConfig* config) {
|
||||
config->writeEntry(key, sessions.current()->isMonitorSilence());
|
||||
key = QString("MasterMode%1").arg(counter);
|
||||
config->writeEntry(key, sessions.current()->isMasterMode());
|
||||
key = QString("TabColor%1").arg(counter);
|
||||
//key = QString("TabColor%1").arg(counter);
|
||||
//config->writeEntry(key, tabwidget->tabColor((sessions.current())->widget()));
|
||||
/* Test this when dialogs work again
|
||||
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())
|
||||
@@ -3127,6 +3133,19 @@ void Konsole::initTabColor(QColor color)
|
||||
; //tabwidget->setTabColor( se->widget(), color );
|
||||
}
|
||||
|
||||
void Konsole::initHistory(int lines, bool enable)
|
||||
{
|
||||
return;
|
||||
// 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() );
|
||||
|
||||
@@ -87,6 +87,7 @@ public:
|
||||
void initMonitorSilence(bool on);
|
||||
void initMasterMode(bool on);
|
||||
void initTabColor(QColor color);
|
||||
void initHistory(int lines, bool enable);
|
||||
void newSession(const QString &program, const QStringList &args, const QString &term, const QString &icon, const QString &title, const QString &cwd);
|
||||
void setSchema(const QString & path);
|
||||
void setEncoding(int);
|
||||
|
||||
@@ -519,6 +519,9 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[])
|
||||
//FIXME: Verify this code when KDE4 supports tab colors... kvh
|
||||
QVariant v_tabColor = sessionconfig->readEntry("TabColor0");
|
||||
m->initTabColor( v_tabColor.value<QColor>() );
|
||||
// -1 will be changed to the default history in konsolerc
|
||||
// m->initHistory(sessionconfig->readNumEntry("History0", -1),
|
||||
// sessionconfig->readBoolEntry("HistoryEnabled0", true));
|
||||
|
||||
counter++;
|
||||
|
||||
@@ -566,6 +569,15 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[])
|
||||
//FIXME: Verify this code when KDE4 supports tab colors... kvh
|
||||
// QVariant v_tabColor = sessionconfig->readEntry(key));
|
||||
// m->initTabColor( v_tabColor.value<QColor>() );
|
||||
|
||||
/* Test this when the dialogs work again...kvh
|
||||
// -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") );
|
||||
|
||||
Reference in New Issue
Block a user