Kaydet (Commit) 28db2de9 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

tdf#83877 Show signing instructions in sign dialog

Change-Id: I230ff1fcbc6f98755ae588dca32d77c442d5f042
Reviewed-on: https://gerrit.libreoffice.org/52832Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 78d77438
......@@ -53,6 +53,8 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc
, m_xEditComment(m_xBuilder->weld_text_view("edit_comment"))
, m_xBtnChooseCertificate(m_xBuilder->weld_button("btn_select_certificate"))
, m_xBtnSign(m_xBuilder->weld_button("ok"))
, m_xLabelHint(m_xBuilder->weld_label("label_hint"))
, m_xLabelHintText(m_xBuilder->weld_label("label_hint_text"))
{
Reference<container::XIndexAccess> xIndexAccess(m_xModel->getCurrentSelection(),
UNO_QUERY_THROW);
......@@ -84,8 +86,21 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc
>>= m_aSuggestedSignerName;
m_xShapeProperties->getPropertyValue("SignatureLineSuggestedSignerTitle")
>>= m_aSuggestedSignerTitle;
OUString aSigningInstructions;
m_xShapeProperties->getPropertyValue("SignatureLineSigningInstructions")
>>= aSigningInstructions;
m_xShapeProperties->getPropertyValue("SignatureLineShowSignDate") >>= m_bShowSignDate;
if (aSigningInstructions.isEmpty())
{
m_xLabelHint->hide();
m_xLabelHintText->hide();
}
else
{
m_xLabelHintText->set_label(aSigningInstructions);
}
ValidateFields();
}
......
......@@ -25,6 +25,8 @@ private:
std::unique_ptr<weld::TextView> m_xEditComment;
std::unique_ptr<weld::Button> m_xBtnChooseCertificate;
std::unique_ptr<weld::Button> m_xBtnSign;
std::unique_ptr<weld::Label> m_xLabelHint;
std::unique_ptr<weld::Label> m_xLabelHintText;
css::uno::Reference<css::beans::XPropertySet> m_xShapeProperties;
css::uno::Reference<css::security::XCertificate> m_xSelectedCertifate;
......
......@@ -190,7 +190,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
......@@ -210,6 +210,36 @@
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_hint">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes" context="signsignatureline|label_hint">Instructions from the document creator:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">label_hint_text</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_hint_text">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
<property name="mnemonic_widget">edit_comment</property>
<attributes>
<attribute name="style" value="oblique"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
......
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