Thursday, December 30, 2010

gnocl::notify -new gnome widget

I was asked today to sort out an issue with the gnome package. In the process of doing so I noticed that the implementation of a gnome notify object was restricted to use as an option of a statusicon object. In all fairness, I've never seen it used in any other way, but.... I thought that I really ought take a look at completing the binding. So, I've just hacked together the first attempt. There's still quite a bit left to do, but it will appear like a widget allowing changes to be made until is the notification object is 'closed'.

Here's my test script.

# statusIcon.tcl
# the next line restarts using tclsh \
exec tclsh "$0" "$@"

package require Gnocl
package require GnoclGnome

set gui [gnocl::window]

set not [gnocl::notify \
    -appName GNOCL \
    -summary SUMMARY \
    -body BODY \
    -icon ICON \
    -sound bell.wav \
    -timeout 500 \
    -urgency critical \
    -attach $gui \
    -onClosed "%w Puts CLOSED"]

puts $not

No comments: