maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   hildon-banner without full GTK app? (https://talk.maemo.org/showthread.php?t=44646)

voltagex 2010-02-16 05:44

hildon-banner without full GTK app?
 
Hi, how can I make one of the nice yellow hildon notification banners pop up, without needing a full GTK app - I mean like the low-battery notification isn't coming from a GTK app so I'm assuming there's a way to do it, even though the reference:

static Banner* Hildon::Banner::show_information ( Gtk::Widget & widget,
const Glib::ustring & text
)

says otherwise.

DBUS? PyMaemo? Anyone?

krk969 2010-02-16 07:46

Re: hildon-banner without full GTK app?
 
Quote:

Originally Posted by voltagex (Post 528764)
Hi, how can I make one of the nice yellow hildon notification banners pop up, without needing a full GTK app - I mean like the low-battery notification isn't coming from a GTK app so I'm assuming there's a way to do it, even though the reference:

static Banner* Hildon::Banner::show_information ( Gtk::Widget & widget,
const Glib::ustring & text
)

says otherwise.

DBUS? PyMaemo? Anyone?

if you'd like to use QT, then there is QMaemo5InformationBox

voltagex 2010-02-16 07:53

Re: hildon-banner without full GTK app?
 
What about from the console? How does the system generate this? I'm thinking of creating a very simple Growl GNTP listener that passes the messages received to hildon-banner. I don't need a GUI app at all for this, just a console app and hildon-banner!

krk969 2010-02-16 07:59

Re: hildon-banner without full GTK app?
 
Quote:

Originally Posted by voltagex (Post 528877)
What about from the console? How does the system generate this? I'm thinking of creating a very simple Growl GNTP listener that passes the messages received to hildon-banner. I don't need a GUI app at all for this, just a console app and hildon-banner!

its all
HERE

voltagex 2010-02-16 08:04

Re: hildon-banner without full GTK app?
 
No, no it's not.
dbus-send-notification doesn't exist on my N900.

The longer DBUS command creates a *modal* notification in the middle of the screen, which is not what I want

Interestingly, the python script in http://ubuntuforums.org/showpost.php...53&postcount=1 creates a notification which looks similar to the new SMS popup. Still not the 'top bar' notification.

qwerty12 2010-02-16 09:26

Re: hildon-banner without full GTK app?
 
Quote:

Originally Posted by voltagex (Post 528764)
I mean like the low-battery notification isn't coming from a GTK app so I'm assuming there's a way to do it, even though the reference:

Actually, it is. The status bar applet that displays that notification may not be a standalone app, but it is still linked against the GTK+ and Hildon libraries and uses hildon_banner_show_information () to show that low battery notification.

But, to answer your question: run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Message goes here."

voltagex 2010-02-16 09:28

Re: hildon-banner without full GTK app?
 
Thanks. I just generated this:

Nokia-N900-42-11:/home/user/MyDocs/src# python mdbus.py -s org.freedesktop.Notifications /org/freedesktop/Notifications
[METHOD] org.freedesktop.Notifications.CloseNotification( u:id )
[METHOD] org.freedesktop.Notifications.GetCapabilities()
[METHOD] org.freedesktop.Notifications.GetServerInformation ()
[METHOD] org.freedesktop.Notifications.Notify( s:app_name, u:id, s:icon, s:summary, s:body, as:actions, a{sv}:hints, i:timeout )
[METHOD] org.freedesktop.Notifications.SystemNoteDialog( s:message, u:type, s:label )
[METHOD] org.freedesktop.Notifications.SystemNoteInfoprint( s:message )
[METHOD] org.freedesktop.DBus.Introspectable.Introspect()
[METHOD] org.freedesktop.DBus.Properties.Get( s:interface, s:propname )
[METHOD] org.freedesktop.DBus.Properties.GetAll( s:interface )
[METHOD] org.freedesktop.DBus.Properties.Set( s:interface, s:propname, v:value )

voltagex 2010-02-16 09:29

Re: hildon-banner without full GTK app?
 
How did you find this method originally, I needed to use the amazing mdbus introspection to find it - was it documented somewhere that I didn't look?

voltagex 2010-02-16 12:08

Re: hildon-banner without full GTK app?
 
http://github.com/voltagex/projects/...tifications.py for anyone who's interested, work in progress.


All times are GMT. The time now is 17:37.

vBulletin® Version 3.8.8