From e5cb033463036b182fb6e5e3eed50a14987f5300 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Jun 2015 18:19:34 +0000 Subject: SKINICONDESC -> MAllStrings git-svn-id: http://svn.miranda-ng.org/main/trunk@14054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Actman/actman.dpr | 3 +-- plugins/Actman/iac_service.pas | 5 ++--- plugins/Actman/ua/i_uaplaces.inc | 3 --- plugins/AutoShutdown/src/utils.cpp | 14 +++++++------- plugins/CSList/src/cslist.cpp | 8 ++++---- plugins/Clist_modern/src/modern_clc.cpp | 16 ++++++++-------- plugins/Clist_modern/src/modern_clui.cpp | 8 ++++---- plugins/CountryFlags/src/icons.cpp | 6 +++--- plugins/FingerprintNG/src/fingerprint.cpp | 8 ++++---- plugins/HistoryPlusPlus/hpp_options.pas | 1 - plugins/HistoryStats/src/mu_common.cpp | 21 ++++++++------------- plugins/Popup/src/notifications.cpp | 6 +++--- plugins/QuickMessages/src/Utils.cpp | 8 ++++---- plugins/QuickSearch/quicksearch.dpr | 1 - plugins/SecureIM/src/loadicons.cpp | 10 +++++----- plugins/SpellChecker/src/spellchecker.cpp | 10 +++++----- plugins/TabSRMM/src/msgs.cpp | 16 ++++++++-------- plugins/TopToolBar/src/toolbar.cpp | 9 +++++---- plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp | 8 ++++---- plugins/UserInfoEx/src/classPsTreeItem.cpp | 10 +++++----- plugins/UserInfoEx/src/mir_icolib.cpp | 16 ++++++++-------- plugins/Utils.pas/mirutils.pas | 1 - plugins/Utils.pas/sedit.pas | 11 +++++------ plugins/Watrack/lastfm/lastfm.pas | 1 - plugins/Watrack/myshows/myshows.pas | 1 - plugins/Watrack/popup/popups.pas | 1 - plugins/Watrack/proto/proto.pas | 1 - plugins/Watrack/stat/statlog.pas | 1 - plugins/Watrack/waticons.pas | 8 ++------ plugins/WhenWasIt/src/icons.cpp | 8 ++++---- plugins/mRadio/i_visual.inc | 1 - 31 files changed, 99 insertions(+), 122 deletions(-) (limited to 'plugins') diff --git a/plugins/Actman/actman.dpr b/plugins/Actman/actman.dpr index f66f265381..f9eee181cb 100644 --- a/plugins/Actman/actman.dpr +++ b/plugins/Actman/actman.dpr @@ -122,7 +122,6 @@ var // ii:tIconItem; begin FillChar(sid,SizeOf(sid),0); - sid.cbSize:=SizeOf(sid); sid.cx:=16; sid.cy:=16; sid.szSection.a:='Actions'; @@ -192,7 +191,7 @@ begin LoadMacros; RegisterIcons; - + HookEvent(ME_OPT_INITIALISE ,@OnOptInitialise); HookEvent(ME_SYSTEM_PRESHUTDOWN{ME_SYSTEM_OKTOEXIT},@PreShutdown); NotifyEventHooks(hHookChanged,twparam(ACTM_LOADED),0); diff --git a/plugins/Actman/iac_service.pas b/plugins/Actman/iac_service.pas index f9b2b6ba15..cfeb456191 100644 --- a/plugins/Actman/iac_service.pas +++ b/plugins/Actman/iac_service.pas @@ -421,14 +421,13 @@ function DlgProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; var ServiceBlock:HWND; rc:TRECT; - b:bool; begin result:=0; case hMessage of WM_DESTROY: begin end; - + WM_INITDIALOG: begin GetClientRect(Dialog,rc); ServiceBlock:=CreateServiceBlock(Dialog,0,0,rc.right,rc.bottom, @@ -481,7 +480,7 @@ begin WM_COMMAND: begin case wParam shr 16 of CBN_EDITCHANGE, - BN_CLICKED: + BN_CLICKED: SendMessage(GetParent(GetParent(Dialog)),PSM_CHANGED,0,0); end; end; diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc index 222065b460..680566e2fc 100644 --- a/plugins/Actman/ua/i_uaplaces.inc +++ b/plugins/Actman/ua/i_uaplaces.inc @@ -153,7 +153,6 @@ begin begin // add icon for action to icolib fillChar(sid,SizeOf(sid),0); - sid.cbSize :=sizeof(sid); sid.szSection .w:=ICOLIB_ACTSECTION; sid.szDefaultFile.w:=szMyPath; sid.iDefaultIndex :=-IDI_ACTION; @@ -178,7 +177,6 @@ begin begin // add icon for action to icolib fillChar(sid,SizeOf(sid),0); - sid.cbSize :=sizeof(sid); sid.szSection .w:=ICOLIB_ACTSECTION; sid.szDefaultFile.w:=szMyPath; sid.iDefaultIndex :=-IDI_ACTION; @@ -259,7 +257,6 @@ var begin FillChar(sid,SizeOf(sid),0); //first - register icon for root popup - sid.cbSize := sizeof(sid); sid.szSection.w := ICOLIB_MNUSECTION; sid.flags := SIDF_ALL_UNICODE; sid.cx := 16; diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index 933ca57446..f679d8c3bf 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -175,10 +175,10 @@ BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown) if (pfnGetDurationFormat(locale,0,&st,0,NULL,pszOut,nSize)) return TRUE; return FALSE; - } else + } + /* Win9x/NT/XP */ - return StrFromTimeInterval(pszOut,nSize,(countdown>(MAXDWORD/1000))?MAXDWORD:(countdown*1000),10) != 0; - return FALSE; + return StrFromTimeInterval(pszOut,nSize,(countdown>(MAXDWORD/1000))?MAXDWORD:(countdown*1000),10) != 0; } BOOL GetFormatedDateTime(TCHAR *pszOut,int nSize,time_t timestamp,BOOL fShowDateEvenToday) @@ -209,11 +209,11 @@ HANDLE IcoLib_AddIconRes(const char *pszDbName,const TCHAR *pszSection,const TCH TCHAR szFileName[MAX_PATH]; GetModuleFileName(hInst,szFileName,SIZEOF(szFileName)); - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.pszName = (char*)pszDbName; - sid.ptszSection = (TCHAR*)pszSection; - sid.ptszDescription = (TCHAR*)pszDesc; - sid.ptszDefaultFile = szFileName; + sid.section.t = (TCHAR*)pszSection; + sid.description.t = (TCHAR*)pszDesc; + sid.defaultFile.t = szFileName; sid.iDefaultIndex = -idRes; sid.cx = GetSystemMetrics(fLarge?SM_CXICON:SM_CXSMICON); sid.cy = GetSystemMetrics(fLarge?SM_CYICON:SM_CYSMICON); diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index b9bf0c759e..9b9c5f7ecd 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -127,18 +127,18 @@ extern "C" __declspec(dllexport) int Load() TCHAR tszFile[MAX_PATH]; GetModuleFileName(g_hInst, tszFile, MAX_PATH); - SKINICONDESC sid = { sizeof(sid) }; - sid.ptszDefaultFile = tszFile; + SKINICONDESC sid = { 0 }; + sid.defaultFile.t = tszFile; sid.flags = SIDF_ALL_TCHAR; sid.cx = sid.cy = 16; - sid.ptszSection = _T(MODULENAME); + sid.section.t = _T(MODULENAME); for (int i = 0; i < SIZEOF(forms); i++) { char szSettingName[64]; mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODNAME, forms[i].pszIconIcoLib); sid.pszName = szSettingName; - sid.ptszDescription = forms[i].ptszDescr; + sid.description.t = forms[i].ptszDescr; sid.iDefaultIndex = -forms[i].iconNoIcoLib; forms[i].hIcoLibItem = Skin_AddIcon(&sid); } diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index a031919d39..a6cb44c833 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1637,28 +1637,28 @@ static int clcHookModulesLoaded(WPARAM, LPARAM) TCHAR szMyPath[MAX_PATH]; GetModuleFileName(g_hInst, szMyPath, SIZEOF(szMyPath)); - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.cx = sid.cy = 16; - sid.ptszDefaultFile = szMyPath; + sid.defaultFile.t = szMyPath; sid.flags = SIDF_PATH_TCHAR; - sid.pszSection = LPGEN("Contact list"); - sid.pszDescription = LPGEN("Listening to"); + sid.section.a = LPGEN("Contact list"); + sid.description.a = LPGEN("Listening to"); sid.pszName = "LISTENING_TO_ICON"; sid.iDefaultIndex = -IDI_LISTENING_TO; Skin_AddIcon(&sid); - sid.pszSection = LPGEN("Contact list") "/" LPGEN("Avatar overlay"); + sid.section.a = LPGEN("Contact list") "/" LPGEN("Avatar overlay"); for (int i = 0; i < SIZEOF(g_pAvatarOverlayIcons); i++) { - sid.pszDescription = g_pAvatarOverlayIcons[i].description; + sid.description.a = g_pAvatarOverlayIcons[i].description; sid.pszName = g_pAvatarOverlayIcons[i].name; sid.iDefaultIndex = -g_pAvatarOverlayIcons[i].id; Skin_AddIcon(&sid); } - sid.pszSection = LPGEN("Contact list") "/" LPGEN("Status overlay"); + sid.section.a = LPGEN("Contact list") "/" LPGEN("Status overlay"); for (int i = 0; i < SIZEOF(g_pStatusOverlayIcons); i++) { - sid.pszDescription = g_pStatusOverlayIcons[i].description; + sid.description.a = g_pStatusOverlayIcons[i].description; sid.pszName = g_pStatusOverlayIcons[i].name; sid.iDefaultIndex = -g_pStatusOverlayIcons[i].id; Skin_AddIcon(&sid); diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 31f4e347f2..b1ea419cb8 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -1545,13 +1545,13 @@ HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDesc TCHAR fileFull[MAX_PATH] = { 0 }; - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.cx = sid.cy = 16; - sid.pszSection = szSectionName; + sid.section.a = szSectionName; sid.pszName = szIcoID; sid.flags |= SIDF_PATH_TCHAR; - sid.pszDescription = szDescription; - sid.ptszDefaultFile = fileFull; + sid.description.a = szDescription; + sid.defaultFile.t = fileFull; if (tszDefaultFile) { PathToAbsoluteT(tszDefaultFile, fileFull); diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp index 5b4e8affac..401f79c15d 100644 --- a/plugins/CountryFlags/src/icons.cpp +++ b/plugins/CountryFlags/src/icons.cpp @@ -227,12 +227,12 @@ void InitIcons(void) char szId[20]; /* register icons */ - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.pszName = szId; sid.cx = GetSystemMetrics(SM_CXSMICON); sid.cy = GetSystemMetrics(SM_CYSMICON); sid.flags = SIDF_SORTED; - sid.pszSection = "Country Flags"; + sid.section.a = "Country Flags"; /* all those flag icons do not need any transparency mask (flags are always opaque), * storing them in a large bitmap to reduce file size */ @@ -241,7 +241,7 @@ void InitIcons(void) phIconHandles = (HANDLE*)mir_alloc(nCountriesCount*sizeof(HANDLE)); if (phIconHandles != NULL) { for (int i=0; i < nCountriesCount; ++i) { - sid.pszDescription = (char*)countries[i].szName; + sid.description.a = (char*)countries[i].szName; /* create identifier */ mir_snprintf(szId, SIZEOF(szId), (countries[i].id == 0xFFFF) ? "%s0x%X" : "%s%i","flags_", countries[i].id); /* buffer safe */ diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index ae149b9115..edc787d283 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -78,12 +78,12 @@ void __fastcall Prepare(KN_FP_MASK* mask, bool bEnable) if (SectName == NULL) return; - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.flags = SIDF_ALL_TCHAR; - sid.ptszSection = SectName; + sid.section.t = SectName; sid.pszName = mask->szIconName; - sid.ptszDescription = mask->szClientDescription; - sid.ptszDefaultFile = destfile; + sid.description.t = mask->szClientDescription; + sid.defaultFile.t = destfile; sid.iDefaultIndex = -mask->iIconIndex; sid.cx = sid.cy = 16; mask->hIcolibItem = Skin_AddIcon(&sid); diff --git a/plugins/HistoryPlusPlus/hpp_options.pas b/plugins/HistoryPlusPlus/hpp_options.pas index 155dd17925..3b135b2678 100644 --- a/plugins/HistoryPlusPlus/hpp_options.pas +++ b/plugins/HistoryPlusPlus/hpp_options.pas @@ -549,7 +549,6 @@ begin // Register in IcoLib hppIconPack := FindIconsDll(false); ZeroMemory(@sid, sizeof(sid)); - sid.cbSize := sizeof(sid); sid.Flags:=SIDF_ALL_UNICODE; sid.szDefaultFile.w := PChar(hppIconPack); diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 74cd534b0f..5bd5a5a4ab 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -125,15 +125,12 @@ namespace mu void addIcon(const TCHAR* szSection, const TCHAR* szDescription, const char* szIconName, const char* szDefaultFile, int iDefaultIndex, int cx /* = 16 */, int cy /* = 16 */) { - SKINICONDESC sid; - - sid.cbSize = sizeof(sid); - sid.ptszSection = const_cast(szSection); - sid.ptszDescription = const_cast(szDescription); + SKINICONDESC sid = { 0 }; + sid.section.t = const_cast(szSection); + sid.description.t = const_cast(szDescription); sid.pszName = const_cast(szIconName); - sid.pszDefaultFile = const_cast(szDefaultFile); + sid.defaultFile.a = const_cast(szDefaultFile); sid.iDefaultIndex = iDefaultIndex; - sid.hDefaultIcon = NULL; sid.cx = cx; sid.cy = cy; sid.flags = SIDF_TCHAR; @@ -142,13 +139,11 @@ namespace mu void addIcon(const TCHAR* szSection, const TCHAR* szDescription, const char* szIconName, HICON hDefaultIcon, int cx /* = 16 */, int cy /* = 16 */) { - SKINICONDESC sid; - - sid.cbSize = sizeof(sid); - sid.ptszSection = const_cast(szSection); - sid.ptszDescription = const_cast(szDescription); + SKINICONDESC sid = { 0 }; + sid.section.t = const_cast(szSection); + sid.description.t = const_cast(szDescription); sid.pszName = const_cast(szIconName); - sid.pszDefaultFile = NULL; + sid.defaultFile.a = NULL; sid.iDefaultIndex = 0; sid.hDefaultIcon = hDefaultIcon; sid.cx = cx; diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 3652582256..413959315a 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -211,11 +211,11 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification) mir_snprintf(section, SIZEOF(section), "Popups/%s", notification->lpzGroup); mir_snprintf(setting, MODULNAME"_%s_%s", notification->lpzGroup, notification->lpzName); - SKINICONDESC sid = { sizeof(sid) }; - sid.pszSection = section; + SKINICONDESC sid = { 0 }; + sid.section.a = section; sid.cx = sid.cy = 16; sid.pszName = setting; - sid.pszDescription = notification->lpzName; + sid.description.a = notification->lpzName; sid.hDefaultIcon = notification->lchIcon; Skin_AddIcon(&sid); diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index ad5517938b..8ae1829407 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -232,13 +232,13 @@ static HANDLE AddIcon(char* szIcoName) TCHAR tszPath[MAX_PATH]; GetModuleFileName(hinstance, tszPath, SIZEOF(tszPath)); - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.flags = SIDF_PATH_TCHAR; - sid.pszSection = "Quick Messages"; + sid.section.a = "Quick Messages"; sid.cx = sid.cy = 16; - sid.pszDescription = szIcoName; + sid.description.a = szIcoName; sid.pszName = szIcoName; - sid.ptszDefaultFile = tszPath; + sid.defaultFile.t = tszPath; sid.iDefaultIndex = -IDI_QICON; return Skin_AddIcon(&sid); } diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr index bb363cc6b7..b0041c2d66 100644 --- a/plugins/QuickSearch/quicksearch.dpr +++ b/plugins/QuickSearch/quicksearch.dpr @@ -74,7 +74,6 @@ var sid:TSKINICONDESC; begin FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize :=SizeOf(TSKINICONDESC); sid.cx :=16; sid.cy :=16; sid.szSection.a:=qs_module; diff --git a/plugins/SecureIM/src/loadicons.cpp b/plugins/SecureIM/src/loadicons.cpp index ff4d1d876a..bf6aca904d 100644 --- a/plugins/SecureIM/src/loadicons.cpp +++ b/plugins/SecureIM/src/loadicons.cpp @@ -96,14 +96,14 @@ void InitIcons(void) TCHAR tszPath[MAX_PATH]; GetModuleFileName(g_hIconInst, tszPath, SIZEOF(tszPath)); - SKINICONDESC sid = { sizeof(sid) }; - sid.pszSection = "SecureIM"; - sid.ptszDefaultFile = tszPath; + SKINICONDESC sid = { 0 }; + sid.section.a = "SecureIM"; + sid.defaultFile.t = tszPath; for (int i = 0; i < SIZEOF(icons); i++) { - sid.pszSection = icons[i].section; + sid.section.a = icons[i].section; sid.pszName = icons[i].name; - sid.pszDescription = icons[i].text; + sid.description.a = icons[i].text; sid.iDefaultIndex = -icons[i].key; HANDLE hIcolib = Skin_AddIcon(&sid); diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index f0191cbabc..6e539a8b19 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -141,14 +141,14 @@ static int ModulesLoaded(WPARAM, LPARAM) TCHAR path[MAX_PATH]; GetModuleFileName(hInst, path, MAX_PATH); - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; - sid.ptszSection = LPGENT("Spell Checker")_T("/")LPGENT("Flags"); + sid.section.t = LPGENT("Spell Checker")_T("/")LPGENT("Flags"); // Get language flags for (int i = 0; i < languages.getCount(); i++) { Dictionary *p = languages[i]; - sid.ptszDescription = p->full_name; + sid.description.t = p->full_name; char lang[32]; mir_snprintf(lang, SIZEOF(lang), "spell_lang_%d", i); @@ -160,13 +160,13 @@ static int ModulesLoaded(WPARAM, LPARAM) if (hFlag != NULL) { sid.hDefaultIcon = hFlag; - sid.ptszDefaultFile = NULL; + sid.defaultFile.t = NULL; sid.iDefaultIndex = 0; } else { hFlagIcoLib = Skin_GetIcon("spellchecker_unknown"); sid.hDefaultIcon = hFlagIcoLib; - sid.ptszDefaultFile = NULL; + sid.defaultFile.t = NULL; sid.iDefaultIndex = 0; } diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 948e471350..4f2ee0568a 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -794,15 +794,15 @@ static int TSAPI SetupIconLibConfig() FreeLibrary(g_hIconDLL); g_hIconDLL = 0; - SKINICONDESC sid = { sizeof(sid) }; - sid.ptszDefaultFile = szFilename; + SKINICONDESC sid = { 0 }; + sid.defaultFile.t = szFilename; sid.flags = SIDF_PATH_TCHAR; for (int n = 0; n < SIZEOF(ICONBLOCKS); n++) { - sid.pszSection = ICONBLOCKS[n].szSection; + sid.section.a = ICONBLOCKS[n].szSection; for (int i = 0; i < ICONBLOCKS[n].nItems; i++) { sid.pszName = ICONBLOCKS[n].idesc[i].szName; - sid.pszDescription = ICONBLOCKS[n].idesc[i].szDesc; + sid.description.a = ICONBLOCKS[n].idesc[i].szDesc; sid.iDefaultIndex = ICONBLOCKS[n].idesc[i].uId == -IDI_HISTORY ? 0 : ICONBLOCKS[n].idesc[i].uId; // workaround problem /w icoLib and a resource id of 1 (actually, a Windows problem) if (n > 0 && n < 4) @@ -812,21 +812,21 @@ static int TSAPI SetupIconLibConfig() } } - sid.pszSection = LPGEN("Message Sessions")"/"LPGEN("Default"); + sid.section.a = LPGEN("Message Sessions")"/"LPGEN("Default"); sid.pszName = "tabSRMM_clock_symbol"; - sid.pszDescription = LPGEN("Clock symbol (for the info panel clock)"); + sid.description.a = LPGEN("Clock symbol (for the info panel clock)"); sid.iDefaultIndex = -IDI_CLOCK; Skin_AddIcon(&sid); _tcsncpy(szFilename, _T("plugins\\tabsrmm.dll"), MAX_PATH); sid.pszName = "tabSRMM_overlay_disabled"; - sid.pszDescription = LPGEN("Feature disabled (used as overlay)"); + sid.description.a = LPGEN("Feature disabled (used as overlay)"); sid.iDefaultIndex = -IDI_FEATURE_DISABLED; Skin_AddIcon(&sid); sid.pszName = "tabSRMM_overlay_enabled"; - sid.pszDescription = LPGEN("Feature enabled (used as overlay)"); + sid.description.a = LPGEN("Feature enabled (used as overlay)"); sid.iDefaultIndex = -IDI_FEATURE_ENABLED; Skin_AddIcon(&sid); return 1; diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index 930925a7a7..0842ce95e3 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -152,12 +152,13 @@ static void Icon2button(TTBButton *but, HANDLE &hIcoLib, HICON &hIcon, bool bIsU if (!hIcoLib) { char buf[256]; mir_snprintf(buf, "toptoolbar_%s%s", but->name, bIsUp ? (but->hIconDn ? "%s_up" : "%s") : "%s_dn"); - SKINICONDESC sid = { sizeof(sid) }; - sid.pszSection = "Toolbar"; + + SKINICONDESC sid = { 0 }; + sid.section.a = "Toolbar"; sid.pszName = buf; - sid.pszDefaultFile = NULL; + sid.defaultFile.a = NULL; mir_snprintf(buf, "%s%s", but->name, bIsUp ? "" : " (pressed)"); - sid.pszDescription = buf; + sid.description.a = buf; sid.hDefaultIcon = bIsUp ? but->hIconUp : but->hIconDn; hIcoLib = Skin_AddIcon(&sid); } diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index 61fab1365b..9774ac2f42 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -388,15 +388,15 @@ void InitIcons() phIconHandles = (HANDLE*)mir_alloc(nCountriesCount*sizeof(HANDLE)); if (phIconHandles != NULL) { char szId[20]; - SKINICONDESC sid = { sizeof(sid) }; - sid.ptszSection = LPGENT("Country flags"); + SKINICONDESC sid = { 0 }; + sid.section.t = LPGENT("Country flags"); sid.pszName = szId; // name to refer to icon when playing and in db sid.cx = GetSystemMetrics(SM_CXSMICON); sid.cy = GetSystemMetrics(SM_CYSMICON); sid.flags = SIDF_SORTED | SIDF_TCHAR; for (int i=0; i < nCountriesCount; i++) { - sid.ptszDescription = mir_a2t(LPGEN(countries[i].szName)); + sid.description.t = mir_a2t(LPGEN(countries[i].szName)); /* create identifier */ mir_snprintf(szId, SIZEOF(szId), (countries[i].id == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countries[i].id); /* buffer safe */ int index = CountryNumberToBitmapIndex(countries[i].id); @@ -406,7 +406,7 @@ void InitIcons() phIconHandles[index] = Skin_AddIcon(&sid); if (sid.hDefaultIcon!=NULL) DestroyIcon(sid.hDefaultIcon); - mir_free(sid.ptszDescription); sid.ptszDescription = NULL; + mir_free(sid.description.t); sid.description.t = NULL; } } ImageList_Destroy(himl); diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 32ffb499fd..4aab90ed26 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -318,13 +318,13 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn if (!(hIcon = Skin_GetIcon(pszIconName))) { bool bNeedFree = false; - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.flags = SIDF_ALL_TCHAR; sid.cx = GetSystemMetrics(SM_CXSMICON); sid.cy = GetSystemMetrics(SM_CYSMICON); sid.pszName = (LPSTR)pszIconName; - sid.ptszDescription = _ptszLabel; - sid.ptszSection = LPGENT(SECT_TREE); + sid.description.t = _ptszLabel; + sid.section.t = LPGENT(SECT_TREE); // the item to insert brings along an icon? if (odp->flags & ODPF_ICON) { @@ -332,10 +332,10 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn if (odp->hInstance == ghInst) { // the pszGroup holds the iconfile for items added by uinfoex - sid.ptszDefaultFile = odp->ptszGroup; + sid.defaultFile.t = odp->ptszGroup; // icon library exists? - if (sid.ptszDefaultFile) + if (sid.defaultFile.t) sid.iDefaultIndex = (INT_PTR)odp->hIcon; // no valid icon library else { diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp index 4b8388382f..2154abdc46 100644 --- a/plugins/UserInfoEx/src/mir_icolib.cpp +++ b/plugins/UserInfoEx/src/mir_icolib.cpp @@ -226,13 +226,13 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L HANDLE hIconHandle = NULL; if (szIconID && szDescription && szSection) { - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.flags = SIDF_ALL_TCHAR; sid.pszName = szIconID; - sid.ptszDescription = mir_a2t(szDescription); - sid.ptszSection = mir_a2t(szSection); + sid.description.t = mir_a2t(szDescription); + sid.section.t = mir_a2t(szSection); - if (sid.ptszDescription && sid.ptszSection) { + if (sid.description.t && sid.section.t) { switch (Size) { // small icons (16x16) case 0: @@ -252,8 +252,8 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L break; } - sid.ptszDefaultFile = szDefaultFile; - if (sid.ptszDefaultFile && sid.ptszDefaultFile[0]) + sid.defaultFile.t = szDefaultFile; + if (sid.defaultFile.t && sid.defaultFile.t[0]) sid.iDefaultIndex = -idIcon; else { sid.hDefaultIcon = hDefIcon; @@ -261,8 +261,8 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L } hIconHandle = Skin_AddIcon(&sid); } - MIR_FREE(sid.ptszDescription); - MIR_FREE(sid.ptszSection); + MIR_FREE(sid.description.t); + MIR_FREE(sid.section.t); } return hIconHandle; } diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas index dd46e411bb..5c25045c11 100644 --- a/plugins/Utils.pas/mirutils.pas +++ b/plugins/Utils.pas/mirutils.pas @@ -701,7 +701,6 @@ var sid:TSKINICONDESC; begin FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize :=SizeOf(TSKINICONDESC); sid.cx :=16; sid.cy :=16; sid.flags :=0; diff --git a/plugins/Utils.pas/sedit.pas b/plugins/Utils.pas/sedit.pas index 35f90b9dde..7c7010e43b 100644 --- a/plugins/Utils.pas/sedit.pas +++ b/plugins/Utils.pas/sedit.pas @@ -92,7 +92,6 @@ begin exit; FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize :=SizeOf(TSKINICONDESC); sid.cx :=16; sid.cy :=16; sid.flags :=SIDF_UNICODE; @@ -442,7 +441,7 @@ var {$IFDEF Miranda}isScript:boolean;{$ENDIF} begin li.iItem:=item; - + // result value check and element type li.mask :=LVIF_PARAM or LVIF_STATE; li.iSubItem :=0; @@ -490,7 +489,7 @@ begin // type text (can skip and use type code) li.mask :=LVIF_TEXT; li.cchTextMax:=HIGH(buf); - li.pszText :=@buf; + li.pszText :=@buf; li.iSubItem :=col_type; SendMessageW(list,LVM_GETITEMTEXTW,item,lparam(@li)); dst:=StrEnd(FastWideToAnsiBuf(@buf,dst)); @@ -499,7 +498,7 @@ begin // alias li.mask :=LVIF_TEXT; li.cchTextMax:=HIGH(buf); - li.pszText :=@buf; + li.pszText :=@buf; li.iSubItem :=col_alias; if SendMessageW(list,LVM_GETITEMTEXTW,item,lparam(@li))>0 then @@ -839,7 +838,7 @@ begin {$ENDIF} buf[idx]:=#0; LV_SetItemW(list,@buf,item,col_flag); - + // values tmp:=nil; case ltype of @@ -1072,7 +1071,7 @@ begin GetWindowRect(wnd,rc1); SetWindowPos(wnd,0,0,0,rc.right-rc1.left-8,rc1.bottom-rc1.top, SWP_NOMOVE or SWP_NOZORDER or SWP_SHOWWINDOW); - + wnd:=GetDlgItem(Dialog,IDC_DATA_FULL); GetWindowRect(wnd,rc1); SetWindowPos(wnd,0,0,0,rc1.right-rc1.left, rc.bottom-rc1.top-8, diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas index c5ccd796cc..677d7aa4c5 100644 --- a/plugins/Watrack/lastfm/lastfm.pas +++ b/plugins/Watrack/lastfm/lastfm.pas @@ -193,7 +193,6 @@ var sid:TSKINICONDESC; begin FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:='WATrack'; diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index f4fce5bc5a..ff9e2975a5 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -226,7 +226,6 @@ var sid:TSKINICONDESC; begin FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:='WATrack'; diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas index ec21e11f5d..eea51ae883 100644 --- a/plugins/Watrack/popup/popups.pas +++ b/plugins/Watrack/popup/popups.pas @@ -473,7 +473,6 @@ begin ssmi:=CreateServiceFunction(MS_WAT_SHOWMUSICINFO,@OpenPopup); FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:='WATrack'; diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas index 4ee38f79b3..8da9d20b12 100644 --- a/plugins/Watrack/proto/proto.pas +++ b/plugins/Watrack/proto/proto.pas @@ -468,7 +468,6 @@ var sid:TSKINICONDESC; begin FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:=PluginShort; diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas index 50da1cc2ff..3d82b93223 100644 --- a/plugins/Watrack/stat/statlog.pas +++ b/plugins/Watrack/stat/statlog.pas @@ -588,7 +588,6 @@ begin loadstat; FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:='WATrack'; diff --git a/plugins/Watrack/waticons.pas b/plugins/Watrack/waticons.pas index 396fdd887e..3de092b5c7 100644 --- a/plugins/Watrack/waticons.pas +++ b/plugins/Watrack/waticons.pas @@ -69,20 +69,17 @@ begin hIconDLL:=hInstance; FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:='WATrack'; - sid.hDefaultIcon :=LoadImage(hIconDLL, - MAKEINTRESOURCE(IDI_PLUGIN_ENABLE),IMAGE_ICON,16,16,0); + sid.hDefaultIcon :=LoadImage(hIconDLL,MAKEINTRESOURCE(IDI_PLUGIN_ENABLE),IMAGE_ICON,16,16,0); sid.pszName :=IcoBtnEnable; sid.szDescription.a:='Plugin Enabled'; Skin_AddIcon(@sid); DestroyIcon(sid.hDefaultIcon); - sid.hDefaultIcon :=LoadImage(hIconDLL, - MAKEINTRESOURCE(IDI_PLUGIN_DISABLE),IMAGE_ICON,16,16,0); + sid.hDefaultIcon :=LoadImage(hIconDLL,MAKEINTRESOURCE(IDI_PLUGIN_DISABLE),IMAGE_ICON,16,16,0); sid.pszName :=IcoBtnDisable; sid.szDescription.a:='Plugin Disabled'; Skin_AddIcon(@sid); @@ -165,7 +162,6 @@ begin FreeLibrary(hIconDLL); FillChar(sid,SizeOf(sid),0); sid.flags:=0; - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; diff --git a/plugins/WhenWasIt/src/icons.cpp b/plugins/WhenWasIt/src/icons.cpp index 864b9a81bd..fbaed89acf 100644 --- a/plugins/WhenWasIt/src/icons.cpp +++ b/plugins/WhenWasIt/src/icons.cpp @@ -31,13 +31,13 @@ HANDLE hWWIExtraIcons = (HANDLE)-1; static HANDLE AddIcon(char *name, char *description, TCHAR *tszPath, int iDefaultIdx) { - SKINICONDESC sid = { sizeof(sid) }; + SKINICONDESC sid = { 0 }; sid.flags = SIDF_PATH_TCHAR; - sid.pszSection = LPGEN("WhenWasIt"); + sid.section.a = LPGEN("WhenWasIt"); sid.cx = sid.cy = 16; - sid.pszDescription = description; + sid.description.a = description; sid.pszName = name; - sid.ptszDefaultFile = tszPath; + sid.defaultFile.t = tszPath; sid.iDefaultIndex = -iDefaultIdx; return Skin_AddIcon(&sid); } diff --git a/plugins/mRadio/i_visual.inc b/plugins/mRadio/i_visual.inc index 86ba8fb2c6..a2b6574df3 100644 --- a/plugins/mRadio/i_visual.inc +++ b/plugins/mRadio/i_visual.inc @@ -71,7 +71,6 @@ var sid:TSKINICONDESC; begin FillChar(sid,SizeOf(TSKINICONDESC),0); - sid.cbSize:=SizeOf(TSKINICONDESC); sid.cx:=16; sid.cy:=16; sid.szSection.a:='Protocols/mRadio'; -- cgit v1.2.3