Plugin NotifyOsd

Bug #332999 reported by Steve Dodier-Lazaro on 2009-02-22
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Wishlist
Steve Dodier-Lazaro

Bug Description

Hello,

I'm filling this bug report, even if it's for a plugin, because i think Exaile is lacking an important feature here : the possibility to fully replace the OSD by libnotify.

At the moment, the OSD is displayed on tray icon rollover, volume chance, and when a song is played / resumed.

The libnotify plugin is only displayed when a song is played (even not when it's resumed).

I think it'd be more simple to have an option for using libnotify instead of the OSD directly in the preferences, but the most important remains that those features are usable with libnotify (especially because Ubuntu Jaunty's new notifications are really beautiful <3).

Thanks in advance.

Related branches

reacocard (reacocard) on 2009-02-22
Changed in exaile:
importance: Undecided → Wishlist
status: New → Confirmed
Steve Dodier-Lazaro (sidi) wrote :

I am not fluent with Python but i am willing to try to do this on my own.

Would the devs like me to take the code from 0.3.0a1, and try to include an option in Preferences for directly using notify-send instead of the current notification system ?

Adam Olsen (arolsen) wrote :

If you want to, that'd be great, but don't use notify-send, use the python bindings.

Steve Dodier-Lazaro (sidi) wrote :

Hello,

I had a look at the notify-python bindings, and that's what i aim to use.

I'll keep you in touch as soon as i manage to get a result.

Changed in exaile:
assignee: nobody → sidnioulz
Steve Dodier-Lazaro (sidi) wrote :

I'm uploading a patch that adds events for the playback_resume event and for the tray icon hover event.

I also added code for the tray icon scroll event, but not the actual set_volume calls.

Steve Dodier-Lazaro (sidi) wrote :

I noticed the plugin seemed to be having failures with GNOME in Intrepid, probably due to the enter- event on the tray icon or the use of the "update" function of pynotify (it seems to cause bugs/crashes with the current gnome notification-daemon).

I'll try to solve those issues and post a patch within the next 2 weeks (pretty busy atm) that will include 2 plugins :

- One that is just a mere improvemennt of the current libnotify plugin, designed for use with the current notification-daemon

- One that uses the update function and that is meant to work with Ubuntu Jaunty 9.04+

Here is what it currently looks like on my PC : http://img258.imageshack.us/img258/5286/captureo.png

Steve Dodier-Lazaro (sidi) wrote :

Attaching a file for Exaile 0.2.14 (and only for this version !)

It's a libnotify plugin that shows a notification with the title/artist/album info, with the icon, and that also shows itself if you hover the icon. It also updates the current notification instead of popping new ones.

If you want to use it, install the usual libnotify plugin from the plugins window, then replace ~/.exaile/plugins/exailenotify.py with this file

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

Steve Dodier, 26.04.2009 03:27:
> It's a libnotify plugin that shows a notification with the
> title/artist/album info, with the icon, and that also shows itself if
> you hover the icon. It also updates the current notification instead of
> popping new ones.

You should take care that you don’t pop out the notification if there is
nothing playing. Currently the notification for the last played track is
always displayed on tray icon hover, even if playback has been stopped
long ago.

Regards, Mathias

- --
debian/rules
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkn0i4MACgkQYfUFJ3ewsJi2hACfWSSjGcSvx/eDnwaZnIswlsMg
d/UAoJZ990YTxzcvq5h+1bSTZkRfu6lA
=Z5Nr
-----END PGP SIGNATURE-----

Hello,

Thanks for pointing this out. In fact, I used to have a version where the icon was replaced by a "gtk-media-stop" icon when the playback had been actually stopped (just as it does now with pause), but the problem I was having is that the event responsible for playback stop was just being caught by my plugin, for instance, when the song was changing (since the current song was stopped and then next song was launched), which resulted into something i wasnt happy of. I'll check tonight if there is a way to catch an event only when the stop button / command line is used, and change the plugin if I manage to do it.

Also, anyone who knows how to code in PyGTK is more than welcome to add a "tray_hover" plugin setting with an adequate checkbox in the plugin preferences GUI. My attempts to do this have not been successful.

Steve Dodier-Lazaro (sidi) wrote :

Little changes included in the plugin :

- Adding stop event again. Now, if you stop a song and then put the mouse on the tray icon, it'll display the last song's info, but the icon will be the notification-audio-stop icon.

- Now using the notification-audio-* icons as recommanded by the notify-osd guidelines

- The plugin's file is now separated from the original one (as my code is dirty and not really efficient :D, and also as it's designed for notify-osd, it's a patch for an 'old' version of exaile, and thus doesn't need to be bleeding-edge with server caps checkout and such stuff - that'll be for a clean 0.3 plugin).

In order to try it, add it to your ~/.exaile/plugins and it should then be available from Edit -> Plugins. Don't forget to disable the old one.

So i've put the startings of what you suggest into the 0.3 file. Unfortunately it has bested me. attach_to_status_icon causes major instabilities and boxes pack weirdly. Therefore I request help. with the branch above or the diff. if you want to try for the instabilities, set the ALLOW_* value to True at the top of the __init__.py and uncomment the stuff in the .glade. Otherwise this is ready to be patched into the trunk. It currently has settings for
* Resizing covers
* Summary text
* Body text
  * With both artist/album
  * With only artist
  * With only album
I chose those three because that's just what we used before but i also think that should be changed before release if someone can think of a way that would not complicate it.

Steve Dodier-Lazaro (sidi) wrote :

Hello,

Thanks for your work on this. I also noticed, while testing this plugin with notification-daemon, that it was very unstable. I'm not sure of the reason, apparently it doesn't like attach_to_icon and update at the same time. I'll work a little more on this plugin for the summer, I'll use proper get_server_capabilities in order to have different code for notify-osd (using update and notification-media-* icons) and notification-daemon (attach_to_icon, and no update() ).

I really can't get the GUI settings thing to work. I'm pleased with my 0.2.14 version's plugins (apart from some buggy stuff that is still here in the above patch), and I'll try to get the same features for the "final" plugin (for instance, the use of notification-* icons in notify-osd, for the pause/read/stop events).

I'll begin working on this since June. I'm sorry for the low quality of my code, by the way. Still learning python ^^

@Steve,
Agreed about the instabilities. without further information I just blocked it out with a global True/False statement and disabled the configuration. if we figure out what's wrong at some point we can change it back...

The patch i made has been committed to 0.3 a few revisions ago, just to keep information in a nice and easy to find place

Alright, thanks for that, Abhishek.

I'll begin working again on the plugin in the next weeks, then, and I'll
keep you informed. I may separate the notify-osd plugin and the libnotify
(for xfce4-notifyd / notification-daemon) one, since not all servers seem to
like .update().

2009/6/2 Abhishek Mukherjee <email address hidden>

> @Steve,
> Agreed about the instabilities. without further information I just blocked
> it out with a global True/False statement and disabled the configuration. if
> we figure out what's wrong at some point we can change it back...
>
> The patch i made has been committed to 0.3 a few revisions ago, just to
> keep information in a nice and easy to find place
>
> --
> The libnotify plugin doesn't have as many features as OSD
> https://bugs.launchpad.net/bugs/332999
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Exaile: Confirmed
>
> Bug description:
> Hello,
>
> I'm filling this bug report, even if it's for a plugin, because i think
> Exaile is lacking an important feature here : the possibility to fully
> replace the OSD by libnotify.
>
> At the moment, the OSD is displayed on tray icon rollover, volume chance,
> and when a song is played / resumed.
>
> The libnotify plugin is only displayed when a song is played (even not when
> it's resumed).
>
> I think it'd be more simple to have an option for using libnotify instead
> of the OSD directly in the preferences, but the most important remains that
> those features are usable with libnotify (especially because Ubuntu Jaunty's
> new notifications are really beautiful <3).
>
> Thanks in advance.
>

--
Steve Dodier
OpenPGP : 1B6B1670
IRC : SiDi on irc.freenode.net
Jabber : <email address hidden>
<email address hidden>
https://launchpad.net/~sidi

There now is a fully working plugin in my own branch, for Exaile 0.3.0 and notify-osd, separated from the current libnotify plugin.

Changed in exaile:
status: Confirmed → Fix Committed
Steve Dodier-Lazaro (sidi) wrote :

Next step : offer to replace "Album" by "Radio" in the notifications when the music is played from a radio, and add a GUI like the notify plugin (</jealous>)

summary: - The libnotify plugin doesn't have as many features as OSD
+ Plugin NotifyOsd
Changed in exaile:
status: Fix Committed → In Progress
maksymov.vlad (maksymov.vlad) wrote :

hi! i'm using a 0.2.99.2 from PPA launchpad. I don't know how to install libnotifyosd plugin. Can u post here a few steps to get ubuntu 9.04 notifications :) like here - http://www.youtube.com/watch?v=HGBAZXfbwB8

maksymov.vlad (maksymov.vlad) wrote :

PS
i'm using an ubuntu 9.04

Type "bzr branch lp:exaile" in order to grab the latest code from Exaile,
and then go to the "plugins" folder, grab the "notifyosd" one and copy it to
"/usr/share/exaile/plugins/" (if it's still the place where Exaile is
installed).

maksymov.vlad (maksymov.vlad) wrote :

i copied "plugins" folder to /usr/share/exaile/plugins/ , but i have
no "notification bubbles" ((
http://lh3.ggpht.com/_SLTG64AdG8Q/SlRGBY_5cgI/AAAAAAAAC8w/lfKIsk2XFL4/s512/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-exaile.py.png

On Wed, Jul 8, 2009 at 9:11 AM, Steve Dodier<email address hidden> wrote:
> Type "bzr branch lp:exaile" in order to grab the latest code from Exaile,
> and then go to the "plugins" folder, grab the "notifyosd" one and copy it to
> "/usr/share/exaile/plugins/" (if it's still the place where Exaile is
> installed).
>
> --
> Plugin NotifyOsd
> https://bugs.launchpad.net/bugs/332999
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Exaile: In Progress
>
> Bug description:
> Hello,
>
> I'm filling this bug report, even if it's for a plugin, because i think Exaile is lacking an important feature here : the possibility to fully replace the OSD by libnotify.
>
> At the moment, the OSD is displayed on tray icon rollover, volume chance, and when a song is played / resumed.
>
> The libnotify plugin is only displayed when a song is played (even not when it's resumed).
>
> I think it'd be more simple to have an option for using libnotify instead of the OSD directly in the preferences, but the most important remains that those features are usable with libnotify (especially because Ubuntu Jaunty's new notifications are really beautiful <3).
>
> Thanks in advance.
>

--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Best regards,
Vladislav Maksymov
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

maksymov.vlad (maksymov.vlad) wrote :

i copied "plugins" folder to /usr/share/exaile/plugins/ , but i have
no "notification bubbles" ((
http://lh3.ggpht.com/_SLTG64AdG8Q/SlRGBY_5cgI/AAAAAAAAC8w/lfKIsk2XFL4/s512/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-exaile.py.png

Steve Dodier-Lazaro (sidi) wrote :

They only appear when the main GUI isn't focused. Please use
answers.launchpad.net/exaile for questions, this bug report is for features
and development of notification plugins.

reacocard (reacocard) on 2009-07-16
Changed in exaile:
milestone: none → 0.3.0
Steve Dodier-Lazaro (sidi) wrote :

Remaining problems :

 * Some tags such as length and composer are not supported
 * There is no way to perfectly imitate a tooltip behaviour

I may code a patch to fix the first problem but it's not sure yet. Anyway the goals I had fixed for 0.3.0 are now reached.

Changed in exaile:
status: In Progress → Fix Committed
reacocard (reacocard) on 2009-08-25
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers