Faire un don pour aider au developpement de WiPhA



 Nombre de membres 29 membres

Utilisateurs en ligne

( personne )

 147719 visiteurs

 9 visiteurs en ligne

forum.gifForum - Yamb - Sujet n°23

Sujet n°23 Great extension -- Thanks!
    par ghostintheshell - visiteur
le 14/11/2005 @ 04:20
Thank you very much for this great (and missing) extension to Thunderbird!

I use Gnome with the "newmailnotify" script.

I've just adapted it to my needs.


# $­Id: newmailnotify 724 2005-08-08 10:55:58Z adam $­
# This is a Tcl/Tk version of a small newmail notify popup.
# Largely based o­n amsn's popup script. (
# I use it in combination with the yamb thunderbird extension.
# (
# Script is tested o­n:
#  - Solaris 8, running CDE.
#  - Linux RH3E, running KDE.
# Arthur van Dam,

# uncomment this line to ring the system bell

# uncomment this line to play a sound (Solaris)
#exec audioplay /usr/demo/SOUND/sounds/

# Cuts off a string at n characters and adds three dots '...'
proc chopString ­{­ str n } ­{­
        if ­{­[string length $­str] >$­n} ­{­
                set str "[string range $­str 0 [expr $­n-1]]..."

        return $­str;

# yamb specific stuff:
set subjectData [lindex $­argv 0]
set senderData [lindex $­argv 1]
set recipientsData [lindex $­argv 2]
set sizeData [lindex $­argv 3]
set folderData [lindex $­argv 4]
set accountTypeData [lindex $­argv 5]
set accountNameData [lindex $­argv 6]

# I still need to get rid of the main window, just make it small for now.
wm geometry . 10x10
wm overrideredirect . 1

set width 250
set height 62
#set family "Helvetica"
set family "-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso10646-1"
# A nice post-it note yellowish:
set bgcolor "#FFFFCC"
set size "10"
set xpos 1
set ypos 1
set linelength 30

                font create sboldf -family $­family -size $­size -weight bold
                font create splainf -family $­family -size $­size -weight normal
                font create sbolditalf -family $­family -size $­size -weight bold -slant italic

                set w .newmail

                toplevel $­w -width 1 -height 1
                wm group $­w .
                wm state $­w withdrawn
                canvas $­w.c -bg $­bgcolor -width $­width -height [expr $­height] \
                        -relief solid -borderwidth 1
                pack $­w.c -fill y

                set msg "[chopString "From: $­senderData" $­linelength]\n[chopString "Subject: $­subjectData" $­linelength]\n[chopString "Size: $­sizeData bytes" $­linelength]"

             &nbs p;  set notify_id [$­w.c create text 5 5 -font sboldf \
                -justify left -width [expr $­width-10] -anchor nw -text "New Mail!"]

                set notify_id [$­w.c create text 5 20 -font splainf \
                -justify left -width [expr $­width-10] -anchor nw -text "$­msg"]

                wm title $­w "New mail"
                wm overrideredirect $­w 1
                #wm transient $­w
                wm state $­w normal

Poster une réponse

^ Haut ^

Site non déclaré à la CNIL dans le cadre de la dispense n°6
Vous disposez d'un droit d'accès, de modification, de rectification et de suppression des données qui vous concernent via votre profil.
GuppY -    Site créé avec GuppY v4.5.14 © 2004-2005 - Licence Libre CeCILL   GuppY -

Document généré en 0.14 seconde