Update icon cache on uninstall, catch missing gtk-update-icon-cache
This commit is contained in:
parent
f00522ac27
commit
54ea63f161
1 changed files with 12 additions and 8 deletions
10
wscript
10
wscript
|
@ -86,11 +86,15 @@ def build (bld):
|
||||||
|
|
||||||
def shutdown ():
|
def shutdown ():
|
||||||
dir = Common.path_install ('DATADIR', 'icons/hicolor')
|
dir = Common.path_install ('DATADIR', 'icons/hicolor')
|
||||||
if Params.g_commands['install']:
|
icon_cache_updated = False
|
||||||
if not Params.g_options.destdir:
|
if not Params.g_options.destdir:
|
||||||
# update the pixmap cache directory
|
# update the pixmap cache directory
|
||||||
Params.pprint('YELLOW', "Updating Gtk icon cache.")
|
try:
|
||||||
subprocess.call (['gtk-update-icon-cache', '-q', '-f', '-t', dir])
|
subprocess.call (['gtk-update-icon-cache', '-q', '-f', '-t', dir])
|
||||||
else:
|
Params.pprint ('YELLOW', "Updated Gtk icon cache.")
|
||||||
|
icon_cache_updated = True
|
||||||
|
except:
|
||||||
|
Params.pprint ('RED', "Failed to update icon cache.")
|
||||||
|
if not icon_cache_updated:
|
||||||
Params.pprint ('YELLOW', "Icon cache not updated. After install, run this:")
|
Params.pprint ('YELLOW', "Icon cache not updated. After install, run this:")
|
||||||
Params.pprint ('YELLOW', "gtk-update-icon-cache -q -f -t %s" % dir)
|
Params.pprint ('YELLOW', "gtk-update-icon-cache -q -f -t %s" % dir)
|
||||||
|
|
Loading…
Reference in a new issue