[pidgin-musictracker] r468 committed - Zune Player seems to object to the MsnMsgrUIManager window having a ti...

5 views
Skip to first unread message

pidgin-mu...@googlecode.com

unread,
Jul 31, 2010, 7:12:51 PM7/31/10
to pidgin-musict...@googlegroups.com
Revision: 468
Author: jon.t...@dronecode.org.uk
Date: Sat Jul 31 16:11:44 2010
Log: Zune Player seems to object to the MsnMsgrUIManager window having a
title, so remove that
(issue 38)

Also Zune player seems to send the title and artist swapped compared to
Windows Media Player,
but fortunately identifies itself as Zune. So detect it and swap them.


http://code.google.com/p/pidgin-musictracker/source/detail?r=468

Modified:
/trunk/src/msn-compat.c

=======================================
--- /trunk/src/msn-compat.c Mon May 25 07:33:28 2009
+++ /trunk/src/msn-compat.c Sat Jul 31 16:11:44 2010
@@ -141,7 +141,12 @@
// From testing, the order we expect seems to be the popular consensus,
but provide
// a configuration option to override this as I've got this wrong at
least once...
//
- if (purple_prefs_get_bool(PREF_MSN_SWAP_ARTIST_TITLE))
+ gboolean swap = purple_prefs_get_bool(PREF_MSN_SWAP_ARTIST_TITLE);
+
+ if (strcmp("ZUNE", player) == 0)
+ swap = !swap;
+
+ if (swap)
{
char swap[STRLEN];
strncpy(swap, msnti.artist, STRLEN);
@@ -192,7 +197,7 @@
get_msn_compat_info(struct TrackInfo *ti)
{
static HWND MSNWindow = 0;
-
+
if (!MSNWindow)
{
memset(&msnti, 0, sizeof(struct TrackInfo));
@@ -200,8 +205,8 @@
WNDCLASSEX MSNClass =
{sizeof(WNDCLASSEX),0,MSNWinProc,0,0,GetModuleHandle(NULL),NULL,NULL,NULL,NULL,"MsnMsgrUIManager",NULL};
ATOM a = RegisterClassEx(&MSNClass);
trace("RegisterClassEx returned 0x%x",a);
-
- MSNWindow = CreateWindowEx(0,"MsnMsgrUIManager","MSN message
compatibility window for pidgin-musictracker",
+
+ MSNWindow = CreateWindowEx(0,"MsnMsgrUIManager","",
0,0,0,0,0,

HWND_MESSAGE,NULL,GetModuleHandle(NULL),NULL);
trace("CreateWindowEx returned 0x%x", MSNWindow);

Reply all
Reply to author
Forward
0 new messages