Пример #1
0
 def onUpdateClicked(self):
     import updater
     code = updater.checkForUpdates()
     if code == 0:
         subprocess.Popen(["./AO2XPupdat"])
         _exit(0)
     elif osname == "Darwin":  # bundle
         os.chdir(Cocoa.NSBundle.mainBundle().resourcePath()
                  )  # return to Resources folder
Пример #2
0
	def __init__(self, parent):
		super(TBIcon, self).__init__()
		icon=wx.Icon(locations.appLocation(versionInfo.name+".ico"), wx.BITMAP_TYPE_ICO)
		self.SetIcon(icon, "%s"%versionInfo.name)
		self.Menu=wx.Menu()
		ToolsMenu=wx.Menu()
		import contactsManager
		ContactsManId=wx.NewId()
		ContactsManOption=wx.MenuItem(ToolsMenu, ContactsManId, _("&Contacts Manager..."), _("Open Contacts Manager"))
		ToolsMenu.AppendItem(ContactsManOption)
		wx.EVT_MENU(self.Menu, ContactsManId, lambda evt: contactsManager.open("ofSkypeTalking"))
		SMSSendId=wx.NewId()
		SMSSendOption=wx.MenuItem(ToolsMenu, SMSSendId, _("&Send SMS Wizard..."), _("Start SMS Send Wizard"))
		ToolsMenu.AppendItem(SMSSendOption)
		wx.EVT_MENU(self.Menu, SMSSendId, communication.sms.smsSend)
		PreferencesId=wx.NewId()
		PreferencesOption=wx.MenuItem(ToolsMenu, PreferencesId, _("&Preferences..."), _("Open Preferences Dialog"))
		ToolsMenu.AppendItem(PreferencesOption)
		wx.EVT_MENU(self.Menu, PreferencesId, lambda evt: preferences.open())
		self.Menu.AppendMenu(wx.ID_ANY, _("&Tools"), ToolsMenu)
		HelpMenu=wx.Menu()
		DocId=wx.NewId()
		DocOption=wx.MenuItem(HelpMenu, DocId, _("&User Guide"), _("Read User Guide"))
		HelpMenu.AppendItem(DocOption)
		wx.EVT_MENU(self.Menu, DocId, lambda evt: os.startfile(locations.getDocFilePath("readme.txt")))
		WNId=wx.NewId()
		WNOption=wx.MenuItem(HelpMenu, WNId, _("&What's New"), _("Read What's New"))
		HelpMenu.AppendItem(WNOption)
		wx.EVT_MENU(self.Menu, WNId, lambda evt: os.startfile(locations.getDocFilePath("whatsnew.txt")))
		CTId=wx.NewId()
		CTOption=wx.MenuItem(HelpMenu, CTId, _("&Contributors"), _("View Contributors List"))
		HelpMenu.AppendItem(CTOption)
		wx.EVT_MENU(self.Menu, CTId, lambda evt: os.startfile(locations.getDocFilePath("contributors.txt", False)))
		LicenseId=wx.NewId()
		LicenseOption=wx.MenuItem(HelpMenu, LicenseId, _("&License"), _("View the license"))
		HelpMenu.AppendItem(LicenseOption)
		wx.EVT_MENU(self.Menu, LicenseId, lambda evt: os.startfile(locations.getDocFilePath("license.txt", False)))
		WebId=wx.NewId()
		WebOption=wx.MenuItem(HelpMenu, WebId, _("%s on the &Web")%versionInfo.name, _("Launch project Web Site in default browser"))
		HelpMenu.AppendItem(WebOption)
		wx.EVT_MENU(self.Menu, WebId, lambda evt: wx.LaunchDefaultBrowser(unicode("http://skypetalking.googlecode.com/")))
		UpdateId=wx.NewId()
		UpdateOption=wx.MenuItem(HelpMenu, UpdateId, _("Check for &updates..."), _("Check for the latest application updates"))
		HelpMenu.AppendItem(UpdateOption)
		wx.EVT_MENU(self.Menu, UpdateId, lambda evt: updater.checkForUpdates())
		AboutId=wx.NewId()
		AboutOption=wx.MenuItem(HelpMenu, AboutId, _("&About %s...")%versionInfo.name, _("About %s")%versionInfo.name)
		HelpMenu.AppendItem(AboutOption)
		wx.EVT_MENU(self.Menu, AboutId, lambda evt: about.open())
		self.Menu.AppendMenu(wx.ID_ANY, _("&Help"), HelpMenu)
		ExitId=wx.NewId()
		ExitOption=wx.MenuItem(self.Menu, ExitId, _("E&xit"), _("Exit %s")%versionInfo.name)
		self.Menu.AppendItem(ExitOption)
		wx.EVT_MENU(self.Menu, ExitId, lambda evt: interface.exit())
		self.Bind(wx.EVT_TASKBAR_RIGHT_DOWN, self.onActivate)
Пример #3
0
	def create_buttons(self):
		ButtonPanel = sc.SizedPanel(self.pane, -1)
		ButtonPanel.SetSizerType("horizontal")
		self.CloseBTN=wx.Button(ButtonPanel, id=wx.ID_CLOSE)
		self.CloseBTN.SetFocus()
		self.CloseBTN.SetDefault()
		self.Bind(wx.EVT_BUTTON, lambda evt: globalVars.Frame.CloseDialog(self), self.CloseBTN)
		self.WebSiteBTN=wx.Button(ButtonPanel, label=_("Project &Web site"))
		self.Bind(wx.EVT_BUTTON, lambda evt: wx.LaunchDefaultBrowser(unicode("http://skypetalking.googlecode.com/")), self.WebSiteBTN)
		self.LicenseBTN=wx.Button(ButtonPanel, label=_("&License online"))
		self.Bind(wx.EVT_BUTTON, lambda evt: wx.LaunchDefaultBrowser(unicode("http://www.gnu.org/licenses/old-licenses/gpl-2.0.html")), self.LicenseBTN)
		self.ContribBTN=wx.Button(ButtonPanel, label=_("C&ontributors"))
		self.Bind(wx.EVT_BUTTON, lambda evt: os.startfile(locations.getDocFilePath("contributors.txt", False)), self.ContribBTN)
		self.DocBTN=wx.Button(ButtonPanel, label=_("User &Guide"))
		self.Bind(wx.EVT_BUTTON, lambda evt: os.startfile(locations.getDocFilePath("readme.txt")), self.DocBTN)
		self.WhatsnewBTN=wx.Button(ButtonPanel, label=_("&What's New"))
		self.Bind(wx.EVT_BUTTON, lambda evt: os.startfile(locations.getDocFilePath("whatsnew.txt")), self.WhatsnewBTN)
		self.UpdatesBTN=wx.Button(ButtonPanel, label=_("Check for &updates..."))
		self.Bind(wx.EVT_BUTTON, lambda evt: updater.checkForUpdates(), self.UpdatesBTN)
Пример #4
0
 def create_buttons(self):
     ButtonPanel = sc.SizedPanel(self.pane, -1)
     ButtonPanel.SetSizerType("horizontal")
     self.CloseBTN = wx.Button(ButtonPanel, id=wx.ID_CLOSE)
     self.CloseBTN.SetFocus()
     self.CloseBTN.SetDefault()
     self.Bind(wx.EVT_BUTTON,
               lambda evt: globalVars.Frame.CloseDialog(self),
               self.CloseBTN)
     self.WebSiteBTN = wx.Button(ButtonPanel, label=_("Project &Web site"))
     self.Bind(
         wx.EVT_BUTTON, lambda evt: wx.LaunchDefaultBrowser(
             unicode("http://skypetalking.googlecode.com/")),
         self.WebSiteBTN)
     self.LicenseBTN = wx.Button(ButtonPanel, label=_("&License online"))
     self.Bind(
         wx.EVT_BUTTON, lambda evt: wx.LaunchDefaultBrowser(
             unicode("http://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
                     )), self.LicenseBTN)
     self.ContribBTN = wx.Button(ButtonPanel, label=_("C&ontributors"))
     self.Bind(
         wx.EVT_BUTTON, lambda evt: os.startfile(
             locations.getDocFilePath("contributors.txt", False)),
         self.ContribBTN)
     self.DocBTN = wx.Button(ButtonPanel, label=_("User &Guide"))
     self.Bind(
         wx.EVT_BUTTON,
         lambda evt: os.startfile(locations.getDocFilePath("readme.txt")),
         self.DocBTN)
     self.WhatsnewBTN = wx.Button(ButtonPanel, label=_("&What's New"))
     self.Bind(
         wx.EVT_BUTTON,
         lambda evt: os.startfile(locations.getDocFilePath("whatsnew.txt")),
         self.WhatsnewBTN)
     self.UpdatesBTN = wx.Button(ButtonPanel,
                                 label=_("Check for &updates..."))
     self.Bind(wx.EVT_BUTTON, lambda evt: updater.checkForUpdates(),
               self.UpdatesBTN)
Пример #5
0
            "You seem to be missing the included Attorney Online content.\nWould you like to download them automatically?",
            QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
        if jm == QtGui.QMessageBox.Yes:
            import basedownloader
            code = basedownloader.downloadVanilla()
            if code != 0: os._exit(code)
        else:
            os._exit(-3)

    # AO2XP update checker
    can_update = ini.read_ini_bool("AO2XP.ini", "General", "install updates",
                                   True)
    force_update = "forceupdate" in sys.argv[1:]
    if can_update or force_update:
        import updater
        code = updater.checkForUpdates(force_update)
        if code == 0:
            subprocess.Popen(["./AO2XPupdat"])
            os._exit(0)
        elif osname == "Darwin":  # bundle
            os.chdir(path.resourcePath())  # return to Resources folder

import gameview, mainmenu, options

audio.init()
shit = gamewindow()
shit.show()
returnc = app.exec_()
audio.free()
sys.exit(returnc)
Пример #6
0
 def __init__(self, parent):
     super(TBIcon, self).__init__()
     icon = wx.Icon(locations.appLocation(versionInfo.name + ".ico"),
                    wx.BITMAP_TYPE_ICO)
     self.SetIcon(icon, "%s" % versionInfo.name)
     self.Menu = wx.Menu()
     ToolsMenu = wx.Menu()
     import contactsManager
     ContactsManId = wx.NewId()
     ContactsManOption = wx.MenuItem(ToolsMenu, ContactsManId,
                                     _("&Contacts Manager..."),
                                     _("Open Contacts Manager"))
     ToolsMenu.AppendItem(ContactsManOption)
     wx.EVT_MENU(self.Menu, ContactsManId,
                 lambda evt: contactsManager.open("ofSkypeTalking"))
     SMSSendId = wx.NewId()
     SMSSendOption = wx.MenuItem(ToolsMenu, SMSSendId,
                                 _("&Send SMS Wizard..."),
                                 _("Start SMS Send Wizard"))
     ToolsMenu.AppendItem(SMSSendOption)
     wx.EVT_MENU(self.Menu, SMSSendId, communication.sms.smsSend)
     PreferencesId = wx.NewId()
     PreferencesOption = wx.MenuItem(ToolsMenu, PreferencesId,
                                     _("&Preferences..."),
                                     _("Open Preferences Dialog"))
     ToolsMenu.AppendItem(PreferencesOption)
     wx.EVT_MENU(self.Menu, PreferencesId, lambda evt: preferences.open())
     self.Menu.AppendMenu(wx.ID_ANY, _("&Tools"), ToolsMenu)
     HelpMenu = wx.Menu()
     DocId = wx.NewId()
     DocOption = wx.MenuItem(HelpMenu, DocId, _("&User Guide"),
                             _("Read User Guide"))
     HelpMenu.AppendItem(DocOption)
     wx.EVT_MENU(
         self.Menu, DocId,
         lambda evt: os.startfile(locations.getDocFilePath("readme.txt")))
     WNId = wx.NewId()
     WNOption = wx.MenuItem(HelpMenu, WNId, _("&What's New"),
                            _("Read What's New"))
     HelpMenu.AppendItem(WNOption)
     wx.EVT_MENU(
         self.Menu, WNId,
         lambda evt: os.startfile(locations.getDocFilePath("whatsnew.txt")))
     CTId = wx.NewId()
     CTOption = wx.MenuItem(HelpMenu, CTId, _("&Contributors"),
                            _("View Contributors List"))
     HelpMenu.AppendItem(CTOption)
     wx.EVT_MENU(
         self.Menu, CTId, lambda evt: os.startfile(
             locations.getDocFilePath("contributors.txt", False)))
     LicenseId = wx.NewId()
     LicenseOption = wx.MenuItem(HelpMenu, LicenseId, _("&License"),
                                 _("View the license"))
     HelpMenu.AppendItem(LicenseOption)
     wx.EVT_MENU(
         self.Menu, LicenseId, lambda evt: os.startfile(
             locations.getDocFilePath("license.txt", False)))
     WebId = wx.NewId()
     WebOption = wx.MenuItem(
         HelpMenu, WebId,
         _("%s on the &Web") % versionInfo.name,
         _("Launch project Web Site in default browser"))
     HelpMenu.AppendItem(WebOption)
     wx.EVT_MENU(
         self.Menu, WebId, lambda evt: wx.LaunchDefaultBrowser(
             unicode("http://skypetalking.googlecode.com/")))
     UpdateId = wx.NewId()
     UpdateOption = wx.MenuItem(
         HelpMenu, UpdateId, _("Check for &updates..."),
         _("Check for the latest application updates"))
     HelpMenu.AppendItem(UpdateOption)
     wx.EVT_MENU(self.Menu, UpdateId, lambda evt: updater.checkForUpdates())
     AboutId = wx.NewId()
     AboutOption = wx.MenuItem(HelpMenu, AboutId,
                               _("&About %s...") % versionInfo.name,
                               _("About %s") % versionInfo.name)
     HelpMenu.AppendItem(AboutOption)
     wx.EVT_MENU(self.Menu, AboutId, lambda evt: about.open())
     self.Menu.AppendMenu(wx.ID_ANY, _("&Help"), HelpMenu)
     ExitId = wx.NewId()
     ExitOption = wx.MenuItem(self.Menu, ExitId, _("E&xit"),
                              _("Exit %s") % versionInfo.name)
     self.Menu.AppendItem(ExitOption)
     wx.EVT_MENU(self.Menu, ExitId, lambda evt: interface.exit())
     self.Bind(wx.EVT_TASKBAR_RIGHT_DOWN, self.onActivate)
Пример #7
0
 def CheckForUpdates(self, keypress):
     updater.checkForUpdates()
Пример #8
0
 def CheckForUpdates(self, keypress):
     updater.checkForUpdates()