コード例 #1
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)
コード例 #2
0
ファイル: about.py プロジェクト: Dashboard-X/Skype-Examples
	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)
コード例 #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 __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)