summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-14 16:29:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-14 16:30:17 +0100
commita5598cf00a49469b14492b9c9c6a82d8f8e04c42 (patch)
treef5332354ae3a3261fb680731deec17bde65ad361 /sw/source/ui/dbui
parent86212cec81fe81ec79c17dff49734d63deed7247 (diff)
convert warn email's can't be sent dialog to .ui
Change-Id: I611c5cb7ab140a04e7ee4a78b6d828ca199c5624
Diffstat (limited to 'sw/source/ui/dbui')
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx37
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.hrc6
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.src48
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hrc4
4 files changed, 12 insertions, 83 deletions
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 2b9e2ebbe414..0216245d9280 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -24,6 +24,7 @@
#include <swmodule.hxx>
#include <view.hxx>
#include <edtwin.hxx>
+#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
#include <mailmergechildwindow.hxx>
#include <mmoutputpage.hxx>
@@ -241,36 +242,21 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa
}
}
-class SwSendWarningBox_Impl : public ModalDialog
+class SwSendWarningBox_Impl : public MessageDialog
{
- FixedImage aWarningImageIM;
- FixedInfo aWarningFI;
- FixedText aDetailFT;
- MultiLineEdit aDetailED;
- FixedLine aSeparatorFL;
- OKButton aOKPB;
-
+ VclMultiLineEdit *m_pDetailED;
public:
SwSendWarningBox_Impl(Window* pParent, const String& rDetails);
- ~SwSendWarningBox_Impl();
};
-SwSendWarningBox_Impl::SwSendWarningBox_Impl(Window* pParent, const String& rDetails) :
- ModalDialog(pParent, SW_RES( DLG_MM_SENDWARNING )),
- aWarningImageIM(this, SW_RES( IM_WARNING )),
- aWarningFI( this, SW_RES( FI_WARNING )),
- aDetailFT( this, SW_RES( FT_DETAILS )),
- aDetailED( this, SW_RES( ED_DETAILS )),
- aSeparatorFL( this, SW_RES( FL_SEPARATOR )),
- aOKPB( this, SW_RES(PB_OK))
-{
- FreeResource();
- aWarningImageIM.SetImage(WarningBox::GetStandardImage());
- aDetailED.SetText(rDetails);
-}
-
-SwSendWarningBox_Impl::~SwSendWarningBox_Impl()
+SwSendWarningBox_Impl::SwSendWarningBox_Impl(Window* pParent, const String& rDetails)
+ : MessageDialog(pParent, "WarnEmailDialog", "modules/swriter/ui/warnemaildialog.ui")
{
+ get(m_pDetailED, "errors");
+ m_pDetailED->SetMaxTextWidth(80 * m_pDetailED->approximate_char_width());
+ m_pDetailED->set_width_request(80 * m_pDetailED->approximate_char_width());
+ m_pDetailED->set_height_request(8 * m_pDetailED->GetTextHeight());
+ m_pDetailED->SetText(rDetails);
}
#define ITEMID_TASK 1
@@ -655,7 +641,8 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessag
++m_nErrorCount;
UpdateTransferStatus( );
- if(pError)
+
+ if (pError)
{
SwSendWarningBox_Impl* pDlg = new SwSendWarningBox_Impl(0, *pError);
pDlg->Execute();
diff --git a/sw/source/ui/dbui/mailmergechildwindow.hrc b/sw/source/ui/dbui/mailmergechildwindow.hrc
index da726672ef6e..1ba778b63506 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.hrc
+++ b/sw/source/ui/dbui/mailmergechildwindow.hrc
@@ -44,10 +44,4 @@
#define ST_FAILED 80
#define ST_TERMINATEQUERY 81
-#define IM_WARNING 10
-#define FI_WARNING 11
-#define FT_DETAILS 12
-#define ED_DETAILS 13
-#define PB_OK 14
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src
index f5ab311cdfcf..9e0961803af8 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.src
+++ b/sw/source/ui/dbui/mailmergechildwindow.src
@@ -207,52 +207,4 @@ ModelessDialog DLG_MM_SENDMAILS
};
};
-ModalDialog DLG_MM_SENDWARNING
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_MM_SENDWARNING;
- Size = MAP_APPFONT ( 240 , 137 ) ;
- Moveable = TRUE ;
-
- Text[en-US] = "E-Mails could not be sent";
- FixedImage IM_WARNING
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 30 , 30 ) ;
- };
- FixedText FI_WARNING
- {
- Pos = MAP_APPFONT ( 40 , 6 ) ;
- Size = MAP_APPFONT ( 170 , 30 ) ;
- WordBreak = TRUE;
- Text[ en-US ] = "The following error occurred:";
- };
- FixedText FT_DETAILS
- {
- Pos = MAP_APPFONT ( 40, 39 ) ;
- Size = MAP_APPFONT ( 174, 8 ) ;
- Text[ en-US ] = "Detailed information";
- };
- MultiLineEdit ED_DETAILS
- {
- HelpID = "sw:MultiLineEdit:DLG_MM_SENDWARNING:ED_DETAILS";
- Pos = MAP_APPFONT ( 40 , 50 ) ;
- Size = MAP_APPFONT ( 194 , 50 ) ;
- Border = TRUE;
- Readonly = TRUE;
- };
- FixedLine FL_SEPARATOR
- {
- Pos = MAP_APPFONT ( 0 , 106 ) ;
- Size = MAP_APPFONT ( 240 , 8 ) ;
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 95 , 117) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE;
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmoutputpage.hrc b/sw/source/ui/dbui/mmoutputpage.hrc
index 145c8e58e52e..694e69476b02 100644
--- a/sw/source/ui/dbui/mmoutputpage.hrc
+++ b/sw/source/ui/dbui/mmoutputpage.hrc
@@ -78,10 +78,6 @@
#define MM_DOCTYPE_HTML 4
#define MM_DOCTYPE_TEXT 5
-
-#define IM_WARNING 1
-#define FI_WARNING 2
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */