From 7e19517451ba31c95179da45999a3d161c8f3fd8 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Thu, 27 Dec 2012 15:56:57 +0000 Subject: [PATCH] Activated disabled code in GxsForums before merging. Updated english translation. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6045 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/FeedReader/lang/FeedReader_en.ts | 228 +++++++++--------- retroshare-gui/src/gui/GxsForumsDialog.cpp | 5 +- retroshare-gui/src/gui/GxsForumsDialog.h | 2 +- .../gui/gxsforums/GxsForumThreadWidget.cpp | 39 ++- .../src/gui/qss/stylesheet/qss.default | 2 +- retroshare-gui/src/lang/retroshare_en.ts | 64 +++++ 6 files changed, 202 insertions(+), 138 deletions(-) diff --git a/plugins/FeedReader/lang/FeedReader_en.ts b/plugins/FeedReader/lang/FeedReader_en.ts index 7db5f4eae..117a94055 100644 --- a/plugins/FeedReader/lang/FeedReader_en.ts +++ b/plugins/FeedReader/lang/FeedReader_en.ts @@ -272,196 +272,204 @@ - - Search forums - - - - - - Title - - - - - - Date - - - - - - Author - - - - - Message: - - - - + Message Folders - - Search Title - - - - - Search Date - - - - - Search Author - - - - - Open link in browser - - - - - Copy link to clipboard - - - - + New - + Feed - + Folder - + Edit - + Delete - + Update - + Activate - + Deactivate - - Mark as read - - - - - Mark as unread - - - - - Mark all as read - - - - - Copy link - - - - - Remove - - - - + No name - - Hide - - - - - Expand - - - - + Add new folder - + Please enter a name for the folder - - + + Create folder - - + + Cannot create folder. - + Remove folder - + Remove feed - + Do you want to remove the folder %1? - + Do you want to remove the feed %1? - + Edit folder - + Please enter a new name for the folder + + FeedReaderMessageWidget + + + Form + + + + + Search forums + + + + + + Title + + + + + + Date + + + + + + Author + + + + + Search Title + + + + + Search Date + + + + + Search Author + + + + + Open link in browser + + + + + Copy link to clipboard + + + + + No name + + + + + Mark as read + + + + + Mark as unread + + + + + Mark all as read + + + + + Copy link + + + + + Remove + + + + + Hide + + + + + Expand + + + FeedReaderPlugin diff --git a/retroshare-gui/src/gui/GxsForumsDialog.cpp b/retroshare-gui/src/gui/GxsForumsDialog.cpp index 1b35cadde..be12e48cd 100644 --- a/retroshare-gui/src/gui/GxsForumsDialog.cpp +++ b/retroshare-gui/src/gui/GxsForumsDialog.cpp @@ -79,6 +79,9 @@ GxsForumsDialog::GxsForumsDialog(QWidget *parent) // HACK - TEMPORARY HIJACKING THIS BUTTON FOR REFRESH. connect(ui.refreshButton, SIGNAL(clicked()), this, SLOT(forceUpdateDisplay())); + /* Initialize group tree */ + ui.forumTreeWidget->initDisplayMenu(ui.displayButton); + /* Set initial size the splitter */ QList sizes; sizes << 300 << width(); // Qt calculates the right sizes @@ -107,7 +110,7 @@ GxsForumsDialog::~GxsForumsDialog() delete(mForumQueue); } -//#AFTER MERGE UserNotify *GxsForumsDialog::getUserNotify(QObject *parent) +//UserNotify *GxsForumsDialog::getUserNotify(QObject *parent) //{ // return new GxsForumUserNotify(parent); //} diff --git a/retroshare-gui/src/gui/GxsForumsDialog.h b/retroshare-gui/src/gui/GxsForumsDialog.h index aead3f0f5..72ea8ecdb 100644 --- a/retroshare-gui/src/gui/GxsForumsDialog.h +++ b/retroshare-gui/src/gui/GxsForumsDialog.h @@ -46,7 +46,7 @@ public: GxsForumsDialog(QWidget *parent = 0); ~GxsForumsDialog(); -//#AFTER MERGE virtual UserNotify *getUserNotify(QObject *parent); +// virtual UserNotify *getUserNotify(QObject *parent); bool navigate(const std::string& forumId, const std::string& msgId); diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 95104d008..1c73de909 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -36,6 +36,7 @@ #include "gui/gxs/GxsForumGroupDialog.h" #include "CreateGxsForumMsg.h" #include "gui/msgs/MessageComposer.h" +#include "util/DateTime.h" #include #include @@ -140,22 +141,12 @@ GxsForumThreadWidget::GxsForumThreadWidget(const std::string &forumId, QWidget * QTreeWidgetItem *headerItem = ui->threadTreeWidget->headerItem(); headerItem->setText(COLUMN_THREAD_READ, ""); -//#AFTER MERGE - setTextColorNotSubscribed(Qt::black); - setTextColorUnread(Qt::black); - setTextColorUnreadChildren(Qt::gray); - setTextColorRead(Qt::gray); - setTextColorMissing(Qt::darkRed); - - /* Initialize group tree */ -//#AFTER MERGE ui.forumTreeWidget->initDisplayMenu(ui.displayButton); - /* add filter actions */ -//#AFTER MERGE ui.filterLineEdit->addFilter(QIcon(), tr("Title"), COLUMN_THREAD_TITLE, tr("Search Title")); -//#AFTER MERGE ui.filterLineEdit->addFilter(QIcon(), tr("Date"), COLUMN_THREAD_DATE, tr("Search Date")); -//#AFTER MERGE ui.filterLineEdit->addFilter(QIcon(), tr("Author"), COLUMN_THREAD_AUTHOR, tr("Search Author")); -//#AFTER MERGE ui.filterLineEdit->addFilter(QIcon(), tr("Content"), COLUMN_THREAD_CONTENT, tr("Search Content")); -//#AFTER MERGE ui.filterLineEdit->setCurrentFilter(COLUMN_THREAD_TITLE); + ui->filterLineEdit->addFilter(QIcon(), tr("Title"), COLUMN_THREAD_TITLE, tr("Search Title")); + ui->filterLineEdit->addFilter(QIcon(), tr("Date"), COLUMN_THREAD_DATE, tr("Search Date")); + ui->filterLineEdit->addFilter(QIcon(), tr("Author"), COLUMN_THREAD_AUTHOR, tr("Search Author")); + ui->filterLineEdit->addFilter(QIcon(), tr("Content"), COLUMN_THREAD_CONTENT, tr("Search Content")); + ui->filterLineEdit->setCurrentFilter(COLUMN_THREAD_TITLE); mLastViewType = -1; @@ -219,7 +210,7 @@ void GxsForumThreadWidget::processSettings(bool load) togglethreadview_internal(); // filterColumn -//#AFTER MERGE ui.filterLineEdit->setCurrentFilter(Settings->value("filterColumn", COLUMN_THREAD_TITLE).toInt()); + ui->filterLineEdit->setCurrentFilter(Settings->value("filterColumn", COLUMN_THREAD_TITLE).toInt()); // index of viewBox ui->viewBox->setCurrentIndex(Settings->value("viewBox", VIEW_THREADED).toInt()); @@ -797,14 +788,14 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum else qtime.setTime_t(msg.mMeta.mPublishTs); -//#AFTER MERGE text = DateTime::formatDateTime(qtime); + text = DateTime::formatDateTime(qtime); sort = qtime.toString("yyyyMMdd_hhmmss"); if (useChildTS) { qtime.setTime_t(msg.mMeta.mPublishTs); text += " / "; -//#AFTER MERGE text += DateTime::formatDateTime(qtime); + text += DateTime::formatDateTime(qtime); sort += "_" + qtime.toString("yyyyMMdd_hhmmss"); } item->setText(COLUMN_THREAD_DATE, text); @@ -948,7 +939,7 @@ void GxsForumThreadWidget::insertForumThreads(const RsGroupMetaData &fi) // set data mFillThread->mCompareRole = mThreadCompareRole; mFillThread->mForumId = mForumId; -//#AFTER MERGE mFillThread->mFilterColumn = ui->filterLineEdit->currentFilter(); + mFillThread->mFilterColumn = ui->filterLineEdit->currentFilter(); mFillThread->mFilterColumn = COLUMN_THREAD_TITLE; mFillThread->mSubscribeFlags = mSubscribeFlags; mFillThread->mExpandNewMessages = Settings->getExpandNewMessages(); @@ -1229,12 +1220,11 @@ void GxsForumThreadWidget::insertPostData(const RsGxsForumMsg &msg) } } -//#AFTER MERGE ui.time_label->setText(DateTime::formatLongDateTime(msg.mMeta.mPublishTs)); + ui->time_label->setText(DateTime::formatLongDateTime(msg.mMeta.mPublishTs)); std::string authorName = rsPeers->getPeerName(msg.mMeta.mAuthorId); QString text = QString::fromUtf8(authorName.c_str()); -//#AFTER MERGE merge from ForumsDialog if (text.isEmpty()) { ui->by_label->setText( tr("By") + " " + tr("Anonymous")); @@ -1561,11 +1551,11 @@ static QString buildReplyHeader(const RsMsgMetaData &meta) QString header = QString("-----%1-----").arg(QApplication::translate("GxsForumsDialog", "Original Message")); header += QString("
%1: %2
").arg(QApplication::translate("GxsForumsDialog", "From"), from); -//#AFTER MERGE header += QString("
%1: %2
").arg(QApplication::translate("GxsForumsDialog", "Sent"), DateTime::formatLongDateTime(meta.mPublishTs)); + header += QString("
%1: %2
").arg(QApplication::translate("GxsForumsDialog", "Sent"), DateTime::formatLongDateTime(meta.mPublishTs)); header += QString("%1: %2

").arg(QApplication::translate("GxsForumsDialog", "Subject"), QString::fromUtf8(meta.mMsgName.c_str())); header += "
"; -//#AFTER MERGE header += QApplication::translate("GxsForumsDialog", "On %1, %2 wrote:").arg(DateTime::formatDateTime(meta.mPublishTs), from); + header += QApplication::translate("GxsForumsDialog", "On %1, %2 wrote:").arg(DateTime::formatDateTime(meta.mPublishTs), from); return header; } @@ -1644,8 +1634,7 @@ void GxsForumThreadWidget::filterColumnChanged(int column) void GxsForumThreadWidget::filterItems(const QString& text) { -//#AFTER MERGE int filterColumn = ui.filterLineEdit->currentFilter(); - int filterColumn = COLUMN_THREAD_TITLE; + int filterColumn = ui->filterLineEdit->currentFilter(); int count = ui->threadTreeWidget->topLevelItemCount(); for (int index = 0; index < count; ++index) { diff --git a/retroshare-gui/src/gui/qss/stylesheet/qss.default b/retroshare-gui/src/gui/qss/stylesheet/qss.default index 4e4b35cd4..a39cec0b4 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/qss.default +++ b/retroshare-gui/src/gui/qss/stylesheet/qss.default @@ -13,7 +13,7 @@ AvatarWidget[frameState="BUSY"]{border-image:url(:/images/avatarstatus-bg-busy-1 /* Color definitions */ -ForumsDialog +ForumsDialog, GxsForumThreadWidget { qproperty-textColorRead: gray; qproperty-textColorUnread: black; diff --git a/retroshare-gui/src/lang/retroshare_en.ts b/retroshare-gui/src/lang/retroshare_en.ts index 570379314..38806a551 100644 --- a/retroshare-gui/src/lang/retroshare_en.ts +++ b/retroshare-gui/src/lang/retroshare_en.ts @@ -2373,6 +2373,42 @@ Some services (Discovery, anonymous routing) can be switched off globally, which Forums/channels
+ + Abnormal size read is bigger than memory block. + + + + Invalid location id. + + + + Invalid external IP. + + + + Invalid local IP. + + + + Invalid checksum section. + + + + Checksum mismatch. Certificate is corrupted. + + + + Unknown section type found (Certificate might be corrupted). + + + + Missing checksum. + + + + Unknown certificate error + +
CreateBlog @@ -5829,6 +5865,26 @@ p, li { white-space: pre-wrap; } You cant reply to an Anonymous Author + + Search Title + + + + Search Date + + + + Search Author + + + + Content + + + + Search Content + + GxsForumsDialog @@ -5924,6 +5980,14 @@ p, li { white-space: pre-wrap; } My Forums + + Sent + + + + On %1, %2 wrote: + + GxsForumsFillThread