Added default_dispvm to Global Settings
Added "default dispvm" to Global Settings. references QubesOS/qubes-issues#3688
This commit is contained in:
		
							parent
							
								
									e1aca0a393
								
							
						
					
					
						commit
						7ed386985d
					
				| @ -90,6 +90,15 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings, | |||||||
|                 filter_function=(lambda vm: vm.klass == 'TemplateVM') |                 filter_function=(lambda vm: vm.klass == 'TemplateVM') | ||||||
|             ) |             ) | ||||||
| 
 | 
 | ||||||
|  |         # default dispvm | ||||||
|  |         self.default_dispvm_vmlist, self.default_dispvm_idx = \ | ||||||
|  |             utils.prepare_vm_choice( | ||||||
|  |                 self.default_dispvm_combo, | ||||||
|  |                 self.qvm_collection, 'default_dispvm', | ||||||
|  |                 None, | ||||||
|  |                 (lambda vm: getattr(vm, 'template_for_dispvms', False)) | ||||||
|  |             ) | ||||||
|  | 
 | ||||||
|     def __apply_system_defaults__(self): |     def __apply_system_defaults__(self): | ||||||
|         # upatevm |         # upatevm | ||||||
|         if self.qvm_collection.updatevm != \ |         if self.qvm_collection.updatevm != \ | ||||||
| @ -119,6 +128,14 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings, | |||||||
|                 self.default_template_vmlist[ |                 self.default_template_vmlist[ | ||||||
|                     self.default_template_combo.currentIndex()] |                     self.default_template_combo.currentIndex()] | ||||||
| 
 | 
 | ||||||
|  |         # default_dispvm | ||||||
|  |         if self.qvm_collection.default_dispvm != \ | ||||||
|  |                 self.default_dispvm_vmlist[ | ||||||
|  |                     self.default_dispvm_combo.currentIndex()]: | ||||||
|  |             self.qvm_collection.default_dispvm = \ | ||||||
|  |                 self.default_dispvm_vmlist[ | ||||||
|  |                     self.default_dispvm_combo.currentIndex()] | ||||||
|  | 
 | ||||||
|     def __init_kernel_defaults__(self): |     def __init_kernel_defaults__(self): | ||||||
|         self.kernels_list, self.kernels_idx = utils.prepare_kernel_choice( |         self.kernels_list, self.kernels_idx = utils.prepare_kernel_choice( | ||||||
|             self.default_kernel_combo, self.qvm_collection, 'default_kernel', |             self.default_kernel_combo, self.qvm_collection, 'default_kernel', | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ | |||||||
|    <rect> |    <rect> | ||||||
|     <x>0</x> |     <x>0</x> | ||||||
|     <y>0</y> |     <y>0</y> | ||||||
|     <width>651</width> |     <width>974</width> | ||||||
|     <height>386</height> |     <height>587</height> | ||||||
|    </rect> |    </rect> | ||||||
|   </property> |   </property> | ||||||
|   <property name="windowTitle"> |   <property name="windowTitle"> | ||||||
| @ -81,6 +81,16 @@ | |||||||
|       <item row="3" column="1"> |       <item row="3" column="1"> | ||||||
|        <widget class="QComboBox" name="default_template_combo"/> |        <widget class="QComboBox" name="default_template_combo"/> | ||||||
|       </item> |       </item> | ||||||
|  |       <item row="4" column="0"> | ||||||
|  |        <widget class="QLabel" name="label_8"> | ||||||
|  |         <property name="text"> | ||||||
|  |          <string>Default DispVM:</string> | ||||||
|  |         </property> | ||||||
|  |        </widget> | ||||||
|  |       </item> | ||||||
|  |       <item row="4" column="1"> | ||||||
|  |        <widget class="QComboBox" name="default_dispvm_combo"/> | ||||||
|  |       </item> | ||||||
|      </layout> |      </layout> | ||||||
|     </widget> |     </widget> | ||||||
|    </item> |    </item> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marta Marczykowska-Górecka
						Marta Marczykowska-Górecka