mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 09:34:10 -05:00
removed groupsChanged and used rsEvents::FRIEND_LIST instead
This commit is contained in:
parent
df02d745d8
commit
0ce2dd8486
19 changed files with 106 additions and 23 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include "gui/notifyqt.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "util/misc.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/* Images for context menu icons */
|
||||
|
|
@ -73,7 +74,23 @@ ShareManager::ShareManager()
|
|||
connect(ui.shareddirList, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(doubleClickedCell(int,int)));
|
||||
connect(ui.shareddirList, SIGNAL(cellChanged(int,int)), this, SLOT(handleCellChange(int,int)));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(reload()));
|
||||
// connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(reload()));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
{
|
||||
RsQThreadUtils::postToObject([=]()
|
||||
{
|
||||
auto fe = dynamic_cast<const RsFriendListEvent*>(e.get());
|
||||
|
||||
if(!fe)
|
||||
return;
|
||||
|
||||
reload();
|
||||
}
|
||||
, this );
|
||||
}, mEventHandlerId, RsEventType::FRIEND_LIST );
|
||||
|
||||
QHeaderView* header = ui.shareddirList->horizontalHeader();
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_PATH, QHeaderView::Stretch);
|
||||
|
|
@ -152,6 +169,7 @@ ShareManager::~ShareManager()
|
|||
{
|
||||
_instance = NULL;
|
||||
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
Settings->saveWidgetInformation(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue