Skip to content

Commit

Permalink
Merge branch 'master' into delete
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu authored Sep 19, 2023
2 parents 8b7dc0f + 3573bdb commit 0bdb543
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
3 changes: 3 additions & 0 deletions src/vorta/assets/UI/repoadd.ui
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<property name="modal">
<bool>true</bool>
</property>
<property name="windowTitle">
<string>Add Repository</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>0</number>
Expand Down
7 changes: 5 additions & 2 deletions src/vorta/store/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ def get_misc_settings() -> List[Dict[str, str]]:
'value': True,
'type': 'checkbox',
'group': startup,
'label': trans_late('settings', 'Open main window on startup'),
'tooltip': trans_late('settings', 'Open main window when the application is launched'),
'label': trans_late('settings', 'Show main window of Vorta on launch'),
'tooltip': trans_late(
'settings',
'Make Vorta appear on screen instead of minimizing to system tray',
),
},
{
'key': 'get_srcpath_datasize',
Expand Down
3 changes: 3 additions & 0 deletions src/vorta/views/archive_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,9 @@ def extract_archive_result(self, result):
self._toggle_all_buttons(True)

def cell_double_clicked(self, row=None, column=None):
if not self.bRename.isEnabled():
return

if not row or not column:
row = self.archiveTable.currentRow()
column = self.archiveTable.currentColumn()
Expand Down
2 changes: 2 additions & 0 deletions src/vorta/views/repo_add_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def values(self):
class AddRepoWindow(RepoWindow):
def __init__(self, parent=None):
super().__init__(parent)
self.setWindowTitle("Add New Repository")

self.passwordInput = PasswordInput()
self.passwordInput.add_form_to_layout(self.repoDataFormLayout)
Expand Down Expand Up @@ -226,6 +227,7 @@ class ExistingRepoWindow(RepoWindow):
def __init__(self):
super().__init__()
self.title.setText(self.tr('Connect to existing Repository'))
self.setWindowTitle("Add Existing Repository")

self.passwordLabel = QLabel(self.tr('Password:'))
self.passwordInput = PasswordLineEdit()
Expand Down
8 changes: 7 additions & 1 deletion tests/unit/test_archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ def test_refresh_archive_info(qapp, qtbot, mocker, borg_json_output, archive_env
qtbot.waitUntil(lambda: tab.mountErrors.text() == 'Refreshed archives.', **pytest._wait_defaults)


def test_archive_rename(qapp, qtbot, mocker, borg_json_output, archive_env):
def test_inline_archive_rename(qapp, qtbot, mocker, borg_json_output, archive_env):
"""
Tests the functionality of in-line renaming an archive by double-clicking its name.
"""
main, tab = archive_env

tab.archiveTable.selectRow(0)
Expand All @@ -190,9 +193,12 @@ def test_archive_rename(qapp, qtbot, mocker, borg_json_output, archive_env):

pos = tab.archiveTable.visualRect(tab.archiveTable.model().index(0, 4)).center()
qtbot.mouseClick(tab.archiveTable.viewport(), QtCore.Qt.MouseButton.LeftButton, pos=pos)
assert tab.bRename.isEnabled()
qtbot.mouseDClick(tab.archiveTable.viewport(), QtCore.Qt.MouseButton.LeftButton, pos=pos)
tab.archiveTable.viewport().focusWidget().setText("")
qtbot.keyClicks(tab.archiveTable.viewport().focusWidget(), new_archive_name)
qtbot.keyClick(tab.archiveTable.viewport().focusWidget(), QtCore.Qt.Key.Key_Return)

# Successful rename case
qtbot.waitUntil(lambda: tab.archiveTable.model().index(0, 4).data() == new_archive_name, **pytest._wait_defaults)
assert tab.archiveTable.model().index(0, 4).data() == new_archive_name

0 comments on commit 0bdb543

Please sign in to comment.