diff options
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 30 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 12 |
3 files changed, 38 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 79d2f30893..4194e2a013 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -176,6 +176,11 @@ int FacebookProto::SetStatus(int new_status) { debugLogA("=== Beginning SetStatus process"); + if (new_status != ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_CONNECTING) { + debugLogA("=== Status is already connecting, no change"); + return 0; + } + // Routing statuses not supported by Facebook switch (new_status) { @@ -196,11 +201,6 @@ int FacebookProto::SetStatus(int new_status) break; } - if (new_status != ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_CONNECTING) { - debugLogA("=== Status is already connecting, no change"); - return 0; - } - if (m_iStatus == m_iDesiredStatus) { debugLogA("=== Statuses are same, no change"); return 0; @@ -638,7 +638,25 @@ INT_PTR FacebookProto::CheckFriendRequests(WPARAM, LPARAM) { if (!isOffline()) { facy.client_notify(TranslateT("Checking friend requests...")); - ProcessFriendRequests(NULL); + ForkThread(&FacebookProto::ProcessFriendRequests, NULL); + } + return 0; +} + +INT_PTR FacebookProto::CheckNotifications(WPARAM, LPARAM) +{ + if (!isOffline()) { + facy.client_notify(TranslateT("Checking notifications...")); + ForkThread(&FacebookProto::ProcessNotifications, NULL); + } + return 0; +} + +INT_PTR FacebookProto::CheckOnThisDay(WPARAM, LPARAM) +{ + if (!isOffline()) { + facy.client_notify(TranslateT("Checking what happened on this day...")); + ForkThread(&FacebookProto::ProcessOnThisDay, NULL); } return 0; } diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 06e0dae590..f243c00d24 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -125,6 +125,8 @@ public: INT_PTR __cdecl OnCancelFriendshipRequest(WPARAM, LPARAM); INT_PTR __cdecl CheckNewsfeeds(WPARAM, LPARAM); INT_PTR __cdecl CheckFriendRequests(WPARAM, LPARAM); + INT_PTR __cdecl CheckNotifications(WPARAM, LPARAM); + INT_PTR __cdecl CheckOnThisDay(WPARAM, LPARAM); INT_PTR __cdecl GetNotificationsCount(WPARAM, LPARAM); INT_PTR __cdecl OnJoinChat(WPARAM,LPARAM); diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 8eaf1858cd..ac44acd1b8 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -263,6 +263,18 @@ void FacebookProto::InitMenu() mi.name.a = LPGEN("Check Newsfeeds");
mi.hIcolibItem = GetIconHandle("newsfeed");
Menu_AddProtoMenuItem(&mi, m_szModuleName);
+
+ mi.pszService = "/CheckNotifications";
+ CreateProtoService(mi.pszService, &FacebookProto::CheckNotifications);
+ 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)
|