![]() |
2010-07-16
, 21:13
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#122
|
#!/usr/bin/python import dbus import gtk import sys from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) def callback(state, emergency_state): print 'new state is', state print '-'*30 sys.stdout.flush() bus = dbus.SystemBus() bus.add_signal_receiver(callback, 'sig_call_state_ind', \ 'com.nokia.mce.signal', None, \ '/com/nokia/mce/signal') gtk.main()
![]() |
2010-07-16
, 21:24
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#123
|
PoC script to check for the call state (still has to be translated to C and integrated into headphone, with state tracking). I suppose we can enable this by default in headphoned without bad consequences?
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
![]() |
2010-07-16
, 21:40
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#124
|
Sounds good
Though the real test would be if the player pauses whilst Media Player is open - if it's closed, the state changing via libplayback is enough for the applet...
Shame you didn't use DBus-GLib, you could've taken the stuff from here instead of the nasty D-Bus signal rule you have to make (mind, I lose points on glib-genmarshal :\)
![]() |
2010-07-20
, 13:48
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#125
|
![]() |
2010-07-20
, 14:08
|
Posts: 3,401 |
Thanked: 1,255 times |
Joined on Nov 2005
@ London, UK
|
#126
|
![]() |
2010-07-30
, 17:27
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#127
|
![]() |
2010-08-03
, 16:59
|
Posts: 228 |
Thanked: 145 times |
Joined on Dec 2009
|
#128
|
![]() |
2010-08-05
, 13:37
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#129
|
![]() |
2010-08-05
, 13:47
|
Posts: 228 |
Thanked: 145 times |
Joined on Dec 2009
|
#130
|