Fix GNOME3 context menus

This commit is contained in:
Det 2016-10-09 17:25:51 +03:00
parent e0a6c51d45
commit 3146e1ae6e
3 changed files with 42 additions and 5 deletions

View File

@ -33,9 +33,11 @@ pkgbase = google-chrome-beta
source = google-chrome-beta_54.0.2840.50_amd64.deb::https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb
source = https://www.google.com/chrome/browser/privacy/eula_text.html
source = google-chrome-beta.sh
source = StartupWMClass_and_GNOME3-context-menu.patch
md5sums = 38a1b628c32e494da9170cc73facfc7f
md5sums = SKIP
md5sums = ca16d5162eed85b1ba4e6b9fc37f9e35
md5sums = 1cc8a4f5310d51234973ca5bbb8d75ae
pkgname = google-chrome-beta

View File

@ -22,10 +22,12 @@ install=$pkgname.install
_channel=beta
source=("google-chrome-${_channel}_${pkgver}_amd64.deb::https://dl.google.com/linux/direct/google-chrome-${_channel}_current_amd64.deb"
"$url/browser/privacy/eula_text.html"
'google-chrome-beta.sh')
'google-chrome-beta.sh'
'StartupWMClass_and_GNOME3-context-menu.patch')
md5sums=('38a1b628c32e494da9170cc73facfc7f'
'SKIP'
'ca16d5162eed85b1ba4e6b9fc37f9e35')
'ca16d5162eed85b1ba4e6b9fc37f9e35'
'1cc8a4f5310d51234973ca5bbb8d75ae')
package() {
msg2 "Extracting the data.tar.xz..."
@ -47,10 +49,14 @@ package() {
# License
install -Dm644 eula_text.html "$pkgdir"/usr/share/licenses/google-chrome-$_channel/eula_text.html
msg2 "Fixing Chrome icon resolution..."
sed -i "/Exec=/i\StartupWMClass=Google-chrome-$_channel" "$pkgdir"/usr/share/applications/google-chrome-$_channel.desktop
#msg2 "Fixing Chrome icon resolution..."
#sed -i "/Exec=/i\StartupWMClass=Google-chrome-$_channel" "$pkgdir"/usr/share/applications/google-chrome-$_channel.desktop
msg2 "Removing unnecessities (e.g. Debian Cron job)..."
msg2 "Fixing Chrome icon resolution and GNOME 3 context menu..."
cd "$pkgdir"
patch -p0 -i "$srcdir"/StartupWMClass_and_GNOME3-context-menu.patch
msg2 "Removing Debian Cron job and duplicate product logos..."
rm -r "$pkgdir"/etc/cron.daily/ "$pkgdir"/opt/google/chrome-$_channel/cron/
rm "$pkgdir"/opt/google/chrome-$_channel/product_logo_*.png
}

View File

@ -0,0 +1,29 @@
diff -ur usr/share/applications/google-chrome-beta.desktop usr-patched/share/applications/google-chrome-beta.desktop
--- usr/share/applications/google-chrome-beta.desktop 2016-10-05 06:42:08.000000000 +0300
+++ usr-patched/share/applications/google-chrome-beta.desktop 2016-10-09 17:00:23.864348500 +0300
@@ -105,6 +105,7 @@
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
+StartupWMClass=Google-chrome-beta
Exec=/usr/bin/google-chrome-beta %U
Terminal=false
Icon=google-chrome-beta
@@ -112,6 +113,17 @@
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
+Actions=new-window;new-private-window;
+
+[Desktop Action new-window]
+Name=New Window
+StartupWMClass=Google-chrome-beta
+Exec=/usr/bin/google-chrome-beta
+
+[Desktop Action new-private-window]
+Name=New Private Window
+StartupWMClass=Google-chrome-beta
+Exec=/usr/bin/google-chrome-beta --incognito
[NewWindow Shortcut Group]
Name=New Window