[Libreoffice-commits] core.git: sw/inc sw/source sw/uiconfig

Caolán McNamara caolanm at redhat.com
Wed Jul 23 02:06:40 PDT 2014


 sw/inc/dbui.hrc                                |   17 ++++----
 sw/source/ui/dbui/mmoutputpage.hxx             |    4 --
 sw/source/ui/dbui/mmoutputtypepage.cxx         |   25 -------------
 sw/source/uibase/dbui/mailmergechildwindow.src |    5 --
 sw/uiconfig/swriter/ui/mmsendmails.ui          |   48 ++++++++-----------------
 5 files changed, 25 insertions(+), 74 deletions(-)

New commits:
commit 5ccd10fbbd66558a6662d74bc7ba76a4697f593a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 23 10:05:49 2014 +0100

    use an expander instead of hand-crafted code
    
    Change-Id: Id5606051656f21309c9e5c8d08a2eacd65b22dbf

diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 4e42d95..b4ec5bf 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -72,17 +72,16 @@
 #define ST_MATCHESTO            (RC_DBUI_BEGIN + 42)
 #define ST_PREVIEW              (RC_DBUI_BEGIN + 43)
 #define ST_CONTINUE             (RC_DBUI_BEGIN + 44)
-#define ST_LESS                 (RC_DBUI_BEGIN + 45)
-#define ST_TASK                 (RC_DBUI_BEGIN + 46)
-#define ST_STATUS               (RC_DBUI_BEGIN + 47)
-#define ST_SEND                 (RC_DBUI_BEGIN + 48)
-#define ST_SENDINGTO            (RC_DBUI_BEGIN + 49)
-#define ST_COMPLETED            (RC_DBUI_BEGIN + 50)
-#define ST_FAILED               (RC_DBUI_BEGIN + 51)
-#define ST_TERMINATEQUERY       (RC_DBUI_BEGIN + 52)
+#define ST_TASK                 (RC_DBUI_BEGIN + 45)
+#define ST_STATUS               (RC_DBUI_BEGIN + 46)
+#define ST_SEND                 (RC_DBUI_BEGIN + 47)
+#define ST_SENDINGTO            (RC_DBUI_BEGIN + 48)
+#define ST_COMPLETED            (RC_DBUI_BEGIN + 49)
+#define ST_FAILED               (RC_DBUI_BEGIN + 50)
+#define ST_TERMINATEQUERY       (RC_DBUI_BEGIN + 51)
 
 // ImageList
-#define ILIST                   (RC_DBUI_BEGIN + 53)
+#define ILIST                   (RC_DBUI_BEGIN + 52)
 
 // Elements -----------------------------------------------------------------
 #define MM_PART_TITLE                   0
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index fef10e9..8585c02 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -147,7 +147,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
     ProgressBar             *m_pProgressBar;
     FixedText               *m_pErrorStatus;
 
-    PushButton              *m_pDetails;
     SvSimpleTableContainer  *m_pContainer;
     HeaderBar               *m_pStatusHB;
     SvTabListBox            *m_pStatusLB;
@@ -156,8 +155,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
     PushButton              *m_pStop;
     PushButton              *m_pClose;
 
-    OUString                m_sMore;
-    OUString                m_sLess;
     OUString                m_sContinue;
     OUString                m_sStop;
     OUString                m_sSend;
@@ -179,7 +176,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
     sal_Int32               m_nSendCount;
     sal_Int32               m_nErrorCount;
 
-    SAL_DLLPRIVATE DECL_LINK( DetailsHdl_Impl, void* );
     SAL_DLLPRIVATE DECL_LINK( StopHdl_Impl, PushButton* );
     SAL_DLLPRIVATE DECL_LINK( CloseHdl_Impl, void* );
     SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* );
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 29aecd3..75b401e 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -232,12 +232,9 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
     m_pPaused(get<FixedText>("paused")),
     m_pProgressBar(get<ProgressBar>("progress")),
     m_pErrorStatus(get<FixedText>("errorstatus")),
-    m_pDetails(get<PushButton>("details")),
     m_pContainer(get<SvSimpleTableContainer>("container")),
     m_pStop(get<PushButton>("stop")),
     m_pClose(get<PushButton>("close")),
-    m_sMore(m_pDetails->GetText()),
-    m_sLess(SW_RES(ST_LESS)),
     m_sContinue(SW_RES( ST_CONTINUE )),
     m_sStop(m_pStop->GetText()),
     m_sSend(SW_RES(ST_SEND)),
@@ -265,7 +262,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
     OUString sTask(SW_RES(ST_TASK));
     OUString sStatus(SW_RES(ST_STATUS));
 
-    m_pDetails->SetClickHdl(LINK( this, SwSendMailDialog, DetailsHdl_Impl));
     m_pStop->SetClickHdl(LINK( this, SwSendMailDialog, StopHdl_Impl));
     m_pClose->SetClickHdl(LINK( this, SwSendMailDialog, CloseHdl_Impl));
 
@@ -284,7 +280,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
     m_pStatus->SetTabs(&nTabs[0], MAP_PIXEL);
     m_pStatus->SetSpaceBetweenEntries(3);
 
-    DetailsHdl_Impl( m_pDetails );
     UpdateTransferStatus();
 }
 
@@ -335,26 +330,6 @@ void SwSendMailDialog::SetDocumentCount( sal_Int32 nAllDocuments )
     UpdateTransferStatus();
 }
 
-IMPL_LINK_NOARG(SwSendMailDialog, DetailsHdl_Impl)
-{
-    long nMove = 0;
-    if(m_pContainer->IsVisible())
-    {
-        m_pContainer->Hide();
-        nMove = - m_nStatusHeight;
-        m_pDetails->SetText(m_sMore);
-    }
-    else
-    {
-        m_pContainer->Show();
-        nMove = m_nStatusHeight;
-        m_pDetails->SetText(m_sLess);
-    }
-    Size aDlgSize = GetSizePixel(); aDlgSize.Height() += nMove; SetSizePixel(aDlgSize);
-
-    return 0;
-}
-
 IMPL_LINK( SwSendMailDialog, StopHdl_Impl, PushButton*, pButton )
 {
     m_bCancel = true;
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.src b/sw/source/uibase/dbui/mailmergechildwindow.src
index 6facac8..c2572e1 100644
--- a/sw/source/uibase/dbui/mailmergechildwindow.src
+++ b/sw/source/uibase/dbui/mailmergechildwindow.src
@@ -75,11 +75,6 @@ String ST_SEND
     Text[ en-US ] = "Sending e-mails...";
 };
 
-String  ST_LESS
-{
-    Text[ en-US ] = "<< Less";
-};
-
 String     ST_CONTINUE
 {
     Text[ en-US ] = "~Continue";
diff --git a/sw/uiconfig/swriter/ui/mmsendmails.ui b/sw/uiconfig/swriter/ui/mmsendmails.ui
index 4debcfa..69e62b3 100644
--- a/sw/uiconfig/swriter/ui/mmsendmails.ui
+++ b/sw/uiconfig/swriter/ui/mmsendmails.ui
@@ -207,26 +207,28 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkButtonBox" id="buttonbox1">
+                          <object class="GtkExpander" id="details">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">end</property>
-                            <property name="hexpand">True</property>
-                            <property name="orientation">vertical</property>
-                            <property name="layout_style">start</property>
+                            <property name="can_focus">True</property>
                             <child>
-                              <object class="GtkButton" id="details">
-                                <property name="label" translatable="yes">More >></property>
-                                <property name="use_action_appearance">False</property>
+                              <object class="svtlo-SvSimpleTableContainer" id="container">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
+                                <property name="margin_top">6</property>
+                                <property name="hexpand">True</property>
+                                <property name="vexpand">True</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection" id="Simple Table Container-selection"/>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Details</property>
+                                <property name="use_underline">True</property>
                               </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
                             </child>
                           </object>
                           <packing>
@@ -235,22 +237,6 @@
                             <property name="position">3</property>
                           </packing>
                         </child>
-                        <child>
-                          <object class="svtlo-SvSimpleTableContainer" id="container">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                            <child internal-child="selection">
-                              <object class="GtkTreeSelection" id="Simple Table Container-selection1"/>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
                       </object>
                     </child>
                   </object>


More information about the Libreoffice-commits mailing list