Kaydet (Commit) 2960438d authored tarafından Szymon Kłos's avatar Szymon Kłos

question if delete the service

Change-Id: I49e5a93ba1d58b898ec1c7b9a4682c9e86302bd0
üst 6246755d
......@@ -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;
}
}
}
......
......@@ -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" ;
......
......@@ -27,6 +27,7 @@
#define STR_SVT_FOLDERPICKER_DEFAULT_TITLE (STR_SVT_FILEPICKER_START+12)
#define STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION (STR_SVT_FILEPICKER_START+13)
#define STR_SVT_ALREADYEXISTOVERWRITE (STR_SVT_FILEPICKER_START+14)
#define STR_SVT_DELETESERVICE (STR_SVT_FILEPICKER_START+15)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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