Thread
:
[Announce] Telescope: Graphical task switcher with thumbnails
View Single Post
Mitrandir
2010-08-05 , 11:00
Posts: 355 | Thanked: 598 times | Joined on Sep 2009 @ Nizhny Novgorod, Russia
#
76
I will explain.
If you don't know anything about D-Bus, imagine it as communication channel using which one applications can provide named services and respond to requests from other applications.
Hildon-desktop provides D-Bus service named ‘org.freedesktop.Notifications’. This service provides several methods for manupulating notifications.
In theory, D-Bus has ‘eavesdrop’ mode, using which i'm able to monitor activity on bus named ‘org.freedesktop.Notifications’ and resemble notifications behavior. But in practice, Diablo's old version of D-Bus contains proven bug that makes me unable to monitor all the activity (specifically, hildon-desktop's answers). So, i don't think that i can do something working with this way
Another way seems to me more promising. Actually, D-Bus already has the solution for our problem: when service application acquires bus name (e.g. ‘org.freedesktop.Notifications’), it could specify the flag named DBUS_NAME_FLAG_ALLOW_REPLACEMENT. This flag tells D-Bus that this service is allowed to be overriden by other application, if needed. But for some reason (i'm personally think that with no reason) hildon developers did not specified this flag.
I have patched libhildondesktop0 with changing of only single source line: added DBUS_NAME_FLAG_ALLOW_REPLACEMENT. With this flag, Telescope can override hildon-desktop's notifications service and provide the own one. This doesn't have any side effects: if you don't run Telescope, service will be owned by hildon-desktop and notifications will work as before. If Telescope will fail for some reason, service will be given back to hildon-desktop and notifications will continue to work as well.
So, this patch has no negative effects, but will allow us to extend hildon-desktop's functionality.
By the way, we can include in patched hildon-desktop other useful things such as
patch for locking home applets
and
patch for making size of statusbar configurable
.
Last edited by Mitrandir; 2010-08-05 at
11:03
.
Quote & Reply
|
The Following 4 Users Say Thank You to Mitrandir For This Useful Post:
cstryon
,
giladmttw
,
sjgadsby
,
Snoshrk
Mitrandir
View Public Profile
Send a private message to Mitrandir
Find all posts by Mitrandir