From c87975c3edab192ec12c2fa0333b51e8a3df3c25 Mon Sep 17 00:00:00 2001 From: Det Date: Sun, 9 Oct 2016 17:25:56 +0300 Subject: [PATCH] Fix GNOME3 context menus --- .SRCINFO | 2 ++ PKGBUILD | 16 +++++++---- StartupWMClass_and_GNOME3-context-menu.patch | 29 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 StartupWMClass_and_GNOME3-context-menu.patch diff --git a/.SRCINFO b/.SRCINFO index cb6ce8b..c63cd3d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -33,9 +33,11 @@ pkgbase = google-chrome-dev source = google-chrome-unstable_55.0.2882.0_amd64.deb::https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb source = https://www.google.com/chrome/browser/privacy/eula_text.html source = google-chrome-unstable.sh + source = StartupWMClass_and_GNOME3-context-menu.patch md5sums = 8373f51fa04217cf7c15f16baa9271b5 md5sums = SKIP md5sums = 11b55a3fec7279db32b63e3a0b97dc01 + md5sums = 12ad81f7e06457c9fa7e2536d32f2bd0 pkgname = google-chrome-dev diff --git a/PKGBUILD b/PKGBUILD index ad559bd..24de97d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -22,10 +22,12 @@ install=$pkgname.install _channel=unstable 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-unstable.sh') + 'google-chrome-unstable.sh' + 'StartupWMClass_and_GNOME3-context-menu.patch') md5sums=('8373f51fa04217cf7c15f16baa9271b5' 'SKIP' - '11b55a3fec7279db32b63e3a0b97dc01') + '11b55a3fec7279db32b63e3a0b97dc01' + '12ad81f7e06457c9fa7e2536d32f2bd0') ## Previous build (also see: /var/cache/pacman/pkg/google-chrome-dev-*): #source[0]='http://mirror.glendaleacademy.org/chrome/pool/main/g/google-chrome-unstable/google-chrome-unstable_55.0.2873.0-1_amd64.deb' @@ -51,10 +53,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 } diff --git a/StartupWMClass_and_GNOME3-context-menu.patch b/StartupWMClass_and_GNOME3-context-menu.patch new file mode 100644 index 0000000..f5ef6af --- /dev/null +++ b/StartupWMClass_and_GNOME3-context-menu.patch @@ -0,0 +1,29 @@ +diff -ur usr/share/applications/google-chrome-unstable.desktop usr-patched/share/applications/google-chrome-unstable.desktop +--- usr/share/applications/google-chrome-unstable.desktop 2016-10-06 08:51:52.000000000 +0300 ++++ usr-patched/share/applications/google-chrome-unstable.desktop 2016-10-09 17:00:17.824290100 +0300 +@@ -105,6 +105,7 @@ + Comment[zh_CN]=访问互联网 + Comment[zh_HK]=連線到網際網路 + Comment[zh_TW]=連線到網際網路 ++StartupWMClass=Google-chrome-unstable + Exec=/usr/bin/google-chrome-unstable %U + Terminal=false + Icon=google-chrome-unstable +@@ -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-unstable ++Exec=/usr/bin/google-chrome-unstable ++ ++[Desktop Action new-private-window] ++Name=New Private Window ++StartupWMClass=Google-chrome-unstable ++Exec=/usr/bin/google-chrome-unstable --incognito + + [NewWindow Shortcut Group] + Name=New Window