summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/PluginUpdater.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-05-22 20:15:32 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-05-22 20:15:32 +0000
commitba020540c064ebd48bf6b77e5bd5e11255766f23 (patch)
treead87b13d4dbc6cc43a489aa1022b28b48d0e2dd5 /plugins/PluginUpdater/src/PluginUpdater.cpp
parentc09aa99a7e9915c503064d6eb5e9dd1bdd2a673f (diff)
-PluginUpdater:
-code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@13765 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/PluginUpdater.cpp')
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index b77d93d3a8..900c9bd34e 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -88,18 +88,22 @@ extern "C" __declspec(dllexport) int Load(void)
InitCheck();
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 400010000;
+#if MIRANDA_VER >= 0x0A00
+ mi.icolibItem = iconList[0].hIcolib;
+#else
mi.icolibItem = Skin_GetIconHandle("check_update");
+#endif
mi.pszName = LPGEN("Check for updates");
- mi.pszService = MODNAME"/CheckUpdates";
+ mi.pszService = MS_PU_CHECKUPDATES;
Menu_AddMainMenuItem(&mi);
#if MIRANDA_VER >= 0x0A00
InitListNew();
mi.position++;
- mi.icolibItem = Skin_GetIconHandle("plg_list");
+ mi.icolibItem = iconList[2].hIcolib;
mi.pszName = LPGEN("Available components list");
- mi.pszService = MODNAME"/ShowList";
+ mi.pszService = MS_PU_SHOWLIST;
Menu_AddMainMenuItem(&mi);
InitOptions();
@@ -110,7 +114,7 @@ extern "C" __declspec(dllexport) int Load(void)
hkd.pszName = "Check for updates";
hkd.pszDescription = "Check for updates";
hkd.pszSection = "Plugin Updater";
- hkd.pszService = MODNAME"/CheckUpdates";
+ hkd.pszService = MS_PU_CHECKUPDATES;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
Hotkey_Register(&hkd);
@@ -120,7 +124,8 @@ extern "C" __declspec(dllexport) int Load(void)
// add sounds
SkinAddNewSoundEx("updatecompleted", LPGEN("Plugin Updater"), LPGEN("Update completed"));
SkinAddNewSoundEx("updatefailed", LPGEN("Plugin Updater"), LPGEN("Update failed"));
-
+
+#if MIRANDA_VER >= 0x0A00
// Upgrade old settings
if (-1 == db_get_b(0, MODNAME, DB_SETTING_UPDATE_MODE, -1)) {
ptrT dbvUpdateURL(db_get_tsa(0, MODNAME, DB_SETTING_UPDATE_URL));
@@ -140,6 +145,7 @@ extern "C" __declspec(dllexport) int Load(void)
else db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_CUSTOM);
}
}
+#endif
return 0;
}