Permalink
Browse files

Dynamically fetch application icon path

  • Loading branch information...
1 parent 61a379a commit fd89814845d528ec548dcd71caad43b2263fb1ab @jefferai jefferai committed Jul 7, 2011
@@ -38,6 +38,7 @@
#include "gfwnotifyplugin.h"
#include "utils/tomahawkutils.h"
+#include "headlesscheck.h"
#include "growl.h"
#include "growl++.hpp"
@@ -51,8 +52,8 @@ GfwNotifyPlugin::GfwNotifyPlugin()
const char* notifications[1];
const char* name = "Notification";
notifications[0] = name;
- const char* host = "192.168.10.45";
- const char* password = "testing";
+ const char* host = "127.0.0.1";
+ const char* password = "";
const char* application = "Tomahawk";
m_growl = new Growl( GROWL_TCP, host, password, application, notifications, 1 );
qDebug() << Q_FUNC_INFO;
@@ -85,6 +86,6 @@ GfwNotifyPlugin::pushInfo( const QString caller, const Tomahawk::InfoSystem::Inf
const char* title = "Tomahawk";
const char* message = strdup( hash["message"].toLocal8Bit().constData() );
const char* url = "";
- const char* icon = "file:///S:/Program%20Files%20(x86)/Tomahawk/tomahawk-icon-128x128.png";
+ const char* icon = QString( "file:///" + TOMAHAWK_APPLICATION::applicationDirPath() + "/tomahawk-icon-128x128.png" ).toLocal8Bit().constData();
m_growl->Notify( name, title, message, url, icon );
}
@@ -40,23 +40,19 @@ class GfwNotifyPlugin : public InfoPlugin
virtual void namChangedSlot( QNetworkAccessManager* ) {}
protected slots:
- virtual void getInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const Tomahawk::InfoSystem::InfoCustomData customData )
+ virtual void getInfo( uint requestId, Tomahawk::InfoSystem::InfoRequestData requestData )
{
- Q_UNUSED( caller );
- Q_UNUSED( type );
- Q_UNUSED( input );
- Q_UNUSED( customData );
+ Q_UNUSED( requestId );
+ Q_UNUSED( requestData );
}
-
- virtual void pushInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant pushData );
-
- virtual void notInCacheSlot( const Tomahawk::InfoSystem::InfoCriteriaHash criteria, const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const Tomahawk::InfoSystem::InfoCustomData customData )
+
+ virtual void pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant pushData );
+
+ virtual void notInCacheSlot( uint requestId, Tomahawk::InfoSystem::InfoCriteriaHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData )
{
+ Q_UNUSED( requestId );
Q_UNUSED( criteria );
- Q_UNUSED( caller );
- Q_UNUSED( type );
- Q_UNUSED( input );
- Q_UNUSED( customData );
+ Q_UNUSED( requestData );
}
private:

0 comments on commit fd89814

Please sign in to comment.