aboutsummaryrefslogtreecommitdiff
path: root/backends/taskbar
diff options
context:
space:
mode:
authorLittleboy2011-04-04 12:49:49 -0400
committerJulien2011-06-16 14:23:12 -0400
commite1dc9cdc0b89609753d3558f9603bef1cc12f1d8 (patch)
tree58802cb0ee464fdd4e63787162ba5ef4f963ee29 /backends/taskbar
parent6c14d8a95052b68c9f076d32e520c6befac3d959 (diff)
downloadscummvm-rg350-e1dc9cdc0b89609753d3558f9603bef1cc12f1d8.tar.gz
scummvm-rg350-e1dc9cdc0b89609753d3558f9603bef1cc12f1d8.tar.bz2
scummvm-rg350-e1dc9cdc0b89609753d3558f9603bef1cc12f1d8.zip
BACKENDS: Add support for count status to TaskbarManager
- Show the number of found games when using the massadd dialog
Diffstat (limited to 'backends/taskbar')
-rw-r--r--backends/taskbar/unity/unity-taskbar.cpp9
-rw-r--r--backends/taskbar/unity/unity-taskbar.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/backends/taskbar/unity/unity-taskbar.cpp b/backends/taskbar/unity/unity-taskbar.cpp
index 24347e382f..0de2167a83 100644
--- a/backends/taskbar/unity/unity-taskbar.cpp
+++ b/backends/taskbar/unity/unity-taskbar.cpp
@@ -88,6 +88,15 @@ void UnityTaskbarManager::addRecent(const Common::String &name, const Common::St
warning("[UnityTaskbarManager::addRecent] Not implemented");
}
+void UnityTaskbarManager::setCount(int count) {
+ if (_launcher == NULL)
+ return;
+
+ unity_launcher_entry_set_count(_launcher, count);
+
+ unity_launcher_entry_set_count_visible(_launcher, (count == 0) ? FALSE : TRUE);
+}
+
// Unity requires the glib event loop to the run to function properly
// as events are sent asynchronously
bool UnityTaskbarManager::pollEvent(Common::Event &event) {
diff --git a/backends/taskbar/unity/unity-taskbar.h b/backends/taskbar/unity/unity-taskbar.h
index d8a68a4101..48f403a849 100644
--- a/backends/taskbar/unity/unity-taskbar.h
+++ b/backends/taskbar/unity/unity-taskbar.h
@@ -43,6 +43,7 @@ public:
virtual void setProgressValue(int completed, int total);
virtual void setProgressState(TaskbarProgressState state);
virtual void addRecent(const Common::String &name, const Common::String &description);
+ virtual void setCount(int count);
// Implementation of the EventSource interface
virtual bool pollEvent(Common::Event &event);