fix onchange, add ctrl+m

This commit is contained in:
Damien Elmes 2008-11-30 22:54:02 +09:00
parent 519b040997
commit dda48886dd
2 changed files with 81 additions and 4 deletions

View file

@ -383,7 +383,7 @@ class FactEditor(object):
def onTagChange(self): def onTagChange(self):
self.fact.tags = canonifyTags(unicode(self.tags.text())) self.fact.tags = canonifyTags(unicode(self.tags.text()))
if self.onChange: if self.onChange:
self.onChange(None) self.onChange()
self.fact.setModified(textChanged=True) self.fact.setModified(textChanged=True)
self.deck.setModified() self.deck.setModified()

View file

@ -23,6 +23,14 @@
<normaloff>:/icons/anki.png</normaloff>:/icons/anki.png</iconset> <normaloff>:/icons/anki.png</normaloff>:/icons/anki.png</iconset>
</property> </property>
<widget class="QWidget" name="centralwidget" > <widget class="QWidget" name="centralwidget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>69</y>
<width>655</width>
<height>398</height>
</rect>
</property>
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" > <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -141,8 +149,25 @@
<property name="currentIndex" > <property name="currentIndex" >
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="blankPage" /> <widget class="QWidget" name="blankPage" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>370</width>
<height>343</height>
</rect>
</property>
</widget>
<widget class="QWidget" name="welcomePage" > <widget class="QWidget" name="welcomePage" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" > <layout class="QVBoxLayout" name="verticalLayout_5" >
<item> <item>
<widget class="QTextBrowser" name="welcomeText" > <widget class="QTextBrowser" name="welcomeText" >
@ -157,6 +182,14 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="editPage" > <widget class="QWidget" name="editPage" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" > <layout class="QVBoxLayout" name="verticalLayout_2" >
<property name="spacing" > <property name="spacing" >
<number>0</number> <number>0</number>
@ -177,6 +210,14 @@
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="page1" > <widget class="QWidget" name="page1" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>370</width>
<height>49</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" > <layout class="QVBoxLayout" name="verticalLayout" >
<item> <item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer" >
@ -201,6 +242,14 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page2" > <widget class="QWidget" name="page2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" > <layout class="QVBoxLayout" name="verticalLayout_3" >
<property name="spacing" > <property name="spacing" >
<number>0</number> <number>0</number>
@ -331,6 +380,14 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page3" > <widget class="QWidget" name="page3" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" > <layout class="QVBoxLayout" name="verticalLayout_4" >
<item> <item>
<spacer name="verticalSpacer_2" > <spacer name="verticalSpacer_2" >
@ -551,7 +608,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>655</width> <width>655</width>
<height>25</height> <height>23</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuHelp" > <widget class="QMenu" name="menuHelp" >
@ -684,11 +741,28 @@
<addaction name="menuAdvanced" /> <addaction name="menuAdvanced" />
<addaction name="menuHelp" /> <addaction name="menuHelp" />
</widget> </widget>
<widget class="QStatusBar" name="statusbar" /> <widget class="QStatusBar" name="statusbar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>467</y>
<width>655</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QToolBar" name="toolBar" > <widget class="QToolBar" name="toolBar" >
<property name="enabled" > <property name="enabled" >
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="geometry" >
<rect>
<x>0</x>
<y>23</y>
<width>655</width>
<height>46</height>
</rect>
</property>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -1002,6 +1076,9 @@
<property name="text" > <property name="text" >
<string>&amp;Mark Card</string> <string>&amp;Mark Card</string>
</property> </property>
<property name="shortcut" >
<string>Ctrl+M</string>
</property>
</action> </action>
<action name="actionSuspendCard" > <action name="actionSuspendCard" >
<property name="icon" > <property name="icon" >