summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2015-10-03 18:23:07 -0300
committerjan iversen <jani@documentfoundation.org>2015-12-24 12:47:05 +0000
commit536fcf91de1bdbfca4c300484ebe672f9cbca0e7 (patch)
tree1b88c8634e9efa8a4e0c969f6b0d65f31d831055 /cui
parentd4f5f5eb00b55035cf659c44396dc63c2347b84f (diff)
Basic IDE Options code completion tweak.
Since the use of code completion depends on the option of using UNO Extended Types, the patch enables the Code Completion checkbox only if the Use Extended Type checkbox is checked. Furthermore, if the Use Extended Type checkbox is disabled, the Code Completion CB is unchecked. Change-Id: Ic24a318f0c4424204d42035515a4f5f8758a5177 Reviewed-on: https://gerrit.libreoffice.org/19114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optbasic.cxx11
-rw-r--r--cui/source/options/optbasic.hxx2
-rw-r--r--cui/uiconfig/ui/optbasicidepage.ui70
3 files changed, 30 insertions, 53 deletions
diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index 3feb235a0ae9..5ee33b35a7c8 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -75,6 +75,8 @@ void SvxBasicIDEOptionsPage::LoadConfig()
pAutocloseParenChk->Check( bParenClose );
pAutoCorrectChk->Check( bCorrect );
pUseExtendedTypesChk->Check( bExtended );
+ pUseExtendedTypesChk->SetToggleHdl( LINK( this, SvxBasicIDEOptionsPage, EnableExtType ) );
+ pCodeCompleteChk->Enable(pUseExtendedTypesChk->IsChecked());
}
bool SvxBasicIDEOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
@@ -158,4 +160,13 @@ void SvxBasicIDEOptionsPage::FillUserData()
SetUserData( aUserData );
}
+IMPL_LINK_NOARG_TYPED(SvxBasicIDEOptionsPage, EnableExtType, CheckBox&, void)
+{
+ bool bEnable = pUseExtendedTypesChk->IsChecked();
+ pCodeCompleteChk->Enable(bEnable);
+ if (!pUseExtendedTypesChk->IsChecked())
+ {
+ pCodeCompleteChk->Check(false);
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx
index 3d3351833a23..918501c4b40c 100644
--- a/cui/source/options/optbasic.hxx
+++ b/cui/source/options/optbasic.hxx
@@ -35,6 +35,8 @@ private:
VclPtr<CheckBox> pUseExtendedTypesChk;
void LoadConfig();
+ DECL_LINK_TYPED( EnableExtType, CheckBox&, void );
+
public:
SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/cui/uiconfig/ui/optbasicidepage.ui b/cui/uiconfig/ui/optbasicidepage.ui
index 90ea4c88ba55..5516d9038f84 100644
--- a/cui/uiconfig/ui/optbasicidepage.ui
+++ b/cui/uiconfig/ui/optbasicidepage.ui
@@ -9,57 +9,6 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkCheckButton" id="codecomplete_enable">
- <property name="label" translatable="yes">Enable code completion</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Code Completion</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -151,7 +100,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -185,6 +134,21 @@
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="codecomplete_enable">
+ <property name="label" translatable="yes">Enable code completion</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_left">25</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
</child>
</object>
@@ -203,7 +167,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>