diff --git a/usr/lib/linuxmint/mintinstall/mintinstall.py b/usr/lib/linuxmint/mintinstall/mintinstall.py index e7f4698..40b77a2 100755 --- a/usr/lib/linuxmint/mintinstall/mintinstall.py +++ b/usr/lib/linuxmint/mintinstall/mintinstall.py @@ -1206,6 +1206,11 @@ def list_header_func(row, before, user_data=None): self.refresh_cache_menuitem.set_sensitive(False) submenu.append(self.refresh_cache_menuitem) + software_sources_menuitem = Gtk.MenuItem(label=_("Software sources...")) + software_sources_menuitem.connect("activate", self.open_software_sources) + software_sources_menuitem.show() + submenu.append(software_sources_menuitem) + self.prefs_menuitem = Gtk.MenuItem(label=_("Preferences")) self.prefs_menuitem.connect("activate", self.on_prefs_clicked) self.prefs_menuitem.show() @@ -1707,6 +1712,15 @@ def load_landing_apps(self, rcache=None): self.load_featured() self.load_top_rated() + def open_software_sources(self,_): + # Opens Mint's Software Sources and refreshes the cache afterwards + def on_process_exited(proc, result): + proc.wait_finish(result) + self.refresh_cache() + p = Gio.Subprocess.new(["mintsources"], 0) + # Add a callback when we exit mintsources + p.wait_async(None, on_process_exited) + def should_show_pkginfo(self, pkginfo): if pkginfo.pkg_hash.startswith("fp:") and not self.settings.get_boolean(prefs.ALLOW_UNVERIFIED_FLATPAKS): return pkginfo.verified