------------------------------------------------------------ revno: 3280 committer: poy <p...@123gen.com> branch nick: trunk timestamp: Sun 2013-04-28 23:06:41 +0200 message: plugin API: add a notification function modified: dcpp/PluginDefs.h win32/PluginApiWin.cpp win32/PluginApiWin.h
-- lp:dcplusplus https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk Your team Dcplusplus-team is subscribed to branch lp:dcplusplus. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/PluginDefs.h' --- dcpp/PluginDefs.h 2013-04-23 17:41:14 +0000 +++ dcpp/PluginDefs.h 2013-04-28 21:06:41 +0000 @@ -449,6 +449,7 @@ void (DCAPI *remove_command) (const char* name); void (DCAPI *play_sound) (const char* path); + void (DCAPI *notify) (const char* title, const char* message); } DCUI, *DCUIPtr; #ifdef __cplusplus === modified file 'win32/PluginApiWin.cpp' --- win32/PluginApiWin.cpp 2013-04-23 17:41:14 +0000 +++ win32/PluginApiWin.cpp 2013-04-28 21:06:41 +0000 @@ -32,7 +32,8 @@ &PluginApiWin::addCommand, &PluginApiWin::removeCommand, - &PluginApiWin::playSound + &PluginApiWin::playSound, + &PluginApiWin::notify }; void PluginApiWin::init() { @@ -51,3 +52,9 @@ void PluginApiWin::playSound(const char* path) { WinUtil::playSound(Text::toT(path)); } + +void PluginApiWin::notify(const char* title, const char* message) { + if(WinUtil::mainWindow) { + WinUtil::mainWindow->notify(Text::toT(title), Text::toT(message)); + } +} === modified file 'win32/PluginApiWin.h' --- win32/PluginApiWin.h 2013-04-23 17:41:14 +0000 +++ win32/PluginApiWin.h 2013-04-28 21:06:41 +0000 @@ -33,6 +33,7 @@ static void DCAPI removeCommand(const char* name); static void DCAPI playSound(const char* path); + static void DCAPI notify(const char* title, const char* message); static DCUI dcUI; };
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp