Issue #1850. Warning are given for many error cases, update 2.

svn: r10293
This commit is contained in:
Peter Landgren 2008-03-13 18:42:44 +00:00
parent 23592e3aed
commit 298a023ca8

View File

@ -960,8 +960,6 @@ class GraphvizReportDialog(ReportDialog):
# If all margins are >1.0" then graphs are OK, but some graphs are
# offset a lot
# Note margins are always in cm.
warn_text1 = ""
warn_text2 = ""
if self.paper_frame.get_paper_metric():
warn_marg = "1.3 cm."
else:
@ -972,32 +970,29 @@ class GraphvizReportDialog(ReportDialog):
pm_t = self.paper_frame.get_paper_margins()[2] / 2.54
pm_b = self.paper_frame.get_paper_margins()[3] / 2.54
if ((self.h_pages.get_value() > 1) or (self.h_pages.get_value() > 1)) and \
(self.format_menu.get_clname() != 'gspdf'):
warn_text1 = _("You have used more than one page as output.")
warn_text2 = _("This will cause incorrect and/or partial graphs.")
warn_marg = ""
if ((pm_l < 0.5 and pm_r < 0.5) or (pm_t < 0.5 and pm_b < 0.5)) and \
(self.format_menu.get_clname() == 'gvpdf'):
warn_text1 = _("Two or more opposite paper margins are less than ")
warn_text2 = _("This will cause incorrect and/or partial graphs.")
WarningDialog(warn_text1 + warn_marg, warn_text2)
if ((pm_l < 0.5 and pm_r < 0.5) or (pm_t < 0.5 and pm_b < 0.5)) and \
(self.format_menu.get_clname() == 'gspdf') or (self.format_menu.get_clname() == 'ps'):
warn_text1 = _("Two or more opposite paper margins are less than ")
warn_text2 = _("More than expected number of pages will be generated.")
if warn_text1:
WarningDialog(warn_text1 + warn_marg, warn_text2)
warn_text1 = ""
if ((self.h_pages.get_value() > 1) or (self.h_pages.get_value() > 1)) and \
(self.format_menu.get_clname() != 'gspdf'):
warn_text1 = _("You have used more than one page as output.")
warn_text2 = _("This will cause incorrect and/or partial graphs.")
warn_marg = ""
WarningDialog(warn_text1 + warn_marg, warn_text2)
if (self.format_menu.get_clname() == 'gspdf') and (self.dpi.get_value() != 75 ):
warn_text1 = _("You have not used 75 dpi for Ghostscript.")
warn_text2 = _("Using other dpi's will cause incorrect graphs.")
warn_marg = ""
if warn_text1:
WarningDialog(warn_text1 + warn_marg, warn_text2)
#======================================================================