def get_fct_file(self): temp_file="" dialog = gtk.FileChooserDialog("Choose keyframe...",None,gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) #----setting filters--------- filter = gtk.FileFilter() filter.set_name("gnofract4d files (*.fct)") filter.add_pattern("*.fct") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) #---------------------------- response = dialog.run() if response == gtk.RESPONSE_OK: temp_file=dialog.get_filename() dialog.destroy() return temp_file
def get_cfg_file_save(self): temp_file="" dialog = gtk.FileChooserDialog("Save animation...",None,gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_current_name("animation.fcta") #----setting filters--------- filter = gtk.FileFilter() filter.set_name("gnofract4d animation files (*.fcta)") filter.add_pattern("*.fcta") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) #---------------------------- response = dialog.run() if response == gtk.RESPONSE_OK: temp_file=dialog.get_filename() dialog.destroy() return temp_file
def get_cfg_file_open(self): temp_file="" dialog = gtk.FileChooserDialog("Choose animation...",None,gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) #----setting filters--------- filter = gtk.FileFilter() filter.set_name("gnofract4d animation files (*.fcta)") filter.add_pattern("*.fcta") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) #---------------------------- response = dialog.run() if response == gtk.RESPONSE_OK: temp_file=dialog.get_filename() #elif response == gtk.RESPONSE_CANCEL: # print 'Closed, no files selected' dialog.destroy() return temp_file
def get_fct_file(self): temp_file = "" dialog = gtk.FileChooserDialog("Choose keyframe...", None, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) #----setting filters--------- filter = gtk.FileFilter() filter.set_name("gnofract4d files (*.fct)") filter.add_pattern("*.fct") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) #---------------------------- response = dialog.run() if response == gtk.RESPONSE_OK: temp_file = dialog.get_filename() dialog.destroy() return temp_file
def get_cfg_file_save(self): temp_file = "" dialog = gtk.FileChooserDialog("Save animation...", None, gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_current_name("animation.fcta") #----setting filters--------- filter = gtk.FileFilter() filter.set_name("gnofract4d animation files (*.fcta)") filter.add_pattern("*.fcta") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) #---------------------------- response = dialog.run() if response == gtk.RESPONSE_OK: temp_file = dialog.get_filename() dialog.destroy() return temp_file
def get_cfg_file_open(self): temp_file = "" dialog = gtk.FileChooserDialog("Choose animation...", None, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) #----setting filters--------- filter = gtk.FileFilter() filter.set_name("gnofract4d animation files (*.fcta)") filter.add_pattern("*.fcta") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) #---------------------------- response = dialog.run() if response == gtk.RESPONSE_OK: temp_file = dialog.get_filename() #elif response == gtk.RESPONSE_CANCEL: # print 'Closed, no files selected' dialog.destroy() return temp_file