summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx2
-rw-r--r--cui/source/dialogs/toolbarmodedlg.cxx7
-rw-r--r--cui/source/dialogs/uitabpage.cxx4
-rw-r--r--cui/source/inc/uitabpage.hxx2
-rw-r--r--cui/source/options/appearance.cxx28
-rw-r--r--cui/source/options/appearance.hxx9
-rw-r--r--cui/uiconfig/ui/editmodulesdialog.ui139
-rw-r--r--cui/uiconfig/ui/eventsconfigpage.ui98
8 files changed, 148 insertions, 141 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 89eee514e193..f90d51858e94 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -296,6 +296,8 @@ IMPL_LINK_NOARG(FmSearchDialog, OnClickedSearchAgain, weld::Button&, void)
else
m_pSearchEngine->SearchNextSpecial(m_prbSearchForNull->get_active());
}
+ // tdf#155308: explicitly keep the focus by default for non gtk renderings
+ m_pbSearchAgain->grab_focus();
}
else
{ // the button has the function 'cancel'
diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx
index 901043f3500e..2b259e9701cc 100644
--- a/cui/source/dialogs/toolbarmodedlg.cxx
+++ b/cui/source/dialogs/toolbarmodedlg.cxx
@@ -49,7 +49,12 @@ void ToolbarmodeDialog::ActivatePage(const OUString& rPage)
IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, rButton, void)
{
UITabPage* pUITabPage = static_cast<UITabPage*>(GetCurTabPage());
- const OUString& sCmd = pUITabPage->GetSelectedMode();
+ OUString sCmd = pUITabPage->GetSelectedMode();
+ if (sCmd.isEmpty())
+ {
+ SAL_WARN("cui.dialogs", "ToolbarmodeDialog: no mode selected");
+ return;
+ }
//apply to all except current module
if (&rButton == m_xResetBtn.get()) // Apply to All
diff --git a/cui/source/dialogs/uitabpage.cxx b/cui/source/dialogs/uitabpage.cxx
index 7079d5cf4e1a..27bc7be648e7 100644
--- a/cui/source/dialogs/uitabpage.cxx
+++ b/cui/source/dialogs/uitabpage.cxx
@@ -128,9 +128,11 @@ int UITabPage::GetActiveRadioButton()
return -1;
}
-const OUString& UITabPage::GetSelectedMode()
+OUString UITabPage::GetSelectedMode()
{
int i = GetActiveRadioButton();
+ if (i < 0)
+ return OUString();
return std::get<1>(UIMODES_ARRAY[i]);
}
diff --git a/cui/source/inc/uitabpage.hxx b/cui/source/inc/uitabpage.hxx
index 1851243a69d7..f12339df2297 100644
--- a/cui/source/inc/uitabpage.hxx
+++ b/cui/source/inc/uitabpage.hxx
@@ -32,7 +32,7 @@ public:
static std::unique_ptr<SfxTabPage>
Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
- const OUString& GetSelectedMode();
+ OUString GetSelectedMode();
static OUString GetCurrentApp();
};
diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx
index 1cae201a5b0b..225bfbd862ac 100644
--- a/cui/source/options/appearance.cxx
+++ b/cui/source/options/appearance.cxx
@@ -166,9 +166,9 @@ OUString SvxAppearanceTabPage::GetAllStrings()
bool SvxAppearanceTabPage::FillItemSet(SfxItemSet* /* rSet */)
{
// commit appearance value if changed
- if (eCurrentAppearanceMode != static_cast<Appearance>(MiscSettings::GetAppColorMode()))
+ if (eCurrentAppearanceMode != MiscSettings::GetAppColorMode())
{
- MiscSettings::SetAppColorMode(static_cast<int>(eCurrentAppearanceMode));
+ MiscSettings::SetAppColorMode(eCurrentAppearanceMode);
// if themes disabled then change the document colors as per the new appearance mode.
if (ThemeColors::IsThemeDisabled())
UpdateDocumentAppearance();
@@ -193,7 +193,7 @@ void SvxAppearanceTabPage::Reset(const SfxItemSet* /* rSet */)
UpdateRemoveBtnState();
// reset appearance
- eCurrentAppearanceMode = static_cast<Appearance>(MiscSettings::GetAppColorMode());
+ eCurrentAppearanceMode = MiscSettings::GetAppColorMode();
// reset ColorConfig
pColorConfig->ClearModified();
@@ -218,16 +218,16 @@ IMPL_LINK_NOARG(SvxAppearanceTabPage, ShowInDocumentHdl, weld::Toggleable&, void
IMPL_LINK_NOARG(SvxAppearanceTabPage, AppearanceChangeHdl, weld::Toggleable&, void)
{
if (m_xAppearanceSystem->get_state() == TRISTATE_TRUE)
- eCurrentAppearanceMode = Appearance::SYSTEM;
+ eCurrentAppearanceMode = AppearanceMode::AUTO;
if (m_xAppearanceLight->get_state() == TRISTATE_TRUE)
- eCurrentAppearanceMode = Appearance::LIGHT;
+ eCurrentAppearanceMode = AppearanceMode::LIGHT;
if (m_xAppearanceDark->get_state() == TRISTATE_TRUE)
- eCurrentAppearanceMode = Appearance::DARK;
+ eCurrentAppearanceMode = AppearanceMode::DARK;
// set the extension theme on light/dark
// restart iff appearance was toggled and theme was enabled
m_bRestartRequired = false;
- if (eCurrentAppearanceMode != static_cast<Appearance>(MiscSettings::GetAppColorMode())
+ if (eCurrentAppearanceMode != MiscSettings::GetAppColorMode()
&& !ThemeColors::IsThemeDisabled())
m_bRestartRequired = true;
@@ -484,22 +484,22 @@ void SvxAppearanceTabPage::InitAppearance()
m_xAppearanceSystem->connect_toggled(LINK(this, SvxAppearanceTabPage, AppearanceChangeHdl));
m_xAppearanceDark->connect_toggled(LINK(this, SvxAppearanceTabPage, AppearanceChangeHdl));
- Appearance nAppearance = static_cast<Appearance>(MiscSettings::GetAppColorMode());
+ AppearanceMode nAppearance = MiscSettings::GetAppColorMode();
eCurrentAppearanceMode = nAppearance;
switch (nAppearance)
{
- case Appearance::SYSTEM:
+ case AppearanceMode::AUTO:
m_xAppearanceSystem->set_state(TRISTATE_TRUE);
break;
- case Appearance::LIGHT:
+ case AppearanceMode::LIGHT:
m_xAppearanceLight->set_state(TRISTATE_TRUE);
break;
- case Appearance::DARK:
+ case AppearanceMode::DARK:
m_xAppearanceDark->set_state(TRISTATE_TRUE);
break;
default:
- eCurrentAppearanceMode = Appearance::SYSTEM;
+ eCurrentAppearanceMode = AppearanceMode::AUTO;
}
}
@@ -587,8 +587,8 @@ void SvxAppearanceTabPage::UpdateDocumentAppearance()
bool SvxAppearanceTabPage::IsDarkModeEnabled()
{
- return eCurrentAppearanceMode == Appearance::DARK
- || (eCurrentAppearanceMode == Appearance::SYSTEM && MiscSettings::GetUseDarkMode());
+ return eCurrentAppearanceMode == AppearanceMode::DARK
+ || (eCurrentAppearanceMode == AppearanceMode::AUTO && MiscSettings::GetUseDarkMode());
}
void SvxAppearanceTabPage::FillItemsList()
diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx
index 45ba347be1d8..73a2a44f248e 100644
--- a/cui/source/options/appearance.hxx
+++ b/cui/source/options/appearance.hxx
@@ -33,15 +33,8 @@ using namespace svtools;
class SvxAppearanceTabPage : public SfxTabPage
{
private:
- enum class Appearance
- {
- SYSTEM,
- LIGHT,
- DARK,
- };
-
bool m_bRestartRequired;
- Appearance eCurrentAppearanceMode;
+ AppearanceMode eCurrentAppearanceMode;
std::unique_ptr<EditableColorConfig> pColorConfig;
std::unique_ptr<weld::ComboBox> m_xSchemeList;
diff --git a/cui/uiconfig/ui/editmodulesdialog.ui b/cui/uiconfig/ui/editmodulesdialog.ui
index 16e232384b4e..ad99ac03c778 100644
--- a/cui/uiconfig/ui/editmodulesdialog.ui
+++ b/cui/uiconfig/ui/editmodulesdialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="cui">
<requires lib="gtk+" version="3.20"/>
<object class="GtkTreeStore" id="liststore1">
@@ -16,6 +16,10 @@
<column type="gboolean"/>
<!-- column-name weight1 -->
<column type="gint"/>
+ <!-- column-name sensitive1 -->
+ <column type="gboolean"/>
+ <!-- column-name sensitive2 -->
+ <column type="gboolean"/>
</columns>
</object>
<object class="GtkListStore" id="liststore6">
@@ -29,32 +33,32 @@
</columns>
</object>
<object class="GtkDialog" id="EditModulesDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="editmodulesdialog|EditModulesDialog">Edit Modules</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <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>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="close">
<property name="label" translatable="yes" context="stock">_Close</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -67,8 +71,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</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="use-underline">True</property>
</object>
<packing>
@@ -82,55 +86,55 @@
<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">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<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>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">12</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">12</property>
<child>
<object class="GtkLinkButton" id="moredictslink">
<property name="label" translatable="yes" context="editmodulesdialog|moredictslink">Get more dictionaries online...</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="relief">none</property>
<property name="xalign">0</property>
<property name="uri">https://extensions.libreoffice.org/dictionaries/</property>
</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>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="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="label" translatable="yes" context="editmodulesdialog|label2">Language:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">language</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">language</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -142,10 +146,10 @@
<child>
<object class="GtkComboBox" id="language">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="model">liststore6</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
+ <property name="entry-text-column">0</property>
+ <property name="id-column">1</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext9"/>
<attributes>
@@ -172,32 +176,32 @@
</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>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid2">
<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="up">
<property name="label" translatable="yes" context="editmodulesdialog|up">Move Up</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="up-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="up">Increases the priority of the module selected in the list box by one level.</property>
@@ -214,9 +218,9 @@
<object class="GtkButton" id="down">
<property name="label" translatable="yes" context="editmodulesdialog|down">Move Down</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="down-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="down">Decreases the priority of the module selected in the list box by one level.</property>
@@ -233,9 +237,9 @@
<object class="GtkButton" id="back">
<property name="label" translatable="yes" context="editmodulesdialog|back">_Reset</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="back-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="back">Click here to undo the current changes in the list box.</property>
@@ -250,27 +254,27 @@
</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="GtkScrolledWindow">
<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="lingudicts">
<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="vexpand">True</property>
<property name="model">liststore1</property>
- <property name="headers_visible">False</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="headers-visible">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>
@@ -278,10 +282,11 @@
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="resizable">True</property>
<property name="spacing">6</property>
- <property name="alignment">0.50000000000000000000</property>
+ <property name="alignment">0.5</property>
<child>
<object class="GtkCellRendererToggle" id="cellrenderer5"/>
<attributes>
+ <attribute name="sensitive">6</attribute>
<attribute name="visible">3</attribute>
<attribute name="active">0</attribute>
</attributes>
@@ -292,10 +297,11 @@
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="resizable">True</property>
<property name="spacing">6</property>
- <property name="alignment">0.50000000000000000000</property>
+ <property name="alignment">0.5</property>
<child>
<object class="GtkCellRendererText" id="cellrenderer4"/>
<attributes>
+ <attribute name="sensitive">7</attribute>
<attribute name="text">1</attribute>
<attribute name="weight">5</attribute>
</attributes>
@@ -311,14 +317,14 @@
</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>
</object>
@@ -326,7 +332,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="editmodulesdialog|label1">Options</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -346,8 +352,5 @@
<action-widget response="-7">close</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
- <child type="titlebar">
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/cui/uiconfig/ui/eventsconfigpage.ui b/cui/uiconfig/ui/eventsconfigpage.ui
index 8a679d77c6ec..ca463ceba778 100644
--- a/cui/uiconfig/ui/eventsconfigpage.ui
+++ b/cui/uiconfig/ui/eventsconfigpage.ui
@@ -123,56 +123,13 @@
</packing>
</child>
<child>
- <!-- n-columns=1 n-rows=2 -->
- <object class="GtkGrid" id="grid2">
+ <object class="GtkBox" id="grid2">
<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">12</property>
- <child>
- <!-- n-columns=2 n-rows=1 -->
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="column-spacing">12</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="eventsconfigpage|label2">Save in:</property>
- <property name="use-underline">True</property>
- <property name="mnemonic-widget">savein</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="savein">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="savein-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="eventsconfigpage|extended_tip|savein">Select first where to save the event binding, in the current document or in the office suite.</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">1</property>
- </packing>
- </child>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
@@ -239,8 +196,53 @@
</child>
</object>
<packing>
- <property name="left-attach">0</property>
- <property name="top-attach">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <!-- n-columns=2 n-rows=1 -->
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="column-spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="eventsconfigpage|label2">Save in:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">savein</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="savein">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="savein-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="eventsconfigpage|extended_tip|savein">Select first where to save the event binding, in the current document or in the office suite.</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>