Skip to content

Commit

Permalink
Added downloads button
Browse files Browse the repository at this point in the history
  • Loading branch information
mjishnu committed Sep 8, 2022
1 parent 6439440 commit 13fd4e3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions altinstaller.ui
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@
<string>Options</string>
</property>
<addaction name="actioninstall_From_File"/>
<addaction name="actionDownloads"/>
<addaction name="actionclear_cache"/>
</widget>
<widget class="QMenu" name="menuAbout">
Expand Down Expand Up @@ -431,6 +432,11 @@
<string>Set Wait Time ( Use If Slow Internet Speed,Default: 5)</string>
</property>
</action>
<action name="actionDownloads">
<property name="text">
<string>Downloads</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
8 changes: 6 additions & 2 deletions gui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Form implementation generated from reading ui file 'Appinstaller.ui'
# Form implementation generated from reading ui file 'altinstaller.ui'
#
# Created by: PyQt6 UI code generator 6.3.1
#
Expand All @@ -9,7 +9,7 @@
from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_MainProgram(QtCore.QObject):
class Ui_MainProgram(object):
def setupUi(self, MainProgram):
MainProgram.setObjectName("MainProgram")
MainProgram.setEnabled(True)
Expand Down Expand Up @@ -199,7 +199,10 @@ def setupUi(self, MainProgram):
self.actioninstall_From_File.setObjectName("actioninstall_From_File")
self.actionSet_Wait_Time = QtGui.QAction(MainProgram)
self.actionSet_Wait_Time.setObjectName("actionSet_Wait_Time")
self.actionDownloads = QtGui.QAction(MainProgram)
self.actionDownloads.setObjectName("actionDownloads")
self.menuOptions.addAction(self.actioninstall_From_File)
self.menuOptions.addAction(self.actionDownloads)
self.menuOptions.addAction(self.actionclear_cache)
self.menuAbout.addAction(self.actionCheck_For_Updates)
self.menuAbout.addAction(self.actionOpen_Logs)
Expand Down Expand Up @@ -245,3 +248,4 @@ def retranslateUi(self, MainProgram):
self.actioninstall_From_File.setStatusTip(_translate("MainProgram", "Install App (Appx,Msix..etc) From Local File "))
self.actionSet_Wait_Time.setText(_translate("MainProgram", "Set Wait Time"))
self.actionSet_Wait_Time.setStatusTip(_translate("MainProgram", "Set Wait Time ( Use If Slow Internet Speed,Default: 5)"))
self.actionDownloads.setText(_translate("MainProgram", "Downloads"))
8 changes: 8 additions & 0 deletions maingui.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def setupUi(self, *args, **kwargs):
self.actionHelp.triggered.connect(lambda: open_browser(
'https://discord.com/invite/cbuEkpd'))
self.actionOpen_Logs.triggered.connect(self.open_Logs)
self.actionDownloads.triggered.connect(self.open_downloads)

def open_Logs(self):
path = 'log.txt'
Expand Down Expand Up @@ -150,6 +151,13 @@ def remove_(path, mode='file'):
self.threadpool.start(worker)
worker.signals.result.connect(lambda: self.show_success_popup(text = "Cache Files Cleared Successfully!"))

def open_downloads(self):
path = os.path.realpath("./Downloads")
if os.path.exists(path):
os.startfile(path)
else:
self.show_error_popup(txt="No Downloads Found!")

#standalone installer for predownloaded files
def standalone_installer(self):
fname = QFileDialog.getOpenFileNames()
Expand Down

0 comments on commit 13fd4e3

Please sign in to comment.