summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-01-31 12:35:17 +0000
committerRobert Pösel <robyer@seznam.cz>2014-01-31 12:35:17 +0000
commitf58e9bb8b54f11383c218f95ca62d1cb0abae408 (patch)
tree4b84febf42139d91b44ceda8752b70087e3b90f9 /protocols
parentab48390f184da37486fe37237f2c11e51fe7859d (diff)
Facebook: Add checkboxes for keep unread and inbox only into options
git-svn-id: http://svn.miranda-ng.org/main/trunk@7971 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/res/facebook.rc23
-rw-r--r--protocols/FacebookRM/src/constants.h2
-rw-r--r--protocols/FacebookRM/src/db.h4
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp4
-rw-r--r--protocols/FacebookRM/src/resource.h2
5 files changed, 24 insertions, 11 deletions
diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc
index bf76371853..c0b9467311 100644
--- a/protocols/FacebookRM/res/facebook.rc
+++ b/protocols/FacebookRM/res/facebook.rc
@@ -136,12 +136,12 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,121,272,8
END
-IDD_OPTIONS_ADVANCED DIALOGEX 0, 0, 305, 155
+IDD_OPTIONS_ADVANCED DIALOGEX 0, 0, 305, 203
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,137
+ GROUPBOX "Advanced Settings",IDC_STATIC,7,7,291,111
CONTROL "Force secure (HTTPS) connection",IDC_SECURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,22,267,10
CONTROL "Post Miranda statuses to Wall",IDC_SET_STATUS,"Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,17,46,267,10
CONTROL "Use secure connection also for channel requests",IDC_SECURE_CHANNEL,
@@ -150,14 +150,19 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,58,267,10
CONTROL "Map non-standard statuses to Invisible (instead of Online)",IDC_MAP_STATUSES,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,71,267,10
- CONTROL "Enable support for Custom smileys (EXPERIMENTAL + BUGGY!)",IDC_CUSTOM_SMILEYS,
+ CONTROL "Allow posting statuses to my pages (may slow down login)",IDC_LOAD_PAGES,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,84,267,10
+ LTEXT "Use this server for opening links:",IDC_STATIC,17,100,135,8
+ COMBOBOX IDC_URL_SERVER,156,97,96,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Enable support for Custom smileys (EXPERIMENTAL + BUGGY!)",IDC_CUSTOM_SMILEYS,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,136,267,10
CONTROL "Use local time for received messages",IDC_USE_LOCAL_TIME,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,98,267,10
- COMBOBOX IDC_URL_SERVER,156,124,96,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Use this server for opening links:",IDC_STATIC,17,127,135,8
- CONTROL "Allow posting statuses to my pages (may slow down login)",IDC_LOAD_PAGES,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,111,267,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,150,267,10
+ GROUPBOX "Message sessions",IDC_STATIC,7,121,291,72
+ CONTROL "Keep messages as unread on server (don't send ""seen"" info)",IDC_KEEP_UNREAD,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,164,267,10
+ CONTROL "Receive messages from ""inbox"" folder only",IDC_INBOX_ONLY,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,178,267,10
END
@@ -226,7 +231,7 @@ BEGIN
VERTGUIDE, 156
VERTGUIDE, 284
TOPMARGIN, 7
- BOTTOMMARGIN, 148
+ BOTTOMMARGIN, 196
END
END
#endif // APSTUDIO_INVOKED
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h
index ca9f6e48c1..b4af81412a 100644
--- a/protocols/FacebookRM/src/constants.h
+++ b/protocols/FacebookRM/src/constants.h
@@ -72,6 +72,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEFAULT_CUSTOM_SMILEYS 0
#define DEFAULT_LOCAL_TIME 0
#define DEFAULT_LOAD_PAGES 0
+#define DEFAULT_KEEP_UNREAD 0
+#define DEFAULT_INBOX_ONLY 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 d1094388ec..02947cd314 100644
--- a/protocols/FacebookRM/src/db.h
+++ b/protocols/FacebookRM/src/db.h
@@ -52,14 +52,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FACEBOOK_KEY_PLACE "Place"
#define FACEBOOK_KEY_LAST_WALL "LastWall"
#define FACEBOOK_KEY_LOAD_PAGES "LoadPages"
+#define FACEBOOK_KEY_KEEP_UNREAD "KeepUnread" // (byte) 1 = don't mark messages as read on server (works globally or per contact)
+#define FACEBOOK_KEY_INBOX_ONLY "InboxOnly"
#define FACEBOOK_KEY_POLL_RATE "PollRate" // [HIDDEN]
#define FACEBOOK_KEY_TIMEOUTS_LIMIT "TimeoutsLimit" // [HIDDEN]
#define FACEBOOK_KEY_DISABLE_LOGOUT "DisableLogout" // [HIDDEN]
#define FACEBOOK_KEY_LOCALE "Locale" // [HIDDEN] - en_US, cs_CZ, etc.
#define FACEBOOK_KEY_LOCAL_TIMESTAMP_UNREAD "UseLocalTimestampUnread" // [HIDDEN] - 1 = use local timestamp for offline messages
-#define FACEBOOK_KEY_KEEP_UNREAD "KeepUnread" // [HIDDEN] - 1 = don't mark messages as read on server (works globally or per contact)
-#define FACEBOOK_KEY_INBOX_ONLY "InboxOnly" // [HIDDEN] - 1 = load messages only from "inbox" folder
#define FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE "EventNotificationsEnable"
#define FACEBOOK_KEY_EVENT_FEEDS_ENABLE "EventFeedsEnable"
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp
index ec743ad5bc..49bb562c39 100644
--- a/protocols/FacebookRM/src/dialogs.cpp
+++ b/protocols/FacebookRM/src/dialogs.cpp
@@ -453,6 +453,8 @@ INT_PTR CALLBACK FBOptionsAdvancedProc(HWND hwnd, UINT message, WPARAM wparam, L
LoadDBCheckState(proto, hwnd, IDC_CUSTOM_SMILEYS, FACEBOOK_KEY_CUSTOM_SMILEYS, DEFAULT_CUSTOM_SMILEYS);
LoadDBCheckState(proto, hwnd, IDC_USE_LOCAL_TIME, FACEBOOK_KEY_LOCAL_TIMESTAMP, DEFAULT_LOCAL_TIME);
LoadDBCheckState(proto, hwnd, IDC_LOAD_PAGES, FACEBOOK_KEY_LOAD_PAGES, DEFAULT_LOAD_PAGES);
+ LoadDBCheckState(proto, hwnd, IDC_INBOX_ONLY, FACEBOOK_KEY_INBOX_ONLY, DEFAULT_INBOX_ONLY);
+ LoadDBCheckState(proto, hwnd, IDC_KEEP_UNREAD, FACEBOOK_KEY_KEEP_UNREAD, DEFAULT_KEEP_UNREAD);
EnableWindow(GetDlgItem(hwnd, IDC_SECURE_CHANNEL), IsDlgButtonChecked(hwnd, IDC_SECURE));
@@ -484,6 +486,8 @@ INT_PTR CALLBACK FBOptionsAdvancedProc(HWND hwnd, UINT message, WPARAM wparam, L
StoreDBCheckState(proto, hwnd, IDC_CUSTOM_SMILEYS, FACEBOOK_KEY_CUSTOM_SMILEYS);
StoreDBCheckState(proto, hwnd, IDC_USE_LOCAL_TIME, FACEBOOK_KEY_LOCAL_TIMESTAMP);
StoreDBCheckState(proto, hwnd, IDC_LOAD_PAGES, FACEBOOK_KEY_LOAD_PAGES);
+ StoreDBCheckState(proto, hwnd, IDC_INBOX_ONLY, FACEBOOK_KEY_INBOX_ONLY);
+ StoreDBCheckState(proto, hwnd, IDC_KEEP_UNREAD, FACEBOOK_KEY_KEEP_UNREAD);
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/resource.h b/protocols/FacebookRM/src/resource.h
index e13e3b76b6..ae65552642 100644
--- a/protocols/FacebookRM/src/resource.h
+++ b/protocols/FacebookRM/src/resource.h
@@ -29,6 +29,8 @@
#define IDC_CUSTOM_SMILEYS 1034
#define IDC_USE_LOCAL_TIME 1035
#define IDC_LOAD_PAGES 1036
+#define IDC_KEEP_UNREAD 1037
+#define IDC_INBOX_ONLY 1038
#define IDC_NOTIFICATIONS_ENABLE 1041
#define IDC_FEEDS_ENABLE 1042
#define IDC_OTHER_ENABLE 1043