mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 06:31:20 -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_FORUMAUTHD ":/images/konv_message2.png"
|
||||||
#define IMAGE_COPYLINK ":/images/copyrslink.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 */
|
/** Constructor */
|
||||||
|
@ -96,6 +97,7 @@ WikiDialog::WikiDialog(QWidget *parent)
|
||||||
|
|
||||||
// Usurped until Refresh works normally
|
// Usurped until Refresh works normally
|
||||||
connect( ui.toolButton_Delete, SIGNAL(clicked()), this, SLOT(insertWikiGroups()));
|
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()));
|
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)));
|
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QTimer *timer = new QTimer(this);
|
QTimer *timer = new QTimer(this);
|
||||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate()));
|
timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate()));
|
||||||
timer->start(1000);
|
timer->start(1000);
|
||||||
|
@ -122,6 +121,8 @@ WikiDialog::WikiDialog(QWidget *parent)
|
||||||
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(IMAGE_FOLDERGREEN), false);
|
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(IMAGE_FOLDERGREEN), false);
|
||||||
mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(IMAGE_FOLDERYELLOW), 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;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
clearGroupTree();
|
clearGroupTree();
|
||||||
|
clearWikiPage();
|
||||||
|
|
||||||
QTreeWidgetItem *groupItem = NULL;
|
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 = contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Unsubscribe to Group"), this, SLOT(unsubscribeToGroup()));
|
||||||
action->setEnabled (!mGroupId.empty() && IS_GROUP_SUBSCRIBED(subscribeFlags));
|
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 *****************/
|
/************** NOT ENABLED YET *****************/
|
||||||
|
|
||||||
//if (!Settings->getForumOpenAllInNewTab()) {
|
//if (!Settings->getForumOpenAllInNewTab()) {
|
||||||
|
@ -741,4 +746,11 @@ void WikiDialog::GroupMetaDataToGroupItemInfo(const RsGroupMetaData &groupInfo,
|
||||||
groupItemInfo.icon = QIcon(IMAGE_WIKI);
|
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
|
#ifndef MRK_WIKI_DIALOG_H
|
||||||
#define MRK_WIKI_DIALOG_H
|
#define MRK_WIKI_DIALOG_H
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "retroshare-gui/mainpage.h"
|
#include "retroshare-gui/mainpage.h"
|
||||||
#include "ui_WikiDialog.h"
|
#include "ui_WikiDialog.h"
|
||||||
|
|
||||||
|
@ -67,6 +69,8 @@ private slots:
|
||||||
void unsubscribeToGroup();
|
void unsubscribeToGroup();
|
||||||
void wikiGroupChanged(const QString &groupId);
|
void wikiGroupChanged(const QString &groupId);
|
||||||
|
|
||||||
|
void todo();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void clearWikiPage();
|
void clearWikiPage();
|
||||||
|
|
|
@ -105,8 +105,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>241</width>
|
<width>218</width>
|
||||||
<height>454</height>
|
<height>456</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
@ -320,6 +320,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Todo</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -349,8 +356,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>491</width>
|
<width>515</width>
|
||||||
<height>454</height>
|
<height>456</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue