Open loganjameshart opened 1 year ago
Hi, I like the idea but it needs to be done a bit differently than this - this freezes mintinstall until mintsources closes. There's an event loop running that needs to continue running while waiting on the return, or we get 'window is not responding' dialogs and more.
Something more along the lines of this is needed:
# callback function for later
def on_process_exited(proc, result):
proc.wait_finish(result)
# now refresh...
# Launch mintsources
p = Gio.Subprocess.new(["mintsources"], 0)
# Add a callback for when it finishes...
p.wait_async(None, on_process_exited)
...
# other things can keep going in the meantime...
...
From Issue #369
Creates a submenu item which opens Mint's "Software Sources" application, then refreshes the cache immediately after.