Merge branch 'master' of git://git.assembla.com/fpdboz
Conflicts: pyfpdb/fpdb_simple.py
This commit is contained in:
		
						commit
						3cfea4eb30
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
					@ -22,6 +22,7 @@ import pygtk
 | 
				
			||||||
pygtk.require('2.0')
 | 
					pygtk.require('2.0')
 | 
				
			||||||
import gtk
 | 
					import gtk
 | 
				
			||||||
import os #todo: remove this once import_dir is in fpdb_import
 | 
					import os #todo: remove this once import_dir is in fpdb_import
 | 
				
			||||||
 | 
					from time import time
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class GuiBulkImport (threading.Thread):
 | 
					class GuiBulkImport (threading.Thread):
 | 
				
			||||||
	def import_dir(self):
 | 
						def import_dir(self):
 | 
				
			||||||
| 
						 | 
					@ -29,8 +30,9 @@ class GuiBulkImport (threading.Thread):
 | 
				
			||||||
		self.path=self.inputFile
 | 
							self.path=self.inputFile
 | 
				
			||||||
		self.importer.addImportDirectory(self.path)
 | 
							self.importer.addImportDirectory(self.path)
 | 
				
			||||||
		self.importer.setCallHud(False)
 | 
							self.importer.setCallHud(False)
 | 
				
			||||||
 | 
							starttime = time()
 | 
				
			||||||
		self.importer.runImport()
 | 
							self.importer.runImport()
 | 
				
			||||||
		print "GuiBulkImport.import_dir done"
 | 
							print "GuiBulkImport.import_dir done in %s" %(time() - starttime)
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	def load_clicked(self, widget, data=None):
 | 
						def load_clicked(self, widget, data=None):
 | 
				
			||||||
		self.inputFile=self.chooser.get_filename()
 | 
							self.inputFile=self.chooser.get_filename()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -81,20 +81,23 @@ class fpdb_db:
 | 
				
			||||||
	def create_tables(self):
 | 
						def create_tables(self):
 | 
				
			||||||
		#todo: should detect and fail gracefully if tables already exist.
 | 
							#todo: should detect and fail gracefully if tables already exist.
 | 
				
			||||||
		self.cursor.execute(self.sql.query['createSettingsTable'])
 | 
							self.cursor.execute(self.sql.query['createSettingsTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createSitesTable'])
 | 
							self.cursor.execute(self.sql.query['createSitesTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createGametypesTable'])
 | 
							self.cursor.execute(self.sql.query['createGametypesTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createPlayersTable'])
 | 
							self.cursor.execute(self.sql.query['createPlayersTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createAutoratesTable'])
 | 
							self.cursor.execute(self.sql.query['createAutoratesTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createHandsTable'])
 | 
							self.cursor.execute(self.sql.query['createHandsTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createBoardCardsTable'])
 | 
							self.cursor.execute(self.sql.query['createBoardCardsTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createTourneyTypesTable'])
 | 
							self.cursor.execute(self.sql.query['createTourneyTypesTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createTourneysTable'])
 | 
							self.cursor.execute(self.sql.query['createTourneysTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createTourneysPlayersTable'])
 | 
							self.cursor.execute(self.sql.query['createTourneysPlayersTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createHandsPlayersTable'])
 | 
							self.cursor.execute(self.sql.query['createHandsPlayersTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createHandsActionsTable'])
 | 
							self.cursor.execute(self.sql.query['createHandsActionsTable'])
 | 
				
			||||||
                self.cursor.execute(self.sql.query['createHudCacheTable'])
 | 
							self.cursor.execute(self.sql.query['createHudCacheTable'])
 | 
				
			||||||
 | 
							self.cursor.execute(self.sql.query['addTourneyIndex'])
 | 
				
			||||||
 | 
							self.cursor.execute(self.sql.query['addHandsIndex'])
 | 
				
			||||||
 | 
							self.cursor.execute(self.sql.query['addPlayersIndex'])
 | 
				
			||||||
		self.fillDefaultData()
 | 
							self.fillDefaultData()
 | 
				
			||||||
                self.db.commit()
 | 
							self.db.commit()
 | 
				
			||||||
#end def disconnect
 | 
					#end def disconnect
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def drop_tables(self):
 | 
						def drop_tables(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user