Mercurial > pyarq-presupuestos
diff Gtk/importFiebdc.py @ 16:60bc5117926c
no durus
author | Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es> |
---|---|
date | Fri, 19 Apr 2013 00:04:20 +0200 |
parents | fe9c55f86698 |
children | 7bd4ca56607d |
line wrap: on
line diff
--- a/Gtk/importFiebdc.py Sun Jan 02 10:27:16 2011 +0100 +++ b/Gtk/importFiebdc.py Fri Apr 19 00:04:20 2013 +0200 @@ -33,7 +33,7 @@ # pyArq-Presupuestos Modules from Generic import utils from Generic import globalVars -from Generic import durusdatabase +#from Generic import durusdatabase import gui class FileSelectionWindow(object): @@ -93,11 +93,11 @@ buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN,gtk.RESPONSE_OK)) self.__window.set_default_response(gtk.RESPONSE_OK) - if self.__filetype == "budget" or self.__filetype == "database": - self.__window.set_current_folder(globalVars.getHomePath("BUDGET")) - else: # "durus" - self.__window.set_current_folder( - globalVars.getHomePath("DURUS-DATABASE")) + #if self.__filetype == "budget" or self.__filetype == "database": + self.__window.set_current_folder(globalVars.getHomePath("BUDGET")) + #else: # "durus" + # self.__window.set_current_folder( + # globalVars.getHomePath("DURUS-DATABASE")) if self.__window.run() == gtk.RESPONSE_OK: self._openFile(self.__window.get_filename()) self.__window.destroy() @@ -133,8 +133,8 @@ if (self.__filetype == "budget" or self.__filetype == "database") and \ _filename_ext != "bc3" and _filename_ext != "BC3": print _("The file must have 'bc3' extension") - elif self.__filetype == "durus" and _filename_ext != "durus": - print _("The file must have 'durus' extension") + #elif self.__filetype == "durus" and _filename_ext != "durus": + # print _("The file must have 'durus' extension") else: self.__window.destroy() # TODO: the file exits? is it not binary?, can it be readed? @@ -423,23 +423,23 @@ else: _mainWindow = self.__mainWindow self.__page.threadFinishedSignal(_budget) - if self.__filetype == "database": - self.saveDurusDatabase() + #if self.__filetype == "database": + # self.saveDurusDatabase() self.clear() - def saveDurusDatabase(self): - _path = globalVars.getHomePath("DURUS-DATABASE") - _file_whit_path_bc3 = self.__budget.filename - _filename_bc3 = _file_whit_path_bc3.split("/")[-1] - _filename = _filename_bc3.split(".")[-2] - _file = _path + _filename + ".durus" - print utils.mapping(_("Saving file: $1"), (_file,)) - _time = time.time() - _durus_file = durusdatabase.DurusFile(_file,True) - _durus_file.setBudget(self.__budget) - _durus_file.close() - print utils.mapping(_("Saving time: $1 seconds"), - (("%.2f" %(time.time()-_time) ),)) + #def saveDurusDatabase(self): + # _path = globalVars.getHomePath("DURUS-DATABASE") + # _file_whit_path_bc3 = self.__budget.filename + # _filename_bc3 = _file_whit_path_bc3.split("/")[-1] + # _filename = _filename_bc3.split(".")[-2] + # _file = _path + _filename + ".durus" + # print utils.mapping(_("Saving file: $1"), (_file,)) + # _time = time.time() + # _durus_file = durusdatabase.DurusFile(_file,True) + # _durus_file.setBudget(self.__budget) + # _durus_file.close() + # print utils.mapping(_("Saving time: $1 seconds"), + # (("%.2f" %(time.time()-_time) ),)) def cancel(self): """cancel(self) @@ -464,4 +464,4 @@ del self.__budget del self.__filename del self.__cancelMethod - del self.__cancel \ No newline at end of file + del self.__cancel