diff options
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/inc/dbui.hrc | 1 | ||||
-rw-r--r-- | sw/inc/helpid.h | 1 | ||||
-rw-r--r-- | sw/source/ui/dbui/mailmergechildwindow.cxx | 37 | ||||
-rw-r--r-- | sw/source/ui/dbui/mailmergechildwindow.hrc | 6 | ||||
-rw-r--r-- | sw/source/ui/dbui/mailmergechildwindow.src | 48 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.hrc | 4 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/warnemaildialog.ui | 57 |
8 files changed, 70 insertions, 85 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index c588dd05cc0c..c346962d214f 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -206,6 +206,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/tokenwidget \ sw/uiconfig/swriter/ui/viewoptionspage \ sw/uiconfig/swriter/ui/warndatasourcedialog \ + sw/uiconfig/swriter/ui/warnemaildialog \ sw/uiconfig/swriter/ui/wordcount \ sw/uiconfig/swriter/ui/wrapdialog \ sw/uiconfig/swriter/ui/wrappage \ diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc index 057375e23a3a..0e6a2208f202 100644 --- a/sw/inc/dbui.hrc +++ b/sw/inc/dbui.hrc @@ -46,7 +46,6 @@ #define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24) #define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25) #define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26) -#define DLG_MM_SENDWARNING (RC_DBUI_BEGIN + 29) #define DLG_MM_CREATIONMONITOR (RC_DBUI_BEGIN + 30) // Strings ------------------------------------------------------------------ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 1651804a1c90..7284fdb73260 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -383,7 +383,6 @@ #define HID_MAILMERGECHILD "SW_HID_MAILMERGECHILD" #define HID_MM_MAILSTATUS_TLB "SW_HID_MM_MAILSTATUS_TLB" #define HID_RETURN_TO_MAILMERGE "SW_HID_RETURN_TO_MAILMERGE" -#define HID_MM_SENDWARNING "SW_HID_MM_SENDWARNING" #define HID_NID_TBL "SW_HID_NID_TBL" #define HID_NID_FRM "SW_HID_NID_FRM" 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: */ diff --git a/sw/uiconfig/swriter/ui/warnemaildialog.ui b/sw/uiconfig/swriter/ui/warnemaildialog.ui new file mode 100644 index 000000000000..ba2e0fd2961c --- /dev/null +++ b/sw/uiconfig/swriter/ui/warnemaildialog.ui @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.6 --> + <object class="GtkMessageDialog" id="WarnEmailDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">E-Mails could not be sent</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">warning</property> + <property name="buttons">ok</property> + <property name="text" translatable="yes">E-Mails could not be sent</property> + <property name="secondary_text" translatable="yes">The following error occurred</property> + <child internal-child="vbox"> + <object class="GtkBox" id="messagedialog-vbox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="messagedialog-action_area"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkTextView" id="errors:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="cursor_visible">False</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> +</interface> |