! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Feature request : use sync notifications for brigthness when notify-osd is pr...
Status:
CLOSED: FIXED
Priority:
Very Low
Severity:
enhancement
Product:
Xfce4-power-manager
Component:
General

Comments

Description Steve Dodier-Lazaro editbugs 2009-07-08 08:48:15 CEST
Hello,

I'm writing this feature request because I prefer having homogeneous notifications, and xf-p-m uses a custom system.

What i would like is that, if notify-osd is present (more precisely if the notification server supports image-only and synchronous-notifications), xf-p-m uses synchronous notifications instead of it's custom system.

At the moment, xf-p-m already makes use of libnotify, so implementing this feature should be rather easy. I can help with the inner working of the sync notifications if needed (just pm SiDi on freenode), but I'd rather not have to write a whole patch for this feature, as I don't know the source code so well.

Thanks in advance.
Comment 1 Ali Abdallah editbugs 2009-07-09 06:56:10 CEST
(In reply to comment #0)
> Hello,
> 
> I'm writing this feature request because I prefer having homogeneous
> notifications, and xf-p-m uses a custom system.
> 
> What i would like is that, if notify-osd is present (more precisely if the
> notification server supports image-only and synchronous-notifications), xf-p-m
> uses synchronous notifications instead of it's custom system.
> 

notify-osd has an option for displaying percentage progress in notifications to be used for volume+brightness, but those options aren't standardized or present in all notification daemons, those are canonical specific, that's why i didn't make use of them. Gnome power manager doesn't support this either by default, it is patched in Ubuntu.

Let me know what do you think.
Comment 2 Steve Dodier-Lazaro editbugs 2009-07-09 08:01:30 CEST
It's true they use a non-standard capability, but if any other daemon wants to implement x-private-canonical-synchronous, then it will just work aswell. I don't consider it much worse than attaching a notification to a tray or using html markup, which is also only supported by some daemons. ;)

And notify-osd is also used by some people in Fedora and Arch, at least, even if it's mostly on Ubuntu. I would understand if you don't want to implement it in xf-p-m, but in this case, would you mind helping me to write a patch for this in Xubuntu, by pointing me to the functions used to call your custom notification system ?

Thanks in advance.
Comment 3 Ali Abdallah editbugs 2009-07-09 08:06:12 CEST
(In reply to comment #2)
> And notify-osd is also used by some people in Fedora and Arch, at least, even
> if it's mostly on Ubuntu. I would understand if you don't want to implement it
> in xf-p-m, but in this case, would you mind helping me to write a patch for
> this in Xubuntu, by pointing me to the functions used to call your custom
> notification system ?

I should be able to cook a patch for this based on the gnome power manager patch, i will post it here after finishing/testing it.

I will come to you later on today.
Comment 4 Ali Abdallah editbugs 2009-07-09 08:10:22 CEST
(In reply to comment #2)
>would you mind helping me to write a patch for
> this in Xubuntu, by pointing me to the functions used to call your custom
> notification system ?

BTW, if you want to have a look you, the function is in xfpm-brightness-widget, called xfpm_brightness_widget_set_level which sets the level of brightness and then expose the window to do the cairo drawing.
Comment 5 Ali Abdallah editbugs 2009-07-09 09:05:54 CEST
Created attachment 2444 
Patch to add support for notify-osd.
Comment 6 Ali Abdallah editbugs 2009-07-09 09:07:57 CEST
(In reply to comment #5)
> Created an attachment (id=2444) [details]
> Patch to add support for notify-osd.

This is the patch, please test it, it works for me, it is even better than the gnome power manager patch there each time the user press brightness up or down they stupidly query the server for its capabilities instead of doing it once at the beginning and when the notification server is replaced.
Comment 7 Steve Dodier-Lazaro editbugs 2009-07-09 09:36:14 CEST
The patch seems to work allright for me, kudos !
Comment 8 Ali Abdallah editbugs 2009-07-09 09:45:51 CEST
(In reply to comment #7)
> The patch seems to work allright for me, kudos !

Okay good.
Comment 9 Ali Abdallah editbugs 2009-07-09 18:19:33 CEST
(In reply to comment #7)
> The patch seems to work allright for me, kudos !

Version 0.8.2 supports this by default, since it is completely harmless if notify-osd is not present, and nice if it is.

Bug #5536

Reported by:
Steve Dodier-Lazaro
Reported on: 2009-07-08
Last modified on: 2009-07-14

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Version:
Unspecified

Attachments

Additional information