improved layout of forum thread widget. Removed one almost empty line. Hide unscribe button when already subscribed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8257 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-05-15 14:30:37 +00:00
parent ef8291e226
commit 1560da7ad9
4 changed files with 83 additions and 78 deletions

View File

@ -65,10 +65,10 @@ To be done
0020 [ ] double click on completed download must open the file. or folder, configurable in options (from noname)
0028 [ ] RTT statistics shouldn't show curves for offline peers
0029 [ ] In options, rename "server"->"network", "transfer"->"file transfer".
0028 [X] RTT statistics shouldn't show curves for offline peers
0029 [X] In options, rename "server"->"network", "transfer"->"file transfer".
0030 [ ] forums - middle horisontal bar - post time is duplicate to the one in the list. also thread name.
0030 [X] forums - middle horisontal bar - post time is duplicate to the one in the list. also thread name.
forum name (the line with view mode) is duplicate to tab header.
button for new thread must have text, *reply to selected post* button must be placed next to it
the big subscribe button on the top, but never used.
@ -87,7 +87,7 @@ To be done
0033 [ ] Selecting different options in messages composer -> contact list then come back, shows disappearing / re-appearing people.
What causes this???
0034 [ ] Show forum/channel/posted admin name in details window
0034 [X] Show forum/channel/posted admin name in details window
**Not sure**

View File

@ -369,10 +369,13 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
/* Set tooltip */
if (itemInfo.privatekey) {
tooltip += "\n" + tr("Private Key Available");
tooltip += "\n" + tr("You have admin rights");
}
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
{
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
tooltip += "\n" + tr("Subscribe to download and read messages") ;
}
item->setToolTip(COLUMN_NAME, tooltip);
item->setToolTip(COLUMN_POPULARITY, tooltip);

View File

@ -132,6 +132,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
ui->subscribeToolButton->hide() ;
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
connect(ui->newmessageButton, SIGNAL(clicked()), this, SLOT(createmessage()));
connect(ui->newthreadButton, SIGNAL(clicked()), this, SLOT(createthread()));
@ -201,6 +202,10 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
ui->line_2->hide() ;
ui->by_text_label->hide() ;
ui->by_label->hide() ;
ui->subscribeToolButton->setToolTip(tr("<p>Subscribing to the forum will gather \
available posts from your subscribed friends, and make the \
forum visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the forum list at left.</p>"));
}
GxsForumThreadWidget::~GxsForumThreadWidget()
@ -387,7 +392,7 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
QAction *replyAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr("Reply"), &contextMnu);
connect(replyAct, SIGNAL(triggered()), this, SLOT(createmessage()));
QAction *replyauthorAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr("Reply to Author"), &contextMnu);
QAction *replyauthorAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr("Reply with private message"), &contextMnu);
connect(replyauthorAct, SIGNAL(triggered()), this, SLOT(replytomessage()));
QAction *newthreadAct = new QAction(QIcon(IMAGE_MESSAGE), tr("Start New Thread"), &contextMnu);
@ -456,7 +461,6 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
}
contextMnu.addAction(replyAct);
contextMnu.addAction(replyauthorAct);
contextMnu.addAction(newthreadAct);
QAction* action = contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyMessageLink()));
action->setEnabled(!groupId().isNull() && !mThreadId.isNull());
@ -469,6 +473,9 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
contextMnu.addAction(expandAll);
contextMnu.addAction(collapseAll);
contextMnu.addSeparator();
contextMnu.addAction(replyauthorAct);
contextMnu.exec(QCursor::pos());
}
@ -1822,6 +1829,8 @@ void GxsForumThreadWidget::loadGroupData(const uint32_t &token)
insertGroupData();
mStateHelper->setActive(mTokenTypeGroupData, true);
ui->subscribeToolButton->setHidden(IS_GROUP_SUBSCRIBED(mSubscribeFlags)) ;
}
else
{

View File

@ -81,6 +81,34 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="forumName">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>1677215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -126,6 +154,25 @@
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="viewBox">
<item>
<property name="text">
<string>Last Post</string>
</property>
</item>
<item>
<property name="text">
<string>Threaded View</string>
</property>
</item>
<item>
<property name="text">
<string>Flat View</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="LineEditClear" name="filterLineEdit">
<property name="minimumSize">
@ -153,60 +200,6 @@
<property name="leftMargin">
<number>3</number>
</property>
<item>
<widget class="QLabel" name="forumLabel">
<property name="text">
<string>Forum:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="forumName">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>1677215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="viewBox">
<item>
<property name="text">
<string>Last Post</string>
</property>
</item>
<item>
<property name="text">
<string>Threaded View</string>
</property>
</item>
<item>
<property name="text">
<string>Flat View</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
@ -484,6 +477,11 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header>
</customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
@ -494,11 +492,6 @@
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
</customwidget>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header>
</customwidget>
<customwidget>
<class>RSTreeWidget</class>
<extends>QTreeWidget</extends>