openbsd-ports/audio/last.fm/patches/patch-src_iconshack_cpp
dcoppa ed80a78265 Update to last.fm 1.5.4.27091
Still happy with gcc 3.3.5

Tested on sparc64 and i386
2011-03-30 14:00:48 +00:00

59 lines
2.2 KiB
Plaintext

$OpenBSD: patch-src_iconshack_cpp,v 1.2 2011/03/30 14:00:48 dcoppa Exp $
--- src/iconshack.cpp.orig Mon Mar 28 15:20:33 2011
+++ src/iconshack.cpp Mon Mar 28 15:20:35 2011
@@ -108,6 +108,33 @@ IconShack::GenerateIpodScrobblingIcons( MooseEnums::Us
}
+#ifdef Q_WS_X11
+QPixmap
+IconShack::GetTrayIcon( MooseEnums::UserIconColour eColour )
+{
+ if ( !mbIconsLoaded )
+ LoadIcons();
+
+ if ( maTrayIcons[ eColour ].isNull() )
+ return QPixmap( 22, 22 );
+ else
+ return maTrayIcons[ eColour ];
+}
+
+
+QPixmap
+IconShack::GetDisabledTrayIcon( MooseEnums::UserIconColour eColour )
+{
+ if ( !mbIconsLoaded )
+ LoadIcons();
+
+ if ( maDisabledTrayIcons[ eColour ].isNull() )
+ return QPixmap( 22, 22 );
+ else
+ return maDisabledTrayIcons[ eColour ];
+}
+#endif
+
void
IconShack::LoadIcons()
{
@@ -140,6 +167,20 @@ IconShack::LoadIcons()
maDisabledIcons[MooseEnums::eGreen].load( MooseUtils::dataPath( "icons/user_disabled.png" ) );
maDisabledIcons[MooseEnums::eOrange].load( MooseUtils::dataPath( "icons/user_disabled.png" ) );
maDisabledIcons[MooseEnums::eBlack].load( MooseUtils::dataPath( "icons/user_disabled.png" ) );
+
+#ifdef Q_WS_X11
+ maTrayIcons[MooseEnums::eRed].load( MooseUtils::dataPath( "icons/user_red22.png" ) );
+ maTrayIcons[MooseEnums::eBlue].load( MooseUtils::dataPath( "icons/user_blue22.png" ) );
+ maTrayIcons[MooseEnums::eGreen].load( MooseUtils::dataPath( "icons/user_green22.png" ) );
+ maTrayIcons[MooseEnums::eOrange].load( MooseUtils::dataPath( "icons/user_orange22.png" ) );
+ maTrayIcons[MooseEnums::eBlack].load( MooseUtils::dataPath( "icons/user_black22.png" ) );
+
+ maDisabledTrayIcons[MooseEnums::eRed].load( MooseUtils::dataPath( "icons/user_disabled22.png" ) );
+ maDisabledTrayIcons[MooseEnums::eBlue].load( MooseUtils::dataPath( "icons/user_disabled22.png" ) );
+ maDisabledTrayIcons[MooseEnums::eGreen].load( MooseUtils::dataPath( "icons/user_disabled22.png" ) );
+ maDisabledTrayIcons[MooseEnums::eOrange].load( MooseUtils::dataPath( "icons/user_disabled22.png" ) );
+ maDisabledTrayIcons[MooseEnums::eBlack].load( MooseUtils::dataPath( "icons/user_disabled22.png" ) );
+#endif
mbIconsLoaded = true;