Esempio n. 1
0
    def on_buttonOpenInfo_clicked(button=None):
	dialog = FileManager()
	print shared.get_last_dir()
	dialog.set_lastdir(shared.get_last_dir())        
	fname = dialog.get_filename('Choose info file') #using gtkutils to modernize file dlg -eli
        #dialog.set_transient_for(widgets['dlgReader'])
        #dialog.set_filename(widgets['entryInfoFile'].get_text() or
                            #shared.get_last_dir())
        #response = dialog.run()
        #fname = dialog.get_filename()
        #dialog.destroy()
        #if response == gtk.RESPONSE_OK:
        if widgets.load_params_from_file(fname):
	    GladeHandlers.__dict__['on_buttonPreview_clicked']()
	    shared.set_file_selection(fname)
Esempio n. 2
0
    def load_from(self, button):
        dialog = FileManager()  #modernizing the dialog box
        dialog.set_lastdir(shared.get_last_dir())
        fname = dialog.get_filename('Choose filename for marker info')
        #dialog = gtk.FileSelection()

        #dialog.show()
        #response = dialog.run()

        #if response==gtk.RESPONSE_OK:
        #    fname = dialog.get_filename()
        #    dialog.destroy()
        try:
            EventHandler().load_markers_from(fname)
        except IOError:
            error_msg('Could not load markers from %s' % fname, )
        else:
            shared.set_file_selection(fname)
            self.fileName = fname
    def load_from(self, button):
	dialog = FileManager() #modernizing the dialog box
	dialog.set_lastdir(shared.get_last_dir())	
	fname = dialog.get_filename('Choose filename for marker info')
        #dialog = gtk.FileSelection()
        
        #dialog.show()        
        #response = dialog.run()
        
        #if response==gtk.RESPONSE_OK:
        #    fname = dialog.get_filename()
        #    dialog.destroy()
        try: EventHandler().load_markers_from(fname)
        except IOError:
            error_msg(
                'Could not load markers from %s' % fname, 
                )
        else:
            shared.set_file_selection(fname)
            self.fileName = fname