diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2015-07-17 08:46:31 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2015-07-24 12:28:40 +0200 |
commit | 2960438dc7ad0d73ec4e285a659bedd36b811887 (patch) | |
tree | 3392587a34cc02217594b28a12fac9cb2ae97ea1 /fpicker | |
parent | -Werror,-Wunused-private-field (diff) | |
download | core-2960438dc7ad0d73ec4e285a659bedd36b811887.tar.gz core-2960438dc7ad0d73ec4e285a659bedd36b811887.zip |
question if delete the service
Change-Id: I49e5a93ba1d58b898ec1c7b9a4682c9e86302bd0
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 29 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.src | 5 |
2 files changed, 22 insertions, 12 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index 2fabadc2a699..86be5225fdbb 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -581,21 +581,26 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, if( nPos >= 0 ) { - // TODO: Confirm dialog - - m_aServices.erase( m_aServices.begin() + nPos ); - m_pServices_lb->RemoveEntry( nSelected ); + OUString sMsg = ResId( STR_SVT_DELETESERVICE, *ResMgrHolder::getOrCreate() ); + sMsg = sMsg.replaceFirst( "$servicename$", m_pServices_lb->GetSelectEntry() ); + ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO ); - if( m_pServices_lb->GetEntryCount() > 0 ) + if( aBox->Execute() == RET_YES ) { - m_pServices_lb->SelectEntryPos( 0 ); - } - else - { - m_pServices_lb->SetNoSelection(); - } + m_aServices.erase( m_aServices.begin() + nPos ); + m_pServices_lb->RemoveEntry( nSelected ); - m_bIsUpdated = true; + if( m_pServices_lb->GetEntryCount() > 0 ) + { + m_pServices_lb->SelectEntryPos( 0 ); + } + else + { + m_pServices_lb->SetNoSelection(); + } + + m_bIsUpdated = true; + } } } diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src index e09fe0b14165..bc43b98555d8 100644 --- a/fpicker/source/office/iodlg.src +++ b/fpicker/source/office/iodlg.src @@ -105,6 +105,11 @@ String STR_SVT_ALREADYEXISTOVERWRITE Text [ en-US ] = "A file named \"$filename$\" already exists.\n\nDo you want to replace it?" ; }; +String STR_SVT_DELETESERVICE +{ + Text [ en-US ] = "Are you sure you want to delete the service?\n\"$servicename$\"" ; +}; + String STR_SVT_NEW_FOLDER { Text [ en-US ] = "Folder" ; |