diff --git a/arch.png b/arch.png new file mode 100644 index 0000000..e8c4c25 Binary files /dev/null and b/arch.png differ diff --git a/deb.png b/deb.png new file mode 100644 index 0000000..0890c21 Binary files /dev/null and b/deb.png differ diff --git a/flatpak.png b/flatpak.png new file mode 100644 index 0000000..775bacc Binary files /dev/null and b/flatpak.png differ diff --git a/osupdater.py b/osupdater.py index f03b3b2..8c0efee 100755 --- a/osupdater.py +++ b/osupdater.py @@ -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() \ No newline at end of file + main() diff --git a/rpm.png b/rpm.png new file mode 100644 index 0000000..28e1faf Binary files /dev/null and b/rpm.png differ diff --git a/snap.png b/snap.png new file mode 100644 index 0000000..9b1b42d Binary files /dev/null and b/snap.png differ