1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 21:57:41 +02:00

Dynamically fetch application icon path

This commit is contained in:
Jeff Mitchell
2011-07-07 12:05:05 -04:00
parent 61a379a7d7
commit fd89814845
2 changed files with 13 additions and 16 deletions

View File

@@ -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 );
}

View File

@@ -40,23 +40,19 @@ public:
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: