mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-03 01:18:00 +03:00
meson: add icons
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
dd909f20bc
commit
2abd3e7565
8
data/icons/16x16/actions/meson.build
Normal file
8
data/icons/16x16/actions/meson.build
Normal file
@ -0,0 +1,8 @@
|
||||
icons = files(
|
||||
'icon_console.png',
|
||||
'vm_new.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '16x16', 'cat': 'actions'}
|
||||
endforeach
|
7
data/icons/16x16/apps/meson.build
Normal file
7
data/icons/16x16/apps/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
icons = files(
|
||||
'virt-manager.png'
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '16x16', 'cat': 'apps'}
|
||||
endforeach
|
2
data/icons/16x16/meson.build
Normal file
2
data/icons/16x16/meson.build
Normal file
@ -0,0 +1,2 @@
|
||||
subdir('actions')
|
||||
subdir('apps')
|
9
data/icons/22x22/actions/meson.build
Normal file
9
data/icons/22x22/actions/meson.build
Normal file
@ -0,0 +1,9 @@
|
||||
icons = files(
|
||||
'icon_console.png',
|
||||
'icon_details.png',
|
||||
'vm_new.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '22x22', 'cat': 'actions'}
|
||||
endforeach
|
7
data/icons/22x22/apps/meson.build
Normal file
7
data/icons/22x22/apps/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
icons = files(
|
||||
'virt-manager.png'
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '22x22', 'cat': 'apps'}
|
||||
endforeach
|
11
data/icons/22x22/devices/meson.build
Normal file
11
data/icons/22x22/devices/meson.build
Normal file
@ -0,0 +1,11 @@
|
||||
icons = files(
|
||||
'device_cpu.png',
|
||||
'device_mem.png',
|
||||
'device_pci.png',
|
||||
'device_serial.png',
|
||||
'device_usb.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '22x22', 'cat': 'devices'}
|
||||
endforeach
|
4
data/icons/22x22/meson.build
Normal file
4
data/icons/22x22/meson.build
Normal file
@ -0,0 +1,4 @@
|
||||
subdir('actions')
|
||||
subdir('apps')
|
||||
subdir('devices')
|
||||
subdir('status')
|
9
data/icons/22x22/status/meson.build
Normal file
9
data/icons/22x22/status/meson.build
Normal file
@ -0,0 +1,9 @@
|
||||
icons = files(
|
||||
'state_paused.png',
|
||||
'state_running.png',
|
||||
'state_shutoff.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '22x22', 'cat': 'status'}
|
||||
endforeach
|
9
data/icons/24x24/actions/meson.build
Normal file
9
data/icons/24x24/actions/meson.build
Normal file
@ -0,0 +1,9 @@
|
||||
icons = files(
|
||||
'icon_console.png',
|
||||
'vm_clone_wizard.png',
|
||||
'vm_new.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '24x24', 'cat': 'actions'}
|
||||
endforeach
|
7
data/icons/24x24/apps/meson.build
Normal file
7
data/icons/24x24/apps/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
icons = files(
|
||||
'virt-manager.png'
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '24x24', 'cat': 'apps'}
|
||||
endforeach
|
2
data/icons/24x24/meson.build
Normal file
2
data/icons/24x24/meson.build
Normal file
@ -0,0 +1,2 @@
|
||||
subdir('actions')
|
||||
subdir('apps')
|
7
data/icons/256x256/apps/meson.build
Normal file
7
data/icons/256x256/apps/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
icons = files(
|
||||
'virt-manager.png'
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '256x256', 'cat': 'apps'}
|
||||
endforeach
|
1
data/icons/256x256/meson.build
Normal file
1
data/icons/256x256/meson.build
Normal file
@ -0,0 +1 @@
|
||||
subdir('apps')
|
8
data/icons/32x32/actions/meson.build
Normal file
8
data/icons/32x32/actions/meson.build
Normal file
@ -0,0 +1,8 @@
|
||||
icons = files(
|
||||
'icon_console.png',
|
||||
'vm_new.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '32x32', 'cat': 'actions'}
|
||||
endforeach
|
7
data/icons/32x32/apps/meson.build
Normal file
7
data/icons/32x32/apps/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
icons = files(
|
||||
'virt-manager.png'
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '32x32', 'cat': 'apps'}
|
||||
endforeach
|
3
data/icons/32x32/meson.build
Normal file
3
data/icons/32x32/meson.build
Normal file
@ -0,0 +1,3 @@
|
||||
subdir('actions')
|
||||
subdir('apps')
|
||||
subdir('status')
|
9
data/icons/32x32/status/meson.build
Normal file
9
data/icons/32x32/status/meson.build
Normal file
@ -0,0 +1,9 @@
|
||||
icons = files(
|
||||
'state_paused.png',
|
||||
'state_running.png',
|
||||
'state_shutoff.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '32x32', 'cat': 'status'}
|
||||
endforeach
|
10
data/icons/48x48/actions/meson.build
Normal file
10
data/icons/48x48/actions/meson.build
Normal file
@ -0,0 +1,10 @@
|
||||
icons = files(
|
||||
'vm_clone_wizard.png',
|
||||
'vm_delete_wizard.png',
|
||||
'vm_import_wizard.png',
|
||||
'vm_new_wizard.png',
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '48x48', 'cat': 'actions'}
|
||||
endforeach
|
7
data/icons/48x48/apps/meson.build
Normal file
7
data/icons/48x48/apps/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
icons = files(
|
||||
'virt-manager.png'
|
||||
)
|
||||
|
||||
foreach icon : icons
|
||||
install_icons += {'file': icon, 'size': '48x48', 'cat': 'apps'}
|
||||
endforeach
|
2
data/icons/48x48/meson.build
Normal file
2
data/icons/48x48/meson.build
Normal file
@ -0,0 +1,2 @@
|
||||
subdir('actions')
|
||||
subdir('apps')
|
20
data/icons/meson.build
Normal file
20
data/icons/meson.build
Normal file
@ -0,0 +1,20 @@
|
||||
install_icons = []
|
||||
|
||||
subdir('16x16')
|
||||
subdir('22x22')
|
||||
subdir('24x24')
|
||||
subdir('32x32')
|
||||
subdir('48x48')
|
||||
subdir('256x256')
|
||||
|
||||
foreach icon : install_icons
|
||||
if icon['cat'] == 'apps'
|
||||
icon_dir = datadir / 'icons' / 'hicolor' / icon['size'] / 'apps'
|
||||
else
|
||||
icon_dir = pkgdir / 'icons' / 'hicolor' / icon['size'] / icon['cat']
|
||||
endif
|
||||
install_data(
|
||||
icon['file'],
|
||||
install_dir: icon_dir,
|
||||
)
|
||||
endforeach
|
@ -17,3 +17,5 @@ foreach script: ['virt-install', 'virt-clone', 'virt-xml']
|
||||
install_dir: datadir / 'bash-completion' / 'completions',
|
||||
)
|
||||
endforeach
|
||||
|
||||
subdir('icons')
|
||||
|
@ -8,6 +8,7 @@ python3 = python.find_installation('python3')
|
||||
|
||||
prefix = get_option('prefix')
|
||||
datadir = prefix / get_option('datadir')
|
||||
pkgdir = datadir / 'virt-manager'
|
||||
|
||||
# figure out if we are building from git
|
||||
git = run_command('test', '-e', '.git', check: false).returncode() == 0
|
||||
|
19
setup.py
19
setup.py
@ -160,27 +160,8 @@ from %(pkgname)s import %(filename)s
|
||||
make_script("virtManager", "virtmanager", "virt-manager")
|
||||
|
||||
|
||||
def _build_icons(self):
|
||||
for size in glob.glob(os.path.join("data/icons", "*")):
|
||||
for category in glob.glob(os.path.join(size, "*")):
|
||||
icons = []
|
||||
for icon in glob.glob(os.path.join(category, "*")):
|
||||
icons.append(icon)
|
||||
if not icons:
|
||||
continue
|
||||
|
||||
category = os.path.basename(category)
|
||||
dest = ("share/icons/hicolor/%s/%s" %
|
||||
(os.path.basename(size), category))
|
||||
if category != "apps":
|
||||
dest = dest.replace("share/", "share/virt-manager/")
|
||||
|
||||
self.distribution.data_files.append((dest, icons))
|
||||
|
||||
|
||||
def run(self):
|
||||
self._make_bin_wrappers()
|
||||
self._build_icons()
|
||||
|
||||
self.run_command("build_i18n")
|
||||
super().run()
|
||||
|
Loading…
Reference in New Issue
Block a user