Allow konsole to store terminal size in the profile.

This removes the profile setting to 'Save window size upon exit'.  Now
it is in the Konsole settings; each profile can now set desired column
and row size.

Konsole Settings->Configure Konsole->General->Use current window size
on next startup:
Enabled - ignores all profile size settings - uses previous window size
Disabled - profile size settings are used - set via Edit Current
 Profile 1st tab

Only new windows will use "new" col/row/size settings.

BUG: 152385
REVIEW: 115628
FIXED-IN: 2.13
(cherry picked from commit 931d64df81)
This commit is contained in:
Kurt Hindenburg
2014-02-15 10:49:18 -05:00
parent 12ff89a050
commit 522e4a57ba
12 changed files with 168 additions and 63 deletions

View File

@@ -278,9 +278,12 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
_ui->iconSelectButton->setIcon(KIcon(profile->icon()));
_ui->startInSameDirButton->setChecked(profile->startInCurrentSessionDir());
// terminal options
_ui->terminalColumnsEntry->setValue(profile->terminalColumns());
_ui->terminalRowsEntry->setValue(profile->terminalRows());
// window options
_ui->showTerminalSizeHintButton->setChecked(profile->showTerminalSizeHint());
_ui->saveGeometryOnExitButton->setChecked(profile->saveGeometryOnExit());
// signals and slots
connect(_ui->dirSelectButton, SIGNAL(clicked()), this, SLOT(selectInitialDir()));
@@ -296,8 +299,11 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
connect(_ui->environmentEditButton , SIGNAL(clicked()), this,
SLOT(showEnvironmentEditor()));
connect(_ui->saveGeometryOnExitButton, SIGNAL(toggled(bool)), this,
SLOT(saveGeometryOnExit(bool)));
connect(_ui->terminalColumnsEntry, SIGNAL(valueChanged(int)),
this, SLOT(terminalColumnsEntryChanged(int)));
connect(_ui->terminalRowsEntry, SIGNAL(valueChanged(int)),
this, SLOT(terminalRowsEntryChanged(int)));
connect(_ui->showTerminalSizeHintButton, SIGNAL(toggled(bool)), this,
SLOT(showTerminalSizeHint(bool)));
}
@@ -343,9 +349,13 @@ void EditProfileDialog::setupTabsPage(const Profile::Ptr profile)
this, SLOT(silenceSecondsChanged(int)));
}
void EditProfileDialog::saveGeometryOnExit(bool value)
void EditProfileDialog::terminalColumnsEntryChanged(int value)
{
updateTempProfileProperty(Profile::SaveGeometryOnExit, value);
updateTempProfileProperty(Profile::TerminalColumns, value);
}
void EditProfileDialog::terminalRowsEntryChanged(int value)
{
updateTempProfileProperty(Profile::TerminalRows, value);
}
void EditProfileDialog::showTerminalSizeHint(bool value)
{