本文整理汇总了Python中wx.ICON_EXCLAMATION属性的典型用法代码示例。如果您正苦于以下问题:Python wx.ICON_EXCLAMATION属性的具体用法?Python wx.ICON_EXCLAMATION怎么用?Python wx.ICON_EXCLAMATION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.ICON_EXCLAMATION属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _on_add
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def _on_add(self, event):
urls = self._get_urls()
if not urls:
self._create_popup(self.PROVIDE_URL_MSG,
self.WARNING_LABEL,
wx.OK | wx.ICON_EXCLAMATION)
else:
self._url_list.Clear()
options = self._options_parser.parse(self.opt_manager.options)
for url in urls:
download_item = DownloadItem(url, options)
download_item.path = self.opt_manager.options["save_path"]
if not self._download_list.has_item(download_item.object_id):
self._status_list.bind_item(download_item)
self._download_list.insert(download_item)
示例2: AskSave
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def AskSave(self):
if not (self.modified or panel.IsModified()): return True
flags = wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL | wx.CENTRE
dlg = wx.MessageDialog( self, 'File is modified. Save before exit?',
'Save before too late?', flags )
say = dlg.ShowModal()
dlg.Destroy()
wx.Yield()
if say == wx.ID_YES:
self.OnSaveOrSaveAs(wx.CommandEvent(wx.ID_SAVE))
# If save was successful, modified flag is unset
if not self.modified: return True
elif say == wx.ID_NO:
self.SetModified(False)
panel.SetModified(False)
return True
return False
示例3: AskDelete
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def AskDelete(self):
actionItemCls = self.document.ActionItem
def SearchFunc(obj):
if obj.__class__ == actionItemCls:
if obj.executable and obj.executable.plugin == self.executable:
return True
return None
if self.root.Traverse(SearchFunc) is not None:
eg.MessageBox(
eg.text.General.deletePlugin,
eg.APP_NAME,
wx.NO_DEFAULT | wx.OK | wx.ICON_EXCLAMATION
)
return False
if not TreeItem.AskDelete(self):
return False
return True
示例4: CheckMultiload
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def CheckMultiload(self):
if not self.checkMultiLoad:
return True
info = self.resultData
if not info:
return True
if info.canMultiLoad:
return True
if any((plugin.info.path == info.path) for plugin in eg.pluginList):
eg.MessageBox(
Text.noMultiload,
Text.noMultiloadTitle,
style=wx.ICON_EXCLAMATION
)
return False
else:
return True
示例5: CheckAddOnFiles
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def CheckAddOnFiles(self):
neededFiles = self.GetNeededFiles()
if len(neededFiles) == 0:
return True
if not eg.CallWait(self.ShowDownloadMessage):
return False
stopEvent = threading.Event()
wx.CallAfter(eg.TransferDialog, None, neededFiles, stopEvent)
stopEvent.wait()
neededFiles = self.GetNeededFiles()
if neededFiles:
eg.CallWait(
wx.MessageBox,
Text.downloadFailedMsg,
caption=Text.dialogCaption % self.plugin.name,
style=wx.OK | wx.ICON_EXCLAMATION | wx.STAY_ON_TOP,
parent=eg.document.frame
)
return False
return True
示例6: AskDelete
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def AskDelete(self):
allItems = self.GetAllItems()
if eg.config.confirmDelete:
count = len(allItems) - 1
if count > 0:
mesg = eg.text.General.deleteManyQuestion % str(count)
else:
mesg = eg.text.General.deleteQuestion
answer = eg.MessageBox(
mesg,
eg.APP_NAME,
wx.NO_DEFAULT | wx.YES_NO | wx.ICON_EXCLAMATION
)
if answer == wx.ID_NO:
return False
dependants = self.GetDependantsOutside(allItems)
if len(dependants) > 0:
answer = eg.MessageBox(
eg.text.General.deleteLinkedItems,
eg.APP_NAME,
wx.NO_DEFAULT | wx.YES_NO | wx.ICON_EXCLAMATION
)
return answer == wx.ID_YES
return True
示例7: AskChooseCredentialsFile
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def AskChooseCredentialsFile(self):
dial = wx.MessageDialog(None, 'No Credentials file was found!\n\nDo you want to load one?\n',
'Error', wx.YES_NO | wx.ICON_EXCLAMATION)
res = dial.ShowModal()
if res == wx.ID_YES:
return True
else:
return false
示例8: CreateDirectoryByPath
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def CreateDirectoryByPath(self, dirpath):
self.SendlToLog(3,"create directory: %s\n" % dirpath)
drivepath = dirpath.split(self.mirror_directory+'/')[1]
basepath = os.path.dirname(drivepath)
dirname = self.PathLeaf(dirpath)
try:
f = self.LocateFolderOnDrive(drivepath)
return
except FolderNotFound:
if basepath == '':
self.CreateDirectoryInParent(dirname)
else:
try:
parent_folder = self.LocateFolderOnDrive(basepath)
self.CreateDirectoryInParent(dirname, parent_folder['id'])
except:
errorMsg = "Failed to locate directory path %s on drive.\n" % basepath
self.SendlToLog(1,errorMsg)
dial = wx.MessageDialog(None, errorMsg, 'Directory Not Found',
wx.ID_OK | wx.ICON_EXCLAMATION)
dial.ShowModal()
return
except FileListQueryFailed:
errorMsg = "Server Query Failed!\n"
self.SendlToLog(1,errorMsg)
dial = wx.MessageDialog(None, errorMsg, 'Directory Not Found',
wx.ID_OK | wx.ICON_EXCLAMATION)
dial.ShowModal()
return
示例9: _on_start
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def _on_start(self, event):
if self.download_manager is None:
if self.update_thread is not None and self.update_thread.is_alive():
self._create_popup(_("Update in progress. Please wait for the update to complete"),
self.WARNING_LABEL,
wx.OK | wx.ICON_EXCLAMATION)
else:
self._start_download()
else:
self.download_manager.stop_downloads()
示例10: _on_viewlog
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def _on_viewlog(self, event):
if self.log_manager is None:
self._create_popup(_("Logging is disabled"),
self.WARNING_LABEL,
wx.OK | wx.ICON_EXCLAMATION)
else:
log_window = LogGUI(self)
log_window.load(self.log_manager.log_file)
log_window.Show()
示例11: _update_youtubedl
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def _update_youtubedl(self):
"""Update youtube-dl binary to the latest version. """
if self.download_manager is not None and self.download_manager.is_alive():
self._create_popup(self.DOWNLOAD_ACTIVE,
self.WARNING_LABEL,
wx.OK | wx.ICON_EXCLAMATION)
elif self.update_thread is not None and self.update_thread.is_alive():
self._create_popup(self.UPDATE_ACTIVE,
self.INFO_LABEL,
wx.OK | wx.ICON_INFORMATION)
else:
self.update_thread = UpdateThread(self.opt_manager.options['youtubedl_path'])
示例12: run
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def run(self):
update=OnlineUpdate()
if update.IsValid():
adm.updateInfo=update
if update.UpdateAvailable():
wx.CallAfter(self.frame.OnUpdate)
elif update.exception:
wx.CallAfter(wx.MessageBox,
xlt("Connection error while trying to retrieve update information from the update server.\nCheck network connectivity and proxy settings!"),
xlt("Communication error"), wx.ICON_EXCLAMATION)
示例13: OnLinkClicked
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def OnLinkClicked(self, event):
href = event.GetLinkInfo().GetHref()
if href == 'show_license':
if config.license_file:
from wx.lib.dialogs import ScrolledMessageDialog
try:
license_file = codecs.open(config.license_file, encoding='UTF-8')
dlg = ScrolledMessageDialog( self, license_file.read(), "wxGlade - License" )
license_file.close()
dlg.ShowModal()
dlg.Destroy()
except EnvironmentError as inst:
bugdialog.ShowEnvironmentError(
_('''Can't read the file "LICENSE.txt".\n\nYou can get a license copy at\n'''
'''http://www.opensource.org/licenses/mit-license.php'''), inst)
else:
wx.MessageBox(_('File "LICENSE.txt" not found!\nYou can get a license copy at\n'
'http://www.opensource.org/licenses/mit-license.php'),
_('Error'), wx.OK | wx.CENTRE | wx.ICON_EXCLAMATION)
elif href == 'show_credits':
if config.credits_file:
from wx.lib.dialogs import ScrolledMessageDialog
try:
credits_file = codecs.open( config.credits_file, encoding='UTF-8' )
dlg = ScrolledMessageDialog( self, credits_file.read(), _("wxGlade - Credits") )
credits_file.close()
dlg.ShowModal()
dlg.Destroy()
except EnvironmentError as inst:
bugdialog.ShowEnvironmentError(_('''Can't read the file "CREDITS.txt"'''), inst)
else:
wx.MessageBox(_('File "CREDITS.txt" not found!'), _('Error'),
wx.OK | wx.CENTRE | wx.ICON_EXCLAMATION)
else:
import webbrowser
webbrowser.open(href, new=True)
示例14: DisplayError
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def DisplayError(self, errorText):
eg.MessageBox(
errorText,
style=wx.ICON_EXCLAMATION | wx.OK,
parent=self
)
示例15: AddLadderBlock
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_EXCLAMATION [as 别名]
def AddLadderBlock(self):
message = wx.MessageDialog(self, _("This option isn't available yet!"), _("Warning"), wx.OK | wx.ICON_EXCLAMATION)
message.ShowModal()
message.Destroy()
# -------------------------------------------------------------------------------
# Delete element functions
# -------------------------------------------------------------------------------