diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-05-29 17:34:35 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-05-29 17:34:35 +0000 |
commit | 43c21d816162fcb25fb5dbc91796d17dd327928c (patch) | |
tree | 686886ab8b229c7849d3d9f1cb57551b29f02a63 /plugins/PluginUpdater/src/DlgUpdate.cpp | |
parent | 231d58ed5b9025783b3e63bd81b25241441bc237 (diff) |
Plugin Updater: Show Windows balloon if popups are't installed/enabled, not MessageBox (them only when balloon fails)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9357 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/DlgUpdate.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 7e5c241d69..83ac440829 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -451,8 +451,21 @@ static void DlgUpdateSilent(void *lParam) TCHAR tszText[200];
mir_sntprintf(tszText, SIZEOF(tszText), _T("%s\n\n%s"), TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
- if (MessageBox(NULL, tszText, tszTitle, MB_ICONINFORMATION | MB_YESNO) == IDYES)
- CallFunctionAsync(RestartMe, 0);
+ if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
+ MIRANDASYSTRAYNOTIFY err;
+ err.szProto = MODULEA;
+ err.cbSize = sizeof(err);
+ err.dwInfoFlags = NIIF_INTERN_UNICODE | NIIF_INFO;
+ err.tszInfoTitle = tszTitle;
+ err.tszInfo = tszText;
+ err.uTimeout = 60000;
+
+ if (CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM)&err) != 0) {
+ // Error, let's try to show MessageBox as last way to inform user about successful update
+ if (MessageBox(NULL, tszText, tszTitle, MB_ICONINFORMATION | MB_YESNO) == IDYES)
+ CallFunctionAsync(RestartMe, 0);
+ }
+ }
} else {
POPUPDATAT_V2 pd = { 0 };
pd.cbSize = sizeof(pd);
|