summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FTPFileYM')
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 3ca4573d00..ce2a211cb3 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -90,12 +90,13 @@ static HANDLE hIconlibItem[ServerList::FTP_COUNT + SIZEOF(iconList)];
static void InitIcolib()
{
- TCHAR stzFile[MAX_PATH];
char szSettingName[100];
char szDesc[100];
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(sid);
+ TCHAR stzFile[MAX_PATH];
+ GetModuleFileName(hInst, stzFile, MAX_PATH);
+
+ SKINICONDESC sid = { sizeof(sid) };
sid.cx = sid.cy = 16;
sid.ptszDefaultFile = stzFile;
sid.pszSection = MODULE;
@@ -103,18 +104,14 @@ static void InitIcolib()
sid.pszName = szSettingName;
sid.flags = SIDF_PATH_TCHAR;
- GetModuleFileName(hInst, stzFile, MAX_PATH);
-
- for (int i = 0; i < ServerList::FTP_COUNT; i++)
- {
+ for (int i = 0; i < ServerList::FTP_COUNT; i++) {
mir_snprintf(szDesc, sizeof(szDesc), Translate("FTP Server %d"), i + 1);
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_ftp%d", MODULE, i);
sid.iDefaultIndex = -(IDI_FTP0 + i);
hIconlibItem[i] = Skin_AddIcon(&sid);
}
- for (int i = 0; i < SIZEOF(iconList); i++)
- {
+ for (int i = 0; i < SIZEOF(iconList); i++) {
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", MODULE, iconList[i].szName);
sid.pszDescription = Translate(iconList[i].szDescr);
sid.iDefaultIndex = -(iconList[i].defIconID);