From 30ab6ceb71842f003f649b3d62b89af010cf40d1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2012 17:00:14 +0000 Subject: - direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call; - obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/chat/options.cpp | 25 ++++++++++---------- plugins/TabSRMM/docs/changelog.txt | 2 +- plugins/TabSRMM/docs/readme.txt | 2 +- plugins/TabSRMM/src/container.cpp | 2 +- plugins/TabSRMM/src/generic_msghandlers.cpp | 2 +- plugins/TabSRMM/src/globals.cpp | 36 ++++++++++++++--------------- plugins/TabSRMM/src/msgdlgutils.cpp | 4 ++-- plugins/TabSRMM/src/typingnotify.cpp | 4 ++-- plugins/TabSRMM/tabmodplus/modplus.cpp | 8 +++---- 9 files changed, 43 insertions(+), 42 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/chat/options.cpp b/plugins/TabSRMM/chat/options.cpp index a00a87161b..28f0362869 100644 --- a/plugins/TabSRMM/chat/options.cpp +++ b/plugins/TabSRMM/chat/options.cpp @@ -1463,18 +1463,19 @@ int OptionsInit(void) g_Settings.hGroup = 0; LoadGlobalSettings(); g_Settings.Highlight = new CMUCHighlight(); - SkinAddNewSoundEx("ChatMessage", "Group chats", "Incoming message"); - SkinAddNewSoundEx("ChatSent", "Group chats", "Outgoing message"); - SkinAddNewSoundEx("ChatHighlight", "Group chats", "Message is highlighted"); - SkinAddNewSoundEx("ChatAction", "Group chats", "User has performed an action"); - SkinAddNewSoundEx("ChatJoin", "Group chats", "User has joined"); - SkinAddNewSoundEx("ChatPart", "Group chats", "User has left"); - SkinAddNewSoundEx("ChatKick", "Group chats", "User has kicked some other user"); - SkinAddNewSoundEx("ChatMode", "Group chats", "User's status was changed"); - SkinAddNewSoundEx("ChatNick", "Group chats", "User has changed name"); - SkinAddNewSoundEx("ChatNotice", "Group chats", "User has sent a notice"); - SkinAddNewSoundEx("ChatQuit", "Group chats", "User has disconnected"); - SkinAddNewSoundEx("ChatTopic", "Group chats", "The topic has been changed"); + + SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message")); + SkinAddNewSoundEx("ChatSent", LPGEN("Group chats"), LPGEN("Outgoing message")); + SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted")); + SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action")); + SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined")); + SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left")); + SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user")); + SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed")); + SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name")); + SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice")); + SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected")); + SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed")); LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE); hFont = CreateFontIndirect(&lf); diff --git a/plugins/TabSRMM/docs/changelog.txt b/plugins/TabSRMM/docs/changelog.txt index d5d1f52406..0bd0ebd908 100644 --- a/plugins/TabSRMM/docs/changelog.txt +++ b/plugins/TabSRMM/docs/changelog.txt @@ -667,7 +667,7 @@ Version 2.0.0.4 - 2007/12/23 menu bar. ! fixed untranslateable strings in the container options dialog - disabled skin editor for tabsrmm (still not complete, avoid confusing - people :) ). + people :)). ! fixed minor issue with double icons in status bar (on rare occasions) ! fixed skin drawing on multimonitor systems (patch by Bryan) diff --git a/plugins/TabSRMM/docs/readme.txt b/plugins/TabSRMM/docs/readme.txt index c1326b6b12..9f39dd28bf 100644 --- a/plugins/TabSRMM/docs/readme.txt +++ b/plugins/TabSRMM/docs/readme.txt @@ -86,7 +86,7 @@ Lots of people provided useful suggestions, feature requests and bug reports dur the development phase. I cannot name you all here, because it's just too many. * The Miranda-IM development team and all contributors for making the best - IM client on this planet (and probably in the entire universe :) ) + IM client on this planet (and probably in the entire universe :)) * sryo (teodalton@yahoo.com) for the minimal icons. diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index d10459da58..5181022eac 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2202,7 +2202,7 @@ buttons_done: * hwnd: handle of a message dialog. * * returns the tab index (zero based), -1 if no tab is found (which SHOULD not - * really happen, but who knows... ;) ) + * really happen, but who knows... ;)) */ int TSAPI GetTabIndexFromHWND(HWND hwndTab, HWND hwnd) diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index b08957e938..d889bb2bca 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1320,7 +1320,7 @@ HWND TSAPI DM_CreateClist(TWindowData *dat) HWND hwndClist = CreateWindowExA(0, "CListControl", "", WS_TABSTOP | WS_VISIBLE | WS_CHILD | 0x248, 184, 0, 30, 30, dat->hwnd, (HMENU)IDC_CLIST, g_hInst, NULL); - //MAD: fix for little bug, when following code didn't work (another hack :) ) + //MAD: fix for little bug, when following code didn't work (another hack :)) HANDLE hItem; SendMessage(hwndClist, WM_TIMER, 14, 0); // diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 07a4462386..a1c7d1033e 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -137,26 +137,26 @@ void CGlobals::reloadSystemStartup() HDC hScrnDC; DBVARIANT dbv = {0}; - m_WinVerMajor = WinVerMajor(); - m_WinVerMinor = WinVerMinor(); - m_bIsXP = IsWinVerXPPlus(); - m_bIsVista = IsWinVerVistaPlus(); - m_bIsWin7 = IsWinVer7Plus(); + m_WinVerMajor = WinVerMajor(); + m_WinVerMinor = WinVerMinor(); + m_bIsXP = IsWinVerXPPlus(); + m_bIsVista = IsWinVerVistaPlus(); + m_bIsWin7 = IsWinVer7Plus(); ::LoadTSButtonModule(); ::RegisterTabCtrlClass(); CTip::registerClass(); - dwThreadID = GetCurrentThreadId(); + dwThreadID = GetCurrentThreadId(); - PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT)); + PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT)); TranslateMenu(g_hMenuContext); - SkinAddNewSoundEx("RecvMsgActive", "Instant messages", "Incoming (Focused Window)"); - SkinAddNewSoundEx("RecvMsgInactive", "Instant messages", "Incoming (Unfocused Window)"); - SkinAddNewSoundEx("AlertMsg", "Instant messages", "Incoming (New Session)"); - SkinAddNewSoundEx("SendMsg", "Instant messages", "Outgoing"); - SkinAddNewSoundEx("SendError", "Instant messages", "Message send error"); + SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (Focused Window)")); + SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (Unfocused Window)")); + SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (New Session)")); + SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing")); + SkinAddNewSoundEx("SendError", LPGEN("Instant messages"), LPGEN("Message send error")); hCurSplitNS = LoadCursor(NULL, IDC_SIZENS); hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE); @@ -348,16 +348,16 @@ void CGlobals::reloadSettings(bool fReloadSkins) */ void CGlobals::reloadAdv() { - g_bDisableAniAvatars= M->GetByte("adv_DisableAniAvatars", 0); - g_bSoundOnTyping = M->GetByte("adv_soundontyping", 0); - m_dontUseDefaultKbd= M->GetByte("adv_leaveKeyboardAlone", 1); - g_bClientInStatusBar = M->GetByte("adv_ClientIconInStatusBar", 0); + g_bDisableAniAvatars = M->GetByte("adv_DisableAniAvatars", 0); + g_bSoundOnTyping = M->GetByte("adv_soundontyping", 0); + m_dontUseDefaultKbd = M->GetByte("adv_leaveKeyboardAlone", 1); + g_bClientInStatusBar = M->GetByte("adv_ClientIconInStatusBar", 0); if(g_bSoundOnTyping && m_TypingSoundAdded == false) { - SkinAddNewSoundEx("SoundOnTyping", "Other", "TABSRMM: Typing"); + SkinAddNewSoundEx("SoundOnTyping", LPGEN("Other"), LPGEN("TABSRMM: Typing")); m_TypingSoundAdded = true; } - m_AllowOfflineMultisend = M->GetByte("AllowOfflineMultisend", 0); + m_AllowOfflineMultisend = M->GetByte("AllowOfflineMultisend", 0); } const HMENU CGlobals::getMenuBar() diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 770b415110..de5b221208 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -63,7 +63,7 @@ static int g_status_events[] = { }; static int g_status_events_size = 0; -#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) ) +#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0])) BOOL TSAPI IsStatusEvent(int eventType) { @@ -412,7 +412,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) case ID_TABMENU_LEAVECHATROOM: { if (dat && dat->bType == SESSIONTYPE_CHAT) { SESSION_INFO *si = (SESSION_INFO *)dat->si; - if ( (si != NULL) && (dat->hContact != NULL) ) { + if ( (si != NULL) && (dat->hContact != NULL)) { char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0); if ( szProto ) CallProtoService( szProto, PS_LEAVECHAT, (WPARAM)dat->hContact, 0 ); diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 71b5138bd6..f57b381e3b 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -558,9 +558,9 @@ int TN_ModuleInit() mi.pszPopupName = LPGEN("PopUps"); hDisableMenu = Menu_AddMainMenuItem(&mi); } - SkinAddNewSoundEx("TNStart", "Instant messages", "Contact started typing"); - SkinAddNewSoundEx("TNStop", "Instant messages", "Contact stopped typing"); + SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing")); + SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing")); return 0; } diff --git a/plugins/TabSRMM/tabmodplus/modplus.cpp b/plugins/TabSRMM/tabmodplus/modplus.cpp index 8ac2e5d698..ce9e863f34 100644 --- a/plugins/TabSRMM/tabmodplus/modplus.cpp +++ b/plugins/TabSRMM/tabmodplus/modplus.cpp @@ -63,7 +63,7 @@ static char* getMirVer(HANDLE hContact) if ( !szProto ) return (NULL); - if ( !DBGetContactSettingString(hContact, szProto, "MirVer", &dbv) ) { + if ( !DBGetContactSettingString(hContact, szProto, "MirVer", &dbv)) { msg=mir_strdup(dbv.pszVal); DBFreeVariant(&dbv); } @@ -76,7 +76,7 @@ static TCHAR* getMenuEntry(int i) { DBVARIANT dbv = {0}; mir_snprintf(MEntry, 255, "MenuEntry_%u", i); - if ( !M->GetTString(NULL, "tabmodplus",MEntry, &dbv) ) { + if ( !M->GetTString(NULL, "tabmodplus",MEntry, &dbv)) { msg = mir_tstrdup(dbv.ptszVal); DBFreeVariant(&dbv); } @@ -121,7 +121,7 @@ int ModPlus_PreShutdown(WPARAM wparam, LPARAM lparam) static int RegisterCustomButton(WPARAM wParam,LPARAM lParam) { - if ( ServiceExists(MS_BB_ADDBUTTON) ) { + if ( ServiceExists(MS_BB_ADDBUTTON)) { BBButton bbd = {0}; bbd.cbSize = sizeof(BBButton); bbd.bbbFlags = BBBF_ISIMBUTTON|BBBF_ISLSIDEBUTTON|BBBF_ISPUSHBUTTON; @@ -261,7 +261,7 @@ int ModPlus_Init(WPARAM wparam,LPARAM lparam) hEventCBButtonPressed=HookEvent(ME_MSG_BUTTONPRESSED,CustomButtonPressed); hEventCBInit=HookEvent(ME_MSG_TOOLBARLOADED,RegisterCustomButton); - if (PluginConfig.g_bClientInStatusBar&&ServiceExists(MS_MSG_ADDICON) ) { + if (PluginConfig.g_bClientInStatusBar&&ServiceExists(MS_MSG_ADDICON)) { StatusIconData sid = {0}; sid.cbSize = sizeof(sid); sid.szModule = (char *)"tabmodplus"; -- cgit v1.2.3