summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/AddContactPlus/src/main.cpp4
-rw-r--r--plugins/BASS_interface/src/Main.cpp3
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp3
-rw-r--r--plugins/Clist_nicer/src/clui.cpp3
-rw-r--r--plugins/CrashDumper/src/crshdmp_icons.cpp13
-rw-r--r--plugins/Db_autobackups/src/main.cpp3
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp3
-rw-r--r--plugins/MenuItemEx/src/main.cpp3
-rw-r--r--plugins/MirOTR/MirOTR/src/icons.cpp3
-rw-r--r--plugins/NewsAggregator/Src/Icons.cpp26
-rw-r--r--plugins/NotesAndReminders/src/main.cpp50
-rw-r--r--plugins/Ping/src/utils.cpp81
-rw-r--r--plugins/Quotes/src/IconLib.cpp35
-rw-r--r--plugins/Scriver/src/globals.cpp3
-rw-r--r--plugins/SimpleStatusMsg/src/utils.cpp35
-rw-r--r--plugins/SmileyAdd/src/main.cpp86
-rw-r--r--plugins/StatusPlugins/StartupStatus/toolbars.cpp3
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp3
-rw-r--r--plugins/TabSRMM/src/msgs.cpp3
-rw-r--r--plugins/Variables/src/variables.cpp3
-rw-r--r--plugins/YAMN/src/main.cpp22
-rw-r--r--protocols/AimOscar/src/theme.cpp3
-rw-r--r--protocols/FacebookRM/src/theme.cpp3
-rw-r--r--protocols/Gadu-Gadu/src/icolib.cpp3
-rw-r--r--protocols/IRCG/src/options.cpp3
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp6
-rw-r--r--protocols/MSN/src/msn_opts.cpp3
-rw-r--r--protocols/Omegle/src/theme.cpp14
-rw-r--r--protocols/Tlen/src/tlen.cpp8
-rw-r--r--protocols/Twitter/src/theme.cpp3
-rw-r--r--protocols/Xfire/src/main.cpp3
-rw-r--r--protocols/Yahoo/src/icolib.cpp3
-rw-r--r--src/core/stdchat/src/options.cpp3
-rw-r--r--src/core/stdmsg/src/globals.cpp3
-rw-r--r--src/modules/extraicons/extraicons.cpp3
35 files changed, 185 insertions, 264 deletions
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index 6f4c69cab3..61f3c1ed38 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -136,10 +136,10 @@ static int CreateButton(WPARAM, LPARAM)
static int OnModulesLoaded(WPARAM, LPARAM)
{
- SKINICONDESC sid = {0};
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
+
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_ALL_TCHAR;
sid.ptszDefaultFile = szFile;
sid.ptszSection = LPGENT("AddContact+");
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index e34d9da35f..d981658be9 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -315,8 +315,7 @@ void InitIcons(void)
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, SIZEOF(szFile));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.cx = sid.cy = 16;
sid.pszSection = ModuleName;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index fc198b6820..23f2ed6ac9 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -601,8 +601,7 @@ static int IcoLibInit (void) // Icolib support
TCHAR tszFile[MAX_PATH];
GetModuleFileName(g_hInstance, tszFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_ALL_TCHAR;
sid.ptszDefaultFile = tszFile;
sid.cx = sid.cy = 16;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 5f2059e0ea..2d9c063b41 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -300,8 +300,7 @@ static void InitIcoLib()
int i, version = 0;
char szBuffer[128];
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_PATH_TCHAR;
sid.pszSection = LPGEN("CList - Nicer/Default");
sid.ptszDefaultFile = szFilename;
diff --git a/plugins/CrashDumper/src/crshdmp_icons.cpp b/plugins/CrashDumper/src/crshdmp_icons.cpp
index 766be7d8cc..670adae90c 100644
--- a/plugins/CrashDumper/src/crshdmp_icons.cpp
+++ b/plugins/CrashDumper/src/crshdmp_icons.cpp
@@ -38,19 +38,16 @@ static HANDLE hIconLibItem[SIZEOF(iconList)];
void InitIcons(void)
{
- char szFile[MAX_PATH];
char szSettingName[100];
- SKINICONDESC sid = {0};
+ TCHAR szFile[MAX_PATH];
+ GetModuleFileName(hInst, szFile, SIZEOF(szFile));
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszDefaultFile = szFile;
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
sid.pszSection = (char*)PluginName;
- GetModuleFileNameA(hInst, szFile, MAX_PATH);
-
- for (unsigned i = 0; i < SIZEOF(iconList); i++)
- {
+ for (unsigned i = 0; i < SIZEOF(iconList); i++) {
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", PluginName, iconList[i].szName);
sid.pszDescription = (char*)iconList[i].szDescr;
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 6e3cbd5239..d971559218 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -66,8 +66,7 @@ static void IcoLibInit(void)
TCHAR tszFile[MAX_PATH];
GetModuleFileName(hInst, tszFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = tszFile;
sid.ptszSection = _T("Database/Database Backups");
sid.flags = SIDF_ALL_TCHAR;
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp
index 68731558f0..f086285349 100644
--- a/plugins/HistorySweeperLight/src/options.cpp
+++ b/plugins/HistorySweeperLight/src/options.cpp
@@ -65,8 +65,7 @@ void InitIcons(void)
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, SIZEOF(szFile));
- SKINICONDESC sid = { 0 };
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.cx = sid.cy = 16;
sid.pszSection = ModuleName;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index c01630d821..b64897b109 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -236,8 +236,7 @@ static void IconsInit()
TCHAR tszFile[MAX_PATH];
GetModuleFileName(hinstance, tszFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_ALL_TCHAR;
sid.ptszDefaultFile = tszFile;
sid.cx = sid.cy = 16;
diff --git a/plugins/MirOTR/MirOTR/src/icons.cpp b/plugins/MirOTR/MirOTR/src/icons.cpp
index 181c57e492..10f140ff22 100644
--- a/plugins/MirOTR/MirOTR/src/icons.cpp
+++ b/plugins/MirOTR/MirOTR/src/icons.cpp
@@ -24,8 +24,7 @@ void InitIcons() {
GetModuleFileName(hInst, szFile, SIZEOF(szFile));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.ptszSection = _T(MODULENAME);
sid.flags = SIDF_ALL_TCHAR;
diff --git a/plugins/NewsAggregator/Src/Icons.cpp b/plugins/NewsAggregator/Src/Icons.cpp
index 5cd94ff76d..9ba2b0c79b 100644
--- a/plugins/NewsAggregator/Src/Icons.cpp
+++ b/plugins/NewsAggregator/Src/Icons.cpp
@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA.
struct _tag_iconList
{
- TCHAR* szDescr;
+ char* szDescr;
char* szName;
int defIconID;
HANDLE hIconLibItem;
@@ -29,34 +29,30 @@ struct _tag_iconList
static iconList[] =
{
- { LPGENT("Protocol icon"), "main", IDI_ICON },
- { LPGENT("Check All Feeds"), "checkall", IDI_CHECKALL },
- { LPGENT("Add Feed"), "addfeed", IDI_ADDFEED },
- { LPGENT("Import Feeds"), "importfeeds", IDI_IMPORTFEEDS },
- { LPGENT("Export Feeds"), "exportfeeds", IDI_EXPORTFEEDS },
- { LPGENT("Check Feed"), "checkfeed", IDI_CHECKALL },
+ { LPGEN("Protocol icon"), "main", IDI_ICON },
+ { LPGEN("Check All Feeds"), "checkall", IDI_CHECKALL },
+ { LPGEN("Add Feed"), "addfeed", IDI_ADDFEED },
+ { LPGEN("Import Feeds"), "importfeeds", IDI_IMPORTFEEDS },
+ { LPGEN("Export Feeds"), "exportfeeds", IDI_EXPORTFEEDS },
+ { LPGEN("Check Feed"), "checkfeed", IDI_CHECKALL }
};
VOID InitIcons()
{
- TCHAR szFile[MAX_PATH];
char szSettingName[100];
- SKINICONDESC sid = {0};
- unsigned i;
-
+ TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_ALL_TCHAR;
sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
sid.ptszSection = _T("News Aggregator");
- for (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.ptszDescription = iconList[i].szDescr;
+ sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
iconList[i].hIconLibItem = Skin_AddIcon(&sid);
}
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 6150abb40d..a94eee9a94 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -92,52 +92,48 @@ INT_PTR PluginMenuCommandDeleteReminders(WPARAM w,LPARAM l)
struct
{
- TCHAR* szDescr;
+ char* szDescr;
char* szName;
int defIconID;
}
static const iconList[] =
{
- {LPGENT("New Reminder"), "AddReminder", IDI_ADDREMINDER},
- {LPGENT("Delete All Notes"), "DeleteIcon", IDI_DELETEICON},
- {LPGENT("New Note"), "NoteIcon", IDI_NOTEICON},
- {LPGENT("Show/Hide Notes"), "ShowHide", IDI_SHOWHIDE},
- {LPGENT("On Top Caption Icon"), "CaptionIcon", IDI_CAPTIONICON},
- {LPGENT("Delete All Reminders"), "DeleteReminder", IDI_DELETEREMINDER},
- {LPGENT("View Reminders"), "ViewReminders", IDI_VIEWREMINDERS},
- {LPGENT("Not on Top Caption Icon"), "CaptionIconNotTop", IDI_CAPTIONICONNOTTOP},
- {LPGENT("Hide Note Icon"), "HideNote", IDI_HIDENOTE},
- {LPGENT("Remove Note Icon"), "RemoveNote", IDI_REMOVENOTE},
- {LPGENT("Reminder Icon"), "Reminder", IDI_REMINDER},
- {LPGENT("Bring All to Front"), "BringFront", IDI_BRINGFRONT},
- {LPGENT("Play Sound Icon"), "PlaySound", IDI_PLAYSOUND},
- {LPGENT("View Notes"), "ViewNotes", IDI_VIEWNOTES},
- {LPGENT("New Note"), "NewNote", IDI_NOTEICON},
- {LPGENT("New Reminder"), "NewReminder", IDI_ADDREMINDER}
+ { LPGEN("New Reminder"), "AddReminder", IDI_ADDREMINDER},
+ { LPGEN("Delete All Notes"), "DeleteIcon", IDI_DELETEICON},
+ { LPGEN("New Note"), "NoteIcon", IDI_NOTEICON},
+ { LPGEN("Show/Hide Notes"), "ShowHide", IDI_SHOWHIDE},
+ { LPGEN("On Top Caption Icon"), "CaptionIcon", IDI_CAPTIONICON},
+ { LPGEN("Delete All Reminders"), "DeleteReminder", IDI_DELETEREMINDER},
+ { LPGEN("View Reminders"), "ViewReminders", IDI_VIEWREMINDERS},
+ { LPGEN("Not on Top Caption Icon"), "CaptionIconNotTop", IDI_CAPTIONICONNOTTOP},
+ { LPGEN("Hide Note Icon"), "HideNote", IDI_HIDENOTE},
+ { LPGEN("Remove Note Icon"), "RemoveNote", IDI_REMOVENOTE},
+ { LPGEN("Reminder Icon"), "Reminder", IDI_REMINDER},
+ { LPGEN("Bring All to Front"), "BringFront", IDI_BRINGFRONT},
+ { LPGEN("Play Sound Icon"), "PlaySound", IDI_PLAYSOUND},
+ { LPGEN("View Notes"), "ViewNotes", IDI_VIEWNOTES},
+ { LPGEN("New Note"), "NewNote", IDI_NOTEICON},
+ { LPGEN("New Reminder"), "NewReminder", IDI_ADDREMINDER}
};
HANDLE hIconLibItem[SIZEOF(iconList)];
void InitIcons(void)
{
- int i;
char szSettingName[100];
- SKINICONDESC sid = {0};
- TCHAR szFile[MAX_PATH];
+ TCHAR szFile[MAX_PATH];
GetModuleFileName(hinstance, szFile, SIZEOF(szFile));
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
- sid.ptszSection = _T(MODULENAME);
- sid.flags = SIDF_ALL_TCHAR;
+ sid.pszSection = MODULENAME;
+ sid.flags = SIDF_PATH_TCHAR;
- for (i = 0; i < SIZEOF(iconList); i++)
- {
+ for (int i = 0; i < SIZEOF(iconList); i++) {
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULENAME, iconList[i].szName);
-
- sid.ptszDescription = iconList[i].szDescr;
+ sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
hIconLibItem[i] = Skin_AddIcon(&sid);
}
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp
index 4350fe2e16..22b8b2e63d 100644
--- a/plugins/Ping/src/utils.cpp
+++ b/plugins/Ping/src/utils.cpp
@@ -304,7 +304,8 @@ HANDLE hIcoLibIconsChanged;
HICON hIconResponding, hIconNotResponding, hIconTesting, hIconDisabled;
-int ReloadIcons(WPARAM wParam, LPARAM lParam) {
+int ReloadIcons(WPARAM wParam, LPARAM lParam)
+{
hIconResponding = Skin_GetIcon("ping_responding");
hIconNotResponding = Skin_GetIcon("ping_not_responding");
hIconTesting = Skin_GetIcon("ping_testing");
@@ -318,48 +319,44 @@ void InitUtils()
{
TCHAR file[MAX_PATH];
GetModuleFileName(hInst,file,MAX_PATH);
- {
- SKINICONDESC sid = {0};
-
- sid.cbSize = sizeof(SKINICONDESC);
- sid.ptszSection = LPGENT("Ping");
- sid.flags = SIDF_PATH_TCHAR;
-
- sid.pszDescription = LPGEN("Responding");
- sid.pszName = "ping_responding";
- sid.ptszDefaultFile = file;
- sid.iDefaultIndex = -IDI_ICON_RESPONDING;
- Skin_AddIcon(&sid);
-
- sid.pszDescription = LPGEN("Not Responding");
- sid.pszName = "ping_not_responding";
- sid.ptszDefaultFile = file;
- sid.iDefaultIndex = -IDI_ICON_NOTRESPONDING;
- Skin_AddIcon(&sid);
-
- sid.pszDescription = LPGEN("Testing");
- sid.pszName = "ping_testing";
- sid.ptszDefaultFile = file;
- sid.iDefaultIndex = -IDI_ICON_TESTING;
- Skin_AddIcon(&sid);
-
- sid.pszDescription = LPGEN("Disabled");
- sid.pszName = "ping_disabled";
- sid.ptszDefaultFile = file;
- sid.iDefaultIndex = -IDI_ICON_DISABLED;
- Skin_AddIcon(&sid);
-
- hIconResponding = Skin_GetIcon("ping_responding");
- hIconNotResponding = Skin_GetIcon("ping_not_responding");
- hIconTesting = Skin_GetIcon("ping_testing");
- hIconDisabled = Skin_GetIcon("ping_disabled");
-
- hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
- }
- if(ServiceExists(MS_POPUP_REGISTERCLASS)) {
- POPUPCLASS test = {0};
- test.cbSize = sizeof(test);
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.ptszSection = LPGENT("Ping");
+ sid.flags = SIDF_PATH_TCHAR;
+
+ sid.pszDescription = LPGEN("Responding");
+ sid.pszName = "ping_responding";
+ sid.ptszDefaultFile = file;
+ sid.iDefaultIndex = -IDI_ICON_RESPONDING;
+ Skin_AddIcon(&sid);
+
+ sid.pszDescription = LPGEN("Not Responding");
+ sid.pszName = "ping_not_responding";
+ sid.ptszDefaultFile = file;
+ sid.iDefaultIndex = -IDI_ICON_NOTRESPONDING;
+ Skin_AddIcon(&sid);
+
+ sid.pszDescription = LPGEN("Testing");
+ sid.pszName = "ping_testing";
+ sid.ptszDefaultFile = file;
+ sid.iDefaultIndex = -IDI_ICON_TESTING;
+ Skin_AddIcon(&sid);
+
+ sid.pszDescription = LPGEN("Disabled");
+ sid.pszName = "ping_disabled";
+ sid.ptszDefaultFile = file;
+ sid.iDefaultIndex = -IDI_ICON_DISABLED;
+ Skin_AddIcon(&sid);
+
+ hIconResponding = Skin_GetIcon("ping_responding");
+ hIconNotResponding = Skin_GetIcon("ping_not_responding");
+ hIconTesting = Skin_GetIcon("ping_testing");
+ hIconDisabled = Skin_GetIcon("ping_disabled");
+
+ hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
+
+ if (ServiceExists(MS_POPUP_REGISTERCLASS)) {
+ POPUPCLASS test = { sizeof(test) };
test.flags = PCF_TCHAR;
test.hIcon = hIconResponding;
test.iSeconds = -1;
diff --git a/plugins/Quotes/src/IconLib.cpp b/plugins/Quotes/src/IconLib.cpp
index 9ac96599a5..e7caa1fd36 100644
--- a/plugins/Quotes/src/IconLib.cpp
+++ b/plugins/Quotes/src/IconLib.cpp
@@ -17,7 +17,7 @@ namespace
{
struct CIconList
{
- TCHAR* szDescr;
+ char* szDescr;
char* szName;
int defIconID;
HANDLE hIconLibItem;
@@ -25,38 +25,35 @@ namespace
CIconList iconList[] =
{
- { _T("Protocol icon"), ICON_STR_MAIN, IDI_ICON_MAIN },
- { _T("Quote/Rate up"), ICON_STR_QUOTE_UP, IDI_ICON_UP },
- { _T("Quote/Rate down"), ICON_STR_QUOTE_DOWN, IDI_ICON_DOWN },
- { _T("Quote/Rate not changed"), ICON_STR_QUOTE_NOT_CHANGED, IDI_ICON_NOTCHANGED },
- { _T("Quote Section"), ICON_STR_SECTION, IDI_ICON_SECTION },
- { _T("Quote"), ICON_STR_QUOTE, IDI_ICON_QUOTE },
- { _T("Currency Converter"), ICON_STR_CURRENCY_CONVERTER, IDI_ICON_CURRENCY_CONVERTER },
- { _T("Refresh"), ICON_STR_REFRESH, IDI_ICON_REFRESH },
- { _T("Export"), ICON_STR_EXPORT, IDI_ICON_EXPORT },
- { _T("Swap button"), ICON_STR_SWAP, IDI_ICON_SWAP },
- { _T("Import"), ICON_STR_IMPORT, IDI_ICON_IMPORT }
+ { LPGEN("Protocol icon"), ICON_STR_MAIN, IDI_ICON_MAIN },
+ { LPGEN("Quote/Rate up"), ICON_STR_QUOTE_UP, IDI_ICON_UP },
+ { LPGEN("Quote/Rate down"), ICON_STR_QUOTE_DOWN, IDI_ICON_DOWN },
+ { LPGEN("Quote/Rate not changed"), ICON_STR_QUOTE_NOT_CHANGED, IDI_ICON_NOTCHANGED },
+ { LPGEN("Quote Section"), ICON_STR_SECTION, IDI_ICON_SECTION },
+ { LPGEN("Quote"), ICON_STR_QUOTE, IDI_ICON_QUOTE },
+ { LPGEN("Currency Converter"), ICON_STR_CURRENCY_CONVERTER, IDI_ICON_CURRENCY_CONVERTER },
+ { LPGEN("Refresh"), ICON_STR_REFRESH, IDI_ICON_REFRESH },
+ { LPGEN("Export"), ICON_STR_EXPORT, IDI_ICON_EXPORT },
+ { LPGEN("Swap button"), ICON_STR_SWAP, IDI_ICON_SWAP },
+ { LPGEN("Import"), ICON_STR_IMPORT, IDI_ICON_IMPORT }
};
}
void Quotes_IconsInit()
{
- USES_CONVERSION;
-
- SKINICONDESC sid = {0};
TCHAR szFile[MAX_PATH];
::GetModuleFileName(g_hInstance, szFile, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.cx = sid.cy = 16;
- sid.flags = SIDF_ALL_TCHAR;
- sid.ptszSection = A2T(QUOTES_PROTOCOL_NAME);
+ sid.flags = SIDF_PATH_TCHAR;
+ sid.pszSection = QUOTES_PROTOCOL_NAME;
for (int i = 0; i < SIZEOF(iconList); i++) {
std::string sName = Quotes_MakeIconName( iconList[i].szName);
sid.pszName = const_cast<char*>(sName.c_str());
- sid.ptszDescription = iconList[i].szDescr;
+ sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
iconList[i].hIconLibItem = Skin_AddIcon(&sid);
}
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 1c71dbb959..8fe9d37619 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -157,8 +157,7 @@ void RegisterIcons(void)
char szSection[200];
GetModuleFileName(g_hInst, path, MAX_PATH);
- SKINICONDESC sid = { 0 };
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_PATH_TCHAR;
sid.ptszDefaultFile = path;
sid.pszSection = szSection;
diff --git a/plugins/SimpleStatusMsg/src/utils.cpp b/plugins/SimpleStatusMsg/src/utils.cpp
index 013d8e5971..7c706e7818 100644
--- a/plugins/SimpleStatusMsg/src/utils.cpp
+++ b/plugins/SimpleStatusMsg/src/utils.cpp
@@ -27,13 +27,14 @@ static int HookCount = 0;
static int ProtoHookCount = 0;
static int ServiceCount = 0;
-struct tagiconList
+struct
{
- const TCHAR *szDescr;
- const char *szName;
- int defIconID;
+ TCHAR *szDescr;
+ char *szName;
+ int defIconID;
+ HANDLE hIcolib;
}
-static const iconList[] =
+static iconList[] =
{
{ LPGENT("Delete Selected"), "cross", IDI_CROSS },
{ LPGENT("Recent Message"), "recent", IDI_HISTORY },
@@ -45,26 +46,22 @@ static const iconList[] =
{ LPGENT("Go to URL in Away Message"), "gotourl", IDI_GOTOURL }
};
-HANDLE hIconLibItem[SIZEOF(iconList)];
-
void IconsInit(void)
{
- SKINICONDESC sid = {0};
- char szFile[MAX_PATH];
- char szSettingName[100];
+ TCHAR szFile[MAX_PATH];
+ GetModuleFileName(g_hInst, szFile, SIZEOF(szFile));
- GetModuleFileNameA(g_hInst, szFile, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_TCHAR;
- sid.pszDefaultFile = szFile;
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.ptszDefaultFile = szFile;
sid.ptszSection = _T("Simple Status Message");
- for (int i = 0; i < SIZEOF(iconList); i++)
- {
+ for (int i = 0; i < SIZEOF(iconList); i++) {
+ char szSettingName[100];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "SimpleStatusMsg_%s", iconList[i].szName);
sid.pszName = szSettingName;
sid.ptszDescription = (TCHAR*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- hIconLibItem[i] = Skin_AddIcon(&sid);
+ iconList[i].hIcolib = Skin_AddIcon(&sid);
}
}
@@ -78,7 +75,9 @@ HICON LoadIconEx(const char* name)
HANDLE GetIconHandle(int iconId)
{
for(int i = 0; i < SIZEOF(iconList); i++)
- if (iconList[i].defIconID == iconId) return hIconLibItem[i];
+ if (iconList[i].defIconID == iconId)
+ return iconList[i].hIcolib;
+
return NULL;
}
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index cbf4531f0c..61e4b2bbb8 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -33,14 +33,8 @@ extern LIST<void> menuHandleArray;
char* metaProtoName;
-
-
-//static globals
-static HANDLE hHooks[7];
-static HANDLE hService[13];
int hLangpack;
-
static const PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
@@ -51,19 +45,11 @@ static const PLUGININFOEX pluginInfoEx =
"borkra@miranda-im.org",
"Copyright© 2004 - 2012 Boris Krasnovskiy, portions by Rein-Peter de Boer",
"http://miranda-ng.org/",
- // "http://miranda-ng.org/",
UNICODE_AWARE,
// {BD542BB4-5AE4-4d0e-A435-BA8DBE39607F}
{ 0xbd542bb4, 0x5ae4, 0x4d0e, { 0xa4, 0x35, 0xba, 0x8d, 0xbe, 0x39, 0x60, 0x7f } }
};
-static SKINICONDESC skinDesc =
-{
- sizeof(SKINICONDESC), "SmileyAdd", NULL,
- "SmileyAdd_ButtonSmiley", NULL, -IDI_SMILINGICON
-};
-
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD /* mirandaVersion */)
{
return (PLUGININFOEX*)&pluginInfoEx;
@@ -77,9 +63,13 @@ static int ModulesLoaded(WPARAM, LPARAM)
char path[MAX_PATH];
GetModuleFileNameA(g_hInst, path, MAX_PATH);
- skinDesc.pszDefaultFile = path;
- skinDesc.pszDescription = LPGEN("Button Smiley");
- HANDLE hSkinIcon = Skin_AddIcon(&skinDesc);
+ SKINICONDESC sid = { sizeof(SKINICONDESC) };
+ sid.pszName = "SmileyAdd_ButtonSmiley";
+ sid.pszSection = "SmileyAdd";
+ sid.pszDescription = LPGEN("Button Smiley");
+ sid.pszDefaultFile = path;
+ sid.iDefaultIndex = -IDI_SMILINGICON;
+ HANDLE hSkinIcon = Skin_AddIcon(&sid);
INT_PTR temp = CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
metaProtoName = mir_strdup(temp == CALLSERVICE_NOTFOUND ? NULL : (char*)temp);
@@ -112,11 +102,9 @@ static int MirandaShutdown(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int Load(void)
{
-
mir_getLP(&pluginInfoEx);
- if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS))
- {
+ if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
static const TCHAR errmsg[] = _T("Only one instance of SmileyAdd could be executed.\n")
_T("Remove duplicate instances from 'Plugins' directory");
ReportError(TranslateTS(errmsg));
@@ -133,48 +121,35 @@ extern "C" __declspec(dllexport) int Load(void)
// create smiley events
hEvent1 = CreateHookableEvent(ME_SMILEYADD_OPTIONSCHANGED);
- hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
- hHooks[1] = HookEvent(ME_SYSTEM_PRESHUTDOWN, MirandaShutdown);
- hHooks[2] = HookEvent(ME_OPT_INITIALISE, SmileysOptionsInitialize);
- hHooks[3] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu);
- hHooks[4] = HookEvent(ME_SMILEYADD_OPTIONSCHANGED, UpdateSrmmDlg);
- hHooks[5] = HookEvent(ME_PROTO_ACCLISTCHANGED, AccountListChanged);
- hHooks[6] = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DbSettingChanged);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, MirandaShutdown);
+ HookEvent(ME_OPT_INITIALISE, SmileysOptionsInitialize);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu);
+ HookEvent(ME_SMILEYADD_OPTIONSCHANGED, UpdateSrmmDlg);
+ HookEvent(ME_PROTO_ACCLISTCHANGED, AccountListChanged);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DbSettingChanged);
//create the smiley services
- hService[0] = CreateServiceFunction(MS_SMILEYADD_REPLACESMILEYS, ReplaceSmileysCommand);
- hService[1] = CreateServiceFunction(MS_SMILEYADD_GETSMILEYICON, GetSmileyIconCommand);
- hService[2] = CreateServiceFunction(MS_SMILEYADD_SHOWSELECTION, ShowSmileySelectionCommand);
- hService[3] = CreateServiceFunction(MS_SMILEYADD_GETINFO, GetInfoCommand);
- hService[4] = CreateServiceFunction(MS_SMILEYADD_GETINFO2, GetInfoCommand2);
- hService[5] = CreateServiceFunction(MS_SMILEYADD_PARSE, ParseText);
- hService[6] = CreateServiceFunction(MS_SMILEYADD_REGISTERCATEGORY, RegisterPack);
- hService[7] = CreateServiceFunction(MS_SMILEYADD_BATCHPARSE, ParseTextBatch);
- hService[8] = CreateServiceFunction(MS_SMILEYADD_BATCHFREE, FreeTextBatch);
- hService[9] = CreateServiceFunction(MS_SMILEYADD_CUSTOMCATMENU, CustomCatMenu);
- hService[10] = CreateServiceFunction(MS_SMILEYADD_RELOAD, ReloadPack);
- hService[11] = CreateServiceFunction(MS_SMILEYADD_LOADCONTACTSMILEYS, LoadContactSmileys);
-
-
- hService[12] = CreateServiceFunction(MS_SMILEYADD_PARSEW, ParseTextW);
-
-
+ CreateServiceFunction(MS_SMILEYADD_REPLACESMILEYS, ReplaceSmileysCommand);
+ CreateServiceFunction(MS_SMILEYADD_GETSMILEYICON, GetSmileyIconCommand);
+ CreateServiceFunction(MS_SMILEYADD_SHOWSELECTION, ShowSmileySelectionCommand);
+ CreateServiceFunction(MS_SMILEYADD_GETINFO, GetInfoCommand);
+ CreateServiceFunction(MS_SMILEYADD_GETINFO2, GetInfoCommand2);
+ CreateServiceFunction(MS_SMILEYADD_PARSE, ParseText);
+ CreateServiceFunction(MS_SMILEYADD_REGISTERCATEGORY, RegisterPack);
+ CreateServiceFunction(MS_SMILEYADD_BATCHPARSE, ParseTextBatch);
+ CreateServiceFunction(MS_SMILEYADD_BATCHFREE, FreeTextBatch);
+ CreateServiceFunction(MS_SMILEYADD_CUSTOMCATMENU, CustomCatMenu);
+ CreateServiceFunction(MS_SMILEYADD_RELOAD, ReloadPack);
+ CreateServiceFunction(MS_SMILEYADD_LOADCONTACTSMILEYS, LoadContactSmileys);
+ CreateServiceFunction(MS_SMILEYADD_PARSEW, ParseTextW);
return 0;
}
-
extern "C" __declspec(dllexport) int Unload(void)
{
- int i;
-
RemoveDialogBoxHook();
- for (i=0; i<SIZEOF(hHooks); i++)
- UnhookEvent(hHooks[i]);
-
- for (i=0; i<SIZEOF(hService); i++)
- DestroyServiceFunction(hService[i]);
-
DestroyHookableEvent(hEvent1);
RichEditData_Destroy();
@@ -191,15 +166,12 @@ extern "C" __declspec(dllexport) int Unload(void)
menuHandleArray.destroy();
mir_free(metaProtoName);
-
return 0;
}
-
extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID /*lpvReserved*/)
{
- switch(fdwReason)
- {
+ switch(fdwReason) {
case DLL_PROCESS_ATTACH:
g_hInst = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
index dc41b4156a..ba90cfb1a3 100644
--- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp
+++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
@@ -76,8 +76,7 @@ void RegisterButtons()
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, SIZEOF(szFile));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszSection = "Toolbar/StartupStatus";
sid.pszName = "StartupStatus/TtbDown";
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 765272fdd2..aab81cf6dc 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -465,8 +465,7 @@ void Chat_AddIcons(void)
GetModuleFileName(g_hIconDLL, szFile, SIZEOF(szFile));
// 16x16 icons
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.pszSection = "TabSRMM/Group chat windows";
sid.ptszDefaultFile = szFile;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 6e92fc517e..978d505890 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -1052,8 +1052,7 @@ static int TSAPI SetupIconLibConfig()
FreeLibrary(g_hIconDLL);
g_hIconDLL = 0;
- SKINICONDESC sid = { 0 };
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFilename;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index 258725055f..56546828ce 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -573,8 +573,7 @@ int LoadVarModule()
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
- SKINICONDESC sid = { 0 };
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszSection = TranslateT("Variables");
sid.ptszDescription = TranslateT("Help");
sid.pszName = "vars_help";
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 866fdfbd2c..b935f2134f 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -243,7 +243,7 @@ int SystemModulesLoaded(WPARAM, LPARAM)
struct TIconListItem
{
- TCHAR* szDescr;
+ char* szDescr;
char* szName;
int defIconID;
HANDLE hIcon;
@@ -252,10 +252,10 @@ struct TIconListItem
static TIconListItem iconList[] =
{
- {LPGENT("Check mail"), "YAMN_Check", IDI_CHECKMAIL, 0},
- {LPGENT("Launch application"), "YAMN_Launch", IDI_LAUNCHAPP, 0},
- {LPGENT("New Mail"), "YAMN_NewMail", IDI_NEWMAIL, 0},
- {LPGENT("Connect Fail"), "YAMN_ConnectFail", IDI_BADCONNECT, 0},
+ { LPGEN("Check mail"), "YAMN_Check", IDI_CHECKMAIL, 0 },
+ { LPGEN("Launch application"), "YAMN_Launch", IDI_LAUNCHAPP, 0 },
+ { LPGEN("New Mail"), "YAMN_NewMail", IDI_NEWMAIL, 0 },
+ { LPGEN("Connect Fail"), "YAMN_ConnectFail", IDI_BADCONNECT, 0 },
};
static void LoadIcons()
@@ -263,16 +263,14 @@ static void LoadIcons()
TCHAR szFile[MAX_PATH];
GetModuleFileName(YAMNVar.hInst, szFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_ALL_TCHAR;
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.flags = SIDF_PATH_TCHAR;
sid.ptszDefaultFile = szFile;
- sid.ptszSection = _T("YAMN");
+ sid.pszSection = "YAMN";
- for (int i = 0, k = 0; i < SIZEOF(iconList); i++)
- {
+ for (int i = 0, k = 0; i < SIZEOF(iconList); i++) {
sid.pszName = iconList[i].szName;
- sid.ptszDescription = iconList[i].szDescr;
+ sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
iconList[i].hIcon = Skin_AddIcon(&sid);
}
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp
index c496c2482e..69fbe08a0f 100644
--- a/protocols/AimOscar/src/theme.cpp
+++ b/protocols/AimOscar/src/theme.cpp
@@ -75,8 +75,7 @@ void InitIcons(void)
char szSettingName[100];
char szSectionName[100];
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
sid.pszSection = szSectionName;
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index 021e8a6fcc..78e21a18f1 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -55,8 +55,7 @@ void InitIcons(void)
char setting_name[100];
char section_name[100];
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.cx = sid.cy = 16;
sid.pszName = setting_name;
diff --git a/protocols/Gadu-Gadu/src/icolib.cpp b/protocols/Gadu-Gadu/src/icolib.cpp
index bc83381e6a..e353dcdb17 100644
--- a/protocols/Gadu-Gadu/src/icolib.cpp
+++ b/protocols/Gadu-Gadu/src/icolib.cpp
@@ -57,8 +57,7 @@ void gg_icolib_init()
char szSectionName[100];
mir_snprintf(szSectionName, sizeof( szSectionName ), "%s/%s", LPGEN("Protocols"), LPGEN(GGDEF_PROTO));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszSection = szSectionName;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp
index 1bde54a395..d7ed8753cc 100644
--- a/protocols/IRCG/src/options.cpp
+++ b/protocols/IRCG/src/options.cpp
@@ -223,8 +223,7 @@ void AddIcons(void)
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.pszSection = "Protocols/IRC";
sid.ptszDefaultFile = szFile;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 3abf457b1b..490a8b1377 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -196,11 +196,10 @@ void CJabberProto::IconsInit(void)
for (i = 0; i < SIZEOF(TransportProtoTable); ++i)
m_transportProtoTableStartIndex[i] = -1;
- SKINICONDESC sid = {0};
char szFile[MAX_PATH];
GetModuleFileNameA(hInst, szFile, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.pszDefaultFile = szFile;
sid.flags = SIDF_TCHAR;
@@ -612,8 +611,7 @@ static void sttProcessIcons(int iAmount)
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 7eed67a3ce..bac6553e8f 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -60,8 +60,7 @@ void MsnInitIcons(void)
char szSectionName[100];
mir_snprintf(szSectionName, sizeof(szSectionName), "%s/%s", LPGEN("Protocols"), LPGEN("MSN"));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszSection = szSectionName;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp
index 4ed027ed0c..04ab200f66 100644
--- a/protocols/Omegle/src/theme.cpp
+++ b/protocols/Omegle/src/theme.cpp
@@ -48,22 +48,18 @@ void InitIcons(void)
char setting_name[100];
char section_name[100];
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.cx = sid.cy = 16;
sid.pszName = setting_name;
sid.pszSection = section_name;
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_TCHAR;
- for (int i=0; i<SIZEOF(icons); i++)
- {
- if(icons[i].defIconID)
- {
+ for (int i=0; i<SIZEOF(icons); i++) {
+ if(icons[i].defIconID) {
mir_snprintf(setting_name,sizeof(setting_name),"%s_%s","Omegle",icons[i].name);
- if (icons[i].section)
- {
+ if (icons[i].section) {
mir_snprintf(section_name,sizeof(section_name),"%s/%s/%s",LPGEN("Protocols"),
LPGEN("Omegle"), icons[i].section);
} else {
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 05c76957f5..8d6e8a5b0d 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -130,13 +130,11 @@ static int TlenIconsChanged(void *ptr, WPARAM wParam, LPARAM lParam)
static void TlenRegisterIcons()
{
- SKINICONDESC sid = { 0 };
- TCHAR path[MAX_PATH];
- TCHAR szSectionName[100];
+ TCHAR path[MAX_PATH], szSectionName[100];
mir_sntprintf(szSectionName, SIZEOF( szSectionName ), _T("%s/%s"), _T("Protocols"), _T("Tlen"));
-
GetModuleFileName(hInst, path, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
+
+ SKINICONDESC sid = { sizeof(sid) };
sid.cx = sid.cy = 16;
sid.ptszSection = szSectionName;
sid.ptszDefaultFile = path;
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp
index 18cc7ce7f8..3014c4523b 100644
--- a/protocols/Twitter/src/theme.cpp
+++ b/protocols/Twitter/src/theme.cpp
@@ -47,8 +47,7 @@ void InitIcons(void)
char setting_name[100];
char section_name[100];
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.cx = sid.cy = 16;
sid.pszName = setting_name;
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 2add029050..8bb1fe3397 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1364,8 +1364,7 @@ extern "C" __declspec(dllexport) int Load(void)
char szFile[MAX_PATH];
GetModuleFileNameA(hinstance, szFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.pszDefaultFile = szFile;
sid.cx = sid.cy = 16;
sid.ptszSection = LPGENT( "Protocols/XFire" );
diff --git a/protocols/Yahoo/src/icolib.cpp b/protocols/Yahoo/src/icolib.cpp
index 40c7cb9421..40ca82da25 100644
--- a/protocols/Yahoo/src/icolib.cpp
+++ b/protocols/Yahoo/src/icolib.cpp
@@ -43,8 +43,7 @@ void CYahooProto::IconsInit( void )
char szSectionName[100];
mir_snprintf(szSectionName, sizeof(szSectionName), "%s/%s", LPGEN("Protocols"), LPGEN("YAHOO"));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszSection = szSectionName;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index 8fa46bd0ed..fae3bdd567 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -480,8 +480,7 @@ void AddIcons(void)
TCHAR szFile[MAX_PATH];
GetModuleFileName(g_hInst, szFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.flags = SIDF_PATH_TCHAR;
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index 7bc0b29a31..d60ce6d3fc 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -50,8 +50,7 @@ static void InitIcons(void)
TCHAR szFile[MAX_PATH];
GetModuleFileName(g_hInst, szFile, SIZEOF(szFile));
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
sid.pszSection = LPGEN("Messaging");
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index b491893264..a1cfbf8c57 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -528,8 +528,7 @@ void LoadExtraIconsModule()
TCHAR tszFile[MAX_PATH];
GetModuleFileName(NULL, tszFile, MAX_PATH);
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_PATH_TCHAR;
sid.ptszDefaultFile = tszFile;
sid.pszSection = "Contact List";