mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 12:24:22 -05:00
- Added blocking of embedded images (+ settings) to forums and messages
- Added image support for forum messages - Renamed LinkTextBrowser to RSTextBrowser - Updated english translation git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6752 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8ffc0e05de
commit
6b1613d8bb
@ -265,7 +265,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="LinkTextBrowser" name="msgText">
|
<widget class="RSTextBrowser" name="msgText">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -287,9 +287,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LinkTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
<header>gui/common/LinkTextBrowser.h</header>
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LineEditClear</class>
|
<class>LineEditClear</class>
|
||||||
|
@ -352,59 +352,59 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="521"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="524"/>
|
||||||
<source>No name</source>
|
<source>No name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="733"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="736"/>
|
||||||
<source>Add new folder</source>
|
<source>Add new folder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="734"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="737"/>
|
||||||
<source>Please enter a name for the folder</source>
|
<source>Please enter a name for the folder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="740"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="743"/>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="793"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="796"/>
|
||||||
<source>Create folder</source>
|
<source>Create folder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="740"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="743"/>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="793"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="796"/>
|
||||||
<source>Cannot create folder.</source>
|
<source>Cannot create folder.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="766"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="769"/>
|
||||||
<source>Remove folder</source>
|
<source>Remove folder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="766"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="769"/>
|
||||||
<source>Remove feed</source>
|
<source>Remove feed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="766"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="769"/>
|
||||||
<source>Do you want to remove the folder %1?</source>
|
<source>Do you want to remove the folder %1?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="766"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="769"/>
|
||||||
<source>Do you want to remove the feed %1?</source>
|
<source>Do you want to remove the feed %1?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="786"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="789"/>
|
||||||
<source>Edit folder</source>
|
<source>Edit folder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderDialog.cpp" line="787"/>
|
<location filename="../gui/FeedReaderDialog.cpp" line="790"/>
|
||||||
<source>Please enter a new name for the folder</source>
|
<source>Please enter a new name for the folder</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -139,6 +139,8 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
|||||||
|
|
||||||
connect(NotifyQt::getInstance(), SIGNAL(forumMsgReadSatusChanged(QString,QString,int)), this, SLOT(forumMsgReadSatusChanged(QString,QString,int)));
|
connect(NotifyQt::getInstance(), SIGNAL(forumMsgReadSatusChanged(QString,QString,int)), this, SLOT(forumMsgReadSatusChanged(QString,QString,int)));
|
||||||
|
|
||||||
|
ui.postText->setImageBlockWidget(ui.imageBlockWidget);
|
||||||
|
|
||||||
/* Set initial size the splitter */
|
/* Set initial size the splitter */
|
||||||
QList<int> sizes;
|
QList<int> sizes;
|
||||||
sizes << 300 << width(); // Qt calculates the right sizes
|
sizes << 300 << width(); // Qt calculates the right sizes
|
||||||
@ -888,6 +890,7 @@ void ForumsDialog::insertThreads()
|
|||||||
ui.newthreadButton->setEnabled (false);
|
ui.newthreadButton->setEnabled (false);
|
||||||
|
|
||||||
ui.postText->clear();
|
ui.postText->clear();
|
||||||
|
ui.postText->resetImagesStatus(false);
|
||||||
ui.threadTitle->clear();
|
ui.threadTitle->clear();
|
||||||
|
|
||||||
if (mCurrForumId.empty())
|
if (mCurrForumId.empty())
|
||||||
@ -1133,6 +1136,7 @@ void ForumsDialog::insertPost()
|
|||||||
if (mCurrForumId.empty())
|
if (mCurrForumId.empty())
|
||||||
{
|
{
|
||||||
ui.postText->setText("");
|
ui.postText->setText("");
|
||||||
|
ui.postText->resetImagesStatus(false);
|
||||||
ui.threadTitle->setText("");
|
ui.threadTitle->setText("");
|
||||||
ui.previousButton->setEnabled(false);
|
ui.previousButton->setEnabled(false);
|
||||||
ui.nextButton->setEnabled(false);
|
ui.nextButton->setEnabled(false);
|
||||||
@ -1149,10 +1153,12 @@ void ForumsDialog::insertPost()
|
|||||||
ForumInfo fi;
|
ForumInfo fi;
|
||||||
if (!rsForums->getForumInfo(mCurrForumId, fi)) {
|
if (!rsForums->getForumInfo(mCurrForumId, fi)) {
|
||||||
ui.postText->setText("");
|
ui.postText->setText("");
|
||||||
|
ui.postText->resetImagesStatus(false);
|
||||||
ui.threadTitle->setText("");
|
ui.threadTitle->setText("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ui.threadTitle->setText(tr("Forum Description"));
|
ui.threadTitle->setText(tr("Forum Description"));
|
||||||
|
ui.postText->resetImagesStatus(false);
|
||||||
ui.postText->setText(QString::fromStdWString(fi.forumDesc));
|
ui.postText->setText(QString::fromStdWString(fi.forumDesc));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1177,6 +1183,7 @@ void ForumsDialog::insertPost()
|
|||||||
ForumMsgInfo msg;
|
ForumMsgInfo msg;
|
||||||
if (!rsForums->getForumMessage(mCurrForumId, mCurrThreadId, msg))
|
if (!rsForums->getForumMessage(mCurrForumId, mCurrThreadId, msg))
|
||||||
{
|
{
|
||||||
|
ui.postText->resetImagesStatus(false);
|
||||||
ui.postText->setText("");
|
ui.postText->setText("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1203,6 +1210,7 @@ void ForumsDialog::insertPost()
|
|||||||
|
|
||||||
QString extraTxt = RsHtml().formatText(ui.postText->document(), messageFromInfo(msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
|
QString extraTxt = RsHtml().formatText(ui.postText->document(), messageFromInfo(msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
|
||||||
|
|
||||||
|
ui.postText->resetImagesStatus(Settings->getForumLoadEmbeddedImages());
|
||||||
ui.postText->setHtml(extraTxt);
|
ui.postText->setHtml(extraTxt);
|
||||||
ui.threadTitle->setText(titleFromInfo(msg));
|
ui.threadTitle->setText(titleFromInfo(msg));
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,92 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QFrame" name="toolBarFrame">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Box</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="margin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="newthreadButton">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Start new Thread for Selected Forum</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="images.qrc">
|
||||||
|
<normaloff>:/images/mail_new.png</normaloff>:/images/mail_new.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="newmessageButton">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Reply Message</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="images.qrc">
|
||||||
|
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<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>
|
||||||
|
<item>
|
||||||
|
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -192,52 +278,38 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QTreeWidget" name="threadTreeWidget">
|
<layout class="QHBoxLayout" name="progressBarLayOut">
|
||||||
<property name="font">
|
<item>
|
||||||
<font>
|
<widget class="QLabel" name="progLayOutTxt">
|
||||||
<pointsize>9</pointsize>
|
<property name="font">
|
||||||
</font>
|
<font>
|
||||||
</property>
|
<weight>75</weight>
|
||||||
<property name="contextMenuPolicy">
|
<bold>true</bold>
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="sortingEnabled">
|
<property name="text">
|
||||||
<bool>true</bool>
|
<string>Loading</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="allColumnsShowFocus">
|
</widget>
|
||||||
<bool>true</bool>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
<column>
|
<widget class="QProgressBar" name="progressBar">
|
||||||
<property name="text">
|
<property name="maximumSize">
|
||||||
<string>Title</string>
|
<size>
|
||||||
</property>
|
<width>16777215</width>
|
||||||
</column>
|
<height>25</height>
|
||||||
<column>
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string/>
|
<property name="maximum">
|
||||||
</property>
|
<number>1000</number>
|
||||||
<property name="icon">
|
</property>
|
||||||
<iconset resource="images.qrc">
|
<property name="value">
|
||||||
<normaloff>:/images/message-state-header.png</normaloff>:/images/message-state-header.png</iconset>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</widget>
|
||||||
<column>
|
</item>
|
||||||
<property name="text">
|
</layout>
|
||||||
<string>Date</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Signed</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="5" column="0">
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
@ -415,140 +487,87 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QFrame" name="toolBarFrame">
|
<widget class="QTreeWidget" name="threadTreeWidget">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="allColumnsShowFocus">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Title</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="images.qrc">
|
||||||
|
<normaloff>:/images/message-state-header.png</normaloff>:/images/message-state-header.png</iconset>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Date</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Author</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Signed</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
|
<layout class="QVBoxLayout" name="postLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::Box</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="newthreadButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Start new Thread for Selected Forum</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="images.qrc">
|
|
||||||
<normaloff>:/images/mail_new.png</normaloff>:/images/mail_new.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="newmessageButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Reply Message</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="images.qrc">
|
|
||||||
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<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>
|
|
||||||
<item>
|
|
||||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item>
|
||||||
<layout class="QHBoxLayout" name="progressBarLayOut">
|
<widget class="RSTextBrowser" name="postText">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<widget class="QLabel" name="progLayOutTxt">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<property name="font">
|
<horstretch>0</horstretch>
|
||||||
<font>
|
<verstretch>10</verstretch>
|
||||||
<weight>75</weight>
|
</sizepolicy>
|
||||||
<bold>true</bold>
|
</property>
|
||||||
</font>
|
<property name="font">
|
||||||
</property>
|
<font>
|
||||||
<property name="text">
|
<pointsize>9</pointsize>
|
||||||
<string>Loading</string>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="progressBar">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="LinkTextBrowser" name="postText">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>10</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>9</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -567,6 +586,17 @@
|
|||||||
<zorder>titleBarFrame</zorder>
|
<zorder>titleBarFrame</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSTextBrowser</class>
|
||||||
|
<extends>QTextBrowser</extends>
|
||||||
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSImageBlockWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/common/RSImageBlockWidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GroupTreeWidget</class>
|
<class>GroupTreeWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
@ -578,11 +608,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">gui/common/LineEditClear.h</header>
|
<header location="global">gui/common/LineEditClear.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>LinkTextBrowser</class>
|
|
||||||
<extends>QTextBrowser</extends>
|
|
||||||
<header>gui/common/LinkTextBrowser.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="images.qrc"/>
|
<include location="images.qrc"/>
|
||||||
|
@ -656,7 +656,7 @@
|
|||||||
<property name="childrenCollapsible">
|
<property name="childrenCollapsible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="LinkTextBrowser" name="msgText">
|
<widget class="RSTextBrowser" name="msgText">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -837,9 +837,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LinkTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
<header>gui/common/LinkTextBrowser.h</header>
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>AvatarWidget</class>
|
<class>AvatarWidget</class>
|
||||||
|
@ -212,7 +212,7 @@ border-image: url(:/images/closepressed.png)
|
|||||||
<property name="childrenCollapsible">
|
<property name="childrenCollapsible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="LinkTextBrowser" name="textBrowser">
|
<widget class="RSTextBrowser" name="textBrowser">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -707,9 +707,9 @@ border-image: url(:/images/closepressed.png)
|
|||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LinkTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
<header>gui/common/LinkTextBrowser.h</header>
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>HashBox</class>
|
<class>HashBox</class>
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
#include <QDesktopServices>
|
|
||||||
#include <QPainter>
|
|
||||||
|
|
||||||
#include "LinkTextBrowser.h"
|
|
||||||
|
|
||||||
LinkTextBrowser::LinkTextBrowser(QWidget *parent) :
|
|
||||||
QTextBrowser(parent)
|
|
||||||
{
|
|
||||||
setOpenExternalLinks(true);
|
|
||||||
setOpenLinks(false);
|
|
||||||
|
|
||||||
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void LinkTextBrowser::linkClicked(const QUrl &url)
|
|
||||||
{
|
|
||||||
// some links are opened directly in the QTextBrowser with open external links set to true,
|
|
||||||
// so we handle links by our own
|
|
||||||
|
|
||||||
#ifdef TO_DO
|
|
||||||
// If we want extra file links to be anonymous, we need to insert the actual source here.
|
|
||||||
if(url.host() == HOST_EXTRAFILE)
|
|
||||||
{
|
|
||||||
std::cerr << "Extra file link detected. Adding parent id " << _target_sslid << " to sourcelist" << std::endl;
|
|
||||||
|
|
||||||
RetroShareLink link ;
|
|
||||||
link.fromUrl(url) ;
|
|
||||||
|
|
||||||
link.createExtraFile( link.name(),link.size(),link.hash(), _target_ssl_id) ;
|
|
||||||
|
|
||||||
QDesktopServices::openUrl(link.toUrl());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
QDesktopServices::openUrl(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LinkTextBrowser::setPlaceholderText(const QString &text)
|
|
||||||
{
|
|
||||||
placeholderText = text;
|
|
||||||
viewport()->repaint();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LinkTextBrowser::paintEvent(QPaintEvent *event)
|
|
||||||
{
|
|
||||||
QTextBrowser::paintEvent(event);
|
|
||||||
|
|
||||||
if (placeholderText.isEmpty() == false && document()->isEmpty()) {
|
|
||||||
QWidget *vieportWidget = viewport();
|
|
||||||
QPainter painter(vieportWidget);
|
|
||||||
|
|
||||||
QPen pen = painter.pen();
|
|
||||||
QColor color = pen.color();
|
|
||||||
color.setAlpha(128);
|
|
||||||
pen.setColor(color);
|
|
||||||
painter.setPen(pen);
|
|
||||||
|
|
||||||
painter.drawText(QRect(QPoint(), vieportWidget->size()), Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextWordWrap, placeholderText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
#ifndef LINKTEXTBROWSER_H
|
|
||||||
#define LINKTEXTBROWSER_H
|
|
||||||
|
|
||||||
#include <QTextBrowser>
|
|
||||||
|
|
||||||
class LinkTextBrowser : public QTextBrowser
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit LinkTextBrowser(QWidget *parent = 0);
|
|
||||||
|
|
||||||
void setPlaceholderText(const QString &text);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void linkClicked(const QUrl &url);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *event);
|
|
||||||
|
|
||||||
QString placeholderText;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // LINKTEXTBROWSER_H
|
|
16
retroshare-gui/src/gui/common/RSImageBlockWidget.cpp
Normal file
16
retroshare-gui/src/gui/common/RSImageBlockWidget.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include "RSImageBlockWidget.h"
|
||||||
|
#include "ui_RSImageBlockWidget.h"
|
||||||
|
|
||||||
|
RSImageBlockWidget::RSImageBlockWidget(QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
ui(new Ui::RSImageBlockWidget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
connect(ui->loadImagesButton, SIGNAL(clicked()), this, SIGNAL(showImages()));
|
||||||
|
}
|
||||||
|
|
||||||
|
RSImageBlockWidget::~RSImageBlockWidget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
25
retroshare-gui/src/gui/common/RSImageBlockWidget.h
Normal file
25
retroshare-gui/src/gui/common/RSImageBlockWidget.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef RSIMAGEBLOCKWIDGET_H
|
||||||
|
#define RSIMAGEBLOCKWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class RSImageBlockWidget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class RSImageBlockWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RSImageBlockWidget(QWidget *parent = 0);
|
||||||
|
~RSImageBlockWidget();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void showImages();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::RSImageBlockWidget *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // RSIMAGEBLOCKWIDGET_H
|
133
retroshare-gui/src/gui/common/RSImageBlockWidget.ui
Normal file
133
retroshare-gui/src/gui/common/RSImageBlockWidget.ui
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RSImageBlockWidget</class>
|
||||||
|
<widget class="QWidget" name="RSImageBlockWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>476</width>
|
||||||
|
<height>37</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="infoFrame">
|
||||||
|
<property name="palette">
|
||||||
|
<palette>
|
||||||
|
<active>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>178</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</active>
|
||||||
|
<inactive>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>178</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</inactive>
|
||||||
|
<disabled>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>178</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>178</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</disabled>
|
||||||
|
</palette>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Box</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="margin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="infoLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>The loading of embedded images is blocked.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>162</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="loadImagesButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Load images</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
126
retroshare-gui/src/gui/common/RSTextBrowser.cpp
Normal file
126
retroshare-gui/src/gui/common/RSTextBrowser.cpp
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
#include "RSTextBrowser.h"
|
||||||
|
#include "RSImageBlockWidget.h"
|
||||||
|
|
||||||
|
RSTextBrowser::RSTextBrowser(QWidget *parent) :
|
||||||
|
QTextBrowser(parent)
|
||||||
|
{
|
||||||
|
setOpenExternalLinks(true);
|
||||||
|
setOpenLinks(false);
|
||||||
|
|
||||||
|
mShowImages = true;
|
||||||
|
mImageBlockWidget = NULL;
|
||||||
|
|
||||||
|
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::linkClicked(const QUrl &url)
|
||||||
|
{
|
||||||
|
// some links are opened directly in the QTextBrowser with open external links set to true,
|
||||||
|
// so we handle links by our own
|
||||||
|
|
||||||
|
#ifdef TO_DO
|
||||||
|
// If we want extra file links to be anonymous, we need to insert the actual source here.
|
||||||
|
if(url.host() == HOST_EXTRAFILE)
|
||||||
|
{
|
||||||
|
std::cerr << "Extra file link detected. Adding parent id " << _target_sslid << " to sourcelist" << std::endl;
|
||||||
|
|
||||||
|
RetroShareLink link ;
|
||||||
|
link.fromUrl(url) ;
|
||||||
|
|
||||||
|
link.createExtraFile( link.name(),link.size(),link.hash(), _target_ssl_id) ;
|
||||||
|
|
||||||
|
QDesktopServices::openUrl(link.toUrl());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
QDesktopServices::openUrl(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::setPlaceholderText(const QString &text)
|
||||||
|
{
|
||||||
|
mPlaceholderText = text;
|
||||||
|
viewport()->repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
QTextBrowser::paintEvent(event);
|
||||||
|
|
||||||
|
if (mPlaceholderText.isEmpty() == false && document()->isEmpty()) {
|
||||||
|
QWidget *vieportWidget = viewport();
|
||||||
|
QPainter painter(vieportWidget);
|
||||||
|
|
||||||
|
QPen pen = painter.pen();
|
||||||
|
QColor color = pen.color();
|
||||||
|
color.setAlpha(128);
|
||||||
|
pen.setColor(color);
|
||||||
|
painter.setPen(pen);
|
||||||
|
|
||||||
|
painter.drawText(QRect(QPoint(), vieportWidget->size()), Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextWordWrap, mPlaceholderText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant RSTextBrowser::loadResource(int type, const QUrl &name)
|
||||||
|
{
|
||||||
|
if (mShowImages || type != QTextDocument::ImageResource || name.scheme().compare("data", Qt::CaseInsensitive) != 0) {
|
||||||
|
return QTextBrowser::loadResource(type, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mImageBlockWidget) {
|
||||||
|
mImageBlockWidget->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
return QPixmap(":/trolltech/styles/commonstyle/images/file-16.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::setImageBlockWidget(RSImageBlockWidget *widget)
|
||||||
|
{
|
||||||
|
if (mImageBlockWidget) {
|
||||||
|
// disconnect
|
||||||
|
disconnect(mImageBlockWidget, SIGNAL(destroyed()), this, SLOT(destroyImageBlockWidget()));
|
||||||
|
disconnect(mImageBlockWidget, SIGNAL(showImages()), this, SLOT(showImages()));
|
||||||
|
}
|
||||||
|
|
||||||
|
mImageBlockWidget = widget;
|
||||||
|
|
||||||
|
if (mImageBlockWidget) {
|
||||||
|
// connect
|
||||||
|
connect(mImageBlockWidget, SIGNAL(destroyed()), this, SLOT(destroyImageBlockWidget()));
|
||||||
|
connect(mImageBlockWidget, SIGNAL(showImages()), this, SLOT(showImages()));
|
||||||
|
}
|
||||||
|
|
||||||
|
resetImagesStatus(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::destroyImageBlockWidget()
|
||||||
|
{
|
||||||
|
mImageBlockWidget = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::showImages()
|
||||||
|
{
|
||||||
|
if (mImageBlockWidget && sender() == mImageBlockWidget) {
|
||||||
|
mImageBlockWidget->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mShowImages) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mShowImages = true;
|
||||||
|
|
||||||
|
QString html = toHtml();
|
||||||
|
clear();
|
||||||
|
setHtml(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RSTextBrowser::resetImagesStatus(bool load)
|
||||||
|
{
|
||||||
|
if (mImageBlockWidget) {
|
||||||
|
mImageBlockWidget->hide();
|
||||||
|
}
|
||||||
|
mShowImages = load;
|
||||||
|
}
|
36
retroshare-gui/src/gui/common/RSTextBrowser.h
Normal file
36
retroshare-gui/src/gui/common/RSTextBrowser.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef RSTEXTBROWSER_H
|
||||||
|
#define RSTEXTBROWSER_H
|
||||||
|
|
||||||
|
#include <QTextBrowser>
|
||||||
|
|
||||||
|
class RSImageBlockWidget;
|
||||||
|
|
||||||
|
class RSTextBrowser : public QTextBrowser
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RSTextBrowser(QWidget *parent = 0);
|
||||||
|
|
||||||
|
void setPlaceholderText(const QString &text);
|
||||||
|
void setImageBlockWidget(RSImageBlockWidget *widget);
|
||||||
|
void resetImagesStatus(bool load);
|
||||||
|
|
||||||
|
virtual QVariant loadResource(int type, const QUrl &name);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void showImages();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void linkClicked(const QUrl &url);
|
||||||
|
void destroyImageBlockWidget();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
|
QString mPlaceholderText;
|
||||||
|
bool mShowImages;
|
||||||
|
RSImageBlockWidget *mImageBlockWidget;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // RSTEXTBROWSER_H
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "UIStateHelper.h"
|
#include "UIStateHelper.h"
|
||||||
#include "RSTreeWidget.h"
|
#include "RSTreeWidget.h"
|
||||||
#include "LinkTextBrowser.h"
|
#include "RSTextBrowser.h"
|
||||||
|
|
||||||
class UIStateHelperObject
|
class UIStateHelperObject
|
||||||
{
|
{
|
||||||
@ -45,10 +45,10 @@ public:
|
|||||||
init();
|
init();
|
||||||
mTreeWidget = widget;
|
mTreeWidget = widget;
|
||||||
}
|
}
|
||||||
UIStateHelperObject(LinkTextBrowser *widget)
|
UIStateHelperObject(RSTextBrowser *widget)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
mLinkTextBrowser = widget;
|
mRSTextBrowser = widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setPlaceholder(bool loading, const QString &text, bool clear) const
|
void setPlaceholder(bool loading, const QString &text, bool clear) const
|
||||||
@ -77,12 +77,12 @@ public:
|
|||||||
mTreeWidget->setPlaceholderText(text);
|
mTreeWidget->setPlaceholderText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLinkTextBrowser) {
|
if (mRSTextBrowser) {
|
||||||
if (loading && clear) {
|
if (loading && clear) {
|
||||||
mLinkTextBrowser->clear();
|
mRSTextBrowser->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
mLinkTextBrowser->setPlaceholderText(text);
|
mRSTextBrowser->setPlaceholderText(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,8 +100,8 @@ public:
|
|||||||
mTreeWidget->clear();
|
mTreeWidget->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLinkTextBrowser) {
|
if (mRSTextBrowser) {
|
||||||
mLinkTextBrowser->clear();
|
mRSTextBrowser->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,8 +119,8 @@ public:
|
|||||||
return mTreeWidget;
|
return mTreeWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLinkTextBrowser) {
|
if (mRSTextBrowser) {
|
||||||
return mLinkTextBrowser;
|
return mRSTextBrowser;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -140,7 +140,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLinkTextBrowser == widget) {
|
if (mRSTextBrowser == widget) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ public:
|
|||||||
if (mLabel == data.mLabel &&
|
if (mLabel == data.mLabel &&
|
||||||
mLineEdit == data.mLineEdit &&
|
mLineEdit == data.mLineEdit &&
|
||||||
mTreeWidget == data.mTreeWidget &&
|
mTreeWidget == data.mTreeWidget &&
|
||||||
mLinkTextBrowser == data.mLinkTextBrowser) {
|
mRSTextBrowser == data.mRSTextBrowser) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
if (mLabel < data.mLabel ||
|
if (mLabel < data.mLabel ||
|
||||||
mLineEdit < data.mLineEdit ||
|
mLineEdit < data.mLineEdit ||
|
||||||
mTreeWidget < data.mTreeWidget ||
|
mTreeWidget < data.mTreeWidget ||
|
||||||
mLinkTextBrowser < data.mLinkTextBrowser) {
|
mRSTextBrowser < data.mRSTextBrowser) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,14 +177,14 @@ private:
|
|||||||
mLabel = NULL;
|
mLabel = NULL;
|
||||||
mLineEdit = NULL;
|
mLineEdit = NULL;
|
||||||
mTreeWidget = NULL;
|
mTreeWidget = NULL;
|
||||||
mLinkTextBrowser = NULL;
|
mRSTextBrowser = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel *mLabel;
|
QLabel *mLabel;
|
||||||
QLineEdit *mLineEdit;
|
QLineEdit *mLineEdit;
|
||||||
RSTreeWidget *mTreeWidget;
|
RSTreeWidget *mTreeWidget;
|
||||||
LinkTextBrowser *mLinkTextBrowser;
|
RSTextBrowser *mRSTextBrowser;
|
||||||
};
|
};
|
||||||
|
|
||||||
class UIStateHelperData
|
class UIStateHelperData
|
||||||
@ -258,7 +258,7 @@ void UIStateHelper::addLoadPlaceholder(int index, RSTreeWidget *widget, bool cle
|
|||||||
data->mLoad.insert(UIStateHelperObject(widget), QPair<QString, bool>(text.isEmpty() ? tr("Loading") : text, clear));
|
data->mLoad.insert(UIStateHelperObject(widget), QPair<QString, bool>(text.isEmpty() ? tr("Loading") : text, clear));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIStateHelper::addLoadPlaceholder(int index, LinkTextBrowser *widget, bool clear, const QString &text)
|
void UIStateHelper::addLoadPlaceholder(int index, RSTextBrowser *widget, bool clear, const QString &text)
|
||||||
{
|
{
|
||||||
UIStateHelperData *data = findData(index, true);
|
UIStateHelperData *data = findData(index, true);
|
||||||
data->mLoad.insert(UIStateHelperObject(widget), QPair<QString, bool>(text.isEmpty() ? tr("Loading") : text, clear));
|
data->mLoad.insert(UIStateHelperObject(widget), QPair<QString, bool>(text.isEmpty() ? tr("Loading") : text, clear));
|
||||||
@ -291,7 +291,7 @@ void UIStateHelper::addClear(int index, RSTreeWidget *widget)
|
|||||||
data->mClear.push_back(UIStateHelperObject(widget));
|
data->mClear.push_back(UIStateHelperObject(widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIStateHelper::addClear(int index, LinkTextBrowser *widget)
|
void UIStateHelper::addClear(int index, RSTextBrowser *widget)
|
||||||
{
|
{
|
||||||
UIStateHelperData *data = findData(index, true);
|
UIStateHelperData *data = findData(index, true);
|
||||||
if (data->mClear.contains(widget)) {
|
if (data->mClear.contains(widget)) {
|
||||||
|
@ -30,7 +30,7 @@ class QLabel;
|
|||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class RSTreeWidget;
|
class RSTreeWidget;
|
||||||
class UIStateHelperData;
|
class UIStateHelperData;
|
||||||
class LinkTextBrowser;
|
class RSTextBrowser;
|
||||||
|
|
||||||
enum UIState // State is untouched when bit is not set
|
enum UIState // State is untouched when bit is not set
|
||||||
{
|
{
|
||||||
@ -61,11 +61,11 @@ public:
|
|||||||
void addLoadPlaceholder(int index, QLabel *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
void addLoadPlaceholder(int index, QLabel *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
||||||
void addLoadPlaceholder(int index, QLineEdit *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
void addLoadPlaceholder(int index, QLineEdit *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
||||||
void addLoadPlaceholder(int index, RSTreeWidget *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
void addLoadPlaceholder(int index, RSTreeWidget *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
||||||
void addLoadPlaceholder(int index, LinkTextBrowser *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
void addLoadPlaceholder(int index, RSTextBrowser *widget, bool clear = true, const QString &text = "" /* ="Loading" */);
|
||||||
void addClear(int index, QLabel *widget);
|
void addClear(int index, QLabel *widget);
|
||||||
void addClear(int index, QLineEdit *widget);
|
void addClear(int index, QLineEdit *widget);
|
||||||
void addClear(int index, RSTreeWidget *widget);
|
void addClear(int index, RSTreeWidget *widget);
|
||||||
void addClear(int index, LinkTextBrowser *widget);
|
void addClear(int index, RSTextBrowser *widget);
|
||||||
|
|
||||||
/* Set state */
|
/* Set state */
|
||||||
void setLoading(int index, bool loading);
|
void setLoading(int index, bool loading);
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="LinkTextBrowser" name="rsid">
|
<widget class="RSTextBrowser" name="rsid">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -584,7 +584,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="_11">
|
<layout class="QVBoxLayout" name="_11">
|
||||||
<item>
|
<item>
|
||||||
<widget class="LinkTextBrowser" name="signers"/>
|
<widget class="RSTextBrowser" name="signers"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -917,9 +917,9 @@ Some services (Discovery, anonymous routing) can be switched off globally, which
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LinkTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
<header>gui/common/LinkTextBrowser.h</header>
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QDropEvent>
|
#include <QDropEvent>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
#include <QTextDocumentFragment>
|
||||||
|
|
||||||
#include <retroshare/rsforums.h>
|
#include <retroshare/rsforums.h>
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
@ -66,6 +67,7 @@ CreateForumMsg::CreateForumMsg(const std::string &fId, const std::string &pId)
|
|||||||
connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||||
connect( ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
|
connect( ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
|
||||||
connect( ui.attachFileButton, SIGNAL(clicked() ), this , SLOT(addFile()));
|
connect( ui.attachFileButton, SIGNAL(clicked() ), this , SLOT(addFile()));
|
||||||
|
connect(ui.attachPictureButton, SIGNAL(clicked()), this, SLOT(addPicture()));
|
||||||
connect( ui.pastersButton, SIGNAL(clicked() ), this , SLOT(pasteLink()));
|
connect( ui.pastersButton, SIGNAL(clicked() ), this , SLOT(pasteLink()));
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
@ -213,6 +215,19 @@ void CreateForumMsg::addFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateForumMsg::addPicture()
|
||||||
|
{
|
||||||
|
// select a picture file
|
||||||
|
QString file;
|
||||||
|
if (misc::getOpenFileName(window(), RshareSettings::LASTDIR_IMAGES, tr("Load Picture File"), "Pictures (*.png *.xpm *.jpg)", file)) {
|
||||||
|
QString encodedImage;
|
||||||
|
if (RsHtml::makeEmbeddedImage(file, encodedImage, 640*480)) {
|
||||||
|
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(encodedImage);
|
||||||
|
ui.forumMessage->textCursor().insertFragment(fragment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CreateForumMsg::fileHashingFinished(QList<HashedFile> hashedFiles)
|
void CreateForumMsg::fileHashingFinished(QList<HashedFile> hashedFiles)
|
||||||
{
|
{
|
||||||
std::cerr << "CreateForumMsg::fileHashingFinished() started." << std::endl;
|
std::cerr << "CreateForumMsg::fileHashingFinished() started." << std::endl;
|
||||||
|
@ -48,6 +48,7 @@ private slots:
|
|||||||
void smileyWidgetForums();
|
void smileyWidgetForums();
|
||||||
void addSmileys();
|
void addSmileys();
|
||||||
void addFile();
|
void addFile();
|
||||||
|
void addPicture();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent (QCloseEvent * event);
|
void closeEvent (QCloseEvent * event);
|
||||||
|
@ -101,9 +101,6 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Attach File</string>
|
<string>Attach File</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||||
@ -120,12 +117,32 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="emoticonButton">
|
<widget class="QToolButton" name="attachPictureButton">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="toolTip">
|
||||||
<string/>
|
<string>Attach a Picture</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="emoticonButton">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
@ -186,9 +203,6 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Paste RetroShare Link</string>
|
<string>Paste RetroShare Link</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
<normaloff>:/images/pasterslink.png</normaloff>:/images/pasterslink.png</iconset>
|
<normaloff>:/images/pasterslink.png</normaloff>:/images/pasterslink.png</iconset>
|
||||||
@ -208,7 +222,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTextEdit" name="forumMessage">
|
<widget class="MimeTextEdit" name="forumMessage">
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -217,7 +231,7 @@
|
|||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -262,18 +276,23 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>HeaderFrame</class>
|
|
||||||
<extends>QFrame</extends>
|
|
||||||
<header>gui/common/HeaderFrame.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>HashBox</class>
|
<class>HashBox</class>
|
||||||
<extends>QScrollArea</extends>
|
<extends>QScrollArea</extends>
|
||||||
<header location="global">gui/common/HashBox.h</header>
|
<header location="global">gui/common/HashBox.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>MimeTextEdit</class>
|
||||||
|
<extends>QTextEdit</extends>
|
||||||
|
<header location="global">gui/common/MimeTextEdit.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>HeaderFrame</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>gui/common/HeaderFrame.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
@ -490,7 +490,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="LinkTextBrowser" name="postText">
|
<widget class="RSTextBrowser" name="postText">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -509,9 +509,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LinkTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
<header>gui/common/LinkTextBrowser.h</header>
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LineEditClear</class>
|
<class>LineEditClear</class>
|
||||||
|
@ -135,6 +135,8 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WFlags flags)
|
|||||||
connect(NotifyQt::getInstance(), SIGNAL(messagesTagsChanged()), this, SLOT(messagesTagsChanged()));
|
connect(NotifyQt::getInstance(), SIGNAL(messagesTagsChanged()), this, SLOT(messagesTagsChanged()));
|
||||||
connect(NotifyQt::getInstance(), SIGNAL(messagesChanged()), this, SLOT(messagesChanged()));
|
connect(NotifyQt::getInstance(), SIGNAL(messagesChanged()), this, SLOT(messagesChanged()));
|
||||||
|
|
||||||
|
ui.msgText->setImageBlockWidget(ui.imageBlockWidget);
|
||||||
|
|
||||||
/* hide the Tree +/- */
|
/* hide the Tree +/- */
|
||||||
ui.msgList->setRootIsDecorated( false );
|
ui.msgList->setRootIsDecorated( false );
|
||||||
ui.msgList->setSelectionMode( QAbstractItemView::ExtendedSelection );
|
ui.msgList->setSelectionMode( QAbstractItemView::ExtendedSelection );
|
||||||
@ -452,6 +454,7 @@ void MessageWidget::fill(const std::string &msgId)
|
|||||||
ui.subjectText->setText("");
|
ui.subjectText->setText("");
|
||||||
ui.msgList->clear();
|
ui.msgList->clear();
|
||||||
ui.msgText->clear();
|
ui.msgText->clear();
|
||||||
|
ui.msgText->resetImagesStatus(false);
|
||||||
|
|
||||||
clearTagLabels();
|
clearTagLabels();
|
||||||
|
|
||||||
@ -557,6 +560,7 @@ void MessageWidget::fill(const std::string &msgId)
|
|||||||
ui.subjectText->setText(QString::fromStdWString(msgInfo.title));
|
ui.subjectText->setText(QString::fromStdWString(msgInfo.title));
|
||||||
|
|
||||||
text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromStdWString(msgInfo.msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_REPLACE_LINKS);
|
text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromStdWString(msgInfo.msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_REPLACE_LINKS);
|
||||||
|
ui.msgText->resetImagesStatus(Settings->getMsgLoadEmbeddedImages());
|
||||||
ui.msgText->setHtml(text);
|
ui.msgText->setHtml(text);
|
||||||
|
|
||||||
ui.filesText->setText(QString("(%1 %2)").arg(msgInfo.count).arg(msgInfo.count == 1 ? tr("File") : tr("Files")));
|
ui.filesText->setText(QString("(%1 %2)").arg(msgInfo.count).arg(msgInfo.count == 1 ? tr("File") : tr("Files")));
|
||||||
|
@ -37,119 +37,11 @@
|
|||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item row="1" column="0">
|
<property name="spacing">
|
||||||
<widget class="QTextBrowser" name="msgText">
|
<number>2</number>
|
||||||
<property name="sizePolicy">
|
</property>
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<item>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="openLinks">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="../images.qrc">:/images/attachment.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Recommended Files</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QLabel" name="filesText">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>351</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="downloadButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Download all Recommended Files</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/down.png</normaloff>:/images/down.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="expandFilesButton">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/edit_remove24.png</normaloff>:/images/edit_remove24.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="_4">
|
<layout class="QHBoxLayout" name="_4">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@ -434,6 +326,127 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="RSTextBrowser" name="msgText">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="openLinks">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="_3">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../images.qrc">:/images/attachment.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Recommended Files</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QLabel" name="filesText">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<italic>true</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>351</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="downloadButton">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Download all Recommended Files</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/down.png</normaloff>:/images/down.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="expandFilesButton">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/edit_remove24.png</normaloff>:/images/edit_remove24.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -482,6 +495,19 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSTextBrowser</class>
|
||||||
|
<extends>QTextBrowser</extends>
|
||||||
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSImageBlockWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/common/RSImageBlockWidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -432,3 +432,11 @@ ProfileManager QTextEdit#textEdit
|
|||||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* RSImageBlockWidget */
|
||||||
|
|
||||||
|
RSImageBlockWidget QFrame#infoFrame {
|
||||||
|
border: 1px solid #DCDC41;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #FFFFD7;
|
||||||
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
|
||||||
|
}
|
||||||
|
@ -44,6 +44,7 @@ ForumPage::save(QString &/*errmsg*/)
|
|||||||
Settings->setForumMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
|
Settings->setForumMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
|
||||||
Settings->setForumExpandNewMessages(ui.expandNewMessages->isChecked());
|
Settings->setForumExpandNewMessages(ui.expandNewMessages->isChecked());
|
||||||
Settings->setForumOpenAllInNewTab(ui.openAllInNewTabCheckBox->isChecked());
|
Settings->setForumOpenAllInNewTab(ui.openAllInNewTabCheckBox->isChecked());
|
||||||
|
Settings->setForumLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -55,4 +56,5 @@ ForumPage::load()
|
|||||||
ui.setMsgToReadOnActivate->setChecked(Settings->getForumMsgSetToReadOnActivate());
|
ui.setMsgToReadOnActivate->setChecked(Settings->getForumMsgSetToReadOnActivate());
|
||||||
ui.expandNewMessages->setChecked(Settings->getForumExpandNewMessages());
|
ui.expandNewMessages->setChecked(Settings->getForumExpandNewMessages());
|
||||||
ui.openAllInNewTabCheckBox->setChecked(Settings->getForumOpenAllInNewTab());
|
ui.openAllInNewTabCheckBox->setChecked(Settings->getForumOpenAllInNewTab());
|
||||||
|
ui.loadEmbeddedImages->setChecked(Settings->getForumLoadEmbeddedImages());
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="loadEmbeddedImages">
|
||||||
|
<property name="text">
|
||||||
|
<string>Load embedded images</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -67,6 +67,7 @@ bool
|
|||||||
MessagePage::save(QString &/*errmsg*/)
|
MessagePage::save(QString &/*errmsg*/)
|
||||||
{
|
{
|
||||||
Settings->setMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
|
Settings->setMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
|
||||||
|
Settings->setMsgLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
|
||||||
Settings->setMsgOpen((RshareSettings::enumMsgOpen) ui.openComboBox->itemData(ui.openComboBox->currentIndex()).toInt());
|
Settings->setMsgOpen((RshareSettings::enumMsgOpen) ui.openComboBox->itemData(ui.openComboBox->currentIndex()).toInt());
|
||||||
|
|
||||||
std::map<uint32_t, std::pair<std::string, uint32_t> >::iterator Tag;
|
std::map<uint32_t, std::pair<std::string, uint32_t> >::iterator Tag;
|
||||||
@ -95,6 +96,7 @@ void
|
|||||||
MessagePage::load()
|
MessagePage::load()
|
||||||
{
|
{
|
||||||
ui.setMsgToReadOnActivate->setChecked(Settings->getMsgSetToReadOnActivate());
|
ui.setMsgToReadOnActivate->setChecked(Settings->getMsgSetToReadOnActivate());
|
||||||
|
ui.loadEmbeddedImages->setChecked(Settings->getMsgLoadEmbeddedImages());
|
||||||
ui.openComboBox->setCurrentIndex(ui.openComboBox->findData(Settings->getMsgOpen()));
|
ui.openComboBox->setCurrentIndex(ui.openComboBox->findData(Settings->getMsgOpen()));
|
||||||
|
|
||||||
ui.encryptedMsgs_CB->setChecked(rsMsgs->distantMessagingEnabled()) ;
|
ui.encryptedMsgs_CB->setChecked(rsMsgs->distantMessagingEnabled()) ;
|
||||||
|
@ -30,6 +30,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="loadEmbeddedImages">
|
||||||
|
<property name="text">
|
||||||
|
<string>Load embedded images</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -703,6 +703,16 @@ void RshareSettings::setMsgSetToReadOnActivate (bool value)
|
|||||||
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", value);
|
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RshareSettings::getMsgLoadEmbeddedImages()
|
||||||
|
{
|
||||||
|
return valueFromGroup("MessageDialog", "LoadEmbeddedImages", false).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RshareSettings::setMsgLoadEmbeddedImages(bool value)
|
||||||
|
{
|
||||||
|
setValueToGroup("MessageDialog", "LoadEmbeddedImages", value);
|
||||||
|
}
|
||||||
|
|
||||||
RshareSettings::enumMsgOpen RshareSettings::getMsgOpen()
|
RshareSettings::enumMsgOpen RshareSettings::getMsgOpen()
|
||||||
{
|
{
|
||||||
enumMsgOpen value = (enumMsgOpen) valueFromGroup("MessageDialog", "msgOpen", MSG_OPEN_TAB).toInt();
|
enumMsgOpen value = (enumMsgOpen) valueFromGroup("MessageDialog", "msgOpen", MSG_OPEN_TAB).toInt();
|
||||||
@ -775,3 +785,13 @@ void RshareSettings::setMaxTimeBeforeIdle(uint nValue)
|
|||||||
m_maxTimeBeforeIdle = nValue;
|
m_maxTimeBeforeIdle = nValue;
|
||||||
setValue("maxTimeBeforeIdle", nValue);
|
setValue("maxTimeBeforeIdle", nValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RshareSettings::getForumLoadEmbeddedImages()
|
||||||
|
{
|
||||||
|
return valueFromGroup("ForumDialog", "LoadEmbeddedImages", false).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RshareSettings::setForumLoadEmbeddedImages(bool value)
|
||||||
|
{
|
||||||
|
setValueToGroup("ForumDialog", "LoadEmbeddedImages", value);
|
||||||
|
}
|
||||||
|
@ -238,6 +238,8 @@ public:
|
|||||||
/* Messages */
|
/* Messages */
|
||||||
bool getMsgSetToReadOnActivate();
|
bool getMsgSetToReadOnActivate();
|
||||||
void setMsgSetToReadOnActivate(bool value);
|
void setMsgSetToReadOnActivate(bool value);
|
||||||
|
bool getMsgLoadEmbeddedImages();
|
||||||
|
void setMsgLoadEmbeddedImages(bool value);
|
||||||
|
|
||||||
enumMsgOpen getMsgOpen();
|
enumMsgOpen getMsgOpen();
|
||||||
void setMsgOpen(enumMsgOpen value);
|
void setMsgOpen(enumMsgOpen value);
|
||||||
@ -249,6 +251,8 @@ public:
|
|||||||
void setForumExpandNewMessages(bool value);
|
void setForumExpandNewMessages(bool value);
|
||||||
bool getForumOpenAllInNewTab();
|
bool getForumOpenAllInNewTab();
|
||||||
void setForumOpenAllInNewTab(bool value);
|
void setForumOpenAllInNewTab(bool value);
|
||||||
|
bool getForumLoadEmbeddedImages();
|
||||||
|
void setForumLoadEmbeddedImages(bool value);
|
||||||
|
|
||||||
/* time before idle */
|
/* time before idle */
|
||||||
uint getMaxTimeBeforeIdle();
|
uint getMaxTimeBeforeIdle();
|
||||||
|
@ -1411,6 +1411,30 @@ Double click lobbies to enter and chat.</source>
|
|||||||
<source> <h1><img width="32" src=":/images/64px_help.png">&nbsp;&nbsp;Chat Lobbies</h1> <p>Chat lobbies are distributed chat rooms, and work pretty much like IRC. They allow you to talk anonymously with tons of people without the need to make friends.</p> <p>A chat lobby can be public (your friends see it) or private (your friends can't see it, unless you invite them with <img src=":/images/add_24x24.png" width=12/>). Once you have been invited to a private lobby, you will be able to see it when your friends are using it.</p> <p>The list at left shows chat lobbies your friends are participating in. You can either <ul> <li>Right click to create a new chat lobby</li> <li>Double click a chat lobby to enter, chat, and show it to your friends</li> </ul> Note: For the chat lobbies to work properly, your computer needs be on time. So check your system clock! </p> </source>
|
<source> <h1><img width="32" src=":/images/64px_help.png">&nbsp;&nbsp;Chat Lobbies</h1> <p>Chat lobbies are distributed chat rooms, and work pretty much like IRC. They allow you to talk anonymously with tons of people without the need to make friends.</p> <p>A chat lobby can be public (your friends see it) or private (your friends can't see it, unless you invite them with <img src=":/images/add_24x24.png" width=12/>). Once you have been invited to a private lobby, you will be able to see it when your friends are using it.</p> <p>The list at left shows chat lobbies your friends are participating in. You can either <ul> <li>Right click to create a new chat lobby</li> <li>Double click a chat lobby to enter, chat, and show it to your friends</li> </ul> Note: For the chat lobbies to work properly, your computer needs be on time. So check your system clock! </p> </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Subscribed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show </source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> Column</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Columns</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Yes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>No</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ChatMsgItem</name>
|
<name>ChatMsgItem</name>
|
||||||
@ -3823,6 +3847,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
<source>Add Extra File</source>
|
<source>Add Extra File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Attach a Picture</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Load Picture File</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CreateGroup</name>
|
<name>CreateGroup</name>
|
||||||
@ -5377,6 +5409,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
<source>Forum</source>
|
<source>Forum</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Load embedded images</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ForumUserNotify</name>
|
<name>ForumUserNotify</name>
|
||||||
@ -8918,6 +8954,10 @@ Do you want to save message ?</source>
|
|||||||
<source>Accept encrypted distant messages from everyone</source>
|
<source>Accept encrypted distant messages from everyone</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Load embedded images</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MessageToaster</name>
|
<name>MessageToaster</name>
|
||||||
@ -10703,18 +10743,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PostedGroupDialog</name>
|
<name>PostedGroupDialog</name>
|
||||||
<message>
|
|
||||||
<source>Create New Posted Topic</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Posted Topic</source>
|
<source>Posted Topic</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Edit Posted Topic</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Add Topic Admins</source>
|
<source>Add Topic Admins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -10723,6 +10755,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
<source>Select Topic Admins</source>
|
<source>Select Topic Admins</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Create New Topic</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Edit Topic</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PostedItem</name>
|
<name>PostedItem</name>
|
||||||
@ -10730,10 +10770,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
<source>0</source>
|
<source>0</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>\/</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope</source>
|
<source>This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -10763,11 +10799,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Vote Up</source>
|
<source>I like this</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Vote Down</source>
|
<source>I dislike this</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
@ -11654,6 +11690,21 @@ p, li { white-space: pre-wrap; }
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RSImageBlockWidget</name>
|
||||||
|
<message>
|
||||||
|
<source>Form</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>The loading of embedded images is blocked.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Load images</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RSettingsWin</name>
|
<name>RSettingsWin</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -450,7 +450,8 @@ HEADERS += rshare.h \
|
|||||||
gui/common/HashBox.h \
|
gui/common/HashBox.h \
|
||||||
gui/common/LineEditClear.h \
|
gui/common/LineEditClear.h \
|
||||||
gui/common/DropLineEdit.h \
|
gui/common/DropLineEdit.h \
|
||||||
gui/common/LinkTextBrowser.h \
|
gui/common/RSTextBrowser.h \
|
||||||
|
gui/common/RSImageBlockWidget.h \
|
||||||
gui/common/FeedNotify.h \
|
gui/common/FeedNotify.h \
|
||||||
gui/common/UserNotify.h \
|
gui/common/UserNotify.h \
|
||||||
gui/common/HeaderFrame.h \
|
gui/common/HeaderFrame.h \
|
||||||
@ -593,6 +594,7 @@ FORMS += gui/StartDialog.ui \
|
|||||||
gui/common/FriendList.ui \
|
gui/common/FriendList.ui \
|
||||||
gui/common/FriendSelectionWidget.ui \
|
gui/common/FriendSelectionWidget.ui \
|
||||||
gui/common/HashBox.ui \
|
gui/common/HashBox.ui \
|
||||||
|
gui/common/RSImageBlockWidget.ui \
|
||||||
gui/common/RsCollectionDialog.ui \
|
gui/common/RsCollectionDialog.ui \
|
||||||
gui/common/HeaderFrame.ui \
|
gui/common/HeaderFrame.ui \
|
||||||
gui/style/StyleDialog.ui \
|
gui/style/StyleDialog.ui \
|
||||||
@ -729,7 +731,8 @@ SOURCES += main.cpp \
|
|||||||
gui/common/HashBox.cpp \
|
gui/common/HashBox.cpp \
|
||||||
gui/common/LineEditClear.cpp \
|
gui/common/LineEditClear.cpp \
|
||||||
gui/common/DropLineEdit.cpp \
|
gui/common/DropLineEdit.cpp \
|
||||||
gui/common/LinkTextBrowser.cpp \
|
gui/common/RSTextBrowser.cpp \
|
||||||
|
gui/common/RSImageBlockWidget.cpp \
|
||||||
gui/common/FeedNotify.cpp \
|
gui/common/FeedNotify.cpp \
|
||||||
gui/common/UserNotify.cpp \
|
gui/common/UserNotify.cpp \
|
||||||
gui/common/HeaderFrame.cpp \
|
gui/common/HeaderFrame.cpp \
|
||||||
|
Loading…
Reference in New Issue
Block a user