#NEWLINE# def add_image_cb( self , viewer , chname , image , image_info ) : #NEWLINE# #INDENT# if ( not self . gui_up ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# name = image_info . name #NEWLINE# self . logger . debug ( ( 'name=%s' % name ) ) #NEWLINE# if ( image is not None ) : #NEWLINE# #INDENT# nothumb = image . get ( 'nothumb' , False ) #NEWLINE# if self : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# #UNINDENT# bnch = self . get_info ( chname , name , image , image_info ) #NEWLINE# if ( not ( chname in self . name_dict ) ) : #NEWLINE# #INDENT# file_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . name_dict [ chname ] = file_dict #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# file_dict = self . name_dict [ chname ] #NEWLINE# #UNINDENT# if ( not ( name in file_dict ) ) : #NEWLINE# #INDENT# file_dict [ name ] = bnch #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# file_dict [ name ] . update ( bnch ) #NEWLINE# #UNINDENT# self . recreate_toc ( ) #NEWLINE# self . logger . debug ( ( '%s added to Contents' % name ) )