#NEWLINE# def install_button_click( self ) : #NEWLINE# #INDENT# installed = ( self . _neo and any ( [ x . startswith ( self . _applet . aid ) for x in self . _neo . list_apps ( ) ] ) ) #NEWLINE# worker = QtCore . QCoreApplication . instance ( ) . worker #NEWLINE# if installed : #NEWLINE# #INDENT# if ( QtGui . QMessageBox . Ok != QtGui . QMessageBox . warning ( self , m . delete_app_confirm , m . delete_app_desc , ( QtGui . QMessageBox . Ok | QtGui . QMessageBox . Cancel ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# work = partial ( self . _neo . delete_app , self . _applet . aid ) #NEWLINE# worker . post ( ( m . deleting_1 % self . _applet . name ) , work , self . _cb_uninstall ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . _applet . is_downloaded : #NEWLINE# #INDENT# work = partial ( x . _neo . install_app , self . _applet . cap_file ) #NEWLINE# worker . post ( ( m . installing_1 % self . _applet . name ) , work , self . _cb_install ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# worker . download ( self . _applet . cap_url , self . _cb_download )