On Sun, 2005-04-03 at 00:41 +0900, Carsten Haitzler wrote:
> On Fri, 1 Apr 2005 11:00:39 +0100 Gen Zhang <[EMAIL PROTECTED]> babbled:
> 
> > Hi all,
> > 
> > I've been cleaning out my old code bases and came across an ecore
> > module implementing the freedesktop startup notification spec
> > (http://freedesktop.org/wiki/Standards_2fstartup_2dnotification_2dspec).
> > It was going to be part of my rewrite of osxdocker/engage. I read
> > somewhere that HandyAndE was rewriting it anyway and was wondering if
> > there's any interest in such a module. It currently implements a few
> > signals that are raised via ecore, and ability to send a "remove"
> > message from processes that follow the spec.
> 
> well it is part of the netwm spec - so mayaswell put it in - it might be a bit
> hard to meld in though :)
> 
Okay, I've attached the relevant files (just two), along with a small
test app. A few highlights:

 * I don't know what I was smoking when I wrote this. Some of the
structures and techniques used are weird. There's a sn_sequences data
list that really should be a hash (from string to SN_Sequence). But for
some reason I haven't done that. I don't know why. Similarly, I have a
fixed structure for SN_Sequence, which may not be a very clever move. It
may be better as a hash (again); but I don't know why I didn't make it
that way to begin with. My biggest worry is that there was a good reason
for doing it this way.
 * I've tried to follow the coding standard that I can see in the Ecore
sources -- namespacing, etc. So everything public should be prefixed
with sn_ (or suitable capitalisation). It compiles cleanly with gcc 3.4,
-Wall, no warnings.
 * The plan was to have sn_init automatically send out a REMOVE message.
However, the spec says that it should take the ID from an environment
variable. Haven't quite figured out how to do this.
 * I've got a function called sn_x_message which sends out a client
message as defined in the spec. This is probably a good candidate for
inclusion into ecore_x proper.

Sorry if this feels a little raw -- it's not quite as bad as that. It
works perfectly fine, as far as I can test (GNOME, KDE, XFCE, etc. all
work with it). Hope this helps someone...

Regards,
Gen

Attachment: sn.tar.gz
Description: Startup Notification Module

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to