summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Scanner.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-04 19:57:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-04 19:57:29 +0000
commitfb291835ca840fb0bbee98b1554618442ff26289 (patch)
tree2277b93e296f66e17d04b32916b1c4d46b5ead6d /plugins/PluginUpdater/src/Scanner.cpp
parent7dadddb7b4f9f6a0e2ee4ba9d7b78d61edc5ab0d (diff)
popups optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@1358 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Scanner.cpp')
-rw-r--r--plugins/PluginUpdater/src/Scanner.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp
index 369c98e3fc..df41165420 100644
--- a/plugins/PluginUpdater/src/Scanner.cpp
+++ b/plugins/PluginUpdater/src/Scanner.cpp
@@ -178,33 +178,16 @@ static void CheckUpdates(void *)
return;
}
- if (!UpdateFiles.size() && !Silent) {
- LPCTSTR Title = TranslateT("Plugin Updater");
- LPCTSTR Text = TranslateT("No updates found.");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED)) {
- Number = 2;
- show_popup(0, Title, Text, Number, 0);
- }
- else if (DBGetContactSettingByte(NULL, MODNAME, "Popups2M", DEFAULT_MESSAGE_ENABLED))
- MessageBox(NULL, Text, Title, MB_ICONINFORMATION);
- }
+ if (!UpdateFiles.size() && !Silent)
+ ShowPopup(0, LPGENT("Plugin Updater"), LPGENT("No updates found."), 2, 0);
CheckThread = NULL;
}
void DoCheck(int iFlag, int iFlag2)
{
- if (iFlag2) {
- LPCTSTR Title = TranslateT("Plugin Updater");
- LPCTSTR Text = TranslateT("Update checking already started!");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
- {
- Number = 2;
- show_popup(0, Title, Text, Number, 0);
- }
- else if (DBGetContactSettingByte(NULL, MODNAME, "Popups2M", DEFAULT_MESSAGE_ENABLED))
- MessageBox(NULL, Text, Title, MB_ICONINFORMATION);
- }
+ if (iFlag2)
+ ShowPopup(0, LPGENT("Plugin Updater"), LPGENT("Update checking already started!"), 2, 0);
else if (iFlag) {
CheckThread = mir_forkthread(CheckUpdates, 0);
DBWriteContactSettingDword(NULL, MODNAME, "LastUpdate", time(NULL));