From 83810fbdf96dc0a842bf149cfa40749e95b0fe63 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 23 May 2015 16:02:12 +0000 Subject: ICQ: - version resource extracted to the separate file; - all unicode support options removed due to the obsoleteness - version bump. git-svn-id: http://svn.miranda-ng.org/main/trunk@13776 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/res/resources.rc | 78 +++++++------------------------ protocols/IcqOscarJ/res/version.rc | 38 +++++++++++++++ protocols/IcqOscarJ/src/fam_01service.cpp | 6 +-- protocols/IcqOscarJ/src/icq_constants.h | 1 - protocols/IcqOscarJ/src/icq_opts.cpp | 25 ++-------- protocols/IcqOscarJ/src/icq_proto.cpp | 5 +- protocols/IcqOscarJ/src/icq_proto.h | 1 - protocols/IcqOscarJ/src/init.cpp | 1 - protocols/IcqOscarJ/src/resource.h | 6 +-- protocols/IcqOscarJ/src/version.h | 3 +- 10 files changed, 67 insertions(+), 97 deletions(-) create mode 100644 protocols/IcqOscarJ/res/version.rc (limited to 'protocols/IcqOscarJ') diff --git a/protocols/IcqOscarJ/res/resources.rc b/protocols/IcqOscarJ/res/resources.rc index 7b90fc901c..c6c45bd49f 100644 --- a/protocols/IcqOscarJ/res/resources.rc +++ b/protocols/IcqOscarJ/res/resources.rc @@ -8,7 +8,6 @@ // Generated from the TEXTINCLUDE 2 resource. // #include "winres.h" -#include "..\src\version.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -53,7 +52,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "&Send",IDOK,34,74,50,14 PUSHBUTTON "&Cancel",IDCANCEL,98,74,50,14 - EDITTEXT IDC_EDITAUTH,7,7,172,59,ES_AUTOVSCROLL | ES_WANTRETURN | ES_MULTILINE + EDITTEXT IDC_EDITAUTH,7,7,172,59,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN END IDD_LOGINPW DIALOGEX 0, 0, 157, 87 @@ -127,37 +126,34 @@ BEGIN CTEXT "Note: The options marked with an asterisk have important side-effects or caveats that may not be initially apparent documented in the help.",IDC_STATIC,10,212,290,16 END -IDD_OPT_ICQFEATURES DIALOGEX 0, 0, 310, 234 +IDD_OPT_ICQFEATURES DIALOGEX 0, 0, 310, 200 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Messaging",IDC_STATIC,4,0,302,94 - CONTROL "Enable unicode messaging support",IDC_UTFENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,12,288,10 - CONTROL "Send all messages in unicode if possible",IDC_UTFALL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,24,288,10 - RTEXT "Use this codepage for Ansi <-> Unicode translation:",IDC_UTFSTATIC,12,38,174,10 - COMBOBOX IDC_UTFCODEPAGE,190,36,107,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Messaging",IDC_STATIC,4,0,302,56 + RTEXT "Use this codepage for Ansi <-> Unicode translation:",IDC_UTFSTATIC,12,14,174,10 + COMBOBOX IDC_UTFCODEPAGE,190,12,107,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Make me temporarily visible to contacts I send message to",IDC_TEMPVISIBLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,53,288,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,29,288,10 CONTROL "Notify me when a message delivery has failed",IDC_SLOWSEND, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,65,288,10 - GROUPBOX "Peer-to-peer Messaging",IDC_STATIC,4,95,302,41 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,41,288,10 + GROUPBOX "Peer-to-peer Messaging",IDC_STATIC,4,59,302,41 CONTROL "Enable peer-to-peer message connections",IDC_DCENABLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,107,288,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,288,10 CONTROL "Passive mode (i.e., do not initiate new connections)",IDC_DCPASSIVE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,119,288,10 - GROUPBOX "Extra Features",IDC_STATIC,4,137,302,93 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,288,10 + GROUPBOX "Extra Features",IDC_STATIC,4,103,302,93 CONTROL "Enable Custom status support for xtraz",IDC_XSTATUSENABLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,149,288,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,115,288,10 CONTROL "Enable Custom status support for moods",IDC_MOODSENABLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,161,288,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,127,288,10 CONTROL "Reset Custom status on status change",IDC_XSTATUSRESET, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,175,288,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,140,288,10 CONTROL "Auto-retrieve Custom status details",IDC_XSTATUSAUTO, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,187,288,10 - CONTROL "Block known Spam Bots",IDC_KILLSPAMBOTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,201,288,10 - CONTROL "Enable AIM contacts support",IDC_AIMENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,12,215,288,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,153,288,10 + CONTROL "Block known Spam Bots",IDC_KILLSPAMBOTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,166,288,10 + CONTROL "Enable AIM contacts support",IDC_AIMENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,12,180,288,10 END IDD_OPT_ICQPRIVACY DIALOGEX 0, 0, 310, 234 @@ -523,7 +519,6 @@ END 2 TEXTINCLUDE BEGIN "#include ""winres.h""\0" - "#include ""..\\src\\version.h""\0" END 3 TEXTINCLUDE @@ -534,45 +529,6 @@ END #endif // APSTUDIO_INVOKED - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __FILEVERSION_STRING - PRODUCTVERSION __FILEVERSION_STRING - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004e4" - BEGIN - VALUE "Comments", "Licensed under the terms of the GNU General Public License" - VALUE "FileDescription", "ICQ protocol plugin for Miranda NG, enhanced" - VALUE "FileVersion", __VERSION_STRING - VALUE "InternalName", "ICQJ protocol plugin for Miranda NG" - VALUE "LegalCopyright", "Copyright (C) 2000-2010 Joe Kucera, Angeli-Ka, Bio, Martin Öberg, Richard Hughes, Jon Keating" - VALUE "OriginalFilename", "ICQ.dll" - VALUE "ProductName", "ICQ Protocol Support" - VALUE "ProductVersion", __VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1252 - END -END - #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/protocols/IcqOscarJ/res/version.rc b/protocols/IcqOscarJ/res/version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/protocols/IcqOscarJ/res/version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "..\src\version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/protocols/IcqOscarJ/src/fam_01service.cpp b/protocols/IcqOscarJ/src/fam_01service.cpp index f425543897..948cf1d92d 100644 --- a/protocols/IcqOscarJ/src/fam_01service.cpp +++ b/protocols/IcqOscarJ/src/fam_01service.cpp @@ -584,8 +584,7 @@ void CIcqProto::setUserInfo() #ifdef DBG_CAPMTN wAdditionalData += 16; #endif - if (m_bUtfEnabled) - wAdditionalData += 16; + wAdditionalData += 16; // unicode #ifdef DBG_NEWCAPS wAdditionalData += 16; #endif @@ -634,8 +633,7 @@ void CIcqProto::setUserInfo() packShortCapability(&packet, 0x1349); // AIM_CAPS_ICQSERVERRELAY // Broadcasts the capability to receive UTF8 encoded messages - if (m_bUtfEnabled) - packShortCapability(&packet, 0x134E); // CAP_UTF8MSGS + packShortCapability(&packet, 0x134E); // CAP_UTF8MSGS #ifdef DBG_NEWCAPS // Tells server we understand to new format of caps diff --git a/protocols/IcqOscarJ/src/icq_constants.h b/protocols/IcqOscarJ/src/icq_constants.h index 1935cded25..d97e8a4bb5 100644 --- a/protocols/IcqOscarJ/src/icq_constants.h +++ b/protocols/IcqOscarJ/src/icq_constants.h @@ -64,7 +64,6 @@ #define DEFAULT_LEGACY_FIX 0 #define DEFAULT_KEEPALIVE_ENABLED 1 #define DEFAULT_AIM_ENABLED 1 -#define DEFAULT_UTF_ENABLED 2 // everything unicode is default #define DEFAULT_ANSI_CODEPAGE CP_ACP #define DEFAULT_DCMSG_ENABLED 1 // passive dc messaging is default #define DEFAULT_TEMPVIS_ENABLED 1 // temporary visible is enabled by default diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp index d579fcf081..14d9e7b629 100644 --- a/protocols/IcqOscarJ/src/icq_opts.cpp +++ b/protocols/IcqOscarJ/src/icq_opts.cpp @@ -331,7 +331,6 @@ static BOOL CALLBACK FillCpCombo(LPSTR str) ///////////////////////////////////////////////////////////////////////////////////////// -static const UINT icqUnicodeControls[] = { IDC_UTFALL, IDC_UTFSTATIC, IDC_UTFCODEPAGE }; static const UINT icqDCMsgControls[] = { IDC_DCPASSIVE }; static const UINT icqXStatusControls[] = { IDC_XSTATUSAUTO }; static const UINT icqCustomStatusControls[] = { IDC_XSTATUSRESET }; @@ -348,13 +347,9 @@ static INT_PTR CALLBACK DlgProcIcqFeaturesOpts(HWND hwndDlg, UINT msg, WPARAM wP ppro = (CIcqProto*)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); { - BYTE byData = ppro->getByte("UtfEnabled", DEFAULT_UTF_ENABLED); - CheckDlgButton(hwndDlg, IDC_UTFENABLE, byData ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_UTFALL, byData == 2 ? BST_CHECKED : BST_UNCHECKED); - icq_EnableMultipleControls(hwndDlg, icqUnicodeControls, SIZEOF(icqUnicodeControls), byData ? TRUE : FALSE); LoadDBCheckState(ppro, hwndDlg, IDC_TEMPVISIBLE, "TempVisListEnabled", DEFAULT_TEMPVIS_ENABLED); LoadDBCheckState(ppro, hwndDlg, IDC_SLOWSEND, "SlowSend", DEFAULT_SLOWSEND); - byData = ppro->getByte("DirectMessaging", DEFAULT_DCMSG_ENABLED); + BOOL byData = ppro->getByte("DirectMessaging", DEFAULT_DCMSG_ENABLED); CheckDlgButton(hwndDlg, IDC_DCENABLE, byData ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_DCPASSIVE, byData == 1 ? BST_CHECKED : BST_UNCHECKED); icq_EnableMultipleControls(hwndDlg, icqDCMsgControls, SIZEOF(icqDCMsgControls), byData ? TRUE : FALSE); @@ -389,10 +384,6 @@ static INT_PTR CALLBACK DlgProcIcqFeaturesOpts(HWND hwndDlg, UINT msg, WPARAM wP case WM_COMMAND: switch (LOWORD(wParam)) { - case IDC_UTFENABLE: - icq_EnableMultipleControls(hwndDlg, icqUnicodeControls, SIZEOF(icqUnicodeControls), IsDlgButtonChecked(hwndDlg, IDC_UTFENABLE)); - OptDlgChanged(hwndDlg); - break; case IDC_UTFCODEPAGE: if (HIWORD(wParam) == CBN_SELCHANGE) OptDlgChanged(hwndDlg); @@ -414,16 +405,10 @@ static INT_PTR CALLBACK DlgProcIcqFeaturesOpts(HWND hwndDlg, UINT msg, WPARAM wP case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - if (IsDlgButtonChecked(hwndDlg, IDC_UTFENABLE)) - ppro->m_bUtfEnabled = IsDlgButtonChecked(hwndDlg, IDC_UTFALL) ? 2 : 1; - else - ppro->m_bUtfEnabled = 0; - { - int i = SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_GETCURSEL, 0, 0); - ppro->m_wAnsiCodepage = (WORD)SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_GETITEMDATA, (WPARAM)i, 0); - ppro->setWord("AnsiCodePage", ppro->m_wAnsiCodepage); - } - ppro->setByte("UtfEnabled", ppro->m_bUtfEnabled); + int i = SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_GETCURSEL, 0, 0); + ppro->m_wAnsiCodepage = (WORD)SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_GETITEMDATA, (WPARAM)i, 0); + ppro->setWord("AnsiCodePage", ppro->m_wAnsiCodepage); + ppro->m_bTempVisListEnabled = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TEMPVISIBLE); ppro->setByte("TempVisListEnabled", ppro->m_bTempVisListEnabled); StoreDBCheckState(ppro, hwndDlg, IDC_SLOWSEND, "SlowSend"); diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index a3c44e208a..5c5852e375 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -1270,10 +1270,7 @@ int __cdecl CIcqProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) WORD wRecipientStatus = getContactStatus(hContact); BOOL plain_ascii = IsUSASCII(puszText, mir_strlen(puszText)); - - BOOL oldAnsi = plain_ascii || !m_bUtfEnabled || - !CheckContactCapabilities(hContact, CAPF_UTF) || - !getByte(hContact, "UnicodeSend", 1); + BOOL oldAnsi = plain_ascii || !CheckContactCapabilities(hContact, CAPF_UTF) || !getByte(hContact, "UnicodeSend", 1); if (m_bTempVisListEnabled && m_iStatus == ID_STATUS_INVISIBLE) makeContactTemporaryVisible(hContact); // make us temporarily visible to contact diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h index f0e7be49f6..085d91cac5 100644 --- a/protocols/IcqOscarJ/src/icq_proto.h +++ b/protocols/IcqOscarJ/src/icq_proto.h @@ -147,7 +147,6 @@ struct CIcqProto : public PROTO BYTE m_bSecureConnection; BYTE m_bLegacyFix; BYTE m_bAimEnabled; - BYTE m_bUtfEnabled; WORD m_wAnsiCodepage; BYTE m_bDCMsgEnabled; BYTE m_bTempVisListEnabled; diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index d80eba68a2..735b17bf80 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -170,7 +170,6 @@ void CIcqProto::UpdateGlobalSettings() m_bSecureLogin = getByte("SecureLogin", DEFAULT_SECURE_LOGIN); m_bLegacyFix = getByte("LegacyFix", DEFAULT_LEGACY_FIX); m_bAimEnabled = getByte("AimEnabled", DEFAULT_AIM_ENABLED); - m_bUtfEnabled = getByte("UtfEnabled", DEFAULT_UTF_ENABLED); m_wAnsiCodepage = getWord("AnsiCodePage", DEFAULT_ANSI_CODEPAGE); m_bDCMsgEnabled = getByte("DirectMessaging", DEFAULT_DCMSG_ENABLED); m_bTempVisListEnabled = getByte("TempVisListEnabled", DEFAULT_TEMPVIS_ENABLED); diff --git a/protocols/IcqOscarJ/src/resource.h b/protocols/IcqOscarJ/src/resource.h index e2c589d526..f149baf996 100644 --- a/protocols/IcqOscarJ/src/resource.h +++ b/protocols/IcqOscarJ/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by resources.rc +// Microsoft Visual C++ generated include file. +// Used by D:\miranda-ng\protocols\IcqOscarJ\res\resources.rc // #define IDI_ICQ 101 #define IDS_IDENTIFY 102 @@ -47,12 +47,10 @@ #define IDC_XMSG_STATIC 1007 #define IDC_SSL 1008 #define IDC_MD5LOGIN 1009 -#define IDC_UTFENABLE 1010 #define IDC_XTITLE 1010 #define IDC_LEGACY 1010 #define IDC_KEEPALIVE 1011 #define IDC_XMSG 1011 -#define IDC_UTFALL 1012 #define IDC_UTFSTATIC 1013 #define IDC_UTFCODEPAGE 1014 #define IDC_PW 1015 diff --git a/protocols/IcqOscarJ/src/version.h b/protocols/IcqOscarJ/src/version.h index 45faabfcc8..3b2d5f872e 100644 --- a/protocols/IcqOscarJ/src/version.h +++ b/protocols/IcqOscarJ/src/version.h @@ -1,11 +1,12 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 11 #define __RELEASE_NUM 3 -#define __BUILD_NUM 3 +#define __BUILD_NUM 4 #include #define __PLUGIN_NAME "IcqOscarJ protocol" +#define __FILENAME "ICQ.dll" #define __DESCRIPTION "ICQ protocol support for Miranda NG." #define __AUTHOR "Joe Kucera, Bio, Martin \xd6" "berg, Richard Hughes, Jon Keating, etc." #define __AUTHOREMAIL "jokusoftware@miranda-im.org" -- cgit v1.2.3