From e1dc9cdc0b89609753d3558f9603bef1cc12f1d8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 4 Apr 2011 12:49:49 -0400 Subject: BACKENDS: Add support for count status to TaskbarManager - Show the number of found games when using the massadd dialog --- backends/taskbar/unity/unity-taskbar.cpp | 9 +++++++++ backends/taskbar/unity/unity-taskbar.h | 1 + 2 files changed, 10 insertions(+) (limited to 'backends/taskbar') 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); -- cgit v1.2.3