summaryrefslogtreecommitdiff
path: root/plugins/SMS
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-03-06 01:16:01 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-03-06 01:16:01 +0000
commit522586d7b8f7274fad2fe58c2615fc0d06618fcd (patch)
tree0a1e22eacb864e035af10f11021816d83163d974 /plugins/SMS
parentd5adcdbd5c1fda81f1be805dadc8021837ed706d (diff)
MRA
* Fix: SMS sending SMS * Fix: windows sizes then aero enabled * Fix: ICQEVENTTYPE_SMSCONFIRMATION db event write NewEventNotify + Add: support event types: ICQEVENTTYPE_SMS and ICQEVENTTYPE_SMSCONFIRMATION git-svn-id: http://svn.miranda-ng.org/main/trunk@8423 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SMS')
-rw-r--r--plugins/SMS/src/SMSConstans.h44
-rw-r--r--plugins/SMS/src/receive.cpp7
-rw-r--r--plugins/SMS/src/recvdlg.cpp2
-rw-r--r--plugins/SMS/src/senddlg.cpp10
4 files changed, 34 insertions, 29 deletions
diff --git a/plugins/SMS/src/SMSConstans.h b/plugins/SMS/src/SMSConstans.h
index 67159180f5..d76888d622 100644
--- a/plugins/SMS/src/SMSConstans.h
+++ b/plugins/SMS/src/SMSConstans.h
@@ -1,21 +1,21 @@
#if !defined(AFX_SMS_CONSTANS_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_)
#define AFX_SMS_CONSTANS_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_
-#define PROTOCOL_NAMEA "SMSPlugin"
-#define PROTOCOL_NAME_LEN (sizeof(PROTOCOL_NAMEA)-1)
-#define PROTOCOL_NAME_SIZE sizeof(PROTOCOL_NAMEA)
-#define PROTOCOL_DISPLAY_NAME_ORIG LPGEN("SMS")
+#define PROTOCOL_NAMEA "SMSPlugin"
+#define PROTOCOL_NAME_LEN (sizeof(PROTOCOL_NAMEA)-1)
+#define PROTOCOL_NAME_SIZE sizeof(PROTOCOL_NAMEA)
+#define PROTOCOL_DISPLAY_NAME_ORIG LPGEN("SMS")
-#define TIMEOUT_MSGSEND 60000 // send sms timeout
-#define MIN_SMS_DBEVENT_LEN 4 // для фильтрации событий авторизации от джабер плагина
-#define MAX_PHONE_LEN MAX_PATH
-#define PHONES_MIN_COUNT 4 //internal // колличество элементов обязательно проверяемых при извлечении email адреса из инфы юзера
+#define TIMEOUT_MSGSEND 60000 // send sms timeout
+#define MIN_SMS_DBEVENT_LEN 4 // для фильтрации событий авторизации от джабер плагина
+#define MAX_PHONE_LEN MAX_PATH
+#define PHONES_MIN_COUNT 4 //internal // колличество элементов обязательно проверяемых при извлечении email адреса из инфы юзера
#define SMS_DEFAULT_
#define SMS_DEFAULT_SIGNATUREPOS FALSE
-#define SMS_DEFAULT_SHOWACK TRUE
+#define SMS_DEFAULT_SHOWACK TRUE
#define SMS_DEFAULT_USESIGNATURE TRUE
-#define SMS_DEFAULT_AUTOPOP FALSE
+#define SMS_DEFAULT_AUTOPOP FALSE
#define SMS_DEFAULT_SAVEWINPOS FALSE
@@ -25,8 +25,8 @@
//Fonts defenitions
-//#define SRMMMOD "SRMM"
-#define SRMMMOD "TabSRMM_Fonts"
+//#define SRMMMOD "SRMM"
+#define SRMMMOD "TabSRMM_Fonts"
#define FONTF_BOLD 1
#define FONTF_ITALIC 2
@@ -39,16 +39,16 @@ struct FontOptionsList
}
static fontOptionsList[] = {
- { RGB(106, 106, 106), _T("Arial"), 0, -12},
+ { RGB(106, 106, 106), _T("Arial"), 0, -12},
};
-#define MSGFONTID_MYMSG 0
-#define MSGFONTID_YOURMSG 2
-#define MSGFONTID_MESSAGEAREA 16
+#define MSGFONTID_MYMSG 0
+#define MSGFONTID_YOURMSG 2
+#define MSGFONTID_MESSAGEAREA 16
-#define SRMSGSET_BKGCOLOUR "BkgColour"
+#define SRMSGSET_BKGCOLOUR "BkgColour"
#define SRMSGSET_INPBKGCOLOUR "inputbg"
#define SRMSGDEFSET_BKGCOLOUR GetSysColor(COLOR_WINDOW)
#define FONTF_BOLD 1
@@ -63,11 +63,11 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam);
-#define SMS_READ "/ReadSms"
-#define SMS_READ_ACK "/ReadSmsAck"
-#define SMS_SEND "/SendSMS"
-#define SMS_SEND_STR LPGENT("Send &SMS...")
-#define SMS_SEND_CM_STR LPGENT("&SMS Message")
+#define SMS_READ "/ReadSms"
+#define SMS_READ_ACK "/ReadSmsAck"
+#define SMS_SEND "/SendSMS"
+#define SMS_SEND_STR LPGENT("Send &SMS...")
+#define SMS_SEND_CM_STR LPGENT("&SMS Message")
// структура содержащая информацию о сервисах/функциях
struct SERVICE_ITEM
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp
index 6ab752776a..8e77708bd0 100644
--- a/plugins/SMS/src/receive.cpp
+++ b/plugins/SMS/src/receive.cpp
@@ -64,8 +64,8 @@ int handleAckSMS(WPARAM wParam,LPARAM lParam)
dbei.szModule=GetModuleName(hContact);
dbei.timestamp=time(NULL);
- dbei.flags=(DBEF_UTF);
- dbei.eventType=ICQEVENTTYPE_SMS;
+ dbei.flags = DBEF_UTF;
+ dbei.eventType = ICQEVENTTYPE_SMS;
dbei.cbBlob=(mir_snprintf((LPSTR)dbei.pBlob,((dwBuffLen+dwPhoneSize)),"SMS From: +%s\r\n%s",szPhone,lpszMessageUTF)+sizeof(DWORD));
//dbei.pBlob=(LPBYTE)lpszBuff;
(*((DWORD*)(dbei.pBlob+(dbei.cbBlob-sizeof(DWORD)))))=0;
@@ -94,7 +94,8 @@ int handleAckSMS(WPARAM wParam,LPARAM lParam)
dbei.cbSize=sizeof(dbei);
dbei.szModule=GetModuleName(hContact);
dbei.timestamp=time(NULL);
- dbei.eventType=ICQEVENTTYPE_SMSCONFIRMATION;
+ dbei.flags = DBEF_UTF;
+ dbei.eventType = ICQEVENTTYPE_SMSCONFIRMATION;
if (CompareStringA(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),NORM_IGNORECASE,lpszData,dwDataSize,"yes",3)==CSTR_EQUAL)
{
dbei.cbBlob=(MAX_PHONE_LEN+MAX_PATH);
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp
index db1cdf4093..2465635c36 100644
--- a/plugins/SMS/src/recvdlg.cpp
+++ b/plugins/SMS/src/recvdlg.cpp
@@ -117,6 +117,8 @@ INT_PTR CALLBACK RecvSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
GetWindowRect(hWndDlg,&rcWin);
cx = rcWin.right - rcWin.left;
cy = rcWin.bottom - rcWin.top;
+ cx -= 10; /* XXX: fix window sizes for aero. */
+ cy -= 10;
SetWindowPos(GetDlgItem(hWndDlg,IDC_MESSAGE),0,0,0,cx - 14,cy - 112,SWP_NOZORDER|SWP_NOMOVE);
SetWindowPos(GetDlgItem(hWndDlg,IDC_NAME),0,0,0,(cx*35)/100,20,SWP_NOZORDER|SWP_NOMOVE);
SetWindowPos(GetDlgItem(hWndDlg,IDC_NUMBER),0,cx - (cx*35)/100 - 11,5,(cx*35)/100,20,SWP_NOZORDER);
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp
index b5a6285382..3f2d7f3543 100644
--- a/plugins/SMS/src/senddlg.cpp
+++ b/plugins/SMS/src/senddlg.cpp
@@ -181,12 +181,14 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
GetWindowRect(hWndDlg,&rcWin);
if (psswdWindowData->bMultiple)
{
- cx=rcWin.right-rcWin.left-181;
- cy=rcWin.bottom-rcWin.top;
+ cx = rcWin.right-rcWin.left-181;
+ cy = rcWin.bottom-rcWin.top;
}else{
- cx=rcWin.right-rcWin.left;
- cy=rcWin.bottom-rcWin.top;
+ cx = rcWin.right-rcWin.left;
+ cy = rcWin.bottom-rcWin.top;
}
+ cx -= 10; /* XXX: fix window sizes for aero. */
+ cy -= 10;
SetWindowPos(GetDlgItem(hWndDlg,IDC_MESSAGE),0,0,0,cx - 14,cy - 132,SWP_NOZORDER|SWP_NOMOVE);
SetWindowPos(GetDlgItem(hWndDlg,IDC_NAME),0,0,0,(cx*35)/100,20,SWP_NOZORDER|SWP_NOMOVE);
SetWindowPos(GetDlgItem(hWndDlg,IDC_ACCOUNTS),0,0,0,(cx*35)/100,20,SWP_NOZORDER|SWP_NOMOVE);