Fix #1983 (Schedule news download - user and password fields)

This commit is contained in:
Kovid Goyal 2009-03-04 12:20:49 -08:00
parent f967c00b9f
commit 750461e3ba
2 changed files with 222 additions and 248 deletions

View File

@ -366,9 +366,14 @@ class SchedulerDialog(QDialog, Ui_Dialog):
def show_recipe(self, index):
recipe = self._model.data(index, Qt.UserRole)
self.current_recipe = recipe
self.title.setText(recipe.title)
self.author.setText(_('Created by: ') + recipe.author)
self.description.setText(recipe.description if recipe.description else '')
self.blurb.setText('''
<p>
<b>%(title)s</b><br>
%(cb)s %(author)s<br/>
%(description)s
</p>
'''%dict(title=recipe.title, cb=_('Created by: '), author=recipe.author,
description=recipe.description if recipe.description else ''))
self.allow_scheduling = False
schedule = -1 if recipe.schedule is None else recipe.schedule
if schedule < 1e5 and schedule >= 0:

View File

@ -54,6 +54,27 @@
</item>
<item row="0" column="1" >
<layout class="QVBoxLayout" name="verticalLayout_3" >
<item>
<widget class="QScrollArea" name="scrollArea" >
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable" >
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>361</width>
<height>500</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" >
<property name="margin" >
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="detail_box" >
<property name="title" >
@ -61,51 +82,21 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" >
<item>
<widget class="QLabel" name="title" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<widget class="QLabel" name="blurb" >
<property name="text" >
<string>title</string>
<string>blurb</string>
</property>
<property name="textFormat" >
<enum>Qt::PlainText</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="description" >
<property name="text" >
<string>description</string>
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="author" >
<property name="text" >
<string>author</string>
<property name="openExternalLinks" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="schedule" >
<property name="text" >
@ -257,19 +248,6 @@
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label" >
<property name="text" >
@ -287,21 +265,12 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>