1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-05-08 17:59:50 +00:00

Compare commits

..

No commits in common. "2e13c4ccb5e8f6f66e99d41c9a818241014e356c" and "f9085386a63b0d2f796e86a28609f0c60283796e" have entirely different histories.

6 changed files with 31 additions and 64 deletions

View File

@ -36,79 +36,79 @@ msgstr ""
msgid "Sending to Trash"
msgstr ""
#: core\app.py:287
#: core\app.py:290
msgid "A previous action is still hanging in there. You can't start a new one yet. Wait a few seconds, then try again."
msgstr ""
#: core\app.py:297
#: core\app.py:300
msgid "No duplicates found."
msgstr ""
#: core\app.py:312
#: core\app.py:315
msgid "All marked files were copied successfully."
msgstr ""
#: core\app.py:313
#: core\app.py:316
msgid "All marked files were moved successfully."
msgstr ""
#: core\app.py:314
#: core\app.py:317
msgid "All marked files were successfully sent to Trash."
msgstr ""
#: core\app.py:320
#: core\app.py:323
msgid "Could not load file: {}"
msgstr ""
#: core\app.py:376
#: core\app.py:379
msgid "'{}' already is in the list."
msgstr ""
#: core\app.py:378
#: core\app.py:381
msgid "'{}' does not exist."
msgstr ""
#: core\app.py:386
#: core\app.py:389
msgid "All selected %d matches are going to be ignored in all subsequent scans. Continue?"
msgstr ""
#: core\app.py:460
#: core\app.py:463
msgid "Select a directory to copy marked files to"
msgstr ""
#: core\app.py:462
#: core\app.py:465
msgid "Select a directory to move marked files to"
msgstr ""
#: core\app.py:501
#: core\app.py:504
msgid "Select a destination for your exported CSV"
msgstr ""
#: core\app.py:507 core\app.py:761 core\app.py:771
#: core\app.py:510 core\app.py:764 core\app.py:774
msgid "Couldn't write to file: {}"
msgstr ""
#: core\app.py:530
#: core\app.py:533
msgid "You have no custom command set up. Set it up in your preferences."
msgstr ""
#: core\app.py:688 core\app.py:700
#: core\app.py:691 core\app.py:703
msgid "You are about to remove %d files from results. Continue?"
msgstr ""
#: core\app.py:736
#: core\app.py:739
msgid "{} duplicate groups were changed by the re-prioritization."
msgstr ""
#: core\app.py:780
#: core\app.py:783
msgid "The selected directories contain no scannable file."
msgstr ""
#: core\app.py:793
#: core\app.py:796
msgid "Collecting files to scan"
msgstr ""
#: core\app.py:840
#: core\app.py:843
msgid "%s (%d discarded)"
msgstr ""

View File

@ -913,13 +913,3 @@ msgstr ""
#: qt\se\preferences_dialog.py:80
msgid "MB"
msgstr ""
#: qt\preferences_dialog.py:163
msgid "Use native OS dialogs"
msgstr ""
#: qt\preferences_dialog.py:166
msgid ""
"For actions such as file/folder selection use the OS native dialogs.\n"
"Some native dialogs have limited functionality."
msgstr ""

View File

@ -6,7 +6,6 @@
from PyQt5.QtCore import QRect, Qt
from PyQt5.QtWidgets import (
QListView,
QWidget,
QFileDialog,
QHeaderView,
@ -286,25 +285,14 @@ class DirectoriesDialog(QMainWindow):
# --- Events
def addFolderTriggered(self):
no_native = not self.app.prefs.use_native_dialogs
title = tr("Select a folder to add to the scanning list")
file_dialog = QFileDialog(self, title, self.lastAddedFolder)
file_dialog.setFileMode(QFileDialog.DirectoryOnly)
file_dialog.setOption(QFileDialog.DontUseNativeDialog, no_native)
if no_native:
file_view = file_dialog.findChild(QListView, "listView")
if file_view:
file_view.setSelectionMode(QAbstractItemView.MultiSelection)
f_tree_view = file_dialog.findChild(QTreeView)
if f_tree_view:
f_tree_view.setSelectionMode(QAbstractItemView.MultiSelection)
if not file_dialog.exec():
flags = QFileDialog.ShowDirsOnly
dirpath = str(QFileDialog.getExistingDirectory(self, title, self.lastAddedFolder, flags))
if not dirpath:
return
paths = file_dialog.selectedFiles()
self.lastAddedFolder = paths[-1]
[self.app.model.add_directory(path) for path in paths]
[self.recentFolders.insertItem(path) for path in paths]
self.lastAddedFolder = dirpath
self.app.model.add_directory(dirpath)
self.recentFolders.insertItem(dirpath)
def appModeButtonSelected(self, index):
if index == 2:

View File

@ -6,6 +6,8 @@
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import urllib.parse
from PyQt5.QtCore import pyqtSignal, Qt, QRect, QUrl, QModelIndex, QItemSelection
from PyQt5.QtWidgets import (
QComboBox,
@ -103,11 +105,13 @@ class DirectoriesModel(TreeModel):
return None
def dropMimeData(self, mime_data, action, row, column, parent_index):
# the data in mimeData is urlencoded **in utf-8**
# the data in mimeData is urlencoded **in utf-8**!!! What we do is to decode, the mime data
# with 'ascii', which works since it's urlencoded. Then, we pass that to urllib.
if not mime_data.hasFormat("text/uri-list"):
return False
data = bytes(mime_data.data("text/uri-list")).decode("ascii")
urls = data.split("\r\n")
unquoted = urllib.parse.unquote(data)
urls = unquoted.split("\r\n")
paths = [QUrl(url).toLocalFile() for url in urls if url]
for path in paths:
self.model.add_directory(path)

View File

@ -30,7 +30,6 @@ class Preferences(PreferencesBase):
if not self.language and trans.installed_lang:
self.language = trans.installed_lang
self.portable = get("Portable", False)
self.use_native_dialogs = get("UseNativeDialogs", True)
self.tableFontSize = get("TableFontSize", self.tableFontSize)
self.reference_bold_font = get("ReferenceBoldFont", self.reference_bold_font)
@ -93,7 +92,6 @@ class Preferences(PreferencesBase):
self.destination_type = 1
self.custom_command = ""
self.language = trans.installed_lang if trans.installed_lang else ""
self.use_native_dialogs = True
self.tableFontSize = QApplication.font().pointSize()
self.reference_bold_font = True
@ -142,7 +140,6 @@ class Preferences(PreferencesBase):
set_("CustomCommand", self.custom_command)
set_("Language", self.language)
set_("Portable", self.portable)
set_("UseNativeDialogs", self.use_native_dialogs)
set_("TableFontSize", self.tableFontSize)
set_("ReferenceBoldFont", self.reference_bold_font)

View File

@ -158,16 +158,6 @@ On MacOS, the tab bar will fill up the window's width instead."
)
)
layout.addWidget(self.tabs_default_pos)
self._setupAddCheckbox(
"use_native_dialogs",
tr("Use native OS dialogs"),
)
self.use_native_dialogs.setToolTip(
tr(
"For actions such as file/folder selection use the OS native dialogs.\nSome native dialogs have limited functionality."
)
)
layout.addWidget(self.use_native_dialogs)
self.ui_groupbox.setLayout(layout)
self.displayVLayout.addWidget(self.ui_groupbox)
@ -296,7 +286,6 @@ use the modifier key to drag the floating window around"
if section & Sections.DISPLAY:
setchecked(self.reference_bold_font, prefs.reference_bold_font)
setchecked(self.tabs_default_pos, prefs.tabs_default_pos)
setchecked(self.use_native_dialogs, prefs.use_native_dialogs)
setchecked(
self.details_dialog_titlebar_enabled,
prefs.details_dialog_titlebar_enabled,
@ -340,7 +329,6 @@ use the modifier key to drag the floating window around"
prefs.custom_command = str(self.customCommandEdit.text())
prefs.tableFontSize = self.fontSizeSpinBox.value()
prefs.tabs_default_pos = ischecked(self.tabs_default_pos)
prefs.use_native_dialogs = ischecked(self.use_native_dialogs)
lang = self.supportedLanguages[self.languageComboBox.currentIndex()]
oldlang = self.app.prefs.language
if oldlang not in self.supportedLanguages: