예제 #1
0
 def open_file(self, file):
     """Show a confirmation for adding the channels of the specified file"""
     dialog = DialogAddSourcesList(self.window_main, self.sourceslist,
                                   self.render_source, self.get_comparable,
                                   self.datadir, file)
     (res, new_sources) = dialog.run()
     if res == RESPONSE_REPLACE:
         self.sourceslist.list = []
     if res in (RESPONSE_ADD, RESPONSE_REPLACE):
         for source in new_sources:
             self.sourceslist.add(source.type, source.uri, source.dist,
                                  source.comps, source.comment)
         self.set_modified_sourceslist()