diff options
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/constants.h | 1 | ||||
-rw-r--r-- | protocols/FacebookRM/src/db.h | 1 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 7 | ||||
-rw-r--r-- | protocols/FacebookRM/src/resource.h | 1 |
5 files changed, 12 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index 3a8da1cdcf..8c527469ea 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -101,6 +101,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEFAULT_NAME_AS_NICK 1
#define DEFAULT_LOAD_ALL_CONTACTS 0
#define DEFAULT_PAGES_ALWAYS_ONLINE 1
+#define DEFAULT_NO_TYPING_WHEN_INVISIBLE 0
#define DEFAULT_EVENT_NOTIFICATIONS_ENABLE 1
#define DEFAULT_EVENT_FEEDS_ENABLE 0
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h index 85c3678d62..a7c4034c02 100644 --- a/protocols/FacebookRM/src/db.h +++ b/protocols/FacebookRM/src/db.h @@ -75,6 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_KEY_NAME_AS_NICK "NameAsNick"
#define FACEBOOK_KEY_LOAD_ALL_CONTACTS "LoadAllContacts"
#define FACEBOOK_KEY_PAGES_ALWAYS_ONLINE "PagesAlwaysOnline"
+#define FACEBOOK_KEY_NO_TYPING_WHEN_INVISIBLE "NoTypingWhenInvisible"
// Account DB keys - notifications
#define FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE "EventNotificationsEnable"
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 14c99e50cc..b4b12ad06d 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -449,6 +449,7 @@ INT_PTR CALLBACK FBOptionsStatusesProc(HWND hwnd, UINT message, WPARAM, LPARAM l LoadDBCheckState(proto, hwnd, IDC_SET_STATUS, FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS); LoadDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES, DEFAULT_MAP_STATUSES); LoadDBCheckState(proto, hwnd, IDC_LOAD_PAGES, FACEBOOK_KEY_LOAD_PAGES, DEFAULT_LOAD_PAGES); + LoadDBCheckState(proto, hwnd, IDC_NO_TYPING_WHEN_INVISIBLE, FACEBOOK_KEY_NO_TYPING_WHEN_INVISIBLE, DEFAULT_NO_TYPING_WHEN_INVISIBLE); return TRUE; } @@ -468,6 +469,7 @@ INT_PTR CALLBACK FBOptionsStatusesProc(HWND hwnd, UINT message, WPARAM, LPARAM l StoreDBCheckState(proto, hwnd, IDC_DISCONNECT_CHAT, FACEBOOK_KEY_DISCONNECT_CHAT); StoreDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES); StoreDBCheckState(proto, hwnd, IDC_LOAD_PAGES, FACEBOOK_KEY_LOAD_PAGES); + StoreDBCheckState(proto, hwnd, IDC_NO_TYPING_WHEN_INVISIBLE, FACEBOOK_KEY_NO_TYPING_WHEN_INVISIBLE); BOOL setStatus = IsDlgButtonChecked(hwnd, IDC_SET_STATUS); BOOL setStatusOld = proto->getByte(FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS); diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 1c5e786f9a..a2ada53862 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -133,6 +133,13 @@ void FacebookProto::SendTypingWorker(void *p) send_typing *typing = static_cast<send_typing*>(p); + // Don't send typing notifications when we are invisible and user don't want that + bool noTypingWhenInvisible = getBool(FACEBOOK_KEY_NO_TYPING_WHEN_INVISIBLE, DEFAULT_NO_TYPING_WHEN_INVISIBLE); + if (noTypingWhenInvisible && isInvisible()) { + delete typing; + return; + } + // Dont send typing notifications to not friends - Facebook won't give them that info anyway if (!isChatRoom(typing->hContact) && getWord(typing->hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND) { delete typing; diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h index e5f5cccf9c..8a5cd10fe1 100644 --- a/protocols/FacebookRM/src/resource.h +++ b/protocols/FacebookRM/src/resource.h @@ -42,6 +42,7 @@ #define IDC_PAGES_ALWAYS_ONLINE 1035 #define IDC_LOAD_PAGES 1036 #define IDC_KEEP_UNREAD 1037 +#define IDC_NO_TYPING_WHEN_INVISIBLE 1038 #define IDC_MESSAGES_ON_OPEN 1039 #define IDC_HIDE_CHATS 1040 #define IDC_NOTIFICATIONS_ENABLE 1041 |