TrayIcon-Code is suboptimal

Bug #5752 reported by Sven Herzberg
22
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

The tray icon code leaves a 1 pixel wide bar in the tray area, which should not happen. The attached screenshots show two states: Updates and Notes available (while seeing the printer notification), and no updates, notes and printing available.

As you can see the printing notification (gnome-cups-icon) gets hidden completely while the update icons are replaces by one pixel bars.

Revision history for this message
Sven Herzberg (herzi) wrote : A screenshot of a quite full system tray

Here you can see:

* printing
* music
* im
* update note
* available updates

Revision history for this message
Sven Herzberg (herzi) wrote : A not so full system tray

Here you can't see:
* printing

And you can see:
* music
* im
* a thin bar
* another thin bar

Revision history for this message
Sven Herzberg (herzi) wrote :

It looks like you should call gtk_widget_hide() in the tray icon, not only on its content.

Changed in update-notifier:
assignee: nobody → mvo
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

The code calls gtk_widget_hide() on the complete EggTrayIcon. I updated to the latest version of EggTrayIcon with the recent upload, does that fix the problem for you? If not, how I reproduce those little one pixel bars?

Thanks,
 Miachel

Changed in update-notifier:
status: Unconfirmed → Needs Info
Revision history for this message
Sven Herzberg (herzi) wrote :

Which package version should be the fixed one?

Revision history for this message
Michael Vogt (mvo) wrote :

The small lines can be seen when the panel is set to transparent.

Revision history for this message
Crispin Flowerday (crispin-flowerday-deactivatedaccount) wrote :

I don't see what info this bug is waiting on, so setting to Confirmed, I can see this too.

Changed in update-notifier:
status: Needs Info → Confirmed
Revision history for this message
Crispin Flowerday (crispin-flowerday-deactivatedaccount) wrote : Patch to ensure empty space doesnt appear

I have been looking at this (it has annoyed me for a while), basically, the eggtrayicon code doesn't remove the icon from the tray when it is just hidden, you have to unrealize the icon to really get rid of it.

This patch ensures that when we call gtk_widget_hide() on a tray icon, we also call gtk_widget_unrealize(). This seems to work much better, and although it could be classed as a hack, hopefully the need for it will dissappear when gtk 2.10 comes out with the built-in object for doing this.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Will this fix Bug #4405 ?

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the patch and sorry for the long reply. I applied the patch to my bzr repository and it will be part of the next upload.

Cheers,
 Michael

Michael Vogt (mvo)
Changed in update-notifier:
status: Confirmed → Fix Committed
Michael Vogt (mvo)
Changed in update-notifier:
status: Fix Committed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I think now the notification icon is too close to the icon next to it.

Maybe it could be better if the developers puts a little space around the icon.

Revision history for this message
Ricardo Pérez López (ricardo) wrote : Notification icon is too close to the others

In this screenshot, you can see the notification icon very close to the amule icon.

Revision history for this message
Sven Herzberg (herzi) wrote :

I updated yesterday, I have now a new updates-available-icon. But unfortunately I have one thin line again (one of those lines described above). Killing update-notifier makes that line disappear.

Changed in update-notifier:
status: Fix Released → Unconfirmed
Revision history for this message
Michael Vogt (mvo) wrote :

It seems that the new code leaves a (single?) thin line when it was shown and is hidden then (e.g. after applying all updates).

Changed in update-notifier:
status: Unconfirmed → Confirmed
Revision history for this message
Crispin Flowerday (crispin-flowerday-deactivatedaccount) wrote :

Right, the problem is that the 'update.c' hunk from my patch is missing from the new version.

Revision history for this message
Michael Vogt (mvo) wrote :

*cough* Thanks!

I fixed this localy now and it will be part of the next upload.

Cheers,
 Michael

Revision history for this message
Michael Vogt (mvo) wrote :

The missing bit of the patch was applied and uploaded (update-notifier_0.42.1_source.changes)

Changed in update-notifier:
status: Confirmed → Fix Released
Revision history for this message
Alexander Jones (alex-weej) wrote :

There is still hunks of space being allocated in the Notification area - something is still broken here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.