Add app name to tray menu and window title (#153)

This commit is contained in:
TW 2019-01-22 04:28:29 +01:00 committed by Manuel Riel
parent ab368b32a4
commit 4c8363d5ad
2 changed files with 7 additions and 6 deletions

View File

@ -25,6 +25,11 @@ class TrayMenu(QSystemTrayIcon):
menu = self.contextMenu()
menu.clear()
open_action = menu.addAction(self.tr('Vorta for Borg Backup'))
open_action.triggered.connect(self.app.open_main_window_action)
menu.addSeparator()
status = menu.addAction(self.app.scheduler.next_job)
status.setEnabled(False)
@ -45,10 +50,7 @@ class TrayMenu(QSystemTrayIcon):
profile_menu = menu.addAction(self.tr('Backup Now'))
profile_menu.triggered.connect(lambda state, i=profile.id: self.app.create_backup_action(i))
settings_action = menu.addAction(self.tr('Settings'))
settings_action.triggered.connect(self.app.open_main_window_action)
menu.addSeparator()
exit_action = menu.addAction(self.tr('Exit'))
exit_action = menu.addAction(self.tr('Quit'))
exit_action.triggered.connect(self.app.quit)

View File

@ -2,7 +2,6 @@ import sys
from PyQt5.QtWidgets import QShortcut
from PyQt5 import uic, QtCore
from PyQt5.QtGui import QKeySequence
from ..config import APP_NAME
from .repo_tab import RepoTab
from .source_tab import SourceTab
from .archive_tab import ArchiveTab
@ -22,7 +21,7 @@ class MainWindow(MainWindowBase, MainWindowUI):
def __init__(self, parent=None):
super().__init__()
self.setupUi(self)
self.setWindowTitle(APP_NAME)
self.setWindowTitle('Vorta for Borg Backup')
self.app = parent
self.current_profile = BackupProfileModel.select().order_by('id').first()
self.setWindowFlags(QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowMinimizeButtonHint)