summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2023-10-26 11:56:58 +0200
committerBalazs Varga <balazs.varga.extern@allotropia.de>2023-10-27 08:52:05 +0200
commit860b98657ccc54210575db6b6f81de1db05512c8 (patch)
tree469da0fbe2996cbea96a554b7e79cb909c3aa45c /cui
parent89a5e1a41ca042cb29467ae953fe26cbafa9b75a (diff)
tdf#157853 - UI: Part 11 - Unify lockdown behavior of Options dialog
for Advanced Page. Change-Id: I3ef33e98cd5a39313f51eb90682f20cdc172f042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158496 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optjava.cxx8
-rw-r--r--cui/source/options/optjava.hxx2
-rw-r--r--cui/uiconfig/ui/optadvancedpage.ui208
3 files changed, 129 insertions, 89 deletions
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index a35a6cb42130..6c6d3d07cdc3 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -77,7 +77,9 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* pPage, weld::DialogContr
, m_xClassPathBtn(m_xBuilder->weld_button("classpath"))
, m_xExpertConfigBtn(m_xBuilder->weld_button("expertconfig"))
, m_xExperimentalCB(m_xBuilder->weld_check_button("experimental"))
+ , m_xExperimentalImg(m_xBuilder->weld_widget("lockexperimental"))
, m_xMacroCB(m_xBuilder->weld_check_button("macrorecording"))
+ , m_xMacroImg(m_xBuilder->weld_widget("lockmacrorecording"))
, m_xAddDialogText(m_xBuilder->weld_label("selectruntime"))
, m_xJavaFrame(m_xBuilder->weld_widget("javaframe"))
{
@@ -109,10 +111,16 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* pPage, weld::DialogContr
m_xExpertConfigBtn->set_sensitive(false);
if (officecfg::Office::Common::Misc::MacroRecorderMode::isReadOnly())
+ {
m_xMacroCB->set_sensitive(false);
+ m_xMacroImg->set_visible(true);
+ }
if (officecfg::Office::Common::Misc::ExperimentalMode::isReadOnly())
+ {
m_xExperimentalCB->set_sensitive(false);
+ m_xExperimentalImg->set_visible(true);
+ }
xDialogListener->SetDialogClosedLink( LINK( this, SvxJavaOptionsPage, DialogClosedHdl ) );
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 080c5bcb748b..84422c903056 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -75,7 +75,9 @@ private:
std::unique_ptr<SvxJavaClassPathDlg> m_xPathDlg;
std::unique_ptr<weld::CheckButton> m_xExperimentalCB;
+ std::unique_ptr<weld::Widget> m_xExperimentalImg;
std::unique_ptr<weld::CheckButton> m_xMacroCB;
+ std::unique_ptr<weld::Widget> m_xMacroImg;
std::unique_ptr<weld::Label> m_xAddDialogText;
diff --git a/cui/uiconfig/ui/optadvancedpage.ui b/cui/uiconfig/ui/optadvancedpage.ui
index bbc6062a832c..7e0449861bab 100644
--- a/cui/uiconfig/ui/optadvancedpage.ui
+++ b/cui/uiconfig/ui/optadvancedpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="cui">
<requires lib="gtk+" version="3.20"/>
<object class="GtkTreeStore" id="liststore1">
@@ -26,39 +26,39 @@
</object>
<object class="GtkBox" id="OptAdvancedPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
+ <property name="border-width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<object class="GtkFrame" id="javaframe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
<child>
<object class="GtkCheckButton" id="javaenabled">
<property name="label" translatable="yes" context="optadvancedpage|javaenabled">_Use a Java runtime environment</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="javaenabled-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|javaenabled">Allows you to run extensions written with Java.</property>
@@ -72,52 +72,52 @@
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=4 -->
<object class="GtkGrid" id="javabox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="valign">start</property>
+ <property name="margin-start">12</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
- <property name="row_spacing">12</property>
- <property name="margin-start">12</property>
+ <property name="row-spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes" context="optadvancedpage|label2">_Java runtime environments (JRE) already installed:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">javas</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">javas</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="column_spacing">12</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
- <property name="layout_style">start</property>
+ <property name="layout-style">start</property>
<child>
<object class="GtkButton" id="add">
<property name="label" translatable="yes" context="optadvancedpage|add">_Add...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="add-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|add">Add a path to the root folder of a JRE on your computer.</property>
@@ -134,9 +134,9 @@
<object class="GtkButton" id="parameters">
<property name="label" translatable="yes" context="optadvancedpage|parameters">_Parameters...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="parameters-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|parameters">Opens the Java Start Parameters dialog.</property>
@@ -153,9 +153,9 @@
<object class="GtkButton" id="classpath">
<property name="label" translatable="yes" context="optadvancedpage|classpath">_Class Path...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="classpath-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|classpath">Opens the Class Path dialog.</property>
@@ -170,34 +170,34 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="javasscroll">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="javas">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection2"/>
</child>
@@ -268,46 +268,46 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="javapath">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="optadvancedpage|javapath">Location: </property>
<property name="xalign">0</property>
<attributes>
- <attribute name="scale" value="0.9"/>
+ <attribute name="scale" value="0.90000000000000002"/>
</attributes>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid3">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="selectruntime">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="optadvancedpage|selectruntime">Select a Java Runtime Environment</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
@@ -315,8 +315,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
</object>
@@ -331,7 +331,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="optadvancedpage|label1">Java Options</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -348,29 +348,30 @@
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=3 -->
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkCheckButton" id="experimental">
<property name="label" translatable="yes" context="optadvancedpage|experimental">Enable experimental features (may be unstable)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="experimental-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|experimental">Enable experimental features</property>
@@ -378,19 +379,19 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="macrorecording">
<property name="label" translatable="yes" context="optadvancedpage|macrorecording">Enable macro recording (may be limited)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="macrorecording-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|macrorecording">Enable macro recording</property>
@@ -398,16 +399,16 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="expertconfig">
<property name="label" translatable="yes" context="optadvancedpage|expertconfig">Open Expert Configuration</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="halign">end</property>
<property name="hexpand">True</property>
<child internal-child="accessible">
@@ -417,16 +418,45 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="lockexperimental">
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="icon-name">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkImage" id="lockmacrorecording">
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="icon-name">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="optadvancedpage|label12">Optional Features</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -437,7 +467,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>