summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-05-30 14:20:23 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-05-30 14:20:23 +0000
commit1ccbc1cce73b786581277a0d9b5ea2a0b0777ff7 (patch)
tree04fa4610698e8f210cf94f38b5bdb96b114c4df7 /plugins/PluginUpdater/src
parent13a5d7c94b811424a5a7db097689ed76e97abf63 (diff)
added icon in "found update" dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@4841 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp11
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp10
2 files changed, 11 insertions, 10 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index 5bf9e37746..2af4a24747 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -90,7 +90,7 @@ static void ApplyDownloads(void *param)
BackupFile(p.tszNewName, tszBackFile);
continue;
}
-
+
// if file name differs, we also need to backup the old file here
// otherwise it would be replaced by unzip
if ( _tcsicmp(p.tszOldName, p.tszNewName)) {
@@ -239,13 +239,13 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
///
SendMessage(hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES | LVS_EX_CHECKBOXES | LVS_EX_LABELTIP);
- ListView_DeleteAllItems(hwndList);
+ ListView_DeleteAllItems(hwndList);
///
OBJLIST<FILEINFO> &todo = *(OBJLIST<FILEINFO> *)lParam;
for (int i = 0; i < todo.getCount(); ++i) {
int groupId = 3;
- LVITEM lvi = {0};
+ LVITEM lvi = {0};
lvi.mask = LVIF_PARAM | LVIF_GROUPID | LVIF_TEXT | LVIF_IMAGE;
if (_tcschr(todo[i].tszOldName, L'\\') != NULL)
@@ -254,11 +254,10 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
lvi.iItem = i;
lvi.lParam = (LPARAM)&todo[i];
lvi.iGroupId = groupId;
- lvi.iImage = -1;
+ lvi.iImage = -1;
lvi.pszText = todo[i].tszOldName;
int iRow = ListView_InsertItem(hwndList, &lvi);
-
if (iRow != -1) {
lvi.iItem = iRow;
if (groupId == 1) {
@@ -394,7 +393,7 @@ static void GetList(void *)
TCHAR tszPath[MAX_PATH];
mir_sntprintf(tszPath, SIZEOF(tszPath), _T("%s\\%s"), dirname, hash.m_name);
-
+
if (GetFileAttributes(tszPath) != DWORD(-1))
continue;
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 38980a08d0..91ef9dd3e3 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -116,7 +116,7 @@ LBL_Exit:
BackupFile(p.tszNewName, tszBackFile);
continue;
}
-
+
// if file name differs, we also need to backup the old file here
// otherwise it would be replaced by unzip
if ( _tcsicmp(p.tszOldName, p.tszNewName)) {
@@ -150,8 +150,9 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
switch (message) {
case WM_INITDIALOG:
hwndDialog = hDlg;
- TranslateDialogDefault( hDlg );
+ TranslateDialogDefault(hDlg);
SendMessage(hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
+ SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon("check_update"));
{
OSVERSIONINFO osver = { sizeof(osver) };
if (GetVersionEx(&osver) && osver.dwMajorVersion >= 6)
@@ -296,6 +297,7 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
break;
case WM_DESTROY:
+ Skin_ReleaseIcon((HICON)SendMessage(hDlg, WM_SETICON, ICON_SMALL, 0));
Utils_SaveWindowPosition(hDlg, NULL, MODNAME, "ConfirmWindow");
hwndDialog = NULL;
delete (OBJLIST<FILEINFO> *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
@@ -396,7 +398,7 @@ static bool isValidExtension(const TCHAR *ptszFileName)
const TCHAR *pExt = _tcsrchr(ptszFileName, '.');
if (pExt == NULL)
return false;
-
+
if ( !_tcsicmp(pExt, _T(".dll"))) return true;
if ( !_tcsicmp(pExt, _T(".exe"))) return true;
if ( !_tcsicmp(pExt, _T(".txt"))) return true;
@@ -516,7 +518,7 @@ static void ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, cons
static void CheckUpdates(void *)
{
char szKey[64] = {0};
-
+
TCHAR tszTempPath[MAX_PATH];
DWORD dwLen = GetTempPath(SIZEOF(tszTempPath), tszTempPath);
if (tszTempPath[dwLen-1] == '\\')