* src/docgen/LPRDoc.py (draw_path,draw_bar): Fill, then stroke.

* src/DbPrompter.py: Change file filter name.


svn: r4049
This commit is contained in:
Alex Roitman 2005-02-18 20:02:00 +00:00
parent 8b9747c7eb
commit fdfa19fa1f
2 changed files with 14 additions and 11 deletions

View File

@ -142,7 +142,7 @@ class ExistingDbPrompter:
choose.set_local_only(gtk.FALSE) choose.set_local_only(gtk.FALSE)
# Always add automatic (macth all files) filter # Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter() mime_filter = gtk.FileFilter()
mime_filter.set_name(_('Automatic')) mime_filter.set_name(_('All files'))
mime_filter.add_pattern('*') mime_filter.add_pattern('*')
choose.add_filter(mime_filter) choose.add_filter(mime_filter)
@ -249,7 +249,7 @@ class ImportDbPrompter:
choose.set_local_only(gtk.FALSE) choose.set_local_only(gtk.FALSE)
# Always add automatic (macth all files) filter # Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter() mime_filter = gtk.FileFilter()
mime_filter.set_name(_('Automatic')) mime_filter.set_name(_('All files'))
mime_filter.add_pattern('*') mime_filter.add_pattern('*')
choose.add_filter(mime_filter) choose.add_filter(mime_filter)
@ -331,7 +331,7 @@ class NewNativeDbPrompter:
# Always add automatic (macth all files) filter # Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter() mime_filter = gtk.FileFilter()
mime_filter.set_name(_('Automatic')) mime_filter.set_name(_('All files'))
mime_filter.add_pattern('*') mime_filter.add_pattern('*')
choose.add_filter(mime_filter) choose.add_filter(mime_filter)
@ -408,7 +408,7 @@ class NewSaveasDbPrompter:
# Always add automatic (macth all files) filter # Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter() mime_filter = gtk.FileFilter()
mime_filter.set_name(_('Automatic')) mime_filter.set_name(_('All files'))
mime_filter.add_pattern('*') mime_filter.add_pattern('*')
choose.add_filter(mime_filter) choose.add_filter(mime_filter)

View File

@ -510,7 +510,7 @@ class LPRDoc(BaseDoc.BaseDoc):
self.bottom_margin = cm2u(self.get_bottom_margin()) self.bottom_margin = cm2u(self.get_bottom_margin())
self.start_page(self) self.start_page(self)
self.filename = ""
def close(self): def close(self):
"""Clean up and close the document.""" """Clean up and close the document."""
@ -990,7 +990,8 @@ class LPRDoc(BaseDoc.BaseDoc):
def draw_path(self,style,path): def draw_path(self,style,path):
self.brand_new_page = 0 self.brand_new_page = 0
stype = self.draw_styles[style] stype = self.draw_styles[style]
color = [ val/255.0 for val in stype.get_fill_color()] fill_color = [ val/255.0 for val in stype.get_fill_color()]
color = [ val/255.0 for val in stype.get_color()]
point = path[0] point = path[0]
x = cm2u(point[0]) + self.left_margin x = cm2u(point[0]) + self.left_margin
@ -1002,7 +1003,9 @@ class LPRDoc(BaseDoc.BaseDoc):
y = self.top_margin - cm2u(point[1]) y = self.top_margin - cm2u(point[1])
self.gpc.lineto(x,y) self.gpc.lineto(x,y)
self.gpc.closepath() self.gpc.closepath()
self.gpc.stroke()
self.gpc.setrgbcolor(fill_color[0],fill_color[1],fill_color[2])
self.gpc.fill()
point = path[0] point = path[0]
x = cm2u(point[0]) + self.left_margin x = cm2u(point[0]) + self.left_margin
@ -1016,7 +1019,8 @@ class LPRDoc(BaseDoc.BaseDoc):
self.gpc.closepath() self.gpc.closepath()
self.gpc.setrgbcolor(color[0],color[1],color[2]) self.gpc.setrgbcolor(color[0],color[1],color[2])
self.gpc.fill() self.gpc.stroke()
self.gpc.setrgbcolor(0,0,0) self.gpc.setrgbcolor(0,0,0)
def draw_box(self,style,text,x,y): def draw_box(self,style,text,x,y):
@ -1087,10 +1091,10 @@ class LPRDoc(BaseDoc.BaseDoc):
bh = cm2u(y2-y1) bh = cm2u(y2-y1)
bw = cm2u(x2-x1) bw = cm2u(x2-x1)
self.gpc.setrgbcolor(color[0],color[1],color[2])
self.gpc.rect_stroked(x,y,bw,-bh)
self.gpc.setrgbcolor(fill_color[0],fill_color[1],fill_color[2]) self.gpc.setrgbcolor(fill_color[0],fill_color[1],fill_color[2])
self.gpc.rect_filled(x,y,bw,-bh) self.gpc.rect_filled(x,y,bw,-bh)
self.gpc.setrgbcolor(color[0],color[1],color[2])
self.gpc.rect_stroked(x,y,bw,-bh)
self.gpc.setrgbcolor(0,0,0) self.gpc.setrgbcolor(0,0,0)
def draw_text(self,style,text,x,y): def draw_text(self,style,text,x,y):
@ -1219,7 +1223,6 @@ PluginMgr.register_text_doc(
print_report_label=None, print_report_label=None,
clname='print') clname='print')
PluginMgr.register_book_doc( PluginMgr.register_book_doc(
_("Print..."), _("Print..."),
LPRDoc, LPRDoc,