mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 04:44:15 +02:00
refactoring
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import glob
|
||||
import locale
|
||||
import re
|
||||
|
||||
from fpakman_api.util import system
|
||||
from fpakman_api.util.resource import get_fpakman_logo_path
|
||||
from fpakman_api.util.resource import get_path
|
||||
|
||||
from fpakman import ROOT_DIR, __app_name__
|
||||
from fpakman.core import resource
|
||||
import glob
|
||||
import re
|
||||
|
||||
HTML_RE = re.compile(r'<[^>]+>')
|
||||
|
||||
@@ -49,5 +49,5 @@ def strip_html(string: str):
|
||||
return HTML_RE.sub('', string)
|
||||
|
||||
|
||||
def notify_user(msg: str, icon_path: str = get_fpakman_logo_path(ROOT_DIR)):
|
||||
def notify_user(msg: str, icon_path: str = get_path('img/logo.svg', ROOT_DIR)):
|
||||
system.notify_user(msg=msg, app_name=__app_name__, icon_path=icon_path)
|
||||
|
||||
@@ -7,11 +7,11 @@ from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QSystemTrayIcon, QMenu
|
||||
from fpakman_api.abstract.model import ApplicationUpdate
|
||||
from fpakman_api.util import system
|
||||
from fpakman_api.util.resource import get_fpakman_logo_path
|
||||
|
||||
from fpakman import __app_name__, ROOT_DIR
|
||||
from fpakman.core import resource
|
||||
from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.util import util
|
||||
from fpakman.view.qt.about import AboutDialog
|
||||
from fpakman.view.qt.window import ManageWindow
|
||||
|
||||
@@ -101,7 +101,7 @@ class TrayIcon(QSystemTrayIcon):
|
||||
self.setToolTip(msg)
|
||||
|
||||
if self.update_notification and notify_user:
|
||||
system.notify_user(app_name=__app_name__, msg=msg, icon_path=get_fpakman_logo_path(ROOT_DIR))
|
||||
util.notify_user(msg=msg)
|
||||
|
||||
else:
|
||||
self.last_updates.clear()
|
||||
|
||||
Reference in New Issue
Block a user