fpdb.pyw: Update menu to call tourney import

This commit is contained in:
Worros 2010-11-10 11:49:49 +08:00
parent 1c81df21ce
commit 281aaf7545

View File

@ -106,6 +106,7 @@ import GuiPrefs
import GuiLogView import GuiLogView
import GuiDatabase import GuiDatabase
import GuiBulkImport import GuiBulkImport
import GuiTourneyImport
import GuiImapFetcher import GuiImapFetcher
import GuiRingPlayerStats import GuiRingPlayerStats
import GuiTourneyPlayerStats import GuiTourneyPlayerStats
@ -763,6 +764,7 @@ class fpdb:
</menu> </menu>
<menu action="import"> <menu action="import">
<menuitem action="bulkimp"/> <menuitem action="bulkimp"/>
<menuitem action="tourneyimp"/>
<menuitem action="imapimport"/> <menuitem action="imapimport"/>
<menuitem action="autoimp"/> <menuitem action="autoimp"/>
</menu> </menu>
@ -805,6 +807,7 @@ class fpdb:
('Preferences', None, _('Pre_ferences'), _('<control>F'), 'Edit your preferences', self.dia_preferences), ('Preferences', None, _('Pre_ferences'), _('<control>F'), 'Edit your preferences', self.dia_preferences),
('import', None, _('_Import')), ('import', None, _('_Import')),
('bulkimp', None, _('_Bulk Import'), _('<control>B'), 'Bulk Import', self.tab_bulk_import), ('bulkimp', None, _('_Bulk Import'), _('<control>B'), 'Bulk Import', self.tab_bulk_import),
('tourneyimp', None, _('Tournament _Results Import'), _('<control>R'), 'Tournament Results Import', self.tab_tourney_import),
('imapimport', None, _('_Import through eMail/IMAP'), _('<control>I'), 'Import through eMail/IMAP', self.tab_imap_import), ('imapimport', None, _('_Import through eMail/IMAP'), _('<control>I'), 'Import through eMail/IMAP', self.tab_imap_import),
('viewers', None, _('_Viewers')), ('viewers', None, _('_Viewers')),
('autoimp', None, _('_Auto Import and HUD'), _('<control>A'), 'Auto Import and HUD', self.tab_auto_import), ('autoimp', None, _('_Auto Import and HUD'), _('<control>A'), 'Auto Import and HUD', self.tab_auto_import),
@ -996,6 +999,13 @@ class fpdb:
bulk_tab=new_import_thread.get_vbox() bulk_tab=new_import_thread.get_vbox()
self.add_and_display_tab(bulk_tab, _("Bulk Import")) self.add_and_display_tab(bulk_tab, _("Bulk Import"))
def tab_tourney_import(self, widget, data=None):
"""opens a tab for bulk importing"""
new_import_thread = GuiTourneyImport.GuiTourneyImport(self.settings, self.config, self.sql, self.window)
self.threads.append(new_import_thread)
bulk_tab=new_import_thread.get_vbox()
self.add_and_display_tab(bulk_tab, _("Tournament Results Import"))
def tab_imap_import(self, widget, data=None): def tab_imap_import(self, widget, data=None):
new_thread = GuiImapFetcher.GuiImapFetcher(self.config, self.db, self.sql, self.window) new_thread = GuiImapFetcher.GuiImapFetcher(self.config, self.db, self.sql, self.window)
self.threads.append(new_thread) self.threads.append(new_thread)