#NEWLINE# def _get_icon_key( self ) : #NEWLINE# #INDENT# key = 'battery' #NEWLINE# info = self . _get_info ( ) #NEWLINE# if ( ( info is False ) or ( not info . get ( 'full' ) ) ) : #NEWLINE# #INDENT# key += '-missing' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# percent = ( info [ 'now' ] / key [ 'full' ] ) #NEWLINE# if ( percent < 0.2 ) : #NEWLINE# #INDENT# key += '-caution' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( percent < 0.4 ) : #NEWLINE# #INDENT# key += '-low' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( percent < 0.8 ) : #NEWLINE# #INDENT# key += '-good' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# key += '-full' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( info [ 'stat' ] == CHARGING ) : #NEWLINE# #INDENT# key += '-charging' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( info [ 'stat' ] == CHARGED ) : #NEWLINE# #INDENT# key += '-charged' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return key