summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-07-22 10:00:15 (GMT)
committerSwift Review <review@swift.im>2014-07-28 10:37:27 (GMT)
commitcc379dcf8aeba3c7f259b7e40c9ea2d7a137aa7a (patch)
tree2ca9904e9ac300f97b8046170a4d8cad42e0fab1 /Swift/Controllers/UIInterfaces
parentdeddde461018ec2b47d1b3e3776550cdd3ea714d (diff)
downloadswift-cc379dcf8aeba3c7f259b7e40c9ea2d7a137aa7a.zip
swift-cc379dcf8aeba3c7f259b7e40c9ea2d7a137aa7a.tar.bz2
Fix displaying blocked user warning with bound JID chats. Support multiple alert messages.
Test-Information: Block a user while the JID is unbound and verify that the yellow warning bar is displayed. Send bidirectional messages to bind the JID then repeat the block request and confirm that the yellow warning bar is displayed and that the user is indeed blocked. Open several alert messages, check that each one can be individually closed via cancelAlert. Change-Id: I120e393c028d15fd5f92154b44a8817cbc41edc9
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r--Swift/Controllers/UIInterfaces/ChatWindow.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h
index 81d26c8..f2f5f76 100644
--- a/Swift/Controllers/UIInterfaces/ChatWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatWindow.h
@@ -153,16 +153,23 @@ namespace Swift {
virtual void setBlockingState(BlockingState state) = 0;
virtual void setCanInitiateImpromptuChats(bool supportsImpromptu) = 0;
virtual void showBookmarkWindow(const MUCBookmark& bookmark) = 0;
+
+ /**
+ * A handle that uniquely identities an alert message.
+ */
+ typedef int AlertID;
/**
* Set an alert on the window.
* @param alertText Description of alert (required).
* @param buttonText Button text to use (optional, no button is shown if empty).
+ * @return A handle to the alert message.
*/
- virtual void setAlert(const std::string& alertText, const std::string& buttonText = "") = 0;
+ virtual AlertID addAlert(const std::string& alertText, const std::string& buttonText = "") = 0;
/**
* Removes an alert.
+ * @param id An alert ID previously returned from setAlert
*/
- virtual void cancelAlert() = 0;
+ virtual void removeAlert(const AlertID id) = 0;
/**
* Actions that can be performed on the selected occupant.