diff options
-rw-r--r-- | protocols/Facebook/res/facebook.rc | 12 | ||||
-rw-r--r-- | protocols/Facebook/src/db.h | 1 | ||||
-rw-r--r-- | protocols/Facebook/src/mqtt.cpp | 2 | ||||
-rw-r--r-- | protocols/Facebook/src/options.cpp | 4 | ||||
-rw-r--r-- | protocols/Facebook/src/proto.cpp | 9 | ||||
-rw-r--r-- | protocols/Facebook/src/proto.h | 8 | ||||
-rw-r--r-- | protocols/Facebook/src/resource.h | 1 | ||||
-rw-r--r-- | protocols/Facebook/src/version.h | 2 |
8 files changed, 19 insertions, 20 deletions
diff --git a/protocols/Facebook/res/facebook.rc b/protocols/Facebook/res/facebook.rc index 97ca037f3d..f0600b6382 100644 --- a/protocols/Facebook/res/facebook.rc +++ b/protocols/Facebook/res/facebook.rc @@ -72,7 +72,7 @@ BEGIN "Hyperlink",WS_TABSTOP,6,40,172,12 END -IDD_OPTIONS DIALOGEX 0, 0, 305, 166 +IDD_OPTIONS DIALOGEX 0, 0, 305, 184 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 @@ -84,15 +84,16 @@ BEGIN EDITTEXT IDC_PW,84,34,123,13,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "Create a new Facebook account",IDC_NEWACCOUNTLINK, "Hyperlink",WS_TABSTOP,84,53,189,10 - GROUPBOX "Contacts",IDC_STATIC,7,70,291,45 + GROUPBOX "Contacts",IDC_STATIC,7,70,291,56 LTEXT "Default group:",IDC_STATIC,17,84,61,8,0,WS_EX_RIGHT EDITTEXT IDC_GROUP,84,82,123,13,ES_AUTOHSCROLL CONTROL "Keep messages as unread on server",IDC_KEEP_UNREAD, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,99,277,10 - GROUPBOX "Group chats",IDC_STATIC,7,116,291,44 - CONTROL "Enable group chats",IDC_ENABLECHATS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,130,277,10 + CONTROL "Use invisible mode after login",IDC_INVIS_LOGIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,112,277,10 + GROUPBOX "Group chats",IDC_STATIC,7,136,291,44 + CONTROL "Enable group chats",IDC_ENABLECHATS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,150,277,10 CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,143,277,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,163,277,10 END IDD_GROUPCHAT_INVITE DIALOGEX 0, 0, 215, 263 @@ -120,6 +121,7 @@ BEGIN IDD_OPTIONS, DIALOG BEGIN + BOTTOMMARGIN, 166 END END #endif // APSTUDIO_INVOKED diff --git a/protocols/Facebook/src/db.h b/protocols/Facebook/src/db.h index 3d96302cb9..8ac3a19bf3 100644 --- a/protocols/Facebook/src/db.h +++ b/protocols/Facebook/src/db.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DBKEY_SYNC_TOKEN "SyncToken" // Account DB keys -#define DBKEY_MAP_STATUSES "MapStatuses" #define DBKEY_SET_MIRANDA_STATUS "SetMirandaStatus" // Hidden account DB keys (can't be changed through GUI) diff --git a/protocols/Facebook/src/mqtt.cpp b/protocols/Facebook/src/mqtt.cpp index 9f5d801504..2c3b10f2aa 100644 --- a/protocols/Facebook/src/mqtt.cpp +++ b/protocols/Facebook/src/mqtt.cpp @@ -218,7 +218,7 @@ void FacebookProto::MqttLogin() thrift.writeInt32(1); thrift.writeBool(true); - thrift.writeBool(!m_invisible); // visibility + thrift.writeBool(!m_bLoginInvisible); // visibility thrift.writeField(FB_THRIFT_TYPE_STRING); // device id thrift << m_szDeviceID; diff --git a/protocols/Facebook/src/options.cpp b/protocols/Facebook/src/options.cpp index fa768756d0..114db861d1 100644 --- a/protocols/Facebook/src/options.cpp +++ b/protocols/Facebook/src/options.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. class CFacebookAccOptsDlg : public CFBDlgBase { CCtrlEdit edtGroup; - CCtrlCheck chkEnableChats, chkHideChats, chkKeepUnread; + CCtrlCheck chkEnableChats, chkHideChats, chkKeepUnread, chkLoginInvis; public: CFacebookAccOptsDlg(FacebookProto *pThis) : @@ -31,11 +31,13 @@ public: edtGroup(this, IDC_GROUP), chkHideChats(this, IDC_HIDECHATS), chkKeepUnread(this, IDC_KEEP_UNREAD), + chkLoginInvis(this, IDC_INVIS_LOGIN), chkEnableChats(this, IDC_ENABLECHATS) { CreateLink(edtGroup, pThis->m_wszDefaultGroup); CreateLink(chkHideChats, pThis->m_bHideGroupchats); CreateLink(chkKeepUnread, pThis->m_bKeepUnread); + CreateLink(chkLoginInvis, pThis->m_bLoginInvisible); CreateLink(chkEnableChats, pThis->m_bUseGroupchats); } diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp index 9d4dd13313..8f0606042a 100644 --- a/protocols/Facebook/src/proto.cpp +++ b/protocols/Facebook/src/proto.cpp @@ -45,6 +45,7 @@ FacebookProto::FacebookProto(const char *proto_name, const wchar_t *username) : m_bUseBigAvatars(this, "UseBigAvatars", true), m_bUseGroupchats(this, "UseGroupChats", true), m_bHideGroupchats(this, "HideGroupChats", true), + m_bLoginInvisible(this, "LoginInvisible", false), m_wszDefaultGroup(this, "DefaultGroup", L"Facebook") { for (auto &cc : AccContacts()) { @@ -207,16 +208,11 @@ int FacebookProto::SetStatus(int iNewStatus) // Routing statuses not supported by Facebook switch (iNewStatus) { case ID_STATUS_ONLINE: - case ID_STATUS_AWAY: - case ID_STATUS_INVISIBLE: case ID_STATUS_OFFLINE: break; - case ID_STATUS_NA: - iNewStatus = ID_STATUS_AWAY; - break; default: - iNewStatus = getByte(DBKEY_MAP_STATUSES) ? ID_STATUS_INVISIBLE : ID_STATUS_AWAY; + iNewStatus = ID_STATUS_AWAY; break; } @@ -225,7 +221,6 @@ int FacebookProto::SetStatus(int iNewStatus) return 0; } - m_invisible = (iNewStatus == ID_STATUS_INVISIBLE); m_iDesiredStatus = iNewStatus; int iOldStatus = m_iStatus; diff --git a/protocols/Facebook/src/proto.h b/protocols/Facebook/src/proto.h index 4e6539ef38..64060b04bc 100644 --- a/protocols/Facebook/src/proto.h +++ b/protocols/Facebook/src/proto.h @@ -448,7 +448,6 @@ class FacebookProto : public PROTO<FacebookProto> __int64 m_sid; // stored, Facebook sequence id int m_iUnread; - bool m_invisible; bool m_bOnline; bool m_QueueCreated; @@ -495,9 +494,10 @@ public: // options CMOption<wchar_t *> m_wszDefaultGroup; // clist group to store contacts - CMOption<BYTE> m_bUseBigAvatars; // use big or small avatars by default - CMOption<BYTE> m_bUseGroupchats; // do we need group chats at all? - CMOption<BYTE> m_bHideGroupchats; // do not open chat windows on creation + CMOption<bool> m_bUseBigAvatars; // use big or small avatars by default + CMOption<bool> m_bUseGroupchats; // do we need group chats at all? + CMOption<bool> m_bHideGroupchats; // do not open chat windows on creation + CMOption<bool> m_bLoginInvisible; // login in the invisible mode CMOption<bool> m_bKeepUnread; // do not mark incoming messages as read //////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/Facebook/src/resource.h b/protocols/Facebook/src/resource.h index a83aa158a8..3cf940682e 100644 --- a/protocols/Facebook/src/resource.h +++ b/protocols/Facebook/src/resource.h @@ -15,6 +15,7 @@ #define IDC_HIDECHATS 1006 #define IDC_CLIST 1007 #define IDC_KEEP_UNREAD 1008 +#define IDC_INVIS_LOGIN 1009 // Next default values for new objects // diff --git a/protocols/Facebook/src/version.h b/protocols/Facebook/src/version.h index 429352fadb..45bbcaf19f 100644 --- a/protocols/Facebook/src/version.h +++ b/protocols/Facebook/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 0 -#define __BUILD_NUM 4 +#define __BUILD_NUM 5 #include <stdver.h> |