summaryrefslogtreecommitdiffstats
path: root/plugins/plugin_examples
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2010-08-23 15:14:06 +0200
committerMartin Sivak <msivak@redhat.com>2010-08-23 16:49:35 +0200
commitb6f503fc174302bdc3fc05dcc33e737432037218 (patch)
treef12c8b094c2b9573fdb48b6a263bfe517435b859 /plugins/plugin_examples
parent8079f17a282c83825e07b76cd6bec972ba2ba112 (diff)
downloadfirstaidkit-b6f503fc174302bdc3fc05dcc33e737432037218.tar.gz
firstaidkit-b6f503fc174302bdc3fc05dcc33e737432037218.tar.xz
firstaidkit-b6f503fc174302bdc3fc05dcc33e737432037218.zip
Add List/Config question (something similar to about:config) and Gtk GUI for it
Diffstat (limited to 'plugins/plugin_examples')
-rw-r--r--plugins/plugin_examples/dialogue.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/plugin_examples/dialogue.py b/plugins/plugin_examples/dialogue.py
index 1ff007a..bcc5a00 100644
--- a/plugins/plugin_examples/dialogue.py
+++ b/plugins/plugin_examples/dialogue.py
@@ -26,8 +26,8 @@ from pyfirstaidkit.issue import SimpleIssue
class DialoguePlugin(Plugin):
"""This plugin demonstrates asking the user for information."""
name = "DialoguePlugin"
- version = "0.0.1"
- author = "Miloslav Trmač"
+ version = "0.0.2"
+ author = "Miloslav Trmač & Martin Sivák"
def __init__(self, *args, **kwargs):
Plugin.__init__(self, *args, **kwargs)
@@ -76,6 +76,20 @@ class DialoguePlugin(Plugin):
level = PLUGIN)
self._reporting.info("File name: %s" % repr(s), origin = self,
level = PLUGIN)
+
+ config_options = [
+ ("id:1", "PL", "5", "Password length"),
+ ("id:2", "PS", "C", "Password strength"),
+ ("id:3", "PL", "aA0.", "Password chars"),
+ ]
+
+ s = self._reporting.config_question_wait("Setup choices",
+ "Set preferred values",
+ config_options, origin = self,
+ level = PLUGIN)
+ self._reporting.info("Options: %s" % repr(s), origin = self,
+ level = PLUGIN)
+
self._issue.set(checked = True, happened = False,
reporting = self._reporting, origin = self,
level = PLUGIN)