summarylogtreecommitdiffstats
path: root/chrome-shutdown-hook.py
diff options
context:
space:
mode:
authorMichael Göhler2016-05-22 23:04:14 +0200
committerMichael Göhler2016-05-22 23:04:14 +0200
commit6bd964ddc30202aece25111941ccc37f7c5f5a16 (patch)
tree85240674bcd1f5ec0e0a5d3934de330dced1ed65 /chrome-shutdown-hook.py
parente2efc1db1d78c4e7fb151548cf34f0305799f0ca (diff)
downloadaur-6bd964ddc30202aece25111941ccc37f7c5f5a16.tar.gz
simplified code
Diffstat (limited to 'chrome-shutdown-hook.py')
-rw-r--r--chrome-shutdown-hook.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome-shutdown-hook.py b/chrome-shutdown-hook.py
index 58cf6bc7be97..543754054afd 100644
--- a/chrome-shutdown-hook.py
+++ b/chrome-shutdown-hook.py
@@ -13,19 +13,15 @@ import gnome
import gnome.ui
import gtk
-class Namespace: pass
-ns = Namespace()
-ns.dialog = None
+def chrome_clean_shutdown(*args):
+ subprocess.call("/usr/bin/pkill -15 -P 1 chrome", shell=True)
+ return True
def main():
- prog = gnome.init("chrome_clean_shutdown", "1.0", gnome.libgnome_module_info_get(), sys.argv, [])
+ prog = gnome.init("chrome_clean_shutdown", "1.1")
client = gnome.ui.master_client()
client.connect("save-yourself", chrome_clean_shutdown)
-def chrome_clean_shutdown(*args):
- subprocess.call("/usr/bin/pkill -15 -P 1 chrome", shell=True)
- return True
-
main()
gtk.main()