Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add software sources into submenu (Adding code from PR #382) #432

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions usr/lib/linuxmint/mintinstall/mintinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,11 @@
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()
Expand Down Expand Up @@ -1707,6 +1712,15 @@
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
Expand Down Expand Up @@ -2432,7 +2446,7 @@
# then the app is uninstalled generally (usually they're -origin remotes, only added
# when a .flatpakref file is installed.) However, their addition/removal, purposely,
# will not trigger a rebuild of the cache, so we don't want to be caught showing an
# empty category as a reuslt.

Check failure on line 2449 in usr/lib/linuxmint/mintinstall/mintinstall.py

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22-amd64, Mint 22, true) / Mint 22

reuslt ==> result
if remote_info.noenumerate:
continue

Expand Down
Loading