add link to add cards from browser

This commit is contained in:
Damien Elmes 2009-06-30 16:00:24 +09:00
parent e1fab204f1
commit 1122eed357
3 changed files with 15 additions and 15 deletions

View file

@ -621,6 +621,7 @@ class EditDeck(QMainWindow):
def setupMenus(self): def setupMenus(self):
# actions # actions
self.connect(self.dialog.actionAddItems, SIGNAL("triggered()"), self.parent.onAddCard)
self.connect(self.dialog.actionDelete, SIGNAL("triggered()"), self.deleteCards) self.connect(self.dialog.actionDelete, SIGNAL("triggered()"), self.deleteCards)
self.connect(self.dialog.actionAddTag, SIGNAL("triggered()"), self.addTags) self.connect(self.dialog.actionAddTag, SIGNAL("triggered()"), self.addTags)
self.connect(self.dialog.actionDeleteTag, SIGNAL("triggered()"), self.deleteTags) self.connect(self.dialog.actionDeleteTag, SIGNAL("triggered()"), self.deleteTags)

View file

@ -2497,7 +2497,6 @@ it to your friends.
anki.sound.checkForNoiseProfile() anki.sound.checkForNoiseProfile()
if sys.platform.startswith("darwin"): if sys.platform.startswith("darwin"):
self.mainWin.actionRecordNoiseProfile.setEnabled(False) self.mainWin.actionRecordNoiseProfile.setEnabled(False)
addHook("soundQueued", self.onSoundQueued)
def onRepeatAudio(self): def onRepeatAudio(self):
clearAudioQueue() clearAudioQueue()
@ -2511,20 +2510,6 @@ it to your friends.
from ui.sound import recordNoiseProfile from ui.sound import recordNoiseProfile
recordNoiseProfile(self) recordNoiseProfile(self)
def onSoundQueued(self):
pass
# this doesn't work
# if sys.platform.startswith("darwin"):
# # because the gui doesn't return focus, manually focus anki again
# t = QTimer(self)
# t.setSingleShot(True)
# t.start(1000)
# self.connect(t, SIGNAL("timeout()"),
# self.onSoundTimer)
def onSoundTimer(self):
self.activateWindow()
# Progress info # Progress info
########################################################################## ##########################################################################

View file

@ -191,6 +191,8 @@
<property name="title"> <property name="title">
<string>&amp;Actions</string> <string>&amp;Actions</string>
</property> </property>
<addaction name="actionAddItems"/>
<addaction name="separator"/>
<addaction name="actionAddTag"/> <addaction name="actionAddTag"/>
<addaction name="actionDeleteTag"/> <addaction name="actionDeleteTag"/>
<addaction name="separator"/> <addaction name="separator"/>
@ -474,6 +476,18 @@
<string>Ctrl+Shift+S</string> <string>Ctrl+Shift+S</string>
</property> </property>
</action> </action>
<action name="actionAddItems">
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
</property>
<property name="text">
<string>Add &amp;Items</string>
</property>
<property name="shortcut">
<string>Ctrl+D</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>