/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to ui.py

  • Committer: Curtis Hovey
  • Date: 2012-02-27 20:32:57 UTC
  • mto: (776.3.1 gpush)
  • mto: This revision was merged to the branch mainline in revision 779.
  • Revision ID: sinzui.is@verizon.net-20120227203257-uk0ov2zgg8kg22h1
Added ErrorDialog and implented show_error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    MESSAGE_TYPE = Gtk.MessageType.WARNING
60
60
 
61
61
 
 
62
class ErrorDialog(InfoDialog):
 
63
    """Show the user a warning message."""
 
64
 
 
65
    MESSAGE_TYPE = Gtk.MessageType.ERROR
 
66
 
 
67
 
62
68
class GtkProgressBar(Gtk.ProgressBar):
63
69
 
64
70
    def __init__(self):
194
200
        dialog.destroy()
195
201
 
196
202
    def show_warning(self, msg):
197
 
        """See UIFactory.show_message."""
 
203
        """See UIFactory.show_warning."""
198
204
        dialog = WarningDialog(msg)
199
205
        dialog.run()
200
206
        dialog.destroy()
201
207
 
 
208
    def show_error(self, msg):
 
209
        """See UIFactory.show_error."""
 
210
        dialog = ErrorDialog(msg)
 
211
        dialog.run()
 
212
        dialog.destroy()
 
213
 
202
214
    def get_password(self, prompt='', **kwargs):
203
215
        """Prompt the user for a password.
204
216