Closed edubxb closed 7 years ago
For most distributions this could be achieved by implementing the org.freedesktop.Notifications interface (https://developer.gnome.org/notification-spec/).
I'm fully agree wih @EmptyStackExn about libnotify. Also, it's good to have a choice between Telegram's notifications and OS's system (notify)
This would be great for UI consistency and it would also allow for free notification customization.
That would be great! The notifications that are now always obscures the input field for me.
That would be very cool!
:+1:
Also needs support for gnome 3.16 notifications that can work like that:
I too would love to see a libnotify implementation of Telegram notifications. If I am not misstaken, it should have easy to use bindings for QT.
:+1:
Clementine (a multiplatform/Qt music player) leaves choice to the user. Source code can be found here https://github.com/clementine-player/Clementine
Notification like Clementine is a clever idea :+1:
I just discovered a nice project for notifications and Qt: https://github.com/Snorenotify/Snorenotify. I don't know if it can be really useful for this purpose, but it's good to take a look.
@davcri Looks like they support the XDG desktop notifications, so it'd work great, plus, notifications for other non-X OSs come for free.
Problem is that telegram dont link to external souces. its one binary blob with all dependencies inside. thats not always possible with licenses other projects (like snorenotify)
Would be nice to see.
It will be very nice feature.
The native notification looks good on Windows 10. it will be great on Linux, too :+1: Take a look at libnotify https://developer.gnome.org/libnotify/unstable/NotifyNotification.html
@davcri I'm not sure, but does Snorenotify use the same license (LGPL-3) as Qt?
If yes, why we cannot use it? @SanKro
Yes it seems to use LGPL3: https://github.com/Snorenotify/Snorenotify/blob/master/COPYING.LGPL-3
So it should be no problem to implement it in telegram desktop?
I'm not very experienced with these things, but I don't find any problem in using it.
Indeed using it would not cause any licensing issues. LGPL allows you to link to it freely. Any changes made to the library must be shared under the LGPL alike (though you usually don't need to modify it).
Also, since tdesktop is GPL, this library should not bring any controversy or dislikes amongst authors either.
The Qt build of QupZilla also allows the use of native or its own notifications.
:+1: I want to see native notiffications for Linux too and maybe an option to use a non native titlebar (like Chrome or Vivaldi) with the same colour of the app's toolbar, I want a more consistent and good looking app, Windows has EVEN the amazing GNOME liike client side decorations and we do not have them having GNOME one of the first desktops wich fully adopted the CSDs; maybe we can not use a CSD looking app because of Fluxbox Openbox and KDE but maybe the posibility to use a Chrome like non native titlebar could be really good
@auchri could you see what to do with the notiffications and the titlebar? also if you make TDesktop compatible with KfileChooser and Gnome file chooser and use them on KDE and GNOME respectively instead of the generic Qt file chooser and fuse the hide / show Telegram Desktop menu entries on the tray icon's rght click menu I will thank to you a lot
And me too, I do not use a lot TDesktop because of the lack of native notiffications, I use mostly Cutegram but it does not works at all for me on Ubuntu so I use TDesktop on Ubuntu derivates
Hope you will implement soon this feature!
++ It blocks both my clock and my view of weechat's input. For now I've disabled notifications, but this isn't my preference.
+1. Telegram's notification is displayed on the chat messages! So I cannot chat if a notification appears. We need full control and a native notification system.
Indeed, the lower corners are the most annoying possible. Any time I need to use a terminal, or a chat window, that's where my cursor is, and telegram keeps popping up notifications on top of it.
What's worse, unlike my native notifications, there's not hotkey to close them, so I need to stop working, grab my mouse, and point-and-click. It's absurdly annoying.
@telegramdesktop please add them :smile:
I too would like this. It would provide us with a much better way to see missed notifications without opening the app and they would appear on the lockscreen as well. Hope you'll implement this soon.
One way to get native notifications is to use the web app, and install the Firefox extension/add-on called "Gnotifier" which lets Firefox use your system's native notification system. Not ideal since you can't access telegram from your system tray, but better than non-native notifications if you ask me.
Over a year old, lots of discussion, presumably not difficult to implement, and yet not a single comment by telegramdesktop. Don't get your hopes up!
Would also be nice to have telegram set the WM urgency flag btw.
Perhaps this is relevant for developers: https://github.com/KDE/snorenotify
+1.
Legitimately wondering what is the reason @telegramdesktop even uses GitHub if absolutely no comments on their part are given to this issue in a whole year.
@Igetin Because it is a good way of holding an open source project :) issues are hold open mostly for critical bug reports. Talking about that particular issue — "I didn't get to it yet".
@Igetin FWIW, nobody has come up with a patch/push-request for this either. This issue here means it's open for anyone interested to fix it, but it seems that nobody interested and knowledgeable enough has come around, regrettably.
@sergioad maybe you are interested in this Plasma tricks: custom title bars for apps and some consistency
@AlessandroLongo cool, thanks for the tip :smile:
@mrshadowtux I'll try to use this thing some day:
https://developer.gnome.org/libnotify/0.7/NotifyNotification.html
if it uses what you want, then this will be done. If not — I'm not sure.
@telegramdesktop wouldnt it be better to use https://techbase.kde.org/Projects/Snorenotify
cause of:
Backends Windows Toast Notification OSX Notification Center Free Desktop Notifications (this one is what libnotify does) Growl Snarl Integrated Notification Backend System Tray
on top of that its Qt already. so you would have native notifications on all plattforms.. not linux only
@SanKro see my comment here: https://github.com/telegramdesktop/tdesktop/issues/1610#issuecomment-183979008 :smile:
@telegramdesktop Why don't use something like https://github.com/KDE/snorenotify? The licence of Snorenotify is also compatible with the licence of tdesktop.
@telegramdesktop that is indeed what I was thinking of - libnotify's binary is notify-send and sends the notification to the user's notification daemon and allows for native notifications.
@auchri that's not native notifications; it doesn't support Linux's notification daemons. For example here - libnotify is an implementation of the desktop notification standard; snorenotify doesn't list that as one of their backends and won't be native.
nevermind, I missed the freedesktop notifs. I needed coffee.
@Arcaena you're wrong. snorenotify uses dbus to communicate. thats the freedesktop standard. Telegram+snorenotify integrated > dbus > usersdesktop
on your side it would be like this telegram > bash > notify-send > dbus > userdesktop
libnotify has also the disadvantage that you need to have it (wich is only a GTK desktop thing, cause no Qt desktop has it preinstalled.. there is no need for).
snorenotify can be integrated into the telegram binary and used on windows and osx too without dependencies outside...
so from the users point of view its much better to use snorenotify from devs pov its even more secure because it communicates directly with dbus, not with an external pipe + external dependency...
@telegramdesktop
actually yeah, I looked at the snorenotify docs before I had my coffee and completely missed it listed in their supported backends, so it should work fine. My bad.
And @telegramdesktop would not have to write the notification code for every platform
Regrettably, I'm far from being proficient with C++, but for someone who is, using snorenotify shouldn't be too complex:
https://github.com/KDE/snorenotify#qmake http://hannah.von-reth.de/snorenotify/doc/0.7.0/classSnore_1_1Notification.html
From what I can tell, Telegram/SourceFiles/window.cpp
is where Notifications are call, but I may be mistaken.
using Snorenotify is incredibly easy: https://github.com/jendas1/Snorenotify/blob/master/examples/Simplest%20notification/main.cpp
@auchri it doesn't look that good.
For example it does not support reply from notification on OS X, no subtitles and thumb images in OS X notifications (all this is already in tdesktop) and in Win10 notifications (which I hope to add in the near future) + it requires shipping of additional binaries on Windows (which is not an option with current way of the autoupdating and everything works) + I don't see options to remove already shown notification (at least in OS X).
I didn't yet look if it does play well with Qt static linking (there are some problems with plugins in that approach as I know). But it looks like supporting libnotify on the systems where it is (dynamically loaded) is better for tdesktop.
Loading it dynamically would be perfectly fine, no need to link it static
For example it does not support reply from notification on OS X, no subtitles and thumb images in OS X notifications (all this is already in tdesktop) and in Win10 notifications (which I hope to add in the near future) + it requires shipping of additional binaries on Windows (which is not an option with current way of the autoupdating and everything works) + I don't see options to remove already shown notification (at least in OS X).
That's a pretty bad situation we've landed in. Looks like you're make full use of the OS X notifications, while using broken notifications for *nix/Xorg.
Maybe this can be used everywhere except OS X, and keep using current code there?
Regarding conflicts with auto-updating: we don't really need that on most *nix distributions, since they already come with a package manager that does the job for us, so again, maybe OS X could be exceptional?
Use the desktop native notification system in Linux to a better user experience.