Reply
Thread Tools
Posts: 36 | Thanked: 4 times | Joined on Feb 2010
#1
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's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#2
Originally Posted by voltagex View Post
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
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 36 | Thanked: 4 times | Joined on Feb 2010
#3
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's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#4
Originally Posted by voltagex View Post
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
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 36 | Thanked: 4 times | Joined on Feb 2010
#5
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.

Last edited by voltagex; 2010-02-16 at 08:13.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#6
Originally Posted by voltagex View Post
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."
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 36 | Thanked: 4 times | Joined on Feb 2010
#7
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, sropname )
[METHOD] org.freedesktop.DBus.Properties.GetAll( s:interface )
[METHOD] org.freedesktop.DBus.Properties.Set( s:interface, sropname, v:value )

Last edited by voltagex; 2010-02-16 at 09:54.
 
Posts: 36 | Thanked: 4 times | Joined on Feb 2010
#8
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?
 
Posts: 36 | Thanked: 4 times | Joined on Feb 2010
#9
http://github.com/voltagex/projects/...tifications.py for anyone who's interested, work in progress.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:36.