Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/installer/linux/common/postinst.include

Issue 2701703002: installer/linux: add symbolic icon for use in gnome-shell
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Add icons to the system icons 1 # Add icons to the system icons
2 XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" 2 XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`"
3 if [ ! -x "$XDG_ICON_RESOURCE" ]; then 3 if [ ! -x "$XDG_ICON_RESOURCE" ]; then
4 echo "Error: Could not find xdg-icon-resource" >&2 4 echo "Error: Could not find xdg-icon-resource" >&2
5 exit 1 5 exit 1
6 fi 6 fi
7 for icon in "@@INSTALLDIR@@/product_logo_"*.png; do 7 for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
8 size="${icon##*/product_logo_}" 8 size="${icon##*/product_logo_}"
9 "$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "@@PACKAGE@@" 9 "$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "@@PACKAGE@@"
10 done 10 done
11 11
12 for icon in "@@INSTALLDIR@@/product_symbolic_logo_"*.symbolic.png; do
Tom (Use chromium acct) 2017/02/23 03:11:35 Would it be possible to combine this and the above
13 size="${icon##*/product_symbolic_logo_}"
14 "$XDG_ICON_RESOURCE" install --size "${size%.symbolic.png}" "$icon" "@@PACKAGE @@-symbolic.symbolic"
Lei Zhang 2017/02/23 07:28:31 Like with most code, we limit ourselves to 80 char
15 done
16
12 UPDATE_MENUS="`which update-menus 2> /dev/null || true`" 17 UPDATE_MENUS="`which update-menus 2> /dev/null || true`"
13 if [ -x "$UPDATE_MENUS" ]; then 18 if [ -x "$UPDATE_MENUS" ]; then
14 update-menus 19 update-menus
15 fi 20 fi
16 21
17 # Update cache of .desktop file MIME types. Non-fatal since it's just a cache. 22 # Update cache of .desktop file MIME types. Non-fatal since it's just a cache.
18 update-desktop-database > /dev/null 2>&1 || true 23 update-desktop-database > /dev/null 2>&1 || true
19 24
20 # Updates defaults.list file if present. 25 # Updates defaults.list file if present.
21 update_defaults_list() { 26 update_defaults_list() {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 # (the patch is safe to leave even after uninstall), update it. 74 # (the patch is safe to leave even after uninstall), update it.
70 GNOME_DFL_APPS=/usr/share/gnome-control-center/default-apps/gnome-default-applic ations.xml 75 GNOME_DFL_APPS=/usr/share/gnome-control-center/default-apps/gnome-default-applic ations.xml
71 if [ -f "$GNOME_DFL_APPS" ]; then 76 if [ -f "$GNOME_DFL_APPS" ]; then
72 # Conditionally insert the contents of the file "default-app-block" after the 77 # Conditionally insert the contents of the file "default-app-block" after the
73 # first "<web-browsers>" line we find in gnome-default-applications.xml 78 # first "<web-browsers>" line we find in gnome-default-applications.xml
74 fgrep -q "@@MENUNAME@@" "$GNOME_DFL_APPS" || insert_after_first_match \ 79 fgrep -q "@@MENUNAME@@" "$GNOME_DFL_APPS" || insert_after_first_match \
75 "$GNOME_DFL_APPS" \ 80 "$GNOME_DFL_APPS" \
76 "^[ ]*<web-browsers>[ ]*$" \ 81 "^[ ]*<web-browsers>[ ]*$" \
77 "@@INSTALLDIR@@/default-app-block" 82 "@@INSTALLDIR@@/default-app-block"
78 fi 83 fi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698