def on_open(widget, file_props): dialog.destroy() if not file_props.file_name: return path = os.path.split(file_props.file_name)[0] if os.path.exists(path) and os.path.isdir(path): open_file(path) self._ui.transfers_list.get_selection().unselect_all()
def _on_open_menuitem_activate(self, menu, data): filepath = data['filepath'] original_filename = data['original_filename'] url = data['url'] if original_filename.startswith('location_'): open_uri(url) return open_file(filepath)
def _on_open_folder_menuitem_activate(self, widget): selected = self._ui.transfers_list.get_selection().get_selected() if not selected or not selected[1]: return s_iter = selected[1] sid = self.model[s_iter][Column.SID] file_props = FilesProp.getFilePropByType(sid[0], sid[1:]) if not file_props.file_name: return path = os.path.split(file_props.file_name)[0] if os.path.exists(path) and os.path.isdir(path): open_file(path)
def _open_folder(): directory = os.path.dirname(file.filepath) helpers.open_file(directory)
def _open_file(): helpers.open_file(file.filepath)
def _on_open_folder_menuitem_activate(self, menu, data): open_file(self.directory)
def _on_open_debug_logs(*args): open_file(configpaths.get('DEBUG'))
def _on_debug_folder_clicked(self, _widget): open_file(configpaths.get('DEBUG'))