Changeset 1085:31eec9ef6a2d
- Timestamp:
- 03/19/23 12:55:57 (22 months ago)
- Branch:
- python3
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r1084 r1085 999 999 msgid "simbrief_result_title" 1000 1000 msgstr "SimBrief flight plan" 1001 1002 msgid "simbrief_result_briefing" 1003 msgstr "Briefing:" 1004 1005 msgid "simbrief_result_downloads" 1006 msgstr "Downloads:" 1007 1008 msgid "simbrief_result_prefile" 1009 msgstr "Prefile flight plan:" 1001 1010 1002 1011 msgid "briefing_title" -
locale/hu/mlx.po
r1084 r1085 998 998 msgid "simbrief_result_title" 999 999 msgstr "SimBrief repülési terv" 1000 1001 msgid "simbrief_result_briefing" 1002 msgstr "Eligazítás:" 1003 1004 msgid "simbrief_result_downloads" 1005 msgstr "Letöltések:" 1006 1007 msgid "simbrief_result_prefile" 1008 msgstr "Repülési terv beküldése:" 1000 1009 1001 1010 msgid "briefing_title" -
src/mlx/gui/flight.py
r1084 r1085 3747 3747 for weatherElement in weatherElementList: 3748 3748 flightInfo[weatherElement.tag] = weatherElement.text 3749 elif element.tag in ["files", "prefile"]: 3750 availableInfo[element.tag] = element 3749 3751 else: 3750 3752 availableInfo[element.tag] = element.text … … 3762 3764 htmlFilePath = SimBriefSetupPage.getHTMLFilePath() 3763 3765 with open(htmlFilePath, 'w') as f: 3766 f.write("<html>") 3767 f.write("<body>") 3768 f.write("<h3 style=\"text-align: center;\">%s</h3></br>" % (xstr("simbrief_result_briefing"),)) 3769 f.write("<div style=\"height: 300px; width: fit-content; overflow: auto; margin: 0 auto;\">") 3764 3770 f.write(availableInfo["plan_html"]) 3771 f.write("</div>\n") 3772 3773 f.write("<h2/>"); 3774 f.write("<h3 style=\"text-align: center;\">%s</h3></br>" % (xstr("simbrief_result_downloads"),)) 3775 f.write("<div style=\"height: 300px; width: fit-content; overflow: auto; margin: 0 auto\">") 3776 f.write("<table style=\"border: 1px solid; border-collapse: collapse;\">") 3777 3778 directory = "" 3779 for fileData in availableInfo["files"]: 3780 if fileData.tag=="directory": 3781 directory = fileData.text 3782 3783 for fileData in availableInfo["files"]: 3784 if fileData.tag in ["pdf", "file"]: 3785 name = fileData.find("name").text 3786 link = fileData.find("link").text 3787 3788 f.write("<tr>") 3789 f.write("<td style=\"border: 1px solid; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px;\">") 3790 f.write(name) 3791 f.write("</td>") 3792 f.write("<td style=\"border: 1px solid; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px;\">") 3793 url = directory + link 3794 target = " target=\"_blank\"" if fileData.tag=="pdf" else "" 3795 f.write("<a href=\"%s\"%s>%s</a>" % (url, target, name)) 3796 f.write("</td>") 3797 f.write("</tr>") 3798 3799 f.write("</table>") 3800 f.write("</div>\n") 3801 3802 f.write("<h2/>") 3803 f.write("<h3 style=\"text-align: center;\">%s</h3></br>" % (xstr("simbrief_result_prefile"),)) 3804 f.write("<div style=\"height: 400px; width: fit-content; margin: 0 auto\">") 3805 f.write("<table style=\"border: 1px solid; border-collapse: collapse;\">") 3806 for prefileData in availableInfo["prefile"]: 3807 name = prefileData.find("name").text 3808 link = prefileData.find("link").text 3809 f.write("<tr>") 3810 f.write("<td style=\"border: 1px solid; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px;\">") 3811 f.write("<a href=\"%s\" target=\"_blank\">%s</a>" % (link, name)) 3812 f.write("</td>"); 3813 f.write("</tr>") 3814 3815 f.write("</table>") 3816 f.write("</div>\n") 3817 3818 f.write("</body>") 3819 f.write("</html>") 3820 3765 3821 except Exception as e: 3766 3822 print("_getResults", e) … … 3815 3871 def OnBeforeClose(self, browser): 3816 3872 """Called before closing the browser.""" 3817 self._simBriefingPage._invalidateBrowser() 3873 if browser is self._simBriefingPage._browser: 3874 self._simBriefingPage._invalidateBrowser() 3875 3876 def OnBeforeDownload(self, browser, downloadItem, suggestedName, callback): 3877 callback.Continue(suggestedName, True) 3878 return True 3818 3879 3819 3880 def __init__(self, wizard): … … 3823 3884 xstr("simbrief_result_title"), "") 3824 3885 3825 self._alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,3826 xscale = 1.0, yscale = 1.0)3827 3828 3886 self._container = cef.getContainer() 3829 self._ alignment.add(self._container)3830 3831 self.setMainWidget(self._ alignment)3887 self._container.set_size_request(650, -1) 3888 3889 self.setMainWidget(self._container) 3832 3890 3833 3891 self._browser = None … … 3881 3939 if self._container is None: 3882 3940 self._container = cef.getContainer() 3883 self. _alignment.add(self._container)3941 self.setMainWidget(self._container) 3884 3942 else: 3885 3943 self._container.show()
Note:
See TracChangeset
for help on using the changeset viewer.