aboutsummaryrefslogtreecommitdiff
path: root/backends/taskbar
diff options
context:
space:
mode:
Diffstat (limited to 'backends/taskbar')
-rw-r--r--backends/taskbar/win32/win32-taskbar.cpp30
-rw-r--r--backends/taskbar/win32/win32-taskbar.h2
2 files changed, 13 insertions, 19 deletions
diff --git a/backends/taskbar/win32/win32-taskbar.cpp b/backends/taskbar/win32/win32-taskbar.cpp
index c630129ea9..fd8cd263e8 100644
--- a/backends/taskbar/win32/win32-taskbar.cpp
+++ b/backends/taskbar/win32/win32-taskbar.cpp
@@ -51,19 +51,7 @@
const PROPERTYKEY PKEY_Title = { /* fmtid = */ { 0xF29F85E0, 0x4FF9, 0x1068, { 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9 } }, /* propID = */ 2 };
Win32TaskbarManager::Win32TaskbarManager() {
- _taskbar = NULL;
-}
-
-Win32TaskbarManager::~Win32TaskbarManager() {
- if (_taskbar)
- _taskbar->Release();
- _taskbar = NULL;
-
- CoUninitialize();
-}
-
-void Win32TaskbarManager::init() {
- // Do nothing if not running on Windows 7 of later
+ // Do nothing if not running on Windows 7 or later
if (!isWin7OrLater())
return;
@@ -71,10 +59,10 @@ void Win32TaskbarManager::init() {
// Try creating instance (on fail, _taskbar will contain NULL)
HRESULT hr = CoCreateInstance(CLSID_TaskbarList,
- 0,
- CLSCTX_INPROC_SERVER,
- IID_ITaskbarList3,
- reinterpret_cast<void**> (&(_taskbar)));
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_ITaskbarList3,
+ reinterpret_cast<void**> (&(_taskbar)));
if (SUCCEEDED(hr)) {
// Initialize taskbar object
@@ -87,6 +75,14 @@ void Win32TaskbarManager::init() {
}
}
+Win32TaskbarManager::~Win32TaskbarManager() {
+ if (_taskbar)
+ _taskbar->Release();
+ _taskbar = NULL;
+
+ CoUninitialize();
+}
+
void Win32TaskbarManager::setOverlayIcon(const Common::String &name, const Common::String &description) {
//warning("[Win32TaskbarManager::setOverlayIcon] Setting overlay icon to: %s (%s)", name.c_str(), description.c_str());
diff --git a/backends/taskbar/win32/win32-taskbar.h b/backends/taskbar/win32/win32-taskbar.h
index 7d963c19ca..0fc219e816 100644
--- a/backends/taskbar/win32/win32-taskbar.h
+++ b/backends/taskbar/win32/win32-taskbar.h
@@ -38,8 +38,6 @@ public:
Win32TaskbarManager();
virtual ~Win32TaskbarManager();
- void init();
-
virtual void setOverlayIcon(const Common::String &name, const Common::String &description);
virtual void setProgressValue(int completed, int total);
virtual void setProgressState(TaskbarProgressState state);