mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 07:20:28 -04:00
design improvements for AddLinksDialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2172 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1e96a13c5d
commit
4e6290d985
3 changed files with 304 additions and 205 deletions
|
@ -43,6 +43,8 @@ AddLinksDialog::AddLinksDialog(QString url, QWidget *parent)
|
|||
/* add button */
|
||||
connect(ui.addLinkButton, SIGNAL(clicked()), this, SLOT(addLinkComment()));
|
||||
connect(ui.closepushButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
|
||||
connect( ui.anonBox, SIGNAL( stateChanged ( int ) ), this, SLOT( load ( void ) ) );
|
||||
|
||||
ui.linkLineEdit->setReadOnly(true);
|
||||
ui.linkLineEdit->setText(url);
|
||||
|
@ -50,6 +52,7 @@ AddLinksDialog::AddLinksDialog(QString url, QWidget *parent)
|
|||
RetroShareLinkAnalyzer analyzer(url);
|
||||
QVector<RetroShareLinkData> linkList;
|
||||
analyzer.getFileInformation(linkList);
|
||||
|
||||
if (!linkList.isEmpty())
|
||||
{ /* set title as first name from list */
|
||||
RetroShareLinkData item = linkList.first();
|
||||
|
@ -60,6 +63,8 @@ AddLinksDialog::AddLinksDialog(QString url, QWidget *parent)
|
|||
ui.titleLineEdit->setText("New File");
|
||||
}
|
||||
|
||||
load();
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
|
@ -106,3 +111,23 @@ void AddLinksDialog::addLinkComment()
|
|||
|
||||
close();
|
||||
}
|
||||
|
||||
void AddLinksDialog::load()
|
||||
{
|
||||
if (ui.anonBox->isChecked())
|
||||
{
|
||||
|
||||
/* disable comment + score */
|
||||
ui.scoreBox->setEnabled(false);
|
||||
ui.linkTextEdit->setEnabled(false);
|
||||
|
||||
/* done! */
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* enable comment + score */
|
||||
ui.scoreBox->setEnabled(true);
|
||||
ui.linkTextEdit->setEnabled(true);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue