def on_edit_clicked(self):
   """Show a dialog to edit an ISV source"""
   item = self.userinterface.treeview_sources.currentItem()
   if item is not None:
       index = self.userinterface.treeview_sources.indexOfTopLevelItem(item)
       dialogue = DialogEdit(self.userinterface, self.sourceslist, self.isv_sources[index], self.datadir)
       result = dialogue.run()
       if result == QDialog.Accepted:
           self.set_modified_sourceslist()
           self.show_isv_sources()
示例#2
0
 def on_edit_clicked(self, widget):
     """Show a dialog to edit an ISV source"""
     sel = self.treeview_sources.get_selection()
     (model, iter) = sel.get_selected()
     if not iter:
         return
     source_entry = model.get_value(iter, LIST_ENTRY_OBJ)
     dialog = DialogEdit(self.window_main, self.sourceslist, source_entry,
                         self.datadir)
     if dialog.run() == gtk.RESPONSE_OK:
         self.set_modified_sourceslist()
 def on_edit_clicked(self, widget):
   """Show a dialog to edit an ISV source"""
   sel = self.treeview_sources.get_selection()
   (model, iter) = sel.get_selected()
   if not iter:
     return
   source_entry = model.get_value(iter, LIST_ENTRY_OBJ)
   dialog = DialogEdit(self.window_main, self.sourceslist,
                       source_entry, self.datadir)
   if dialog.run() == gtk.RESPONSE_OK:
       self.set_modified_sourceslist()
 def on_edit_clicked(self, widget):
   """Show a dialog to edit an ISV source"""
   sel = self.treeview_sources.get_selection()
   (model, iter) = sel.get_selected()
   if not iter:
     return
   old_source_entry = model.get_value(iter, LIST_ENTRY_OBJ)
   dialog = DialogEdit(self.window_main, self.sourceslist,
                       old_source_entry, self.datadir)
   if dialog.run() == Gtk.ResponseType.OK:
       self.backend.ReplaceSourceEntry(str(old_source_entry), 
                                       str(dialog.new_source_entry))
示例#5
0
 def on_edit_clicked(self):
     """Show a dialog to edit an ISV source"""
     item = self.userinterface.treeview_sources.currentItem()
     if item is not None:
         index = self.userinterface.treeview_sources.indexOfTopLevelItem(
             item)
         dialogue = DialogEdit(self.userinterface, self.sourceslist,
                               self.isv_sources[index], self.datadir)
         self.translate_widget_children(dialogue)
         result = dialogue.run()
         if result == QDialog.Accepted:
             self.set_modified_sourceslist()
             self.show_isv_sources()