Commit e728c533 authored by Robert Knight's avatar Robert Knight

Load, save & apply blinking cursor setting.

svn path=/branches/work/konsole-split-view/; revision=660232
parent 8086851f
...@@ -349,6 +349,9 @@ void EditProfileDialog::setupAdvancedPage(const Profile* profile) ...@@ -349,6 +349,9 @@ void EditProfileDialog::setupAdvancedPage(const Profile* profile)
_ui->enableFlowControlButton->setChecked( profile->property(Profile::FlowControlEnabled).value<bool>() ); _ui->enableFlowControlButton->setChecked( profile->property(Profile::FlowControlEnabled).value<bool>() );
_ui->enableResizeWindowButton->setChecked( profile->property(Profile::AllowProgramsToResizeWindow) _ui->enableResizeWindowButton->setChecked( profile->property(Profile::AllowProgramsToResizeWindow)
.value<bool>() ); .value<bool>() );
_ui->enableBlinkingCursorButton->setChecked( profile->property(Profile::BlinkingCursorEnabled)
.value<bool>() );
// signals and slots // signals and slots
connect( _ui->enableBlinkingTextButton , SIGNAL(toggled(bool)) , this , connect( _ui->enableBlinkingTextButton , SIGNAL(toggled(bool)) , this ,
SLOT(toggleBlinkingText(bool)) ); SLOT(toggleBlinkingText(bool)) );
...@@ -356,6 +359,12 @@ void EditProfileDialog::setupAdvancedPage(const Profile* profile) ...@@ -356,6 +359,12 @@ void EditProfileDialog::setupAdvancedPage(const Profile* profile)
SLOT(toggleFlowControl(bool)) ); SLOT(toggleFlowControl(bool)) );
connect( _ui->enableResizeWindowButton , SIGNAL(toggled(bool)) , this , connect( _ui->enableResizeWindowButton , SIGNAL(toggled(bool)) , this ,
SLOT(toggleResizeWindow(bool)) ); SLOT(toggleResizeWindow(bool)) );
connect( _ui->enableBlinkingCursorButton , SIGNAL(toggled(bool)) , this ,
SLOT(toggleBlinkingCursor(bool)) );
}
void EditProfileDialog::toggleBlinkingCursor(bool enable)
{
_tempProfile->setProperty(Profile::BlinkingCursorEnabled,enable);
} }
void EditProfileDialog::toggleBlinkingText(bool enable) void EditProfileDialog::toggleBlinkingText(bool enable)
{ {
......
...@@ -108,6 +108,7 @@ private slots: ...@@ -108,6 +108,7 @@ private slots:
void toggleBlinkingText(bool); void toggleBlinkingText(bool);
void toggleFlowControl(bool); void toggleFlowControl(bool);
void toggleResizeWindow(bool); void toggleResizeWindow(bool);
void toggleBlinkingCursor(bool);
private: private:
// initialize various pages of the dialog // initialize various pages of the dialog
......
...@@ -580,6 +580,13 @@ ...@@ -580,6 +580,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="enableBlinkingCursorButton" >
<property name="text" >
<string>Blinking cursor</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
......
...@@ -175,9 +175,10 @@ bool KDE4ProfileWriter::writeProfile(const QString& path , const Profile* profil ...@@ -175,9 +175,10 @@ bool KDE4ProfileWriter::writeProfile(const QString& path , const Profile* profil
writeStandardElement( scrolling , "HistorySize" , profile , Profile::HistorySize ); writeStandardElement( scrolling , "HistorySize" , profile , Profile::HistorySize );
writeStandardElement( scrolling , "ScrollBarPosition" , profile , Profile::ScrollBarPosition ); writeStandardElement( scrolling , "ScrollBarPosition" , profile , Profile::ScrollBarPosition );
KConfigGroup terminalFeatures = config.group("TerminalFeatures"); KConfigGroup terminalFeatures = config.group("Terminal Features");
writeStandardElement( terminalFeatures , "FlowControl" , profile , Profile::FlowControlEnabled ); writeStandardElement( terminalFeatures , "FlowControl" , profile , Profile::FlowControlEnabled );
writeStandardElement( terminalFeatures , "BlinkingCursor" , profile , Profile::BlinkingCursorEnabled );
return true; return true;
} }
...@@ -235,6 +236,7 @@ bool KDE4ProfileReader::readProfile(const QString& path , Profile* profile) ...@@ -235,6 +236,7 @@ bool KDE4ProfileReader::readProfile(const QString& path , Profile* profile)
KConfigGroup terminalFeatures = config.group("Terminal Features"); KConfigGroup terminalFeatures = config.group("Terminal Features");
readStandardElement(terminalFeatures,"FlowControl",profile,Profile::FlowControlEnabled); readStandardElement(terminalFeatures,"FlowControl",profile,Profile::FlowControlEnabled);
readStandardElement(terminalFeatures,"BlinkingCursor",profile,Profile::BlinkingCursorEnabled);
return true; return true;
} }
...@@ -271,13 +273,9 @@ bool KDE3ProfileReader::readProfile(const QString& path , Profile* profile) ...@@ -271,13 +273,9 @@ bool KDE3ProfileReader::readProfile(const QString& path , Profile* profile)
{ {
const QString& fullCommand = config->readEntry("Exec"); const QString& fullCommand = config->readEntry("Exec");
ShellCommand shellCommand(fullCommand); ShellCommand shellCommand(fullCommand);
qDebug() << "full command = " << fullCommand;
profile->setProperty(Profile::Command,shellCommand.command()); profile->setProperty(Profile::Command,shellCommand.command());
profile->setProperty(Profile::Arguments,shellCommand.arguments()); profile->setProperty(Profile::Arguments,shellCommand.arguments());
qDebug() << "command = " << profile->command();
qDebug() << "argumetns = " << profile->arguments();
} }
if ( config->hasKey("Schema") ) if ( config->hasKey("Schema") )
{ {
......
...@@ -82,7 +82,8 @@ public: ...@@ -82,7 +82,8 @@ public:
SelectWordCharacters, // QString SelectWordCharacters, // QString
BlinkingTextEnabled, // bool BlinkingTextEnabled, // bool
FlowControlEnabled, // bool FlowControlEnabled, // bool
AllowProgramsToResizeWindow // bool AllowProgramsToResizeWindow,// bool
BlinkingCursorEnabled // bool
}; };
......
...@@ -525,6 +525,13 @@ void ViewManager::loadViewSettings(TerminalDisplay* view , Profile* info) ...@@ -525,6 +525,13 @@ void ViewManager::loadViewSettings(TerminalDisplay* view , Profile* info)
view->setScrollBarLocation(TerminalDisplay::SCROLLBAR_LEFT); view->setScrollBarLocation(TerminalDisplay::SCROLLBAR_LEFT);
else if ( scrollBarPosition == Profile::ScrollBarRight ) else if ( scrollBarPosition == Profile::ScrollBarRight )
view->setScrollBarLocation(TerminalDisplay::SCROLLBAR_RIGHT); view->setScrollBarLocation(TerminalDisplay::SCROLLBAR_RIGHT);
// terminal features
//bool blinkingText = info->property(Profile::BlinkingTextEnabled).value<bool>();
//TODO - Add a method in TerminalDisplay to allow this to be turned on or off
bool blinkingCursor = info->property(Profile::BlinkingCursorEnabled).value<bool>();
view->setBlinkingCursor(blinkingCursor);
} }
void ViewManager::profileChanged(const QString& key) void ViewManager::profileChanged(const QString& key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment