Commit d4a5d2d0 authored by Robert Knight's avatar Robert Knight
Browse files

Executable and directory completion for Command and Initial Directory options....

Executable and directory completion for Command and Initial Directory options.  Show clear buttons in tab title format dialog line edit and initial directory line edit.

svn path=/branches/work/konsole-split-view/; revision=660378
parent 125a8bb3
......@@ -28,6 +28,7 @@
#include <KIcon>
#include <KIconDialog>
#include <KDirSelectDialog>
#include <KUrlCompletion>
// Konsole
#include "ColorScheme.h"
......@@ -97,7 +98,13 @@ void EditProfileDialog::setupGeneralPage(const Profile* info)
{
_ui->profileNameEdit->setText( info->name() );
_ui->commandEdit->setText( info->command() );
KUrlCompletion* exeCompletion = new KUrlCompletion(KUrlCompletion::ExeCompletion);
exeCompletion->setDir(QString::null);
_ui->commandEdit->setCompletionObject( exeCompletion );
_ui->initialDirEdit->setText( info->defaultWorkingDirectory() );
_ui->initialDirEdit->setCompletionObject( new KUrlCompletion(KUrlCompletion::DirCompletion) );
_ui->initialDirEdit->setClearButtonShown(true);
_ui->iconSelectButton->setIcon( KIcon(info->icon()) );
_ui->tabTitleEdit->setText( info->property(Profile::LocalTabTitleFormat).value<QString>() );
......
......@@ -56,7 +56,7 @@
</widget>
</item>
<item row="1" column="1" colspan="2" >
<widget class="QLineEdit" name="commandEdit" />
<widget class="KLineEdit" name="commandEdit" />
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_9" >
......@@ -66,7 +66,7 @@
</widget>
</item>
<item row="2" column="1" colspan="2" >
<widget class="QLineEdit" name="initialDirEdit" />
<widget class="KLineEdit" name="initialDirEdit" />
</item>
<item row="2" column="3" >
<widget class="QToolButton" name="dirSelectButton" >
......@@ -609,6 +609,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header location="global" >klineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -38,9 +38,10 @@ const EditTabTitleFormatDialog::Element EditTabTitleFormatDialog::_remoteElement
{
{ "%p" , i18n("Profile Name") },
{ "%u" , i18n("User Name") },
{ "%h" , i18n("Remote Host") }
{ "%h" , i18n("Remote Host (Short)") },
{ "%H" , i18n("Remote Host (Long)") }
};
const int EditTabTitleFormatDialog::_remoteElementCount = 3;
const int EditTabTitleFormatDialog::_remoteElementCount = 4;
EditTabTitleFormatDialog::EditTabTitleFormatDialog(QWidget* parent)
: KDialog(parent)
......@@ -51,6 +52,8 @@ EditTabTitleFormatDialog::EditTabTitleFormatDialog(QWidget* parent)
_ui = new Ui::EditTabTitleFormatDialog();
_ui->setupUi(mainWidget());
_ui->tabTitleFormatEdit->setClearButtonShown(true);
connect( _ui->elementComboBox , SIGNAL(activated(int)) , this , SLOT(insertElement(int)) );
}
EditTabTitleFormatDialog::~EditTabTitleFormatDialog()
......@@ -67,6 +70,7 @@ void EditTabTitleFormatDialog::insertElement(int index)
void EditTabTitleFormatDialog::setTabTitleFormat(const QString& format)
{
_ui->tabTitleFormatEdit->setText(format);
_ui->tabTitleFormatEdit->selectAll();
}
QString EditTabTitleFormatDialog::tabTitleFormat() const
{
......
......@@ -43,7 +43,7 @@
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="tabTitleFormatEdit" />
<widget class="KLineEdit" name="tabTitleFormatEdit" />
</item>
<item row="0" column="0" colspan="2" >
<widget class="QLabel" name="label_3" >
......@@ -54,7 +54,7 @@
</size>
</property>
<property name="text" >
<string>Tab titles can contain a mixture of text and dynamic elements which update automatically as the programs running in the terminal change.</string>
<string>Tab titles can contain a mixture of plain text and dynamic elements which update automatically as the programs running in the terminal change.</string>
</property>
<property name="wordWrap" >
<bool>true</bool>
......@@ -63,6 +63,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header location="global" >klineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
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