From 95aa036670a1ce2c461ffd9bd3a586d191ee4675 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 19 Jul 2012 22:48:01 +0000 Subject: - various icolib fixes; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@1061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Gadu-Gadu/icolib.cpp | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'protocols/Gadu-Gadu') diff --git a/protocols/Gadu-Gadu/icolib.cpp b/protocols/Gadu-Gadu/icolib.cpp index 58d5c2fe2a..f99540ac76 100644 --- a/protocols/Gadu-Gadu/icolib.cpp +++ b/protocols/Gadu-Gadu/icolib.cpp @@ -22,48 +22,48 @@ struct tagiconList { - const char* szDescr; - const char* szName; - int defIconID; + char* szDescr; + char* szName; + int defIconID; } static const iconList[] = { - { LPGEN("Protocol icon"), "main", IDI_GG }, - { LPGEN("Import list from server"), "importserver", IDI_IMPORT_SERVER }, - { LPGEN("Import list from text file"), "importtext", IDI_IMPORT_TEXT }, - { LPGEN("Remove list from server"), "removeserver", IDI_REMOVE_SERVER }, - { LPGEN("Export list to server"), "exportserver", IDI_EXPORT_SERVER }, - { LPGEN("Export list to text file"), "exporttext", IDI_EXPORT_TEXT }, - { LPGEN("Account settings"), "settings", IDI_SETTINGS }, - { LPGEN("Contact list"), "list", IDI_LIST }, - { LPGEN("Block user"), "block", IDI_BLOCK }, - { LPGEN("Previous image"), "previous", IDI_PREV }, - { LPGEN("Next image"), "next", IDI_NEXT }, - { LPGEN("Send image"), "image", IDI_IMAGE }, - { LPGEN("Save image"), "save", IDI_SAVE }, - { LPGEN("Delete image"), "delete", IDI_DELETE }, - { LPGEN("Open new conference"), "conference", IDI_CONFERENCE }, - { LPGEN("Clear ignored conferences"), "clearignored", IDI_CLEAR_CONFERENCE }, - { LPGEN("Concurrent sessions"), "sessions", IDI_SESSIONS } + { LPGEN("Protocol icon"), "main", IDI_GG }, + { LPGEN("Import list from server"), "importserver", IDI_IMPORT_SERVER }, + { LPGEN("Import list from text file"), "importtext", IDI_IMPORT_TEXT }, + { LPGEN("Remove list from server"), "removeserver", IDI_REMOVE_SERVER }, + { LPGEN("Export list to server"), "exportserver", IDI_EXPORT_SERVER }, + { LPGEN("Export list to text file"), "exporttext", IDI_EXPORT_TEXT }, + { LPGEN("Account settings"), "settings", IDI_SETTINGS }, + { LPGEN("Contact list"), "list", IDI_LIST }, + { LPGEN("Block user"), "block", IDI_BLOCK }, + { LPGEN("Previous image"), "previous", IDI_PREV }, + { LPGEN("Next image"), "next", IDI_NEXT }, + { LPGEN("Send image"), "image", IDI_IMAGE }, + { LPGEN("Save image"), "save", IDI_SAVE }, + { LPGEN("Delete image"), "delete", IDI_DELETE }, + { LPGEN("Open new conference"), "conference", IDI_CONFERENCE }, + { LPGEN("Clear ignored conferences"), "clearignored", IDI_CLEAR_CONFERENCE }, + { LPGEN("Concurrent sessions"), "sessions", IDI_SESSIONS } }; HANDLE hIconLibItem[SIZEOF(iconList)]; void gg_icolib_init() { - SKINICONDESC sid = {0}; - char szFile[MAX_PATH]; - char szSectionName[100]; - int i; + TCHAR szFile[MAX_PATH]; + GetModuleFileName(hInstance, szFile, MAX_PATH); + char szSectionName[100]; mir_snprintf(szSectionName, sizeof( szSectionName ), "%s/%s", LPGEN("Protocols"), LPGEN(GGDEF_PROTO)); - GetModuleFileNameA(hInstance, szFile, MAX_PATH); + SKINICONDESC sid = {0}; sid.cbSize = sizeof(SKINICONDESC); - sid.pszDefaultFile = szFile; + sid.ptszDefaultFile = szFile; sid.pszSection = szSectionName; + sid.flags = SIDF_PATH_TCHAR; - for(i = 0; i < SIZEOF(iconList); i++) { + for (int i = 0; i < SIZEOF(iconList); i++) { char szSettingName[100]; mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", GGDEF_PROTO, iconList[i].szName); sid.pszName = szSettingName; -- cgit v1.2.3