Пример #1
0
 def setup_thread(self, importer, label, connect_follow_up=True):
     tm = get_thread_manager()
     tm.add_thread(importer)
     tmg = get_thread_manager_gui()
     tmg.register_thread_with_dialog(label, importer)
     if connect_follow_up:
         importer.connect('completed', self.follow_up, importer)
Пример #2
0
 def setup_thread(self, importer, label, connect_follow_up=True):
     tm = get_thread_manager()
     tm.add_thread(importer)
     tmg = get_thread_manager_gui()
     tmg.register_thread_with_dialog(label, importer)
     if connect_follow_up:
         importer.connect("completed", self.follow_up, importer)
Пример #3
0
 def do_multiple_export (self, recs, fn, exp_type=None,
                                        setup_gui=True, extra_prefs=EXTRA_PREFS_AUTOMATIC):
         myexp, exporterInstance = self.get_multiple_exporter(recs,fn,exp_type,setup_gui,extra_prefs)
         tm = get_thread_manager()
         tm.add_thread(exporterInstance)
         if setup_gui:
             tmg = get_thread_manager_gui()
             tmg.register_thread_with_dialog(_('Export')+'('+myexp.label+')',exporterInstance)
             tmg.show()
         print 'Return exporter instance'
         return exporterInstance        
Пример #4
0
 def do_multiple_export (self, recs, fn, exp_type=None,
                                        setup_gui=True, extra_prefs=EXTRA_PREFS_AUTOMATIC):
         myexp, exporterInstance = self.get_multiple_exporter(recs,fn,exp_type,setup_gui,extra_prefs)
         tm = get_thread_manager()
         tm.add_thread(exporterInstance)
         if setup_gui:
             tmg = get_thread_manager_gui()
             tmg.register_thread_with_dialog(_('Export')+'('+myexp.label+')',exporterInstance)
             tmg.show()
         print 'Return exporter instance'
         return exporterInstance        
Пример #5
0
 def setup_thread (self, importer, label, connect_follow_up=True):
     tm = get_thread_manager()
     tm.add_thread(importer)
     tmg = get_thread_manager_gui()
     tmg.register_thread_with_dialog(label,
                                     _('Recipes successfully imported'),
                                     importer)
     tmg.show()
     if connect_follow_up:
         importer.connect('completed',
                          self.follow_up,
                          importer
                          )
Пример #6
0
 def do_multiple_export (self, recs, fn, exp_type=None,
                                        setup_gui=True, extra_prefs=EXTRA_PREFS_AUTOMATIC):
         myexp, exporterInstance = self.get_multiple_exporter(recs,fn,exp_type,setup_gui,extra_prefs)
         tm = get_thread_manager()
         tm.add_thread(exporterInstance)
         if setup_gui:
             tmg = get_thread_manager_gui()
             tmg.register_thread_with_dialog(_('Export')+' ('+myexp.label+')',
                                             exporterInstance)
             exporterInstance.connect('completed', tmg.notification_thread_done,
                 _('Recipes successfully exported to <a href="file:///%s">%s</a>')%(fn,fn))
             tmg.show()
         print 'Return exporter instance'
         return exporterInstance        
Пример #7
0
 def do_multiple_export (self, recs, fn, exp_type=None,
                                        setup_gui=True, extra_prefs=EXTRA_PREFS_AUTOMATIC):
         myexp, exporterInstance = self.get_multiple_exporter(recs,fn,exp_type,setup_gui,extra_prefs)
         tm = get_thread_manager()
         tm.add_thread(exporterInstance)
         if setup_gui:
             tmg = get_thread_manager_gui()
             tmg.register_thread_with_dialog(_('Export')+' ('+myexp.label+')',
                                             exporterInstance)
             exporterInstance.connect('completed', tmg.notification_thread_done,
                 _('Recipes successfully exported to <a href="file:///%s">%s</a>')%(fn,fn))
             tmg.show()
         print('Return exporter instance')
         return exporterInstance
Пример #8
0
 def do_multiple_export(self, recs, fn, exp_type=None, setup_gui=True, extra_prefs=EXTRA_PREFS_AUTOMATIC):
     myexp, exporterInstance = self.get_multiple_exporter(recs, fn, exp_type, setup_gui, extra_prefs)
     tm = get_thread_manager()
     tm.add_thread(exporterInstance)
     if setup_gui:
         tmg = get_thread_manager_gui()
         tmg.register_thread_with_dialog(
             _("Export") + " (" + myexp.label + ")",
             _('Recipes successfully exported to <a href="file:///%s">%s</a>') % (fn, fn),
             exporterInstance,
         )
         tmg.show()
     print "Return exporter instance"
     return exporterInstance