diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-06-14 15:18:12 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-06-14 15:18:12 +0000 |
commit | 0d6706f24c377d7f52a0584ee830fde4e789baae (patch) | |
tree | bae64f37a7636bcd8ae3d479edfc9a1a2f550c5c /protocols/FacebookRM | |
parent | 58d0f51be9792eeca8eadd796ef849039efaf866 (diff) |
Facebook: Use core auth icons.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4936 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/res/auth_ask.ico | bin | 1150 -> 0 bytes | |||
-rw-r--r-- | protocols/FacebookRM/res/auth_grant.ico | bin | 1150 -> 0 bytes | |||
-rw-r--r-- | protocols/FacebookRM/res/auth_revoke.ico | bin | 1150 -> 0 bytes | |||
-rw-r--r-- | protocols/FacebookRM/res/facebook.rc | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/resource.h | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 47 |
6 files changed, 15 insertions, 38 deletions
diff --git a/protocols/FacebookRM/res/auth_ask.ico b/protocols/FacebookRM/res/auth_ask.ico Binary files differdeleted file mode 100644 index 5bed45e9f8..0000000000 --- a/protocols/FacebookRM/res/auth_ask.ico +++ /dev/null diff --git a/protocols/FacebookRM/res/auth_grant.ico b/protocols/FacebookRM/res/auth_grant.ico Binary files differdeleted file mode 100644 index abe4554b84..0000000000 --- a/protocols/FacebookRM/res/auth_grant.ico +++ /dev/null diff --git a/protocols/FacebookRM/res/auth_revoke.ico b/protocols/FacebookRM/res/auth_revoke.ico Binary files differdeleted file mode 100644 index 43f17b0e7f..0000000000 --- a/protocols/FacebookRM/res/auth_revoke.ico +++ /dev/null diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc index c784d3564f..531fc4ac5a 100644 --- a/protocols/FacebookRM/res/facebook.rc +++ b/protocols/FacebookRM/res/facebook.rc @@ -53,9 +53,6 @@ END // remains consistent on all systems.
IDI_FACEBOOK ICON "facebook.ico"
IDI_MIND ICON "mind.ico"
-IDI_AUTH_GRANT ICON "auth_grant.ico"
-IDI_AUTH_ASK ICON "auth_ask.ico"
-IDI_AUTH_REVOKE ICON "auth_revoke.ico"
IDI_POKE ICON "poke.ico"
IDI_NOTIFICATION ICON "notification.ico"
IDI_NEWSFEED ICON "feeds.ico"
diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h index 46290bcfaf..b483a19aaf 100644 --- a/protocols/FacebookRM/src/resource.h +++ b/protocols/FacebookRM/src/resource.h @@ -4,9 +4,6 @@ //
#define IDI_FACEBOOK 101
#define IDI_MIND 102
-#define IDI_AUTH_GRANT 103
-#define IDI_AUTH_ASK 104
-#define IDI_AUTH_REVOKE 105
#define IDD_FACEBOOKACCOUNT 111
#define IDD_MIND 112
#define IDD_OPTIONS 113
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 1468400c18..4371c3d574 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -31,21 +31,13 @@ static IconItem icons[] = { LPGEN("Poke"), "poke", IDI_POKE },
{ LPGEN("Notification"), "notification", IDI_NOTIFICATION },
{ LPGEN("Newsfeed"), "newsfeed", IDI_NEWSFEED },
-
- { LPGEN("Cancel friendship"), "authRevoke", IDI_AUTH_REVOKE },
- { LPGEN("Cancel friendship request"), "authRevokeReq", IDI_AUTH_REVOKE },
- { LPGEN("Request friendship"), "authAsk", IDI_AUTH_ASK },
- { LPGEN("Approve friendship"), "authGrant", IDI_AUTH_GRANT },
-
- { LPGEN("Visit friendship details"), "friendship", IDI_FRIENDS },
- { LPGEN("Visit profile"), "homepage", 0 },
+ { LPGEN("Friendship details"), "friendship", IDI_FRIENDS },
};
// TODO: uninit
void InitIcons(void)
{
- Icon_Register(g_hInstance, "Protocols/Facebook", icons, SIZEOF(icons)-1, "Facebook");
- icons[SIZEOF(icons)-1].hIcolib = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ Icon_Register(g_hInstance, "Protocols/Facebook", icons, SIZEOF(icons), "Facebook");
}
HANDLE GetIconHandle(const char* name)
@@ -57,15 +49,6 @@ HANDLE GetIconHandle(const char* name) return 0;
}
-char *GetIconDescription(const char* name)
-{
- for(size_t i=0; i<SIZEOF(icons); i++)
- if(strcmp(icons[i].szName, name) == 0)
- return icons[i].szDescr;
-
- return "";
-}
-
// Contact List menu stuff
HGENMENU g_hContactMenuItems[CMITEMS_COUNT];
@@ -105,50 +88,50 @@ void InitContactMenus() CLISTMENUITEM mi = {sizeof(mi)};
mi.position=-2000006000;
- mi.icolibItem = GetIconHandle("homepage");
- mi.pszName = GetIconDescription("homepage");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ mi.pszName = LPGEN("Visit profile");
mi.pszService = "FacebookProto/VisitProfile";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::VisitProfile>);
g_hContactMenuItems[CMI_VISIT_PROFILE] = Menu_AddContactMenuItem(&mi);
mi.position=-2000006001;
mi.icolibItem = GetIconHandle("friendship");
- mi.pszName = GetIconDescription("friendship");
+ mi.pszName = LPGEN("Visit friendship details");
mi.pszService = "FacebookProto/VisitFriendship";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::VisitFriendship>);
g_hContactMenuItems[CMI_VISIT_FRIENDSHIP] = Menu_AddContactMenuItem(&mi);
mi.position=-2000006002;
mi.icolibItem = GetIconHandle("poke");
- mi.pszName = GetIconDescription("poke");
+ mi.pszName = LPGEN("Poke");
mi.pszService = "FacebookProto/Poke";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::Poke>);
g_hContactMenuItems[CMI_POKE] = Menu_AddContactMenuItem(&mi);
mi.position=-2000006010;
- mi.icolibItem = GetIconHandle("authRevoke");
- mi.pszName = GetIconDescription("authRevoke");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.pszName = LPGEN("Cancel friendship");
mi.pszService = "FacebookProto/CancelFriendship";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::CancelFriendship>);
g_hContactMenuItems[CMI_AUTH_REVOKE] = Menu_AddContactMenuItem(&mi);
mi.position=-2000006011;
- mi.icolibItem = GetIconHandle("authRevokeReq");
- mi.pszName = GetIconDescription("authRevokeReq");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.pszName = LPGEN("Cancel friendship request");
mi.pszService = "FacebookProto/CancelFriendshipRequest";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::OnCancelFriendshipRequest>);
g_hContactMenuItems[CMI_AUTH_CANCEL] = Menu_AddContactMenuItem(&mi);
mi.position=-2000006012;
- mi.icolibItem = GetIconHandle("authAsk");
- mi.pszName = GetIconDescription("authAsk");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.pszName = LPGEN("Request friendship");
mi.pszService = "FacebookProto/RequestFriendship";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::RequestFriendship>);
g_hContactMenuItems[CMI_AUTH_ASK] = Menu_AddContactMenuItem(&mi);
mi.position=-2000006013;
- mi.icolibItem = GetIconHandle("authGrant");
- mi.pszName = GetIconDescription("authGrant");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.pszName = LPGEN("Approve friendship");
mi.pszService = "FacebookProto/ApproveFriendship";
CreateServiceFunction(mi.pszService,GlobalService<&FacebookProto::ApproveFriendship>);
g_hContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
@@ -221,7 +204,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) strcpy(tDest,"/VisitProfile");
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Visit Profile");
- mi.icolibItem = GetIconHandle("homepage");
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
// TODO RM: remember and properly free in destructor?
/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);
|