[pyDC-devel] MessageDialog
Status: Beta
Brought to you by:
aborder
From: Luca M. <cb...@in...> - 2003-11-30 18:19:47
|
The error message when I try to download an item already queued is not modal against the main application window. Searching the source of the problem I've found 3 different ways to display an error message : 1) wx.MessageDialog 2) wxMessageDialog 3) dialog = wx.MessageDialog What about to make a global generic rountine/class ShowErrorMessage or similar ? egrep -ri MessageDialog * FileListViewer.py: wx.MessageDialog(self, 'Source is not matching.', 'Error', wx.ICON_ERROR).ShowModal() FileListViewer.py: wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR).ShowModal() FileListViewer.py: wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR).ShowModal() Binary file FileListViewer.pyc matches HubViewer.py: dialog = wx.MessageDialog(self, "Invalid private chat text.", "Error", wx.ICON_ERROR) HubViewer.py: dialog = wx.MessageDialog(self, "No user with that nick.", "Error", wx.ICON_ERROR) HubViewer.py: wx.MessageDialog(self, 'No such user.', 'Error', wx.ICON_ERROR).ShowModal() Binary file HubViewer.pyc matches HublistPanel.py: wx.MessageDialog(self, 'You must specify an address.', 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() HublistPanel.py: wx.MessageDialog(self, 'Invalid address.', 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() HublistPanel.py: wx.MessageDialog(self, 'Address already in favorite list.', 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() Binary file HublistPanel.pyc matches MainWnd.py: wx.MessageDialog(self, 'Invalid hub address: \'%s\'.' % addr, 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() Binary file MainWnd.pyc matches QueuePanel.py: dialog = wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR) Binary file QueuePanel.pyc matches SearchViewer.py: dialog = wx.MessageDialog(self, 'No pattern present.', 'Search error', wx.OK | wx.ICON_ERROR) SearchViewer.py: dialog = wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR) SearchViewer.py: wx.MessageDialog(self, 'No such user.', 'Error', wx.ICON_ERROR).ShowModal() SearchViewer.py: wx.MessageDialog(self, 'Source is not matching.', 'Error', wx.ICON_ERROR).ShowModal() SearchViewer.py: wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR).ShowModal() Binary file SearchViewer.pyc matches Settings.py: wxMessageDialog(self, 'Error: %s.' % str(e), 'Settings error', wxOK | wxICON_ERROR).ShowModal() Settings.py: wxMessageDialog(self, 'Error: %s.' % msg, 'List address error', wxOK | wxICON_ERROR).ShowModal() Settings.py: wxMessageDialog(self, 'Error: %s.' % msg, 'Share directory error', wxOK | wxICON_ERROR).ShowModal() Binary file Settings.pyc matches pydc.py: wx.MessageDialog(None, 'The file \'queue.pk\' is corrupted. Please remove it and restart pyDC.', 'Queue error', wx.OK | wx.ICON_ERROR).ShowModal() pydc.py: wx.MessageDialog(wnd, str(e), 'Configuration error', wxOK | wxICON_ERROR).ShowModal() pydc.py: wx.MessageDialog(wnd, msg, 'Socket error', wxOK | wxICON_ERROR).ShowModal() pydc.py: wx.MessageDialog(wnd, 'pyDC won\'t start if not properly configured.', 'Settings error', wx.OK | wx.ICON_ERROR).ShowModal() |