#NEWLINE# def update( self ) : #NEWLINE# #INDENT# count = MailItems ( ) . getMailItemCount ( ) #NEWLINE# max = ( self . startIndex + MailList . VISIBLE_EMAIL_COUNT ) #NEWLINE# if ( max > count ) : #NEWLINE# #INDENT# max = count #NEWLINE# #UNINDENT# self . newerButton . setVisible ( ( self . startIndex != 0 ) ) #NEWLINE# self . olderButton . setVisible ( ( ( self . startIndex + MailList . VISIBLE_EMAIL_COUNT ) < count ) ) #NEWLINE# startIndexPlusOne = ( self . startIndex + 1 ) #NEWLINE# self . countLabel . setText ( ( '%d - %d of %d' % ( startIndexPlusOne , max , count ) ) ) #NEWLINE# i = 0 #NEWLINE# while ( i < MailList . VISIBLE_EMAIL_COUNT ) : #NEWLINE# #INDENT# if ( ( self . startIndex + i ) >= MailItems ( ) . getMailItemCount ( ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# item = MailItems ( ) . getMailItem ( ( self . startIndex + i ) ) #NEWLINE# self . table . setText ( ( i + 1 ) , 0 , item . sender ) #NEWLINE# self . table . setText ( ( i + 1 ) , 1 , item . email ) #NEWLINE# self . table . setText ( ( i + 1 ) , 2 , item . subject ) #NEWLINE# i = ( i + 1 ) #NEWLINE# #UNINDENT# while ( i < MailList . VISIBLE_EMAIL_COUNT ) : #NEWLINE# #INDENT# self . table . setHTML ( ( i + 1 ) , 0 , '&nbsp;' ) #NEWLINE# self . table . setHTML ( ( i + 1 ) , 1 , '&nbsp;' ) #NEWLINE# self . table . setHTML ( ( i + 1 ) , 2 , '&nbsp;' ) #NEWLINE# i = ( i + 1 ) #NEWLINE# #UNINDENT# if ( self . selectedRow == ( - 1 ) ) : #NEWLINE# #INDENT# self . selectRow ( 0 )