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)",) __pyqtSignals__ = ("backup_progress(int)",)
excluded = [] excluded = []
to_backup = []
def __init__(self, app, qvm_collection, blk_manager, parent=None): def __init__(self, app, qvm_collection, blk_manager, parent=None):
super(BackupVMsWindow, self).__init__(parent) super(BackupVMsWindow, self).__init__(parent)
@ -109,7 +108,9 @@ class BackupVMsWindow(Ui_Backup, QWizard):
self.excluded.append(vm.name) self.excluded.append(vm.name)
continue continue
self.to_backup.append(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) self.select_vms_widget.available_list.addItem(vm.name)

View File

@ -206,6 +206,15 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
else: else:
self.netVM.setEnabled(False) 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.selectAll()
#self.vmname.setFocus() #self.vmname.setFocus()
@ -271,6 +280,8 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
if res != 0: if res != 0:
msg.append("Error while setting netVM!") msg.append("Error while setting netVM!")
#include in backups
self.vm.include_in_backups = self.include_in_backups.isChecked()
return msg return msg

View File

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