|
|
|
@ -31,6 +31,7 @@ |
|
|
|
|
#include "MainWindow.h" |
|
|
|
|
#include "Splitter.h" |
|
|
|
|
#include "UserInfoWidget.h" |
|
|
|
|
#include "UserSettingsPage.h" |
|
|
|
|
#include "ui/Avatar.h" |
|
|
|
|
#include "ui/FlatButton.h" |
|
|
|
|
#include "ui/OverlayModal.h" |
|
|
|
@ -123,6 +124,28 @@ UserInfoWidget::UserInfoWidget(QWidget *parent) |
|
|
|
|
if (ok && !text.isEmpty()) |
|
|
|
|
ChatPage::instance()->setStatus(text); |
|
|
|
|
}); |
|
|
|
|
auto setAutoPresence = menu->addAction(tr("Set presence automatically")); |
|
|
|
|
connect(setAutoPresence, &QAction::triggered, this, [this]() { |
|
|
|
|
ChatPage::instance()->userSettings()->setPresence( |
|
|
|
|
UserSettings::Presence::AutomaticPresence); |
|
|
|
|
ChatPage::instance()->setStatus(ChatPage::instance()->status()); |
|
|
|
|
}); |
|
|
|
|
auto setOnline = menu->addAction(tr("Online")); |
|
|
|
|
connect(setOnline, &QAction::triggered, this, [this]() { |
|
|
|
|
ChatPage::instance()->userSettings()->setPresence(UserSettings::Presence::Online); |
|
|
|
|
ChatPage::instance()->setStatus(ChatPage::instance()->status()); |
|
|
|
|
}); |
|
|
|
|
auto setUnavailable = menu->addAction(tr("Unavailable")); |
|
|
|
|
connect(setUnavailable, &QAction::triggered, this, [this]() { |
|
|
|
|
ChatPage::instance()->userSettings()->setPresence( |
|
|
|
|
UserSettings::Presence::Unavailable); |
|
|
|
|
ChatPage::instance()->setStatus(ChatPage::instance()->status()); |
|
|
|
|
}); |
|
|
|
|
auto setOffline = menu->addAction(tr("Offline")); |
|
|
|
|
connect(setOffline, &QAction::triggered, this, [this]() { |
|
|
|
|
ChatPage::instance()->userSettings()->setPresence(UserSettings::Presence::Offline); |
|
|
|
|
ChatPage::instance()->setStatus(ChatPage::instance()->status()); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|