mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04: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
3 changed files with 41 additions and 18 deletions
|
@ -76,6 +76,7 @@
|
|||
#define IMAGE_FORUMAUTHD ":/images/konv_message2.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_WIKI ":/images/wikibook_32.png"
|
||||
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||
|
||||
|
||||
/** Constructor */
|
||||
|
@ -96,6 +97,7 @@ 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()));
|
||||
|
||||
|
@ -105,9 +107,6 @@ WikiDialog::WikiDialog(QWidget *parent)
|
|||
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QTimer *timer = new QTimer(this);
|
||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate()));
|
||||
timer->start(1000);
|
||||
|
@ -122,6 +121,8 @@ WikiDialog::WikiDialog(QWidget *parent)
|
|||
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"
|
||||
|
||||
|
@ -67,6 +69,8 @@ private slots:
|
|||
void unsubscribeToGroup();
|
||||
void wikiGroupChanged(const QString &groupId);
|
||||
|
||||
void todo();
|
||||
|
||||
private:
|
||||
|
||||
void clearWikiPage();
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue