diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-12-09 12:05:27 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-12-09 12:05:27 (GMT) |
| commit | 38862a78d119d4ac8cd8495436e75d00f3ee896e (patch) | |
| tree | ea1e21878adde1bda829454049c73e92f1cab513 /src/game/GameController.cpp | |
| parent | 6478ed121ce17cf7d7beaab2deb1953da63d283d (diff) | |
| download | powder-38862a78d119d4ac8cd8495436e75d00f3ee896e.zip powder-38862a78d119d4ac8cd8495436e75d00f3ee896e.tar.gz | |
New Conversation notifications
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 154d99b..188a233 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -1257,6 +1257,23 @@ void GameController::NotifyAuthUserChanged(Client * sender) gameModel->SetUser(newUser); } +void GameController::NotifyNewNotification(Client * sender, std::pair<std::string, std::string> notification) +{ + class LinkNotification : public Notification + { + std::string link; + public: + LinkNotification(std::string link_, std::string message) : link(link_), Notification(message) {} + virtual ~LinkNotification() {} + + virtual void Action() + { + OpenURI(link); + } + }; + gameModel->AddNotification(new LinkNotification(notification.second, notification.first)); +} + void GameController::NotifyUpdateAvailable(Client * sender) { class UpdateConfirmation: public ConfirmDialogueCallback { |
