mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
* Added QMessagesBox feature for the ShareManager's Add/Remove
* Fixed DirectoriesDialogs's Add Folder method. * Set ToolTips for The DirectoriesDialogs's Buttons git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@916 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5a3403a3a0
commit
b57cdeb4fc
4 changed files with 41 additions and 13 deletions
|
@ -114,6 +114,7 @@ void ShareManager::addShareDirectory()
|
|||
{
|
||||
rsFiles->addSharedDirectory(dir);
|
||||
load();
|
||||
messageBoxOk("Shared Directory Added!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,13 +124,30 @@ void ShareManager::removeShareDirectory()
|
|||
/* ask for removal */
|
||||
QListWidget *listWidget = ui.shareddirList;
|
||||
QListWidgetItem *qdir = listWidget -> currentItem();
|
||||
|
||||
QString queryWrn;
|
||||
queryWrn.clear();
|
||||
queryWrn.append("Do You Want to Delete ? ");
|
||||
if (qdir)
|
||||
{
|
||||
rsFiles->removeSharedDirectory( qdir->text().toStdString());
|
||||
load();
|
||||
if ((QMessageBox::question(this, tr("Warning!"),queryWrn,QMessageBox::Ok|QMessageBox::No, QMessageBox::Ok))== QMessageBox::Ok)
|
||||
{
|
||||
rsFiles->removeSharedDirectory( qdir->text().toStdString());
|
||||
load();
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool ShareManager::messageBoxOk(QString msg)
|
||||
{
|
||||
QMessageBox mb("Share Manager InfoBox!",msg,QMessageBox::Information,QMessageBox::Ok,0,0);
|
||||
mb.setButtonText( QMessageBox::Ok, "OK" );
|
||||
mb.exec();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue