summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-23 10:05:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-23 10:05:49 +0100
commit5ccd10fbbd66558a6662d74bc7ba76a4697f593a (patch)
tree53752a255c732d0a8cdc7f72073f71b03b6efda1
parentdrop helpids that go nowhere (diff)
downloadcore-5ccd10fbbd66558a6662d74bc7ba76a4697f593a.tar.gz
core-5ccd10fbbd66558a6662d74bc7ba76a4697f593a.zip
use an expander instead of hand-crafted code
Change-Id: Id5606051656f21309c9e5c8d08a2eacd65b22dbf
-rw-r--r--sw/inc/dbui.hrc17
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx4
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx25
-rw-r--r--sw/source/uibase/dbui/mailmergechildwindow.src5
-rw-r--r--sw/uiconfig/swriter/ui/mmsendmails.ui48
5 files changed, 25 insertions, 74 deletions
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 4e42d95e94e3..b4ec5bf9fa77 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 fef10e9eda5c..8585c02e2507 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 29aecd3e4ea9..75b401e759b7 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 6facac806474..c2572e18e778 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 4debcfa3b52c..69e62b346f41 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 &gt;&gt;</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>