Skip to content

Commit

Permalink
Merge branch 'release-da6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ospalh committed Nov 19, 2019
2 parents bb05529 + 19f28ba commit 5e56601
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
6 changes: 2 additions & 4 deletions colorful_toolbars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@
from aqt.utils import askUser


__version__ = "1.5.0"
__version__ = "2.0.0"


config = mw.addonManager.getConfig(__name__)
#todo: show edit layout
#todo: hide study options gear

icons_dir = os.path.join(
mw.pm.addonFolder(), 'colorful_toolbars', 'color_icons')

icons_dir = os.path.join(os.path.dirname(__file__), 'color_icons')

toolbar_gradient_form = u'''QToolBar:top, QToolBar:bottom {{
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 {bg}, stop:1 {bgg});
Expand Down
2 changes: 1 addition & 1 deletion downloadaudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
words in the cards.
"""

__version__ = "6.0.0"
__version__ = "7.0.0"

from . import conflanguage
from . import download
Expand Down
3 changes: 1 addition & 2 deletions downloadaudio/blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
from aqt import mw

blacklist_hashes = None
bl_file_path = os.path.join(
mw.pm.addonFolder(), 'downloadaudio', 'blacklist.json')
bl_file_path = os.path.join(os.path.dirname(__file__), 'blacklist.json')


def get_hash(file_name):
Expand Down
6 changes: 3 additions & 3 deletions downloadaudio/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
DOWNLOAD_SIDE_SHORTCUT = "t"
DOWNLOAD_MANUAL_SHORTCUT = "Ctrl+t"

icons_dir = os.path.join(mw.pm.addonFolder(), 'downloadaudio', 'icons')
# Place were we keep our megaphone icon.
icons_dir = os.path.join(os.path.dirname(__file__), 'icons')
# Place were we keep our megafone icon.


def do_download(note, field_data_list, language, hide_text=False):
Expand Down Expand Up @@ -206,7 +206,7 @@ def editor_download_editing(self):
def editor_add_download_editing_button(toprightbuts, editor):
"""Add the download button to the editor"""
dl_icon = os.path.join(icons_dir, "download_note_audio.png")
dl_button = editor.addButton(dl_icon,
dl_button = editor.addButton(dl_icon,
"download_audio",
editor_download_editing, # FIXME: Call saveNow before this
tip="Download audio…")
Expand Down
8 changes: 4 additions & 4 deletions downloadaudio/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def add_japanese_model(col):

anki.stdmodels.models.append(
(_("Standard with audio fields"), add_standard_model))
if os.path.exists(
os.path.join(mw.pm.addonFolder(), 'japanese', 'reading.py')):
anki.stdmodels.models.append(
(_("Japanese with audio fields"), add_japanese_model))
# Removed a broken test. We don’t know the name of the Japanese
# add-on. So always add Japanese model.
anki.stdmodels.models.append(
(_("Japanese with audio fields"), add_japanese_model))
3 changes: 1 addition & 2 deletions downloadaudio/review_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

from .download_entry import Action

icons_dir = os.path.join(mw.pm.addonFolder(), 'downloadaudio', 'icons')

icons_dir = os.path.join(os.path.dirname(__file__), 'icons')

def review_entries(note, retrieved_data, hide_text):
"""
Expand Down

0 comments on commit 5e56601

Please sign in to comment.