mirror of
https://github.com/libretro/hatari.git
synced 2024-11-30 11:40:25 +00:00
improved UI button type & warning message
This commit is contained in:
parent
bf41ad1d6e
commit
a16c8afb27
@ -86,7 +86,9 @@ class ConfigStore:
|
||||
print "ERROR: configuration file '%' loading failed" % path
|
||||
return
|
||||
else:
|
||||
print "WARNING: configuration file missing, using defaults"
|
||||
print "WARNING: configuration file missing"
|
||||
if self.defaults:
|
||||
print "-> using defaults"
|
||||
self.sections = self.defaults
|
||||
self.path = path
|
||||
self.original = self.get_checkpoint()
|
||||
|
@ -47,13 +47,14 @@ subclasses overriding run() require also an argument."""
|
||||
# Note/Todo/Error/Ask dialogs
|
||||
|
||||
class NoteDialog(HatariUIDialog):
|
||||
button = gtk.BUTTONS_OK
|
||||
icontype = gtk.MESSAGE_INFO
|
||||
textpattern = "\n%s"
|
||||
def run(self, text):
|
||||
"run(text), show message dialog with given text"
|
||||
dialog = gtk.MessageDialog(self.parent,
|
||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
self.icontype, gtk.BUTTONS_CLOSE, self.textpattern % text)
|
||||
self.icontype, self.button, self.textpattern % text)
|
||||
dialog.run()
|
||||
dialog.destroy()
|
||||
|
||||
@ -61,6 +62,7 @@ class TodoDialog(NoteDialog):
|
||||
textpattern = "\nTODO: %s"
|
||||
|
||||
class ErrorDialog(NoteDialog):
|
||||
button = gtk.BUTTONS_CLOSE
|
||||
icontype = gtk.MESSAGE_ERROR
|
||||
textpattern = "\nERROR: %s"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user