This could perhaps implemented into the gb.Desktop component as
'Desktop.Notify()'?

Den 18.08.2017 16:15, skrev Tobias Boege:

> On Fri, 18 Aug 2017, Tony Morehen wrote: 
> 
>> Gambas can talk to the notifications daemon via Dbus.  I use this code:
>> 
>> Private NotifyInterface As String = "org.freedesktop.Notifications"
>> Private NotifyApp As String = "session://" & NotifyInterface
>> Private NotifyPath As String = "/" & Replace(NotifyInterface, ".", "/")
>> 
>> 'does the daemon support icon, body, button to click etc
>> Dim sArray As String[] = Dbus[NotifyApp][NotifyPath,
>> NotifyInterface].GetCapabilities()
>> 'popup (the hintsCollection is an empty collection, iDuration = -1, use
>> default)
>> notifyID = Dbus[NotifyApp][NotifyPath,
>> NotifyInterface].Notify(AppName, notifyID, IconPath,SummaryText, BodyText,
>> [TextToSignal, ButtonText], hintsCollection, iDuration)
>> 'setup dbussignal to get popup closed and and buttonpressed notifications
>> 
>> Private  NotifySignal as New DbusSignal(Dbus.Session,NotifyInterface, True)
>> As "NotifyDbusSignal"
>> 'signal handler
>> Public Sub NotifyDbusSignal_Signal(Signal As String, Arguments As Variant[])
>> Select Case Signal
>> Case "NotificationClosed"
>> Case "ActionInvoked"
>> 'Arguments[0] contains TextToSignal from above
>> End Select
>> End
> 
> I just checked the code and this is exactly what libnotify does.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to