sw/UIConfig_swriter.mk | 1 sw/inc/dbui.hrc | 1 sw/inc/helpid.h | 1 sw/source/ui/dbui/mailmergechildwindow.cxx | 37 ++++++------------ sw/source/ui/dbui/mailmergechildwindow.hrc | 6 --- sw/source/ui/dbui/mailmergechildwindow.src | 48 ------------------------ sw/source/ui/dbui/mmoutputpage.hrc | 4 -- sw/uiconfig/swriter/ui/warnemaildialog.ui | 57 +++++++++++++++++++++++++++++ vcl/source/window/layout.cxx | 1 9 files changed, 71 insertions(+), 85 deletions(-)
New commits: commit a5598cf00a49469b14492b9c9c6a82d8f8e04c42 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 14 16:29:46 2013 +0100 convert warn email's can't be sent dialog to .ui Change-Id: I611c5cb7ab140a04e7ee4a78b6d828ca199c5624 diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index c588dd0..c346962 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 057375e..0e6a220 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 1651804..7284fdb 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 2b9e2eb..0216245 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 da72667..1ba778b 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 f5ab311..9e09618 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 145c8e5..694e694 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 0000000..ba2e0fd --- /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> commit 86212cec81fe81ec79c17dff49734d63deed7247 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 14 16:30:02 2013 +0100 ensure message box is first child of message dialog Change-Id: Iafb0b074ee9705d96d6deac9ade5baeb94586d74 diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index dff2546..34bf83a 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2019,6 +2019,7 @@ short MessageDialog::Execute() assert(pContainer); m_pGrid = new VclGrid(pContainer); + m_pGrid->reorderWithinParent(0); m_pGrid->set_column_spacing(12); m_pImage = new FixedImage(m_pGrid, WB_CENTER | WB_VCENTER | WB_3DLOOK);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits