mirror of
https://github.com/ankitects/anki.git
synced 2026-01-05 18:13:56 -05:00
Remove 'check for updates' option from Help menu
This commit is contained in:
parent
85f976c466
commit
8b963b9ad6
5 changed files with 2 additions and 21 deletions
|
|
@ -3,7 +3,6 @@ qt-accel-about-mac = About Anki...
|
|||
qt-accel-cards = &Cards
|
||||
qt-accel-check-database = &Check Database
|
||||
qt-accel-check-media = Check &Media
|
||||
qt-accel-check-for-updates = Check for &Updates...
|
||||
qt-accel-edit = &Edit
|
||||
qt-accel-exit = E&xit
|
||||
qt-accel-export = &Export...
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ qt-misc-addons = Add-ons
|
|||
qt-misc-all-cards-notes-and-media-for = All cards, notes, and media for this profile will be deleted. Are you sure?
|
||||
qt-misc-all-cards-notes-and-media-for2 = All cards, notes, and media for the profile "{ $name }" will be deleted. Are you sure?
|
||||
qt-misc-anki-updatedanki-has-been-released = <h1>Anki Updated</h1>Anki { $val } has been released.<br><br>
|
||||
qt-misc-no-update-available = You're up to date!<br><br>Anki { $val } is currently the newest version available.
|
||||
qt-misc-automatic-syncing-and-backups-have-been = Backup successfully restored. Automatic syncing and backups have been disabled for now. To enable them again, close the profile or restart Anki.
|
||||
qt-misc-back-side-only = Back Side Only
|
||||
qt-misc-backing-up = Backing Up...
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@
|
|||
</property>
|
||||
<addaction name="actionDocumentation"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCheckForUpdates"/>
|
||||
<addaction name="actionDonate"/>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
|
|
@ -180,11 +179,6 @@
|
|||
<string notr="true">F1</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCheckForUpdates">
|
||||
<property name="text">
|
||||
<string>qt_accel_check_for_updates</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSwitchProfile">
|
||||
<property name="text">
|
||||
<string>qt_accel_switch_profile</string>
|
||||
|
|
|
|||
|
|
@ -1332,11 +1332,6 @@ title="{}" {}>{}</button>""".format(
|
|||
def onDocumentation(self) -> None:
|
||||
openHelp(HelpPage.INDEX)
|
||||
|
||||
def onCheckForUpdates(self) -> None:
|
||||
from aqt.update import check_for_update
|
||||
|
||||
check_for_update(notify_if_no_update=True)
|
||||
|
||||
# legacy
|
||||
|
||||
def onDeckConf(self, deck: DeckDict | None = None) -> None:
|
||||
|
|
@ -1420,7 +1415,6 @@ title="{}" {}>{}</button>""".format(
|
|||
|
||||
# Help
|
||||
qconnect(m.actionDocumentation.triggered, self.onDocumentation)
|
||||
qconnect(m.actionCheckForUpdates.triggered, self.onCheckForUpdates)
|
||||
qconnect(m.actionDonate.triggered, self.onDonate)
|
||||
qconnect(m.actionAbout.triggered, self.onAbout)
|
||||
m.actionAbout.setText(tr.qt_accel_about_mac())
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ from aqt.package import (
|
|||
update_and_restart as _update_and_restart,
|
||||
)
|
||||
from aqt.qt import *
|
||||
from aqt.utils import openLink, show_info, show_warning, showText, tr
|
||||
from aqt.utils import openLink, show_warning, showText, tr
|
||||
|
||||
|
||||
def check_for_update(notify_if_no_update: bool = False) -> None:
|
||||
def check_for_update() -> None:
|
||||
from aqt import mw
|
||||
|
||||
def do_check(_col: Collection) -> CheckForUpdateResponse:
|
||||
|
|
@ -54,11 +54,6 @@ def check_for_update(notify_if_no_update: bool = False) -> None:
|
|||
if ver := resp.new_version:
|
||||
if mw.pm.meta.get("suppressUpdate", None) != ver:
|
||||
prompt_to_update(mw, ver)
|
||||
elif notify_if_no_update:
|
||||
show_info(
|
||||
tr.qt_misc_no_update_available(val=aqt.appVersion),
|
||||
textFormat=Qt.TextFormat.RichText,
|
||||
)
|
||||
|
||||
def on_fail(exc: Exception) -> None:
|
||||
print(f"update check failed: {exc}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue