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

Refresh package view on install/uninstall #6

Merged
merged 1 commit into from Oct 5, 2012
Merged

Refresh package view on install/uninstall #6

merged 1 commit into from Oct 5, 2012

Conversation

bl0ckeduser
Copy link
Contributor

Hello Linux Mint team,

I wrote this code so that if a user is currently looking at the page for a package
and the installation or removal of this package has just completed, the page will be refreshed
to reflect this change. (This is a feature that was in the Ubuntu Software Center that I liked).

# If the user is currently viewing this package in the browser,
# refresh the view to show that the package has been installed or uninstalled.
if self.application.navigation_bar.get_active().get_label() == pkg_name:
self.application.show_package(package, None)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show_package will run navigation_bar.add_with_id with the same package name again,
but an additional navigation tab will not be created: as the documentation for add_with_id explains,
"If there is the same id already, replace the existing one with the new one".

@clefebvre
Copy link
Member

Brilliant, this is going to make a lot of people happy :)

Great work, thanks.

clefebvre added a commit that referenced this pull request Oct 5, 2012
Refresh package view on install/uninstall
@clefebvre clefebvre merged commit 6272bbe into linuxmint:master Oct 5, 2012
@bl0ckeduser
Copy link
Contributor Author

No problem :)

@Robi1234567890 Robi1234567890 mentioned this pull request Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants