From 7e065653a2ffe78094357f6838a5c15ac0fda885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 20 May 2013 11:40:22 +0000 Subject: Facebook: Life is much better with different icons for different popups. git-svn-id: http://svn.miranda-ng.org/main/trunk@4759 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/facebook_10.vcxproj | 4 ++++ protocols/FacebookRM/facebook_10.vcxproj.filters | 12 ++++++++++++ protocols/FacebookRM/res/facebook.rc | 5 +++-- protocols/FacebookRM/res/feeds.ico | Bin 0 -> 1150 bytes protocols/FacebookRM/res/friends.ico | Bin 0 -> 1150 bytes protocols/FacebookRM/src/events.cpp | 8 ++++++-- protocols/FacebookRM/src/resource.h | 4 +++- protocols/FacebookRM/src/theme.cpp | 4 ++-- 8 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 protocols/FacebookRM/res/feeds.ico create mode 100644 protocols/FacebookRM/res/friends.ico diff --git a/protocols/FacebookRM/facebook_10.vcxproj b/protocols/FacebookRM/facebook_10.vcxproj index 4bb69be9b0..f17f52f942 100644 --- a/protocols/FacebookRM/facebook_10.vcxproj +++ b/protocols/FacebookRM/facebook_10.vcxproj @@ -217,10 +217,14 @@ + + + + diff --git a/protocols/FacebookRM/facebook_10.vcxproj.filters b/protocols/FacebookRM/facebook_10.vcxproj.filters index ceabb2ebb4..1b813c38ac 100644 --- a/protocols/FacebookRM/facebook_10.vcxproj.filters +++ b/protocols/FacebookRM/facebook_10.vcxproj.filters @@ -163,6 +163,18 @@ Resource Files + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc index 803a7f2103..1d602b3fe4 100644 --- a/protocols/FacebookRM/res/facebook.rc +++ b/protocols/FacebookRM/res/facebook.rc @@ -58,6 +58,8 @@ 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" +IDI_FRIENDS ICON "friends.ico" ///////////////////////////////////////////////////////////////////////////// // @@ -267,8 +269,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - - + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/protocols/FacebookRM/res/feeds.ico b/protocols/FacebookRM/res/feeds.ico new file mode 100644 index 0000000000..99feff90f5 Binary files /dev/null and b/protocols/FacebookRM/res/feeds.ico differ diff --git a/protocols/FacebookRM/res/friends.ico b/protocols/FacebookRM/res/friends.ico new file mode 100644 index 0000000000..d883108db7 Binary files /dev/null and b/protocols/FacebookRM/res/friends.ico differ diff --git a/protocols/FacebookRM/src/events.cpp b/protocols/FacebookRM/src/events.cpp index bac8f5fb06..73024741ee 100644 --- a/protocols/FacebookRM/src/events.cpp +++ b/protocols/FacebookRM/src/events.cpp @@ -78,7 +78,9 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD flags, std::string *url) { - int ret; int timeout; COLORREF colorBack = 0; COLORREF colorText = 0; + int ret, timeout; + COLORREF colorBack = 0, colorText = 0; + HICON icon = Skin_GetIconByHandle(m_hProtoIcon); switch (flags) { @@ -103,6 +105,7 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD colorText = getDword(FACEBOOK_KEY_EVENT_FEEDS_COLTEXT, DEFAULT_EVENT_COLTEXT); } timeout = getDword(FACEBOOK_KEY_EVENT_FEEDS_TIMEOUT, 0); + icon = Skin_GetIconByHandle(GetIconHandle("newsfeed")); SkinPlaySound("NewsFeed"); flags |= NIIF_INFO; break; @@ -116,6 +119,7 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD colorText = getDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLTEXT, DEFAULT_EVENT_COLTEXT); } timeout = getDword(FACEBOOK_KEY_EVENT_NOTIFICATIONS_TIMEOUT, 0); + icon = Skin_GetIconByHandle(GetIconHandle("notification")); SkinPlaySound("Notification"); flags |= NIIF_INFO; break; @@ -143,7 +147,7 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD pd.colorText = colorText; pd.iSeconds = timeout; pd.lchContact = contact; - pd.lchIcon = Skin_GetIconByHandle(m_hProtoIcon); // TODO: Icon test + pd.lchIcon = icon; if (url != NULL) pd.PluginData = new popup_data(this, *url); pd.PluginWindowProc = (WNDPROC)PopupDlgProc; diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h index 64b151822d..6c58cea147 100644 --- a/protocols/FacebookRM/src/resource.h +++ b/protocols/FacebookRM/src/resource.h @@ -14,6 +14,8 @@ #define IDD_OPTIONS_ADVANCED 115 #define IDI_POKE 127 #define IDI_NOTIFICATION 128 +#define IDI_NEWSFEED 129 +#define IDI_FRIENDS 130 #define IDC_UN 1001 #define IDC_PW 1002 #define IDC_NEWACCOUNTLINK 1003 @@ -65,7 +67,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_RESOURCE_VALUE 131 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1203 #define _APS_NEXT_SYMED_VALUE 131 diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index e514da51b2..938defeee3 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -30,21 +30,21 @@ static IconItem icons[] = { LPGEN("Mind"), "mind", IDI_MIND }, { 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("Visit friendship details"), "friendship", 0 }, }; // TODO: uninit void InitIcons(void) { Icon_Register(g_hInstance, "Protocols/Facebook", icons, SIZEOF(icons)-1, "Facebook"); - icons[SIZEOF(icons)-2].hIcolib = LoadSkinnedIconHandle(SKINICON_EVENT_URL); icons[SIZEOF(icons)-1].hIcolib = LoadSkinnedIconHandle(SKINICON_EVENT_URL); } -- cgit v1.2.3