summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-05-22 21:29:11 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-05-22 21:29:11 +0000
commit136c729251634b60b2d948dd0291be8fb2de911d (patch)
tree7dbe37ed57d8e655a576a74cfabcc8b4041fd34a
parent65aa3fa63030769ceeca17d4a82f915c185dc734 (diff)
^... and compilation fixes for IM Updater
git-svn-id: http://svn.miranda-ng.org/main/trunk@13767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_pluginupdater.h1
-rw-r--r--plugins/PluginUpdater/src/Common.h6
-rw-r--r--plugins/PluginUpdater/src/Compat/compat.h9
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp10
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp5
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp8
6 files changed, 22 insertions, 17 deletions
diff --git a/include/m_pluginupdater.h b/include/m_pluginupdater.h
index 78e1dfd6f6..d2b695264c 100644
--- a/include/m_pluginupdater.h
+++ b/include/m_pluginupdater.h
@@ -66,7 +66,6 @@ typedef struct {
#define MS_PU_GETNTHHASH "PluginUpdater/GetNthCount"
-#define MS_PU_RESTART "PluginUpdater/RestartMe"
#define MS_PU_SHOWLIST "PluginUpdater/ShowList"
#define MS_PU_CHECKUPDATES "PluginUpdater/CheckUpdates"
#endif // M_PLUGINUPDATER_H__
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h
index 363b084848..db9a31d0a4 100644
--- a/plugins/PluginUpdater/src/Common.h
+++ b/plugins/PluginUpdater/src/Common.h
@@ -107,6 +107,7 @@ extern struct PlugOptions
#define DEFAULT_UPDATE_URL "http://miranda-ng.org/distr/stable/x%platform%"
#define DEFAULT_UPDATE_URL_TRUNK "http://miranda-ng.org/distr/x%platform%"
#define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS "http://miranda-ng.org/distr/pdb_x%platform%"
+#define PLUGIN_INFO_URL _T("http://miranda-ng.org/p/%s")
#define UPDATE_MODE_CUSTOM 0
#define UPDATE_MODE_STABLE 1
@@ -136,8 +137,9 @@ extern HINSTANCE hInst;
extern TCHAR tszRoot[MAX_PATH], tszTempPath[MAX_PATH];
extern aPopups PopupsList[POPUPS];
extern HANDLE hPipe, hNetlibUser;
+#if MIRANDA_VER >= 0x0A00
extern IconItemT iconList[];
-
+#endif
void UninitCheck(void);
void UninitListNew(void);
@@ -212,8 +214,6 @@ void __stdcall OpenPluginOptions(void*);
void CheckUpdateOnStartup();
void InitTimer(void *type);
-int ImageList_AddIconFromIconLib(HIMAGELIST hIml, int i);
-
bool unzip(const TCHAR *ptszZipFile, TCHAR *ptszDestPath, TCHAR *ptszBackPath,bool ch);
void strdel(TCHAR *parBuffer, int len);
diff --git a/plugins/PluginUpdater/src/Compat/compat.h b/plugins/PluginUpdater/src/Compat/compat.h
index 01f6536b71..fe68dfdcf0 100644
--- a/plugins/PluginUpdater/src/Compat/compat.h
+++ b/plugins/PluginUpdater/src/Compat/compat.h
@@ -1,7 +1,9 @@
#define MIID_UPDATER {0x4a47b19b, 0xde5a, 0x4436, { 0xab, 0x4b, 0xe1, 0xf3, 0xa0, 0x22, 0x5d, 0xe7}}
#include <m_database.h>
-#include "..\..\..\..\include\m_pluginupdater.h"
+
+#define MS_PU_SHOWLIST "PluginUpdater/ShowList"
+#define MS_PU_CHECKUPDATES "PluginUpdater/CheckUpdates"
#define db_free(A) DBFreeVariant(A)
@@ -86,8 +88,7 @@ static iconList[] =
{
{ "check_update", LPGEN("Check for updates"), IDI_MENU },
{ "info", LPGEN("Plugin info"), IDI_INFO },
- { "plg_list", LPGEN("Component list"), IDI_PLGLIST },
- { "plg_restart", LPGEN("Restart"), IDI_RESTART },
+ { "plg_list", LPGEN("Component list"), IDI_PLGLIST }
};
__forceinline INT_PTR Options_Open(OPENOPTIONSDIALOG *ood)
@@ -104,7 +105,7 @@ char *bin2hex(const void *pData, size_t len, char *dest);
char *rtrim(char *str);
void CreatePathToFileT(TCHAR *ptszPath);
int wildcmpit(const WCHAR *name, const WCHAR *mask);
-void InitIcoLib()
+void InitIcoLib();
#define NEWTSTR_ALLOCA(A) (A == NULL)?NULL:_tcscpy((TCHAR*)alloca((_tcslen(A)+1) *sizeof(TCHAR)), A)
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index a51d146b9a..406f3bb282 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -113,7 +113,7 @@ static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
TCHAR *p = _tcschr(tszFileName, L'.'); *p = 0;
TCHAR link[MAX_PATH];
- mir_sntprintf(link, SIZEOF(link), _T("http://miranda-ng.org/p/%s"), tszFileName);
+ mir_sntprintf(link, SIZEOF(link), PLUGIN_INFO_URL, tszFileName);
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM) link);
}
}
@@ -135,6 +135,14 @@ static int ListDlg_Resize(HWND, LPARAM, UTILRESIZECONTROL *urc)
return RD_ANCHORX_LEFT | RD_ANCHORY_TOP | RD_ANCHORX_WIDTH | RD_ANCHORY_HEIGHT;
}
+int ImageList_AddIconFromIconLib(HIMAGELIST hIml, int i)
+{
+ HICON icon = Skin_GetIconByHandle(iconList[i].hIcolib);
+ int res = ImageList_AddIcon(hIml, icon);
+ Skin_ReleaseIcon(icon);
+ return res;
+}
+
INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 3dd823458f..22048b325c 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -160,8 +160,13 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
case WM_INITDIALOG:
TranslateDialogDefault(hDlg);
SendMessage(hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
+#if MIRANDA_VER >= 0x0A00
SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIconByHandle(iconList[0].hIcolib));
SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIconByHandle(iconList[0].hIcolib, 1));
+#else
+ SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon("check_update"));
+ SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon("check_update",1));
+#endif
{
OSVERSIONINFO osver = { sizeof(osver) };
if (GetVersionEx(&osver) && osver.dwMajorVersion >= 6)
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index 9edd5348be..8e869d2349 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -139,11 +139,3 @@ void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number)
if (Number == POPUP_TYPE_ERROR)
MessageBox(0, ptszText, ptszTitle, MB_ICONINFORMATION);
}
-
-int ImageList_AddIconFromIconLib(HIMAGELIST hIml, int i)
-{
- HICON icon = Skin_GetIconByHandle(iconList[i].hIcolib);
- int res = ImageList_AddIcon(hIml, icon);
- Skin_ReleaseIcon(icon);
- return res;
-}