diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-04-13 04:49:56 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-04-13 04:49:56 +0000 |
commit | 3269e1db8b4365187485d600cb2ebdda4894996a (patch) | |
tree | c85e4a2d8c80b7bdad48cc3eac2d811478076c4a /protocols/VKontakte | |
parent | 1bc1672368e1ba87a68fca21b846c70156e71f05 (diff) |
VKontakte:
radiobox group settings -> combobox (patch by MikalaiR, edited)
remove unneeded methods
git-svn-id: http://svn.miranda-ng.org/main/trunk@16634 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/res/resource.rc | 35 | ||||
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/resource.h | 6 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 80 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.h | 10 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.cpp | 25 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.h | 33 |
8 files changed, 80 insertions, 113 deletions
diff --git a/protocols/VKontakte/res/resource.rc b/protocols/VKontakte/res/resource.rc index 981d623c7d..3001e246fa 100644 --- a/protocols/VKontakte/res/resource.rc +++ b/protocols/VKontakte/res/resource.rc @@ -107,10 +107,11 @@ BEGIN VERTGUIDE, 155
VERTGUIDE, 162
VERTGUIDE, 167
+ VERTGUIDE, 180
+ VERTGUIDE, 192
VERTGUIDE, 288
TOPMARGIN, 7
- BOTTOMMARGIN, 228
- HORZGUIDE, 223
+ BOTTOMMARGIN, 177
END
IDD_INVITE, DIALOG
@@ -155,8 +156,10 @@ BEGIN CONTROL "Status message",IDC_SHOW_MENU1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,30,280,10
CONTROL "Send message to my wall",IDC_SHOW_MENU2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,41,280,10
CONTROL "Load news from VK",IDC_SHOW_MENU3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,52,280,10
- CONTROL "Load history for all contacts from VK",IDC_SHOW_MENU4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,63,280,10
- CONTROL "Wipe contacts missing in friend list",IDC_SHOW_MENU5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,74,280,10
+ CONTROL "Load history for all contacts from VK",IDC_SHOW_MENU4,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,63,280,10
+ CONTROL "Wipe contacts missing in friend list",IDC_SHOW_MENU5,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,74,280,10
CONTROL "Visit profile",IDC_SHOW_MENU6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,85,280,10
END
@@ -279,7 +282,7 @@ BEGIN EDITTEXT IDC_RET_CHAT_MES,134,204,157,12,ES_AUTOHSCROLL
END
-IDD_OPT_MAIN DIALOGEX 0, 0, 304, 233
+IDD_OPT_MAIN DIALOGEX 0, 0, 304, 182
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -290,26 +293,20 @@ BEGIN RTEXT "Password:",IDC_STATIC,12,30,150,10
EDITTEXT IDC_PASSWORD,167,30,121,12,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Open VKontakte site",IDC_URL,"Hyperlink",WS_TABSTOP,59,44,174,11
- GROUPBOX "Local settings",IDC_STATIC,4,59,293,75
+ GROUPBOX "Local settings",IDC_STATIC,4,59,293,115
RTEXT "Contact list group:",IDC_STATIC,12,71,150,8
EDITTEXT IDC_GROUPNAME,167,69,121,12,ES_AUTOHSCROLL
RTEXT "Language for names and titles:",IDC_STATIC,12,86,148,10
COMBOBOX IDC_COMBO_LANGUAGE,167,84,121,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- CONTROL "Server-side delivery confirmation",IDC_DELIVERY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,98,278,10
+ CONTROL "Server-side delivery confirmation",IDC_DELIVERY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,157,278,10
CONTROL "Use local time for received messages",IDC_USE_LOCAL_TIME,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,109,278,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,137,278,10
CONTROL "Automatically wipe local contacts missing in your friend list",IDC_AUTOCLEAN,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,120,278,10
- GROUPBOX "Mark message as read...",IDC_STATIC_MARK_AS_READ,4,137,293,33,WS_GROUP
- CONTROL "on read",IDC_ONREAD,"Button",BS_AUTORADIOBUTTON,12,148,138,10
- CONTROL "on receive",IDC_ONRECEIVE,"Button",BS_AUTORADIOBUTTON,12,158,138,10
- CONTROL "on reply",IDC_ONREPLY,"Button",BS_AUTORADIOBUTTON,155,148,133,10
- CONTROL "on typing",IDC_ONTYPING,"Button",BS_AUTORADIOBUTTON,155,158,133,10
- GROUPBOX "Sync history on protocol online...",IDC_STATIC_SYNC_HISTORY,4,173,293,36,WS_GROUP
- CONTROL "off",IDC_SYNC_OFF,"Button",BS_AUTORADIOBUTTON,12,184,138,10
- CONTROL "automatically",IDC_SYNC_AUTO,"Button",BS_AUTORADIOBUTTON,12,195,138,10
- CONTROL "for last 1 day",IDC_SYNC_LAST1DAY,"Button",BS_AUTORADIOBUTTON,155,184,133,10
- CONTROL "for last 3 days",IDC_SYNC_LAST3DAY,"Button",BS_AUTORADIOBUTTON,155,195,133,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,147,278,10
+ RTEXT "Mark message as read:",IDC_STATIC,12,101,150,12,SS_CENTERIMAGE
+ COMBOBOX IDC_COMBO_MARKASREAD,167,101,121,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Sync history on protocol online:",IDC_STATIC,12,117,150,12,SS_CENTERIMAGE
+ COMBOBOX IDC_COMBO_SYNCHISTORY,167,117,121,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END
IDD_CAPTCHAFORM DIALOGEX 0, 0, 258, 224
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 37274b0e79..bc1bcbe504 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -189,7 +189,7 @@ MCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate) MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD);
Proto_AddToContact(hNewContact, m_szModuleName);
setDword(hNewContact, "ID", dwUserid);
- db_set_ts(hNewContact, "CList", "Group", getGroup());
+ db_set_ts(hNewContact, "CList", "Group", m_vkOptions.ptszDefaultGroup);
return hNewContact;
}
diff --git a/protocols/VKontakte/src/resource.h b/protocols/VKontakte/src/resource.h index 1a4dfb007a..b5c9ec2042 100644 --- a/protocols/VKontakte/src/resource.h +++ b/protocols/VKontakte/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Включаемый файл, созданный в Microsoft Visual C++.
-// Используется d:\svn\protocols\VKontakte\res\resource.rc
+// Используется D:\svn\protocols\VKontakte\res\resource.rc
//
#define IDOPENBROWSER 3
#define IDD_ACCMGRUI 101
@@ -121,6 +121,8 @@ #define IDC_SHOW_MENU4 1105
#define IDC_SHOW_MENU5 1106
#define IDC_SHOW_MENU6 1107
+#define IDC_COMBO_MARKASREAD 1108
+#define IDC_COMBO_SYNCHISTORY 1109
// Next default values for new objects
//
@@ -129,7 +131,7 @@ #define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 123
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1108
+#define _APS_NEXT_CONTROL_VALUE 1110
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 4db911fabd..bdad14b496 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -121,6 +121,22 @@ static CVKLang vkLangCodes[] = { { _T("it"), LPGENT("Italian") },
};
+static CVKSync vkHistorySyncMethods[] =
+{
+ { TranslateT("off"), SyncHistoryMetod::syncOff },
+ { TranslateT("automatically"), SyncHistoryMetod::syncAuto },
+ { TranslateT("for last 1 day"), SyncHistoryMetod::sync1Days },
+ { TranslateT("for last 3 days"), SyncHistoryMetod::sync3Days }
+};
+
+static CVKMarkMsgRead vkMarkMsgAsReadMethods[] =
+{
+ { TranslateT("on read"), MarkMsgReadOn::markOnRead },
+ { TranslateT("on receive"), MarkMsgReadOn::markOnReceive },
+ { TranslateT("on reply"), MarkMsgReadOn::markOnReply },
+ { TranslateT("on typing"), MarkMsgReadOn::markOnTyping }
+};
+
CVkOptionAccountForm::CVkOptionAccountForm(CVkProto *proto):
CVkDlgBase(proto, IDD_OPT_MAIN, false),
m_edtLogin(this, IDC_LOGIN),
@@ -131,21 +147,14 @@ CVkOptionAccountForm::CVkOptionAccountForm(CVkProto *proto): m_cbDelivery(this, IDC_DELIVERY),
m_cbUseLocalTime(this, IDC_USE_LOCAL_TIME),
m_cbAutoClean(this, IDC_AUTOCLEAN),
- m_cbMarkMessageOnRead(this, IDC_ONREAD),
- m_cbMarkMessageOnReceive(this, IDC_ONRECEIVE),
- m_cbMarkMessageOnReply(this, IDC_ONREPLY),
- m_cbMarkMessageOnTyping(this, IDC_ONTYPING),
- m_cbSyncHistoryOff(this, IDC_SYNC_OFF),
- m_cbSyncHistoryAuto(this, IDC_SYNC_AUTO),
- m_cbSyncHistoryForLast1Day(this, IDC_SYNC_LAST1DAY),
- m_cbSyncHistoryForLast3Day(this, IDC_SYNC_LAST3DAY)
+ m_cbxMarkAsRead(this, IDC_COMBO_MARKASREAD),
+ m_cbxSyncHistory(this, IDC_COMBO_SYNCHISTORY)
{
CreateLink(m_edtLogin, "Login", _T(""));
- CreateLink(m_edtGroupName, "ProtoGroup", _T("VKontakte"));
+ CreateLink(m_edtGroupName, m_proto->m_vkOptions.ptszDefaultGroup);
CreateLink(m_cbDelivery, m_proto->m_vkOptions.bServerDelivery);
CreateLink(m_cbUseLocalTime, m_proto->m_vkOptions.bUseLocalTime);
CreateLink(m_cbAutoClean, m_proto->m_vkOptions.bAutoClean);
-
}
void CVkOptionAccountForm::OnInitDialog()
@@ -159,15 +168,17 @@ void CVkOptionAccountForm::OnInitDialog() m_ptszOldGroup = m_edtGroupName.GetText();
- m_cbMarkMessageOnRead.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnRead);
- m_cbMarkMessageOnReceive.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnReceive);
- m_cbMarkMessageOnReply.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnReply);
- m_cbMarkMessageOnTyping.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnTyping);
+ for (size_t i = 0; i < _countof(vkMarkMsgAsReadMethods); i++) {
+ int cur = m_cbxMarkAsRead.AddString(vkMarkMsgAsReadMethods[i].type, vkMarkMsgAsReadMethods[i].data);
+ if (vkMarkMsgAsReadMethods[i].data == m_proto->m_vkOptions.iMarkMessageReadOn)
+ m_cbxMarkAsRead.SetCurSel(cur);
+ }
- m_cbSyncHistoryOff.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::syncOff);
- m_cbSyncHistoryAuto.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::syncAuto);
- m_cbSyncHistoryForLast1Day.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::sync1Days);
- m_cbSyncHistoryForLast3Day.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::sync3Days);
+ for (size_t i = 0; i < _countof(vkHistorySyncMethods); i++) {
+ int cur = m_cbxSyncHistory.AddString(vkHistorySyncMethods[i].type, vkHistorySyncMethods[i].data);
+ if (vkHistorySyncMethods[i].data == m_proto->m_vkOptions.iSyncHistoryMetod)
+ m_cbxSyncHistory.SetCurSel(cur);
+ }
for (size_t i = 0; i < _countof(vkLangCodes); i++) {
m_cbxVKLang.AddString(TranslateTS(vkLangCodes[i].szDescription), (LPARAM)vkLangCodes[i].szCode);
@@ -179,33 +190,13 @@ void CVkOptionAccountForm::OnInitDialog() void CVkOptionAccountForm::OnApply()
{
- if (m_cbSyncHistoryOff.GetState())
- m_proto->m_vkOptions.iSyncHistoryMetod = SyncHistoryMetod::syncOff;
- if (m_cbSyncHistoryAuto.GetState())
- m_proto->m_vkOptions.iSyncHistoryMetod = SyncHistoryMetod::syncAuto;
- if (m_cbSyncHistoryForLast1Day.GetState())
- m_proto->m_vkOptions.iSyncHistoryMetod = SyncHistoryMetod::sync1Days;
- if (m_cbSyncHistoryForLast3Day.GetState())
- m_proto->m_vkOptions.iSyncHistoryMetod = SyncHistoryMetod::sync3Days;
-
- if (m_cbMarkMessageOnRead.GetState())
- m_proto->m_vkOptions.iMarkMessageReadOn = MarkMsgReadOn::markOnRead;
- if (m_cbMarkMessageOnReceive.GetState())
- m_proto->m_vkOptions.iMarkMessageReadOn = MarkMsgReadOn::markOnReceive;
- if (m_cbMarkMessageOnReply.GetState())
- m_proto->m_vkOptions.iMarkMessageReadOn = MarkMsgReadOn::markOnReply;
- if (m_cbMarkMessageOnTyping.GetState())
- m_proto->m_vkOptions.iMarkMessageReadOn = MarkMsgReadOn::markOnTyping;
-
+ m_proto->m_vkOptions.iSyncHistoryMetod = m_cbxSyncHistory.GetItemData(m_cbxSyncHistory.GetCurSel());
+ m_proto->m_vkOptions.iMarkMessageReadOn = m_cbxMarkAsRead.GetItemData(m_cbxMarkAsRead.GetCurSel());
m_proto->m_vkOptions.ptszVKLang = (TCHAR *)m_cbxVKLang.GetItemData(m_cbxVKLang.GetCurSel());
- if (!IsEmpty(m_proto->m_vkOptions.ptszVKLang))
- m_proto->setTString("VKLang", m_proto->m_vkOptions.ptszVKLang);
- else
- m_proto->delSetting("VKLang");
ptrT ptszGroupName(m_edtGroupName.GetText());
if (mir_tstrcmp(m_ptszOldGroup, ptszGroupName)) {
- m_proto->setGroup(ptszGroupName);
+ Clist_CreateGroup(NULL, ptszGroupName);
m_ptszOldGroup = ptszGroupName;
}
@@ -252,22 +243,19 @@ CVkOptionAdvancedForm::CVkOptionAdvancedForm(CVkProto *proto): CreateLink(m_cbMesAsUnread, m_proto->m_vkOptions.bMesAsUnread);
CreateLink(m_cbForceInvisibleStatus, m_proto->m_vkOptions.bUserForceInvisibleOnActivity);
CreateLink(m_edtInvInterval, m_proto->m_vkOptions.iInvisibleInterval);
-
CreateLink(m_cbUseNonStandardNotifications, m_proto->m_vkOptions.bUseNonStandardNotifications);
CreateLink(m_cbUseNonStandardUrlEncode, m_proto->m_vkOptions.bUseNonStandardUrlEncode);
CreateLink(m_cbReportAbuse, m_proto->m_vkOptions.bReportAbuse);
CreateLink(m_cbClearServerHistory, m_proto->m_vkOptions.bClearServerHistory);
CreateLink(m_cbRemoveFromFrendlist, m_proto->m_vkOptions.bRemoveFromFrendlist);
CreateLink(m_cbRemoveFromCList, m_proto->m_vkOptions.bRemoveFromCList);
-
- CreateLink(m_edtReturnChatMessage, "ReturnChatMessage", TranslateT("I\'m back"));
+ CreateLink(m_edtReturnChatMessage, m_proto->m_vkOptions.ptszReturnChatMessage);
m_cbForceInvisibleStatus.OnChange = Callback(this, &CVkOptionAdvancedForm::On_cbForceInvisibleStatusChange);
}
void CVkOptionAdvancedForm::OnInitDialog()
{
-
m_cbMusicSendOff.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendNone);
m_cbMusicSendBroadcastAndStatus.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendBroadcastAndStatus);
m_cbSendMetodBroadcast.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendBroadcastOnly);
@@ -289,8 +277,6 @@ void CVkOptionAdvancedForm::OnApply() m_proto->m_vkOptions.iMusicSendMetod = MusicSendMetod::sendBroadcastOnly;
if (m_cbMusicSendStatus.GetState())
m_proto->m_vkOptions.iMusicSendMetod = MusicSendMetod::sendStatusOnly;
-
- m_proto->m_vkOptions.ptszReturnChatMessage = m_edtReturnChatMessage.GetText();
}
void CVkOptionAdvancedForm::On_cbForceInvisibleStatusChange(CCtrlCheck *)
diff --git a/protocols/VKontakte/src/vk_options.h b/protocols/VKontakte/src/vk_options.h index 578a907513..3bb05c6efd 100644 --- a/protocols/VKontakte/src/vk_options.h +++ b/protocols/VKontakte/src/vk_options.h @@ -51,14 +51,8 @@ class CVkOptionAccountForm : public CVkDlgBase CCtrlCheck m_cbDelivery;
CCtrlCheck m_cbUseLocalTime;
CCtrlCheck m_cbAutoClean;
- CCtrlCheck m_cbMarkMessageOnRead;
- CCtrlCheck m_cbMarkMessageOnReceive;
- CCtrlCheck m_cbMarkMessageOnReply;
- CCtrlCheck m_cbMarkMessageOnTyping;
- CCtrlCheck m_cbSyncHistoryOff;
- CCtrlCheck m_cbSyncHistoryAuto;
- CCtrlCheck m_cbSyncHistoryForLast1Day;
- CCtrlCheck m_cbSyncHistoryForLast3Day;
+ CCtrlCombo m_cbxSyncHistory;
+ CCtrlCombo m_cbxMarkAsRead;
pass_ptrT m_ptszOldPass;
ptrT m_ptszOldLogin;
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 478c4a43e1..dea5af4195 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -116,8 +116,6 @@ struct CVkProto : public PROTO<CVkProto> void CreateNewChat(LPCSTR uids, LPCTSTR ptrszTitle);
__forceinline bool IsOnline() const { return m_bOnline; }
- __forceinline LPCTSTR getGroup() const { return m_vkOptions.ptszDefaultGroup; }
- __forceinline void setGroup(LPCTSTR grp) { m_vkOptions.ptszDefaultGroup = mir_tstrdup(grp); }
void OnTimerTic();
void ClearAccessToken();
TCHAR* GetUserStoredPassword(void);
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp index 7d04d03ea1..8abcc68bb9 100644 --- a/protocols/VKontakte/src/vk_struct.cpp +++ b/protocols/VKontakte/src/vk_struct.cpp @@ -229,28 +229,9 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) : iInvisibleInterval(proto, "InvisibleInterval", 10),
iMaxFriendsCount(proto, "MaxFriendsCount", 1000),
- ptszDefaultGroup(NULL),
- ptszReturnChatMessage(NULL),
- ptszVKLang(NULL),
+ ptszDefaultGroup(proto, "ProtoGroup", _T("VKontakte")),
+ ptszReturnChatMessage(proto, "ReturnChatMessage", TranslateT("I\'m back")),
+ ptszVKLang(proto, "VKLang", NULL)
- m_proto((CVkProto*)proto)
-
-{
- ReloadStrings();
-}
-
-void CVKOptions::ReloadStrings()
{
- if (!m_proto)
- return;
-
- ptszDefaultGroup = m_proto->getTStringA("ProtoGroup");
- ptszReturnChatMessage = m_proto->getTStringA("ReturnChatMessage");
- ptszVKLang = m_proto->getTStringA("VKLang");
-
- if (IsEmpty(ptszDefaultGroup))
- ptszDefaultGroup = mir_tstrdup(_T("VKontakte"));
-
- if (IsEmpty(ptszReturnChatMessage))
- ptszReturnChatMessage = mir_tstrdup(TranslateT("I\'m back"));
}
diff --git a/protocols/VKontakte/src/vk_struct.h b/protocols/VKontakte/src/vk_struct.h index f3871c4830..fff9bd9bab 100644 --- a/protocols/VKontakte/src/vk_struct.h +++ b/protocols/VKontakte/src/vk_struct.h @@ -220,8 +220,8 @@ struct CVKNewsItem : public MZeroedObject { bool bIsRepost;
};
-enum VKBBCType { vkbbcB, vkbbcI, vkbbcS, vkbbcU, vkbbcCode, vkbbcImg, vkbbcUrl, vkbbcSize, vkbbcColor };
-enum BBCSupport { bbcNo, bbcBasic, bbcAdvanced };
+enum VKBBCType : BYTE { vkbbcB, vkbbcI, vkbbcS, vkbbcU, vkbbcCode, vkbbcImg, vkbbcUrl, vkbbcSize, vkbbcColor };
+enum BBCSupport : BYTE { bbcNo, bbcBasic, bbcAdvanced };
struct CVKBBCItem {
VKBBCType vkBBCType;
@@ -249,10 +249,20 @@ struct CVKLang { TCHAR *szDescription;
};
-enum MarkMsgReadOn { markOnRead, markOnReceive, markOnReply, markOnTyping };
-enum SyncHistoryMetod { syncOff, syncAuto, sync1Days, sync3Days };
-enum MusicSendMetod { sendNone, sendStatusOnly, sendBroadcastOnly, sendBroadcastAndStatus };
-enum IMGBBCSypport { imgNo, imgFullSize, imgPreview130, imgPreview604 };
+enum MarkMsgReadOn : BYTE { markOnRead, markOnReceive, markOnReply, markOnTyping };
+enum SyncHistoryMetod : BYTE { syncOff, syncAuto, sync1Days, sync3Days };
+enum MusicSendMetod : BYTE { sendNone, sendStatusOnly, sendBroadcastOnly, sendBroadcastAndStatus };
+enum IMGBBCSypport : BYTE { imgNo, imgFullSize, imgPreview130, imgPreview604 };
+
+struct CVKSync {
+ const TCHAR *type;
+ SyncHistoryMetod data;
+};
+
+struct CVKMarkMsgRead {
+ const TCHAR *type;
+ MarkMsgReadOn data;
+};
struct CVkCookie
{
@@ -327,16 +337,15 @@ struct CVKOptions { CMOption<DWORD> iInvisibleInterval;
CMOption<DWORD> iMaxFriendsCount;
- ptrT ptszDefaultGroup;
- ptrT ptszReturnChatMessage;
- ptrT ptszVKLang;
+ CMOption<TCHAR*> ptszDefaultGroup;
+ CMOption<TCHAR*> ptszReturnChatMessage;
+ CMOption<TCHAR*> ptszVKLang;
CVkProto *m_proto;
CVKOptions(PROTO_INTERFACE *proto);
- void ReloadStrings();
- __forceinline BBCSupport BBCForNews() { return (BBCSupport)(int)iBBCForNews; };
- __forceinline BBCSupport BBCForAttachments() { return (BBCSupport)(int)iBBCForAttachments; };
+ __forceinline BBCSupport BBCForNews() { return (BBCSupport)(BYTE)iBBCForNews; };
+ __forceinline BBCSupport BBCForAttachments() { return (BBCSupport)(BYTE)iBBCForAttachments; };
};
\ No newline at end of file |