Misc PEP8 cleanup.
svn: r12610
This commit is contained in:
parent
0aedf53b6b
commit
aa800b3ad6
@ -225,7 +225,8 @@ class DocReportDialog(ReportDialog):
|
|||||||
|
|
||||||
self.template_combo.connect('changed', self.html_file_enable)
|
self.template_combo.connect('changed', self.html_file_enable)
|
||||||
|
|
||||||
self.html_table.attach(self.template_combo,2,3,1,2, yoptions=gtk.SHRINK)
|
self.html_table.attach(self.template_combo, 2, 3, 1, 2,
|
||||||
|
yoptions=gtk.SHRINK)
|
||||||
label = gtk.Label("%s:" % _("User Template"))
|
label = gtk.Label("%s:" % _("User Template"))
|
||||||
label.set_alignment(0.0, 0.5)
|
label.set_alignment(0.0, 0.5)
|
||||||
self.html_table.attach(label, 1, 2, 2, 3, gtk.SHRINK|gtk.FILL,
|
self.html_table.attach(label, 1, 2, 2, 3, gtk.SHRINK|gtk.FILL,
|
||||||
@ -242,7 +243,8 @@ class DocReportDialog(ReportDialog):
|
|||||||
|
|
||||||
if os.path.isfile(user_template):
|
if os.path.isfile(user_template):
|
||||||
self.html_fileentry.set_filename(user_template)
|
self.html_fileentry.set_filename(user_template)
|
||||||
self.html_table.attach(self.html_fileentry,2,3,2,3, yoptions=gtk.SHRINK)
|
self.html_table.attach(self.html_fileentry, 2, 3, 2, 3,
|
||||||
|
yoptions=gtk.SHRINK)
|
||||||
self.template_combo.set_active(active_index)
|
self.template_combo.set_active(active_index)
|
||||||
|
|
||||||
def parse_format_frame(self):
|
def parse_format_frame(self):
|
||||||
@ -267,7 +269,8 @@ class DocReportDialog(ReportDialog):
|
|||||||
if text == _user_template:
|
if text == _user_template:
|
||||||
self.template_name = self.html_fileentry.get_full_path(0)
|
self.template_name = self.html_fileentry.get_full_path(0)
|
||||||
else:
|
else:
|
||||||
self.template_name = "%s%s%s" % (const.TEMPLATE_DIR, os.path.sep,
|
self.template_name = "%s%s%s" % (const.TEMPLATE_DIR,
|
||||||
|
os.path.sep,
|
||||||
_template_map[text])
|
_template_map[text])
|
||||||
else:
|
else:
|
||||||
self.template_name = ""
|
self.template_name = ""
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
from types import ClassType, InstanceType
|
from types import ClassType
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
@ -99,7 +99,7 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
def init_options(self, option_class):
|
def init_options(self, option_class):
|
||||||
try:
|
try:
|
||||||
if (issubclass(option_class, object) or # New-style class
|
if (issubclass(option_class, object) or # New-style class
|
||||||
isinstance(options_class, ClassType)): # Old-style class
|
isinstance(option_class, ClassType)): # Old-style class
|
||||||
self.options = option_class(self.raw_name, self.db)
|
self.options = option_class(self.raw_name, self.db)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
self.options = option_class
|
self.options = option_class
|
||||||
@ -205,7 +205,7 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
appended to the Options section of the dialog. The text string
|
appended to the Options section of the dialog. The text string
|
||||||
is used to create a label for the passed widget. This allows the
|
is used to create a label for the passed widget. This allows the
|
||||||
subclass to extend the Options section with its own widgets. The
|
subclass to extend the Options section with its own widgets. The
|
||||||
subclass is reponsible for all managing of the widgets, including
|
subclass is responsible for all managing of the widgets, including
|
||||||
extracting the final value before the report executes. This task
|
extracting the final value before the report executes. This task
|
||||||
should only be called in the add_user_options task."""
|
should only be called in the add_user_options task."""
|
||||||
self.widgets.append((label_text, widget))
|
self.widgets.append((label_text, widget))
|
||||||
@ -215,7 +215,7 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
text string and a Gtk Widget. When the interface is built,
|
text string and a Gtk Widget. When the interface is built,
|
||||||
all widgets with the same frame_name are grouped into a
|
all widgets with the same frame_name are grouped into a
|
||||||
GtkFrame. This allows the subclass to create its own sections,
|
GtkFrame. This allows the subclass to create its own sections,
|
||||||
filling them with its own widgets. The subclass is reponsible for
|
filling them with its own widgets. The subclass is responsible for
|
||||||
all managing of the widgets, including extracting the final value
|
all managing of the widgets, including extracting the final value
|
||||||
before the report executes. This task should only be called in
|
before the report executes. This task should only be called in
|
||||||
the add_user_options task."""
|
the add_user_options task."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user