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

Feature: improve-missing-deps-detection #55

Merged
merged 3 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion RoofClassify/plugin_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ def check_dependencies(self) -> None:
QDesktopServices.openUrl,
QUrl(f"{__uri_homepage__}/usage/installation"),
),
duration=0,
)
for action in self.actions:
action.setEnabled(False)
else:
self.log(message=self.tr("Dependencies satisfied"), log_level=4)
for action in self.actions:
action.setEnabled(True)

def tr(self, message):
"""Get the translation for a string using Qt translation API.
Expand Down Expand Up @@ -209,7 +212,8 @@ def initGui(self):
)

# -- Post UI initialization
self.iface.initializationCompleted.connect(self.check_dependencies)
# self.iface.initializationCompleted.connect(self.check_dependencies)
self.check_dependencies()

def unload(self):
"""Removes the plugin menu item and icon from QGIS GUI."""
Expand Down
2 changes: 1 addition & 1 deletion RoofClassify/toolbelt/log_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def log(
if push:

# calc duration
if not duration:
if duration is None:
duration = (log_level + 1) * 3

# create message with/out a widget
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"version": version,
}

myst_url_schemes = ("http", "https", "mailto")
myst_url_schemes = ["http", "https", "mailto"]

# OpenGraph
ogp_image = f"{__about__.__uri_homepage__}_static/gui_form_classification.png"
Expand Down