Esempio n. 1
0
 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()
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 def _open_folder():
     directory = os.path.dirname(file.filepath)
     helpers.open_file(directory)
Esempio n. 5
0
 def _open_file():
     helpers.open_file(file.filepath)
Esempio n. 6
0
 def _on_open_folder_menuitem_activate(self, menu, data):
     open_file(self.directory)
Esempio n. 7
0
 def _on_open_debug_logs(*args):
     open_file(configpaths.get('DEBUG'))
Esempio n. 8
0
 def _on_debug_folder_clicked(self, _widget):
     open_file(configpaths.get('DEBUG'))