settings: mark template as read-only when the VM is running

This commit is contained in:
Marek Marczykowski-Górecki 2015-04-05 21:03:41 +02:00
parent 8cd3cace49
commit 4e5f63be24
2 changed files with 2 additions and 1 deletions

View File

@ -250,6 +250,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
self.template_name.insertItem(i, text)
i += 1
self.template_name.setCurrentIndex(self.template_idx)
self.template_name.setEnabled(not self.vm.is_running())
else:
self.template_name.setEnabled(False)
self.template_idx = -1

View File

@ -65,7 +65,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Template:</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Template&lt;span style=&quot; color:#ff0000;&quot;&gt;*&lt;/span&gt;:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="buddy">
<cstring>template_name</cstring>