Closed Hjdskes closed 9 years ago
Never mind the conditional import. I guess there is something wrong with that timing-test, though I don't know what. Still gives me almost 1.7 s for the imports, but running the script I get the screen quasi immediately.
There are 2 errors left after applying your patches. Here is a diff (with line-numbers applying to the already patched version:
me@medion:~/tmp/today$ diff -u bl-exit bl-exit-new
--- bl-exit 2015-10-08 18:43:29.791995436 +0200
+++ bl-exit-new 2015-10-08 18:46:46.026278164 +0200
@@ -102,7 +102,7 @@
call(dbus_send.format(string))
def logout():
- call("openbox --logout")
+ call("openbox --exit")
def suspend():
call("bl-lock")
@@ -112,7 +112,7 @@
send_dbus("Reboot")
def poweroff():
- send_dbus("Poweroff")
+ send_dbus("PowerOff")
def print_usage(status):
print ("bl-exit: usage:\n" \
me@medion:~/tmp/today$
Whoops! Will fix it!
^ Fixed.
Is this mergeable?
Yes, in the way that it works and implements the command line arguments @johnraff wanted. See issue #105, however. I guess we can go ahead and merge this for the time being.
After reading #105, for the time being I'll merge this since it improves the current bl-exit. If it gets converted to a Bash script later, that's just another change.
As discussed on the forums.
I have also changed the
bl-exit
class to "properly" subclassgtk.Window
. Imo this is the proper way to do it, and it cleans up the code a bit as well. A downside, however, is that xaos' conditional import can not be applied anymore.Maybe xaos himself can chime in here?