mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-18 05:44:14 -05:00
fixed temporary to load the Wiki Groups Tree at startup, auto update seems not to work.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6994 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5fd1c68f9d
commit
03c27dcdc3
@ -75,7 +75,8 @@
|
||||
#define IMAGE_NEWFORUM ":/images/new_forum16.png"
|
||||
#define IMAGE_FORUMAUTHD ":/images/konv_message2.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_WIKI ":/images/wikibook_32.png"
|
||||
#define IMAGE_WIKI ":/images/wikibook_32.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
|
||||
|
||||
/** Constructor */
|
||||
@ -96,16 +97,14 @@ WikiDialog::WikiDialog(QWidget *parent)
|
||||
|
||||
// Usurped until Refresh works normally
|
||||
connect( ui.toolButton_Delete, SIGNAL(clicked()), this, SLOT(insertWikiGroups()));
|
||||
connect( ui.pushButton, SIGNAL(clicked()), this, SLOT(todo()));
|
||||
|
||||
connect( ui.treeWidget_Pages, SIGNAL(itemSelectionChanged()), this, SLOT(groupTreeChanged()));
|
||||
|
||||
|
||||
// GroupTreeWidget.
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupListCustomPopupMenu(QPoint)));
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||
|
||||
|
||||
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupListCustomPopupMenu(QPoint)));
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||
|
||||
|
||||
QTimer *timer = new QTimer(this);
|
||||
@ -113,15 +112,17 @@ WikiDialog::WikiDialog(QWidget *parent)
|
||||
timer->start(1000);
|
||||
|
||||
/* setup TokenQueue */
|
||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||
|
||||
|
||||
/* Setup Group Tree */
|
||||
mYourGroups = ui.groupTreeWidget->addCategoryItem(tr("My Groups"), QIcon(IMAGE_FOLDER), true);
|
||||
mSubscribedGroups = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Groups"), QIcon(IMAGE_FOLDERRED), true);
|
||||
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(IMAGE_FOLDERGREEN), false);
|
||||
mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(IMAGE_FOLDERYELLOW), false);
|
||||
mYourGroups = ui.groupTreeWidget->addCategoryItem(tr("My Groups"), QIcon(IMAGE_FOLDER), true);
|
||||
mSubscribedGroups = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Groups"), QIcon(IMAGE_FOLDERRED), true);
|
||||
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(IMAGE_FOLDERGREEN), false);
|
||||
mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(IMAGE_FOLDERYELLOW), false);
|
||||
|
||||
//Auto refresh seems not to work, temporary solution at start
|
||||
insertWikiGroups();
|
||||
|
||||
}
|
||||
|
||||
@ -437,6 +438,7 @@ void WikiDialog::loadPages(const uint32_t &token)
|
||||
std::cerr << std::endl;
|
||||
|
||||
clearGroupTree();
|
||||
clearWikiPage();
|
||||
|
||||
QTreeWidgetItem *groupItem = NULL;
|
||||
|
||||
@ -628,6 +630,9 @@ void WikiDialog::groupListCustomPopupMenu(QPoint /*point*/)
|
||||
action = contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Unsubscribe to Group"), this, SLOT(unsubscribeToGroup()));
|
||||
action->setEnabled (!mGroupId.empty() && IS_GROUP_SUBSCRIBED(subscribeFlags));
|
||||
|
||||
action = contextMnu.addAction(QIcon(IMAGE_EDIT), tr("Edit Group"), this, SLOT(editGroupDetails()));
|
||||
action->setEnabled (!mGroupId.empty() && IS_GROUP_ADMIN(subscribeFlags));
|
||||
|
||||
/************** NOT ENABLED YET *****************/
|
||||
|
||||
//if (!Settings->getForumOpenAllInNewTab()) {
|
||||
@ -741,4 +746,11 @@ void WikiDialog::GroupMetaDataToGroupItemInfo(const RsGroupMetaData &groupInfo,
|
||||
groupItemInfo.icon = QIcon(IMAGE_WIKI);
|
||||
|
||||
}
|
||||
|
||||
void WikiDialog::todo()
|
||||
{
|
||||
QMessageBox::information(this, "Todo",
|
||||
"<b>Open points:</b><ul>"
|
||||
"<li>Auto update Group trees"
|
||||
"<li>Edit Groups"
|
||||
"</ul>");
|
||||
}
|
||||
|
@ -24,6 +24,8 @@
|
||||
#ifndef MRK_WIKI_DIALOG_H
|
||||
#define MRK_WIKI_DIALOG_H
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "retroshare-gui/mainpage.h"
|
||||
#include "ui_WikiDialog.h"
|
||||
|
||||
@ -63,9 +65,11 @@ private slots:
|
||||
|
||||
// GroupTreeWidget stuff.
|
||||
void groupListCustomPopupMenu(QPoint point);
|
||||
void subscribeToGroup();
|
||||
void unsubscribeToGroup();
|
||||
void subscribeToGroup();
|
||||
void unsubscribeToGroup();
|
||||
void wikiGroupChanged(const QString &groupId);
|
||||
|
||||
void todo();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -105,8 +105,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>241</width>
|
||||
<height>454</height>
|
||||
<width>218</width>
|
||||
<height>456</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
@ -320,6 +320,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Todo</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
@ -349,8 +356,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>491</width>
|
||||
<height>454</height>
|
||||
<width>515</width>
|
||||
<height>456</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
Loading…
x
Reference in New Issue
Block a user