diff options
| author | Robert Pösel <robyer@seznam.cz> | 2016-08-14 11:23:41 +0000 | 
|---|---|---|
| committer | Robert Pösel <robyer@seznam.cz> | 2016-08-14 11:23:41 +0000 | 
| commit | 76cbb1d718f2d72bca13c20f41dfd9ecdf0660c4 (patch) | |
| tree | 778fc726344464e9e8ec161cca52c7f0533472bb /protocols/FacebookRM/src | |
| parent | b93735eb1bd456769e5eef361cc4b9a8616f0f7f (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/src')
| -rw-r--r-- | protocols/FacebookRM/src/connection.cpp | 5 | ||||
| -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/resource.h | 3 | 
5 files changed, 9 insertions, 3 deletions
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  | 
