diff --git a/RetroShare.pro b/RetroShare.pro index 4a1be6b49..c4c937448 100644 --- a/RetroShare.pro +++ b/RetroShare.pro @@ -7,7 +7,6 @@ SUBDIRS += \ libbitdht \ libretroshare \ libresapi \ - pegmarkdown \ retroshare_gui \ retroshare_nogui \ plugins @@ -22,10 +21,8 @@ libretroshare.depends = openpgpsdk libbitdht libresapi.file = libresapi/src/libresapi.pro libresapi.depends = libretroshare -pegmarkdown.file = supportlibs/pegmarkdown/pegmarkdown.pro - retroshare_gui.file = retroshare-gui/src/retroshare-gui.pro -retroshare_gui.depends = libretroshare libresapi pegmarkdown +retroshare_gui.depends = libretroshare libresapi retroshare_gui.target = retroshare-gui retroshare_nogui.file = retroshare-nogui/src/retroshare-nogui.pro @@ -35,3 +32,9 @@ retroshare_nogui.target = retroshare-nogui plugins.file = plugins/plugins.pro plugins.depends = retroshare_gui plugins.target = plugins + +wikipoos { + SUBDIRS += pegmarkdown + pegmarkdown.file = supportlibs/pegmarkdown/pegmarkdown.pro + retroshare_gui.depends += pegmarkdown +} diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index 18ded24a5..28c1c344d 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -7,11 +7,6 @@ CONFIG -= qt TARGET = retroshare TARGET_PRL = libretroshare - -#GXS Stuff. -# This should be disabled for releases until further notice. -CONFIG += gxs - #CONFIG += dsdv profiling { @@ -464,8 +459,8 @@ HEADERS += serialiser/itempriorities.h \ serialiser/rsheartbeatitems.h \ serialiser/rsrttitems.h \ serialiser/rsgxsrecognitems.h \ - serialiser/rsgxsupdateitems.h \ - serialiser/rsserviceinfoitems.h \ + serialiser/rsgxsupdateitems.h \ + serialiser/rsserviceinfoitems.h \ HEADERS += services/p3msgservice.h \ services/p3service.h \ @@ -614,8 +609,8 @@ SOURCES += serialiser/rsbaseserial.cc \ serialiser/rsheartbeatitems.cc \ serialiser/rsrttitems.cc \ serialiser/rsgxsrecognitems.cc \ - serialiser/rsgxsupdateitems.cc \ - serialiser/rsserviceinfoitems.cc \ + serialiser/rsgxsupdateitems.cc \ + serialiser/rsserviceinfoitems.cc \ SOURCES += services/p3msgservice.cc \ services/p3service.cc \ @@ -696,95 +691,94 @@ SOURCES += zeroconf/p3zcnatassist.cc \ # new gxs cache system # this should be disabled for releases until further notice. -gxs { - DEFINES *= RS_ENABLE_GXS - DEFINES *= SQLITE_HAS_CODEC - DEFINES *= GXS_ENABLE_SYNC_MSGS +DEFINES *= SQLITE_HAS_CODEC +DEFINES *= GXS_ENABLE_SYNC_MSGS - HEADERS += serialiser/rsnxsitems.h \ - gxs/rsgds.h \ - gxs/rsgxs.h \ - gxs/rsdataservice.h \ - gxs/rsgxsnetservice.h \ - retroshare/rsgxsflags.h \ - retroshare/rsgxsifacetypes.h \ - gxs/rsgenexchange.h \ - gxs/rsnxsobserver.h \ - gxs/rsgxsdata.h \ - retroshare/rstokenservice.h \ - gxs/rsgxsdataaccess.h \ - retroshare/rsgxsservice.h \ - serialiser/rsgxsitems.h \ - util/retrodb.h \ - util/rsdbbind.h \ - gxs/rsgxsutil.h \ - util/contentvalue.h \ - gxs/gxssecurity.h \ - gxs/rsgxsifacehelper.h \ - gxs/gxstokenqueue.h \ - gxs/rsgxsnetutils.h \ - gxs/rsgxsiface.h \ - gxs/rsgxsrequesttypes.h +HEADERS += serialiser/rsnxsitems.h \ + gxs/rsgds.h \ + gxs/rsgxs.h \ + gxs/rsdataservice.h \ + gxs/rsgxsnetservice.h \ + retroshare/rsgxsflags.h \ + retroshare/rsgxsifacetypes.h \ + gxs/rsgenexchange.h \ + gxs/rsnxsobserver.h \ + gxs/rsgxsdata.h \ + retroshare/rstokenservice.h \ + gxs/rsgxsdataaccess.h \ + retroshare/rsgxsservice.h \ + serialiser/rsgxsitems.h \ + util/retrodb.h \ + util/rsdbbind.h \ + gxs/rsgxsutil.h \ + util/contentvalue.h \ + gxs/gxssecurity.h \ + gxs/rsgxsifacehelper.h \ + gxs/gxstokenqueue.h \ + gxs/rsgxsnetutils.h \ + gxs/rsgxsiface.h \ + gxs/rsgxsrequesttypes.h - SOURCES += serialiser/rsnxsitems.cc \ - gxs/rsdataservice.cc \ - gxs/rsgenexchange.cc \ - gxs/rsgxsnetservice.cc \ - gxs/rsgxsdata.cc \ - serialiser/rsgxsitems.cc \ - gxs/rsgxsdataaccess.cc \ - util/retrodb.cc \ - util/contentvalue.cc \ - util/rsdbbind.cc \ - gxs/gxssecurity.cc \ - gxs/gxstokenqueue.cc \ - gxs/rsgxsnetutils.cc \ - gxs/rsgxsutil.cc \ - gxs/rsgxsrequesttypes.cc +SOURCES += serialiser/rsnxsitems.cc \ + gxs/rsdataservice.cc \ + gxs/rsgenexchange.cc \ + gxs/rsgxsnetservice.cc \ + gxs/rsgxsdata.cc \ + serialiser/rsgxsitems.cc \ + gxs/rsgxsdataaccess.cc \ + util/retrodb.cc \ + util/contentvalue.cc \ + util/rsdbbind.cc \ + gxs/gxssecurity.cc \ + gxs/gxstokenqueue.cc \ + gxs/rsgxsnetutils.cc \ + gxs/rsgxsutil.cc \ + gxs/rsgxsrequesttypes.cc - # Identity Service - HEADERS += retroshare/rsidentity.h \ - gxs/rsgixs.h \ - services/p3idservice.h \ - serialiser/rsgxsiditems.h \ - services/p3gxsreputation.h \ - serialiser/rsgxsreputationitems.h \ +# Identity Service +HEADERS += retroshare/rsidentity.h \ + gxs/rsgixs.h \ + services/p3idservice.h \ + serialiser/rsgxsiditems.h \ + services/p3gxsreputation.h \ + serialiser/rsgxsreputationitems.h \ - SOURCES += services/p3idservice.cc \ - serialiser/rsgxsiditems.cc \ - services/p3gxsreputation.cc \ - serialiser/rsgxsreputationitems.cc \ +SOURCES += services/p3idservice.cc \ + serialiser/rsgxsiditems.cc \ + services/p3gxsreputation.cc \ + serialiser/rsgxsreputationitems.cc \ - # GxsCircles Service - HEADERS += services/p3gxscircles.h \ - serialiser/rsgxscircleitems.h \ - retroshare/rsgxscircles.h \ +# GxsCircles Service +HEADERS += services/p3gxscircles.h \ + serialiser/rsgxscircleitems.h \ + retroshare/rsgxscircles.h \ - SOURCES += services/p3gxscircles.cc \ - serialiser/rsgxscircleitems.cc \ +SOURCES += services/p3gxscircles.cc \ + serialiser/rsgxscircleitems.cc \ - # GxsForums Service - HEADERS += retroshare/rsgxsforums.h \ - services/p3gxsforums.h \ - serialiser/rsgxsforumitems.h +# GxsForums Service +HEADERS += retroshare/rsgxsforums.h \ + services/p3gxsforums.h \ + serialiser/rsgxsforumitems.h - SOURCES += services/p3gxsforums.cc \ - serialiser/rsgxsforumitems.cc \ +SOURCES += services/p3gxsforums.cc \ + serialiser/rsgxsforumitems.cc \ - # GxsChannels Service - HEADERS += retroshare/rsgxschannels.h \ - services/p3gxschannels.h \ - services/p3gxscommon.h \ - serialiser/rsgxscommentitems.h \ - serialiser/rsgxschannelitems.h \ +# GxsChannels Service +HEADERS += retroshare/rsgxschannels.h \ + services/p3gxschannels.h \ + services/p3gxscommon.h \ + serialiser/rsgxscommentitems.h \ + serialiser/rsgxschannelitems.h \ - SOURCES += services/p3gxschannels.cc \ - services/p3gxscommon.cc \ - serialiser/rsgxscommentitems.cc \ - serialiser/rsgxschannelitems.cc \ +SOURCES += services/p3gxschannels.cc \ + services/p3gxscommon.cc \ + serialiser/rsgxscommentitems.cc \ + serialiser/rsgxschannelitems.cc \ +wikipoos { # Wiki Service HEADERS += retroshare/rswiki.h \ services/p3wiki.h \ @@ -792,7 +786,9 @@ gxs { SOURCES += services/p3wiki.cc \ serialiser/rswikiitems.cc \ +} +gxsthewire { # Wire Service HEADERS += retroshare/rswire.h \ services/p3wire.h \ @@ -800,17 +796,19 @@ gxs { SOURCES += services/p3wire.cc \ serialiser/rswireitems.cc \ +} - # Posted Service - HEADERS += services/p3postbase.h \ - services/p3posted.h \ - retroshare/rsposted.h \ - serialiser/rsposteditems.h +# Posted Service +HEADERS += services/p3postbase.h \ + services/p3posted.h \ + retroshare/rsposted.h \ + serialiser/rsposteditems.h - SOURCES += services/p3postbase.cc \ - services/p3posted.cc \ - serialiser/rsposteditems.cc +SOURCES += services/p3postbase.cc \ + services/p3posted.cc \ + serialiser/rsposteditems.cc +gxsphotoshare { #Photo Service HEADERS += services/p3photoservice.h \ retroshare/rsphoto.h \ @@ -858,6 +856,3 @@ test_bitdht { # ENABLED UDP NOW. } - - - diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index c0e7697fa..766e9bcf7 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1364,9 +1364,9 @@ int RsServer::StartupRetroShare() RS_SERVICE_GXS_TYPE_WIKI, NULL, rsInitConfig->gxs_passwd); +#ifdef RS_USE_WIKI p3Wiki *mWiki = new p3Wiki(wiki_ds, NULL, mGxsIdService); - - // create GXS photo service + // create GXS wiki service RsGxsNetService* wiki_ns = new RsGxsNetService( RS_SERVICE_GXS_TYPE_WIKI, wiki_ds, nxsMgr, mWiki, mWiki->getServiceInfo(), @@ -1374,6 +1374,7 @@ int RsServer::StartupRetroShare() pgpAuxUtils); mWiki->setNetworkExchangeService(wiki_ns) ; +#endif /**** Forum GXS service ****/ @@ -1443,7 +1444,9 @@ int RsServer::StartupRetroShare() pqih->addService(gxsid_ns, true); pqih->addService(gxscircles_ns, true); pqih->addService(posted_ns, true); +#ifdef RS_USE_WIKI pqih->addService(wiki_ns, true); +#endif pqih->addService(gxsforums_ns, true); pqih->addService(gxschannels_ns, true); //pqih->addService(photo_ns, true); @@ -1619,7 +1622,9 @@ int RsServer::StartupRetroShare() mConfigMgr->addConfiguration("gxschannels.cfg", gxschannels_ns); mConfigMgr->addConfiguration("gxscircles.cfg", gxscircles_ns); mConfigMgr->addConfiguration("posted.cfg", posted_ns); +#ifdef RS_USE_WIKI mConfigMgr->addConfiguration("wiki.cfg", wiki_ns); +#endif //mConfigMgr->addConfiguration("photo.cfg", photo_ns); //mConfigMgr->addConfiguration("wire.cfg", wire_ns); #endif @@ -1728,7 +1733,9 @@ int RsServer::StartupRetroShare() // Must Set the GXS pointers before starting threads. rsIdentity = mGxsIdService; rsGxsCircles = mGxsCircles; +#if RS_USE_WIKI rsWiki = mWiki; +#endif rsPosted = mPosted; rsGxsForums = mGxsForums; rsGxsChannels = mGxsChannels; @@ -1739,7 +1746,9 @@ int RsServer::StartupRetroShare() startServiceThread(mGxsIdService); startServiceThread(mGxsCircles); startServiceThread(mPosted); +#if RS_USE_WIKI startServiceThread(mWiki); +#endif startServiceThread(mGxsForums); startServiceThread(mGxsChannels); @@ -1750,7 +1759,9 @@ int RsServer::StartupRetroShare() startServiceThread(gxsid_ns); startServiceThread(gxscircles_ns); startServiceThread(posted_ns); +#if RS_USE_WIKI startServiceThread(wiki_ns); +#endif startServiceThread(gxsforums_ns); startServiceThread(gxschannels_ns); diff --git a/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp b/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp index b4a26dddb..a4be2189f 100644 --- a/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp +++ b/retroshare-gui/src/gui/WikiPoos/WikiDialog.cpp @@ -79,7 +79,7 @@ /** Constructor */ WikiDialog::WikiDialog(QWidget *parent) -: MainPage(parent) +: RsGxsUpdateBroadcastPage(rsWiki, parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); @@ -103,11 +103,6 @@ WikiDialog::WikiDialog(QWidget *parent) 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); - timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate())); - timer->start(1000); - /* setup TokenQueue */ mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this); @@ -118,8 +113,6 @@ 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(); } WikiDialog::~WikiDialog() @@ -127,20 +120,6 @@ WikiDialog::~WikiDialog() delete(mWikiQueue); } -void WikiDialog::checkUpdate() -{ - /* update */ - if (!rsWiki) - return; - - if (rsWiki->updated()) - { - insertWikiGroups(); - } - - return; -} - void WikiDialog::OpenOrShowAddPageDialog() { RsGxsGroupId groupId = getSelectedGroup(); @@ -362,11 +341,6 @@ const RsGxsGroupId& WikiDialog::getSelectedGroup() /************************** Request / Response *************************/ /*** Loading Main Index ***/ -void WikiDialog::insertWikiGroups() -{ - requestGroupMeta(); -} - void WikiDialog::requestGroupMeta() { std::cerr << "WikiDialog::requestGroupMeta()"; @@ -528,7 +502,7 @@ void WikiDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req) #define GXSGROUP_NEWGROUPID 1 case GXSGROUP_NEWGROUPID: - insertWikiGroups(); + requestGroupMeta(); break; default: std::cerr << "WikiDialog::loadRequest() ERROR: INVALID TYPE"; @@ -716,3 +690,20 @@ void WikiDialog::todo() "