summaryrefslogtreecommitdiff
path: root/geneticone/gui/dialogs.py
diff options
context:
space:
mode:
authornecoro <>2006-10-09 19:16:29 +0000
committernecoro <>2006-10-09 19:16:29 +0000
commit12d50f5040d8cc0a5564ba7dc328aa58b595eac6 (patch)
treeac8783ec6e3581e44a550a5e6ac98af549407ecb /geneticone/gui/dialogs.py
parentf27145ec49c6f1cdd13db2f3bf389164f10ac828 (diff)
downloadportato-12d50f5040d8cc0a5564ba7dc328aa58b595eac6.tar.gz
portato-12d50f5040d8cc0a5564ba7dc328aa58b595eac6.tar.bz2
portato-12d50f5040d8cc0a5564ba7dc328aa58b595eac6.zip
bla - prepared 0.4.0 ; added dialogs.py; extended some comments
Diffstat (limited to '')
-rw-r--r--geneticone/gui/dialogs.py55
1 files changed, 55 insertions, 0 deletions
diff --git a/geneticone/gui/dialogs.py b/geneticone/gui/dialogs.py
new file mode 100644
index 0000000..ddb9d52
--- /dev/null
+++ b/geneticone/gui/dialogs.py
@@ -0,0 +1,55 @@
+#
+# File: geneticone/gui/dialogs.py
+# This file is part of the Genetic/One-Project, a graphical portage-frontend.
+#
+# Copyright (C) 2006 Necoro d.M.
+# 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.
+#
+# Written by Necoro d.M. <necoro@necoro.net>
+
+import gtk
+
+def blocked_dialog (blocked, blocks):
+ dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, blocked+" is blocked by "+blocks+".\nPlease unmerge the blocking package.")
+ dialog.run()
+ dialog.destroy()
+
+def not_root_dialog ():
+ errorMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "You cannot (un)merge without being root.")
+ errorMB.run()
+ errorMB.destroy()
+
+def masked_dialog (cpv):
+ dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, cpv+" seems to be masked.\nPlease edit the appropriate file(s) to unmask it and restart Genetic/One.\n")
+ dialog.run()
+ dialog.destroy()
+
+def unmask_dialog (cpv):
+ dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, cpv+" seems to be masked.\nDo you want to unmask it and its dependencies?.\n")
+ ret = dialog.run()
+ dialog.destroy()
+ return ret
+
+def nothing_found_dialog ():
+ dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, "Package not found!")
+ dialog.run()
+ dialog.destroy()
+
+def changed_flags_dialog (what = "flags"):
+ hintMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
+ "You have changed %s. Genetic/One will write these changes into the appropriate files. Please backup them if you think it is necessairy." % what)
+ hintMB.run()
+ hintMB.destroy()
+
+def remove_deps_dialog ():
+ infoMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, "You cannot remove dependencies. :)")
+ infoMB.run()
+ infoMB.destroy()
+
+def remove_queue_dialog ():
+ askMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, "Do you really want to clear the whole queue?")
+ ret = askMB.run()
+ askMB.destroy()
+ return ret