diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-04-21 17:21:44 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-04-21 17:21:44 +0300 |
commit | 74ff9055829be0ab5828f400a87e61c54f433289 (patch) | |
tree | 65ccec5c7693e67a72df151527e10746409f25ed /src/TopRoomBar.cc | |
parent | Save read receipts (diff) | |
download | nheko-74ff9055829be0ab5828f400a87e61c54f433289.tar.xz |
Clean up Top Bar
Diffstat (limited to '')
-rw-r--r-- | src/TopRoomBar.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index 73891881..6caf2edb 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -85,11 +85,6 @@ TopRoomBar::TopRoomBar(QWidget *parent) menu_ = new Menu(this); - toggleNotifications_ = new QAction(tr("Disable notifications"), this); - connect(toggleNotifications_, &QAction::triggered, this, [this]() { - roomSettings_->toggleNotifications(); - }); - inviteUsers_ = new QAction(tr("Invite users"), this); connect(inviteUsers_, &QAction::triggered, this, [this]() { MainWindow::instance()->openInviteUsersDialog( @@ -101,19 +96,10 @@ TopRoomBar::TopRoomBar(QWidget *parent) MainWindow::instance()->openLeaveRoomDialog(); }); - menu_->addAction(toggleNotifications_); menu_->addAction(inviteUsers_); menu_->addAction(leaveRoom_); connect(settingsBtn_, &QPushButton::clicked, this, [this]() { - if (roomSettings_.isNull()) - return; - - if (roomSettings_->isNotificationsEnabled()) - toggleNotifications_->setText(tr("Disable notifications")); - else - toggleNotifications_->setText(tr("Enable notifications")); - auto pos = mapToGlobal(settingsBtn_->pos()); menu_->popup( QPoint(pos.x() + buttonSize_ - menu_->sizeHint().width(), pos.y() + buttonSize_)); @@ -183,12 +169,6 @@ TopRoomBar::mousePressEvent(QMouseEvent *event) } void -TopRoomBar::setRoomSettings(QSharedPointer<RoomSettings> settings) -{ - roomSettings_ = settings; -} - -void TopRoomBar::updateRoomAvatar(const QImage &avatar_image) { avatar_->setImage(avatar_image); |