mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
customizable deck order, nicer layout of browser and study options
This commit is contained in:
parent
3bab1b6829
commit
b5fdca39e7
5 changed files with 271 additions and 238 deletions
|
@ -97,6 +97,7 @@ class Config(dict):
|
|||
'proxyPass': '',
|
||||
'loadLastDeck': False,
|
||||
'deckBrowserRefreshPeriod': 3600,
|
||||
'deckBrowserOrder': 0,
|
||||
}
|
||||
for (k,v) in fields.items():
|
||||
if not self.has_key(k):
|
||||
|
|
|
@ -8,6 +8,7 @@ from PyQt4.QtWebKit import QWebPage
|
|||
|
||||
import os, sys, re, types, gettext, stat, traceback, inspect
|
||||
import shutil, time, glob, tempfile, datetime, zipfile, locale
|
||||
from operator import itemgetter
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
|
@ -1024,17 +1025,22 @@ your deck."""))
|
|||
if ui.splash.finished:
|
||||
self.finishProgress()
|
||||
self.browserLastRefreshed = time.time()
|
||||
self.reorderBrowserDecks()
|
||||
|
||||
def reorderBrowserDecks(self):
|
||||
h = {}
|
||||
for d in self.browserDecks:
|
||||
h[d['path']] = d
|
||||
self.browserDecks = []
|
||||
for path in self.config['recentDeckPaths']:
|
||||
try:
|
||||
self.browserDecks.append(h[path])
|
||||
except:
|
||||
pass
|
||||
if self.config['deckBrowserOrder'] == 0:
|
||||
self.browserDecks.sort(key=itemgetter('mod'),
|
||||
reverse=True)
|
||||
else:
|
||||
def custcmp(a, b):
|
||||
x = cmp(not not b['due'], not not a['due'])
|
||||
if x:
|
||||
return x
|
||||
x = cmp(not not b['new'], not not a['new'])
|
||||
if x:
|
||||
return x
|
||||
return cmp(a['mod'], b['mod'])
|
||||
self.browserDecks.sort(cmp=custcmp)
|
||||
|
||||
def forceBrowserRefresh(self):
|
||||
self.browserLastRefreshed = 0
|
||||
|
@ -1058,6 +1064,7 @@ your deck."""))
|
|||
sip.delete(self.mainWin.decksFrame.layout())
|
||||
# build new layout
|
||||
layout = QGridLayout()
|
||||
layout.setSpacing(0)
|
||||
if (time.time() - self.browserLastRefreshed >
|
||||
self.config['deckBrowserRefreshPeriod']):
|
||||
self.refreshBrowserDecks()
|
||||
|
@ -1065,14 +1072,13 @@ your deck."""))
|
|||
self.reorderBrowserDecks()
|
||||
if self.browserDecks:
|
||||
layout.addWidget(QLabel(_("<b>Deck</b>")), 0, 0)
|
||||
layout.setColumnStretch(0, 1)
|
||||
l = QLabel(_("<b>Due<br>Today</b>"))
|
||||
l.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||||
layout.addWidget(l, 0, 1)
|
||||
l = QLabel(_("<b>New<br>Today</b>"))
|
||||
l.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||||
layout.addWidget(l, 0, 2)
|
||||
# space
|
||||
layout.addWidget(QLabel(" " * 4), 0, 3)
|
||||
for c, deck in enumerate(self.browserDecks):
|
||||
# name
|
||||
n = deck['name']
|
||||
|
@ -1081,9 +1087,9 @@ your deck."""))
|
|||
mod = _("%s ago") % anki.utils.fmtTimeSpan(
|
||||
time.time() - deck['mod'])
|
||||
mod = "<font size=-1>%s</font>" % mod
|
||||
layout.addWidget(QLabel(
|
||||
"%d. <b>%s</b><br> %s" %
|
||||
(c+1, n, mod)), c+1, 0)
|
||||
l = QLabel("%d. <b>%s</b><br> %s" %
|
||||
(c+1, n, mod))
|
||||
layout.addWidget(l, c+1, 0)
|
||||
# due
|
||||
col = '<b><font color=#0000ff>%s</font></b>'
|
||||
if deck['due'] > 0:
|
||||
|
@ -1100,6 +1106,7 @@ your deck."""))
|
|||
else:
|
||||
s = ""
|
||||
l = QLabel(s)
|
||||
l.setMargin(10)
|
||||
l.setMinimumWidth(50)
|
||||
l.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||||
layout.addWidget(l, c+1, 2)
|
||||
|
@ -1117,7 +1124,7 @@ your deck."""))
|
|||
openButton.setToolTip(_("Open this deck%s") % extra)
|
||||
self.connect(openButton, SIGNAL("clicked()"),
|
||||
lambda d=deck['path']: self.loadDeck(d))
|
||||
layout.addWidget(openButton, c+1, 4)
|
||||
layout.addWidget(openButton, c+1, 3)
|
||||
if c == 0:
|
||||
focusButton = openButton
|
||||
# more
|
||||
|
@ -1130,7 +1137,7 @@ your deck."""))
|
|||
_("Forget removes the deck from the list without deleting."))
|
||||
self.connect(moreButton, SIGNAL("currentIndexChanged(int)"),
|
||||
lambda idx, c=c: self.onDeckBrowserMore(idx, c))
|
||||
layout.addWidget(moreButton, c+1, 5)
|
||||
layout.addWidget(moreButton, c+1, 4)
|
||||
refresh = QPushButton(_("Refresh"))
|
||||
refresh.setToolTip(_("Check due counts again (Ctrl+Shift+r)"))
|
||||
refresh.setShortcut(_("Ctrl+Shift+r"))
|
||||
|
|
|
@ -142,7 +142,7 @@ class Preferences(QDialog):
|
|||
self.dialog.addZeroSpace.setChecked(self.config['addZeroSpace'])
|
||||
self.dialog.alternativeTheme.setChecked(self.config['alternativeTheme'])
|
||||
self.dialog.showProgress.setChecked(self.config['showProgress'])
|
||||
self.dialog.openLastDeck.setChecked(self.config['loadLastDeck'])
|
||||
self.dialog.deckBrowserOrder.setChecked(self.config['deckBrowserOrder'])
|
||||
|
||||
def updateAdvanced(self):
|
||||
self.config['showTrayIcon'] = self.dialog.showTray.isChecked()
|
||||
|
@ -156,6 +156,10 @@ class Preferences(QDialog):
|
|||
self.config['showProgress'] = self.dialog.showProgress.isChecked()
|
||||
self.config['preventEditUntilAnswer'] = self.dialog.preventEdits.isChecked()
|
||||
self.config['loadLastDeck'] = self.dialog.openLastDeck.isChecked()
|
||||
if self.dialog.deckBrowserOrder.isChecked():
|
||||
self.config['deckBrowserOrder'] = 1
|
||||
else:
|
||||
self.config['deckBrowserOrder'] = 0
|
||||
|
||||
def codeToIndex(self, code):
|
||||
n = 0
|
||||
|
|
|
@ -601,6 +601,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="studyOptionsFrame">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
|
@ -1108,6 +1114,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_3">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
|
|
|
@ -1,47 +1,48 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Preferences</class>
|
||||
<widget class="QDialog" name="Preferences" >
|
||||
<property name="geometry" >
|
||||
<widget class="QDialog" name="Preferences">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>320</width>
|
||||
<height>419</height>
|
||||
<width>332</width>
|
||||
<height>438</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Preferences</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget" >
|
||||
<property name="focusPolicy" >
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_1" >
|
||||
<attribute name="title" >
|
||||
<widget class="QWidget" name="tab_1">
|
||||
<attribute name="title">
|
||||
<string>Display</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<property name="spacing" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string><h1>Language</h1></string>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><h1>Language</h1></string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="interfaceLang" >
|
||||
<property name="minimumSize" >
|
||||
<widget class="QComboBox" name="interfaceLang">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
|
@ -50,65 +51,65 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy" >
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string><h1>Reviewing</h1></string>
|
||||
<property name="text">
|
||||
<string><h1>Reviewing</h1></string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showDivider" >
|
||||
<property name="text" >
|
||||
<widget class="QCheckBox" name="showDivider">
|
||||
<property name="text">
|
||||
<string>Show divider between question and answer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="splitQA" >
|
||||
<property name="text" >
|
||||
<widget class="QCheckBox" name="splitQA">
|
||||
<property name="text">
|
||||
<string>Put space between question and answer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showEstimates" >
|
||||
<property name="text" >
|
||||
<widget class="QCheckBox" name="showEstimates">
|
||||
<property name="text">
|
||||
<string>Show next time before answer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showProgress" >
|
||||
<property name="text" >
|
||||
<widget class="QCheckBox" name="showProgress">
|
||||
<property name="text">
|
||||
<string>Show due count and progress during review</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="preventEdits" >
|
||||
<property name="text" >
|
||||
<widget class="QCheckBox" name="preventEdits">
|
||||
<property name="text">
|
||||
<string>Prevent edits until answer shown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
|
@ -117,112 +118,112 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Some settings will take effect after you restart Anki.</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2" >
|
||||
<attribute name="title" >
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Network</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" >
|
||||
<property name="spacing" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_16" >
|
||||
<property name="text" >
|
||||
<string><h1>Synchronisation</h1><a href="http://anki.ichi2.net/">Create a free account</a>.</string>
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string><h1>Synchronisation</h1><a href="http://anki.ichi2.net/">Create a free account</a>.</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks" >
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_18" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_17" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="syncUser" />
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="syncUser"/>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QCheckBox" name="syncOnClose" >
|
||||
<property name="text" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="syncOnClose">
|
||||
<property name="text">
|
||||
<string>Sync on close</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="syncPass" >
|
||||
<property name="echoMode" >
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="syncPass">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QCheckBox" name="syncOnOpen" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="syncOnOpen">
|
||||
<property name="text">
|
||||
<string>Sync on open</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -234,61 +235,61 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13" >
|
||||
<property name="text" >
|
||||
<string><h1>Proxy</h1></string>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string><h1>Proxy</h1></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<property name="verticalSpacing" >
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_14" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Host</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="proxyHost" />
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="proxyHost"/>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_19" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="proxyUser" />
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="proxyUser"/>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_20" >
|
||||
<property name="text" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="proxyPass" >
|
||||
<property name="echoMode" >
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="proxyPass">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="label_15" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QSpinBox" name="proxyPort" >
|
||||
<property name="minimumSize" >
|
||||
<item row="0" column="3">
|
||||
<widget class="QSpinBox" name="proxyPort">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
|
@ -299,11 +300,11 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
@ -312,50 +313,50 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Some settings will take effect after you restart Anki.</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<attribute name="title" >
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Saving</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" >
|
||||
<property name="spacing" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string><h1>Autosaving</h1></string>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string><h1>Autosaving</h1></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<property name="spacing" >
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QCheckBox" name="saveAfterEvery" >
|
||||
<property name="text" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="saveAfterEvery">
|
||||
<property name="text">
|
||||
<string>Save after answering</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QSpinBox" name="saveAfterEveryNum" >
|
||||
<property name="maximumSize" >
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="saveAfterEveryNum">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
|
@ -363,19 +364,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="saveAfterAdding" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="saveAfterAdding">
|
||||
<property name="text">
|
||||
<string>Save after adding</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QSpinBox" name="saveAfterAddingNum" >
|
||||
<property name="maximumSize" >
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="saveAfterAddingNum">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
|
@ -383,26 +384,26 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="saveWhenClosing" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="saveWhenClosing">
|
||||
<property name="text">
|
||||
<string>Save when closing</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>cards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="label_7" >
|
||||
<property name="text" >
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>facts</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -410,33 +411,33 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9" >
|
||||
<property name="text" >
|
||||
<string><h1>Backups</h1>Decks are backed up when they are opened, and only if they have been modified since the last backup.</string>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string><h1>Backups</h1>Decks are backed up when they are opened, and only if they have been modified since the last backup.</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_10" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Keep</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QSpinBox" name="numBackups" >
|
||||
<property name="minimumSize" >
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="numBackups">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
|
@ -444,19 +445,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="label_11" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>backups of each deck</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<spacer name="horizontalSpacer" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -467,18 +468,18 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="openBackupFolder" >
|
||||
<property name="text" >
|
||||
<string><a href="backups">Open backup folder</a></string>
|
||||
<widget class="QLabel" name="openBackupFolder">
|
||||
<property name="text">
|
||||
<string><a href="backups">Open backup folder</a></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4" >
|
||||
<property name="orientation" >
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>59</height>
|
||||
|
@ -487,47 +488,47 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>Some settings will take effect after you restart Anki.</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3" >
|
||||
<attribute name="title" >
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Advanced</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" >
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<string><h1>Advanced settings</h1></string>
|
||||
<layout class="QGridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string><h1>Advanced settings</h1></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QCheckBox" name="showTimer" >
|
||||
<property name="text" >
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="showTimer">
|
||||
<property name="text">
|
||||
<string>Show timer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<spacer name="verticalSpacer_3" >
|
||||
<property name="orientation" >
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
|
@ -535,38 +536,45 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QCheckBox" name="alternativeTheme" >
|
||||
<property name="text" >
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="alternativeTheme">
|
||||
<property name="text">
|
||||
<string>Alternative theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" >
|
||||
<widget class="QCheckBox" name="showStudyOptions" >
|
||||
<property name="text" >
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="showStudyOptions">
|
||||
<property name="text">
|
||||
<string>Show study options on deck load</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QCheckBox" name="showTray" >
|
||||
<property name="text" >
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="showTray">
|
||||
<property name="text">
|
||||
<string>Show tray icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" >
|
||||
<widget class="QCheckBox" name="addZeroSpace" >
|
||||
<property name="text" >
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="addZeroSpace">
|
||||
<property name="text">
|
||||
<string>Add hidden char to text (fixes Thai on OSX)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" >
|
||||
<widget class="QCheckBox" name="openLastDeck" >
|
||||
<property name="text" >
|
||||
<string>Open last deck even when multiple decks available</string>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="openLastDeck">
|
||||
<property name="text">
|
||||
<string>Always open last deck on startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="deckBrowserOrder">
|
||||
<property name="text">
|
||||
<string>Show decks with cards due first in browser</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -574,10 +582,10 @@
|
|||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
@ -586,11 +594,11 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Some settings will take effect after you restart Anki.</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -600,11 +608,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="orientation" >
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -639,6 +647,7 @@
|
|||
<tabstop>showTray</tabstop>
|
||||
<tabstop>showStudyOptions</tabstop>
|
||||
<tabstop>openLastDeck</tabstop>
|
||||
<tabstop>deckBrowserOrder</tabstop>
|
||||
<tabstop>addZeroSpace</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
|
@ -650,11 +659,11 @@
|
|||
<receiver>Preferences</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<hint type="sourcelabel">
|
||||
<x>270</x>
|
||||
<y>412</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
|
@ -666,11 +675,11 @@
|
|||
<receiver>Preferences</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<hint type="sourcelabel">
|
||||
<x>317</x>
|
||||
<y>412</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
|
|
Loading…
Reference in a new issue