mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-09 18:13:58 +00:00
Merge pull request #1243 from phw/context-sensitive-help
PICARD-1576: Context sensitive help
This commit is contained in:
@@ -63,7 +63,7 @@ class ProviderOptions(OptionsPage):
|
||||
def register_cover_art_provider(provider):
|
||||
_cover_art_providers.register(provider.__module__, provider)
|
||||
if hasattr(provider, 'OPTIONS') and provider.OPTIONS:
|
||||
provider.OPTIONS.NAME = provider.name
|
||||
provider.OPTIONS.NAME = provider.name.lower().replace(' ', '_')
|
||||
provider.OPTIONS.TITLE = provider.title
|
||||
register_options_page(provider.OPTIONS)
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class CoverArtProviderLocal(CoverArtProvider):
|
||||
|
||||
"""Get cover art from local files"""
|
||||
|
||||
NAME = "Local"
|
||||
NAME = "Local Files"
|
||||
TITLE = N_("Local Files")
|
||||
OPTIONS = ProviderOptionsLocal
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ from PyQt5 import (
|
||||
)
|
||||
|
||||
from picard import config
|
||||
from picard.const import PICARD_URLS
|
||||
from picard.util import (
|
||||
restore_method,
|
||||
webbrowser2,
|
||||
@@ -145,7 +146,9 @@ class OptionsDialog(PicardDialog):
|
||||
self.ui.pages_stack.setCurrentWidget(page)
|
||||
|
||||
def help(self):
|
||||
webbrowser2.goto('doc_options')
|
||||
current_page = self.ui.pages_stack.currentWidget()
|
||||
url = "{}#{}".format(PICARD_URLS['doc_options'], current_page.NAME)
|
||||
webbrowser2.open(url)
|
||||
|
||||
def accept(self):
|
||||
for page in self.pages:
|
||||
|
||||
Reference in New Issue
Block a user