diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-13 17:46:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-13 17:46:32 +0000 |
commit | 50684e9cd73ec3e3ccaa14c7732efa2f4654dbc3 (patch) | |
tree | 1fd69a8af25c405e9433cc6f0fcc4a12613e2720 /src | |
parent | 5e686292c537275c8ea1399f311c082d905e8a63 (diff) |
ugly clutch for the correct list sorting
git-svn-id: http://svn.miranda-ng.org/main/trunk@399 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 8 | ||||
-rw-r--r-- | src/resource.rc | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index f047793af5..f5805e7bc9 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -706,9 +706,9 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l LVITEM it = { 0 };
it.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
it.iImage = ( pi.pluginInfo->flags & 1 ) ? 0 : 1;
- it.pszText = fd->cFileName;
+ it.iItem = 100000; // add to the end
it.lParam = (LPARAM)dat;
- int iRow = SendMessage( hwndList, LVM_INSERTITEM, 0, (LPARAM)&it );
+ int iRow = ListView_InsertItem( hwndList, &it );
if ( isPluginOnWhiteList(fd->cFileName) )
ListView_SetItemState(hwndList, iRow, !isdb ? 0x2000 : 0x3000, LVIS_STATEIMAGEMASK);
if ( iRow != -1 ) {
@@ -804,11 +804,10 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar switch (msg) {
case WM_INITDIALOG:
{
- HWND hwndList=GetDlgItem(hwndDlg, IDC_PLUGLIST);
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_PLUGLIST);
SetWindowLongPtr(hwndList, GWLP_USERDATA, (LONG_PTR)GetWindowLongPtr(hwndList, GWLP_WNDPROC));
SetWindowLongPtr(hwndList, GWLP_WNDPROC, (LONG_PTR)PluginListWndProc);
- LVCOLUMN col;
HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 4, 0);
ImageList_AddIcon_IconLibLoaded( hIml, SKINICON_OTHER_UNICODE );
ImageList_AddIcon_IconLibLoaded( hIml, SKINICON_OTHER_ANSI );
@@ -818,6 +817,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar TranslateDialogDefault(hwndDlg);
+ LVCOLUMN col;
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.pszText = _T("");
col.cx = 40;
diff --git a/src/resource.rc b/src/resource.rc index a367648a04..db0eaf0522 100644 --- a/src/resource.rc +++ b/src/resource.rc @@ -899,7 +899,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "List1",IDC_PLUGLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,4,306,110
+ CONTROL "List1",IDC_PLUGLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_AUTOARRANGE | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,4,306,110
CONTROL "Download more plugins",IDC_GETMOREPLUGINS,"Hyperlink",WS_TABSTOP,4,116,306,8
GROUPBOX "",IDC_PLUGININFOFRAME,4,125,307,125,BS_RIGHT
EDITTEXT IDC_PLUGINLONGINFO,50,136,253,25,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | NOT WS_BORDER
@@ -1843,12 +1843,12 @@ END // TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include <windows.h>\r\n"
"#include <winres.h>\r\n"
@@ -1856,7 +1856,7 @@ BEGIN "\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -2039,4 +2039,3 @@ IDB_SORTCOLDOWN BITMAP "res/arrow_sort_column_down.bmp" /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
-
|