No Dom0 label in settings

This commit is contained in:
Agnieszka Kostrzewa 2012-04-27 11:54:53 +02:00
parent b8733f2b70
commit b140d0e2cf

View File

@ -191,6 +191,10 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
#self.qvm_collection.load()
#self.qvm_collection.unlock_db()
if self.vm.qid == 0:
self.vmlabel.setVisible(False)
else:
self.vmlabel.setVisible(True)
self.label_list = QubesVmLabels.values()
self.label_list.sort(key=lambda l: l.index)
self.label_idx = 0
@ -296,6 +300,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
msg.append(str(ex))
#vm label changed
if self.vmlabel.isVisible():
if self.vmlabel.currentIndex() != self.label_idx:
label = self.label_list[self.vmlabel.currentIndex()]
self.vm.label = label