mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 02:09:15 -04:00
Merge remote-tracking branch 'upstream/master' into v0.6-BugFixing_4
This commit is contained in:
commit
d842c6fe52
49 changed files with 2185 additions and 1930 deletions
|
@ -60,7 +60,7 @@
|
|||
#define IMAGE_PLAY ":/images/start.png"
|
||||
#define IMAGE_HASH_BUSY ":/images/settings.png"
|
||||
#define IMAGE_HASH_DONE ":/images/accepted16.png"
|
||||
#define IMAGE_MSG ":/images/message-mail.png"
|
||||
#define IMAGE_MSG ":/icons/png/message.png"
|
||||
#define IMAGE_ATTACHMENT ":/icons/png/attachements.png"
|
||||
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
|
|
|
@ -133,21 +133,22 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ )
|
|||
contextMnu->addAction(QIcon(IMAGE_PEERDETAILS), tr("Profile details..."), this, SLOT(peerdetails()));
|
||||
contextMnu->addSeparator() ;
|
||||
contextMnu->addAction(QIcon(), tr("Remove unused keys..."), this, SLOT(removeUnusedKeys()));
|
||||
contextMnu->addAction(QIcon(), tr("Remove this key"), this, SLOT(removeSelectedKeys()));
|
||||
|
||||
contextMnu->exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void NetworkDialog::removeUnusedKeys()
|
||||
{
|
||||
std::set<RsPgpId> pre_selected ;
|
||||
std::list<RsPgpId> ids ;
|
||||
std::set<RsPgpId> pre_selected ;
|
||||
std::list<RsPgpId> ids ;
|
||||
|
||||
rsPeers->getGPGAllList(ids) ;
|
||||
RsPeerDetails details ;
|
||||
time_t now = time(NULL) ;
|
||||
time_t THREE_MONTHS = 3*31*24*60*60 ;//3*DayPerMonth*HoursPerDay*MinPerHour*SecPerMin
|
||||
time_t THREE_MONTHS = 3*31*24*60*60 ;//3*DayPerMonth*HoursPerDay*MinPerHour*SecPerMin
|
||||
|
||||
for(std::list<RsPgpId>::const_iterator it(ids.begin());it!=ids.end();++it)
|
||||
for(std::list<RsPgpId>::const_iterator it(ids.begin());it!=ids.end();++it)
|
||||
{
|
||||
rsPeers->getGPGDetails(*it,details) ;
|
||||
|
||||
|
@ -159,17 +160,34 @@ void NetworkDialog::removeUnusedKeys()
|
|||
if(now > (time_t) (THREE_MONTHS + details.lastUsed) && !details.accept_connection)
|
||||
{
|
||||
std::cerr << "Adding " << *it << " to pre-selection." << std::endl;
|
||||
pre_selected.insert(*it) ;
|
||||
pre_selected.insert(*it) ;
|
||||
}
|
||||
}
|
||||
|
||||
std::set<RsPgpId> selected = FriendSelectionDialog::selectFriends_PGP(NULL,
|
||||
tr("Clean keyring"),
|
||||
tr("The selected keys below haven't been used in the last 3 months. \nDo you want to delete them permanently ? \n\nNotes: Your old keyring will be backed up.\n The removal may fail when running multiple Retroshare instances on the same machine."),FriendSelectionWidget::MODUS_CHECK,FriendSelectionWidget::SHOW_GPG | FriendSelectionWidget::SHOW_NON_FRIEND_GPG,
|
||||
pre_selected) ;
|
||||
|
||||
std::set<RsPgpId> selected = FriendSelectionDialog::selectFriends_PGP(NULL,
|
||||
tr("Clean keyring"),
|
||||
tr("The selected keys below haven't been used in the last 3 months. \nDo you want to delete them permanently ? \n\nNotes: Your old keyring will be backed up.\n The removal may fail when running multiple Retroshare instances on the same machine."),FriendSelectionWidget::MODUS_CHECK,FriendSelectionWidget::SHOW_GPG | FriendSelectionWidget::SHOW_NON_FRIEND_GPG,
|
||||
pre_selected) ;
|
||||
|
||||
removeKeys(selected);
|
||||
}
|
||||
|
||||
void NetworkDialog::removeSelectedKeys()
|
||||
{
|
||||
QModelIndexList l = ui.connectTreeWidget->selectionModel()->selection().indexes();
|
||||
if(l.empty())
|
||||
return;
|
||||
|
||||
std::set<RsPgpId> selected;
|
||||
selected.insert(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()));
|
||||
|
||||
removeKeys(selected);
|
||||
}
|
||||
|
||||
void NetworkDialog::removeKeys(std::set<RsPgpId> selected)
|
||||
{
|
||||
std::cerr << "Removing these keys from the keyring: " << std::endl;
|
||||
for(std::set<RsPgpId>::const_iterator it(selected.begin());it!=selected.end();++it)
|
||||
for(std::set<RsPgpId>::const_iterator it(selected.begin());it!=selected.end();++it)
|
||||
std::cerr << " " << *it << std::endl;
|
||||
|
||||
std::string backup_file ;
|
||||
|
@ -200,7 +218,7 @@ void NetworkDialog::removeUnusedKeys()
|
|||
}
|
||||
QMessageBox::warning(NULL,tr("Keyring info"),tr("Key removal has failed. Your keyring remains intact.\n\nReported error:")+" "+error_string ) ;
|
||||
}
|
||||
updateDisplay();
|
||||
updateDisplay();
|
||||
// insertConnect() ;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ protected:
|
|||
private slots:
|
||||
|
||||
void removeUnusedKeys() ;
|
||||
void removeSelectedKeys() ;
|
||||
void makeFriend() ;
|
||||
void denyFriend() ;
|
||||
void peerdetails();
|
||||
|
@ -86,6 +87,8 @@ private slots:
|
|||
|
||||
private:
|
||||
|
||||
void removeKeys(std::set<RsPgpId> selected) ;
|
||||
|
||||
/* Color definitions (for standard see qss.default) */
|
||||
QColor mBackgroundColorSelf;
|
||||
QColor mBackgroundColorOwnSign;
|
||||
|
|
|
@ -60,29 +60,25 @@ BoardPostDisplayWidgetBase::BoardPostDisplayWidgetBase(const RsPostedPost& post,
|
|||
|
||||
void BoardPostDisplayWidgetBase::setCommentsSize(int comNb)
|
||||
{
|
||||
QString sComButText ;
|
||||
QString sComButText = tr("Comment");
|
||||
QString sComButTooltip ;
|
||||
|
||||
if (comNb == 1)
|
||||
sComButText = tr("1 comment");
|
||||
else if(comNb > 1)
|
||||
sComButText = tr("%1 comments").arg(comNb);
|
||||
else
|
||||
sComButText = tr("No comments yet. Click to add one.");
|
||||
|
||||
commentButton()->setToolTip(sComButText);
|
||||
if (comNb == 0)
|
||||
sComButTooltip = tr("No comments yet. Click to add one.");
|
||||
|
||||
commentButton()->setToolTip(sComButTooltip);
|
||||
commentButton()->setText(sComButText);
|
||||
|
||||
if(comNb > 0)
|
||||
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments_blue.png"));
|
||||
else
|
||||
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments.png"));
|
||||
|
||||
// QString sComButText = tr("Comment");
|
||||
// if (comNb == 1)
|
||||
// sComButText = sComButText.append("(1)");
|
||||
// else if(comNb > 1)
|
||||
// sComButText = tr("Comments ").append("(%1)").arg(comNb);
|
||||
//
|
||||
commentButton()->setText(tr("Comments"));
|
||||
}
|
||||
|
||||
void BoardPostDisplayWidgetBase::makeDownVote()
|
||||
|
|
|
@ -460,18 +460,14 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="filter_LE">
|
||||
<property name="placeholderText">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
@ -480,6 +476,13 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="filter_LE">
|
||||
<property name="placeholderText">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
|
|
|
@ -292,6 +292,11 @@ void ChatWidget::addTitleBarWidget(QWidget *w)
|
|||
ui->pluginTitleFrame->layout()->addWidget(w) ;
|
||||
}
|
||||
|
||||
void ChatWidget::addTopBarWidget(QWidget *w)
|
||||
{
|
||||
ui->pluginTopFrame->layout()->addWidget(w) ;
|
||||
}
|
||||
|
||||
void ChatWidget::hideChatText(bool hidden)
|
||||
{
|
||||
ui->chatTextFrame->setHidden(hidden); ;
|
||||
|
|
|
@ -115,6 +115,7 @@ public:
|
|||
// small enough in size.
|
||||
void addChatBarWidget(QWidget *w) ;
|
||||
void addTitleBarWidget(QWidget *w);
|
||||
void addTopBarWidget(QWidget *w);
|
||||
void hideChatText(bool hidden);
|
||||
RSButtonOnText* getNewButtonOnTextBrowser();
|
||||
RSButtonOnText* getNewButtonOnTextBrowser(QString text);
|
||||
|
|
|
@ -26,6 +26,322 @@
|
|||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="titleBarMainHLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="titleBarFrame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="titleBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="titleLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="nameLayout">
|
||||
<item>
|
||||
<widget class="StyledLabel" name="titleLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Title</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="StyledLabel" name="statusLabel">
|
||||
<property name="text">
|
||||
<string>(Status)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusMessageLabel">
|
||||
<property name="text">
|
||||
<string notr="true">Status message</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="pluginTopFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout_2">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="titleBarHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/search.png</normaloff>:/icons/png/search.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="leSearch"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="markButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/highlight.png</normaloff>:/icons/png/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchBefore">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/arrow-left.png</normaloff>:/icons/png/arrow-left.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchAfter">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/arrow-right.png</normaloff>:/icons/png/arrow-right.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="notifyButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/chat-bubble-notify.png</normaloff>:/icons/png/chat-bubble-notify.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pushtoolsButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Chat menu</p></body></html></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/menu.png</normaloff>:/icons/png/menu.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="pluginTitleFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="textChatHLayout">
|
||||
<property name="spacing">
|
||||
|
@ -561,295 +877,6 @@ border-image: url(:/images/closepressed.png)
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="titleBarMainHLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="titleBarFrame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="titleBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="titleLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="nameLayout">
|
||||
<item>
|
||||
<widget class="StyledLabel" name="titleLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Title</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="StyledLabel" name="statusLabel">
|
||||
<property name="text">
|
||||
<string>(Status)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusMessageLabel">
|
||||
<property name="text">
|
||||
<string notr="true">Status message</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="titleBarHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/search.png</normaloff>:/icons/png/search.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="leSearch"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="markButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/highlight.png</normaloff>:/icons/png/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchBefore">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/arrow-left.png</normaloff>:/icons/png/arrow-left.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchAfter">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/arrow-right.png</normaloff>:/icons/png/arrow-right.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="notifyButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/chat-bubble-notify.png</normaloff>:/icons/png/chat-bubble-notify.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pushtoolsButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Chat menu</p></body></html></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/menu.png</normaloff>:/icons/png/menu.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="pluginTitleFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="actionBold">
|
||||
<property name="text">
|
||||
|
|
|
@ -62,7 +62,7 @@ PopupDistantChatDialog::PopupDistantChatDialog(const DistantChatPeerId& tunnel_i
|
|||
|
||||
_update_timer->start() ;
|
||||
|
||||
getChatWidget()->addChatBarWidget(_status_label) ;
|
||||
getChatWidget()->addTopBarWidget(_status_label) ;
|
||||
updateDisplay() ;
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ int FriendSelectionWidget::addColumn(const QString &title)
|
|||
return column;
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::showEvent(QShowEvent *e)
|
||||
void FriendSelectionWidget::showEvent(QShowEvent */*e*/)
|
||||
{
|
||||
if(gxsIds.empty())
|
||||
loadIdentities();
|
||||
|
@ -838,6 +838,9 @@ void FriendSelectionWidget::contextMenuRequested(const QPoint &/*pos*/)
|
|||
contextMenu->addAction(QIcon(), tr("Mark all"), this, SLOT(selectAll()));
|
||||
contextMenu->addAction(QIcon(), tr("Mark none"), this, SLOT(deselectAll()));
|
||||
}
|
||||
if (mListModus == MODUS_CHECK) {
|
||||
contextMenu->addAction(QIcon(), tr("Mark none"), this, SLOT(deselectAll()));
|
||||
}
|
||||
|
||||
if (!mContextMenuActions.isEmpty()) {
|
||||
bool addSeparator = false;
|
||||
|
|
|
@ -209,6 +209,9 @@ void GxsChannelPostItem::setup()
|
|||
|
||||
ui->scoreLabel->hide();
|
||||
|
||||
// hide unsubscribe button not necessary
|
||||
ui->unsubscribeButton->hide();
|
||||
|
||||
ui->downloadButton->hide();
|
||||
ui->playButton->hide();
|
||||
//ui->warn_image_label->hide();
|
||||
|
@ -426,7 +429,7 @@ void GxsChannelPostItem::fill()
|
|||
mInFill = true;
|
||||
|
||||
QString title;
|
||||
|
||||
QString msgText;
|
||||
//float f = QFontMetricsF(font()).height()/14.0 ;
|
||||
|
||||
if(mPost.mThumbnail.mData != NULL)
|
||||
|
@ -465,8 +468,10 @@ void GxsChannelPostItem::fill()
|
|||
title += link.toHtml();
|
||||
ui->titleLabel->setText(title);
|
||||
|
||||
msgText = tr("Post") + ": ";
|
||||
RetroShareLink msgLink = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_CHANNEL, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, messageName());
|
||||
ui->subjectLabel->setText(msgLink.toHtml());
|
||||
msgText += msgLink.toHtml();
|
||||
ui->subjectLabel->setText(msgText);
|
||||
|
||||
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="tilteHLayout">
|
||||
<item>
|
||||
<widget class="StyledElidedLabel" name="titleLabel">
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -124,16 +124,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="subjectLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
@ -147,6 +137,16 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="subjectLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="newCommHLayout">
|
||||
<property name="topMargin">
|
||||
|
@ -469,11 +469,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>StyledElidedLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledElidedLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ElidedLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "gui/notifyqt.h"
|
||||
#include "gui/Circles/CreateCircleDialog.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
@ -98,8 +99,9 @@ void GxsCircleItem::setup()
|
|||
ui->gxsIdLabel->setId(mGxsId);
|
||||
|
||||
ui->inviteeButton->setHidden(false);
|
||||
ui->inviteeButton->setText(tr("Grant membership"));
|
||||
ui->inviteeButton->setToolTip(tr("Grant membership to this circle, for this identity"));
|
||||
ui->inviteeButton->setText(tr("Grant membership"));
|
||||
ui->inviteeButton->setToolTip(tr("Grant membership to this circle, for this identity"));
|
||||
ui->inviteeButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/accepted16.png"));
|
||||
|
||||
ui->membershipButton->setHidden(true);
|
||||
}
|
||||
|
@ -133,6 +135,7 @@ void GxsCircleItem::setup()
|
|||
ui->inviteeButton->setHidden(false);
|
||||
ui->inviteeButton->setText(tr("Revoke membership"));
|
||||
ui->inviteeButton->setToolTip(tr("Revoke membership for that identity"));
|
||||
ui->inviteeButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -155,6 +158,7 @@ void GxsCircleItem::setup()
|
|||
ui->membershipButton->setHidden(false);
|
||||
ui->membershipButton->setText(tr("Cancel membership request"));
|
||||
ui->membershipButton->setToolTip(tr("Cancel your membership request from that circle"));
|
||||
ui->membershipButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"));
|
||||
|
||||
ui->inviteeButton->setHidden(true);
|
||||
}
|
||||
|
@ -168,6 +172,7 @@ void GxsCircleItem::setup()
|
|||
ui->membershipButton->setHidden(false);
|
||||
ui->membershipButton->setText(tr("Cancel membership"));
|
||||
ui->membershipButton->setToolTip(tr("Cancel your membership from that circle"));
|
||||
ui->membershipButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"));
|
||||
|
||||
ui->inviteeButton->setHidden(true);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>618</width>
|
||||
<height>217</height>
|
||||
<height>108</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="GxsCircleItemGLayout">
|
||||
|
@ -133,29 +133,86 @@
|
|||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Circle msg</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="GxsIdLabel" name="gxsIdLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">name</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<italic>true</italic>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Circle msg</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>358</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="nameHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Circle name:</string>
|
||||
</property>
|
||||
|
@ -186,56 +243,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="forLabel">
|
||||
<property name="text">
|
||||
<string>Identity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="GxsIdLabel" name="gxsIdLabel">
|
||||
<property name="text">
|
||||
<string notr="true">name</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>358</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
|
|
@ -118,6 +118,9 @@ void GxsForumMsgItem::setup()
|
|||
|
||||
ui->subjectLabel->setMinimumWidth(20);
|
||||
|
||||
// hide unsubscribe button not necessary
|
||||
ui->unsubscribeButton->hide();
|
||||
|
||||
ui->expandFrame->hide();
|
||||
ui->parentFrame->hide();
|
||||
}
|
||||
|
|
|
@ -313,7 +313,11 @@ void GxsCommentTreeWidget::setCurrentCommentMsgId(QTreeWidgetItem *current, QTre
|
|||
mCurrentCommentText = current->text(PCITEM_COLUMN_COMMENT);
|
||||
mCurrentCommentAuthor = current->text(PCITEM_COLUMN_AUTHOR);
|
||||
mCurrentCommentAuthorId = RsGxsId(current->text(PCITEM_COLUMN_AUTHORID).toStdString());
|
||||
|
||||
} else {
|
||||
mCurrentCommentMsgId.clear();
|
||||
mCurrentCommentText.clear();
|
||||
mCurrentCommentAuthor.clear();
|
||||
mCurrentCommentAuthorId.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,19 +327,22 @@ void GxsCommentTreeWidget::customPopUpMenu(const QPoint& point)
|
|||
|
||||
QMenu contextMnu( this );
|
||||
QAction* action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REPLY), tr("Reply to Comment"), this, SLOT(replyToComment()));
|
||||
action->setDisabled(mCurrentCommentMsgId.isNull());
|
||||
action->setDisabled(!item || mCurrentCommentMsgId.isNull());
|
||||
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Submit Comment"), this, SLOT(makeComment()));
|
||||
action->setDisabled(mMsgVersions.empty());
|
||||
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPY), tr("Copy Comment"), this, SLOT(copyComment()));
|
||||
action->setData( item->data(PCITEM_COLUMN_COMMENT,Qt::DisplayRole) );
|
||||
action->setDisabled(mCurrentCommentMsgId.isNull());
|
||||
action->setData( item ? item->data(PCITEM_COLUMN_COMMENT,Qt::DisplayRole) : "" );
|
||||
action->setDisabled(!item || mCurrentCommentMsgId.isNull());
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEUP), tr("Vote Up"), this, SLOT(voteUp()));
|
||||
action->setDisabled(mVoterId.isNull());
|
||||
action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull());
|
||||
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown()));
|
||||
action->setDisabled(mVoterId.isNull());
|
||||
action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull());
|
||||
|
||||
|
||||
if (!mCurrentCommentMsgId.isNull())
|
||||
|
|
|
@ -75,6 +75,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
|||
connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments()));
|
||||
//connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(subjectEdit,SIGNAL(textChanged(const QString&)),this,SLOT(updatePreviewText(const QString&)));
|
||||
connect(expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
|
||||
|
||||
connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail()));
|
||||
connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool)));
|
||||
|
@ -86,6 +87,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
|||
channelpostButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
|
||||
attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png"));
|
||||
addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png"));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
removeButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/mail/delete.png")));
|
||||
|
||||
aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg"));
|
||||
aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg"));
|
||||
|
@ -114,6 +117,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
|||
generateSpinBox->hide();
|
||||
#endif
|
||||
|
||||
removeButton->hide();
|
||||
|
||||
/* load settings */
|
||||
processSettings(true);
|
||||
}
|
||||
|
@ -824,8 +829,8 @@ void CreateGxsChannelMsg::addThumbnail()
|
|||
picture = img;
|
||||
|
||||
// to show the selected
|
||||
preview_W->setPixmap(picture, aspectRatio_CB->currentIndex()==0);
|
||||
|
||||
preview_W->setPixmap(picture, aspectRatio_CB->currentIndex()==0);
|
||||
removeButton->show();
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::loadOriginalChannelPostInfo()
|
||||
|
@ -869,7 +874,8 @@ void CreateGxsChannelMsg::loadOriginalChannelPostInfo()
|
|||
if(post.mThumbnail.mData != NULL)
|
||||
{
|
||||
GxsIdDetails::loadPixmapFromData(post.mThumbnail.mData,post.mThumbnail.mSize,picture,GxsIdDetails::ORIGINAL);
|
||||
preview_W->setPixmap(picture,true);
|
||||
preview_W->setPixmap(picture,true);
|
||||
removeButton->show();
|
||||
}
|
||||
|
||||
|
||||
|
@ -926,3 +932,28 @@ void CreateGxsChannelMsg::on_attachmentsButton_clicked()
|
|||
{
|
||||
stackedWidget->setCurrentIndex(1);
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::toggle()
|
||||
{
|
||||
if (expandButton->isChecked())
|
||||
{
|
||||
thumbnailFrame->hide();
|
||||
gridLayoutTextEdit->setContentsMargins(0,9,0,0);
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setToolTip(tr("Show"));
|
||||
}
|
||||
else
|
||||
{
|
||||
thumbnailFrame->show();
|
||||
gridLayoutTextEdit->setContentsMargins(0,0,0,0);
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::on_removeButton_clicked()
|
||||
{
|
||||
preview_W->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE),true);
|
||||
removeButton->hide();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ protected:
|
|||
virtual void dropEvent(QDropEvent *event);
|
||||
|
||||
private slots:
|
||||
void toggle() ;
|
||||
void addExtraFile();
|
||||
void checkAttachmentReady();
|
||||
void deleteAttachment();
|
||||
|
@ -74,6 +75,7 @@ private slots:
|
|||
|
||||
void on_channelpostButton_clicked();
|
||||
void on_attachmentsButton_clicked();
|
||||
void on_removeButton_clicked();
|
||||
private:
|
||||
void processSettings(bool load);
|
||||
void loadChannelInfo();
|
||||
|
|
|
@ -57,10 +57,16 @@
|
|||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="attachmentsButton">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="channelpostButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Attachments</string>
|
||||
<string>Channel Post</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -70,7 +76,58 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<item row="2" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="generateCheckBox">
|
||||
<property name="text">
|
||||
<string>Generate mass data</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="generateSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="postButton">
|
||||
<property name="text">
|
||||
<string>Post</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
|
@ -85,192 +142,250 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="stackedWidgetPage1">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="ChannelPostThumbnailView" name="preview_W" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="channelNameHLayout">
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="thumbnailFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="channelNameLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Channel Post to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="channelName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="channelAttachLabel">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="channelAttachLabel">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Attachments:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/images/feedback_arrow.png" /><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;"> Use Drag and Drop / Add Files button, to Hash new files.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/images/feedback_arrow.png" /><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;"> Copy/Paste RetroShare links from your shares</span></p></body></html></string>
|
||||
</property>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addThumbnailButton">
|
||||
<property name="text">
|
||||
<string>Add Channel Thumbnail</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="aspectRatio_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Choose aspect ratio policy. In 'Auto' mode, the most suitable aspect ratio is chosen for you.</p></body></html></string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Auto</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1:1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3:4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16:9</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Remove Thumbnail</p></body></html></string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="channelNameHLayout">
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="channelNameLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Channel Post to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="channelName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="ChannelPostThumbnailView" name="preview_W" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addThumbnailButton">
|
||||
<property name="text">
|
||||
<string>Add Channel Thumbnail</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="aspectRatio_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Choose aspect ratio policy. In 'Auto' mode, the most suitable aspect ratio is chosen for you.</p></body></html></string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Auto</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1:1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3:4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16:9</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout" name="gridLayoutTextEdit">
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLineEdit" name="subjectEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="expandButton">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Hide</p></body></html></string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="RichTextEdit" name="RichTextEditWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="RichTextEdit" name="RichTextEditWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="stackedWidgetPage2">
|
||||
|
@ -344,7 +459,7 @@ p, li { white-space: pre-wrap; }
|
|||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Add File</p></body></html></string>
|
||||
<string><html><head/><body><p>Remove File</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
@ -393,7 +508,7 @@ p, li { white-space: pre-wrap; }
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>827</width>
|
||||
<width>63</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -444,23 +559,16 @@ p, li { white-space: pre-wrap; }
|
|||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="attachmentsButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>486</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="channelpostButton">
|
||||
<property name="text">
|
||||
<string>Channel Post</string>
|
||||
<string>Attachments</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -470,56 +578,18 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="generateCheckBox">
|
||||
<property name="text">
|
||||
<string>Generate mass data</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="generateSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="postButton">
|
||||
<property name="text">
|
||||
<string>Post</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
|
@ -908,6 +908,7 @@ void GxsForumThreadWidget::changedThread(QModelIndex index)
|
|||
return;
|
||||
|
||||
mThreadId = mOrigThreadId = new_id;
|
||||
mLastSelectedPosts[groupId()] = new_id;
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "Switched to new thread ID " << mThreadId << std::endl;
|
||||
|
@ -1492,22 +1493,25 @@ void GxsForumThreadWidget::expandSubtree() {
|
|||
|
||||
bool GxsForumThreadWidget::navigate(const RsGxsMessageId &msgId)
|
||||
{
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(msgId);
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(msgId);
|
||||
|
||||
if(!source_index.isValid())
|
||||
{
|
||||
std::cerr << "(EE) Cannot navigate to msg " << msgId << " in forum " << mForumGroup.mMeta.mGroupId << ": index unknown. Setting mNavigatePendingMsgId." << std::endl;
|
||||
if(!source_index.isValid())
|
||||
{
|
||||
std::cerr << "(EE) Cannot navigate to msg " << msgId << " in forum " << mForumGroup.mMeta.mGroupId << ": index unknown. Setting mNavigatePendingMsgId." << std::endl;
|
||||
|
||||
mNavigatePendingMsgId = msgId; // not found. That means the forum may not be loaded yet. So we keep that post in mind, for after loading.
|
||||
return true; // we have to return true here, otherwise the caller will intepret the async loading as an error.
|
||||
}
|
||||
mNavigatePendingMsgId = msgId; // not found. That means the forum may not be loaded yet. So we keep that post in mind, for after loading.
|
||||
return true; // we have to return true here, otherwise the caller will intepret the async loading as an error.
|
||||
}
|
||||
|
||||
QModelIndex indx = mThreadProxyModel->mapFromSource(source_index);
|
||||
QModelIndex indx = mThreadProxyModel->mapFromSource(source_index);
|
||||
|
||||
ui->threadTreeWidget->setCurrentIndex(indx);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
ui->threadTreeWidget->setFocus();
|
||||
return true;
|
||||
ui->threadTreeWidget->selectionModel()->setCurrentIndex(indx,QItemSelectionModel::ClearAndSelect);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
ui->threadTreeWidget->setFocus();
|
||||
|
||||
mNavigatePendingMsgId.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::copyMessageLink()
|
||||
|
@ -1797,22 +1801,33 @@ void GxsForumThreadWidget::saveImage()
|
|||
|
||||
void GxsForumThreadWidget::changedViewBox()
|
||||
{
|
||||
ui->threadTreeWidget->selectionModel()->clear();
|
||||
ui->threadTreeWidget->selectionModel()->reset();
|
||||
mThreadId.clear();
|
||||
ui->threadTreeWidget->selectionModel()->clear();
|
||||
ui->threadTreeWidget->selectionModel()->reset();
|
||||
mThreadId.clear();
|
||||
|
||||
// save index
|
||||
Settings->setValueToGroup("ForumThreadWidget", "viewBox", ui->viewBox->currentIndex());
|
||||
// save index
|
||||
Settings->setValueToGroup("ForumThreadWidget", "viewBox", ui->viewBox->currentIndex());
|
||||
|
||||
if(ui->viewBox->currentIndex() == VIEW_FLAT)
|
||||
mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_FLAT);
|
||||
else
|
||||
mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_TREE);
|
||||
if(ui->viewBox->currentIndex() == VIEW_FLAT)
|
||||
mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_FLAT);
|
||||
else
|
||||
mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_TREE);
|
||||
|
||||
if(ui->viewBox->currentIndex() == VIEW_LAST_POST)
|
||||
mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_CHILDREN_PUBLISH_TS);
|
||||
else
|
||||
mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_PUBLISH_TS);
|
||||
if(ui->viewBox->currentIndex() == VIEW_LAST_POST)
|
||||
mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_CHILDREN_PUBLISH_TS);
|
||||
else
|
||||
mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_PUBLISH_TS);
|
||||
|
||||
if( (mLastSelectedPosts.count(groupId()) > 0)
|
||||
&& !mLastSelectedPosts[groupId()].isNull()
|
||||
&& mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]).isValid())
|
||||
{
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]);
|
||||
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
|
||||
|
||||
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
}
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::filterColumnChanged(int column)
|
||||
|
@ -1868,67 +1883,72 @@ void GxsForumThreadWidget::filterItems(const QString& text)
|
|||
|
||||
void GxsForumThreadWidget::postForumLoading()
|
||||
{
|
||||
if(groupId().isNull())
|
||||
{
|
||||
ui->nextUnreadButton->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
if(groupId().isNull())
|
||||
{
|
||||
ui->nextUnreadButton->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "Post forum loading..." << std::endl;
|
||||
std::cerr << "Post forum loading..." << std::endl;
|
||||
#endif
|
||||
if(!mNavigatePendingMsgId.isNull() && mThreadModel->getIndexOfMessage(mNavigatePendingMsgId).isValid())
|
||||
{
|
||||
|
||||
if (!mNavigatePendingMsgId.isNull())
|
||||
navigate(mNavigatePendingMsgId);
|
||||
|
||||
else if( (mLastSelectedPosts.count(groupId()) > 0)
|
||||
&& !mLastSelectedPosts[groupId()].isNull()
|
||||
&& mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]).isValid())
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "Pending msg navigation: " << mNavigatePendingMsgId << ". Using it as new thread Id" << std::endl;
|
||||
std::cerr << "Last selected msg navigation: " << mLastSelectedPosts[groupId()].toStdString() << ". Using it as new thread Id" << std::endl;
|
||||
#endif
|
||||
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(mNavigatePendingMsgId);
|
||||
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]);
|
||||
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
|
||||
|
||||
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
|
||||
mNavigatePendingMsgId.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(mThreadId);
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(mThreadId);
|
||||
|
||||
if(!mThreadId.isNull() && source_index.isValid())
|
||||
{
|
||||
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
|
||||
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
if(!mThreadId.isNull() && source_index.isValid())
|
||||
{
|
||||
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
|
||||
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
|
||||
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << " re-selecting index of message " << mThreadId << " to " << source_index.row() << "," << source_index.column() << " " << (void*)source_index.internalPointer() << std::endl;
|
||||
std::cerr << " re-selecting index of message " << mThreadId << " to " << source_index.row() << "," << source_index.column() << " " << (void*)source_index.internalPointer() << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << " previously message " << mThreadId << " not visible anymore -> de-selecting" << std::endl;
|
||||
std::cerr << " previously message " << mThreadId << " not visible anymore -> de-selecting" << std::endl;
|
||||
#endif
|
||||
ui->threadTreeWidget->selectionModel()->clear();
|
||||
ui->threadTreeWidget->selectionModel()->reset();
|
||||
mThreadId.clear();
|
||||
//blank();
|
||||
}
|
||||
// we also need to restore expanded threads
|
||||
}
|
||||
ui->threadTreeWidget->selectionModel()->clear();
|
||||
ui->threadTreeWidget->selectionModel()->reset();
|
||||
mThreadId.clear();
|
||||
//blank();
|
||||
}
|
||||
// we also need to restore expanded threads
|
||||
}
|
||||
|
||||
ui->newthreadButton->show();
|
||||
ui->forumName->setText(QString::fromUtf8(mForumGroup.mMeta.mGroupName.c_str()));
|
||||
ui->threadTreeWidget->sortByColumn(RsGxsForumModel::COLUMN_THREAD_DATE, Qt::DescendingOrder);
|
||||
ui->threadTreeWidget->update();
|
||||
ui->viewBox->setEnabled(true);
|
||||
ui->filterLineEdit->setEnabled(true);
|
||||
ui->newthreadButton->show();
|
||||
ui->forumName->setText(QString::fromUtf8(mForumGroup.mMeta.mGroupName.c_str()));
|
||||
ui->threadTreeWidget->sortByColumn(RsGxsForumModel::COLUMN_THREAD_DATE, Qt::DescendingOrder);
|
||||
ui->threadTreeWidget->update();
|
||||
ui->viewBox->setEnabled(true);
|
||||
ui->filterLineEdit->setEnabled(true);
|
||||
|
||||
recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages);
|
||||
//mUpdating = false;
|
||||
recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages);
|
||||
//mUpdating = false;
|
||||
|
||||
ui->nextUnreadButton->setEnabled(true);
|
||||
ui->nextUnreadButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::updateGroupData()
|
||||
|
|
|
@ -224,6 +224,7 @@ private:
|
|||
QColor mBackgroundColorPinned;
|
||||
QColor mBackgroundColorFiltered;
|
||||
|
||||
std::map<RsGxsGroupId,RsGxsMessageId> mLastSelectedPosts;
|
||||
RsGxsMessageId mNavigatePendingMsgId;
|
||||
QList<RsGxsMessageId> mIgnoredMsgId;
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ ShareManager QPushButton#closeButton {
|
|||
padding-right: 6px;
|
||||
}
|
||||
|
||||
ShareManager QPushButton#addButton {
|
||||
ShareManager QPushButton#addButton{
|
||||
font: bold;
|
||||
font-size: 15px;
|
||||
color: white;
|
||||
|
@ -180,7 +180,25 @@ ShareManager QPushButton#addButton {
|
|||
padding: 4px;
|
||||
}
|
||||
|
||||
ShareManager QPushButton#addButton:hover {
|
||||
ShareManager QPushButton#addButton:hover{
|
||||
background: #5AD75A;
|
||||
border-radius: 4px;
|
||||
min-width: 4em;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
SearchDialog QPushButton#pushButtonSearch {
|
||||
font: bold;
|
||||
font-size: 15px;
|
||||
color: white;
|
||||
background: #32CD32;
|
||||
border-radius: 4px;
|
||||
max-height: 25px;
|
||||
min-width: 4em;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
SearchDialog QPushButton#pushButtonSearch:hover{
|
||||
background: #5AD75A;
|
||||
border-radius: 4px;
|
||||
min-width: 4em;
|
||||
|
@ -433,21 +451,28 @@ ChanNewItem QLabel#logoLabel {
|
|||
}
|
||||
|
||||
GxsChannelPostItem > QFrame#mainFrame[new=false] {
|
||||
border: 3px solid #D3D3D3;
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFFF, stop:1 #F2F2F2);
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
GxsChannelPostItem > QFrame#mainFrame[new=true] {
|
||||
border: 3px solid #82B9F4;
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #F0F8FD, stop:0.8 #E6F2FD, stop: 0.81 #E6F2FD, stop: 1 #D2E7FD);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
GxsChannelPostItem QLabel#newLabel {
|
||||
GxsChannelPostItem QLabel#newLabel{
|
||||
border: 1px solid #167BE7;
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2291E0, stop: 1 #3EB3FF);
|
||||
border-radius: 3px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
GxsChannelPostItem QLabel#subjectLabel, GxsChannelPostItem QLabel#titleLabel {
|
||||
font: 11pt;
|
||||
font: bold italic;
|
||||
}
|
||||
|
||||
GxsChannelPostItem QFrame#msgFrame {
|
||||
border: 2px solid #82B9F4;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
GxsChannelPostItem QLabel#logoLabel {
|
||||
|
@ -458,6 +483,15 @@ GxsChannelPostItem QLabel#logoLabel {
|
|||
background-color: black;
|
||||
}
|
||||
|
||||
GxsCircleItem QFrame#frame {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
GxsCircleItem QLabel#nameLabel, QLabel#titleLabel {
|
||||
font: 11pt;
|
||||
font: bold italic;
|
||||
}
|
||||
|
||||
ForumNewItem > QFrame#frame, ForumMsgItem > QFrame#frame {
|
||||
border: 2px solid #CCCCCC;
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #EEEEEE, stop: 1 #CCCCCC);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "ChatPage.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include <gui/RetroShareLink.h>
|
||||
#include "gui/chat/ChatDialog.h"
|
||||
#include "gui/notifyqt.h"
|
||||
|
@ -224,7 +225,14 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
ui.minimumContrastLabel->hide();
|
||||
ui.minimumContrast->hide();
|
||||
#endif
|
||||
connect(ui.distantChatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
|
||||
connect(ui.chatLobbies_CountFollowingText, SIGNAL(toggled(bool)),ui.chatLobbies_TextToNotify,SLOT(setEnabled(bool)));
|
||||
connect(ui.chatLobbies_CountUnRead, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
connect(ui.chatLobbies_CheckNickName, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
connect(ui.chatLobbies_CountFollowingText, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
connect(ui.chatLobbies_TextToNotify, SIGNAL(textChanged(QString)),this, SLOT(updateChatLobbyUserNotify()));
|
||||
connect(ui.chatLobbies_TextCaseSensitive, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
|
||||
connect(ui.distantChatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
|
||||
|
||||
connect(ui.checkBox_emoteprivchat, SIGNAL(toggled(bool)), this, SLOT(updateFontsAndEmotes()));
|
||||
connect(ui.checkBox_emotegroupchat, SIGNAL(toggled(bool)), this, SLOT(updateFontsAndEmotes()));
|
||||
|
@ -286,7 +294,40 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.publicStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_publicList_currentRowChanged(int)));
|
||||
connect(ui.privateStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_privateList_currentRowChanged(int)));
|
||||
connect(ui.historyStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_historyList_currentRowChanged(int)));
|
||||
|
||||
/* Add user notify */
|
||||
const QList<UserNotify*> &userNotifyList = MainWindow::getInstance()->getUserNotifyList() ;
|
||||
QList<UserNotify*>::const_iterator it;
|
||||
|
||||
mChatLobbyUserNotify = nullptr;
|
||||
|
||||
for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it)
|
||||
{
|
||||
UserNotify *userNotify = *it;
|
||||
|
||||
//To get ChatLobbyUserNotify Settings
|
||||
|
||||
if(!mChatLobbyUserNotify)
|
||||
mChatLobbyUserNotify = dynamic_cast<ChatLobbyUserNotify*>(*it);
|
||||
}
|
||||
|
||||
// hide the broadcast page: it only shows "show/hide emoticons, which is really not much for an entire page
|
||||
ui.tabWidget->removeTab(3);
|
||||
}
|
||||
|
||||
void ChatPage::updateChatLobbyUserNotify()
|
||||
{
|
||||
if(!mChatLobbyUserNotify)
|
||||
return ;
|
||||
|
||||
mChatLobbyUserNotify->setCountUnRead(ui.chatLobbies_CountUnRead->isChecked()) ;
|
||||
mChatLobbyUserNotify->setCheckForNickName(ui.chatLobbies_CheckNickName->isChecked()) ;
|
||||
mChatLobbyUserNotify->setCountSpecificText(ui.chatLobbies_CountFollowingText->isChecked()) ;
|
||||
mChatLobbyUserNotify->setTextToNotify(ui.chatLobbies_TextToNotify->document()->toPlainText());
|
||||
mChatLobbyUserNotify->setTextCaseSensitive(ui.chatLobbies_TextCaseSensitive->isChecked());
|
||||
}
|
||||
|
||||
|
||||
void ChatPage::updateChatFlags()
|
||||
{
|
||||
uint chatflags = 0;
|
||||
|
@ -423,6 +464,15 @@ ChatPage::load()
|
|||
ui._collected_contacts_LW->insertItem(0,item) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mChatLobbyUserNotify){
|
||||
whileBlocking(ui.chatLobbies_CountUnRead)->setChecked(mChatLobbyUserNotify->isCountUnRead());
|
||||
whileBlocking(ui.chatLobbies_CheckNickName)->setChecked(mChatLobbyUserNotify->isCheckForNickName());
|
||||
whileBlocking(ui.chatLobbies_CountFollowingText)->setChecked(mChatLobbyUserNotify->isCountSpecificText()) ;
|
||||
whileBlocking(ui.chatLobbies_TextToNotify)->setEnabled(mChatLobbyUserNotify->isCountSpecificText()) ;
|
||||
whileBlocking(ui.chatLobbies_TextToNotify)->setPlainText(mChatLobbyUserNotify->textToNotify());
|
||||
whileBlocking(ui.chatLobbies_TextCaseSensitive)->setChecked(mChatLobbyUserNotify->isTextCaseSensitive());
|
||||
}
|
||||
}
|
||||
|
||||
void ChatPage::on_pushButtonChangeChatFont_clicked()
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "retroshare-gui/configpage.h"
|
||||
#include "gui/chat/ChatStyle.h"
|
||||
#include "gui/chat/ChatLobbyUserNotify.h"
|
||||
#include "ui_ChatPage.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
|
@ -44,6 +45,7 @@ class ChatPage : public ConfigPage
|
|||
virtual QString helpText() const { return ""; }
|
||||
|
||||
private slots:
|
||||
void updateChatLobbyUserNotify();
|
||||
void on_historyComboBoxVariant_currentIndexChanged(int index);
|
||||
void on_privateComboBoxVariant_currentIndexChanged(int index);
|
||||
void on_publicComboBoxVariant_currentIndexChanged(int index);
|
||||
|
@ -87,6 +89,8 @@ class ChatPage : public ConfigPage
|
|||
|
||||
/** Qt Designer generated object */
|
||||
Ui::ChatPage ui;
|
||||
|
||||
ChatLobbyUserNotify* mChatLobbyUserNotify;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -46,7 +46,6 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster()));
|
||||
connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool)));
|
||||
connect(NotifyQt::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool)));
|
||||
connect(ui.chatLobbies_CountFollowingText,SIGNAL(toggled(bool)),ui.chatLobbies_TextToNotify,SLOT(setEnabled(bool)));
|
||||
|
||||
ui.notify_Blogs->hide();
|
||||
|
||||
|
@ -116,41 +115,37 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
|
||||
}
|
||||
|
||||
/* Add user notify */
|
||||
const QList<UserNotify*> &userNotifyList = MainWindow::getInstance()->getUserNotifyList() ;
|
||||
QList<UserNotify*>::const_iterator it;
|
||||
rowFeed = 0;
|
||||
mChatLobbyUserNotify = 0;
|
||||
for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it) {
|
||||
UserNotify *userNotify = *it;
|
||||
/* Add user notify */
|
||||
const QList<UserNotify*> &userNotifyList = MainWindow::getInstance()->getUserNotifyList() ;
|
||||
QList<UserNotify*>::const_iterator it;
|
||||
rowFeed = 0;
|
||||
for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it) {
|
||||
UserNotify *userNotify = *it;
|
||||
|
||||
QString name;
|
||||
if (!userNotify->hasSetting(&name, NULL)) {
|
||||
continue;
|
||||
}
|
||||
QString name;
|
||||
if (!userNotify->hasSetting(&name, NULL)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QCheckBox *enabledCheckBox = new QCheckBox(name, this);
|
||||
enabledCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(enabledCheckBox, rowFeed, 0, 0);
|
||||
connect(enabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(notifyToggled()));
|
||||
QCheckBox *enabledCheckBox = new QCheckBox(name, this);
|
||||
enabledCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(enabledCheckBox, rowFeed, 0, 0);
|
||||
connect(enabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(notifyToggled()));
|
||||
|
||||
QCheckBox *combinedCheckBox = new QCheckBox(tr("Combined"), this);
|
||||
combinedCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(combinedCheckBox, rowFeed, 1);
|
||||
QCheckBox *combinedCheckBox = new QCheckBox(tr("Combined"), this);
|
||||
combinedCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(combinedCheckBox, rowFeed, 1);
|
||||
|
||||
QCheckBox *blinkCheckBox = new QCheckBox(tr("Blink"), this);
|
||||
blinkCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(blinkCheckBox, rowFeed++, 2);
|
||||
QCheckBox *blinkCheckBox = new QCheckBox(tr("Blink"), this);
|
||||
blinkCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(blinkCheckBox, rowFeed++, 2);
|
||||
|
||||
mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox, blinkCheckBox));
|
||||
mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox, blinkCheckBox));
|
||||
|
||||
connect(enabledCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
|
||||
connect(blinkCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
|
||||
connect(combinedCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
|
||||
|
||||
//To get ChatLobbyUserNotify Settings
|
||||
if (!mChatLobbyUserNotify) mChatLobbyUserNotify = dynamic_cast<ChatLobbyUserNotify*>(*it);
|
||||
}
|
||||
connect(enabledCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
|
||||
connect(blinkCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
|
||||
connect(combinedCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
|
||||
}
|
||||
|
||||
connect(ui.popup_Connect, SIGNAL(toggled(bool)), this, SLOT(updateNotifyFlags())) ;
|
||||
connect(ui.popup_NewMsg, SIGNAL(toggled(bool)), this, SLOT(updateNotifyFlags())) ;
|
||||
|
@ -179,12 +174,6 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.spinBoxToasterYMargin, SIGNAL(valueChanged(int)), this, SLOT(updateToasterMargin()));
|
||||
|
||||
connect(ui.comboBoxToasterPosition, SIGNAL(currentIndexChanged(int)),this, SLOT(updateToasterPosition())) ;
|
||||
|
||||
connect(ui.chatLobbies_CountUnRead, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
connect(ui.chatLobbies_CheckNickName, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
connect(ui.chatLobbies_CountFollowingText, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
connect(ui.chatLobbies_TextToNotify, SIGNAL(textChanged(QString)),this, SLOT(updateChatLobbyUserNotify()));
|
||||
connect(ui.chatLobbies_TextCaseSensitive, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
|
||||
}
|
||||
|
||||
NotifyPage::~NotifyPage()
|
||||
|
@ -299,18 +288,6 @@ void NotifyPage::updateToasterPosition()
|
|||
Settings->setToasterPosition((RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(index).toInt());
|
||||
}
|
||||
|
||||
void NotifyPage::updateChatLobbyUserNotify()
|
||||
{
|
||||
if(!mChatLobbyUserNotify)
|
||||
return ;
|
||||
|
||||
mChatLobbyUserNotify->setCountUnRead(ui.chatLobbies_CountUnRead->isChecked()) ;
|
||||
mChatLobbyUserNotify->setCheckForNickName(ui.chatLobbies_CheckNickName->isChecked()) ;
|
||||
mChatLobbyUserNotify->setCountSpecificText(ui.chatLobbies_CountFollowingText->isChecked()) ;
|
||||
mChatLobbyUserNotify->setTextToNotify(ui.chatLobbies_TextToNotify->document()->toPlainText());
|
||||
mChatLobbyUserNotify->setTextCaseSensitive(ui.chatLobbies_TextCaseSensitive->isChecked());
|
||||
}
|
||||
|
||||
/** Loads the settings for this page */
|
||||
void NotifyPage::load()
|
||||
{
|
||||
|
@ -399,14 +376,6 @@ void NotifyPage::load()
|
|||
|
||||
notifyToggled() ;
|
||||
|
||||
if (mChatLobbyUserNotify){
|
||||
whileBlocking(ui.chatLobbies_CountUnRead)->setChecked(mChatLobbyUserNotify->isCountUnRead());
|
||||
whileBlocking(ui.chatLobbies_CheckNickName)->setChecked(mChatLobbyUserNotify->isCheckForNickName());
|
||||
whileBlocking(ui.chatLobbies_CountFollowingText)->setChecked(mChatLobbyUserNotify->isCountSpecificText()) ;
|
||||
whileBlocking(ui.chatLobbies_TextToNotify)->setEnabled(mChatLobbyUserNotify->isCountSpecificText()) ;
|
||||
whileBlocking(ui.chatLobbies_TextToNotify)->setPlainText(mChatLobbyUserNotify->textToNotify());
|
||||
whileBlocking(ui.chatLobbies_TextCaseSensitive)->setChecked(mChatLobbyUserNotify->isTextCaseSensitive());
|
||||
}
|
||||
}
|
||||
|
||||
void NotifyPage::notifyToggled()
|
||||
|
|
|
@ -100,12 +100,10 @@ private slots:
|
|||
void updateToasterMargin();
|
||||
|
||||
void updateToasterPosition();
|
||||
void updateChatLobbyUserNotify();
|
||||
|
||||
private:
|
||||
uint getNewsFlags();
|
||||
uint getNotifyFlags();
|
||||
ChatLobbyUserNotify* mChatLobbyUserNotify;
|
||||
|
||||
QList<FeedNotifySetting> mFeedNotifySettingList;
|
||||
QList<ToasterNotifySetting> mToasterNotifySettingList;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabFeed">
|
||||
<attribute name="title">
|
||||
|
@ -443,60 +443,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabChatLobbies">
|
||||
<attribute name="title">
|
||||
<string>Chat Rooms</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="tabChatLobbiesVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobbies_CountUnRead">
|
||||
<property name="text">
|
||||
<string>Count all unread messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobbies_CheckNickName">
|
||||
<property name="text">
|
||||
<string>Count occurrences of my current identity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobbies_CountFollowingText">
|
||||
<property name="text">
|
||||
<string>Count occurrences of any of the following texts (separate by newlines):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="chatLobbies_TextToNotify"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobbies_TextCaseSensitive">
|
||||
<property name="toolTip">
|
||||
<string>Checked, if the identity and the text above occurrences must be in the same case to trigger count.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Case sensitive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="tabChatLobbiesVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -527,10 +473,6 @@
|
|||
<tabstop>spinBoxToasterYMargin</tabstop>
|
||||
<tabstop>systray_GroupChat</tabstop>
|
||||
<tabstop>systray_ChatLobby</tabstop>
|
||||
<tabstop>chatLobbies_CountUnRead</tabstop>
|
||||
<tabstop>chatLobbies_CheckNickName</tabstop>
|
||||
<tabstop>chatLobbies_CountFollowingText</tabstop>
|
||||
<tabstop>chatLobbies_TextToNotify</tabstop>
|
||||
<tabstop>pushButtonDisableAll</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue