Source

vpackager / src / vpackager / viewcontrollers.py

Diff from to

src/vpackager/viewcontrollers.py

         dia.set_patches(cur_details['patches'].split(','))
         dia.set_config(cur_details['config'])
         dia.set_doinst(cur_details['doinstURI'])
+        # Determine the source type and pre-set it back on the drop box
+        _type = cur_details['type']
+        if _type == 'autotools':
+            _typeid = 1
+        elif _type == 'python':
+            _typeid = 2
+        elif _type == 'cmake':
+            _typeid = 3
+        elif _type == 'perl':
+            _typeid = 4
+        elif _type == 'waf':
+            _typeid = 5
+        else:
+            _typeid = 0
+        # Set the dropbox value to the determined source type
+        dia.srcTypeSel.set_active(_typeid)
+        # Set the install? checkbox value
+        dia.cbinstallpkg.set_active(cur_details['install'] == '1')
 
         res = dia.run()
         dia.hide()
         """ Connect observers to the signalers"""
         self.model.add_observer(self.view.Update_TableView, table='history')
 
-
     def refresh_view(self):
         """ Refreh the GUI representation of the history"""
         return self.model.RefreshHistory()