def install_fun(): row = str(self.listWidget.currentRow()) if row == "0": nvidia.install() elif row == "1": nvidia.install_173() elif row == "2": nvidia.install_96() elif row == "3": codecs.install() elif row == "4": fonts.install() elif row == "5": system("beesu python libs/Ssudo.py") elif row == "6": openjdk.install() elif row == "7": gnash.install() elif row == "8": flash.install() elif row == "9": chromium.install() else: pass
message("information", "Iniciando a tarefa. Clique em Ok") codecs.install() message("information", "Processo Concluído com Sucesso.") except Exception, e: message("critical", "Ocorreu o seguinte erro: %s" % e) elif row == "5": try: message("Information", "Iniciando a tarefa. clique em OK.") libreoffice.install() message("Information", "Processo Concluído com Sucesso.") except Exception, e: message("Error", "Ocorreu o seguinte erro: %s" % e) elif row == "6": try: message("Information", "Iniciando a tarefa. clique em OK.") fonts.install() message("Information", "Processo Concluído com Sucesso.") except Exception, e: message("Error", "Ocorreu o seguinte erro: %s" % e) elif row == "7": try: message("Information", "Iniciando a tarefa. clique em OK.") system("beesu python libs/Ssudo.py") message("Information", "Processo Concluído com Sucesso.") except Exception, e: message("Error", "Ocorreu o seguinte erro: %s" % e) elif row == "8": try: message("Information", "Iniciando a tarefa. clique em OK.") openjdk.install() message("Information", "Processo Concluído com Sucesso.")
def exec_tasks(): row = 0 message("Information", "Iniciando a tarefa. clique em OK.") try: for item in tasks: if item == "nvidia": row = row + 1 nvidia.install("default") elif item == "nvidia_173": row = row + 1 nvidia.install("173") elif item == "nvidia_96": row = row + 1 nvidia.install("96") elif item == "amd": row = row + 1 amd.install() elif item == "codecs": row = row + 1 codecs.install() elif item == "loffice": row = row + 1 libreoffice.install() elif item == "fonts": row = row + 1 fonts.install() elif item == "root": row = row + 1 Ssudo.install() elif item == "opendjk": row = row + 1 java.install("openjdk") elif item == "opendjk_rm": row = row + 1 java.remove("openjdk") elif item == "ojava": row = row + 1 java.install("java") elif item == "gnash": row = row + 1 flash.install("gnash") elif item == "gnash_rm": row = row + 1 flash.remove("gnash") elif item == "flash": row = row + 1 flash.install("flash") elif item == "flash_rm": row = row + 1 flash.remove("flash") elif item == "chromium": row = row + 1 chromium.install() elif item == "chromium_rm": row = row + 1 chromium.remove() elif item == "elementary": row = row + 1 elementary.install() elif item == "elementary_rm": row = row + 1 elementary.remove() elif item == "faenza": row = row + 1 faenza.install() elif item == "faenza_rm": row = row + 1 faenza.remove() else: pass except Exception, e: message("Error", "Ocorreu o seguinte erro: %s" % e)