diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-04-21 14:50:48 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-04-21 14:50:48 +0000 |
commit | 3fd876c2f5fb89007eee0a05c604954e606a589c (patch) | |
tree | 9ef288c800543b19a549f2c1be7ad41cfb7c4333 /protocols | |
parent | 0b73250a247cee60ee3f1098f584ae63148e0cee (diff) |
Facebook: Add status menu item "Visit Notifications" and icons for other items
git-svn-id: http://svn.miranda-ng.org/main/trunk@9014 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/constants.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 1 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 14 |
4 files changed, 18 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index d3b6a3b2d7..0ab83a7427 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_URL_HOMEPAGE "http://www.facebook.com"
#define FACEBOOK_URL_REQUESTS "http://www.facebook.com/n/?reqs.php"
#define FACEBOOK_URL_MESSAGES "http://www.facebook.com/n/?inbox"
-#define FACEBOOK_URL_NOTIFICATIONS "http://www.facebook.com/n/?notifications.php"
+#define FACEBOOK_URL_NOTIFICATIONS "http://www.facebook.com/n/?notifications"
#define FACEBOOK_URL_PROFILE "http://www.facebook.com/profile.php?id="
#define FACEBOOK_URL_GROUP "http://www.facebook.com/n/?home.php&sk=group_"
#define FACEBOOK_URL_PICTURE "http://graph.facebook.com/%s/picture"
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 2b66d99e5a..7ceab6fc52 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -607,6 +607,12 @@ INT_PTR FacebookProto::VisitConversation(WPARAM wParam, LPARAM lParam) return 0;
}
+INT_PTR FacebookProto::VisitNotifications(WPARAM wParam, LPARAM lParam)
+{
+ OpenUrl(FACEBOOK_URL_NOTIFICATIONS);
+ return 0;
+}
+
INT_PTR FacebookProto::Poke(WPARAM wParam,LPARAM lParam)
{
if (wParam == NULL || isOffline())
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index a6d783f57d..ad15eaa9a9 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -117,6 +117,7 @@ public: INT_PTR __cdecl VisitProfile(WPARAM, LPARAM);
INT_PTR __cdecl VisitFriendship(WPARAM, LPARAM);
INT_PTR __cdecl VisitConversation(WPARAM, LPARAM);
+ INT_PTR __cdecl VisitNotifications(WPARAM, LPARAM);
INT_PTR __cdecl Poke(WPARAM, LPARAM);
INT_PTR __cdecl CancelFriendship(WPARAM, LPARAM);
INT_PTR __cdecl RequestFriendship(WPARAM, LPARAM);
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 03a841abb5..e659319911 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -227,11 +227,17 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) // TODO RM: remember and properly free in destructor?
/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);
+ CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
+ strcpy(tDest, "/VisitNotifications");
+ mi.pszName = LPGEN("Visit notifications");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ Menu_AddProtoMenuItem(&mi);
+
// Services...
mi.pszName = LPGEN("Services...");
strcpy(tDest, "/Services");
mi.flags = CMIF_CHILDPOPUP | (this->isOnline() ? 0 : CMIF_GRAYED);
- mi.icolibItem = NULL;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HELP);
m_hMenuServicesRoot = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/RefreshBuddyList",&FacebookProto::RefreshBuddyList);
@@ -239,7 +245,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Refresh Buddy List");
mi.pszPopupName = LPGEN("Services");
- mi.icolibItem = NULL;
+ mi.icolibItem = GetIconHandle("friendship");
mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
@@ -247,7 +253,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) strcpy(tDest,"/CheckFriendRequests");
mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Friends Requests");
- mi.icolibItem = NULL;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
@@ -256,7 +262,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Newsfeeds");
mi.pszPopupName = LPGEN("Services");
- mi.icolibItem = NULL;
+ mi.icolibItem = GetIconHandle("newsfeed");
mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
|