diff options
Diffstat (limited to 'portato/gui/dialogs.py')
-rw-r--r-- | portato/gui/dialogs.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/portato/gui/dialogs.py b/portato/gui/dialogs.py index d7ac41b..2cc2d6b 100644 --- a/portato/gui/dialogs.py +++ b/portato/gui/dialogs.py @@ -3,7 +3,7 @@ # File: portato/gui/dialogs.py # This file is part of the Portato-Project, a graphical portage-frontend. # -# Copyright (C) 2006-2009 René 'Necoro' Neumann +# Copyright (C) 2006-2010 René 'Necoro' Neumann # This is free software. You may redistribute copies of it under the terms of # the GNU General Public License version 2. # There is NO WARRANTY, to the extent permitted by law. @@ -20,6 +20,13 @@ def mail_failure_dialog(e): dialog.destroy() return ret +def no_email_dialog(p): + dialog = gtk.MessageDialog(p, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK_CANCEL, _("No email address given")) + dialog.format_secondary_text(_("You haven't specified an email address. Without it, it will not be possible for the developers to contact you for questions and thus it might be harder to fix the bug.\n\nDo you want to proceed nevertheless?")) + ret = dialog.run() + dialog.destroy() + return ret + def queue_not_empty_dialog(): dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_NONE, _("Do you really want to quit?")) dialog.format_secondary_text(_("There are some packages in the emerge queue and/or an emerge process is running.")) @@ -68,7 +75,18 @@ def nothing_found_dialog (): def changed_flags_dialog (what = "flags"): check = gtk.CheckButton(_("Do not show this dialog again.")) hintMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, _("Changed %s") % what) - hintMB.format_secondary_text(_("Portato will write these changes into the appropriate files.\nPlease backup them if you think it is necessairy.")) + hintMB.format_secondary_text(_("Portato will write these changes into the appropriate files.\nPlease backup them if you think it is necessary.")) + hintMB.vbox.add(check) + hintMB.vbox.show_all() + ret = hintMB.run() + hintMB.destroy() + + return ret, check.get_active() + +def update_world_warning_dialog (): + check = gtk.CheckButton(_("Do not show this dialog again.")) + hintMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK, _("'Update World' may be giving errors")) + hintMB.format_secondary_text(_("Due to the fast changing portage, 'update world' might not work correctly or even throw errors.\nThis will be fixed (hopefully) in the next release.")) hintMB.vbox.add(check) hintMB.vbox.show_all() ret = hintMB.run() |