mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 15:39:36 -05:00
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:
parent
ef8291e226
commit
1560da7ad9
8
TODO.txt
8
TODO.txt
@ -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**
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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,10 +392,10 @@ 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);
|
||||
connect(replyauthorAct, SIGNAL(triggered()), this, SLOT(replytomessage()));
|
||||
|
||||
QAction *newthreadAct = new QAction(QIcon(IMAGE_MESSAGE), tr("Start New Thread"), &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);
|
||||
newthreadAct->setEnabled (IS_GROUP_SUBSCRIBED(mSubscribeFlags));
|
||||
connect(newthreadAct , SIGNAL(triggered()), this, SLOT(createthread()));
|
||||
|
||||
@ -441,10 +446,10 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
||||
|
||||
if (nCount == 1) {
|
||||
replyAct->setEnabled (true);
|
||||
replyauthorAct->setEnabled (true);
|
||||
replyauthorAct->setEnabled (true);
|
||||
} else {
|
||||
replyAct->setDisabled (true);
|
||||
replyauthorAct->setDisabled (true);
|
||||
replyauthorAct->setDisabled (true);
|
||||
}
|
||||
} else {
|
||||
markMsgAsRead->setDisabled(true);
|
||||
@ -452,11 +457,10 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
||||
markMsgAsUnread->setDisabled(true);
|
||||
markMsgAsUnreadChildren->setDisabled(true);
|
||||
replyAct->setDisabled (true);
|
||||
replyauthorAct->setDisabled (true);
|
||||
replyauthorAct->setDisabled (true);
|
||||
}
|
||||
|
||||
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());
|
||||
@ -465,11 +469,14 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
||||
contextMnu.addAction(markMsgAsReadChildren);
|
||||
contextMnu.addAction(markMsgAsUnread);
|
||||
contextMnu.addAction(markMsgAsUnreadChildren);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(expandAll);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(expandAll);
|
||||
contextMnu.addAction(collapseAll);
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(replyauthorAct);
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
bool GxsForumThreadWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
@ -1821,8 +1828,10 @@ void GxsForumThreadWidget::loadGroupData(const uint32_t &token)
|
||||
mForumGroup = groups[0];
|
||||
insertGroupData();
|
||||
|
||||
mStateHelper->setActive(mTokenTypeGroupData, true);
|
||||
}
|
||||
mStateHelper->setActive(mTokenTypeGroupData, true);
|
||||
|
||||
ui->subscribeToolButton->setHidden(IS_GROUP_SUBSCRIBED(mSubscribeFlags)) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "GxsForumThreadWidget::loadGroupSummary_CurrentForum() ERROR Invalid Number of Groups...";
|
||||
@ -1886,7 +1895,7 @@ void GxsForumThreadWidget::loadMessageData(const uint32_t &token)
|
||||
|
||||
mStateHelper->setActive(mTokenTypeMessageData, false);
|
||||
mStateHelper->clear(mTokenTypeMessageData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*********************** **** **** **** ***********************/
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user