mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-03-12 03:31:37 +00:00
Compare commits
6 Commits
6a03e1e399
...
4.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 421a58a61c | |||
|
|
b5a3313f80 | ||
|
|
116ac18e13 | ||
|
|
32dcd90b50 | ||
|
|
c2fef8d624 | ||
|
fd0adc77b3
|
21
README.md
21
README.md
@@ -35,12 +35,25 @@ This folder contains the source for dupeGuru. Its documentation is in `help`, bu
|
||||
|
||||
### Windows & macOS specific additional instructions
|
||||
For windows instructions see the [Windows Instructions](Windows.md).
|
||||
|
||||
For macos instructions (qt version) see the [macOS Instructions](macos.md).
|
||||
|
||||
### Prerequisites
|
||||
* [Python 3.6+][python]
|
||||
* PyQt5
|
||||
|
||||
### System Setup
|
||||
When running in a linux based environment the following system packages or equivalents are needed to build:
|
||||
* python3-pyqt5
|
||||
* python3-wheel (for hsaudiotag3k)
|
||||
* python3-venv (only if using a virtual environment)
|
||||
* python3-dev
|
||||
* build-essential
|
||||
|
||||
To create packages the following are also needed:
|
||||
* python3-setuptools
|
||||
* debhelper
|
||||
|
||||
### Building with Make
|
||||
dupeGuru comes with a makefile that can be used to build and run:
|
||||
|
||||
@@ -49,8 +62,8 @@ dupeGuru comes with a makefile that can be used to build and run:
|
||||
### Building without Make
|
||||
|
||||
$ cd <dupeGuru directory>
|
||||
$ python3 -m venv --system-site-packages .\env
|
||||
$ source .\env\bin\activate
|
||||
$ python3 -m venv --system-site-packages ./env
|
||||
$ source ./env/bin/activate
|
||||
$ pip install -r requirements.txt
|
||||
$ python build.py
|
||||
$ python run.py
|
||||
@@ -60,8 +73,8 @@ To generate packages the extra requirements in requirements-extra.txt must be in
|
||||
steps are as follows:
|
||||
|
||||
$ cd <dupeGuru directory>
|
||||
$ python3 -m venv --system-site-packages .\env
|
||||
$ source .\env\bin\activate
|
||||
$ python3 -m venv --system-site-packages ./env
|
||||
$ source ./env/bin/activate
|
||||
$ pip install -r requirements.txt -r requirements-extra.txt
|
||||
$ python build.py --clean
|
||||
$ python package.py
|
||||
|
||||
@@ -72,13 +72,15 @@ class PrioritizeDialog(GUIObject):
|
||||
# Add selected criteria in criteria_list to prioritization_list.
|
||||
if self.criteria_list.selected_index is None:
|
||||
return
|
||||
crit = self.criteria[self.criteria_list.selected_index]
|
||||
self.prioritizations.append(crit)
|
||||
del crit
|
||||
for i in self.criteria_list.selected_indexes:
|
||||
crit = self.criteria[i]
|
||||
self.prioritizations.append(crit)
|
||||
del crit
|
||||
self.prioritization_list[:] = [crit.display for crit in self.prioritizations]
|
||||
|
||||
def remove_selected(self):
|
||||
self.prioritization_list.remove_selected()
|
||||
self.prioritization_list.select([])
|
||||
|
||||
def perform_reprioritization(self):
|
||||
self.app.reprioritize_groups(self._sort_key)
|
||||
|
||||
@@ -47,9 +47,16 @@ class PrioritizationList(ListviewModel):
|
||||
# to know where the drop took place.
|
||||
if parentIndex.isValid():
|
||||
return False
|
||||
# "When row and column are -1 it means that the dropped data should be considered as
|
||||
# dropped directly on parent."
|
||||
# Moving items to row -1 would put them before the last item. Fix the row to drop the
|
||||
# dragged items after the last item.
|
||||
if row < 0:
|
||||
row = len(self.model) - 1
|
||||
strMimeData = bytes(mimeData.data(MIME_INDEXES)).decode()
|
||||
indexes = list(map(int, strMimeData.split(",")))
|
||||
self.model.move_indexes(indexes, row)
|
||||
self.view.selectionModel().clearSelection()
|
||||
return True
|
||||
|
||||
def mimeData(self, indexes):
|
||||
@@ -84,7 +91,9 @@ class PrioritizeDialog(QDialog):
|
||||
self.model.view = self
|
||||
|
||||
self.addCriteriaButton.clicked.connect(self.model.add_selected)
|
||||
self.criteriaListView.doubleClicked.connect(self.model.add_selected)
|
||||
self.removeCriteriaButton.clicked.connect(self.model.remove_selected)
|
||||
self.prioritizationListView.doubleClicked.connect(self.model.remove_selected)
|
||||
self.buttonBox.accepted.connect(self.accept)
|
||||
self.buttonBox.rejected.connect(self.reject)
|
||||
|
||||
@@ -102,6 +111,7 @@ class PrioritizeDialog(QDialog):
|
||||
self.promptLabel.setWordWrap(True)
|
||||
self.categoryCombobox = QComboBox()
|
||||
self.criteriaListView = QListView()
|
||||
self.criteriaListView.setSelectionMode(QAbstractItemView.ExtendedSelection)
|
||||
self.addCriteriaButton = QPushButton(
|
||||
self.style().standardIcon(QStyle.SP_ArrowRight), ""
|
||||
)
|
||||
@@ -113,6 +123,7 @@ class PrioritizeDialog(QDialog):
|
||||
self.prioritizationListView.setDragEnabled(True)
|
||||
self.prioritizationListView.setDragDropMode(QAbstractItemView.InternalMove)
|
||||
self.prioritizationListView.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
self.prioritizationListView.setSelectionMode(QAbstractItemView.ExtendedSelection)
|
||||
self.buttonBox = QDialogButtonBox()
|
||||
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user