diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-20 11:05:02 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-20 11:05:02 +0000 |
commit | 7e0f9f7347ca4a778d1a6167a878de12fd4baa03 (patch) | |
tree | 52f0a3ea277b768da11af5496ea6fb43f849b287 /src/modules | |
parent | d5f2141939a3bbeeebf47350c982e7c72954d643 (diff) |
profile manager redesigned
git-svn-id: http://svn.miranda-ng.org/main/trunk@5753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/database/profilemanager.cpp | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 267fcde3f3..2dcea188d7 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -316,14 +316,6 @@ BOOL EnumProfilesForList(TCHAR *fullpath, TCHAR *profile, LPARAM lParam) SendMessage(hwndList, LVM_SETITEMTEXT, iItem, (LPARAM)&item);
}
}
-
- item2.iSubItem = 3;
- item2.pszText = rtrimt(_tctime(&statbuf.st_ctime));
- SendMessage(hwndList, LVM_SETITEMTEXT, iItem, (LPARAM)&item2);
-
- item2.iSubItem = 4;
- item2.pszText = rtrimt(_tctime(&statbuf.st_mtime));
- SendMessage(hwndList, LVM_SETITEMTEXT, iItem, (LPARAM)&item2);
}
return TRUE;
}
@@ -393,25 +385,17 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam, LVCOLUMN col;
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.pszText = TranslateT("Profile");
- col.cx = 122;
+ col.cx = 100;
ListView_InsertColumn(hwndList, 0, &col);
col.pszText = TranslateT("Driver");
- col.cx = 100;
+ col.cx = 150;
ListView_InsertColumn(hwndList, 1, &col);
col.pszText = TranslateT("Size");
col.cx = 60;
ListView_InsertColumn(hwndList, 2, &col);
- col.pszText = TranslateT("Created");
- col.cx = 145;
- ListView_InsertColumn(hwndList, 3, &col);
-
- col.pszText = TranslateT("Modified");
- col.cx = 145;
- ListView_InsertColumn(hwndList, 4, &col);
-
// icons
HIMAGELIST hImgList = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16), 2, 1);
ImageList_AddIcon_NotShared(hImgList, MAKEINTRESOURCE(IDI_USERDETAILS));
@@ -421,7 +405,7 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList, GWL_STYLE) | LVS_SORTASCENDING);
ListView_SetImageList(hwndList, hImgList, LVSIL_SMALL);
ListView_SetExtendedListViewStyle(hwndList,
- ListView_GetExtendedListViewStyle(hwndList) | LVS_EX_DOUBLEBUFFER | LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT);
+ ListView_GetExtendedListViewStyle(hwndList) | LVS_EX_DOUBLEBUFFER | LVS_EX_INFOTIP | LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT);
// find all the profiles
ProfileEnumData ped = { hwndDlg, dat->pd->szProfile };
@@ -543,6 +527,20 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam, DeleteProfile(hwndList, ListView_GetNextItem(hwndList, -1, LVNI_SELECTED | LVNI_ALL), dat);
break;
}
+ case LVN_GETINFOTIP:
+ {
+ NMLVGETINFOTIP *pInfoTip = (NMLVGETINFOTIP *)lParam;
+ if (pInfoTip != NULL)
+ {
+ TCHAR profilename[MAX_PATH], fullpath[MAX_PATH];
+ struct _stat statbuf;
+ ListView_GetItemText(hwndList, pInfoTip->iItem, 0, profilename, MAX_PATH);
+ mir_sntprintf(fullpath, SIZEOF(fullpath), _T("%s\\%s\\%s.dat"), dat->pd->szProfileDir, profilename, profilename);
+ _tstat(fullpath, &statbuf);
+ mir_sntprintf(pInfoTip->pszText, pInfoTip->cchTextMax, _T("%s\n%s: %s\n%s: %s"), fullpath, TranslateT("Created"), rtrimt(NEWTSTR_ALLOCA(_tctime(&statbuf.st_ctime))), TranslateT("Modified"), rtrimt(NEWTSTR_ALLOCA(_tctime(&statbuf.st_mtime))));
+ }
+ }
+ break;
}
}
break;
@@ -562,8 +560,8 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, {
struct DlgProfData * prof = (struct DlgProfData *)lParam;
PROPSHEETHEADER *psh = prof->psh;
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_USERDETAILS), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_USERDETAILS), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_DETAILSLOGO), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_DETAILSLOGO), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0));
dat = (struct DetailsData*)mir_alloc(sizeof(struct DetailsData));
dat->prof = prof;
prof->hwndOK = GetDlgItem(hwndDlg, IDOK);
@@ -572,8 +570,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
TCHAR buf[512];
- mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s\n%s"), TranslateT("Miranda Profiles from"), prof->pd->szProfileDir,
- TranslateT("Select or create your Miranda NG user profile"));
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), TranslateT("Miranda NG Profile Manager"), TranslateT("Manage your Miranda NG profile"));
SetDlgItemText(hwndDlg, IDC_NAME, buf);
dat->currentPage = 0;
|