示例#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()
示例#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)
示例#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)
示例#4
0
 def _open_folder():
     directory = os.path.dirname(file.filepath)
     helpers.open_file(directory)
示例#5
0
 def _open_file():
     helpers.open_file(file.filepath)
示例#6
0
 def _on_open_folder_menuitem_activate(self, menu, data):
     open_file(self.directory)
示例#7
0
文件: preferences.py 项目: 72Zn/gajim
 def _on_open_debug_logs(*args):
     open_file(configpaths.get('DEBUG'))
示例#8
0
 def _on_debug_folder_clicked(self, _widget):
     open_file(configpaths.get('DEBUG'))