summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-08-14 11:23:41 +0000
committerRobert Pösel <robyer@seznam.cz>2016-08-14 11:23:41 +0000
commit76cbb1d718f2d72bca13c20f41dfd9ecdf0660c4 (patch)
tree778fc726344464e9e8ec161cca52c7f0533472bb /protocols/FacebookRM
parentb93735eb1bd456769e5eef361cc4b9a8616f0f7f (diff)
Facebook: Provide option to automatically join existing chats (enabled by default)
git-svn-id: http://svn.miranda-ng.org/main/trunk@17184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/res/facebook.rc21
-rw-r--r--protocols/FacebookRM/src/connection.cpp5
-rw-r--r--protocols/FacebookRM/src/constants.h1
-rw-r--r--protocols/FacebookRM/src/db.h1
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp2
-rw-r--r--protocols/FacebookRM/src/resource.h3
6 files changed, 21 insertions, 12 deletions
diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc
index bdcee34e4e..94d1ba1ce2 100644
--- a/protocols/FacebookRM/res/facebook.rc
+++ b/protocols/FacebookRM/res/facebook.rc
@@ -50,6 +50,8 @@ END
// Icon
//
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
IDI_FACEBOOK ICON "facebook.ico"
IDI_MIND ICON "mind.ico"
IDI_POKE ICON "poke.ico"
@@ -59,7 +61,6 @@ IDI_FRIENDS ICON "friends.ico"
IDI_CONVERSATION ICON "conversation.ico"
IDI_READ ICON "read.ico"
IDI_MEMORIES ICON "memories.ico"
-
IDI_ANGRY ICON "angry.ico"
IDI_HAHA ICON "haha.ico"
IDI_LIKE ICON "like.ico"
@@ -148,7 +149,7 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,93,272,8
CONTROL "Show my ""On this day"" posts at login",IDC_ON_THIS_DAY_ENABLE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,108,272,8
- GROUPBOX "Chatroom logging",IDC_STATIC,6,130,292,33
+ GROUPBOX "Chatroom logging",IDC_STATIC,6,130,292,33
CONTROL "Log notifications into special chatroom",IDC_NOTIFICATIONS_CHATROOM,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,145,272,8
GROUPBOX "Extra",IDC_STATIC,6,169,292,46
@@ -199,19 +200,21 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,19,281,10
CONTROL "Show stickers as custom smileys (EXPERIMENTAL)",IDC_CUSTOM_SMILEYS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,34,281,10
- GROUPBOX "Multi user chats",IDC_STATIC,7,56,294,43
+ GROUPBOX "Multi user chats",IDC_STATIC,7,56,294,57
CONTROL "Enable multi user chats support",IDC_ENABLE_CHATS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,69,281,10
CONTROL "Do not open chat windows on creation",IDC_HIDE_CHATS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,83,281,10
- GROUPBOX "History synchronization",IDC_STATIC,7,107,294,59
+ CONTROL "Automatically join active chats that exist in contact list",IDC_JOIN_EXISTING_CHATS,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,97,281,10
+ GROUPBOX "History synchronization",IDC_STATIC,7,121,294,59
CONTROL "Load last messages (24 hours old) on login (EXPERIMENTAL)",IDC_LOGIN_SYNC,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,121,281,10
- CONTROL "Load last messages on opening message window (EXPERIMENTAL)",IDC_MESSAGES_ON_OPEN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,135,281,10
- RTEXT "Number of messages to load:",IDC_STATIC,13,149,231,8
- EDITTEXT IDC_MESSAGES_COUNT,249,146,34,14,ES_AUTOHSCROLL
- CONTROL "",IDC_MESSAGES_COUNT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,283,146,11,14
+ CONTROL "Load last messages on opening message window (EXPERIMENTAL)",IDC_MESSAGES_ON_OPEN,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,149,281,10
+ RTEXT "Number of messages to load:",IDC_STATIC,13,163,231,8
+ EDITTEXT IDC_MESSAGES_COUNT,249,160,34,14,ES_AUTOHSCROLL
+ CONTROL "",IDC_MESSAGES_COUNT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,283,160,11,14
END
IDD_GUARD DIALOGEX 0, 0, 285, 104
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp
index 1b44b4c544..e26c64e471 100644
--- a/protocols/FacebookRM/src/connection.cpp
+++ b/protocols/FacebookRM/src/connection.cpp
@@ -156,8 +156,9 @@ void FacebookProto::ChangeStatus(void*)
return;
}
- // Join all locally present chatrooms
- JoinChatrooms();
+ // Join all locally present chatrooms (if enabled)
+ if (getBool(FACEBOOK_KEY_JOIN_EXISTING_CHATS, DEFAULT_JOIN_EXISTING_CHATS))
+ JoinChatrooms();
ToggleStatusMenuItems(true);
debugLogA("*** SignOn complete");
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h
index b28e096f4f..80ea773873 100644
--- a/protocols/FacebookRM/src/constants.h
+++ b/protocols/FacebookRM/src/constants.h
@@ -96,6 +96,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEFAULT_MESSAGES_ON_OPEN_COUNT 10
#define DEFAULT_HIDE_CHATS 0
#define DEFAULT_ENABLE_CHATS 1
+#define DEFAULT_JOIN_EXISTING_CHATS 1
#define DEFAULT_NOTIFICATIONS_CHATROOM 0
#define DEFAULT_NAME_AS_NICK 1
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h
index a89f9c33f2..be346fd2f4 100644
--- a/protocols/FacebookRM/src/db.h
+++ b/protocols/FacebookRM/src/db.h
@@ -71,6 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FACEBOOK_KEY_MESSAGES_ON_OPEN_COUNT "MessagesOnOpenCount"
#define FACEBOOK_KEY_HIDE_CHATS "HideChats"
#define FACEBOOK_KEY_ENABLE_CHATS "EnableChat"
+#define FACEBOOK_KEY_JOIN_EXISTING_CHATS "JoinExistingChats"
#define FACEBOOK_KEY_NOTIFICATIONS_CHATROOM "NotificationsChatroom"
#define FACEBOOK_KEY_NAME_AS_NICK "NameAsNick"
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp
index b28dfa3f7a..bf478d165f 100644
--- a/protocols/FacebookRM/src/dialogs.cpp
+++ b/protocols/FacebookRM/src/dialogs.cpp
@@ -576,6 +576,7 @@ INT_PTR CALLBACK FBOptionsMessagingProc(HWND hwnd, UINT message, WPARAM wparam,
LoadDBCheckState(proto, hwnd, IDC_ENABLE_CHATS, FACEBOOK_KEY_ENABLE_CHATS, DEFAULT_ENABLE_CHATS);
LoadDBCheckState(proto, hwnd, IDC_HIDE_CHATS, FACEBOOK_KEY_HIDE_CHATS, DEFAULT_HIDE_CHATS);
+ LoadDBCheckState(proto, hwnd, IDC_JOIN_EXISTING_CHATS, FACEBOOK_KEY_JOIN_EXISTING_CHATS, DEFAULT_JOIN_EXISTING_CHATS);
int count = proto->getByte(FACEBOOK_KEY_MESSAGES_ON_OPEN_COUNT, 10);
count = min(count, FACEBOOK_MESSAGES_ON_OPEN_LIMIT);
@@ -609,6 +610,7 @@ INT_PTR CALLBACK FBOptionsMessagingProc(HWND hwnd, UINT message, WPARAM wparam,
StoreDBCheckState(proto, hwnd, IDC_ENABLE_CHATS, FACEBOOK_KEY_ENABLE_CHATS);
StoreDBCheckState(proto, hwnd, IDC_HIDE_CHATS, FACEBOOK_KEY_HIDE_CHATS);
+ StoreDBCheckState(proto, hwnd, IDC_JOIN_EXISTING_CHATS, FACEBOOK_KEY_JOIN_EXISTING_CHATS);
int count = GetDlgItemInt(hwnd, IDC_MESSAGES_COUNT, NULL, TRUE);
count = min(count, FACEBOOK_MESSAGES_ON_OPEN_LIMIT);
diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h
index aea6099feb..79fe37e726 100644
--- a/protocols/FacebookRM/src/resource.h
+++ b/protocols/FacebookRM/src/resource.h
@@ -71,6 +71,7 @@
#define IDC_FRAME2 1216
#define IDC_TEXT 1217
#define IDC_SEND_SMS 1218
+#define IDC_JOIN_EXISTING_CHATS 1219
// Next default values for new objects
//
@@ -78,7 +79,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 142
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1219
+#define _APS_NEXT_CONTROL_VALUE 1220
#define _APS_NEXT_SYMED_VALUE 134
#endif
#endif