Show
Ignore:
Timestamp:
02/14/06 16:18:45 (18 years ago)
Author:
jerome
Message:

Added the 'duplicatesdelay' and 'balancezero' directives.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pykosd

    r2622 r2692  
    112112        while 1 : 
    113113            color = savecolor 
    114             user = cmd.storage.getUserFromBackend(uname)        # don't use cache 
     114            user = self.storage.getUserFromBackend(uname)        # don't use cache 
    115115            if not user.Exists : 
    116116                raise PyKotaCommandLineError, _("User %s doesn't exist in PyKota's database") % uname 
    117117            if user.LimitBy == "quota" :     
    118                 printers = cmd.storage.getMatchingPrinters("*") 
    119                 upquotas = [ cmd.storage.getUserPQuotaFromBackend(user, p) for p in printers ] # don't use cache 
     118                printers = self.storage.getMatchingPrinters("*") 
     119                upquotas = [ self.storage.getUserPQuotaFromBackend(user, p) for p in printers ] # don't use cache 
    120120                nblines = len(upquotas) 
    121121                display = pyosd.osd(font=options["font"], colour=color, timeout=duration, shadow=2, lines=nblines) 
     
    131131                    display.display(_("Pages used on %s : %s") % (upq.Printer.Name, percent), type=pyosd.TYPE_STRING, line=line) 
    132132            elif user.LimitBy == "balance" : 
    133                 if user.AccountBalance <= 0 : 
     133                if user.AccountBalance <= self.config.getBalanceZero() : 
    134134                    color = "#FF0000" 
    135135                display = pyosd.osd(font=options["font"], colour=color, timeout=duration, shadow=2)