Kaydet (Commit) 0a73815a authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SwCopyToDialog

Change-Id: I5801a6a2173c3f7df74be4a04355899d276ac2a1
Reviewed-on: https://gerrit.libreoffice.org/52915Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst c07e83bb
...@@ -188,32 +188,24 @@ IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, weld::Entry&, rEdit, void) ...@@ -188,32 +188,24 @@ IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, weld::Entry&, rEdit, void)
m_xOKPB->set_sensitive(bIsEmptyAllowed || !rEdit.get_text().isEmpty()); m_xOKPB->set_sensitive(bIsEmptyAllowed || !rEdit.get_text().isEmpty());
} }
class SwCopyToDialog : public SfxModalDialog class SwCopyToDialog : public weld::GenericDialogController
{ {
VclPtr<Edit> m_pCCED; std::unique_ptr<weld::Entry> m_xCCED;
VclPtr<Edit> m_pBCCED; std::unique_ptr<weld::Entry> m_xBCCED;
public: public:
explicit SwCopyToDialog(vcl::Window* pParent) explicit SwCopyToDialog(weld::Window* pParent)
: SfxModalDialog(pParent, "CCDialog", : GenericDialogController(pParent, "modules/swriter/ui/ccdialog.ui", "CCDialog")
"modules/swriter/ui/ccdialog.ui") , m_xCCED(m_xBuilder->weld_entry("cc"))
, m_xBCCED(m_xBuilder->weld_entry("bcc"))
{ {
get(m_pCCED, "cc");
get(m_pBCCED, "bcc");
}
virtual ~SwCopyToDialog() override { disposeOnce(); }
virtual void dispose() override
{
m_pCCED.clear();
m_pBCCED.clear();
SfxModalDialog::dispose();
} }
OUString GetCC() {return m_pCCED->GetText();} OUString GetCC() {return m_xCCED->get_text();}
void SetCC(const OUString& rSet) {m_pCCED->SetText(rSet);} void SetCC(const OUString& rSet) {m_xCCED->set_text(rSet);}
OUString GetBCC() {return m_pBCCED->GetText();} OUString GetBCC() {return m_xBCCED->get_text();}
void SetBCC(const OUString& rSet) {m_pBCCED->SetText(rSet);} void SetBCC(const OUString& rSet) {m_xBCCED->set_text(rSet);}
}; };
SwMMResultSaveDialog::SwMMResultSaveDialog() SwMMResultSaveDialog::SwMMResultSaveDialog()
...@@ -493,15 +485,15 @@ IMPL_LINK(SwMMResultEmailDialog, DocumentSelectionHdl_Impl, Button*, pButton, vo ...@@ -493,15 +485,15 @@ IMPL_LINK(SwMMResultEmailDialog, DocumentSelectionHdl_Impl, Button*, pButton, vo
m_pToNF->Enable(bEnableFromTo); m_pToNF->Enable(bEnableFromTo);
} }
IMPL_LINK(SwMMResultEmailDialog, CopyToHdl_Impl, Button*, pButton, void) IMPL_LINK_NOARG(SwMMResultEmailDialog, CopyToHdl_Impl, Button*, void)
{ {
ScopedVclPtrInstance< SwCopyToDialog > pDlg(pButton); SwCopyToDialog aDlg(GetFrameWeld());
pDlg->SetCC(m_sCC ); aDlg.SetCC(m_sCC );
pDlg->SetBCC(m_sBCC); aDlg.SetBCC(m_sBCC);
if(RET_OK == pDlg->Execute()) if (aDlg.run() == RET_OK)
{ {
m_sCC = pDlg->GetCC() ; m_sCC = aDlg.GetCC() ;
m_sBCC = pDlg->GetBCC(); m_sBCC = aDlg.GetBCC();
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 --> <!-- Generated with glade 3.20.4 -->
<interface domain="sw"> <interface domain="sw">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="CCDialog"> <object class="GtkDialog" id="CCDialog">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="title" translatable="yes" context="ccdialog|CCDialog">Copy To</property> <property name="title" translatable="yes" context="ccdialog|CCDialog">Copy To</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="type_hint">dialog</property>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
...@@ -96,10 +99,10 @@ ...@@ -96,10 +99,10 @@
<object class="GtkLabel" id="label2"> <object class="GtkLabel" id="label2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes" context="ccdialog|label2">_Cc:</property> <property name="label" translatable="yes" context="ccdialog|label2">_Cc:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">cc</property> <property name="mnemonic_widget">cc</property>
<property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -110,10 +113,10 @@ ...@@ -110,10 +113,10 @@
<object class="GtkLabel" id="label3"> <object class="GtkLabel" id="label3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes" context="ccdialog|label3">_Bcc:</property> <property name="label" translatable="yes" context="ccdialog|label3">_Bcc:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">bcc</property> <property name="mnemonic_widget">bcc</property>
<property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -124,9 +127,9 @@ ...@@ -124,9 +127,9 @@
<object class="GtkLabel" id="label4"> <object class="GtkLabel" id="label4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="ccdialog|label4">Note: Separate e-mail addresses with a semicolon (;).</property> <property name="label" translatable="yes" context="ccdialog|label4">Note: Separate e-mail addresses with a semicolon (;).</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -184,5 +187,8 @@ ...@@ -184,5 +187,8 @@
<action-widget response="-6">cancel</action-widget> <action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget> <action-widget response="-11">help</action-widget>
</action-widgets> </action-widgets>
<child>
<placeholder/>
</child>
</object> </object>
</interface> </interface>
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