mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 18:45:17 -04:00
Cosmetic changes in ShareDialog
- Removed context help button. - Changed the standard dialog buttons from single buttons to buttonbox. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5792 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3a72a3032a
commit
14e3b4179a
3 changed files with 12 additions and 59 deletions
|
@ -36,8 +36,8 @@
|
|||
#include <gui/common/GroupFlagsWidget.h>
|
||||
|
||||
/** Default constructor */
|
||||
ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags)
|
||||
: QDialog(parent, flags)
|
||||
ShareDialog::ShareDialog(std::string filename, QWidget *parent)
|
||||
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
|
||||
{
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
@ -46,10 +46,10 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags
|
|||
ui.headerFrame->setHeaderText(tr("Share Folder"));
|
||||
|
||||
connect(ui.browseButton, SIGNAL(clicked( bool ) ), this , SLOT( browseDirectory() ) );
|
||||
connect(ui.okButton, SIGNAL(clicked( bool ) ), this , SLOT( addDirectory() ) );
|
||||
connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(ui.buttonBox, SIGNAL(accepted()), this , SLOT( addDirectory() ) );
|
||||
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||
|
||||
ui.okButton->setEnabled(false);
|
||||
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
|
||||
QVBoxLayout *vbox = new QVBoxLayout() ;
|
||||
|
||||
|
@ -89,7 +89,7 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags
|
|||
if (it->filename == filename)
|
||||
{
|
||||
/* fill dialog */
|
||||
ui.okButton->setEnabled(true);
|
||||
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
|
||||
|
||||
ui.localpath_lineEdit->setText(QString::fromUtf8(it->filename.c_str()));
|
||||
ui.localpath_lineEdit->setDisabled(true);
|
||||
|
@ -117,10 +117,10 @@ void ShareDialog::browseDirectory()
|
|||
|
||||
/* add it to the server */
|
||||
if (qdir.isEmpty()) {
|
||||
ui.okButton->setEnabled(false);
|
||||
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
ui.okButton->setEnabled(true);
|
||||
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
|
||||
ui.localpath_lineEdit->setText(qdir);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue