diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-07-05 17:58:52 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-07-05 17:58:52 +0000 |
commit | 3549466bfab1c6fdb20d8eb55fe0124f2c6704a7 (patch) | |
tree | abeae6ada5faf22abf3f146bbc763fd2291289e6 /protocols/FacebookRM/src | |
parent | b17412619a1706782330e116c6c9e5dd00e39dde (diff) |
Facebook: Rework popup behavior and options page
Now items in status menu/services are much more useful, as you can disable automatic loading of newsfeeds/notifications/on this day, but you can trigger it manually via status menu/services menu
git-svn-id: http://svn.miranda-ng.org/main/trunk@17063 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/connection.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/constants.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/db.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 13 | ||||
-rw-r--r-- | protocols/FacebookRM/src/events.cpp | 18 | ||||
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 8 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 45 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 19 | ||||
-rw-r--r-- | protocols/FacebookRM/src/resource.h | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 18 |
10 files changed, 55 insertions, 76 deletions
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp index 6825732bfd..3845e50406 100644 --- a/protocols/FacebookRM/src/connection.cpp +++ b/protocols/FacebookRM/src/connection.cpp @@ -121,7 +121,8 @@ void FacebookProto::ChangeStatus(void*) ForkThread(&FacebookProto::ProcessUnreadMessages, NULL); // Get notifications - ForkThread(&FacebookProto::ProcessNotifications, NULL); + if (getByte(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE)) + ForkThread(&FacebookProto::ProcessNotifications, NULL); // Load pages for post status dialog ForkThread(&FacebookProto::ProcessPages, NULL); diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index 4516a26197..4816dffa74 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -96,8 +96,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEFAULT_EVENT_NOTIFICATIONS_ENABLE 1
#define DEFAULT_EVENT_FEEDS_ENABLE 0
-#define DEFAULT_EVENT_OTHER_ENABLE 1
-#define DEFAULT_EVENT_CLIENT_ENABLE 1
#define DEFAULT_EVENT_FRIENDSHIP_ENABLE 1
#define DEFAULT_EVENT_TICKER_ENABLE 0
#define DEFAULT_EVENT_ON_THIS_DAY_ENABLE 0
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h index f6c0d603bb..b9255cb467 100644 --- a/protocols/FacebookRM/src/db.h +++ b/protocols/FacebookRM/src/db.h @@ -71,8 +71,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Account DB keys - notifications
#define FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE "EventNotificationsEnable"
#define FACEBOOK_KEY_EVENT_FEEDS_ENABLE "EventFeedsEnable"
-#define FACEBOOK_KEY_EVENT_OTHER_ENABLE "EventOtherEnable"
-#define FACEBOOK_KEY_EVENT_CLIENT_ENABLE "EventClientEnable"
#define FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE "EventFriendshipEnable"
#define FACEBOOK_KEY_EVENT_TICKER_ENABLE "EventTickerEnable"
#define FACEBOOK_KEY_EVENT_ON_THIS_DAY_ENABLE "EventOnThisDayEnable"
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 60ad764628..d12af3fd03 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -511,8 +511,6 @@ INT_PTR CALLBACK FBOptionsEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPA LoadDBCheckState(proto, hwnd, IDC_NOTIFICATIONS_ENABLE, FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE); LoadDBCheckState(proto, hwnd, IDC_FEEDS_ENABLE, FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE); - LoadDBCheckState(proto, hwnd, IDC_CLIENT_ENABLE, FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE); - LoadDBCheckState(proto, hwnd, IDC_OTHER_ENABLE, FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE); LoadDBCheckState(proto, hwnd, IDC_FRIENDSHIP_ENABLE, FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE); LoadDBCheckState(proto, hwnd, IDC_TICKER_ENABLE, FACEBOOK_KEY_EVENT_TICKER_ENABLE, DEFAULT_EVENT_TICKER_ENABLE); LoadDBCheckState(proto, hwnd, IDC_ON_THIS_DAY_ENABLE, FACEBOOK_KEY_EVENT_ON_THIS_DAY_ENABLE, DEFAULT_EVENT_ON_THIS_DAY_ENABLE); @@ -523,15 +521,6 @@ INT_PTR CALLBACK FBOptionsEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPA case WM_COMMAND: switch (LOWORD(wparam)) { - case IDC_PREVIEW: - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample event"), NULL, FACEBOOK_EVENT_CLIENT); - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample request"), NULL, FACEBOOK_EVENT_OTHER); - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample newsfeed"), NULL, FACEBOOK_EVENT_NEWSFEED); - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample notification"), NULL, FACEBOOK_EVENT_NOTIFICATION); - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample friendship"), NULL, FACEBOOK_EVENT_FRIENDSHIP); - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample ticker"), NULL, FACEBOOK_EVENT_TICKER); - proto->NotifyEvent(proto->m_tszUserName, TranslateT("Sample on this day"), NULL, FACEBOOK_EVENT_ON_THIS_DAY); - break; case IDC_FEED_TYPE: case IDC_URL_SERVER: if (HIWORD(wparam) == CBN_SELCHANGE) @@ -554,9 +543,7 @@ INT_PTR CALLBACK FBOptionsEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPA StoreDBCheckState(proto, hwnd, IDC_NOTIFICATIONS_ENABLE, FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE); StoreDBCheckState(proto, hwnd, IDC_FEEDS_ENABLE, FACEBOOK_KEY_EVENT_FEEDS_ENABLE); - StoreDBCheckState(proto, hwnd, IDC_OTHER_ENABLE, FACEBOOK_KEY_EVENT_OTHER_ENABLE); StoreDBCheckState(proto, hwnd, IDC_FRIENDSHIP_ENABLE, FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE); - StoreDBCheckState(proto, hwnd, IDC_CLIENT_ENABLE, FACEBOOK_KEY_EVENT_CLIENT_ENABLE); StoreDBCheckState(proto, hwnd, IDC_TICKER_ENABLE, FACEBOOK_KEY_EVENT_TICKER_ENABLE); StoreDBCheckState(proto, hwnd, IDC_ON_THIS_DAY_ENABLE, FACEBOOK_KEY_EVENT_ON_THIS_DAY_ENABLE); StoreDBCheckState(proto, hwnd, IDC_FILTER_ADS, FACEBOOK_KEY_FILTER_ADS); diff --git a/protocols/FacebookRM/src/events.cpp b/protocols/FacebookRM/src/events.cpp index f52385f30b..ce35ee55a0 100644 --- a/protocols/FacebookRM/src/events.cpp +++ b/protocols/FacebookRM/src/events.cpp @@ -32,57 +32,41 @@ HWND FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, MCONTACT contact, DWO switch (flags) { case FACEBOOK_EVENT_CLIENT: - if (!getByte(FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE)) - return NULL; mir_snprintf(name, "%s_%s", m_szModuleName, "Client"); flags |= NIIF_WARNING; break; case FACEBOOK_EVENT_NEWSFEED: - if (!getByte(FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE)) - return NULL; mir_snprintf(name, "%s_%s", m_szModuleName, "Newsfeed"); - SkinPlaySound("NewsFeed"); flags |= NIIF_INFO; break; case FACEBOOK_EVENT_NOTIFICATION: - if (!getByte(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE)) - return NULL; mir_snprintf(name, "%s_%s", m_szModuleName, "Notification"); SkinPlaySound("Notification"); flags |= NIIF_INFO; break; case FACEBOOK_EVENT_OTHER: - if (!getByte(FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE)) - return NULL; mir_snprintf(name, "%s_%s", m_szModuleName, "Other"); SkinPlaySound("OtherEvent"); flags |= NIIF_INFO; break; case FACEBOOK_EVENT_FRIENDSHIP: - if (!getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) - return NULL; mir_snprintf(name, "%s_%s", m_szModuleName, "Friendship"); SkinPlaySound("Friendship"); flags |= NIIF_INFO; break; case FACEBOOK_EVENT_TICKER: - if (!getByte(FACEBOOK_KEY_EVENT_TICKER_ENABLE, DEFAULT_EVENT_TICKER_ENABLE)) - return NULL; mir_snprintf(name, "%s_%s", m_szModuleName, "Ticker"); SkinPlaySound("Ticker"); flags |= NIIF_INFO; break; case FACEBOOK_EVENT_ON_THIS_DAY: - if (!getByte(FACEBOOK_KEY_EVENT_ON_THIS_DAY_ENABLE, DEFAULT_EVENT_ON_THIS_DAY_ENABLE)) - return NULL; - mir_snprintf(name, "%s_%s", m_szModuleName, "OnThisDay"); - SkinPlaySound("OnThisDay"); + mir_snprintf(name, "%s_%s", m_szModuleName, "OnThisDay"); flags |= NIIF_INFO; break; } diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index c0c3e02845..43d1fe34b1 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -586,7 +586,10 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo std::string url = href_.as_string(); std::string alert_id = alertId_.as_string(); - proto->NotifyEvent(proto->m_tszUserName, ptrT(mir_utf8decodeT(text.c_str())), NULL, FACEBOOK_EVENT_FRIENDSHIP, &url, alert_id.empty() ? NULL : &alert_id); + // Notify it, if user wants to be notified + if (proto->getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) { + proto->NotifyEvent(proto->m_tszUserName, ptrT(mir_utf8decodeT(text.c_str())), NULL, FACEBOOK_EVENT_FRIENDSHIP, &url, alert_id.empty() ? NULL : &alert_id); + } } } else if (t == "jewel_requests_add") { @@ -867,6 +870,9 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo } } } else if (t == "ticker_update:home") { + if (!proto->getByte(FACEBOOK_KEY_EVENT_TICKER_ENABLE, DEFAULT_EVENT_TICKER_ENABLE)) + continue; + const JSONNode &actor_ = (*it)["actor"]; const JSONNode &story_ = (*it)["story_xhp"]; diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 2a4cf0597a..ee12864581 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -129,11 +129,14 @@ void FacebookProto::ProcessFriendList(void*) if (getDword(hContact, FACEBOOK_KEY_DELETED, 0)) { delSetting(hContact, FACEBOOK_KEY_DELETED); - std::string url = FACEBOOK_URL_PROFILE + fbu->user_id; - std::string contactname = getContactName(this, hContact, !fbu->real_name.empty() ? fbu->real_name.c_str() : fbu->user_id.c_str()); - - ptrT szTitle(mir_utf8decodeT(contactname.c_str())); - NotifyEvent(szTitle, TranslateT("Contact is back on server-list."), hContact, FACEBOOK_EVENT_FRIENDSHIP, &url); + // Notify it, if user wants to be notified + if (getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) { + std::string url = FACEBOOK_URL_PROFILE + fbu->user_id; + std::string contactname = getContactName(this, hContact, !fbu->real_name.empty() ? fbu->real_name.c_str() : fbu->user_id.c_str()); + + ptrT szTitle(mir_utf8decodeT(contactname.c_str())); + NotifyEvent(szTitle, TranslateT("Contact is back on server-list."), hContact, FACEBOOK_EVENT_FRIENDSHIP, &url); + } } // Check avatar change @@ -145,16 +148,19 @@ void FacebookProto::ProcessFriendList(void*) else { // Contact was removed from "server-list", notify it - // Wasnt we already been notified about this contact? And was this real friend? + // Wasn't we already been notified about this contact? And was this real friend? if (!getDword(hContact, FACEBOOK_KEY_DELETED, 0) && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) == CONTACT_FRIEND) { setDword(hContact, FACEBOOK_KEY_DELETED, ::time(NULL)); setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, CONTACT_NONE); - std::string url = FACEBOOK_URL_PROFILE + std::string(id); - std::string contactname = getContactName(this, hContact, id); - - ptrT szTitle(mir_utf8decodeT(contactname.c_str())); - NotifyEvent(szTitle, TranslateT("Contact is no longer on server-list."), hContact, FACEBOOK_EVENT_FRIENDSHIP, &url); + // Notify it, if user wants to be notified + if (getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) { + std::string url = FACEBOOK_URL_PROFILE + std::string(id); + std::string contactname = getContactName(this, hContact, id); + + ptrT szTitle(mir_utf8decodeT(contactname.c_str())); + NotifyEvent(szTitle, TranslateT("Contact is no longer on server-list."), hContact, FACEBOOK_EVENT_FRIENDSHIP, &url); + } } } } @@ -636,7 +642,7 @@ void parseFeeds(const std::string &text, std::vector<facebook_newsfeed *> &news, void FacebookProto::ProcessOnThisDay(void*) { - if (isOffline() || !getBool(FACEBOOK_KEY_EVENT_ON_THIS_DAY_ENABLE, DEFAULT_EVENT_ON_THIS_DAY_ENABLE)) + if (isOffline()) return; facy.handle_entry(__FUNCTION__); @@ -663,10 +669,11 @@ void FacebookProto::ProcessOnThisDay(void*) std::vector<facebook_newsfeed *> news; DWORD new_time = 0; - parseFeeds(html, news, new_time, true); - debugLogA(" Last feeds update (new): %d", new_time); + if (!news.empty()) { + SkinPlaySound("OnThisDay"); + } for (std::vector<facebook_newsfeed*>::size_type i = 0; i < news.size(); i++) { @@ -902,7 +909,8 @@ void FacebookProto::ProcessMessages(void* data) ReceiveMessages(messages); - ShowNotifications(); + if (getBool(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE)) + ShowNotifications(); debugLogA("*** Messages processed"); @@ -918,9 +926,6 @@ void FacebookProto::ProcessMessages(void* data) void FacebookProto::ShowNotifications() { ScopedLock s(facy.notifications_lock_); - if (!getBool(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE)) - return; - // Show popups for unseen notifications and/or write them to chatroom for (std::map<std::string, facebook_notification*>::iterator it = facy.notifications.begin(); it != facy.notifications.end(); ++it) { facebook_notification *notification = it->second; @@ -1091,6 +1096,10 @@ void FacebookProto::ProcessFeeds(void*) parseFeeds(resp.data, news, new_time, filterAds); + if (!news.empty()) { + SkinPlaySound("NewsFeed"); + } + for (std::vector<facebook_newsfeed*>::size_type i = 0; i < news.size(); i++) { // Truncate text of newsfeed when it's too long diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 4194e2a013..74e1a80d81 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -627,8 +627,7 @@ int FacebookProto::OnPreCreateEvent(WPARAM, LPARAM lParam) INT_PTR FacebookProto::CheckNewsfeeds(WPARAM, LPARAM) { if (!isOffline()) { - facy.client_notify(TranslateT("Loading newsfeeds...")); - facy.last_feeds_update_ = 0; + facy.client_notify(TranslateT("Loading wall posts...")); ForkThread(&FacebookProto::ProcessFeeds, NULL); } return 0; @@ -637,7 +636,7 @@ INT_PTR FacebookProto::CheckNewsfeeds(WPARAM, LPARAM) INT_PTR FacebookProto::CheckFriendRequests(WPARAM, LPARAM) { if (!isOffline()) { - facy.client_notify(TranslateT("Checking friend requests...")); + facy.client_notify(TranslateT("Loading friendship requests...")); ForkThread(&FacebookProto::ProcessFriendRequests, NULL); } return 0; @@ -646,7 +645,7 @@ INT_PTR FacebookProto::CheckFriendRequests(WPARAM, LPARAM) INT_PTR FacebookProto::CheckNotifications(WPARAM, LPARAM) { if (!isOffline()) { - facy.client_notify(TranslateT("Checking notifications...")); + facy.client_notify(TranslateT("Loading notifications...")); ForkThread(&FacebookProto::ProcessNotifications, NULL); } return 0; @@ -655,7 +654,7 @@ INT_PTR FacebookProto::CheckNotifications(WPARAM, LPARAM) INT_PTR FacebookProto::CheckOnThisDay(WPARAM, LPARAM) { if (!isOffline()) { - facy.client_notify(TranslateT("Checking what happened on this day...")); + facy.client_notify(TranslateT("Loading what happened on this day...")); ForkThread(&FacebookProto::ProcessOnThisDay, NULL); } return 0; @@ -994,7 +993,7 @@ void FacebookProto::InitPopups() char name[256]; // Client - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Client notifications")); + mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Client errors")); mir_snprintf(name, "%s_%s", m_szModuleName, "Client"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1005,7 +1004,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Newsfeeds - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("News feeds")); + mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Wall posts")); mir_snprintf(name, "%s_%s", m_szModuleName, "Newsfeed"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1049,7 +1048,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Ticker - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Ticker feeds")); + mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Real-time friends activity")); mir_snprintf(name, "%s_%s", m_szModuleName, "Ticker"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1060,7 +1059,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // On this day - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("On this day posts")); + mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("\"On this day\" posts")); mir_snprintf(name, "%s_%s", m_szModuleName, "OnThisDay"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1110,7 +1109,7 @@ void FacebookProto::InitSounds() SkinAddNewSoundExT("OtherEvent", m_tszUserName, LPGENT("Other event")); SkinAddNewSoundExT("Friendship", m_tszUserName, LPGENT("Friendship event")); SkinAddNewSoundExT("Ticker", m_tszUserName, LPGENT("Ticker event")); - SkinAddNewSoundExT("OnThisDay", m_tszUserName, LPGENT("On this day event")); + SkinAddNewSoundExT("OnThisDay", m_tszUserName, LPGENT("\"On this day\" event")); } /** diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h index e3632de574..3752e107e2 100644 --- a/protocols/FacebookRM/src/resource.h +++ b/protocols/FacebookRM/src/resource.h @@ -43,8 +43,6 @@ #define IDC_HIDE_CHATS 1040 #define IDC_NOTIFICATIONS_ENABLE 1041 #define IDC_FEEDS_ENABLE 1042 -#define IDC_OTHER_ENABLE 1043 -#define IDC_CLIENT_ENABLE 1044 #define IDC_FILTER_ADS 1045 #define IDC_LOGIN_SYNC 1046 #define IDC_ENABLE_CHATS 1047 @@ -52,7 +50,6 @@ #define IDC_TICKER_ENABLE 1049 #define IDC_ON_THIS_DAY_ENABLE 1050 #define IDC_SYSTRAY_NOTIFY 1098 -#define IDC_PREVIEW 1099 #define IDC_NOTIFICATIONS_CHATROOM 1100 #define IDC_SET_STATUS 1126 #define IDC_FEED_TYPE 1201 diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index ac44acd1b8..d0304b0a47 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -254,27 +254,27 @@ void FacebookProto::InitMenu() mi.pszService = "/CheckFriendRequests";
CreateProtoService(mi.pszService, &FacebookProto::CheckFriendRequests);
- mi.name.a = LPGEN("Check Friends Requests");
+ mi.name.a = LPGEN("Check friendship requests");
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
Menu_AddProtoMenuItem(&mi, m_szModuleName);
mi.pszService = "/CheckNewsfeeds";
CreateProtoService(mi.pszService, &FacebookProto::CheckNewsfeeds);
- mi.name.a = LPGEN("Check Newsfeeds");
+ mi.name.a = LPGEN("Check newsfeeds");
+ mi.hIcolibItem = GetIconHandle("newsfeed");
+ Menu_AddProtoMenuItem(&mi, m_szModuleName);
+
+ mi.pszService = "/CheckOnThisDay";
+ CreateProtoService(mi.pszService, &FacebookProto::CheckOnThisDay);
+ mi.name.a = LPGEN("Check \"On this day\" posts");
mi.hIcolibItem = GetIconHandle("newsfeed");
Menu_AddProtoMenuItem(&mi, m_szModuleName);
mi.pszService = "/CheckNotifications";
CreateProtoService(mi.pszService, &FacebookProto::CheckNotifications);
- mi.name.a = LPGEN("Check Notifications");
+ mi.name.a = LPGEN("Check notifications");
mi.hIcolibItem = GetIconHandle("notification");
Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- mi.pszService = "/CheckOnThisDay";
- CreateProtoService(mi.pszService, &FacebookProto::CheckOnThisDay);
- mi.name.a = LPGEN("Check On This Day");
- mi.hIcolibItem = GetIconHandle("mind");
- Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
|