mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -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);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ class ShareDialog : public QDialog
|
||||
|
||||
public:
|
||||
/** Default constructor */
|
||||
ShareDialog( std::string filename, QWidget *parent = 0, Qt::WFlags flags = 0);
|
||||
ShareDialog( std::string filename, QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
void browseDirectory();
|
||||
|
@ -35,9 +35,6 @@
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<zorder>groupBox</zorder>
|
||||
<zorder>frame_2</zorder>
|
||||
<zorder>groupBox</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -138,56 +135,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>191</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user