From 6e05bfee48c12fcbe2a4533b47d56a58c91c3424 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 29 Sep 2013 07:20:54 +0000 Subject: no need load dll when lib linked old code about chat.dll removed from tabsrmm git-svn-id: http://svn.miranda-ng.org/main/trunk@6266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/crshdmp_10.vcxproj | 4 - plugins/CrashDumper/crshdmp_11.vcxproj | 4 - plugins/CrashDumper/src/dumper.cpp | 2 - plugins/CrashDumper/src/exhndlr.cpp | 7 - plugins/CrashDumper/src/utils.h | 1 - plugins/ShellExt/shellext_10.vcxproj | 20 +- plugins/ShellExt/shellext_11.vcxproj | 4 - plugins/SmileyAdd/SmileyAdd_10.vcxproj | 4 - plugins/SmileyAdd/SmileyAdd_11.vcxproj | 4 - plugins/SmileyAdd/src/general.cpp | 1 - .../StatusPlugins/KeepStatus/KeepStatus_10.vcxproj | 4 - .../StatusPlugins/KeepStatus/KeepStatus_11.vcxproj | 4 - .../StartupStatus/StartupStatus_10.vcxproj | 4 - .../StartupStatus/StartupStatus_11.vcxproj | 4 - plugins/TabSRMM/src/chat/main.cpp | 10 - plugins/TabSRMM/src/chat/options.cpp | 206 ++++++++++----------- plugins/TabSRMM/src/chat/services.cpp | 16 -- plugins/TabSRMM/src/globals.cpp | 3 +- plugins/TabSRMM/src/globals.h | 4 - plugins/TabSRMM/src/msgs.cpp | 12 +- plugins/TabSRMM/src/themeio.cpp | 6 +- plugins/TabSRMM/src/utils.cpp | 1 - plugins/TabSRMM/src/utils.h | 18 +- 23 files changed, 114 insertions(+), 229 deletions(-) (limited to 'plugins') diff --git a/plugins/CrashDumper/crshdmp_10.vcxproj b/plugins/CrashDumper/crshdmp_10.vcxproj index b51c53e053..3e1345c384 100644 --- a/plugins/CrashDumper/crshdmp_10.vcxproj +++ b/plugins/CrashDumper/crshdmp_10.vcxproj @@ -88,7 +88,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true @@ -123,7 +122,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true @@ -156,7 +154,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true @@ -185,7 +182,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true diff --git a/plugins/CrashDumper/crshdmp_11.vcxproj b/plugins/CrashDumper/crshdmp_11.vcxproj index 36dc13f511..2f63a900a3 100644 --- a/plugins/CrashDumper/crshdmp_11.vcxproj +++ b/plugins/CrashDumper/crshdmp_11.vcxproj @@ -92,7 +92,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true @@ -126,7 +125,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true @@ -158,7 +156,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true @@ -188,7 +185,6 @@ dbghelp.lib;version.lib;%(AdditionalDependencies) - dbghelp.dll;%(DelayLoadDLLs) true Windows true diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 6aebac5e05..f05f828c16 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -569,8 +569,6 @@ void PrintVersionInfo(bkstring& buffer, unsigned flags) } __except(EXCEPTION_EXECUTE_HANDLER) {} } - - if (flags & (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL)) UnloadDbgHlp(); } diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp index 305172a7c8..e014885112 100644 --- a/plugins/CrashDumper/src/exhndlr.cpp +++ b/plugins/CrashDumper/src/exhndlr.cpp @@ -22,11 +22,6 @@ void RemoveExceptionHandler(void) exchndlrv = NULL; } -void UnloadDbgHlp(void) -{ - __FUnloadDelayLoadedDLL2("dbghelp.dll"); -} - int myDebugFilter(unsigned int code, PEXCEPTION_POINTERS ep) { if (code == VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND) || @@ -113,8 +108,6 @@ void myfilterWorker(PEXCEPTION_POINTERS exc_ptr, bool notify) bool empty1 = GetFileSize(hDumpFile, NULL) == 0; CloseHandle(hDumpFile); if (empty1) DeleteFile(path); - - UnloadDbgHlp(); } LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr) diff --git a/plugins/CrashDumper/src/utils.h b/plugins/CrashDumper/src/utils.h index 50ac39470f..d736b42d9b 100644 --- a/plugins/CrashDumper/src/utils.h +++ b/plugins/CrashDumper/src/utils.h @@ -102,7 +102,6 @@ extern TCHAR VersionInfoFolder[MAX_PATH]; void WriteBBFile(bkstring& buffer, bool hdr); void WriteUtfFile(HANDLE hDumpFile, char* bufu); -void UnloadDbgHlp(void); LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr); LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr); diff --git a/plugins/ShellExt/shellext_10.vcxproj b/plugins/ShellExt/shellext_10.vcxproj index 74339bf1ab..e1738ff252 100644 --- a/plugins/ShellExt/shellext_10.vcxproj +++ b/plugins/ShellExt/shellext_10.vcxproj @@ -91,14 +91,13 @@ true true Windows - $(IntDir)$(TargetName).lib true true - false $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% - mir_core.dll src\ShellExt.def + false + $(IntDir)$(TargetName).lib @@ -123,11 +122,10 @@ true true Windows - $(IntDir)$(TargetName).lib - false $(ProfileDir)..\..\bin10\lib - mir_core.dll src\ShellExt.def + false + $(IntDir)$(TargetName).lib @@ -151,12 +149,11 @@ true true Windows - $(IntDir)$(TargetName).lib - false $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% - mir_core.dll src\ShellExt.def + false + $(IntDir)$(TargetName).lib @@ -179,11 +176,10 @@ true true Windows - $(IntDir)$(TargetName).lib - false $(ProfileDir)..\..\bin10\lib - mir_core.dll src\ShellExt.def + false + $(IntDir)$(TargetName).lib diff --git a/plugins/ShellExt/shellext_11.vcxproj b/plugins/ShellExt/shellext_11.vcxproj index 7251574c52..27539d8200 100644 --- a/plugins/ShellExt/shellext_11.vcxproj +++ b/plugins/ShellExt/shellext_11.vcxproj @@ -98,7 +98,6 @@ true true $(ProfileDir)..\..\bin11\lib - mir_core.dll src\ShellExt.def false $(IntDir)$(TargetName).lib @@ -128,7 +127,6 @@ Windows $(ProfileDir)..\..\bin11\lib false - mir_core.dll src\ShellExt.def false $(IntDir)$(TargetName).lib @@ -156,7 +154,6 @@ true Windows $(ProfileDir)..\..\bin11\lib - mir_core.dll src\ShellExt.def false $(IntDir)$(TargetName).lib @@ -183,7 +180,6 @@ true Windows $(ProfileDir)..\..\bin11\lib - mir_core.dll src\ShellExt.def false $(IntDir)$(TargetName).lib diff --git a/plugins/SmileyAdd/SmileyAdd_10.vcxproj b/plugins/SmileyAdd/SmileyAdd_10.vcxproj index 4849a15ab7..e9c91aed19 100644 --- a/plugins/SmileyAdd/SmileyAdd_10.vcxproj +++ b/plugins/SmileyAdd/SmileyAdd_10.vcxproj @@ -95,7 +95,6 @@ false true $(IntDir)$(TargetName).lib - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin10\lib @@ -124,7 +123,6 @@ true $(IntDir)$(TargetName).lib Windows - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin10\lib @@ -160,7 +158,6 @@ $(IntDir)$(TargetName).lib true Windows - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% @@ -196,7 +193,6 @@ $(IntDir)$(TargetName).lib true Windows - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% diff --git a/plugins/SmileyAdd/SmileyAdd_11.vcxproj b/plugins/SmileyAdd/SmileyAdd_11.vcxproj index 30ec5a3491..b60d3de8f6 100644 --- a/plugins/SmileyAdd/SmileyAdd_11.vcxproj +++ b/plugins/SmileyAdd/SmileyAdd_11.vcxproj @@ -99,7 +99,6 @@ false true $(IntDir)$(TargetName).lib - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin11\lib false @@ -129,7 +128,6 @@ true $(IntDir)$(TargetName).lib Windows - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin11\lib @@ -165,7 +163,6 @@ $(IntDir)$(TargetName).lib true Windows - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin11\lib @@ -200,7 +197,6 @@ $(IntDir)$(TargetName).lib true Windows - mir_core.dll;gdiplus.dll;%(DelayLoadDLLs) $(ProfileDir)..\..\bin11\lib diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 18cc673032..0fa8cc9612 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -232,7 +232,6 @@ void DestroyGdiPlus(void) if (g_gdiplusToken != 0) { Gdiplus::GdiplusShutdown(g_gdiplusToken); - __FUnloadDelayLoadedDLL2("gdiplus.dll"); g_gdiplusToken = 0; } } diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj index 8923d4a812..0aedfb3be4 100644 --- a/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj +++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj @@ -95,7 +95,6 @@ Windows 0x11cd0000 $(ProfileDir)..\..\..\bin10\lib - wininet.dll @@ -129,7 +128,6 @@ $(IntDir)$(TargetName).lib Windows $(ProfileDir)..\..\..\bin10\lib - wininet.dll /PDBALTPATH:%_PDB% @@ -162,7 +160,6 @@ false 0x11cd0000 $(ProfileDir)..\..\..\bin10\lib - wininet.dll /PDBALTPATH:%_PDB% @@ -190,7 +187,6 @@ false 0x11cd0000 $(ProfileDir)..\..\..\bin10\lib - wininet.dll ..\..\..\include\msapi diff --git a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj index a14674c4d1..a94fb37e3a 100644 --- a/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj +++ b/plugins/StatusPlugins/KeepStatus/KeepStatus_11.vcxproj @@ -99,7 +99,6 @@ Windows 0x11cd0000 $(ProfileDir)..\..\..\bin11\lib - wininet.dll false @@ -134,7 +133,6 @@ $(IntDir)$(TargetName).lib Windows $(ProfileDir)..\..\..\bin11\lib - wininet.dll @@ -166,7 +164,6 @@ false 0x11cd0000 $(ProfileDir)..\..\..\bin11\lib - wininet.dll ..\..\..\include\msapi @@ -193,7 +190,6 @@ false 0x11cd0000 $(ProfileDir)..\..\..\bin11\lib - wininet.dll ..\..\..\include\msapi diff --git a/plugins/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj b/plugins/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj index d5036aefb8..c4b2324fad 100644 --- a/plugins/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj +++ b/plugins/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj @@ -95,7 +95,6 @@ 0x11bd0000 wininet.lib;%(AdditionalDependencies) $(ProfileDir)..\..\..\bin10\lib - wininet.dll @@ -129,7 +128,6 @@ Windows false $(ProfileDir)..\..\..\bin10\lib - wininet.dll /PDBALTPATH:%_PDB% @@ -160,7 +158,6 @@ false 0x11bd0000 $(ProfileDir)..\..\..\bin10\lib - wininet.dll /PDBALTPATH:%_PDB% @@ -189,7 +186,6 @@ false 0x11bd0000 $(ProfileDir)..\..\..\bin10\lib - wininet.dll ..\..\..\include\msapi diff --git a/plugins/StatusPlugins/StartupStatus/StartupStatus_11.vcxproj b/plugins/StatusPlugins/StartupStatus/StartupStatus_11.vcxproj index af1a442260..1ebed67249 100644 --- a/plugins/StatusPlugins/StartupStatus/StartupStatus_11.vcxproj +++ b/plugins/StatusPlugins/StartupStatus/StartupStatus_11.vcxproj @@ -99,7 +99,6 @@ 0x11bd0000 wininet.lib;%(AdditionalDependencies) $(ProfileDir)..\..\..\bin11\lib - wininet.dll false @@ -134,7 +133,6 @@ Windows false $(ProfileDir)..\..\..\bin11\lib - wininet.dll @@ -164,7 +162,6 @@ false 0x11bd0000 $(ProfileDir)..\..\..\bin11\lib - wininet.dll ..\..\..\include\msapi @@ -192,7 +189,6 @@ false 0x11bd0000 $(ProfileDir)..\..\..\bin11\lib - wininet.dll ..\..\..\include\msapi diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp index 4a90cf5717..1953e081f4 100644 --- a/plugins/TabSRMM/src/chat/main.cpp +++ b/plugins/TabSRMM/src/chat/main.cpp @@ -1,7 +1,4 @@ /* - * astyle --force-indent=tab=4 --brackets=linux --indent-switches - * --pad=oper --one-line=keep-blocks --unpad=paren - * * Miranda NG: the free IM client for Microsoft* Windows* * * Copyright 2000-2009 Miranda ICQ/IM project, @@ -54,10 +51,6 @@ char *pszActiveWndModule = 0; int Chat_Load() { - if (M.GetByte("forceDisableMUC", 0)) { - PluginConfig.m_chat_enabled = false; - return 0; - } g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU)); if (CreateServiceFunctions()) { HookEvents(); @@ -73,9 +66,6 @@ int Chat_Load() int Chat_Unload(void) { - if (!PluginConfig.m_chat_enabled) - return 0; - db_set_w(NULL, "Chat", "SplitterX", (WORD)g_Settings.iSplitterX); db_set_w(NULL, "Chat", "splitY", (WORD)g_Settings.iSplitterY); diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 5419240089..9a79022f8b 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -1,7 +1,4 @@ /* - * astyle --force-indent=tab=4 --brackets=linux --indent-switches - * --pad=oper --one-line=keep-blocks --unpad=paren - * * Miranda NG: the free IM client for Microsoft* Windows* * * Copyright 2000-2009 Miranda ICQ/IM project, @@ -498,8 +495,8 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM switch (uMsg) { case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - if (PluginConfig.m_chat_enabled) { + { + TranslateDialogDefault(hwndDlg); SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHECKBOXES), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHECKBOXES), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES); HIMAGELIST himlOptions = (HIMAGELIST)SendDlgItemMessage(hwndDlg, IDC_CHECKBOXES, TVM_SETIMAGELIST, TVSIL_STATE, (LPARAM)CreateStateImageList()); @@ -517,10 +514,6 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM mir_free(pszGroup); Utils::showDlgControl(hwndDlg, IDC_STATIC_MESSAGE, SW_HIDE); } - else { - for (int i=0; i < SIZEOF(_o1controls); i++) - Utils::showDlgControl(hwndDlg, _o1controls[i], SW_HIDE); - } break; case WM_COMMAND: @@ -573,7 +566,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - if (PluginConfig.m_chat_enabled) { + { int iLen; TCHAR *pszText = NULL; BYTE b; @@ -814,25 +807,23 @@ void RegisterFontServiceFonts() { int FontServiceFontsChanged(WPARAM,LPARAM) { - if (PluginConfig.m_chat_enabled) { - LoadLogFonts(); - FreeMsgLogBitmaps(); - LoadMsgLogBitmaps(); - - LOGFONT lf; - LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE); - HFONT hFont = CreateFontIndirect(&lf); - int iText = GetTextPixelSize(MakeTimeStamp(g_Settings.pszTimeStamp, time(NULL)), hFont, true); - DeleteObject(hFont); - g_Settings.LogTextIndent = iText; - g_Settings.LogTextIndent = g_Settings.LogTextIndent * 12 / 10; - g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true); - - LoadGlobalSettings(); - MM_FontsChanged(); - MM_FixColors(); - SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE); - } + LoadLogFonts(); + FreeMsgLogBitmaps(); + LoadMsgLogBitmaps(); + + LOGFONT lf; + LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE); + HFONT hFont = CreateFontIndirect(&lf); + int iText = GetTextPixelSize(MakeTimeStamp(g_Settings.pszTimeStamp, time(NULL)), hFont, true); + DeleteObject(hFont); + g_Settings.LogTextIndent = iText; + g_Settings.LogTextIndent = g_Settings.LogTextIndent * 12 / 10; + g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true); + + LoadGlobalSettings(); + MM_FontsChanged(); + MM_FixColors(); + SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE); PluginConfig.reloadSettings(); CSkin::initAeroEffect(); @@ -858,7 +849,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - if (PluginConfig.m_chat_enabled) { + { SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_SETRANGE, 0, MAKELONG(5000, 0)); SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "Chat", "LogLimit", 100), 0)); SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN3, UDM_SETRANGE, 0, MAKELONG(255, 10)); @@ -910,11 +901,6 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY), tszTooltipText, TranslateT("Variables")); } } - else { - int i=0; - while (_o2chatcontrols[i]) - Utils::enableDlgControl(hwndDlg, _o2chatcontrols[i++], FALSE); - } if (hPathTip) SetTimer(hwndDlg, 0, 3000, NULL); break; @@ -1007,11 +993,9 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM } case IDC_LOGGING: - if (PluginConfig.m_chat_enabled) { - Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE); - Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE); - Utils::enableDlgControl(hwndDlg, IDC_LIMIT, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE); - } + Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE); + Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE); + Utils::enableDlgControl(hwndDlg, IDC_LIMIT, IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE); break; } @@ -1025,87 +1009,83 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM char *pszText = NULL; TCHAR *ptszPath = NULL; - if (PluginConfig.m_chat_enabled) { - int iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY)); - if (iLen > 0) { - TCHAR *pszText1 = (TCHAR*)mir_alloc(iLen*sizeof(TCHAR) + 2); - GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText1, iLen + 1); - db_set_ts(NULL, "Chat", "LogDirectory", pszText1); - mir_free(pszText1); - g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED; - db_set_b(0, "Chat", "LoggingEnabled", g_Settings.bLoggingEnabled); - } - else { - db_unset(NULL, "Chat", "LogDirectory"); - db_set_b(0, "Chat", "LoggingEnabled", 0); - } - SM_InvalidateLogDirectories(); - - iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN4, UDM_GETPOS, 0, 0); - db_set_w(NULL, "Chat", "LoggingLimit", (WORD)iLen); - - iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0); - if (iLen > 0) - db_set_b(0, "Chat", "NicklistRowDist", (BYTE)iLen); - else - db_unset(NULL, "Chat", "NicklistRowDist"); - - iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGTIMESTAMP)); - if (iLen > 0) { - pszText = (char *)mir_realloc(pszText, iLen + 1); - GetDlgItemTextA(hwndDlg, IDC_LOGTIMESTAMP, pszText, iLen + 1); - db_set_s(NULL, "Chat", "LogTimestamp", pszText); - } else db_unset(NULL, "Chat", "LogTimestamp"); - - iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_TIMESTAMP)); - if (iLen > 0) { - pszText = (char *)mir_realloc(pszText, iLen + 1); - GetDlgItemTextA(hwndDlg, IDC_TIMESTAMP, pszText, iLen + 1); - db_set_s(NULL, "Chat", "HeaderTime", pszText); - } else db_unset(NULL, "Chat", "HeaderTime"); - - iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_INSTAMP)); - if (iLen > 0) { - pszText = (char *)mir_realloc(pszText, iLen + 1); - GetDlgItemTextA(hwndDlg, IDC_INSTAMP, pszText, iLen + 1); - db_set_s(NULL, "Chat", "HeaderIncoming", pszText); - } else db_unset(NULL, "Chat", "HeaderIncoming"); - - iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_OUTSTAMP)); - if (iLen > 0) { - pszText = (char *)mir_realloc(pszText, iLen + 1); - GetDlgItemTextA(hwndDlg, IDC_OUTSTAMP, pszText, iLen + 1); - db_set_s(NULL, "Chat", "HeaderOutgoing", pszText); - } else db_unset(NULL, "Chat", "HeaderOutgoing"); - - iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0); - db_set_w(NULL, "Chat", "LogLimit", (WORD)iLen); + int iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY)); + if (iLen > 0) { + TCHAR *pszText1 = (TCHAR*)mir_alloc(iLen*sizeof(TCHAR) + 2); + GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText1, iLen + 1); + db_set_ts(NULL, "Chat", "LogDirectory", pszText1); + mir_free(pszText1); + g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED; + db_set_b(0, "Chat", "LoggingEnabled", g_Settings.bLoggingEnabled); + } + else { + db_unset(NULL, "Chat", "LogDirectory"); + db_set_b(0, "Chat", "LoggingEnabled", 0); } + SM_InvalidateLogDirectories(); + + iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN4, UDM_GETPOS, 0, 0); + db_set_w(NULL, "Chat", "LoggingLimit", (WORD)iLen); + + iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0); + if (iLen > 0) + db_set_b(0, "Chat", "NicklistRowDist", (BYTE)iLen); + else + db_unset(NULL, "Chat", "NicklistRowDist"); + + iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGTIMESTAMP)); + if (iLen > 0) { + pszText = (char *)mir_realloc(pszText, iLen + 1); + GetDlgItemTextA(hwndDlg, IDC_LOGTIMESTAMP, pszText, iLen + 1); + db_set_s(NULL, "Chat", "LogTimestamp", pszText); + } else db_unset(NULL, "Chat", "LogTimestamp"); + + iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_TIMESTAMP)); + if (iLen > 0) { + pszText = (char *)mir_realloc(pszText, iLen + 1); + GetDlgItemTextA(hwndDlg, IDC_TIMESTAMP, pszText, iLen + 1); + db_set_s(NULL, "Chat", "HeaderTime", pszText); + } else db_unset(NULL, "Chat", "HeaderTime"); + + iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_INSTAMP)); + if (iLen > 0) { + pszText = (char *)mir_realloc(pszText, iLen + 1); + GetDlgItemTextA(hwndDlg, IDC_INSTAMP, pszText, iLen + 1); + db_set_s(NULL, "Chat", "HeaderIncoming", pszText); + } else db_unset(NULL, "Chat", "HeaderIncoming"); + + iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_OUTSTAMP)); + if (iLen > 0) { + pszText = (char *)mir_realloc(pszText, iLen + 1); + GetDlgItemTextA(hwndDlg, IDC_OUTSTAMP, pszText, iLen + 1); + db_set_s(NULL, "Chat", "HeaderOutgoing", pszText); + } else db_unset(NULL, "Chat", "HeaderOutgoing"); + + iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0); + db_set_w(NULL, "Chat", "LogLimit", (WORD)iLen); mir_free(pszText); if (hListBkgBrush) DeleteObject(hListBkgBrush); hListBkgBrush = CreateSolidBrush(M.GetDword("Chat", "ColorNicklistBG", SRMSGDEFSET_BKGCOLOUR)); - if (PluginConfig.m_chat_enabled) { - LoadLogFonts(); - FreeMsgLogBitmaps(); - LoadMsgLogBitmaps(); + LoadLogFonts(); + FreeMsgLogBitmaps(); + LoadMsgLogBitmaps(); - LOGFONT lf; - LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE); - HFONT hFont = CreateFontIndirect(&lf); - int iText = GetTextPixelSize(MakeTimeStamp(g_Settings.pszTimeStamp, time(NULL)), hFont, true); - DeleteObject(hFont); - g_Settings.LogTextIndent = iText; - g_Settings.LogTextIndent = g_Settings.LogTextIndent * 12 / 10; - g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true); + LOGFONT lf; + LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE); + HFONT hFont = CreateFontIndirect(&lf); + int iText = GetTextPixelSize(MakeTimeStamp(g_Settings.pszTimeStamp, time(NULL)), hFont, true); + DeleteObject(hFont); + g_Settings.LogTextIndent = iText; + g_Settings.LogTextIndent = g_Settings.LogTextIndent * 12 / 10; + g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true); - LoadGlobalSettings(); - MM_FontsChanged(); - MM_FixColors(); - SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE); - } + LoadGlobalSettings(); + MM_FontsChanged(); + MM_FixColors(); + SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE); PluginConfig.reloadSettings(); CacheMsgLogIcons(); @@ -1163,7 +1143,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - if (PluginConfig.m_chat_enabled) { + { DWORD dwFilterFlags = M.GetDword("Chat", "FilterFlags", GC_EVENT_ALL); DWORD dwTrayFlags = M.GetDword("Chat", "TrayIconFlags", GC_EVENT_ALL); DWORD dwPopupFlags = M.GetDword("Chat", "PopupFlags", GC_EVENT_ALL); diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 60ca0f1ea4..73b9fcc1bd 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -1,7 +1,4 @@ /* - * astyle --force-indent=tab=4 --brackets=linux --indent-switches - * --pad=oper --one-line=keep-blocks --unpad=paren - * * Miranda NG: the free IM client for Microsoft* Windows* * * Copyright 2000-2009 Miranda ICQ/IM project, @@ -44,9 +41,6 @@ HGENMENU hJoinMenuItem, hLeaveMenuItem; int Chat_ModulesLoaded(WPARAM wParam, LPARAM lParam) { - if (!PluginConfig.m_chat_enabled) - return 0; - char * mods[3] = {"Chat", CHAT_FONTMODULE}; CallService("DBEditorpp/RegisterModule", (WPARAM)mods, (LPARAM)2); @@ -808,16 +802,6 @@ void UnhookEvents(void) int CreateServiceFunctions(void) { - PluginConfig.m_chat_enabled = false; - - if (ServiceExists(MS_GC_REGISTER)) { - LRESULT result = CWarning::show(CWarning::WARN_CHAT_ENABLED, CWarning::CWF_NOALLOWHIDE | MB_YESNOCANCEL | MB_ICONQUESTION); - if (result == IDYES) - db_set_b(0, "PluginDisable", "chat.dll", 1); - return 0; - } - PluginConfig.m_chat_enabled = true; - CreateServiceFunction(MS_GC_REGISTER, Service_Register); CreateServiceFunction(MS_GC_NEWSESSION, Service_NewChat); CreateServiceFunction(MS_GC_EVENT, Service_AddEvent); diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 0ff7df9324..58493834fb 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -549,8 +549,7 @@ int CGlobals::MetaContactEvent(WPARAM wParam, LPARAM lParam) int CGlobals::PreshutdownSendRecv(WPARAM wParam, LPARAM lParam) { - if (PluginConfig.m_chat_enabled) - ::Chat_PreShutdown(); + ::Chat_PreShutdown(); ::TN_ModuleDeInit(); diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 4343c5d1c4..1b5e592a66 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -1,7 +1,4 @@ /* - * astyle --force-indent=tab=4 --brackets=linux --indent-switches - * --pad=oper --one-line=keep-blocks --unpad=paren - * * Miranda NG: the free IM client for Microsoft* Windows* * * Copyright 2000-2009 Miranda ICQ/IM project, @@ -146,7 +143,6 @@ public: char szMetaName[256]; BYTE bMetaEnabled; HANDLE m_hMessageWindowList, hUserPrefsWindowList; - bool m_chat_enabled; HMENU m_MenuBar; COLORREF m_ipBackgroundGradient; COLORREF m_ipBackgroundGradientHigh; diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 1e1981aebb..f641f149c3 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -60,8 +60,7 @@ int IEViewOptionsChanged(WPARAM,LPARAM) int SmileyAddOptionsChanged(WPARAM,LPARAM) { M.BroadcastMessage(DM_SMILEYOPTIONSCHANGED, 0, 0); - if (PluginConfig.m_chat_enabled) - SM_BroadcastMessage(NULL, DM_SMILEYOPTIONSCHANGED, 0, 0, FALSE); + SM_BroadcastMessage(NULL, DM_SMILEYOPTIONSCHANGED, 0, 0, FALSE); return 0; } @@ -503,8 +502,7 @@ int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam) { LoadFromIconLib(); CacheMsgLogIcons(); - if (PluginConfig.m_chat_enabled) - Chat_IconsChanged(wParam, lParam); + Chat_IconsChanged(wParam, lParam); return 0; } @@ -514,8 +512,7 @@ int IconsChanged(WPARAM wParam, LPARAM lParam) CacheMsgLogIcons(); M.BroadcastMessage(DM_OPTIONSAPPLIED, 0, 0); M.BroadcastMessage(DM_UPDATEWINICON, 0, 0); - if (PluginConfig.m_chat_enabled) - Chat_IconsChanged(wParam, lParam); + Chat_IconsChanged(wParam, lParam); return 0; } @@ -1034,8 +1031,7 @@ static int TSAPI SetupIconLibConfig() } GetModuleFileName(g_hIconDLL, szFilename, MAX_PATH); - if (PluginConfig.m_chat_enabled) - Chat_AddIcons(); + Chat_AddIcons(); version = GetIconPackVersion(g_hIconDLL); FreeLibrary(g_hIconDLL); g_hIconDLL = 0; diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp index f347b4e1b3..baeece0864 100644 --- a/plugins/TabSRMM/src/themeio.cpp +++ b/plugins/TabSRMM/src/themeio.cpp @@ -1,7 +1,4 @@ /* - * astyle --force-indent=tab=4 --brackets=linux --indent-switches - * --pad=oper --one-line=keep-blocks --unpad=paren - * * Miranda NG: the free IM client for Microsoft* Windows* * * Copyright 2000-2009 Miranda ICQ/IM project, @@ -422,8 +419,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in } } } - if (PluginConfig.m_chat_enabled) - LoadGlobalSettings(); + LoadGlobalSettings(); mir_free(szIniFilename); } diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 71f0a0d158..8ca53bd9bf 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -1176,7 +1176,6 @@ static wchar_t* warnings[] = { LPGENT("Edit user notes|You are editing the user notes. Click the button again or use the hotkey (default: Alt-N) to save the notes and return to normal messaging mode"), /* WARN_EDITUSERNOTES */ LPGENT("Missing component|The icon pack is missing. Please install it to the default icons folder.\n\nNo icons will be available"), /* WARN_ICONPACKMISSING */ LPGENT("Aero peek warning|You have enabled Aero Peek features and loaded a custom container window skin\n\nThis can result in minor visual anomalies in the live preview feature."), /* WARN_AEROPEEKSKIN */ - LPGENT("TabSRMM group chat module|TabSRMM could not enable its group chat module. The most likely cause is that you have installed and enabled \\b1chat.dll\\b0 or another plugin that provides groupchat services.\n\nShould I try to fix this now \\b1(a restart of Miranda is required to apply these changes)?\\b0"), /* WARN_CHAT_ENABLED */ LPGENT("Filetransfer problem|Sending the image by file transfer failed.\n\nPossible reasons: File transfers not supported, either you or the target contact is offline, or you are invisible and the target contact is not on your visibilty list."), /* WARN_IMGSVC_MISSING */ LPGENT("Settings problem|The option \\b1 History->Imitate IEView API\\b0 is enabled and the History++ plugin is active. This can cause problems when using IEView as message log viewer.\n\nShould I correct the option (a restart is required)?"), /* WARN_HPP_APICHECK */ L" ", /* WARN_NO_SENDLATER */ /*uses "Configuration issue|The unattended send feature is disabled. The \\b1 send later\\b0 and \\b1 send to multiple contacts\\b0 features depend on it.\n\nYou must enable it under \\b1Options->Message Sessions->Advanced tweaks\\b0. Changing this option requires a restart." */ diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index eca81a3ccd..3df71f94ea 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -1,7 +1,4 @@ /* - * astyle --force-indent=tab=4 --brackets=linux --indent-switches - * --pad=oper --one-line=keep-blocks --unpad=paren - * * Miranda NG: the free IM client for Microsoft* Windows* * * Copyright 2000-2009 Miranda ICQ/IM project, @@ -215,14 +212,13 @@ public: WARN_EDITUSERNOTES = 2, WARN_ICONPACKMISSING = 3, WARN_AEROPEEK_SKIN = 4, - WARN_CHAT_ENABLED = 5, - WARN_SENDFILE = 6, - WARN_HPP_APICHECK = 7, - WARN_NO_SENDLATER = 8, - WARN_CLOSEWINDOW = 9, - WARN_OPTION_CLOSE = 10, - WARN_THEME_OVERWRITE = 11, - WARN_LAST = 12 + WARN_SENDFILE = 5, + WARN_HPP_APICHECK = 6, + WARN_NO_SENDLATER = 7, + WARN_CLOSEWINDOW = 8, + WARN_OPTION_CLOSE = 9, + WARN_THEME_OVERWRITE = 10, + WARN_LAST = 11 }; /* -- cgit v1.2.3