summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/chat
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 23:51:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 23:51:53 +0000
commit57abc51aad272a656282a52a460a47abe24e07d6 (patch)
treec6f3538e63c9c736cfa7129423d1b498273278b6 /plugins/TabSRMM/chat
parentb9f120f97699286410fe902f93135235eed0b127 (diff)
- MS_SKIN2_ADDICON replaced with Skin_AddIcon;
- SKINICONDESC_SIZE* constants removed and replaced with sizeof(sid); - added SIDF_PATH_UNICODE for all plugins; - dynamic translation fixed in the icolib options dialog git-svn-id: http://svn.miranda-ng.org/main/trunk@507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/chat')
-rw-r--r--plugins/TabSRMM/chat/options.cpp110
1 files changed, 53 insertions, 57 deletions
diff --git a/plugins/TabSRMM/chat/options.cpp b/plugins/TabSRMM/chat/options.cpp
index 28f0362869..6a3da75c8d 100644
--- a/plugins/TabSRMM/chat/options.cpp
+++ b/plugins/TabSRMM/chat/options.cpp
@@ -426,71 +426,67 @@ static void LoadLogFonts(void)
LoadMsgDlgFont(FONTSECTION_CHAT, i, &aFonts[i].lf, &aFonts[i].color, CHAT_FONTMODULE);
}
-static struct _tagicons { char *szDesc; char *szName; int id; UINT size;} _icons[] = {
- LPGEN("Window Icon"), "chat_window", IDI_CHANMGR, 16,
- LPGEN("Icon overlay"), "chat_overlay", IDI_OVERLAY, 16,
-
- LPGEN("Status 1 (10x10)"), "chat_status0", IDI_STATUS0, 16,
- LPGEN("Status 2 (10x10)"), "chat_status1", IDI_STATUS1, 16,
- LPGEN("Status 3 (10x10)"), "chat_status2", IDI_STATUS2, 16,
- LPGEN("Status 4 (10x10)"), "chat_status3", IDI_STATUS3, 16,
- LPGEN("Status 5 (10x10)"), "chat_status4", IDI_STATUS4, 16,
- LPGEN("Status 6 (10x10)"), "chat_status5", IDI_STATUS5, 16,
- NULL, NULL, -1, 0
+struct { char *szDesc; char *szName; int id; UINT size;} static _icons[] =
+{
+ { LPGEN("Window Icon"), "chat_window", IDI_CHANMGR, 16 },
+ { LPGEN("Icon overlay"), "chat_overlay", IDI_OVERLAY, 16 },
+
+ { LPGEN("Status 1 (10x10)"), "chat_status0", IDI_STATUS0, 16 },
+ { LPGEN("Status 2 (10x10)"), "chat_status1", IDI_STATUS1, 16 },
+ { LPGEN("Status 3 (10x10)"), "chat_status2", IDI_STATUS2, 16 },
+ { LPGEN("Status 4 (10x10)"), "chat_status3", IDI_STATUS3, 16 },
+ { LPGEN("Status 5 (10x10)"), "chat_status4", IDI_STATUS4, 16 },
+ { LPGEN("Status 6 (10x10)"), "chat_status5", IDI_STATUS5, 16 },
};
-static struct _tag1icons { char *szDesc; char *szName; int id; UINT size;} _logicons[] = {
- LPGEN("Message in (10x10)"), "chat_log_message_in", IDI_MESSAGE, 16,
- LPGEN("Message out (10x10)"), "chat_log_message_out", IDI_MESSAGEOUT, 16,
- LPGEN("Action (10x10)"), "chat_log_action", IDI_ACTION, 16,
- LPGEN("Add Status (10x10)"), "chat_log_addstatus", IDI_ADDSTATUS, 16,
- LPGEN("Remove Status (10x10)"), "chat_log_removestatus", IDI_REMSTATUS, 16,
- LPGEN("Join (10x10)"), "chat_log_join", IDI_JOIN, 16,
- LPGEN("Leave (10x10)"), "chat_log_part", IDI_PART, 16,
- LPGEN("Quit (10x10)"), "chat_log_quit", IDI_QUIT, 16,
- LPGEN("Kick (10x10)"), "chat_log_kick", IDI_KICK, 16,
- LPGEN("Notice (10x10)"), "chat_log_notice", IDI_NOTICE, 16,
- LPGEN("Nickchange (10x10)"), "chat_log_nick", IDI_NICK, 16,
- LPGEN("Topic (10x10)"), "chat_log_topic", IDI_TOPIC, 16,
- LPGEN("Highlight (10x10)"), "chat_log_highlight", IDI_HIGHLIGHT, 16,
- LPGEN("Information (10x10)"), "chat_log_info", IDI_INFO, 16,
- NULL, NULL, 0, 0
+struct { char *szDesc; char *szName; int id; UINT size;} static _logicons[] =
+{
+ { LPGEN("Message in (10x10)"), "chat_log_message_in", IDI_MESSAGE, 16 },
+ { LPGEN("Message out (10x10)"), "chat_log_message_out", IDI_MESSAGEOUT, 16 },
+ { LPGEN("Action (10x10)"), "chat_log_action", IDI_ACTION, 16 },
+ { LPGEN("Add Status (10x10)"), "chat_log_addstatus", IDI_ADDSTATUS, 16 },
+ { LPGEN("Remove Status (10x10)"), "chat_log_removestatus", IDI_REMSTATUS, 16 },
+ { LPGEN("Join (10x10)"), "chat_log_join", IDI_JOIN, 16 },
+ { LPGEN("Leave (10x10)"), "chat_log_part", IDI_PART, 16 },
+ { LPGEN("Quit (10x10)"), "chat_log_quit", IDI_QUIT, 16 },
+ { LPGEN("Kick (10x10)"), "chat_log_kick", IDI_KICK, 16 },
+ { LPGEN("Notice (10x10)"), "chat_log_notice", IDI_NOTICE, 16 },
+ { LPGEN("Nickchange (10x10)"), "chat_log_nick", IDI_NICK, 16 },
+ { LPGEN("Topic (10x10)"), "chat_log_topic", IDI_TOPIC, 16 },
+ { LPGEN("Highlight (10x10)"), "chat_log_highlight", IDI_HIGHLIGHT, 16 },
+ { LPGEN("Information (10x10)"), "chat_log_info", IDI_INFO, 16 }
};
// add icons to the skinning module
void Chat_AddIcons(void)
{
- if (ServiceExists(MS_SKIN2_ADDICON)) {
- SKINICONDESC sid = {0};
- char szFile[MAX_PATH];
- int i = 0;
-
- // 16x16 icons
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszSection = TranslateA("TabSRMM/Group chat windows");
- GetModuleFileNameA(g_hIconDLL, szFile, MAX_PATH);
- sid.pszDefaultFile = szFile;
-
- while (_icons[i].szDesc != NULL) {
- sid.cx = sid.cy = _icons[i].size;
- sid.pszDescription = _icons[i].szDesc;
- sid.pszName = _icons[i].szName;
- sid.iDefaultIndex = -_icons[i].id;
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- i++;
- }
- i = 0;
- sid.pszSection = TranslateA("TabSRMM/Group chat log");
- while (_logicons[i].szDesc != NULL) {
- sid.cx = sid.cy = _logicons[i].size;
- sid.pszDescription = _logicons[i].szDesc;
- sid.pszName = _logicons[i].szName;
- sid.iDefaultIndex = -_logicons[i].id;
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- i++;
- }
+ int i;
+ TCHAR szFile[MAX_PATH];
+ GetModuleFileName(g_hIconDLL, szFile, SIZEOF(szFile));
+
+ // 16x16 icons
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.pszSection = "TabSRMM/Group chat windows";
+ sid.ptszDefaultFile = szFile;
+ sid.flags = SIDF_PATH_TCHAR;
+
+ for (i=0; i < SIZEOF(_icons); i++) {
+ sid.cx = sid.cy = _icons[i].size;
+ sid.pszDescription = _icons[i].szDesc;
+ sid.pszName = _icons[i].szName;
+ sid.iDefaultIndex = -_icons[i].id;
+ Skin_AddIcon(&sid);
+ }
+
+ sid.pszSection = "TabSRMM/Group chat log";
+ for (i=0; i < SIZEOF(_logicons); i++) {
+ sid.cx = sid.cy = _logicons[i].size;
+ sid.pszDescription = _logicons[i].szDesc;
+ sid.pszName = _logicons[i].szName;
+ sid.iDefaultIndex = -_logicons[i].id;
+ Skin_AddIcon(&sid);
}
- return;
}
/*