diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-11-03 19:44:48 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-11-03 19:44:48 +0000 |
commit | af54d0aa9a04ffa55e25c74e383521e5954b5aa1 (patch) | |
tree | 55d8ac5d91ee9bfe3f4b0209d7ca7a3c788619fa | |
parent | 2a75d6a9c47f6c09269303f04f066c390f5c48b4 (diff) |
Facebook: Options cleanup.
git-svn-id: http://svn.miranda-ng.org/main/trunk@2172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/FacebookRM/facebook_10.vcxproj | 5 | ||||
-rw-r--r-- | protocols/FacebookRM/facebook_10.vcxproj.filters | 15 | ||||
-rw-r--r-- | protocols/FacebookRM/res/facebook.rc | 27 | ||||
-rw-r--r-- | protocols/FacebookRM/src/constants.h | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/db.h | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 34 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 5 | ||||
-rw-r--r-- | protocols/FacebookRM/src/resource.h | 5 |
9 files changed, 34 insertions, 69 deletions
diff --git a/protocols/FacebookRM/facebook_10.vcxproj b/protocols/FacebookRM/facebook_10.vcxproj index 58ea477168..a185d08705 100644 --- a/protocols/FacebookRM/facebook_10.vcxproj +++ b/protocols/FacebookRM/facebook_10.vcxproj @@ -216,6 +216,11 @@ <ClInclude Include="src\version.h" />
</ItemGroup>
<ItemGroup>
+ <None Include="res\auth_ask.ico" />
+ <None Include="res\auth_grant.ico" />
+ <None Include="res\auth_revoke.ico" />
+ <None Include="res\facebook.ico" />
+ <None Include="res\mind.ico" />
<None Include="src\JSON_CAJUN\elements.inl" />
<None Include="src\JSON_CAJUN\reader.inl" />
<None Include="src\JSON_CAJUN\writer.inl" />
diff --git a/protocols/FacebookRM/facebook_10.vcxproj.filters b/protocols/FacebookRM/facebook_10.vcxproj.filters index 3fe9cf5139..ab557b3fa2 100644 --- a/protocols/FacebookRM/facebook_10.vcxproj.filters +++ b/protocols/FacebookRM/facebook_10.vcxproj.filters @@ -139,6 +139,21 @@ <None Include="src\JSON_CAJUN\writer.inl">
<Filter>Source Files\JSON_CAJUN</Filter>
</None>
+ <None Include="res\facebook.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\mind.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\auth_grant.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\auth_ask.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\auth_revoke.ico">
+ <Filter>Resource Files</Filter>
+ </None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\facebook.rc">
diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc index 7b7325a3a8..d5690adac5 100644 --- a/protocols/FacebookRM/res/facebook.rc +++ b/protocols/FacebookRM/res/facebook.rc @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,159,44,50,14
END
-IDD_OPTIONS DIALOGEX 0, 0, 305, 238
+IDD_OPTIONS DIALOGEX 0, 0, 305, 210
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -109,7 +109,7 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,127,271,10
END
-IDD_OPTIONS_EVENTS DIALOGEX 0, 0, 305, 217
+IDD_OPTIONS_EVENTS DIALOGEX 0, 0, 305, 210
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -151,12 +151,12 @@ BEGIN COMBOBOX IDC_FEED_TYPE,169,153,90,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
-IDD_OPTIONS_ADVANCED DIALOGEX 0, 0, 305, 238
+IDD_OPTIONS_ADVANCED DIALOGEX 0, 0, 305, 210
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- GROUPBOX "Advanced Settings",IDC_STATIC,7,7,291,126
+ GROUPBOX "Advanced Settings",IDC_STATIC,7,7,291,93
CONTROL "Force secure (HTTPS) connection",IDC_SECURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,32,267,10
CONTROL "Post Miranda statuses to Wall",IDC_SET_STATUS,"Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,17,56,267,10
CONTROL "Enable logging for debugging purposes",IDC_LOGGING,
@@ -165,14 +165,8 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,44,252,10
CONTROL "Also disconnect chat when going to offline",IDC_DISCONNECT_CHAT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,68,267,10
- CONTROL "Get unread messages on login (EXPERIMENTAL)",IDC_PARSE_UNREAD,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,104,267,10
- CONTROL "Automatically close chat windows (on website) (NOT WORKING)",IDC_CLOSE_WINDOWS,
- "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,17,80,267,10
CONTROL "Map non-standard statuses to Invisible (instead of Online)",IDC_MAP_STATUSES,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,92,267,10
- CONTROL "Enable groupchats support (EXPERIMENTAL)",IDC_GROUPCHATS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,116,267,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,81,267,10
END
@@ -184,6 +178,10 @@ END #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
+ IDD_FACEBOOKACCOUNT, DIALOG
+ BEGIN
+ END
+
IDD_MIND, DIALOG
BEGIN
LEFTMARGIN, 4
@@ -206,7 +204,7 @@ BEGIN VERTGUIDE, 288
VERTGUIDE, 298
TOPMARGIN, 7
- BOTTOMMARGIN, 231
+ BOTTOMMARGIN, 203
END
IDD_OPTIONS_EVENTS, DIALOG
@@ -223,7 +221,7 @@ BEGIN VERTGUIDE, 237
VERTGUIDE, 277
TOPMARGIN, 7
- BOTTOMMARGIN, 210
+ BOTTOMMARGIN, 203
HORZGUIDE, 35
HORZGUIDE, 37
HORZGUIDE, 55
@@ -244,12 +242,11 @@ BEGIN VERTGUIDE, 122
VERTGUIDE, 284
TOPMARGIN, 7
- BOTTOMMARGIN, 231
+ BOTTOMMARGIN, 203
END
END
#endif // APSTUDIO_INVOKED
-
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index b08c98a102..b890ce140a 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -53,17 +53,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEFAULT_FORCE_HTTPS 0
#define DEFAULT_FORCE_HTTPS_CHANNEL 0
-#define DEFAULT_CLOSE_WINDOWS_ENABLE 0
#define DEFAULT_SET_MIRANDA_STATUS 0
#define DEFAULT_LOGGING_ENABLE 0
#define DEFAULT_SYSTRAY_NOTIFY 0
#define DEFAULT_DISABLE_STATUS_NOTIFY 0
#define DEFAULT_BIG_AVATARS 0
#define DEFAULT_DISCONNECT_CHAT 0
-#define DEFAULT_PARSE_MESSAGES 0
#define DEFAULT_MAP_STATUSES 0
#define DEFAULT_LOAD_MOBILE 0
-#define DEFAULT_ENABLE_GROUPCHATS 0
#define DEFAULT_EVENT_NOTIFICATIONS_ENABLE 1
#define DEFAULT_EVENT_FEEDS_ENABLE 1
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h index 74233f54f2..1cdcf8143b 100644 --- a/protocols/FacebookRM/src/db.h +++ b/protocols/FacebookRM/src/db.h @@ -52,17 +52,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_KEY_DEF_GROUP "DefaultGroup"
#define FACEBOOK_KEY_FORCE_HTTPS "ForceHTTPS"
#define FACEBOOK_KEY_FORCE_HTTPS_CHANNEL "ForceHTTPSChannel"
-#define FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE "CloseChatEnable"
#define FACEBOOK_KEY_SET_MIRANDA_STATUS "SetMirandaStatus"
#define FACEBOOK_KEY_LOGGING_ENABLE "LoggingEnable"
#define FACEBOOK_KEY_SYSTRAY_NOTIFY "UseSystrayNotify"
#define FACEBOOK_KEY_DISABLE_STATUS_NOTIFY "DisableStatusNotify"
-#define FACEBOOK_KEY_PARSE_MESSAGES "ParseUnreadMessages"
#define FACEBOOK_KEY_BIG_AVATARS "UseBigAvatars"
#define FACEBOOK_KEY_DISCONNECT_CHAT "DisconnectChatEnable"
#define FACEBOOK_KEY_MAP_STATUSES "MapStatuses"
#define FACEBOOK_KEY_LOAD_MOBILE "LoadMobile"
-#define FACEBOOK_KEY_ENABLE_GROUPCHATS "GroupchatsEnable"
#define FACEBOOK_KEY_POLL_RATE "PollRate" // [HIDDEN]
#define FACEBOOK_KEY_TIMEOUTS_LIMIT "TimeoutsLimit" // [HIDDEN]
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 935005ab2c..b9c6d6ac6a 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -300,12 +300,9 @@ INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam, LoadDBCheckState(proto, hwnd, IDC_SECURE, FACEBOOK_KEY_FORCE_HTTPS, DEFAULT_FORCE_HTTPS);
LoadDBCheckState(proto, hwnd, IDC_SECURE_CHANNEL, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL);
LoadDBCheckState(proto, hwnd, IDC_DISCONNECT_CHAT, FACEBOOK_KEY_DISCONNECT_CHAT, DEFAULT_DISCONNECT_CHAT);
- LoadDBCheckState(proto, hwnd, IDC_PARSE_UNREAD, FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES);
- LoadDBCheckState(proto, hwnd, IDC_CLOSE_WINDOWS, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE);
LoadDBCheckState(proto, hwnd, IDC_SET_STATUS, FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS);
LoadDBCheckState(proto, hwnd, IDC_LOGGING, FACEBOOK_KEY_LOGGING_ENABLE, DEFAULT_LOGGING_ENABLE);
LoadDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES, DEFAULT_MAP_STATUSES);
- LoadDBCheckState(proto, hwnd, IDC_GROUPCHATS, FACEBOOK_KEY_ENABLE_GROUPCHATS, DEFAULT_ENABLE_GROUPCHATS);
EnableWindow(GetDlgItem(hwnd, IDC_SECURE_CHANNEL), IsDlgButtonChecked(hwnd, IDC_SECURE));
@@ -329,13 +326,10 @@ INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam, if ( reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY )
{
StoreDBCheckState(proto, hwnd, IDC_SECURE, FACEBOOK_KEY_FORCE_HTTPS);
- StoreDBCheckState(proto, hwnd, IDC_CLOSE_WINDOWS, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE);
StoreDBCheckState(proto, hwnd, IDC_LOGGING, FACEBOOK_KEY_LOGGING_ENABLE);
StoreDBCheckState(proto, hwnd, IDC_SECURE_CHANNEL, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL);
StoreDBCheckState(proto, hwnd, IDC_DISCONNECT_CHAT, FACEBOOK_KEY_DISCONNECT_CHAT);
- StoreDBCheckState(proto, hwnd, IDC_PARSE_UNREAD, FACEBOOK_KEY_PARSE_MESSAGES);
StoreDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES);
- StoreDBCheckState(proto, hwnd, IDC_GROUPCHATS, FACEBOOK_KEY_ENABLE_GROUPCHATS);
BOOL setStatus = IsDlgButtonChecked(hwnd, IDC_SET_STATUS);
BOOL setStatusOld = DBGetContactSettingByte(NULL, proto->m_szModuleName, FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS);
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index e79c6966cd..2c03c36a7d 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -391,40 +391,6 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess }
}
}
- else if ( type.Value( ) == "group_msg" ) // chat message
- {
- if (!DBGetContactSettingByte(NULL,proto->m_szModuleName,FACEBOOK_KEY_ENABLE_GROUPCHATS, DEFAULT_ENABLE_GROUPCHATS))
- continue;
-
- const String& from_name = objMember["from_name"];
-
- const Number& to = objMember["to"];
- char group_id[32];
- lltoa( to.Value(), group_id, 10 );
-
- const Number& from = objMember["from"];
- char was_id[32];
- lltoa( from.Value(), was_id, 10 );
-
- const Object& messageContent = objMember["msg"];
- const String& text = messageContent["text"];
-
- std::string msg = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( )) );
-
- std::string name = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( from_name.Value( )) );
-
- // Add contact into chat, if isn't there already
- if (!proto->IsChatContact(group_id, was_id))
- proto->AddChatContact(group_id, was_id, name.c_str());
-
- const Number& time_sent = messageContent["time"];
- DWORD timestamp = utils::time::fix_timestamp( time_sent.Value());
-
- // Add message into chat
- proto->UpdateChat(group_id, was_id, name.c_str(), msg.c_str(), timestamp);
- }
else if ( type.Value( ) == "thread_msg" ) // multiuser message
{
const String& from_name = objMember["from_name"];
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 9e962cb100..fb86195c58 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -159,7 +159,7 @@ void FacebookProto::SendTypingWorker(void *p) data += "&to=" + std::string(dbv.pszVal);
data += "&fb_dtsg=" + facy.dtsg_;
data += "&lsd=&phstamp=0&__user=" + facy.self_.user_id;
-
+
http::response resp = facy.flap( FACEBOOK_REQUEST_TYPING_SEND, &data );
DBFreeVariant(&dbv);
@@ -178,8 +178,5 @@ void FacebookProto::MessagingWorker(void *p) if (data->type == FACEBOOK_RECV_MESSAGE)
facy.chat_mark_read( data->user_id );
-// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ))
-// facy.close_chat( data->user_id );
-
delete data;
}
diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h index 887119bd4b..dae487ee80 100644 --- a/protocols/FacebookRM/src/resource.h +++ b/protocols/FacebookRM/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by facebook.rc
+// Used by Z:\Myranda\trunk\protocols\FacebookRM\res\facebook.rc
//
#define IDI_FACEBOOK 101
#define IDI_MIND 102
@@ -23,12 +23,9 @@ #define IDC_SECURE_CHANNEL 1026
#define IDC_LOGGING 1027
#define IDC_DISCONNECT_CHAT 1028
-#define IDC_PARSE_UNREAD 1029
#define IDC_BIGGER_AVATARS 1030
-#define IDC_CLOSE_WINDOWS 1031
#define IDC_MAP_STATUSES 1032
#define IDC_LOAD_MOBILE 1033
-#define IDC_GROUPCHATS 1034
#define IDC_NOTIFICATIONS_ENABLE 1041
#define IDC_FEEDS_ENABLE 1042
#define IDC_OTHER_ENABLE 1043
|