remove actions that'll be placed on the card

This commit is contained in:
Damien Elmes 2011-11-30 15:58:39 +09:00
parent 0d37223c88
commit bea1e60fc8
8 changed files with 72 additions and 708 deletions

View file

@ -32,7 +32,6 @@ class AddonManager(object):
except:
print "Error in %s" % plugin
traceback.print_exc()
self.mw.disableCardMenuItems()
self.rebuildPluginsMenu()
# run the obsolete init hook
try:

View file

@ -269,12 +269,12 @@ class Editor(object):
self.iconsBox.setSpacing(0)
self.outerLayout.addLayout(self.iconsBox)
b = self._addButton
b("fields", self.onFields, "Ctrl+f",
shortcut(_("Layout (Ctrl+f)")), size=False, text=_("Fields..."),
b("fields", self.onFields, "",
shortcut(_("Customize Fields")), size=False, text=_("Fields..."),
native=True)
b("layout", self.onCardLayout, "Ctrl+l",
shortcut(_("Layout (Ctrl+l)")), size=False, text=_("Layout..."),
native=True)
shortcut(_("Customize Card Layout (Ctrl+l)")),
size=False, text=_("Layout..."), native=True)
# align to right
self.iconsBox.addItem(QSpacerItem(20,1, QSizePolicy.Expanding))
b("text_bold", self.toggleBold, "Ctrl+b", _("Bold text (Ctrl+b)"),

View file

@ -1,214 +0,0 @@
# Copyright: Damien Elmes <anki@ichi2.net>
# -*- coding: utf-8 -*-
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from aqt.qt import *
import aqt
from aqt.utils import showInfo, getOnlyText, openHelp
COLNAME = 0
COLOPTS = 1
COLCHECK = 2
COLCOUNT = 3
COLDUE = 4
COLNEW = 5
GREY = "#777"
class Groups(QDialog):
def __init__(self, mw, parent=None):
QDialog.__init__(self, parent or mw)
self.mw = mw
self.form = aqt.forms.groups.Ui_Dialog()
self.form.setupUi(self)
self.setWindowModality(Qt.WindowModal)
self.loadTable()
self.addButtons()
self.exec_()
def reload(self):
self.mw.progress.start()
grps = self.mw.col.sched.groupCountTree()
self.mw.progress.finish()
self.groupMap = {}
self.fullNames = {}
items = self._makeItems(grps)
self.form.tree.clear()
self.form.tree.addTopLevelItems(items)
self.items = items
self.form.tree.expandAll()
# default to check column
self.form.tree.setCurrentItem(self.items[0], COLCHECK)
def loadTable(self):
self.reload()
# config tree
h = self.form.tree.header()
h.setResizeMode(COLNAME, QHeaderView.Stretch)
h.setResizeMode(COLOPTS, QHeaderView.ResizeToContents)
h.setResizeMode(COLCHECK, QHeaderView.ResizeToContents)
h.resizeSection(COLCOUNT, 70)
h.resizeSection(COLDUE, 70)
h.resizeSection(COLNEW, 70)
h.setMovable(False)
self.form.tree.setIndentation(15)
self.connect(self.form.tree,
SIGNAL("itemDoubleClicked(QTreeWidgetItem*, int)"),
self.onDoubleClick)
def onDoubleClick(self, item, col):
if not item:
return
if col == COLOPTS:
self.onEdit()
else:
self.onSelectNone()
item.setCheckState(COLCHECK, Qt.Checked)
self.accept()
def addButtons(self):
box = self.form.buttonBox
def button(w, func):
w.connect(w, SIGNAL("clicked()"), func)
return w
f = self.form
# selection
button(f.selAll, self.onSelectAll).setShortcut("a")
button(f.selNone, self.onSelectNone).setShortcut("n")
button(f.opts, self.onEdit).setShortcut("o")
button(f.rename, self.onRename).setShortcut("r")
button(f.delete_2, self.onDelete)
self.connect(self.form.buttonBox,
SIGNAL("helpRequested()"),
lambda: openHelp("Groups"))
def onSelectAll(self):
for i in self.items:
i.setCheckState(COLCHECK, Qt.Checked)
def onSelectNone(self):
for i in self.items:
i.setCheckState(COLCHECK, Qt.Unchecked)
def onDelete(self):
err = []
gids = []
for item in self.form.tree.selectedItems():
old = unicode(item.text(0))
gid = self.groupMap[old]
gids.append(gid)
self.mw.checkpoint(_("Delete Group"))
for gid in gids:
if not gid:
e = _("One or more selected items weren't a group.")
if e not in err:
err.append(e)
continue
elif gid == 1:
err.append(
_("The default group can't be deleted."))
continue
self.mw.col.delGroup(gid)
self.reload()
if err:
showInfo("\n".join(err))
def onRename(self):
item = self.form.tree.currentItem()
old = unicode(item.text(0))
oldfull = self.fullNames[old]
gid = self.groupMap[old]
txt = getOnlyText(_("Rename to:"), self, default=oldfull)
if txt and not txt.startswith("::") and not txt.endswith("::"):
self._rename(oldfull, txt, gid, item)
def _rename(self, old, txt, gid, item):
def updateChild(item):
cold = unicode(item.text(0))
gid = self.groupMap[cold]
cnew = self.fullNames[cold].replace(old, txt)
if gid:
self.mw.col.db.execute(
"update groups set name = ? where id = ?",
cnew, gid)
for i in range(item.childCount()):
updateChild(item.child(i))
updateChild(item)
self.reload()
def onEdit(self):
gids = []
for item in self.form.tree.selectedItems():
gid = self.groupMap[unicode(item.text(0))]
if gid:
gids.append(gid)
if gids:
# this gets set on reload; do it in the background so it doesn't flicker
self.form.tree.setCurrentItem(self.items[0], COLCHECK)
from aqt.groupconf import GroupConfSelector
GroupConfSelector(self.mw, gids, self)
self.reload()
else:
showInfo(_("None of the selected items are a group."))
def reject(self):
self.accept()
def accept(self):
gids = []
def findEnabled(item):
if item.checkState(COLCHECK) == Qt.Checked:
gid = self.groupMap[unicode(item.text(0))]
if gid:
gids.append(gid)
for i in range(item.childCount()):
findEnabled(item.child(i))
for item in self.items:
findEnabled(item)
if len(gids) == self.gidCount:
# all enabled is same as empty
gids = []
# if gids != self.mw.col.conf['groups']:
# self.mw.col.conf['groups'] = gids
# self.mw.reset()
QDialog.accept(self)
def _makeItems(self, grps):
self.gidCount = 0
on = {}
a = self.mw.col.groups.active()
if not a:
on = None
else:
for gid in a:
on[gid] = True
grey = QBrush(QColor(GREY))
def makeItems(grp, head=""):
branch = QTreeWidgetItem()
branch.setFlags(
Qt.ItemIsUserCheckable|Qt.ItemIsEnabled|Qt.ItemIsSelectable|
Qt.ItemIsTristate)
gid = grp[1]
if not gid:
branch.setForeground(COLNAME, grey)
if not on or gid in on:
branch.setCheckState(COLCHECK, Qt.Checked)
else:
branch.setCheckState(COLCHECK, Qt.Unchecked)
branch.setText(COLNAME, grp[0])
if gid:
branch.setText(COLOPTS, self.mw.col.groups.name(gid))
branch.setText(COLCOUNT, "")
branch.setText(COLDUE, str(grp[2]))
branch.setText(COLNEW, str(grp[3]))
for i in (COLCOUNT, COLDUE, COLNEW):
branch.setTextAlignment(i, Qt.AlignRight)
self.groupMap[grp[0]] = grp[1]
self.fullNames[grp[0]] = head+grp[0]
if grp[1]:
self.gidCount += 1
if grp[4]:
for c in grp[4]:
branch.addChild(makeItems(c, head+grp[0]+"::"))
return branch
top = [makeItems(g) for g in grps]
return top

View file

@ -60,7 +60,6 @@ class AnkiQt(QMainWindow):
self.setupStyle()
self.setupProxy()
self.setupMenus()
self.setupToolbar()
self.setupProgress()
self.setupErrorHandler()
self.setupSystemSpecific()
@ -497,36 +496,6 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
event.accept()
self.app.quit()
# Toolbar
##########################################################################
def setupToolbar(self):
print "setup toolbar"
return
frm = self.form
tb = frm.toolBar
tb.addAction(frm.actionAddcards)
tb.addAction(frm.actionEditCurrent)
tb.addAction(frm.actionEditLayout)
tb.addAction(frm.actionEditdeck)
tb.addAction(frm.actionOverview)
tb.addAction(frm.actionGroups)
tb.addAction(frm.actionStats)
tb.addAction(frm.actionMarkCard)
tb.addAction(frm.actionRepeatAudio)
tb.setIconSize(QSize(self.pm.profile['iconSize'],
self.pm.profile['iconSize']))
toggle = tb.toggleViewAction()
toggle.setText(_("Toggle Toolbar"))
self.connect(toggle, SIGNAL("triggered()"),
self.onToolbarToggle)
if not self.pm.profile['showToolbar']:
tb.hide()
def onToolbarToggle(self):
tb = self.form.toolBar
self.pm.profile['showToolbar'] = tb.isVisible()
# Dockable widgets
##########################################################################
@ -748,38 +717,19 @@ Please choose a new deck name:"""))
s = SIGNAL("triggered()")
#self.connect(m.actionDownloadSharedPlugin, s, self.onGetSharedPlugin)
self.connect(m.actionExit, s, self, SLOT("close()"))
self.connect(m.actionSync, s, self.onSync)
self.connect(m.actionModels, s, self.onModels)
self.connect(m.actionAdd, s, self.onAddCard)
self.connect(m.actionBrowse, s, self.onBrowse)
self.connect(m.actionEditCurrent, s, self.onEditCurrent)
self.connect(m.actionPreferences, s, self.onPrefs)
self.connect(m.actionStats, s, self.onStats)
self.connect(m.actionCstats, s, self.onCardStats)
self.connect(m.actionEditLayout, s, self.onCardLayout)
self.connect(m.actionAbout, s, self.onAbout)
self.connect(m.actionImport, s, self.onImport)
self.connect(m.actionExport, s, self.onExport)
self.connect(m.actionMarkCard, SIGNAL("toggled(bool)"), self.onMark)
self.connect(m.actionSuspendCard, s, self.onSuspend)
self.connect(m.actionDelete, s, self.onDelete)
self.connect(m.actionRepeatAudio, s, self.onRepeatAudio)
self.connect(m.actionUndo, s, self.onUndo)
self.connect(m.actionFullDatabaseCheck, s, self.onCheckDB)
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
self.connect(m.actionStudyOptions, s, self.onStudyOptions)
self.connect(m.actionOverview, s, self.onOverview)
self.connect(m.actionGroups, s, self.onGroups)
self.connect(m.actionDocumentation, s, self.onDocumentation)
self.connect(m.actionDonate, s, self.onDonate)
self.connect(m.actionBuryNote, s, self.onBuryNote)
def enableDeckMenuItems(self, enabled=True):
"setEnabled deck-related items."
for item in self.deckRelatedMenuItems:
getattr(self.form, "action" + item).setEnabled(enabled)
if not enabled:
self.disableCardMenuItems()
self.maybeEnableUndo()
runHook("enableDeckMenuItems", enabled)
@ -790,29 +740,6 @@ Please choose a new deck name:"""))
def updateTitleBar(self):
self.setWindowTitle(aqt.appName)
def disableCardMenuItems(self):
self.maybeEnableUndo()
self.form.actionEditCurrent.setEnabled(False)
self.form.actionEditLayout.setEnabled(False)
self.form.actionMarkCard.setEnabled(False)
self.form.actionSuspendCard.setEnabled(False)
self.form.actionDelete.setEnabled(False)
self.form.actionBuryNote.setEnabled(False)
self.form.actionRepeatAudio.setEnabled(False)
runHook("disableCardMenuItems")
def enableCardMenuItems(self):
self.maybeEnableUndo()
self.form.actionEditLayout.setEnabled(True)
self.form.actionMarkCard.setEnabled(True)
self.form.actionSuspendCard.setEnabled(True)
self.form.actionDelete.setEnabled(True)
self.form.actionBuryNote.setEnabled(True)
self.form.actionEditCurrent.setEnabled(True)
self.form.actionBrowse.setEnabled(True)
self.updateMarkAction()
runHook("enableCardMenuItems")
# Auto update
##########################################################################

View file

@ -41,7 +41,6 @@ class Reviewer(object):
def cleanup(self):
self._hideStatus()
self.mw.disableCardMenuItems()
runHook("reviewCleanup")
# Fetching a card
@ -56,15 +55,12 @@ class Reviewer(object):
self.card = c
clearAudioQueue()
if c:
self.mw.enableCardMenuItems()
self._showStatus()
self._maybeEnableSound()
#self.updateMarkAction()
self.state = "question"
self._initWeb()
else:
self._hideStatus()
self.mw.disableCardMenuItems()
if self.mw.col.cardCount():
self._showCongrats()
else:
@ -73,10 +69,6 @@ class Reviewer(object):
# Audio
##########################################################################
def _maybeEnableSound(self):
self.mw.form.actionRepeatAudio.setEnabled(
hasSound(self.card.q() + self.card.a()))
def replayAudio(self):
clearAudioQueue()
c = self.card

View file

@ -63,15 +63,6 @@
<string>&amp;Edit</string>
</property>
<addaction name="actionUndo"/>
<addaction name="separator"/>
<addaction name="actionAdd"/>
<addaction name="actionEditCurrent"/>
<addaction name="actionBrowse"/>
<addaction name="separator"/>
<addaction name="actionMarkCard"/>
<addaction name="actionBuryNote"/>
<addaction name="actionSuspendCard"/>
<addaction name="actionDelete"/>
</widget>
<widget class="QMenu" name="menuCol">
<property name="title">
@ -79,31 +70,12 @@
</property>
<addaction name="actionSwitchProfile"/>
<addaction name="separator"/>
<addaction name="actionImport"/>
<addaction name="actionExport"/>
<addaction name="separator"/>
<addaction name="actionSync"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuTools">
<property name="title">
<string>&amp;Tools</string>
</property>
<addaction name="actionDecks"/>
<addaction name="separator"/>
<addaction name="actionStats"/>
<addaction name="actionCstats"/>
<addaction name="separator"/>
<addaction name="actionRepeatAudio"/>
<addaction name="separator"/>
<addaction name="actionFullDatabaseCheck"/>
<addaction name="actionCheckMediaDatabase"/>
</widget>
<widget class="QMenu" name="menu_Settings">
<property name="title">
<string>&amp;Settings</string>
</property>
<widget class="QMenu" name="menuPlugins">
<property name="title">
<string>&amp;Add-ons</string>
@ -126,13 +98,10 @@
<addaction name="menuStartup"/>
<addaction name="separator"/>
</widget>
<addaction name="actionOverview"/>
<addaction name="actionEditLayout"/>
<addaction name="actionGroups"/>
<addaction name="actionModels"/>
<addaction name="actionCstats"/>
<addaction name="separator"/>
<addaction name="actionStudyOptions"/>
<addaction name="actionColProperties"/>
<addaction name="actionFullDatabaseCheck"/>
<addaction name="actionCheckMediaDatabase"/>
<addaction name="separator"/>
<addaction name="menuPlugins"/>
<addaction name="actionPreferences"/>
@ -140,7 +109,6 @@
<addaction name="menuCol"/>
<addaction name="menuEdit"/>
<addaction name="menuTools"/>
<addaction name="menu_Settings"/>
<addaction name="menuHelp"/>
</widget>
<action name="actionExit">
@ -155,51 +123,6 @@
<string>Ctrl+Q</string>
</property>
</action>
<action name="actionSync">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/multisynk.png</normaloff>:/icons/multisynk.png</iconset>
</property>
<property name="text">
<string>S&amp;ync</string>
</property>
<property name="statusTip">
<string>Synchronize with Anki Online</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionAdd">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
</property>
<property name="text">
<string>&amp;Add Note...</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="shortcut">
<string>A</string>
</property>
</action>
<action name="actionBrowse">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/find.png</normaloff>:/icons/find.png</iconset>
</property>
<property name="text">
<string>&amp;Browse...</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="shortcut">
<string>B</string>
</property>
</action>
<action name="actionPreferences">
<property name="icon">
<iconset resource="icons.qrc">
@ -245,114 +168,6 @@
<string>Shift+C</string>
</property>
</action>
<action name="actionColProperties">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/contents.png</normaloff>:/icons/contents.png</iconset>
</property>
<property name="text">
<string>&amp;Col Options...</string>
</property>
<property name="statusTip">
<string>Customize models, syncing and scheduling</string>
</property>
</action>
<action name="actionImport">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/document-import.png</normaloff>:/icons/document-import.png</iconset>
</property>
<property name="text">
<string>&amp;Import...</string>
</property>
<property name="statusTip">
<string>Import cards into collection</string>
</property>
<property name="shortcut">
<string>Ctrl+I</string>
</property>
</action>
<action name="actionStats">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/view-statistics.png</normaloff>:/icons/view-statistics.png</iconset>
</property>
<property name="text">
<string>&amp;Statistics...</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="shortcut">
<string>Shift+S</string>
</property>
</action>
<action name="actionExport">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/document-export.png</normaloff>:/icons/document-export.png</iconset>
</property>
<property name="text">
<string>Expor&amp;t...</string>
</property>
<property name="statusTip">
<string>Export data to a text file or deck</string>
</property>
<property name="shortcut">
<string>Ctrl+T</string>
</property>
</action>
<action name="actionMarkCard">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/rating.png</normaloff>:/icons/rating.png</iconset>
</property>
<property name="text">
<string>&amp;Mark Note</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="shortcut">
<string>M</string>
</property>
</action>
<action name="actionSuspendCard">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/media-playback-pause.png</normaloff>:/icons/media-playback-pause.png</iconset>
</property>
<property name="text">
<string>&amp;Suspend Card</string>
</property>
<property name="statusTip">
<string>Stop reviewing this card until it's unsuspended in the browser</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="actionRepeatAudio">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/media-playback-start.png</normaloff>:/icons/media-playback-start.png</iconset>
</property>
<property name="text">
<string>Repeat &amp;Audio</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="shortcut">
<string>F5</string>
</property>
</action>
<action name="actionUndo">
<property name="enabled">
<bool>false</bool>
@ -374,7 +189,7 @@
<normaloff>:/icons/text-speak.png</normaloff>:/icons/text-speak.png</iconset>
</property>
<property name="text">
<string>Check &amp;Media...</string>
<string>&amp;Unused Media...</string>
</property>
<property name="statusTip">
<string>Check the files in the media directory</string>
@ -395,44 +210,6 @@
<string>&amp;Disable All</string>
</property>
</action>
<action name="actionEditCurrent">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/edit-rename.png</normaloff>:/icons/edit-rename.png</iconset>
</property>
<property name="text">
<string>&amp;Edit Note...</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="shortcut">
<string>E</string>
</property>
</action>
<action name="actionDelete">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/editdelete.png</normaloff>:/icons/editdelete.png</iconset>
</property>
<property name="text">
<string>&amp;Delete Card</string>
</property>
<property name="statusTip">
<string>Delete the currently displayed card</string>
</property>
<property name="shortcut">
<string>Ctrl+Del</string>
</property>
</action>
<action name="actionStudyOptions">
<property name="text">
<string>&amp;Study Options...</string>
</property>
<property name="statusTip">
<string/>
</property>
</action>
<action name="actionDonate">
<property name="icon">
<iconset resource="icons.qrc">
@ -444,27 +221,12 @@
</action>
<action name="actionDownloadSharedPlugin">
<property name="text">
<string>Download Shared...</string>
<string>Get Add-ons...</string>
</property>
<property name="statusTip">
<string>Download a plugin to add new features or change Anki's behaviour</string>
</property>
</action>
<action name="actionBuryNote">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/khtml_kget.png</normaloff>:/icons/khtml_kget.png</iconset>
</property>
<property name="text">
<string>&amp;Bury Note</string>
</property>
<property name="statusTip">
<string>Suspend the current note until Anki is reopened</string>
</property>
<property name="shortcut">
<string>Shift+B</string>
</property>
</action>
<action name="actionFullDatabaseCheck">
<property name="icon">
<iconset resource="icons.qrc">
@ -474,50 +236,6 @@
<string>&amp;Optimize...</string>
</property>
</action>
<action name="actionEditLayout">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/layout.png</normaloff>:/icons/layout.png</iconset>
</property>
<property name="text">
<string>&amp;Layout...</string>
</property>
<property name="shortcut">
<string>L</string>
</property>
</action>
<action name="actionOverview">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/chronometer.png</normaloff>:/icons/chronometer.png</iconset>
</property>
<property name="text">
<string>&amp;Overview...</string>
</property>
<property name="shortcut">
<string>O</string>
</property>
</action>
<action name="actionGroups">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/stock_group.png</normaloff>:/icons/stock_group.png</iconset>
</property>
<property name="text">
<string>Groups...</string>
</property>
<property name="shortcut">
<string>G</string>
</property>
</action>
<action name="actionModels">
<property name="text">
<string>Models...</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+M</string>
</property>
</action>
<action name="actionDocumentation">
<property name="icon">
<iconset resource="icons.qrc">
@ -539,18 +257,6 @@
<string>&amp;Profile...</string>
</property>
</action>
<action name="actionDecks">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/graphite_smooth_folder_noncommercial.png</normaloff>:/icons/graphite_smooth_folder_noncommercial.png</iconset>
</property>
<property name="text">
<string>&amp;Decks...</string>
</property>
</action>
</widget>
<resources>
<include location="icons.qrc"/>

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>397</width>
<height>444</height>
<width>395</width>
<height>442</height>
</rect>
</property>
<property name="windowTitle">
@ -70,13 +70,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="centerQA">
<property name="text">
<string>Center question and answer</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showEstimates">
<property name="text">
@ -87,34 +80,10 @@
<item>
<widget class="QCheckBox" name="showProgress">
<property name="text">
<string>Show due count and progress</string>
<string>Show due counts while reviewing</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>&lt;b&gt;Media&lt;/b&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mediaChoice"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mediaPrefix">
<property name="text">
<string>Prefix:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mediaPath"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@ -161,7 +130,7 @@
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>&lt;b&gt;Synchronisation&lt;/b&gt;&lt;a href=&quot;http://ankiweb.net/&quot;&gt;&lt;br&gt;Create a free account&lt;/a&gt;.</string>
<string>&lt;b&gt;Synchronisation&lt;/b&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -171,43 +140,26 @@
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>Synchronize collection across devices</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>Don't synchronize</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout">
<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">
<string>Username</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="syncUser"/>
</item>
<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" colspan="2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="syncOnProgramOpen">
<property name="text">
<string>Sync on program open/close</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="disableWhenMoved">
<property name="text">
<string>Disable sync when deck moved</string>
<string>Automatically sync on profile open/close</string>
</property>
</widget>
</item>
@ -220,7 +172,10 @@
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>&lt;b&gt;Proxy&lt;/b&gt;</string>
<string>&lt;b&gt;Proxy&lt;/b&gt;&lt;br&gt;If your system needs a proxy to access the internet, enter your details below.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
@ -327,7 +282,7 @@
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>&lt;b&gt;Backups&lt;/b&gt;&lt;br&gt;Decks are backed up when they are opened or synchronised, and only if they have been modified since the last backup.</string>
<string>&lt;b&gt;Backups&lt;/b&gt;&lt;br&gt;Anki will create a backup of your collection each time it is closed or synchronized</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -391,7 +346,7 @@
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Note that your media folders are &lt;b&gt;not&lt;/b&gt; backed up. It's recommended you keep your media in DropBox to avoid data loss.</string>
<string>Note: Media is not backed up. Please create a periodic backup of your Documents/Anki folder to be safe.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -430,13 +385,6 @@
<layout class="QVBoxLayout">
<item>
<layout class="QGridLayout">
<item row="1" column="0">
<widget class="QCheckBox" name="openLastDeck">
<property name="text">
<string>Always open last deck on startup</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="stripHTML">
<property name="text">
@ -444,32 +392,15 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="QCheckBox" name="deleteMedia">
<property name="text">
<string>Delete original media on add</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="showToolbar">
<property name="text">
<string>Show toolbar</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="documentFolder">
<property name="text">
<string>Change document folder...</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
@ -513,25 +444,16 @@
<tabstop>tabWidget</tabstop>
<tabstop>interfaceLang</tabstop>
<tabstop>autoplaySounds</tabstop>
<tabstop>centerQA</tabstop>
<tabstop>showEstimates</tabstop>
<tabstop>showProgress</tabstop>
<tabstop>mediaChoice</tabstop>
<tabstop>mediaPath</tabstop>
<tabstop>syncUser</tabstop>
<tabstop>syncPass</tabstop>
<tabstop>syncOnProgramOpen</tabstop>
<tabstop>disableWhenMoved</tabstop>
<tabstop>proxyHost</tabstop>
<tabstop>proxyPort</tabstop>
<tabstop>proxyUser</tabstop>
<tabstop>proxyPass</tabstop>
<tabstop>numBackups</tabstop>
<tabstop>stripHTML</tabstop>
<tabstop>openLastDeck</tabstop>
<tabstop>deleteMedia</tabstop>
<tabstop>showToolbar</tabstop>
<tabstop>documentFolder</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
@ -543,8 +465,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>279</x>
<y>457</y>
<x>285</x>
<y>439</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@ -559,8 +481,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>326</x>
<y>457</y>
<x>332</x>
<y>439</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
@ -568,5 +490,37 @@
</hint>
</hints>
</connection>
<connection>
<sender>radioButton</sender>
<signal>toggled(bool)</signal>
<receiver>syncOnProgramOpen</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>81</x>
<y>92</y>
</hint>
<hint type="destinationlabel">
<x>83</x>
<y>136</y>
</hint>
</hints>
</connection>
<connection>
<sender>radioButton_2</sender>
<signal>toggled(bool)</signal>
<receiver>syncOnProgramOpen</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>146</x>
<y>110</y>
</hint>
<hint type="destinationlabel">
<x>146</x>
<y>134</y>
</hint>
</hints>
</connection>
</connections>
</ui>