Reorganisation of UI interface

This commit is contained in:
Jonas_Jones 2022-07-27 19:49:11 +02:00
parent b9f0f42952
commit d345c9d823
11 changed files with 71 additions and 38 deletions

View file

@ -3,7 +3,9 @@ VERSION = "0.1.2"
import os
import ctypes
from sys import exit as sysexit
import glob
import sys
import acceptdestruction, adminprompt, done, mainwindow, process
from PyQt5 import QtGui
def isAdmin():
try:
@ -28,37 +30,13 @@ appsXboxIDs = ["xboxapp", "Microsoft.XboxGamingOverlay"]
appsUsual = ["3D Builder", "Alarms", "Communications", "Camera", "Cortana", "Get Office", "Skype", "Get Started", "Groove Music", "Maps", "News", "One Note", "People", "Solitaire Collection", "Finance", "Sports", "Voice Recorder", "Weather", "Xbox", "Get Help", "Your Phone", "Cortana", "Edge"]
appsUsualIDs = ["3d", "windowsalarms", "windowscommunicationsapps", "windowscamera", "officehub", "skypeapp", "getstarted", "zunemusic", "windowsmaps", "bingnews", "onenote", "people", "solitairecollection", "bingfinance", "bingsports", "soundrecorder", "bingweather", "xboxapp", "Microsoft.GetHelp", "YourPhone", "Microsoft.549981C3F5F10", None]
print("\n\nWelcome to the ultimate unremovable Windows apps Removal tool v" + VERSION + "!")
print("--------------------------------------------------------------")
print("\n")
if not isAdmin():
print("NOT RUNNING AS ADMINISTRATOR. Therefore " + requireAdminDisplay + " cannot be persued. Please run your Powershell as Administrator for these!")
# if not isAdmin():
# adminprompt.show()
print("\n")
mainwindow.show()
print("This tool can do the following:")
print("\t1) Remove all preinsalled unremovable Windows Apps")
print("\t2) Remove all Bing related Apps")
print("\t3) Remove all XboX related Apps")
print("\t4) Remove all Apps that are usually removed")
print("\t5) Remove the Microsoft Edge Browser")
print("\t6) Remove a custom Selection of Apps")
print("\n")
print("List of Apps that will be removed by selecting the above Options:")
print("\t1) " + str(apps).replace("[", "").replace("]", "").replace("'", ""))
print("\t2) " + str(appsBing).replace("[", "").replace("]", "").replace("'", ""))
print("\t3) " + str(appsXbox).replace("[", "").replace("]", "").replace("'", ""))
print("\t4) " + str(appsUsual).replace("[", "").replace("]", "").replace("'", ""))
print("\t5) Edge")
print("\t6) [Custom]")
print("\nq) quit")
print("\n\n")
mode = input("Select " + modeOptionsDisplay + ":")

View file

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'acceptdestruction.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
@ -60,3 +60,12 @@ class Ui_acceptDestruction(object):
" responsability and NOT the author\'s\n"
"\n"
"This program is not to be redistributed."))
def show():
import sys
app = QtWidgets.QApplication(sys.argv)
acceptDestruction = QtWidgets.QMainWindow()
ui = Ui_acceptDestruction()
ui.setupUi(acceptDestruction)
acceptDestruction.show()
sys.exit(app.exec_())

View file

@ -2,13 +2,14 @@
# Form implementation generated from reading ui file 'adminprompt.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
import sys
class Ui_administratorRequired(object):
@ -29,6 +30,7 @@ class Ui_administratorRequired(object):
self.buttonOk = QtWidgets.QPushButton(self.centralwidget)
self.buttonOk.setGeometry(QtCore.QRect(90, 110, 84, 34))
self.buttonOk.setObjectName("buttonOk")
self.buttonOk.clicked.connect(sys.exit) # stop program when OK is clicked
administratorRequired.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(administratorRequired)
self.statusbar.setObjectName("statusbar")
@ -45,3 +47,13 @@ class Ui_administratorRequired(object):
" run this program. Right Click on exe\n"
" and click \"Run as administrator\"."))
self.buttonOk.setText(_translate("administratorRequired", "OK"))
def show():
import sys
app = QtWidgets.QApplication(sys.argv)
administratorRequired = QtWidgets.QMainWindow()
ui = Ui_administratorRequired()
ui.setupUi(administratorRequired)
administratorRequired.show()
sys.exit(app.exec_())

12
done.py
View file

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'done.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
@ -45,3 +45,13 @@ class Ui_done(object):
" and enjoy your now less\n"
" bloaty Windows installation!"))
self.pushButton.setText(_translate("done", "Exit Program"))
def show():
import sys
app = QtWidgets.QApplication(sys.argv)
done = QtWidgets.QMainWindow()
ui = Ui_done()
ui.setupUi(done)
done.show()
sys.exit(app.exec_())

View file

@ -2,14 +2,16 @@
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
import process
import sys
app = QtWidgets.QApplication(sys.argv)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
@ -31,18 +33,23 @@ class Ui_MainWindow(object):
self.buttonAll = QtWidgets.QPushButton(self.centralwidget)
self.buttonAll.setGeometry(QtCore.QRect(40, 120, 351, 71))
self.buttonAll.setObjectName("buttonAll")
self.butonBing = QtWidgets.QPushButton(self.centralwidget)
self.butonBing.setGeometry(QtCore.QRect(40, 200, 351, 25))
self.butonBing.setObjectName("butonBing")
self.buttonAll.clicked.connect(lambda:MainWindow.close())
self.buttonBing = QtWidgets.QPushButton(self.centralwidget)
self.buttonBing.setGeometry(QtCore.QRect(40, 200, 351, 25))
self.buttonBing.setObjectName("buttonBing")
self.buttonBing.clicked.connect(lambda:process.show("bing"))
self.buttonXbox = QtWidgets.QPushButton(self.centralwidget)
self.buttonXbox.setGeometry(QtCore.QRect(40, 230, 351, 25))
self.buttonXbox.setObjectName("buttonXbox")
self.buttonXbox.clicked.connect(lambda:process.show("xbox"))
self.buttonUsual = QtWidgets.QPushButton(self.centralwidget)
self.buttonUsual.setGeometry(QtCore.QRect(40, 260, 351, 71))
self.buttonUsual.setObjectName("buttonUsual")
self.buttonUsual.clicked.connect(lambda:process.show("usual"))
self.buttonCustom = QtWidgets.QPushButton(self.centralwidget)
self.buttonCustom.setGeometry(QtCore.QRect(40, 370, 351, 25))
self.buttonCustom.setObjectName("buttonCustom")
self.buttonCustom.clicked.connect(lambda:process.show("custom"))
self.listBing = QtWidgets.QLabel(self.centralwidget)
self.listBing.setGeometry(QtCore.QRect(400, 200, 451, 20))
self.listBing.setObjectName("listBing")
@ -106,7 +113,7 @@ class Ui_MainWindow(object):
self.titleLabel.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:16pt;\">Welcome to the Windows Bloatware Removal Tool v0.1.2</span></p></body></html>"))
self.actionLabel.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:10pt; font-weight:700;\">Select an Action:</span></p></body></html>"))
self.buttonAll.setText(_translate("MainWindow", "Remove all preinstalled unremovable Apps from Windows"))
self.butonBing.setText(_translate("MainWindow", "Remove all Bing related Apps from Windows"))
self.buttonBing.setText(_translate("MainWindow", "Remove all Bing related Apps from Windows"))
self.buttonXbox.setText(_translate("MainWindow", "Remove all Xbox related Apps from Windows"))
self.buttonUsual.setText(_translate("MainWindow", "Remove all Apps that You would usually\n"
" remove from Windows"))
@ -132,3 +139,11 @@ class Ui_MainWindow(object):
self.actionExit.setText(_translate("MainWindow", "Exit"))
self.actionCredits.setText(_translate("MainWindow", "Credits"))
self.actionGet_Help_Online.setText(_translate("MainWindow", "Get Help Online"))
def show():
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
app.exec_()

View file

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'process.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
@ -42,3 +42,12 @@ class Ui_Working(object):
_translate = QtCore.QCoreApplication.translate
Working.setWindowTitle(_translate("Working", "Working...."))
self.titleLabel.setText(_translate("Working", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">Working...</span></p></body></html>"))
def show(app, mode):
import sys
Working = QtWidgets.QMainWindow()
ui = Ui_Working()
ui.setupUi(Working)
Working.show()
app.exec_()