Renamed imgconverter module
This commit is contained in:
parent
769e70e76a
commit
6ca61dc709
@ -30,7 +30,7 @@ import dbus
|
|||||||
from qubes.qubes import QubesVm, QubesHVm
|
from qubes.qubes import QubesVm, QubesHVm
|
||||||
from qubes.qubes import vm_files, system_path
|
from qubes.qubes import vm_files, system_path
|
||||||
|
|
||||||
import qubes.imgconverter
|
import qubesimgconverter
|
||||||
|
|
||||||
vm_files['appmenus_templates_subdir'] = 'apps.templates'
|
vm_files['appmenus_templates_subdir'] = 'apps.templates'
|
||||||
vm_files['appmenus_template_icons_subdir'] = 'apps.tempicons'
|
vm_files['appmenus_template_icons_subdir'] = 'apps.tempicons'
|
||||||
@ -203,7 +203,7 @@ def QubesVm_appicons_create(self, srcdir=None, force=False):
|
|||||||
dst_icon = os.path.join(self.appmenus_icons_dir, icon)
|
dst_icon = os.path.join(self.appmenus_icons_dir, icon)
|
||||||
if not os.path.exists(dst_icon) or force or \
|
if not os.path.exists(dst_icon) or force or \
|
||||||
os.path.getmtime(src_icon) > os.path.getmtime(dst_icon):
|
os.path.getmtime(src_icon) > os.path.getmtime(dst_icon):
|
||||||
qubes.imgconverter.tint(src_icon, dst_icon, self.label.color)
|
qubesimgconverter.tint(src_icon, dst_icon, self.label.color)
|
||||||
|
|
||||||
|
|
||||||
def QubesVm_appicons_remove(self):
|
def QubesVm_appicons_remove(self):
|
||||||
|
@ -33,9 +33,10 @@ from optparse import OptionParser
|
|||||||
from qubes.qubes import QubesVmCollection, QubesException, system_path
|
from qubes.qubes import QubesVmCollection, QubesException, system_path
|
||||||
from qubes.qubes import QubesHVm
|
from qubes.qubes import QubesHVm
|
||||||
from qubes.qubes import vm_files
|
from qubes.qubes import vm_files
|
||||||
import qubes.imgconverter
|
|
||||||
from qubes.qubes import vmm
|
from qubes.qubes import vmm
|
||||||
|
|
||||||
|
import qubesimgconverter
|
||||||
|
|
||||||
# fields required to be present (and verified) in retrieved desktop file
|
# fields required to be present (and verified) in retrieved desktop file
|
||||||
required_fields = ["Name", "Exec"]
|
required_fields = ["Name", "Exec"]
|
||||||
|
|
||||||
@ -331,13 +332,13 @@ def main():
|
|||||||
os.path.splitext(appmenu_file)[0] + '.png')
|
os.path.splitext(appmenu_file)[0] + '.png')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
icon = qubes.imgconverter.Image. \
|
icon = qubesimgconverter.Image. \
|
||||||
get_xdg_icon_from_vm(vm,
|
get_xdg_icon_from_vm(vm,
|
||||||
new_appmenus[
|
new_appmenus[
|
||||||
appmenu_file][
|
appmenu_file][
|
||||||
'Icon'])
|
'Icon'])
|
||||||
if os.path.exists(icondest):
|
if os.path.exists(icondest):
|
||||||
old_icon = qubes.imgconverter.Image.load_from_file(icondest)
|
old_icon = qubesimgconverter.Image.load_from_file(icondest)
|
||||||
else:
|
else:
|
||||||
old_icon = None
|
old_icon = None
|
||||||
if old_icon is None or icon != old_icon:
|
if old_icon is None or icon != old_icon:
|
||||||
|
Loading…
Reference in New Issue
Block a user