Skip to content

Commit 0ef3647

Browse files
author
Michael Whapples
committed
Update homepage
1 parent 9722a29 commit 0ef3647

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ readme = "README.md"
1616
license = {text = "GPL-3[0-or-later"}
1717

1818
[project.urls]
19+
homepage = "https://github.com//aphtech/convert2ebrl"
1920
download-site = "https://github.com/aphtech/Convert2EBRL/releases/latest/download"
2021

2122
[project.gui-scripts]

src/convert2ebrl/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ def run_app(args: Sequence[str]):
8484
package_metadata = metadata(__package__)
8585
urls = "\n".join([f"Project-URL: {u}" for u in package_metadata.get_all("Project-URL")])
8686
raw_meta, unparsed = parse_email(str(urls))
87-
download_site = str(app_settings.value("download_site", defaultValue=raw_meta["project_urls"]["download-site"]))
87+
download_site = str(app_settings.value("download_site", defaultValue=raw_meta["project_urls"]["download-site"], type=str))
88+
app.setProperty("download_site", download_site)
89+
home_page = str(app_settings.value("home_page", defaultValue=raw_meta["project_urls"]["homepage"], type=str))
90+
app.setProperty("home_page", home_page)
8891
w = MainWindow(download_site)
8992
w.show()
9093

src/convert2ebrl/main_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, download_site: str):
2929
def on_update_available(v):
3030
if QMessageBox.question(self, "Update available",
3131
f"A new version {v} of the software is available. Would you like to go to the download site?") == QMessageBox.StandardButton.Yes:
32-
QDesktopServices.openUrl(QUrl(make_qurl(download_site, "download.html")))
32+
QDesktopServices.openUrl(QUrl(QApplication.instance().property("home_page")))
3333
update_checker.updateAvailable.connect(on_update_available)
3434
update_checker.noUpdateAvailable.connect(lambda: QMessageBox.information(self, "No updates", "You are running the latest version of the software."))
3535
update_checker.errorOccurred.connect(lambda x: QMessageBox.warning(self, "Unable to check for updates.", "There was a problem whilst checking for updates, please try again later."))

0 commit comments

Comments
 (0)