diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2014-08-20 12:29:37 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-08-20 08:05:13 -0500 |
commit | 96d7f6171a0b887aa89e32cee279d97c876b1605 (patch) | |
tree | e8bc13d3bc260fc013eb0f65976037a1f677238c /uui/source/nameclashdlg.cxx | |
parent | a6c5f2ba6bca8ad95a3731e2770a1d216c9925a0 (diff) |
DLG_FILTER_SELECT and DLG_SIMPLE_NAME_CLASH conversion to .ui
Change-Id: I2a87330d73e2735a764296185f165a29f05b517c
Reviewed-on: https://gerrit.libreoffice.org/11040
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'uui/source/nameclashdlg.cxx')
-rw-r--r-- | uui/source/nameclashdlg.cxx | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 65244d7f5dd6..bfa3994aa926 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -21,7 +21,6 @@ #include <osl/file.hxx> #include "ids.hrc" -#include "nameclashdlg.hrc" #include "nameclashdlg.hxx" // NameClashDialog --------------------------------------------------------- @@ -29,10 +28,10 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) { long nRet = (long) ABORT; - if ( &maBtnRename == pBtn ) + if ( m_pBtnRename == pBtn ) { nRet = (long) RENAME; - OUString aNewName = maEDNewName.GetText(); + OUString aNewName = m_pEDNewName->GetText(); if ( ( aNewName == maNewName ) || aNewName.isEmpty() ) { MessageDialog aError(NULL, maSameName); @@ -41,7 +40,7 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) } maNewName = aNewName; } - else if ( &maBtnOverwrite == pBtn ) + else if ( m_pBtnOverwrite == pBtn ) nRet = (long) OVERWRITE; EndDialog( nRet ); @@ -55,21 +54,19 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr, OUString const & rClashingName, OUString const & rProposedNewName, bool bAllowOverwrite ) - : ModalDialog( pParent, ResId( DLG_SIMPLE_NAME_CLASH, *pResMgr ) ), - maFTMessage ( this, ResId( FT_FILE_EXISTS_WARNING, *pResMgr ) ), - maEDNewName ( this, ResId( EDIT_NEW_NAME, *pResMgr ) ), - maBtnOverwrite ( this, ResId( BTN_OVERWRITE, *pResMgr ) ), - maBtnRename ( this, ResId( BTN_RENAME, *pResMgr ) ), - maBtnCancel ( this, ResId( BTN_CANCEL, *pResMgr ) ), - maBtnHelp ( this, ResId( BTN_HELP, *pResMgr ) ), + : ModalDialog( pParent, "SimpleNameClashDialog", "uui/ui/simplenameclash.ui" ), maNewName ( rClashingName ) { - FreeResource(); + get(m_pFTMessage, "warning"); + get(m_pEDNewName, "newname"); + get(m_pBtnOverwrite, "replace"); + get(m_pBtnRename, "rename"); + get(m_pBtnCancel, "cancel"); Link aLink( LINK( this, NameClashDialog, ButtonHdl_Impl ) ); - maBtnOverwrite.SetClickHdl( aLink ); - maBtnRename.SetClickHdl( aLink ); - maBtnCancel.SetClickHdl( aLink ); + m_pBtnOverwrite->SetClickHdl( aLink ); + m_pBtnRename->SetClickHdl( aLink ); + m_pBtnCancel->SetClickHdl( aLink ); OUString aInfo; if ( bAllowOverwrite ) @@ -79,7 +76,7 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr, else { aInfo = ResId(STR_NAME_CLASH_RENAME_ONLY, *pResMgr).toString(); - maBtnOverwrite.Hide(); + m_pBtnOverwrite->Hide(); } OUString aPath; @@ -90,11 +87,11 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr, aInfo = aInfo.replaceFirst( "%NAME", rClashingName ); aInfo = aInfo.replaceFirst( "%FOLDER", aPath ); - maFTMessage.SetText( aInfo ); + m_pFTMessage->SetText( aInfo ); if ( !rProposedNewName.isEmpty() ) - maEDNewName.SetText( rProposedNewName ); + m_pEDNewName->SetText( rProposedNewName ); else - maEDNewName.SetText( rClashingName ); + m_pEDNewName->SetText( rClashingName ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |