AddonManager: open addon's location directory (#19209)

* AddonManager: open addon's location directory
* AddonManager: account for macros when setting addon location
This commit is contained in:
Ulices
2025-01-24 12:48:46 +00:00
committed by GitHub
parent 9bbdbd198b
commit 83a04d2582
3 changed files with 13 additions and 6 deletions

View File

@@ -111,7 +111,7 @@ class PackageDetailsView(QtWidgets.QWidget):
self.location_label = QtWidgets.QLabel(self)
self.url_label = QtWidgets.QLabel(self)
self.url_label.setOpenExternalLinks(True)
self.location_label.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
self.location_label.setOpenExternalLinks(True)
self.vertical_layout.addWidget(self.button_bar)
self.vertical_layout.addWidget(self.message_label)
self.vertical_layout.addWidget(self.location_label)
@@ -121,10 +121,10 @@ class PackageDetailsView(QtWidgets.QWidget):
def set_location(self, location: Optional[str]):
if location is not None:
location_path = os.path.normpath(location)
text = (
translate("AddonsInstaller", "Installation location")
+ ": "
+ os.path.normpath(location)
f"{translate('AddonsInstaller', 'Installation location')}: "
f'<a href="file://{location_path}">{location_path}</a>'
)
self.location_label.setText(text)
self.location_label.show()