diff options
-rw-r--r-- | plugins/PluginUpdater/src/DlgListNew.cpp | 89 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 24 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Notifications.cpp | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Options.cpp | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 38 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 50 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/stdafx.h | 14 |
7 files changed, 98 insertions, 121 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index 4721c17106..204a84e06f 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -42,37 +42,9 @@ static void __stdcall OpenPluginOptions(void *) g_plugin.openOptions(nullptr, L"Plugins");
}
-static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+static int ImageList_AddIconFromIconLib(HIMAGELIST hIml, int i)
{
- if (msg == WM_LBUTTONDOWN) {
- LVHITTESTINFO hi;
- hi.pt.x = LOWORD(lParam); hi.pt.y = HIWORD(lParam);
- ListView_SubItemHitTest(hwnd, &hi);
- if ((hi.iSubItem == 0) && (hi.flags & LVHT_ONITEMICON)) {
- LVITEM lvi = { 0 };
- lvi.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_GROUPID;
- lvi.stateMask = -1;
- lvi.iItem = hi.iItem;
- if (ListView_GetItem(hwnd, &lvi) && lvi.iGroupId == 1) {
- FILEINFO *info = (FILEINFO *)lvi.lParam;
-
- TFileName wszFileName;
- wcscpy(wszFileName, wcsrchr(info->wszNewName, L'\\') + 1);
- wchar_t *p = wcschr(wszFileName, L'.'); *p = 0;
-
- TFileName link;
- mir_snwprintf(link, PLUGIN_INFO_URL, wszFileName);
- Utils_OpenUrlW(link);
- }
- }
- }
-
- return mir_callNextSubclass(hwnd, PluginListWndProc, msg, wParam, lParam);
-}
-
-int ImageList_AddIconFromIconLib(HIMAGELIST hIml, int i)
-{
- HICON icon = IcoLib_GetIconByHandle(iconList[i].hIcolib);
+ HICON icon = g_plugin.getIcon(i);
int res = ImageList_AddIcon(hIml, icon);
IcoLib_ReleaseIcon(icon);
return res;
@@ -143,18 +115,18 @@ public: btnNone.OnClick = Callback(this, &CMissingPLuginsDlg::onClick_None);
m_filter.OnChange = Callback(this, &CMissingPLuginsDlg::onChange_Filter);
- m_list.OnItemChanged = Callback(this, &CMissingPLuginsDlg::onItemChanged);
+ m_list.OnItemChanged = Callback(this, &CMissingPLuginsDlg::onItemChanged_List);
+ m_list.OnClick = Callback(this, &CMissingPLuginsDlg::onClick_List);
}
bool OnInitDialog() override
{
hwndDialog = m_hwnd;
- mir_subclassWindow(m_list.GetHwnd(), PluginListWndProc);
- Window_SetIcon_IcoLib(m_hwnd, iconList[2].hIcolib);
+ Window_SetIcon_IcoLib(m_hwnd, g_plugin.getIconHandle(IDI_PLGLIST));
HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 4, 0);
- ImageList_AddIconFromIconLib(hIml, 1);
+ ImageList_AddIconFromIconLib(hIml, IDI_INFO);
m_list.SetImageList(hIml, LVSIL_SMALL);
if (IsWinVer7Plus()) {
@@ -250,7 +222,31 @@ public: return RD_ANCHORX_LEFT | RD_ANCHORY_TOP | RD_ANCHORX_WIDTH | RD_ANCHORY_HEIGHT;
}
- void onItemChanged(CCtrlListView::TEventInfo *ev)
+ void onClick_List(CCtrlListView::TEventInfo *ev)
+ {
+ LVHITTESTINFO hi;
+ hi.pt = ev->nmlv->ptAction;
+ m_list.SubItemHitTest(&hi);
+ if ((hi.iSubItem == 0) && (hi.flags & LVHT_ONITEMICON)) {
+ LVITEM lvi = { 0 };
+ lvi.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_GROUPID;
+ lvi.stateMask = -1;
+ lvi.iItem = hi.iItem;
+ if (m_list.GetItem(&lvi) && lvi.iGroupId == 1) {
+ FILEINFO *info = (FILEINFO *)lvi.lParam;
+
+ TFileName wszFileName;
+ wcscpy(wszFileName, wcsrchr(info->wszNewName, L'\\') + 1);
+ wchar_t *p = wcschr(wszFileName, L'.'); *p = 0;
+
+ TFileName link;
+ mir_snwprintf(link, PLUGIN_INFO_URL, wszFileName);
+ Utils_OpenUrlW(link);
+ }
+ }
+ }
+
+ void onItemChanged_List(CCtrlListView::TEventInfo *ev)
{
if (m_bFillingList)
return;
@@ -384,7 +380,7 @@ static FILEINFO* ServerEntryToFileInfo(const ServListEntry &hash, const wchar_t* FileInfo->File.CRCsum = hash.m_crc;
// Load list of checked Plugins from database
- Netlib_LogfW(hNetlibUser, L"File %s found", FileInfo->wszOldName);
+ Netlib_LogfW(g_hNetlibUser, L"File %s found", FileInfo->wszOldName);
FileInfo->bEnabled = db_get_b(0, DB_MODULE_NEW_FILES, _T2A(FileInfo->wszOldName)) != 0;
return FileInfo;
}
@@ -431,7 +427,10 @@ static void GetList(void *) hListThread = nullptr;
}
-static void DoGetList()
+/////////////////////////////////////////////////////////////////////////////////////////
+// Services
+
+static INT_PTR ShowListCommand(WPARAM, LPARAM)
{
if (hListThread)
ShowPopup(TranslateT("Plugin Updater"), TranslateT("List loading already started!"), POPUP_TYPE_INFO);
@@ -441,17 +440,7 @@ static void DoGetList() SetFocus(hwndDialog);
}
else hListThread = mir_forkthread(GetList);
-}
-
-void UninitListNew()
-{
- if (hwndDialog != nullptr)
- DestroyWindow(hwndDialog);
-}
-static INT_PTR ShowListCommand(WPARAM, LPARAM)
-{
- DoGetList();
return 0;
}
@@ -509,3 +498,9 @@ void InitListNew() CreateServiceFunction(MODULENAME "/ParseUri", ParseUriService);
CreateServiceFunction(MS_PU_SHOWLIST, ShowListCommand);
}
+
+void UninitListNew()
+{
+ if (hwndDialog != nullptr)
+ DestroyWindow(hwndDialog);
+}
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index b34306bed1..3629ced550 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -201,7 +201,7 @@ public: hwndDialog = m_hwnd;
m_list.SendMsg(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
- Window_SetIcon_IcoLib(m_hwnd, iconList[0].hIcolib);
+ Window_SetIcon_IcoLib(m_hwnd, g_plugin.getIconHandle(IDI_MENU));
if (IsWinVerVistaPlus()) {
TFileName wszPath;
@@ -654,7 +654,7 @@ static int ScanFolder(const wchar_t *pwszFolder, size_t cbBaseLen, const wchar_t if (hFind == INVALID_HANDLE_VALUE)
return 0;
- Netlib_LogfW(hNetlibUser, L"Scanning folder %s", pwszFolder);
+ Netlib_LogfW(g_hNetlibUser, L"Scanning folder %s", pwszFolder);
int count = 0;
do {
@@ -676,9 +676,9 @@ static int ScanFolder(const wchar_t *pwszFolder, size_t cbBaseLen, const wchar_t // calculate the current file's relative name and store it into wszNewName
if (CheckFileRename(ffd.cFileName, wszNewName)) {
if (wszNewName[0])
- Netlib_LogfW(hNetlibUser, L"File <%s> will be renamed to <%s>", wszBuf, wszNewName);
+ Netlib_LogfW(g_hNetlibUser, L"File <%s> will be renamed to <%s>", wszBuf, wszNewName);
else
- Netlib_LogfW(hNetlibUser, L"File <%s> will be deleted", wszBuf);
+ Netlib_LogfW(g_hNetlibUser, L"File <%s> will be deleted", wszBuf);
}
else {
if (level == 0) {
@@ -710,7 +710,7 @@ static int ScanFolder(const wchar_t *pwszFolder, size_t cbBaseLen, const wchar_t if (item == nullptr) {
wchar_t *p = wcsrchr(wszNewName, '.');
if (p[-1] != 'w' && p[-1] != 'W') {
- Netlib_LogfW(hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
+ Netlib_LogfW(g_hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
continue;
}
@@ -718,7 +718,7 @@ static int ScanFolder(const wchar_t *pwszFolder, size_t cbBaseLen, const wchar_t int iPos = int(p - wszNewName) - 1;
strdelw(p - 1, 1);
if ((item = hashes.find((ServListEntry*)&pName)) == nullptr) {
- Netlib_LogfW(hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
+ Netlib_LogfW(g_hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
continue;
}
@@ -733,24 +733,24 @@ static int ScanFolder(const wchar_t *pwszFolder, size_t cbBaseLen, const wchar_t CalculateModuleHash(wszBuf, szMyHash);
// hashes are the same, skipping
if (strcmp(szMyHash, item->m_szHash) == 0) {
- Netlib_LogfW(hNetlibUser, L"File %s: Already up-to-date, skipping", ffd.cFileName);
+ Netlib_LogfW(g_hNetlibUser, L"File %s: Already up-to-date, skipping", ffd.cFileName);
continue;
}
- else Netlib_LogfW(hNetlibUser, L"File %s: Update available", ffd.cFileName);
+ else Netlib_LogfW(g_hNetlibUser, L"File %s: Update available", ffd.cFileName);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
// smth went wrong, reload a file from scratch
}
}
- else Netlib_LogfW(hNetlibUser, L"File %s: Forcing redownload", ffd.cFileName);
+ else Netlib_LogfW(g_hNetlibUser, L"File %s: Forcing redownload", ffd.cFileName);
pwszUrl = item->m_name;
MyCRC = item->m_crc;
}
else {
// file was marked for deletion, add it to the list anyway
- Netlib_LogfW(hNetlibUser, L"File %s: Marked for deletion", ffd.cFileName);
+ Netlib_LogfW(g_hNetlibUser, L"File %s: Marked for deletion", ffd.cFileName);
pwszUrl = L"";
MyCRC = 0;
}
@@ -801,7 +801,7 @@ static int ScanFolder(const wchar_t *pwszFolder, size_t cbBaseLen, const wchar_t // Thread checks for updates
static void CheckUpdates(void *)
{
- Netlib_LogfW(hNetlibUser, L"Checking for updates");
+ Netlib_LogfW(g_hNetlibUser, L"Checking for updates");
Thread_SetName("PluginUpdater: CheckUpdates");
ThreadWatch threadId(dwCheckThreadId);
@@ -872,7 +872,7 @@ void CALLBACK CheckUpdateOnStartup() if (time(0) - g_plugin.dwLastUpdate < 86400)
return;
- Netlib_LogfW(hNetlibUser, L"Update on startup started!");
+ Netlib_LogfW(g_hNetlibUser, L"Update on startup started!");
DoCheck();
}
}
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp index b3ef00ef7c..92488184d3 100644 --- a/plugins/PluginUpdater/src/Notifications.cpp +++ b/plugins/PluginUpdater/src/Notifications.cpp @@ -102,7 +102,7 @@ void ShowPopup(LPCTSTR pwszTitle, LPCTSTR pwszText, int Number) if (g_plugin.getByte(setting, DEFAULT_POPUP_ENABLED)) {
POPUPDATAW ppd;
ppd.lchContact = NULL;
- ppd.lchIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib);
+ ppd.lchIcon = g_plugin.getIcon(IDI_MENU);
if (Number == POPUP_TYPE_MSG) {
ppd.PluginWindowProc = PopupDlgProcRestart;
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index 8a44851cac..bf015eccb3 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -290,7 +290,7 @@ public: // if user tried to change the channel, run the update dialog immediately
if (bStartUpdate) {
- Netlib_Log(hNetlibUser, "Platform changed, let's check for updates");
+ Netlib_Log(g_hNetlibUser, "Platform changed, let's check for updates");
DoCheck(false);
}
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index f2573eba88..43bd03f1af 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -67,15 +67,24 @@ CMPlugin::CMPlugin() : /////////////////////////////////////////////////////////////////////////////////////////
+static IconItem iconList[] =
+{
+ { LPGEN("Check for updates"),"check_update", IDI_MENU },
+ { LPGEN("Plugin info"), "info", IDI_INFO },
+ { LPGEN("Component list"),"plg_list", IDI_PLGLIST }
+};
+
static INT_PTR MenuCommand(WPARAM, LPARAM)
{
- Netlib_LogfW(hNetlibUser, L"Update started manually!");
+ Netlib_LogfW(g_hNetlibUser, L"Update started manually!");
DoCheck(false);
return 0;
}
int CMPlugin::Load()
{
+ g_plugin.registerIcon(MODULEA, iconList);
+
m_impl.m_timer.Start(60 * 1000);
InitTimer(0);
@@ -85,16 +94,23 @@ int CMPlugin::Load() if (g_wszTempPath[dwLen-1] == '\\')
g_wszTempPath[dwLen-1] = 0;
+ // Netlib initialization
+ NETLIBUSER nlu = {};
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
+ nlu.szDescriptiveName.w = TranslateT("Plugin Updater HTTP connections");
+ nlu.szSettingsModule = MODULENAME;
+ g_hNetlibUser = Netlib_RegisterUser(&nlu);
+
InitPopupList();
- InitNetlib();
- InitIcoLib();
+ InitEvents();
+ InitListNew();
// Add hotkey
HOTKEYDESC hkd = {};
hkd.pszName = "Check for updates";
hkd.szDescription.a = "Check for updates";
hkd.szSection.a = "Plugin Updater";
- hkd.pszService = "PluginUpdater/CheckUpdates";
+ hkd.pszService = MS_PU_CHECK;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
g_plugin.addHotkey(&hkd);
@@ -102,24 +118,19 @@ int CMPlugin::Load() CMenuItem mi(&g_plugin);
SET_UID(mi, 0xfa2cbe01, 0x3b37, 0x4a4c, 0xa6, 0x97, 0xe4, 0x6f, 0x31, 0xa9, 0xfc, 0x33);
mi.name.a = LPGEN("Check for updates");
- mi.hIcolibItem = iconList[0].hIcolib;
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_MENU);
mi.position = 400010000;
- mi.pszService = hkd.pszService;
+ mi.pszService = MS_PU_CHECK;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, MenuCommand);
- InitListNew();
-
SET_UID(mi, 0xafe94fad, 0xea83, 0x41aa, 0xa4, 0x26, 0xcb, 0x4a, 0x1c, 0x37, 0xc1, 0xd3);
mi.position++;
- mi.hIcolibItem = iconList[2].hIcolib;
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_PLGLIST);
mi.name.a = LPGEN("Available components list");
mi.pszService = MS_PU_SHOWLIST;
Menu_AddMainMenuItem(&mi);
- // initialize event hooks
- InitEvents();
-
// add sounds
g_plugin.addSound("updatefailed", LPGENW("Plugin Updater"), LPGENW("Update failed"));
g_plugin.addSound("updatecompleted", LPGENW("Plugin Updater"), LPGENW("Update completed"));
@@ -132,7 +143,8 @@ int CMPlugin::Unload() {
m_impl.m_timer.Stop();
+ Netlib_CloseHandle(g_hNetlibUser); g_hNetlibUser = nullptr;
+
UnloadListNew();
- UnloadNetlib();
return 0;
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 41760a5303..f76e47237e 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -19,36 +19,10 @@ Boston, MA 02111-1307, USA. #include "stdafx.h"
-HNETLIBUSER hNetlibUser = nullptr;
+HNETLIBUSER g_hNetlibUser = nullptr;
/////////////////////////////////////////////////////////////////////////////////////
-
-IconItem iconList[] =
-{
- { LPGEN("Check for updates"),"check_update", IDI_MENU },
- { LPGEN("Plugin info"), "info", IDI_INFO },
- { LPGEN("Component list"),"plg_list", IDI_PLGLIST }
-};
-
-void InitIcoLib()
-{
- g_plugin.registerIcon(MODULEA, iconList);
-}
-
-void InitNetlib()
-{
- NETLIBUSER nlu = {};
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
- nlu.szDescriptiveName.w = TranslateT("Plugin Updater HTTP connections");
- nlu.szSettingsModule = MODULENAME;
- hNetlibUser = Netlib_RegisterUser(&nlu);
-}
-
-void UnloadNetlib()
-{
- Netlib_CloseHandle(hNetlibUser);
- hNetlibUser = nullptr;
-}
+// Hashes processing
int CompareHashes(const ServListEntry *p1, const ServListEntry *p2)
{
@@ -79,14 +53,14 @@ bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes) Netlib_CloseHandle(nlc);
if (!ret) {
- Netlib_LogfW(hNetlibUser, L"Downloading list of available updates from %s failed", baseUrl.get());
+ Netlib_LogfW(g_hNetlibUser, L"Downloading list of available updates from %s failed", baseUrl.get());
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
Skin_PlaySound("updatefailed");
return false;
}
if (unzip(pFileUrl.wszDiskPath, g_wszTempPath, nullptr, true)) {
- Netlib_LogfW(hNetlibUser, L"Unzipping list of available updates from %s failed", baseUrl.get());
+ Netlib_LogfW(g_hNetlibUser, L"Unzipping list of available updates from %s failed", baseUrl.get());
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
Skin_PlaySound("updatefailed");
return false;
@@ -98,7 +72,7 @@ bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes) mir_snwprintf(wszTmpIni, L"%s\\hashes.txt", g_wszTempPath);
FILE *fp = _wfopen(wszTmpIni, L"r");
if (!fp) {
- Netlib_LogfW(hNetlibUser, L"Opening %s failed", g_wszTempPath);
+ Netlib_LogfW(g_hNetlibUser, L"Opening %s failed", g_wszTempPath);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
return false;
}
@@ -112,7 +86,7 @@ bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes) bDoNotSwitchToStable = true;
}
else if (str[0] != ';') { // ';' marks a comment
- Netlib_Logf(hNetlibUser, "Update: %s", str);
+ Netlib_Logf(g_hNetlibUser, "Update: %s", str);
char *p = strchr(str, ' ');
if (p != nullptr) {
*p++ = 0;
@@ -186,8 +160,8 @@ bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc) nlhr.headers = headers;
for (int i = 0; i < MAX_RETRIES; i++) {
- Netlib_LogfW(hNetlibUser, L"Downloading file %s to %s (attempt %d)", pFileURL->wszDownloadURL, pFileURL->wszDiskPath, i + 1);
- NLHR_PTR pReply(Netlib_HttpTransaction(hNetlibUser, &nlhr));
+ Netlib_LogfW(g_hNetlibUser, L"Downloading file %s to %s (attempt %d)", pFileURL->wszDownloadURL, pFileURL->wszDiskPath, i + 1);
+ NLHR_PTR pReply(Netlib_HttpTransaction(g_hNetlibUser, &nlhr));
if (pReply) {
nlc = pReply->nlc;
if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) {
@@ -196,7 +170,7 @@ bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc) int crc = crc32(0, (unsigned char *)pReply->pData, pReply->dataLength);
if (crc != pFileURL->CRCsum) {
// crc check failed, try again
- Netlib_LogfW(hNetlibUser, L"crc check failed for file %s", pFileURL->wszDiskPath);
+ Netlib_LogfW(g_hNetlibUser, L"crc check failed for file %s", pFileURL->wszDiskPath);
continue;
}
}
@@ -221,15 +195,15 @@ bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc) }
return true;
}
- Netlib_LogfW(hNetlibUser, L"Downloading file %s failed with error %d", pFileURL->wszDownloadURL, pReply->resultCode);
+ Netlib_LogfW(g_hNetlibUser, L"Downloading file %s failed with error %d", pFileURL->wszDownloadURL, pReply->resultCode);
}
else {
- Netlib_LogfW(hNetlibUser, L"Downloading file %s failed, host is propably temporary down.", pFileURL->wszDownloadURL);
+ Netlib_LogfW(g_hNetlibUser, L"Downloading file %s failed, host is propably temporary down.", pFileURL->wszDownloadURL);
nlc = nullptr;
}
}
- Netlib_LogfW(hNetlibUser, L"Downloading file %s failed, giving up", pFileURL->wszDownloadURL);
+ Netlib_LogfW(g_hNetlibUser, L"Downloading file %s failed, giving up", pFileURL->wszDownloadURL);
return false;
}
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index 190fb1ee17..5d0690310e 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -55,6 +55,7 @@ extern "C" #include <m_autobackups.h>
+#define MS_PU_CHECK "PluginUpdater/CheckUpdates"
#define MS_PU_SHOWLIST "PluginUpdater/ShowList"
#include "Notifications.h"
@@ -150,9 +151,7 @@ using namespace std; extern DWORD g_mirandaVersion;
extern wchar_t g_wszRoot[MAX_PATH], g_wszTempPath[MAX_PATH];
-extern HNETLIBUSER hNetlibUser;
-
-extern IconItem iconList[];
+extern HNETLIBUSER g_hNetlibUser;
struct CMPlugin : public PLUGIN<CMPlugin>
{
@@ -237,13 +236,10 @@ typedef OBJLIST<ServListEntry> SERVLIST; ///////////////////////////////////////////////////////////////////////////////
void InitPopupList();
-void InitNetlib();
-void InitIcoLib();
void InitEvents();
-void InitListNew();
+void InitListNew();
void UnloadListNew();
-void UnloadNetlib();
void CALLBACK RestartPrompt(void *);
void CALLBACK CheckUpdateOnStartup(void);
@@ -254,11 +250,11 @@ bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes); int CompareHashes(const ServListEntry *p1, const ServListEntry *p2);
wchar_t* GetDefaultUrl();
-bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc);
+bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc);
void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number);
-int unzip(const wchar_t *pwszZipFile, wchar_t *pwszDestPath, wchar_t *pwszBackPath, bool ch);
+int unzip(const wchar_t *pwszZipFile, wchar_t *pwszDestPath, wchar_t *pwszBackPath, bool ch);
///////////////////////////////////////////////////////////////////////////////
|