#NEWLINE# def deactivate( self , name ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'deactivating %s' % name ) ) #NEWLINE# lname = name . lower ( ) #NEWLINE# if ( lname in self . focus ) : #NEWLINE# #INDENT# self . clear_focus ( lname ) #NEWLINE# #UNINDENT# if ( lname in self . active ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'removing from task bar: %s' % lname ) ) #NEWLINE# bnch = self . active [ lname ] #NEWLINE# self . make_callback ( 'deactivate-plugin' , bnch ) #NEWLINE# del self . active [ lname ] #NEWLINE# try : #NEWLINE# #INDENT# self . stop_plugin ( bnch . pInfo ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . logger . error ( ( 'Error deactivating plugin: %s' % str ( e ) ) ) #NEWLINE# #UNINDENT# active = self . active . keys ( ) #NEWLINE# if ( len ( active ) > 0 ) : #NEWLINE# #INDENT# name = active [ 0 ] #NEWLINE# self . logger . debug ( ( 'focusing: %s' % active ) ) #NEWLINE# self . set_focus ( name )