mirror of
https://github.com/borgbase/vorta
synced 2025-01-03 13:45:49 +00:00
Small refactor.
This commit is contained in:
parent
61737ad067
commit
49c4448014
4 changed files with 6 additions and 7 deletions
|
@ -54,7 +54,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="repoTabSlot">
|
<widget class="QWidget" name="repoTabSlot">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
import os
|
import os
|
||||||
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu, QAction
|
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu, QAction
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
from vorta.main import MainWindow
|
from vorta.main_window import MainWindow
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
app.setQuitOnLastWindowClosed(False)
|
|
||||||
# Create the tray
|
# Create the tray
|
||||||
|
app.setQuitOnLastWindowClosed(False)
|
||||||
tray = QSystemTrayIcon()
|
tray = QSystemTrayIcon()
|
||||||
icon = QIcon(os.path.join(os.path.dirname(__file__), 'UI/icons/hdd-o.png'))
|
icon = QIcon(os.path.join(os.path.dirname(__file__), 'UI/icons/hdd-o.png'))
|
||||||
tray.setIcon(icon)
|
tray.setIcon(icon)
|
||||||
|
@ -16,8 +17,6 @@
|
||||||
menu = QMenu()
|
menu = QMenu()
|
||||||
action = QAction("A menu item")
|
action = QAction("A menu item")
|
||||||
menu.addAction(action)
|
menu.addAction(action)
|
||||||
|
|
||||||
# Add the menu to the tray
|
|
||||||
tray.setContextMenu(menu)
|
tray.setContextMenu(menu)
|
||||||
|
|
||||||
ex = MainWindow()
|
ex = MainWindow()
|
||||||
|
|
|
@ -25,7 +25,7 @@ def __init__(self):
|
||||||
self.profile = BackupProfileModel.get(id=1)
|
self.profile = BackupProfileModel.get(id=1)
|
||||||
|
|
||||||
self.repoTab = RepoTab(self.repoTabSlot)
|
self.repoTab = RepoTab(self.repoTabSlot)
|
||||||
self.repoTab.repo_changed.connect(lambda: print('adf'))
|
self.repoTab.repo_changed.connect(lambda: self.snapshotTab.populate())
|
||||||
|
|
||||||
self.sourceTab = SourceTab(self.sourceTabSlot)
|
self.sourceTab = SourceTab(self.sourceTabSlot)
|
||||||
self.snapshotTab = SnapshotTab(self.snapshotTabSlot)
|
self.snapshotTab = SnapshotTab(self.snapshotTabSlot)
|
|
@ -2,7 +2,7 @@
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
from PyQt5 import uic, QtCore
|
from PyQt5 import uic, QtCore
|
||||||
|
|
||||||
from .models import RepoModel, SourceDirModel, SnapshotModel, BackupProfileModel
|
from .models import RepoModel, SnapshotModel
|
||||||
from .repo_add import AddRepoWindow, ExistingRepoWindow
|
from .repo_add import AddRepoWindow, ExistingRepoWindow
|
||||||
from .borg_runner import BorgThread
|
from .borg_runner import BorgThread
|
||||||
from .utils import prettyBytes, get_private_keys
|
from .utils import prettyBytes, get_private_keys
|
||||||
|
|
Loading…
Reference in a new issue