diff options
author | George Hazan <george.hazan@gmail.com> | 2012-12-04 16:10:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-12-04 16:10:56 +0000 |
commit | e5c1dce070de2cdd83cdb01201d6bedc37b267fc (patch) | |
tree | e9f4f3f07125612fa9cdef0f5c7160b5ef206394 /plugins | |
parent | 45fe20cd91126db6e6d75db885fea439fb18e6f0 (diff) |
broken icons in Clist Nicer
git-svn-id: http://svn.miranda-ng.org/main/trunk@2639 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 6d8acbe8e6..3caf5de735 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -290,37 +290,24 @@ static void InitIcoLib() {
Icon_Register(g_hInst, LPGEN("CList - Nicer/Default"), myIcons, SIZEOF(myIcons));
- TCHAR szFilename[MAX_PATH];
- GetModuleFileName(g_hInst, szFilename, MAX_PATH);
-
- int i, version = 0;
- char szBuffer[128];
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.flags = SIDF_ALL_TCHAR;
- sid.ptszSection = LPGENT("CList - Nicer/Overlay Icons");
- for (i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) {
+ for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) {
+ char szBuffer[128];
mir_snprintf(szBuffer, sizeof(szBuffer), "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE));
- sid.pszName = szBuffer;
- sid.ptszDescription = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), GSMDF_TCHAR);
- sid.iDefaultIndex = -i;
- Skin_AddIcon(&sid);
+ IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), GSMDF_TCHAR), szBuffer, i };
+ Icon_RegisterT(g_hInst, LPGENT("CList - Nicer/Overlay Icons"), &icon, 1);
}
- sid.ptszSection = LPGENT("CList - Nicer/Connecting Icons");
PROTOACCOUNT **accs = NULL;
int p_count = 0;
ProtoEnumAccounts( &p_count, &accs );
- for (i = 0; i < p_count; i++) {
- TCHAR szDescr[128];
- if ( !IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
+ for (int k = 0; k < p_count; k++) {
+ if ( !IsAccountEnabled(accs[k]) || CallProtoService(accs[k]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
continue;
- mir_snprintf(szBuffer, 128, "%s_conn", accs[i]->szModuleName );
- sid.pszName = szBuffer;
- mir_sntprintf(szDescr, 128, TranslateT("%s Connecting"), accs[i]->tszAccountName );
- sid.ptszDescription = szDescr;
- sid.iDefaultIndex = -IDI_PROTOCONNECTING;
- Skin_AddIcon(&sid);
+
+ TCHAR szDescr[128];
+ mir_sntprintf(szDescr, 128, TranslateT("%s Connecting"), accs[k]->tszAccountName );
+ IconItemT icon = { szDescr, "conn", IDI_PROTOCONNECTING };
+ Icon_RegisterT(g_hInst, LPGENT("CList - Nicer/Connecting Icons"), &icon, 1, accs[k]->szModuleName);
}
}
|