def __location_button_clicked(self, *whatever): path = moo.file_dialogp(self.xml.w_dialog, moo.FILE_DIALOG_OPEN_DIR, self.xml.w_location.get_text(), _("Choose Folder"), mprj.utils.prefs_key('new_project_dir')) if path: self.xml.w_location.set_text(path)
def open_project_cb(self, window): filename = moo.file_dialogp(parent=window, title=_("Open Project"), prefs_key="Plugins/Project/last_dir") if not filename: return try: self.open_project(window, filename) except Exception, e: self.bad_project(window, filename, e)