--- /dev/null
+#upgradeAlerts.py\r
+#A part of NonVisual Desktop Access (NVDA)\r
+#Copyright (C) 2013 NV Access Limited\r
+#This file is covered by the GNU General Public License.\r
+#See the file COPYING for more details.\r
+\r
+"""Dialogs displayed when NVDA starts containing important information about changes to NVDA.\r
+"""\r
+\r
+import os\r
+import wx\r
+import gui\r
+\r
+class NewLaptopLayout(wx.Dialog):\r
+ MESSAGE = _(\r
+ # Translators: Information about NVDA's new laptop keyboard layout.\r
+ "In NVDA 2013.1, the laptop keyboard layout has been completely redesigned in order to make it more intuitive and consistent.\n"\r
+ "If you use the laptop layout, please see the What's New document for more information."\r
+ )\r
+\r
+ def __init__(self, parent):\r
+ # Translators: The title of a dialog providing information about NVDA's new laptop keyboard layout.\r
+ super(NewLaptopLayout, self).__init__(parent, title=_("New Laptop Keyboard layout"))\r
+ mainSizer = wx.BoxSizer(wx.VERTICAL)\r
+ item = wx.StaticText(self, label=self.MESSAGE)\r
+ mainSizer.Add(item, border=20, flag=wx.LEFT | wx.RIGHT | wx.TOP)\r
+ # Translators: The label of a button in the New Laptop Keyboard Layout dialog\r
+ # to open the What's New document.\r
+ whatsNewButton = wx.Button(self, label=_("Read What's New"))\r
+ whatsNewButton.Bind(wx.EVT_BUTTON, self.onWhatsNew)\r
+ mainSizer.Add(whatsNewButton)\r
+\r
+ mainSizer.Add(self.CreateButtonSizer(wx.OK),flag=wx.TOP|wx.BOTTOM|wx.ALIGN_CENTER_HORIZONTAL,border=20)\r
+\r
+ whatsNewButton.SetFocus()\r
+ self.Sizer = mainSizer\r
+ mainSizer.Fit(self)\r
+\r
+ def onWhatsNew(self, evt):\r
+ os.startfile(gui.getDocFilePath("changes.html"))\r
+ self.Close()\r
+\r
+ @classmethod\r
+ def run(cls):\r
+ """Prepare and display an instance of this dialog.\r
+ This does not require the dialog to be instantiated.\r
+ """\r
+ gui.mainFrame.prePopup()\r
+ d = cls(gui.mainFrame)\r
+ d.ShowModal()\r
+ d.Destroy()\r
+ gui.mainFrame.postPopup()\r