mirror of https://github.com/borgbase/vorta
Small refactor.
This commit is contained in:
parent
61737ad067
commit
49c4448014
|
@ -54,7 +54,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="repoTabSlot">
|
||||
<property name="sizePolicy">
|
||||
|
|
|
@ -2,11 +2,12 @@ import sys
|
|||
import os
|
||||
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu, QAction
|
||||
from PyQt5.QtGui import QIcon
|
||||
from vorta.main import MainWindow
|
||||
from vorta.main_window import MainWindow
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setQuitOnLastWindowClosed(False)
|
||||
|
||||
# Create the tray
|
||||
app.setQuitOnLastWindowClosed(False)
|
||||
tray = QSystemTrayIcon()
|
||||
icon = QIcon(os.path.join(os.path.dirname(__file__), 'UI/icons/hdd-o.png'))
|
||||
tray.setIcon(icon)
|
||||
|
@ -16,8 +17,6 @@ tray.setVisible(True)
|
|||
menu = QMenu()
|
||||
action = QAction("A menu item")
|
||||
menu.addAction(action)
|
||||
|
||||
# Add the menu to the tray
|
||||
tray.setContextMenu(menu)
|
||||
|
||||
ex = MainWindow()
|
||||
|
|
|
@ -25,7 +25,7 @@ class MainWindow(MainWindowBase, MainWindowUI):
|
|||
self.profile = BackupProfileModel.get(id=1)
|
||||
|
||||
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.snapshotTab = SnapshotTab(self.snapshotTabSlot)
|
|
@ -2,7 +2,7 @@ import os
|
|||
from dateutil import parser
|
||||
from PyQt5 import uic, QtCore
|
||||
|
||||
from .models import RepoModel, SourceDirModel, SnapshotModel, BackupProfileModel
|
||||
from .models import RepoModel, SnapshotModel
|
||||
from .repo_add import AddRepoWindow, ExistingRepoWindow
|
||||
from .borg_runner import BorgThread
|
||||
from .utils import prettyBytes, get_private_keys
|
||||
|
|
Loading…
Reference in New Issue