summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-20 11:40:22 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-20 11:40:22 +0000
commit7e065653a2ffe78094357f6838a5c15ac0fda885 (patch)
tree5bf997685146838e329cbd0274483a8ebcaf50ea
parent6e35b2b48d4a66598f594e641b7475b3df419b6e (diff)
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
-rw-r--r--protocols/FacebookRM/facebook_10.vcxproj4
-rw-r--r--protocols/FacebookRM/facebook_10.vcxproj.filters12
-rw-r--r--protocols/FacebookRM/res/facebook.rc5
-rw-r--r--protocols/FacebookRM/res/feeds.icobin0 -> 1150 bytes
-rw-r--r--protocols/FacebookRM/res/friends.icobin0 -> 1150 bytes
-rw-r--r--protocols/FacebookRM/src/events.cpp8
-rw-r--r--protocols/FacebookRM/src/resource.h4
-rw-r--r--protocols/FacebookRM/src/theme.cpp4
8 files changed, 30 insertions, 7 deletions
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 @@
<ClInclude Include="src\version.h" />
</ItemGroup>
<ItemGroup>
+ <None Include="feeds.ico" />
+ <None Include="friends.ico" />
<None Include="res\auth_ask.ico" />
<None Include="res\auth_grant.ico" />
<None Include="res\auth_revoke.ico" />
<None Include="res\facebook.ico" />
+ <None Include="res\feeds.ico" />
+ <None Include="res\friends.ico" />
<None Include="res\mind.ico" />
<None Include="res\notification.ico" />
<None Include="res\poke.ico" />
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 @@
<None Include="res\notification.ico">
<Filter>Resource Files</Filter>
</None>
+ <None Include="res\feeds.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\friends.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="feeds.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="friends.ico">
+ <Filter>Resource Files</Filter>
+ </None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\facebook.rc">
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
--- /dev/null
+++ b/protocols/FacebookRM/res/feeds.ico
Binary files differ
diff --git a/protocols/FacebookRM/res/friends.ico b/protocols/FacebookRM/res/friends.ico
new file mode 100644
index 0000000000..d883108db7
--- /dev/null
+++ b/protocols/FacebookRM/res/friends.ico
Binary files 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);
}