mirror of https://github.com/borgbase/vorta
Merge branch 'borgbase:master' into master
This commit is contained in:
commit
d21316b920
|
@ -28,7 +28,7 @@ Learn more on [Vorta's website](https://vorta.borgbase.com).
|
|||
## Installation
|
||||
Vorta should work on all platforms that support Qt and Borg. This includes macOS, Ubuntu, Debian, Fedora, Arch Linux and many others. Windows is currently not supported by Borg, but this may change in the future.
|
||||
|
||||
See our website for [download links and and install instructions](https://vorta.borgbase.com/install).
|
||||
See our website for [download links and install instructions](https://vorta.borgbase.com/install).
|
||||
|
||||
## Connect and Contribute
|
||||
- To discuss everything around using, improving, packaging and translating Vorta, join the [discussion on Github](https://github.com/borgbase/vorta/discussions).
|
||||
|
|
|
@ -219,6 +219,25 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="bDiff">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Compare two archives</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Diff</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="bMountArchive">
|
||||
<property name="sizePolicy">
|
||||
|
@ -276,60 +295,41 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="bDelete">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Delete selected archive(s)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="bDiff">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Compare two archives</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Diff</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="bDelete">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Delete selected archive(s)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -5,7 +5,7 @@ from typing import Dict, Optional
|
|||
|
||||
from PyQt6 import QtCore, uic
|
||||
from PyQt6.QtCore import QItemSelectionModel, QMimeData, QPoint, Qt, pyqtSlot
|
||||
from PyQt6.QtGui import QAction, QDesktopServices, QKeySequence, QShortcut
|
||||
from PyQt6.QtGui import QDesktopServices, QKeySequence, QShortcut
|
||||
from PyQt6.QtWidgets import (
|
||||
QAbstractItemView,
|
||||
QApplication,
|
||||
|
@ -154,7 +154,7 @@ class ArchiveTab(ArchiveTabBase, ArchiveTabUI, BackupProfileMixin):
|
|||
self.app.paletteChanged.connect(lambda p: self.set_icons())
|
||||
|
||||
def set_icons(self):
|
||||
"Used when changing between light- and dark mode"
|
||||
"""Used when changing between light- and dark mode"""
|
||||
self.bCheck.setIcon(get_colored_icon('check-circle'))
|
||||
self.bDiff.setIcon(get_colored_icon('stream-solid'))
|
||||
self.bPrune.setIcon(get_colored_icon('cut'))
|
||||
|
@ -183,46 +183,22 @@ class ArchiveTab(ArchiveTabBase, ArchiveTabUI, BackupProfileMixin):
|
|||
return # popup only for selected items
|
||||
|
||||
menu = QMenu(self.archiveTable)
|
||||
menu.addAction(
|
||||
get_colored_icon('copy'),
|
||||
self.tr("Copy"),
|
||||
lambda: self.archive_copy(index=index),
|
||||
)
|
||||
menu.addAction(get_colored_icon('copy'), self.tr("Copy"), lambda: self.archive_copy(index=index))
|
||||
menu.addSeparator()
|
||||
|
||||
# archive actions
|
||||
archive_actions = []
|
||||
archive_actions.append(
|
||||
menu.addAction(
|
||||
self.bRefreshArchive.icon(),
|
||||
self.bRefreshArchive.text(),
|
||||
self.refresh_archive_info,
|
||||
)
|
||||
)
|
||||
archive_actions.append(
|
||||
menu.addAction(
|
||||
self.bMountArchive.icon(),
|
||||
self.bMountArchive.text(),
|
||||
self.bmountarchive_clicked,
|
||||
)
|
||||
)
|
||||
archive_actions.append(menu.addAction(self.bExtract.icon(), self.bExtract.text(), self.extract_action))
|
||||
archive_actions.append(menu.addAction(self.bRename.icon(), self.bRename.text(), self.cell_double_clicked))
|
||||
# deletion possible with one but also multiple archives
|
||||
menu.addAction(self.bDelete.icon(), self.bDelete.text(), self.delete_action)
|
||||
button_connection_pairs = [
|
||||
(self.bRefreshArchive, self.refresh_archive_info),
|
||||
(self.bDiff, self.diff_action),
|
||||
(self.bMountArchive, self.bmountarchive_clicked),
|
||||
(self.bExtract, self.extract_action),
|
||||
(self.bRename, self.cell_double_clicked),
|
||||
(self.bDelete, self.delete_action),
|
||||
]
|
||||
|
||||
if not (self.repoactions_enabled and len(selected_rows) <= 1):
|
||||
for action in archive_actions:
|
||||
action.setEnabled(False)
|
||||
|
||||
# diff action
|
||||
menu.addSeparator()
|
||||
diff_action = QAction(self.bDiff.icon(), self.bDiff.text(), menu)
|
||||
diff_action.triggered.connect(self.diff_action)
|
||||
menu.addAction(diff_action)
|
||||
|
||||
selected_rows = self.archiveTable.selectionModel().selectedRows(index.column())
|
||||
diff_action.setEnabled(self.repoactions_enabled and len(selected_rows) == 2)
|
||||
for button, connection in button_connection_pairs:
|
||||
action = menu.addAction(button.icon(), button.text(), connection)
|
||||
action.setEnabled(button.isEnabled())
|
||||
|
||||
menu.popup(self.archiveTable.viewport().mapToGlobal(pos))
|
||||
|
||||
|
@ -406,7 +382,8 @@ class ArchiveTab(ArchiveTabBase, ArchiveTabUI, BackupProfileMixin):
|
|||
|
||||
for index in range(layout.count()):
|
||||
widget = layout.itemAt(index).widget()
|
||||
widget.setToolTip(self.tooltip_dict.get(widget, ""))
|
||||
if widget is not None:
|
||||
widget.setToolTip(self.tooltip_dict.get(widget, ""))
|
||||
|
||||
# refresh bMountArchive for the selected archive
|
||||
self.bmountarchive_refresh()
|
||||
|
|
Loading…
Reference in New Issue