diff --git a/retroshare-gui/src/gui/MessengerWindow.cpp b/retroshare-gui/src/gui/MessengerWindow.cpp index 1119d849c..b5ad24eab 100644 --- a/retroshare-gui/src/gui/MessengerWindow.cpp +++ b/retroshare-gui/src/gui/MessengerWindow.cpp @@ -108,20 +108,22 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WindowFlags flags) } expandedGroups.clear(); - ui.messagelineEdit->setMinimumWidth(20); + ui.messagelineEdit->setMinimumWidth(24); /* Initialize friend list */ QToolButton *button = new QToolButton(this); - button->setIcon(QIcon(":/images/user/add_user24.png")); + button->setIcon(QIcon(":/icons/png/invite.png")); button->setToolTip(tr("Add a Friend")); connect(button, SIGNAL(clicked()), this, SLOT(addFriend())); ui.friendList->addToolButton(button); + button->setIconSize(QSize(27, 27)); button = new QToolButton(this); - button->setIcon(QIcon(":/images/friendsfolder24.png")); + button->setIcon(QIcon(":/icons/png/filesharing.png")); button->setToolTip(tr("Share files for your friends")); connect(button, SIGNAL(clicked()), this, SLOT(openShareManager())); - ui.friendList->addToolButton(button); + ui.friendList->addToolButton(button); + button->setIconSize(QSize(27, 27)); // load settings RsAutoUpdatePage::lockAllEvents(); @@ -221,6 +223,7 @@ void MessengerWindow::updateOwnStatus(const QString &peer_id, int status) // my status has changed ui.statusButton->setText(m_nickName + " (" + StatusDefs::name(status) + ")"); + ui.statusButton->setIcon(QIcon(StatusDefs::imageIM(status))); return; } diff --git a/retroshare-gui/src/gui/MessengerWindow.ui b/retroshare-gui/src/gui/MessengerWindow.ui index 92d4f3a7c..7e952e86b 100644 --- a/retroshare-gui/src/gui/MessengerWindow.ui +++ b/retroshare-gui/src/gui/MessengerWindow.ui @@ -19,7 +19,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -34,7 +43,16 @@ - + + 6 + + + 6 + + + 6 + + 6 @@ -70,11 +88,17 @@ 0 + + + 27 + 27 + + QToolButton::InstantPopup - Qt::ToolButtonTextOnly + Qt::ToolButtonTextBesideIcon true @@ -118,7 +142,16 @@ - + + 3 + + + 3 + + + 3 + + 3 @@ -142,7 +175,7 @@ 0 0 258 - 20 + 21 diff --git a/retroshare-gui/src/gui/Posted/PostedListWidget.cpp b/retroshare-gui/src/gui/Posted/PostedListWidget.cpp index e51bc51b8..2bd005566 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidget.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidget.cpp @@ -41,23 +41,19 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent ui->setupUi(this); /* Setup UI helper */ - mStateHelper->addWidget(mTokenTypeAllPosts, ui->hotSortButton); - mStateHelper->addWidget(mTokenTypeAllPosts, ui->newSortButton); - mStateHelper->addWidget(mTokenTypeAllPosts, ui->topSortButton); + mStateHelper->addWidget(mTokenTypeAllPosts, ui->comboBox); - mStateHelper->addWidget(mTokenTypePosts, ui->hotSortButton); - mStateHelper->addWidget(mTokenTypePosts, ui->newSortButton); - mStateHelper->addWidget(mTokenTypePosts, ui->topSortButton); + mStateHelper->addWidget(mTokenTypePosts, ui->comboBox); mStateHelper->addWidget(mTokenTypeGroupData, ui->submitPostButton); mStateHelper->addWidget(mTokenTypeGroupData, ui->subscribeToolButton); - connect(ui->hotSortButton, SIGNAL(clicked()), this, SLOT(getRankings())); - connect(ui->newSortButton, SIGNAL(clicked()), this, SLOT(getRankings())); - connect(ui->topSortButton, SIGNAL(clicked()), this, SLOT(getRankings())); connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(showNext())); connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(showPrev())); connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool))); + + connect(ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(getRankings(int))); + // default sort method. mSortMethod = RsPosted::HotRankType; @@ -67,8 +63,6 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent mTokenTypeVote = nextTokenType(); - ui->hotSortButton->setChecked(true); - /* fill in the available OwnIds for signing */ ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId()); @@ -183,7 +177,7 @@ void PostedListWidget::updateShowText() ui->showLabel->setText(showText); } -void PostedListWidget::getRankings() +void PostedListWidget::getRankings(int i) { if (groupId().isNull()) return; @@ -192,23 +186,19 @@ void PostedListWidget::getRankings() std::cerr << std::endl; int oldSortMethod = mSortMethod; - - QObject* button = sender(); - if(button == ui->hotSortButton) + + switch(i) { + default: + case 0: mSortMethod = RsPosted::HotRankType; - } - else if(button == ui->topSortButton) - { - mSortMethod = RsPosted::TopRankType; - } - else if(button == ui->newSortButton) - { + break; + case 1: mSortMethod = RsPosted::NewRankType; - } - else - { - return; + break; + case 2: + mSortMethod = RsPosted::TopRankType; + break; } if (oldSortMethod != mSortMethod) diff --git a/retroshare-gui/src/gui/Posted/PostedListWidget.h b/retroshare-gui/src/gui/Posted/PostedListWidget.h index 426c4f742..9d472c7a5 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidget.h +++ b/retroshare-gui/src/gui/Posted/PostedListWidget.h @@ -71,7 +71,7 @@ private slots: void submitVote(const RsGxsGrpMsgIdPair& msgId, bool up); - void getRankings(); + void getRankings(int); void subscribeGroup(bool subscribe); diff --git a/retroshare-gui/src/gui/Posted/PostedListWidget.ui b/retroshare-gui/src/gui/Posted/PostedListWidget.ui index 934d4dafc..8fd987927 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidget.ui +++ b/retroshare-gui/src/gui/Posted/PostedListWidget.ui @@ -14,7 +14,16 @@ Form - + + 0 + + + 0 + + + 0 + + 0 @@ -53,6 +62,12 @@ 0 + + + 50 + false + + Subscribe @@ -64,12 +79,18 @@ - Submit a new Post + Create Post :/images/posted_24.png:/images/posted_24.png + + + 24 + 24 + + Qt::ToolButtonTextBesideIcon @@ -78,6 +99,62 @@ + + + + + 10 + 75 + true + + + + SORT + + + + + + + font: bold; +font-size: 15px; +color: #0099cc; + + + + 27 + 27 + + + + + Hot + + + + :/icons/png/flame.png:/icons/png/flame.png + + + + + New + + + + :/icons/png/new.png:/icons/png/new.png + + + + + Top + + + + :/icons/png/top.png:/icons/png/top.png + + + + @@ -91,116 +168,6 @@ - - - - Hot - - - - - - - :/images/hot_24.png:/images/hot_24.png - - - - 24 - 24 - - - - true - - - true - - - - - - - New - - - - - - - :/images/new_24.png:/images/new_24.png - - - - 24 - 24 - - - - true - - - true - - - - - - - Top - - - - - - - :/images/vote_up.png:/images/vote_up.png - - - - 24 - 24 - - - - true - - - false - - - true - - - - - - - - Today - - - - - Yesterday - - - - - This Week - - - - - This Month - - - - - This Year - - - - @@ -236,19 +203,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -279,7 +233,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -302,6 +265,7 @@ + diff --git a/retroshare-gui/src/gui/common/FriendList.ui b/retroshare-gui/src/gui/common/FriendList.ui index 49a875088..03c417e05 100644 --- a/retroshare-gui/src/gui/common/FriendList.ui +++ b/retroshare-gui/src/gui/common/FriendList.ui @@ -81,7 +81,7 @@ - Trusted nodes + Friends AlignCenter diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp index 6ca6a4613..62ac84274 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp @@ -24,9 +24,11 @@ #include #include #include +#include #include "CreateGxsChannelMsg.h" #include "gui/feeds/SubFileItem.h" +#include "gui/settings/rsharesettings.h" #include "gui/RetroShareLink.h" #include "util/HandleRichText.h" #include "util/misc.h" @@ -66,7 +68,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId connect(buttonBox, SIGNAL(rejected()), this, SLOT(cancelMsg())); connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); - connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); + connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); + connect(imageButton, SIGNAL(clicked()), this, SLOT(addImage())); connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail())); connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool))); connect(tabWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenu(QPoint))); @@ -821,3 +824,17 @@ void CreateGxsChannelMsg::loadRequest(const TokenQueue *queue, const TokenReques } } } + +void CreateGxsChannelMsg::addImage() +{ + QString file; + if (misc::getOpenFileName(this, RshareSettings::LASTDIR_IMAGES, tr("Choose Image"), tr("Image Files supported (*.png *.jpeg *.jpg *.gif *.webp)"), file)) { + QString encodedImage; + if (RsHtml::makeEmbeddedImage(file, encodedImage, 640*480)) { + QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(encodedImage); + msgEdit->append("\n\n\n\n\n"); + msgEdit->textCursor().insertFragment(fragment); + } + } +} + diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h index bb8f15518..0a5afda7e 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h @@ -70,6 +70,7 @@ private slots: void addThumbnail(); void allowAutoMediaThumbNail(bool); + void addImage(); private: void loadChannelInfo(const uint32_t &token); diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui index 3f4cd7d4b..79dbaf424 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui @@ -96,7 +96,7 @@ - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -118,9 +118,15 @@ p, li { white-space: pre-wrap; } :/images/add-share24.png:/images/add-share24.png + + + 24 + 24 + + - + Add Channel Thumbnail @@ -129,6 +135,29 @@ p, li { white-space: pre-wrap; } :/images/add_image24.png:/images/add_image24.png + + + 24 + 24 + + + + + + + + Attach Picture + + + + :/images/add_image24.png:/images/add_image24.png + + + + 24 + 24 + + @@ -302,8 +331,8 @@ p, li { white-space: pre-wrap; } 0 0 - 767 - 42 + 63 + 24 @@ -390,17 +419,17 @@ p, li { white-space: pre-wrap; } + + MimeTextEdit + QTextEdit +
gui/common/MimeTextEdit.h
+
HeaderFrame QFrame
gui/common/HeaderFrame.h
1
- - MimeTextEdit - QTextEdit -
gui/common/MimeTextEdit.h
-
diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index 45b7c920b..a1bdb46a5 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -257,5 +257,8 @@ icons/png/circles-green.png icons/png/forums-default.png icons/png/forums-signed.png + icons/png/flame.png + icons/png/new.png + icons/png/top.png diff --git a/retroshare-gui/src/gui/icons/png/flame.png b/retroshare-gui/src/gui/icons/png/flame.png new file mode 100644 index 000000000..5b92fb27a Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/flame.png differ diff --git a/retroshare-gui/src/gui/icons/png/new.png b/retroshare-gui/src/gui/icons/png/new.png new file mode 100644 index 000000000..6838d5431 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/new.png differ diff --git a/retroshare-gui/src/gui/icons/png/top.png b/retroshare-gui/src/gui/icons/png/top.png new file mode 100644 index 000000000..f25741fae Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/top.png differ diff --git a/retroshare-gui/src/gui/icons/svg/flame.svg b/retroshare-gui/src/gui/icons/svg/flame.svg new file mode 100644 index 000000000..6f5d79a40 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/flame.svg @@ -0,0 +1,103 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/new.svg b/retroshare-gui/src/gui/icons/svg/new.svg new file mode 100644 index 000000000..05b7b3249 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/new.svg @@ -0,0 +1,103 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/top.svg b/retroshare-gui/src/gui/icons/svg/top.svg new file mode 100644 index 000000000..2493a1394 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/top.svg @@ -0,0 +1,81 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/retroshare-gui/src/gui/statusbar/peerstatus.cpp b/retroshare-gui/src/gui/statusbar/peerstatus.cpp index eaaf00a3b..322109b05 100644 --- a/retroshare-gui/src/gui/statusbar/peerstatus.cpp +++ b/retroshare-gui/src/gui/statusbar/peerstatus.cpp @@ -36,7 +36,7 @@ PeerStatus::PeerStatus(QWidget *parent) iconLabel->setPixmap(QPixmap(":/icons/avatar_grey_128.png").scaledToHeight(S,Qt::SmoothTransformation)); hbox->addWidget(iconLabel); - statusPeers = new QLabel( tr("Trusted nodes: 0/0"), this ); + statusPeers = new QLabel( tr("Friends: 0/0"), this ); hbox->addWidget(statusPeers); _compactMode = false; @@ -50,10 +50,10 @@ void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCo /* set users/friends/network */ if (statusPeers){ - statusPeers->setToolTip(tr("Online Trusted nodes/Total trusted nodes") ); + statusPeers->setToolTip(tr("Online Friends/Total Friends") ); QString text; if (_compactMode) text = QString("%1/%2").arg(nOnlineCount).arg(nFriendCount); - else text = QString("%1: %2/%3 ").arg(tr("Trusted nodes")).arg(nOnlineCount).arg(nFriendCount); + else text = QString("%1: %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount); statusPeers -> setText(text); } int S = QFontMetricsF(iconLabel->font()).height();