<s> from ajenti . api import * <EOL> from ajenti . plugins import manager , ModuleDependency , BinaryDependency <EOL> from ajenti . plugins . main . api import SectionPlugin <EOL> from ajenti . ui . binder import Binder <EOL> @ plugin <EOL> class PluginsPlugin ( SectionPlugin ) : <EOL> def init ( self ) : <EOL> self . title = _ ( '<STR_LIT>' ) <EOL> self . icon = '<STR_LIT>' <EOL> self . category = '<STR_LIT>' <EOL> self . order = <NUM_LIT> <EOL> self . append ( self . ui . inflate ( '<STR_LIT>' ) ) <EOL> def post_plugin_bind ( object , collection , item , ui ) : <EOL> if not item . crash : <EOL> ui . find ( '<STR_LIT>' ) . visible = False <EOL> def post_dep_bind ( object , collection , item , ui ) : <EOL> if not item . satisfied ( ) : <EOL> installer = ui . find ( '<STR_LIT>' ) <EOL> if item . __class__ == ModuleDependency : <EOL> installer . package = '<STR_LIT>' + item . module_name <EOL> if item . __class__ == BinaryDependency : <EOL> installer . package = item . binary_name <EOL> installer . recheck ( ) <EOL> self . find ( '<STR_LIT>' ) . post_item_bind = post_plugin_bind <EOL> self . find ( '<STR_LIT>' ) . post_item_bind = post_dep_bind <EOL> self . binder = Binder ( None , self . find ( '<STR_LIT>' ) ) <EOL> def on_page_load ( self ) : <EOL> self . context . endpoint . send_progress ( _ ( '<STR_LIT>' ) ) <EOL> self . plugins = sorted ( manager . get_all ( ) . values ( ) ) <EOL> self . binder . setup ( self ) . populate ( ) </s>
