Beispiel #1
0
 def _reset(self):
     selected = self.files_widget.selectedIndexes()[0].row()
     file_status = self.files_status[selected]
     record_usage(file_reset=True)
     handle_error(self, reprounzip.upload(
         self.directory, file_status.name, None,
         unpacker=self.unpacker, root=self.root))
     self._file_changed()
Beispiel #2
0
 def _reset(self):
     selected = self.files_widget.selectedIndexes()[0].row()
     file_status = self.files_status[selected]
     handle_error(
         self,
         reprounzip.upload(self.directory,
                           file_status.name,
                           None,
                           unpacker=self.unpacker,
                           root=self.root))
     self._file_changed()
Beispiel #3
0
 def _upload(self):
     selected = self.files_widget.selectedIndexes()[0].row()
     file_status = self.files_status[selected]
     picked, _ = QtWidgets.QFileDialog.getOpenFileName(
         self, "Pick file to upload",
         QtCore.QDir.currentPath())
     if picked:
         record_usage(file_upload=True)
         handle_error(self, reprounzip.upload(
             self.directory, file_status.name, picked,
             unpacker=self.unpacker, root=self.root))
         self._file_changed()
Beispiel #4
0
 def _upload(self):
     selected = self.files_widget.selectedIndexes()[0].row()
     file_status = self.files_status[selected]
     picked = QtGui.QFileDialog.getOpenFileName(self, "Pick file to upload",
                                                QtCore.QDir.currentPath())
     if picked:
         handle_error(
             self,
             reprounzip.upload(self.directory,
                               file_status.name,
                               picked,
                               unpacker=self.unpacker,
                               root=self.root))
         self._file_changed()