-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix notifications #521
base: master
Are you sure you want to change the base?
Fix notifications #521
Conversation
Thanks, this looks very interesting.
Please do ask there for any clarifications. The next weeks free time will be devoted to finalizing v3.0, Meanwhile, please do keep this PR open. About the icon location, the base path can be accessed in >>> from hamster import defs
>>> defs.DATA_DIR
'/usr/share' But that's about it. The new icon installation path is set in Lines 7 to 14 in a572ddc
The directory and names changed in #485, There should be a better way though, for instance in the ui, icons can be found by name: Line 18 in a572ddc
|
d558d34
to
88eb65f
Compare
There will never be any CLA on this code. Please disregard the wrong checks (#589). |
The code for notifications was removed somewhere in the history. With this commit, notifications are expected to work as usual! Signed-off-by: Sharaf Zaman <[email protected]>
I have updated this to the current master and I have updated the way to get icon path, however I am not sure if this is how you're supposed to do it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good in general.
I'd like to understand how it relates to the previous code removed in 08eaf77 (desktop.py
). Have you used that code as a template / reference somehow? You seem to have implemented some things differently (looking at the actual Notify()
code for example - missing transient
and urgency
properties), could you elaborate a bit on that, either in the commit message or in comments in the code?
@@ -46,7 +46,7 @@ | |||
from hamster.lib import default_logger, stuff | |||
from hamster.lib import datetime as dt | |||
from hamster.lib.fact import Fact | |||
|
|||
from hamster.lib.notifsmanager import notifs_mgr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notifs_mgr
seems to be referenced nowhere in this file. What am I missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be remnants of my debugging session. I'll remove it, thanks!
Thank you for reviewing!
No, I did not I'm afraid. I wrote it from scratch by looking at the docs :(
I didn't know that such a thing ( PS: Just yesterday, I added code to close notifications automatically. It was an ugly hack. Thanks for mentioning |
This should most make the notifications work like it worked in past. (However, it doesn't use the pynotify).
There is one issue, the path to the icon is hardcoded. I am not sure, if we can dynamically access the installed location of hamster or the "future" installation structure of hamster.
CC: issue#493