Changeset 75 for pykoticon/trunk

Show
Ignore:
Timestamp:
01/19/05 08:09:56 (20 years ago)
Author:
jerome
Message:

Added the remaining credits information

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r72 r75  
    3434    try : 
    3535        import win32api 
    36         import win32net 
    37         import win32netcon 
    3836    except ImportError :     
    3937        raise ImportError, "Mark Hammond's Win32 Extensions are missing. Please install them." 
     
    4947except ImportError :     
    5048    hasWxPython = 0 
    51     raise ImportError, "wxPython for Windows is missing. Please install it." 
     49    raise ImportError, "wxPython is missing. Please install it." 
    5250     
    5351DUMPYKOTA_URL = "http://cgi.librelogiciel.com/cgi-bin/dumpykota.cgi" 
     
    204202    def __init__(self, parent, user) : 
    205203        gridlib.Grid.__init__(self, parent, -1) 
     204        nbrows = len(user.Quotas.keys()) 
     205        nbcols = 4 
    206206        if user.LimitBy == "balance" : 
    207             nbcols = 3 
    208         else :     
    209             nbcols = 4 
    210         self.CreateGrid(len(user.Quotas.keys()), nbcols) 
     207            nbrows += 1 
     208            nbcols -= 1 
     209        self.CreateGrid(nbrows, nbcols) 
    211210        self.EnableEditing(False) 
    212211        if user.LimitBy == "balance" : 
     
    236235                self.SetCellValue(i, 2, str(printer.PricePerJob)) 
    237236                i += 1 
     237            self.SetRowLabelValue(i, "") 
     238            self.SetCellValue(i, 0, _("CREDITS :") + (" %.2f" % user.Balance)) 
     239            self.SetCellAlignment(i, 0, wx.ALIGN_CENTRE, wx.ALIGN_CENTRE) 
    238240        else :     
    239241            self.SetColLabelValue(0, _("Page Counter"))