Fixed up minor bug in Links Cloud:

conflict between anonymous link box, and context menus fixed.
Moved Links Cloud from Unfinished, to Main Window.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@563 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-05-24 20:23:15 +00:00
parent 39f4fa3d6c
commit 87b7bfadb5
3 changed files with 10 additions and 6 deletions

View File

@ -95,9 +95,9 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
/* Create the config pages and actions */
QActionGroup *grp = new QActionGroup(this);
LinksDialog *linksDialog = NULL;
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_TRANSFERS), tr("Links Cloud"), grp));
// LinksDialog *linksDialog = NULL;
// ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_TRANSFERS), tr("Links Cloud"), grp));
ChannelsDialog *channelsDialog = NULL;
ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),

View File

@ -576,7 +576,7 @@ void LinksDialog::updateComments(std::string rid, std::string pid)
ui.linkLineEdit->setText("");
ui.linkTextEdit->setText("");
ui.scoreBox->setCurrentIndex(ScoreToIndex(0));
mLinkId = "";
mLinkId = rid; /* must be set for Context Menu */
/* disable comment + score */
ui.scoreBox->setEnabled(false);
@ -652,7 +652,7 @@ void LinksDialog::addLinkComment( void )
QString comment = ui.linkTextEdit->toPlainText();
int32_t score = IndexToScore(ui.scoreBox->currentIndex());
if (mLinkId == "")
if ((mLinkId == "") || (ui.anonBox->isChecked()))
{
if ((link == "") || (title == ""))
{
@ -667,7 +667,7 @@ void LinksDialog::addLinkComment( void )
/* add it either way */
if (ui.anonBox->isChecked())
{
rsRanks->anonRankMsg(mLinkId, link.toStdWString(), title.toStdWString());
rsRanks->anonRankMsg("", link.toStdWString(), title.toStdWString());
}
else
{

View File

@ -58,6 +58,7 @@
#define IMAGE_PEERS ":/images/peers_24x24.png"
#define IMAGE_SEARCH ":/images/filefind.png"
#define IMAGE_TRANSFERS ":/images/ktorrent32.png"
#define IMAGE_LINKS ":/images/ktorrent.png"
#define IMAGE_FILES ":/images/folder_green.png"
#define IMAGE_CHANNELS ":/images/channels.png"
#define IMAGE_PREFERENCES ":/images/settings16.png"
@ -169,6 +170,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(messagesDialog = new MessagesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));
LinksDialog *linksDialog = NULL;
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_LINKS), tr("Links Cloud"), grp));
#ifdef RS_RELEASE_VERSION