Skip to content

Commit 21ff8c2

Browse files
Notification problem has been fixed.
modified: persepolis/scripts/bubble.py
1 parent cd6bb7d commit 21ff8c2

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

check_dependencies.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,19 @@
105105

106106
if os_type == 'Linux' or os_type == 'FreeBSD' or os_type == 'OpenBSD':
107107

108+
# python3-dasbus
108109
if os.path.isdir(notifications_path):
109110
print('sound-theme-freedesktop is found!')
110111
else:
111112
print('Warning: sound-theme-freedesktop is not installed! you need this package for sound notifications!')
112113
not_installed = not_installed + 'sound-theme-freedesktop'
114+
try:
115+
from dasbus.connection import SessionMessageBus
116+
print('python3-dasbus is found!')
117+
except:
118+
print('python3-dasbus is not installed!')
119+
not_installed = not_installed + 'python3-dasbus,'
113120

114-
# libnotify-bin
115-
answer = os.system('notify-send --version 1>/dev/null')
116-
if answer != 0:
117-
print("Error libnotify-bin is not installed!")
118-
not_installed = not_installed + 'libnotify-bin, '
119-
else:
120-
print('libnotify-bin is found!')
121-
122-
# show warning , if dependencies not installed!
123121
if not_installed != '':
124122
print('########################')
125123
print('####### WARNING ########')

persepolis/scripts/bubble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def notifySend(message1, message2, time, sound, parent=None):
9898
)
9999

100100
proxy.Notify(
101-
"Persepolis", 0, "persepolis", message1,
102-
message2, [], {}, 10000)
101+
"Persepolis", 0, QIcon.fromTheme('persepolis-tray', QIcon(':/persepolis-tray.svg')).name(), message1,message2, [], {}, 10000)
102+
103103
else:
104104
parent.system_tray_icon.showMessage(message1, message2, QIcon.fromTheme('persepolis-tray', QIcon(':/persepolis-tray.svg')), 10000)

0 commit comments

Comments
 (0)