@@ -85,23 +85,24 @@ def _iouDeviceNewSlot(self):
8585 wizard .show ()
8686 if wizard .exec_ ():
8787
88- new_vm_settings = wizard .getSettings ()
89-
90- key = "{server}:{name}" .format (server = new_vm_settings ["server" ], name = new_vm_settings ["name" ])
91- self ._iou_devices [key ] = {"name" : new_vm_settings ["name" ],
92- "path" : new_vm_settings ["path" ],
93- "default_symbol" : new_vm_settings ["default_symbol" ],
94- "hover_symbol" : new_vm_settings ["hover_symbol" ],
95- "image" : os .path .basename (new_vm_settings ["path" ]),
96- "initial_config" : new_vm_settings ["initial_config" ],
88+ new_device_settings = wizard .getSettings ()
89+
90+ key = "{server}:{name}" .format (server = new_device_settings ["server" ], name = new_device_settings ["name" ])
91+ self ._iou_devices [key ] = {"name" : new_device_settings ["name" ],
92+ "path" : new_device_settings ["path" ],
93+ "default_symbol" : new_device_settings ["default_symbol" ],
94+ "hover_symbol" : new_device_settings ["hover_symbol" ],
95+ "category" : new_device_settings ["category" ],
96+ "image" : os .path .basename (new_device_settings ["path" ]),
97+ "initial_config" : new_device_settings ["initial_config" ],
9798 "use_default_iou_values" : True ,
9899 "ram" : 256 ,
99100 "nvram" : 128 ,
100101 "ethernet_adapters" : 2 ,
101102 "serial_adapters" : 2 ,
102- "server" : new_vm_settings ["server" ]}
103+ "server" : new_device_settings ["server" ]}
103104
104- self ._iou_devices [key ].update (new_vm_settings )
105+ self ._iou_devices [key ].update (new_device_settings )
105106 item = QtGui .QTreeWidgetItem (self .uiIOUDevicesTreeWidget )
106107 item .setText (0 , self ._iou_devices [key ]["name" ])
107108 item .setIcon (0 , QtGui .QIcon (self ._iou_devices [key ]["default_symbol" ]))
@@ -324,13 +325,15 @@ def _changeSymbolSlot(self):
324325 dialog .show ()
325326 if dialog .exec_ ():
326327 normal_symbol , selected_symbol = dialog .getSymbols ()
328+ category = dialog .getCategory ()
327329 item = self .uiIOUDevicesTreeWidget .currentItem ()
328330 if item :
329331 item .setIcon (0 , QtGui .QIcon (normal_symbol ))
330332 key = item .data (0 , QtCore .Qt .UserRole )
331333 iou_device = self ._iou_devices [key ]
332334 iou_device ["default_symbol" ] = normal_symbol
333335 iou_device ["hover_symbol" ] = selected_symbol
336+ iou_device ["category" ] = category
334337
335338 def loadPreferences (self ):
336339 """
0 commit comments