diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-10-12 14:53:57 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-10-12 14:53:57 +0000 |
commit | 3b55a62fdcb1f8222de3c2c8fbed530792c419a0 (patch) | |
tree | 5b2f628e847f61bb3e16f95ecaed6e187963362f /protocols/IcqOscarJ/UI | |
parent | 1f9c986d82657f965462d289bf94aa012cf026fc (diff) |
GTalkExt, ICQ, IRC, Jabber: folders restructurization
git-svn-id: http://svn.miranda-ng.org/main/trunk@1890 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/UI')
-rw-r--r-- | protocols/IcqOscarJ/UI/askauthentication.cpp | 96 | ||||
-rw-r--r-- | protocols/IcqOscarJ/UI/icqoscar.h | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/UI/loginpassword.cpp | 97 | ||||
-rw-r--r-- | protocols/IcqOscarJ/UI/userinfotab.cpp | 315 |
4 files changed, 0 insertions, 510 deletions
diff --git a/protocols/IcqOscarJ/UI/askauthentication.cpp b/protocols/IcqOscarJ/UI/askauthentication.cpp deleted file mode 100644 index 818d5ce6de..0000000000 --- a/protocols/IcqOscarJ/UI/askauthentication.cpp +++ /dev/null @@ -1,96 +0,0 @@ -// ---------------------------------------------------------------------------80
-// ICQ plugin for Miranda Instant Messenger
-// ________________________________________
-//
-// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
-// Copyright © 2001-2002 Jon Keating, Richard Hughes
-// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
-// Copyright © 2004-2008 Joe Kucera
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-// -----------------------------------------------------------------------------
-// DESCRIPTION:
-//
-// Describe me here please...
-//
-// -----------------------------------------------------------------------------
-#include "icqoscar.h"
-
-struct AskAuthParam
-{
- CIcqProto* ppro;
- HANDLE hContact;
-};
-
-static INT_PTR CALLBACK AskAuthProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- AskAuthParam* dat = (AskAuthParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (msg) {
- case WM_INITDIALOG:
- dat = (AskAuthParam*)lParam;
- if (!dat->hContact || !dat->ppro->icqOnline())
- EndDialog(hwndDlg, 0);
-
- TranslateDialogDefault(hwndDlg);
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- SendDlgItemMessage(hwndDlg, IDC_EDITAUTH, EM_LIMITTEXT, (WPARAM)255, 0);
- SetDlgItemText(hwndDlg, IDC_EDITAUTH, TranslateT("Please authorize me to add you to my contact list."));
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDOK:
- if (dat->ppro->icqOnline())
- {
- DWORD dwUin;
- uid_str szUid;
- if ( dat->ppro->getContactUid(dat->hContact, &dwUin, &szUid))
- return TRUE; // Invalid contact
-
- char* szReason = GetDlgItemTextUtf(hwndDlg, IDC_EDITAUTH);
- dat->ppro->icq_sendAuthReqServ(dwUin, szUid, szReason);
- SAFE_FREE((void**)&szReason);
-
- // auth bug fix (thx Bio)
- if (dat->ppro->m_bSsiEnabled && dwUin)
- dat->ppro->resetServContactAuthState(dat->hContact, dwUin);
-
- EndDialog(hwndDlg, 0);
- }
- return TRUE;
-
- case IDCANCEL:
- EndDialog(hwndDlg, 0);
- return TRUE;
- }
-
- break;
-
- case WM_CLOSE:
- EndDialog(hwndDlg,0);
- return TRUE;
- }
-
- return FALSE;
-}
-
-INT_PTR CIcqProto::RequestAuthorization(WPARAM wParam, LPARAM lParam)
-{
- AskAuthParam param = { this, (HANDLE)wParam };
- DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ASKAUTH), NULL, AskAuthProc, (LPARAM)¶m);
- return 0;
-}
diff --git a/protocols/IcqOscarJ/UI/icqoscar.h b/protocols/IcqOscarJ/UI/icqoscar.h deleted file mode 100644 index 77283f6f7f..0000000000 --- a/protocols/IcqOscarJ/UI/icqoscar.h +++ /dev/null @@ -1,2 +0,0 @@ -/* For MinGW sake */
-#include "../icqoscar.h"
diff --git a/protocols/IcqOscarJ/UI/loginpassword.cpp b/protocols/IcqOscarJ/UI/loginpassword.cpp deleted file mode 100644 index ab65212331..0000000000 --- a/protocols/IcqOscarJ/UI/loginpassword.cpp +++ /dev/null @@ -1,97 +0,0 @@ -// ---------------------------------------------------------------------------80
-// ICQ plugin for Miranda Instant Messenger
-// ________________________________________
-//
-// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
-// Copyright © 2001-2002 Jon Keating, Richard Hughes
-// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
-// Copyright © 2004-2009 Joe Kucera
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-// -----------------------------------------------------------------------------
-// DESCRIPTION:
-//
-// Describe me here please...
-//
-// -----------------------------------------------------------------------------
-#include "icqoscar.h"
-
-
-INT_PTR CALLBACK LoginPasswdDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- CIcqProto* ppro = (CIcqProto*)GetWindowLongPtr( hwndDlg, GWLP_USERDATA );
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- ppro = (CIcqProto*)lParam;
- SetWindowLongPtr( hwndDlg, GWLP_USERDATA, lParam );
- {
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->m_hIconProtocol->GetIcon(true));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->m_hIconProtocol->GetIcon());
-
- DWORD dwUin = ppro->getContactUin(NULL);
-
- char pszUIN[MAX_PATH], str[MAX_PATH];
- null_snprintf(pszUIN, 128, ICQTranslateUtfStatic(LPGEN("Enter a password for UIN %u:"), str, MAX_PATH), dwUin);
- SetDlgItemTextUtf(hwndDlg, IDC_INSTRUCTION, pszUIN);
-
- SendDlgItemMessage(hwndDlg, IDC_LOGINPW, EM_LIMITTEXT, PASSWORDMAXLEN - 1, 0);
-
- CheckDlgButton(hwndDlg, IDC_SAVEPASS, ppro->getSettingByte(NULL, "RememberPass", 0));
- }
- break;
-
- case WM_DESTROY:
- ppro->m_hIconProtocol->ReleaseIcon(true);
- ppro->m_hIconProtocol->ReleaseIcon();
- break;
-
- case WM_CLOSE:
- EndDialog(hwndDlg, 0);
- break;
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDOK:
- ppro->m_bRememberPwd = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVEPASS);
- ppro->setSettingByte(NULL, "RememberPass", ppro->m_bRememberPwd);
-
- GetDlgItemTextA(hwndDlg, IDC_LOGINPW, ppro->m_szPassword, sizeof(ppro->m_szPassword));
-
- ppro->icq_login(ppro->m_szPassword);
-
- EndDialog(hwndDlg, IDOK);
- break;
-
- case IDCANCEL:
- ppro->SetCurrentStatus(ID_STATUS_OFFLINE);
- EndDialog(hwndDlg, IDCANCEL);
- break;
- }
- }
- break;
- }
-
- return FALSE;
-}
-
-void CIcqProto::RequestPassword()
-{
- DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_LOGINPW), NULL, LoginPasswdDlgProc, LPARAM(this));
-}
diff --git a/protocols/IcqOscarJ/UI/userinfotab.cpp b/protocols/IcqOscarJ/UI/userinfotab.cpp deleted file mode 100644 index 91d28c0e04..0000000000 --- a/protocols/IcqOscarJ/UI/userinfotab.cpp +++ /dev/null @@ -1,315 +0,0 @@ -// ---------------------------------------------------------------------------80
-// ICQ plugin for Miranda Instant Messenger
-// ________________________________________
-//
-// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
-// Copyright © 2001-2002 Jon Keating, Richard Hughes
-// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
-// Copyright © 2004-2010 Joe Kucera
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// -----------------------------------------------------------------------------
-// DESCRIPTION:
-//
-// Code for User details ICQ specific pages
-//
-// -----------------------------------------------------------------------------
-#include "icqoscar.h"
-
-#define SVS_NORMAL 0
-#define SVS_ZEROISUNSPEC 2
-#define SVS_IP 3
-#define SVS_SIGNED 6
-#define SVS_ICQVERSION 8
-#define SVS_TIMESTAMP 9
-#define SVS_STATUSID 10
-
-char* MirandaVersionToString(char* szStr, int bUnicode, int v, int m);
-
-extern const char *nameXStatus[];
-
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, HANDLE hContact, char* szModule, char* szSetting, int special)
-{
- DBVARIANT dbv = {0};
- char str[MAX_PATH];
- char* pstr = NULL;
- int unspecified = 0;
- int bUtf = 0, bDbv = 0, bAlloc = 0;
-
- dbv.type = DBVT_DELETED;
-
- if ((hContact == NULL) && ((int)szModule<0x100))
- {
- dbv.type = (BYTE)szModule;
-
- switch((int)szModule) {
- case DBVT_BYTE:
- dbv.cVal = (BYTE)szSetting;
- break;
- case DBVT_WORD:
- dbv.wVal = (WORD)szSetting;
- break;
- case DBVT_DWORD:
- dbv.dVal = (DWORD)szSetting;
- break;
- case DBVT_ASCIIZ:
- dbv.pszVal = pstr = szSetting;
- break;
- default:
- unspecified = 1;
- dbv.type = DBVT_DELETED;
- }
- }
- else
- {
- if (szModule == NULL)
- unspecified = 1;
- else
- {
- unspecified = DBGetContactSetting(hContact, szModule, szSetting, &dbv);
- bDbv = 1;
- }
- }
-
- if (!unspecified)
- {
- switch (dbv.type) {
- case DBVT_BYTE:
- unspecified = (special == SVS_ZEROISUNSPEC && dbv.bVal == 0);
- pstr = _itoa(special == SVS_SIGNED ? dbv.cVal:dbv.bVal, str, 10);
- break;
-
- case DBVT_WORD:
- if (special == SVS_ICQVERSION)
- {
- if (dbv.wVal != 0)
- {
- char szExtra[80];
-
- null_snprintf(str, 250, "%d", dbv.wVal);
- pstr = str;
-
- if (hContact && ppro->IsDirectConnectionOpen(hContact, DIRECTCONN_STANDARD, 1))
- {
- ICQTranslateUtfStatic(LPGEN(" (DC Established)"), szExtra, 80);
- strcat(str, (char*)szExtra);
- bUtf = 1;
- }
- }
- else
- unspecified = 1;
- }
- else if (special == SVS_STATUSID)
- {
- char *pXName;
- char *pszStatus = MirandaStatusToStringUtf(dbv.wVal);
- BYTE bXStatus = ppro->getContactXStatus(hContact);
-
- if (bXStatus)
- {
- pXName = ppro->getSettingStringUtf(hContact, DBSETTING_XSTATUS_NAME, NULL);
- if (!strlennull(pXName))
- { // give default name
- pXName = ICQTranslateUtf(nameXStatus[bXStatus-1]);
- }
- null_snprintf(str, sizeof(str), "%s (%s)", pszStatus, pXName);
- SAFE_FREE((void**)&pXName);
- }
- else
- null_snprintf(str, sizeof(str), pszStatus);
-
- bUtf = 1;
- SAFE_FREE(&pszStatus);
- pstr = str;
- unspecified = 0;
- }
- else
- {
- unspecified = (special == SVS_ZEROISUNSPEC && dbv.wVal == 0);
- pstr = _itoa(special == SVS_SIGNED ? dbv.sVal:dbv.wVal, str, 10);
- }
- break;
-
- case DBVT_DWORD:
- unspecified = (special == SVS_ZEROISUNSPEC && dbv.dVal == 0);
- if (special == SVS_IP)
- {
- struct in_addr ia;
- ia.S_un.S_addr = htonl(dbv.dVal);
- pstr = inet_ntoa(ia);
- if (dbv.dVal == 0)
- unspecified=1;
- }
- else if (special == SVS_TIMESTAMP)
- {
- if (dbv.dVal == 0)
- unspecified = 1;
- else
- pstr = time2text(dbv.dVal);
- }
- else
- pstr = _itoa(special == SVS_SIGNED ? dbv.lVal:dbv.dVal, str, 10);
- break;
-
- case DBVT_ASCIIZ:
- case DBVT_WCHAR:
- unspecified = (special == SVS_ZEROISUNSPEC && dbv.pszVal[0] == '\0');
- if (!unspecified && pstr != szSetting)
- {
- pstr = ppro->getSettingStringUtf(hContact, szModule, szSetting, NULL);
- bUtf = 1;
- bAlloc = 1;
- }
- if (idCtrl == IDC_UIN)
- SetDlgItemTextUtf(hwndDlg, IDC_UINSTATIC, ICQTranslateUtfStatic(LPGEN("ScreenName:"), str, MAX_PATH));
- break;
-
- default:
- pstr = str;
- strcpy(str,"???");
- break;
- }
- }
-
- EnableDlgItem(hwndDlg, idCtrl, !unspecified);
- if (unspecified)
- SetDlgItemTextUtf(hwndDlg, idCtrl, ICQTranslateUtfStatic(LPGEN("<not specified>"), str, MAX_PATH));
- else if (bUtf)
- SetDlgItemTextUtf(hwndDlg, idCtrl, pstr);
- else
- SetDlgItemTextA(hwndDlg, idCtrl, pstr);
-
- if (bDbv)
- ICQFreeVariant(&dbv);
-
- if (bAlloc)
- SAFE_FREE(&pstr);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-static INT_PTR CALLBACK IcqDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- break;
-
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR)lParam)->code) {
- case PSN_PARAMCHANGED:
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (( PSHNOTIFY* )lParam )->lParam );
- break;
-
- case PSN_INFOCHANGED:
- {
- CIcqProto* ppro = (CIcqProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- if (!ppro)
- break;
-
- char* szProto;
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
-
- if (hContact == NULL)
- szProto = ppro->m_szModuleName;
- else
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
-
- if (!szProto)
- break;
-
- SetValue(ppro, hwndDlg, IDC_UIN, hContact, szProto, UNIQUEIDSETTING, SVS_NORMAL);
- SetValue(ppro, hwndDlg, IDC_ONLINESINCE, hContact, szProto, "LogonTS", SVS_TIMESTAMP);
- SetValue(ppro, hwndDlg, IDC_IDLETIME, hContact, szProto, "IdleTS", SVS_TIMESTAMP);
- SetValue(ppro, hwndDlg, IDC_IP, hContact, szProto, "IP", SVS_IP);
- SetValue(ppro, hwndDlg, IDC_REALIP, hContact, szProto, "RealIP", SVS_IP);
-
- if (hContact)
- {
- SetValue(ppro, hwndDlg, IDC_PORT, hContact, szProto, "UserPort", SVS_ZEROISUNSPEC);
- SetValue(ppro, hwndDlg, IDC_VERSION, hContact, szProto, "Version", SVS_ICQVERSION);
- SetValue(ppro, hwndDlg, IDC_MIRVER, hContact, szProto, "MirVer", SVS_ZEROISUNSPEC);
- if (ppro->getSettingByte(hContact, "ClientID", 0))
- ppro->setSettingDword(hContact, "TickTS", 0);
- SetValue(ppro, hwndDlg, IDC_SYSTEMUPTIME, hContact, szProto, "TickTS", SVS_TIMESTAMP);
- SetValue(ppro, hwndDlg, IDC_STATUS, hContact, szProto, "Status", SVS_STATUSID);
- }
- else
- {
- char str[MAX_PATH];
-
- SetValue(ppro, hwndDlg, IDC_PORT, hContact, (char*)DBVT_WORD, (char*)ppro->wListenPort, SVS_ZEROISUNSPEC);
- SetValue(ppro, hwndDlg, IDC_VERSION, hContact, (char*)DBVT_WORD, (char*)ICQ_VERSION, SVS_ICQVERSION);
- SetValue(ppro, hwndDlg, IDC_MIRVER, hContact, (char*)DBVT_ASCIIZ, MirandaVersionToString(str, TRUE, ICQ_PLUG_VERSION, CallService(MS_SYSTEM_GETVERSION,0,0)), SVS_ZEROISUNSPEC);
- SetDlgItemTextUtf(hwndDlg, IDC_SUPTIME, ICQTranslateUtfStatic(LPGEN("Member since:"), str, MAX_PATH));
- SetValue(ppro, hwndDlg, IDC_SYSTEMUPTIME, hContact, szProto, "MemberTS", SVS_TIMESTAMP);
- SetValue(ppro, hwndDlg, IDC_STATUS, hContact, (char*)DBVT_WORD, (char*)ppro->m_iStatus, SVS_STATUSID);
- }
- }
- break;
- }
- break;
- }
- break;
-
- case WM_COMMAND:
- switch(LOWORD(wParam)) {
- case IDCANCEL:
- SendMessage(GetParent(hwndDlg),msg,wParam,lParam);
- break;
- }
- break;
- }
-
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
-{
- if ((!IsICQContact((HANDLE)lParam)) && lParam)
- return 0;
-
- OPTIONSDIALOGPAGE odp = {0};
- odp.cbSize = sizeof(odp);
- odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
- odp.hInstance = hInst;
- odp.dwInitParam = LPARAM(this);
- odp.pfnDlgProc = IcqDlgProc;
- odp.position = -1900000000;
- odp.ptszTitle = m_tszUserName;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_ICQ);
- UserInfo_AddPage(wParam, &odp);
-
- if (!lParam)
- {
- TCHAR buf[200];
- null_snprintf(buf, SIZEOF(buf), TranslateT("%s Details"), m_tszUserName);
- odp.ptszTitle = buf;
-
- odp.position = -1899999999;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_CHANGEINFO);
- odp.pfnDlgProc = ChangeInfoDlgProc;
- UserInfo_AddPage(wParam, &odp);
- }
- return 0;
-}
|