Updated code and added icons to the repo.

This commit is contained in:
Andrew Schott 2023-06-12 04:07:39 -05:00
parent 6666da6770
commit 06404f5ff4
6 changed files with 19 additions and 17 deletions

BIN
arch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
deb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
flatpak.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -3,48 +3,50 @@
import wx
import subprocess
class Example(wx.Frame):
class Example(wx.Frame):
def __init__(self, *args, **kwargs):
super(Example, self).__init__(*args, **kwargs)
self.InitUI()
self.initui()
def InitUI(self):
def initui(self):
menubar = wx.MenuBar()
fileMenu = wx.Menu()
fileItem = fileMenu.Append(wx.ID_EXIT, 'Quit', 'Quit application')
menubar.Append(fileMenu, '&File')
filemenu = wx.Menu()
fileitem = filemenu.Append(wx.ID_EXIT, 'Quit', 'Quit application')
menubar.Append(filemenu, '&File')
self.SetMenuBar(menubar)
self.Bind(wx.EVT_MENU, self.OnQuit, fileItem)
self.Bind(wx.EVT_MENU, self.onquit, fileitem)
self.SetSize((300, 200))
self.SetTitle('OS Updater')
self.Centre()
pnl = wx.Panel(self)
updateFlatpakButton = wx.Button(pnl, label='Update Flatpaks',pos=(20,20))
updateFlatpakButton.Bind(wx.EVT_BUTTON,self.OnFlatpakUpdate)
updateRPMButton = wx.Button(pnl, label='Update RPMs',pos=(20,60))
updateRPMButton.Bind(wx.EVT_BUTTON,self.OnRPMUpdate)
updateflatpakbutton = wx.Button(pnl, label='Update Flatpaks', pos=(20, 20))
updateflatpakbutton.Bind(wx.EVT_BUTTON, self.onflatpakupdate)
updaterpmbutton = wx.Button(pnl, label='Update RPMs', pos=(20, 60))
updaterpmbutton.Bind(wx.EVT_BUTTON, self.onrpmupdate)
def OnFlatpakUpdate(self, e):
subprocess.run(["flatpak", "update", "--user"])
def onflatpakupdate(self, e):
subprocess.run(["flatpak", "update", "-y"])
def OnRPMUpdate(self, e):
def onrpmupdate(self, e):
subprocess.run(["sudo", "dnf", "update", "-y"])
def OnQuit(self, e):
def onquit(self, e):
self.Close()
def main():
app = wx.App()
app = wx.App(0)
ex = Example(None)
ex.Show()
app.MainLoop()
if __name__ == '__main__':
main()

BIN
rpm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
snap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB