Commit 17dcb6d3 authored by hjk's avatar hjk

FakeVim: Move .vimrc related options closer to each other

Task-number: QTCREATORBUG-9406

Change-Id: I61333e3105e8d8edb03edecdfdac9d9f11dfc3b5
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent b00bb2c5
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>580</width>
<height>479</height>
<height>474</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
......@@ -137,13 +137,6 @@
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="checkBoxReadVimRc">
<property name="text">
<string>Read .vimrc</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......@@ -248,9 +241,9 @@
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="1" column="0">
<item row="0" column="0">
<widget class="QLabel" name="labelBackspace">
<property name="text">
<string>Backspace:</string>
......@@ -260,10 +253,10 @@
</property>
</widget>
</item>
<item row="1" column="1">
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditBackspace"/>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="QLabel" name="labelIsKeyword">
<property name="text">
<string>Keyword characters:</string>
......@@ -273,26 +266,26 @@
</property>
</widget>
</item>
<item row="2" column="1">
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditIsKeyword"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelVimRcPath">
<item row="2" column="0">
<widget class="QCheckBox" name="checkBoxReadVimRc">
<property name="text">
<string>Location of .vimrc:</string>
</property>
<property name="buddy">
<cstring>lineEditVimRcPath</cstring>
<string>Read .vimrc, from location:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayoutVimRcPath">
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="lineEditVimRcPath">
<property name="toolTip">
<string>Keep empty to use the default path, i.e. %USERPROFILE%\_vimrc on Windows, ~/.vimrc otherwise.</string>
</property>
<property name="placeholderText">
<string/>
</property>
</widget>
</item>
<item>
......@@ -379,12 +372,12 @@
<tabstop>checkBoxWrapScan</tabstop>
<tabstop>checkBoxShowMarks</tabstop>
<tabstop>checkBoxPassControlKey</tabstop>
<tabstop>checkBoxReadVimRc</tabstop>
<tabstop>spinBoxShiftWidth</tabstop>
<tabstop>spinBoxTabStop</tabstop>
<tabstop>spinBoxScrollOff</tabstop>
<tabstop>lineEditBackspace</tabstop>
<tabstop>lineEditIsKeyword</tabstop>
<tabstop>checkBoxReadVimRc</tabstop>
<tabstop>lineEditVimRcPath</tabstop>
<tabstop>pushButtonVimRcPath</tabstop>
<tabstop>pushButtonCopyTextEditorSettings</tabstop>
......
......@@ -270,6 +270,9 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
{
QWidget *w = new QWidget(parent);
m_ui.setupUi(w);
m_ui.lineEditVimRcPath->setPlaceholderText(
Utils::HostOsInfo::isAnyUnixHost() ? tr("Default: $HOME/.vimrc")
: tr("Default: %USERPROFILE%\\_vimrc"));
m_group.clear();
m_group.insert(theFakeVimSetting(ConfigUseFakeVim),
......@@ -417,7 +420,6 @@ void FakeVimOptionPage::openVimRc()
void FakeVimOptionPage::updateVimRcWidgets()
{
bool enabled = m_ui.checkBoxReadVimRc->isChecked();
m_ui.labelVimRcPath->setEnabled(enabled);
m_ui.lineEditVimRcPath->setEnabled(enabled);
m_ui.pushButtonVimRcPath->setEnabled(enabled);
}
......
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