Show
Ignore:
Timestamp:
01/11/09 20:26:43 (3 years ago)
Author:
Leo Antunes <leo@…>
Children:
1aef8415e1cd98c88d3980e0d949c832c3ddd7e8
Parents:
e3cc7b23a6aba21796577ff44a9a3f9d855080cb
git-committer:
Leo Antunes <leo@…> (01/11/09 20:26:43)
Message:

- store changed status as pref and restore at startup if it exists:

avoid awayonlock messing with the last-online status if you quit
while idle.

- minor tweaks and fixes to the test script

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • utils/mimic_gnome-screensaver.py

    rebf9132 rd1a41d2  
    33""" 
    44incredibly dirty hack to test away-on-lock 
     5if gnome-screensaver is already running this wont work (it wont be able 
     6to pretend to be gnome-screensaver) 
    57""" 
    68 
     
    1820 
    1921        @dbus.service.signal(dbus_interface='org.gnome.ScreenSaver', signature='b') 
    20         def SessionIdleChanged(self, y): 
     22        def ActiveChanged(self, y): 
    2123                print "emmitting...", repr(y) 
    2224                return True 
     
    2830t = Test('/org/gnome/ScreenSaver') 
    2931gobject.timeout_add(   1, t.ActiveChanged, dbus.Boolean(1)) 
    30 gobject.timeout_add(2000, t.ActiveChanged, dbus.Boolean(0)) 
    31 gobject.timeout_add(2001, app.quit) 
     32gobject.timeout_add(5000, t.ActiveChanged, dbus.Boolean(0)) 
     33gobject.timeout_add(5001, app.quit) 
    3234 
    3335app.run()