summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorClastres Térence2016-08-11 17:04:43 +0200
committerClastres Térence2016-08-11 17:04:43 +0200
commit8f6a620830b7b917eb5b34f572640fef0f30087c (patch)
tree38ecfe671f38361d018f48db618eeb6ff89276e2
parent36c13b6f727c811b8a4b33ee618a13f68123d943 (diff)
downloadaur-8f6a620830b7b917eb5b34f572640fef0f30087c.tar.gz
Fix browser detection code
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--chrome-shutdown-hook.desktop2
-rw-r--r--chrome-shutdown-hook.py13
4 files changed, 12 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 201d425762ad..3111db1c230b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = chrome-shutdown-hook
pkgdesc = Gently shutdown Chrome/Chromium on logout from Gnome Shell.
- pkgver = 1.2
+ pkgver = 1.2.1
pkgrel = 1
url = https://www.google.com/chrome/index.html
arch = any
@@ -11,8 +11,8 @@ pkgbase = chrome-shutdown-hook
optdepends = gnome-tweak-tool: to enable this hook as a Gnome Startup Application
source = chrome-shutdown-hook.desktop
source = chrome-shutdown-hook.py
- md5sums = 45087b31730315e1ed785205739d9943
- md5sums = 488167eff465bb620bdece25582aba4b
+ md5sums = e9e039b29bf1c7a027ef6b3a2946b6a9
+ md5sums = 5e6f900651799632327ebd1cc74b15b5
pkgname = chrome-shutdown-hook
diff --git a/PKGBUILD b/PKGBUILD
index 139118ece0f2..ee79c4ca4c44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Michael Goehler <somebody dot here at gmx dot de>
pkgname=chrome-shutdown-hook
-pkgver=1.2
+pkgver=1.2.1
pkgrel=1
pkgdesc="Gently shutdown Chrome/Chromium on logout from Gnome Shell."
arch=('any')
@@ -12,8 +12,8 @@ optdepends=('gnome-tweak-tool: to enable this hook as a Gnome Startup Applicatio
license=('GPL')
source=("chrome-shutdown-hook.desktop"
"chrome-shutdown-hook.py")
-md5sums=('45087b31730315e1ed785205739d9943'
- '488167eff465bb620bdece25582aba4b')
+md5sums=('e9e039b29bf1c7a027ef6b3a2946b6a9'
+ '5e6f900651799632327ebd1cc74b15b5')
package() {
cd "${srcdir}"
diff --git a/chrome-shutdown-hook.desktop b/chrome-shutdown-hook.desktop
index fdb21b43bb69..b3a9b48ff04d 100644
--- a/chrome-shutdown-hook.desktop
+++ b/chrome-shutdown-hook.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=Chrome Shotdown Hook
-Comment=Gently shutdown Chrome on logout from Gnome Shell
+Comment=Gently shutdown Chrome/Chromium on logout from Gnome Shell
Exec=/usr/bin/chrome-shutdown-hook
Icon=view-restore-symbolic
Terminal=false
diff --git a/chrome-shutdown-hook.py b/chrome-shutdown-hook.py
index d8eaa59e3364..88fa746cc19d 100644
--- a/chrome-shutdown-hook.py
+++ b/chrome-shutdown-hook.py
@@ -22,15 +22,12 @@ def chromium_clean_shutdown(*args):
return True
def main():
- prog = gnome.init("chrome_clean_shutdown", "1.2")
+ prog = gnome.init("chrome_clean_shutdown", "1.2.1")
client = gnome.ui.master_client()
-
- if subprocess.call("hash google-chrome-stable", shell=True):
- client.connect("save-yourself", chrome_clean_shutdown)
-
- if subprocess.call("hash chromium", shell=True):
- client.connect("save-yourself", chromium_clean_shutdown)
-
+ if (subprocess.call("hash chromium", shell=True) == 0):
+ client.connect("save-yourself", chromium_clean_shutdown)
+ if (subprocess.call("hash google-chrome-stable", shell=True) == 0):
+ client.connect("save-yourself", chrome_clean_shutdown)
main()
gtk.main()