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

Remove legacy import option #3536

Merged
merged 3 commits into from
Nov 5, 2024
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
23 changes: 0 additions & 23 deletions qt/aqt/forms/preferences.ui
Original file line number Diff line number Diff line change
Expand Up @@ -611,28 +611,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>preferences_import_export</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QCheckBox" name="legacy_import_export">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">Legacy import/export handling</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
Expand Down Expand Up @@ -1293,7 +1271,6 @@
<tabstop>useCurrent</tabstop>
<tabstop>default_search_text</tabstop>
<tabstop>ignore_accents_in_search</tabstop>
<tabstop>legacy_import_export</tabstop>
<tabstop>syncMedia</tabstop>
<tabstop>syncOnProgramOpen</tabstop>
<tabstop>autoSyncMedia</tabstop>
Expand Down
3 changes: 0 additions & 3 deletions qt/aqt/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ def setup_global(self) -> None:
)
self.form.styleLabel.setVisible(not is_win)
self.form.styleComboBox.setVisible(not is_win)
self.form.legacy_import_export.setChecked(self.mw.pm.legacy_import_export())
qconnect(self.form.resetWindowSizes.clicked, self.on_reset_window_sizes)

self.setup_language()
Expand All @@ -377,8 +376,6 @@ def update_global(self) -> None:
self.mw.pm.setUiScale(newScale)
restart_required = True

self.mw.pm.set_legacy_import_export(self.form.legacy_import_export.isChecked())

if restart_required:
showInfo(tr.preferences_changes_will_take_effect_when_you())

Expand Down
3 changes: 2 additions & 1 deletion qt/aqt/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,8 @@ def set_tags_collapsed(self, mode: EditorMode, collapsed: bool) -> None:
self.meta[f"{self.editor_key(mode)}TagsCollapsed"] = collapsed

def legacy_import_export(self) -> bool:
return self.meta.get("legacy_import", False)
"Always returns False so users with this option enabled are not stuck on the legacy importer after the UI option is removed."
return False

def set_legacy_import_export(self, enabled: bool) -> None:
self.meta["legacy_import"] = enabled
Expand Down