Kaydet (Commit) 5ccd10fb authored tarafından Caolán McNamara's avatar Caolán McNamara

use an expander instead of hand-crafted code

Change-Id: Id5606051656f21309c9e5c8d08a2eacd65b22dbf
üst 2e0561c9
...@@ -72,17 +72,16 @@ ...@@ -72,17 +72,16 @@
#define ST_MATCHESTO (RC_DBUI_BEGIN + 42) #define ST_MATCHESTO (RC_DBUI_BEGIN + 42)
#define ST_PREVIEW (RC_DBUI_BEGIN + 43) #define ST_PREVIEW (RC_DBUI_BEGIN + 43)
#define ST_CONTINUE (RC_DBUI_BEGIN + 44) #define ST_CONTINUE (RC_DBUI_BEGIN + 44)
#define ST_LESS (RC_DBUI_BEGIN + 45) #define ST_TASK (RC_DBUI_BEGIN + 45)
#define ST_TASK (RC_DBUI_BEGIN + 46) #define ST_STATUS (RC_DBUI_BEGIN + 46)
#define ST_STATUS (RC_DBUI_BEGIN + 47) #define ST_SEND (RC_DBUI_BEGIN + 47)
#define ST_SEND (RC_DBUI_BEGIN + 48) #define ST_SENDINGTO (RC_DBUI_BEGIN + 48)
#define ST_SENDINGTO (RC_DBUI_BEGIN + 49) #define ST_COMPLETED (RC_DBUI_BEGIN + 49)
#define ST_COMPLETED (RC_DBUI_BEGIN + 50) #define ST_FAILED (RC_DBUI_BEGIN + 50)
#define ST_FAILED (RC_DBUI_BEGIN + 51) #define ST_TERMINATEQUERY (RC_DBUI_BEGIN + 51)
#define ST_TERMINATEQUERY (RC_DBUI_BEGIN + 52)
// ImageList // ImageList
#define ILIST (RC_DBUI_BEGIN + 53) #define ILIST (RC_DBUI_BEGIN + 52)
// Elements ----------------------------------------------------------------- // Elements -----------------------------------------------------------------
#define MM_PART_TITLE 0 #define MM_PART_TITLE 0
......
...@@ -147,7 +147,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog ...@@ -147,7 +147,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
ProgressBar *m_pProgressBar; ProgressBar *m_pProgressBar;
FixedText *m_pErrorStatus; FixedText *m_pErrorStatus;
PushButton *m_pDetails;
SvSimpleTableContainer *m_pContainer; SvSimpleTableContainer *m_pContainer;
HeaderBar *m_pStatusHB; HeaderBar *m_pStatusHB;
SvTabListBox *m_pStatusLB; SvTabListBox *m_pStatusLB;
...@@ -156,8 +155,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog ...@@ -156,8 +155,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
PushButton *m_pStop; PushButton *m_pStop;
PushButton *m_pClose; PushButton *m_pClose;
OUString m_sMore;
OUString m_sLess;
OUString m_sContinue; OUString m_sContinue;
OUString m_sStop; OUString m_sStop;
OUString m_sSend; OUString m_sSend;
...@@ -179,7 +176,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog ...@@ -179,7 +176,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
sal_Int32 m_nSendCount; sal_Int32 m_nSendCount;
sal_Int32 m_nErrorCount; sal_Int32 m_nErrorCount;
SAL_DLLPRIVATE DECL_LINK( DetailsHdl_Impl, void* );
SAL_DLLPRIVATE DECL_LINK( StopHdl_Impl, PushButton* ); SAL_DLLPRIVATE DECL_LINK( StopHdl_Impl, PushButton* );
SAL_DLLPRIVATE DECL_LINK( CloseHdl_Impl, void* ); SAL_DLLPRIVATE DECL_LINK( CloseHdl_Impl, void* );
SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* ); SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* );
......
...@@ -232,12 +232,9 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf ...@@ -232,12 +232,9 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
m_pPaused(get<FixedText>("paused")), m_pPaused(get<FixedText>("paused")),
m_pProgressBar(get<ProgressBar>("progress")), m_pProgressBar(get<ProgressBar>("progress")),
m_pErrorStatus(get<FixedText>("errorstatus")), m_pErrorStatus(get<FixedText>("errorstatus")),
m_pDetails(get<PushButton>("details")),
m_pContainer(get<SvSimpleTableContainer>("container")), m_pContainer(get<SvSimpleTableContainer>("container")),
m_pStop(get<PushButton>("stop")), m_pStop(get<PushButton>("stop")),
m_pClose(get<PushButton>("close")), m_pClose(get<PushButton>("close")),
m_sMore(m_pDetails->GetText()),
m_sLess(SW_RES(ST_LESS)),
m_sContinue(SW_RES( ST_CONTINUE )), m_sContinue(SW_RES( ST_CONTINUE )),
m_sStop(m_pStop->GetText()), m_sStop(m_pStop->GetText()),
m_sSend(SW_RES(ST_SEND)), m_sSend(SW_RES(ST_SEND)),
...@@ -265,7 +262,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf ...@@ -265,7 +262,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
OUString sTask(SW_RES(ST_TASK)); OUString sTask(SW_RES(ST_TASK));
OUString sStatus(SW_RES(ST_STATUS)); OUString sStatus(SW_RES(ST_STATUS));
m_pDetails->SetClickHdl(LINK( this, SwSendMailDialog, DetailsHdl_Impl));
m_pStop->SetClickHdl(LINK( this, SwSendMailDialog, StopHdl_Impl)); m_pStop->SetClickHdl(LINK( this, SwSendMailDialog, StopHdl_Impl));
m_pClose->SetClickHdl(LINK( this, SwSendMailDialog, CloseHdl_Impl)); m_pClose->SetClickHdl(LINK( this, SwSendMailDialog, CloseHdl_Impl));
...@@ -284,7 +280,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf ...@@ -284,7 +280,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
m_pStatus->SetTabs(&nTabs[0], MAP_PIXEL); m_pStatus->SetTabs(&nTabs[0], MAP_PIXEL);
m_pStatus->SetSpaceBetweenEntries(3); m_pStatus->SetSpaceBetweenEntries(3);
DetailsHdl_Impl( m_pDetails );
UpdateTransferStatus(); UpdateTransferStatus();
} }
...@@ -335,26 +330,6 @@ void SwSendMailDialog::SetDocumentCount( sal_Int32 nAllDocuments ) ...@@ -335,26 +330,6 @@ void SwSendMailDialog::SetDocumentCount( sal_Int32 nAllDocuments )
UpdateTransferStatus(); 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 ) IMPL_LINK( SwSendMailDialog, StopHdl_Impl, PushButton*, pButton )
{ {
m_bCancel = true; m_bCancel = true;
......
...@@ -75,11 +75,6 @@ String ST_SEND ...@@ -75,11 +75,6 @@ String ST_SEND
Text[ en-US ] = "Sending e-mails..."; Text[ en-US ] = "Sending e-mails...";
}; };
String ST_LESS
{
Text[ en-US ] = "<< Less";
};
String ST_CONTINUE String ST_CONTINUE
{ {
Text[ en-US ] = "~Continue"; Text[ en-US ] = "~Continue";
......
...@@ -207,26 +207,28 @@ ...@@ -207,26 +207,28 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButtonBox" id="buttonbox1"> <object class="GtkExpander" id="details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">True</property>
<property name="halign">end</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="layout_style">start</property>
<child> <child>
<object class="GtkButton" id="details"> <object class="svtlo-SvSimpleTableContainer" id="container">
<property name="label" translatable="yes">More &gt;&gt;</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">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> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
...@@ -235,22 +237,6 @@ ...@@ -235,22 +237,6 @@
<property name="position">3</property> <property name="position">3</property>
</packing> </packing>
</child> </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> </object>
</child> </child>
</object> </object>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment