diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stduserinfo/res/resource.rc | 2 | ||||
-rw-r--r-- | src/core/stduserinfo/src/stdafx.h | 1 | ||||
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 12 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/core/stduserinfo/res/resource.rc b/src/core/stduserinfo/res/resource.rc index 6ec5cfbd2b..d918243365 100644 --- a/src/core/stduserinfo/res/resource.rc +++ b/src/core/stduserinfo/res/resource.rc @@ -69,7 +69,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN
CONTROL "View personal user details and more",IDC_HEADERBAR,
"MHeaderbarCtrl",0x0,0,0,318,25
- CONTROL "",IDC_PAGETREE,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_NOTOOLTIPS | TVS_TRACKSELECT | TVS_FULLROWSELECT | TVS_NONEVENHEIGHT | WS_HSCROLL | WS_TABSTOP,3,30,76,176,WS_EX_STATICEDGE
+ CONTROL "",IDC_PAGETREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_NOTOOLTIPS | TVS_TRACKSELECT | TVS_NOHSCROLL | TVS_NONEVENHEIGHT | WS_TABSTOP,3,30,76,176,WS_EX_STATICEDGE
PUSHBUTTON "Update now",IDC_UPDATE,85,191,55,14,WS_DISABLED
CTEXT "Updating",IDC_UPDATING,145,194,113,8,SS_NOPREFIX | SS_CENTERIMAGE
DEFPUSHBUTTON "OK",IDOK,263,191,50,14
diff --git a/src/core/stduserinfo/src/stdafx.h b/src/core/stduserinfo/src/stdafx.h index d5e61f94f5..9e2c046e9f 100644 --- a/src/core/stduserinfo/src/stdafx.h +++ b/src/core/stduserinfo/src/stdafx.h @@ -42,6 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <malloc.h>
#include <map>
+#include <string>
#include <m_system.h>
#include <m_core.h>
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index ebbd18a6fe..6227348757 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -99,7 +99,7 @@ class CUserInfoDlg : public CDlgBase ptrW ptszLastTab(g_plugin.getWStringA("LastTab"));
m_pCurrent = nullptr;
- std::map<const wchar_t*, HTREEITEM> parents;
+ std::map<std::wstring, HTREEITEM> parents;
for (auto &it : m_pages) {
wchar_t *pwszGroup = (it->getGroup() == nullptr) ? TranslateT("General") : it->getGroup();
@@ -110,7 +110,8 @@ class CUserInfoDlg : public CDlgBase TVINSERTSTRUCT tvis = {};
tvis.hInsertAfter = TVI_LAST;
tvis.item.lParam = (LPARAM)it;
- tvis.item.mask = TVIF_TEXT | TVIF_PARAM;
+ tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE;
+ tvis.item.state = tvis.item.stateMask = TVIS_EXPANDED;
tvis.item.pszText = pwszGroup;
hParent = parents[pwszGroup] = m_tree.InsertItem(&tvis);
}
@@ -522,15 +523,12 @@ static INT_PTR AddDetailsPage(WPARAM wParam, LPARAM lParam) static int PageSortProc(const DetailsPageData *item1, const DetailsPageData *item2)
{
wchar_t *s1 = item1->getGroup(), *s2 = item2->getGroup();
- if (s1 && !s2) return -1;
- if (!s1 && s2) return 1;
- if (!s1 && !s2) return 0;
+ if (int res = mir_wstrcmp(s1, s2))
+ return res;
s1 = item1->getTitle(), s2 = item2->getTitle();
if (!mir_wstrcmp(s1, TranslateT("Summary"))) return -1;
if (!mir_wstrcmp(s2, TranslateT("Summary"))) return 1;
- if (int res = mir_wstrcmp(s1, s2)) return res;
-
return mir_wstrcmp(s1, s2);
}
|