Include in backups working and editable. Type and installed_by_rpm displayed.

This commit is contained in:
Agnieszka Kostrzewa 2012-03-07 20:42:18 +01:00
parent bb00821124
commit 4168cc11fc
3 changed files with 17 additions and 5 deletions

View File

@ -55,7 +55,6 @@ class BackupVMsWindow(Ui_Backup, QWizard):
__pyqtSignals__ = ("backup_progress(int)",)
excluded = []
to_backup = []
def __init__(self, app, qvm_collection, blk_manager, parent=None):
super(BackupVMsWindow, self).__init__(parent)
@ -109,8 +108,10 @@ class BackupVMsWindow(Ui_Backup, QWizard):
self.excluded.append(vm.name)
continue
self.to_backup.append(vm.name)
self.select_vms_widget.available_list.addItem(vm.name)
if vm.include_in_backups == True:
self.select_vms_widget.selected_list.addItem(vm.name)
else:
self.select_vms_widget.available_list.addItem(vm.name)
def dev_combobox_activated(self, idx):

View File

@ -206,6 +206,15 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
else:
self.netVM.setEnabled(False)
self.include_in_backups.setChecked(self.vm.include_in_backups)
#type
self.type_label.setText(self.vm.type)
#installed by rpm
text = "Yes" if self.vm.installed_by_rpm == True else "No"
self.rpm_label.setText(text)
#self.vmname.selectAll()
#self.vmname.setFocus()
@ -270,7 +279,9 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
if res != 0:
msg.append("Error while setting netVM!")
#include in backups
self.vm.include_in_backups = self.include_in_backups.isChecked()
return msg

View File

@ -87,7 +87,7 @@
<widget class="QComboBox" name="netVM"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox">
<widget class="QCheckBox" name="include_in_backups">
<property name="enabled">
<bool>true</bool>
</property>