aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmailconf
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-05-26 06:09:30 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-05-26 06:09:30 +0000
commitab11987d03f42ecd69e69b9e3d183ece66c09b63 (patch)
tree7f192675fc849ffbf86c03898d66787dd40a42f3 /fetchmailconf
parent65a1cca16337d23b2112df903622d4d3168ceae5 (diff)
downloadfetchmail-ab11987d03f42ecd69e69b9e3d183ece66c09b63.tar.gz
fetchmail-ab11987d03f42ecd69e69b9e3d183ece66c09b63.tar.bz2
fetchmail-ab11987d03f42ecd69e69b9e3d183ece66c09b63.zip
Separate initialization from editing.
svn path=/trunk/; revision=1845
Diffstat (limited to 'fetchmailconf')
-rwxr-xr-xfetchmailconf26
1 files changed, 14 insertions, 12 deletions
diff --git a/fetchmailconf b/fetchmailconf
index ad84ea80..8ef9092b 100755
--- a/fetchmailconf
+++ b/fetchmailconf
@@ -484,18 +484,20 @@ This will take you to a site configuration dialogue.
class ConfigurationEdit(Frame):
- def __init__(self, configuration, mode, master=None):
- Frame.__init__(self, master)
- self.master.title('fetchmail ' + mode + ' configurator');
- self.master.iconname('fetchmail ' + mode + ' configurator');
+ def __init__(self, configuration, master=None):
self.configuration = configuration
- Pack.config(self)
+ self.master = master
+ ConfigurationEdit.mode_to_help = {
+ 'novice':configure_novice_help, 'expert':configure_expert_help
+ }
+
+ def edit(self, mode):
self.mode = mode
- self.mode_to_help = {'novice':configure_novice_help,
- 'expert':configure_expert_help}
- self.makeWidgets()
+ Frame.__init__(self, self.master)
+ self.master.title('fetchmail ' + self.mode + ' configurator');
+ self.master.iconname('fetchmail ' + self.mode + ' configurator');
+ Pack.config(self)
- def makeWidgets(self):
self.poll_interval = StringVar(self)
self.poll_interval.set(`self.configuration.poll_interval`)
self.syslog = BooleanVar(self)
@@ -509,7 +511,7 @@ class ConfigurationEdit(Frame):
self.invisible.set(self.configuration.invisible)
dispose_window(self,
'Configurator ' + self.mode + ' Controls',
- self.mode_to_help[self.mode])
+ ConfigurationEdit.mode_to_help[self.mode])
gf = Frame(self, relief=RAISED, bd = 5)
Label(gf,
@@ -1063,11 +1065,11 @@ Or you can just select `Quit' to leave the configurator now.
def novice(self):
self.destroy()
- ConfigurationEdit(Configuration, 'novice')
+ ConfigurationEdit(Configuration).edit('novice')
def expert(self):
self.destroy()
- ConfigurationEdit(Configuration, 'expert')
+ ConfigurationEdit(Configuration).edit('expert')
def leave(self):
self.quit()