summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-11-21 21:30:02 -0400
committerHenry Castro <hcastro@collabora.com>2023-01-30 23:23:15 +0000
commit326dec315c29028ad1c163020d518e1236f37b6b (patch)
treea5a6e7ba23f1292a95a6009f9f4852707e05e18e /cui
parent9d4ac7d73c036d8e8bdf5418919c1bfd2062ed6d (diff)
cui: add entry "RestProtocol" to language tool dialog
Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I6511fc2b353c47b1ff537c42d3484b3a42c1b121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143106 Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145596 Tested-by: Jenkins
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optlanguagetool.cxx3
-rw-r--r--cui/source/options/optlanguagetool.hxx3
-rw-r--r--cui/uiconfig/ui/langtoolconfigpage.ui38
3 files changed, 42 insertions, 2 deletions
diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx
index f0006d1dd0e0..7a087b09e8c0 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -30,6 +30,7 @@ OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
, m_xBaseURLED(m_xBuilder->weld_entry("baseurl"))
, m_xUsernameED(m_xBuilder->weld_entry("username"))
, m_xApiKeyED(m_xBuilder->weld_entry("apikey"))
+ , m_xRestProtocol(m_xBuilder->weld_entry("restprotocol"))
, m_xActivateBox(m_xBuilder->weld_check_button("activate"))
, m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl"))
, m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings"))
@@ -73,6 +74,7 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*)
m_xUsernameED->set_text(rLanguageOpts.getUsername());
m_xApiKeyED->set_text(rLanguageOpts.getApiKey());
+ m_xRestProtocol->set_text(rLanguageOpts.getRestProtocol());
m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != true);
}
@@ -89,6 +91,7 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
rLanguageOpts.setUsername(m_xUsernameED->get_text());
rLanguageOpts.setApiKey(m_xApiKeyED->get_text());
+ rLanguageOpts.setRestProtocol(m_xRestProtocol->get_text());
rLanguageOpts.setSSLVerification(m_xSSLDisableVerificationBox->get_active() != true);
return false;
}
diff --git a/cui/source/options/optlanguagetool.hxx b/cui/source/options/optlanguagetool.hxx
index 666512804c62..141d88f63bb4 100644
--- a/cui/source/options/optlanguagetool.hxx
+++ b/cui/source/options/optlanguagetool.hxx
@@ -38,6 +38,7 @@ private:
std::unique_ptr<weld::Entry> m_xBaseURLED;
std::unique_ptr<weld::Entry> m_xUsernameED;
std::unique_ptr<weld::Entry> m_xApiKeyED;
+ std::unique_ptr<weld::Entry> m_xRestProtocol;
std::unique_ptr<weld::CheckButton> m_xActivateBox;
std::unique_ptr<weld::CheckButton> m_xSSLDisableVerificationBox;
std::unique_ptr<weld::Frame> m_xApiSettingsFrame;
@@ -45,4 +46,4 @@ private:
void EnableControls(bool bEnable);
DECL_LINK(CheckHdl, weld::Toggleable&, void);
-}; \ No newline at end of file
+};
diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui b/cui/uiconfig/ui/langtoolconfigpage.ui
index 237040fa76b7..1d7452161998 100644
--- a/cui/uiconfig/ui/langtoolconfigpage.ui
+++ b/cui/uiconfig/ui/langtoolconfigpage.ui
@@ -80,7 +80,7 @@
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">5</property>
+ <property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="base">
@@ -192,6 +192,42 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="restlbl">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="langtoolconfigpage|restlbl">REST protocol:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">restprotocol</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="restprotocol">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="restdesc">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="langtoolconfigpage|restdesc">Your LanguageTool REST API protocol for usage.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">7</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
<child>