This commit is contained in:
Kovid Goyal 2011-03-02 16:18:35 -07:00
parent dc5ccf1861
commit 4ca767b9fc
2 changed files with 11 additions and 3 deletions

View File

@ -103,13 +103,21 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
def shortcut_activated(self, url):
which = unicode(url).split(':')[-1]
self.column_type_box.setCurrentIndex(10)
self.column_type_box.setCurrentIndex({
'yesno': 9,
'tags' : 1,
'series': 3,
}.get(which, 10))
self.column_name_box.setText(which)
self.column_heading_box.setText({
'isbn':'ISBN',
'formats':_('Formats'),
'yesno':_('Yes/No'),
'tags': _('My Tags'),
'series': _('My Series'),
'last_modified':_('Last Modified')}[which])
self.composite_box.setText(
if self.composite_box.isVisible():
self.composite_box.setText(
{
'isbn': '{identifiers:select(isbn)}',
'formats': '{formats}',

View File

@ -267,7 +267,7 @@ four values, the first of them being the empty value.</string>
<item row="3" column="0">
<widget class="QLabel" name="shortcuts">
<property name="text">
<string>Quick create: &lt;a href=&quot;col:isbn&quot; title=&quot;Show the books' ISBN in the column&quot;&gt;ISBN&lt;/a&gt;, &lt;a href=&quot;col:formats&quot; title=&quot;Show the books' formats in the column&quot;&gt;Formats&lt;/a&gt;, &lt;a href=&quot;col:last_modified&quot; title=&quot;Show the date the books' metadata was last modified in the column&quot;&gt;Last Modified&lt;/a&gt;</string>
<string>Quick create: &lt;a href=&quot;col:isbn&quot; title=&quot;Show the books' ISBN in the column&quot;&gt;ISBN&lt;/a&gt;, &lt;a href=&quot;col:formats&quot; title=&quot;Show the books' formats in the column&quot;&gt;Formats&lt;/a&gt;, &lt;a href=&quot;col:last_modified&quot; title=&quot;Show the date the books' metadata was last modified in the column&quot;&gt;Last Modified&lt;/a&gt;, &lt;a href=&quot;col:yesno&quot;&gt;Yes/No&lt;/a&gt;, &lt;a href=&quot;col:tags&quot;&gt;Tags&lt;/a&gt;, &lt;a href=&quot;col:series&quot;&gt;Series&lt;/a&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>