Пример #1
0
    def on_main_window_drag_data_received(self, window, drag_context, x, y, data, info, time):
        """从其它程序拖放目录/文件, 以便上传.

        这里, 会弹出一个选择目标文件夹的对话框
        """
        if not self.profile:
            return
        if info == TargetInfo.URI_LIST:
            uris = data.get_uris()
            source_paths = util.uris_to_paths(uris)
            if source_paths:
                self.upload_page.upload_files(source_paths)
Пример #2
0
    def on_main_window_drag_data_received(self, window, drag_context, x, y,
                                          data, info, time):
        '''从其它程序拖放目录/文件, 以便上传.

        这里, 会弹出一个选择目标文件夹的对话框
        '''
        if not self.profile:
            return
        if info == TargetInfo.URI_LIST:
            uris = data.get_uris()
            source_paths = util.uris_to_paths(uris)
            if source_paths:
                self.upload_page.upload_files(source_paths)
Пример #3
0
    def do_drag_data_received(self, drag_context, x, y, data, info, time):
        '''从其它程序拖放目录/文件, 以便上传.

        这里, 会直接把文件上传到当前目录(self.path).
        拖放事件已经被处理, 所以不会触发self.app.window的拖放动作.
        '''
        if not self.app.profile:
            return
        if info == TargetInfo.URI_LIST:
            uris = data.get_uris()
            source_paths = util.uris_to_paths(uris)
            if source_paths:
                self.app.upload_page.upload_files(source_paths, self.path)
Пример #4
0
    def do_drag_data_received(self, drag_context, x, y, data, info, time):
        '''从其它程序拖放目录/文件, 以便上传.

        这里, 会直接把文件上传到当前目录(self.path).
        拖放事件已经被处理, 所以不会触发self.app.window的拖放动作.
        '''
        if not self.app.profile:
            return
        if info == TargetInfo.URI_LIST:
            uris = data.get_uris()
            source_paths = util.uris_to_paths(uris)
            if source_paths:
                self.app.upload_page.upload_files(source_paths, self.path)
Пример #5
0
 def do_drag_data_received(self, drag_context, x, y, data, info, time):
     uris = data.get_text()
     source_paths = util.uris_to_paths(uris)
     if source_paths and self.app.profile:
         self.app.upload_page.add_file_tasks(source_paths, self.path)
Пример #6
0
 def do_drag_data_received(self, drag_context, x, y, data, info, time):
     '''从其它程序拖放目录/文件, 以便上传'''
     uris = data.get_text()
     source_paths = util.uris_to_paths(uris)
     if source_paths and self.app.profile:
         self.app.upload_page.add_file_tasks(source_paths, self.path)
Пример #7
0
 def on_main_window_drag_data_received(self, window, drag_context, x, y,
                                       data, info, time):
     uris = data.get_text()
     source_paths = util.uris_to_paths(uris)
     if source_paths and self.profile:
         self.upload_page.add_file_tasks(source_paths)