diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-04-21 05:20:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-04-21 05:20:18 +0000 |
commit | 10cd51f08fb9fc81c6b325e36eb006c7b604d453 (patch) | |
tree | b757aa28231279629b0b759fbb10d6bf641c34ba | |
parent | 4fd293e37328dc53283a3548ece1277f12272a6d (diff) | |
download | fetchmail-10cd51f08fb9fc81c6b325e36eb006c7b604d453.tar.gz fetchmail-10cd51f08fb9fc81c6b325e36eb006c7b604d453.tar.bz2 fetchmail-10cd51f08fb9fc81c6b325e36eb006c7b604d453.zip |
Added guard code.
svn path=/trunk/; revision=2880
-rwxr-xr-x | fetchmailconf | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/fetchmailconf b/fetchmailconf index 29ed5ada..2e0b90b5 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -4,7 +4,7 @@ # by Eric S. Raymond, <esr@snark.thyrsus.com>. # Requires Python with Tkinter, and the following OS-dependent services: # posix, posixpath, socket -version = "1.23" +version = "1.24" from Tkinter import * from Dialog import * @@ -483,16 +483,17 @@ class ListEdit(Frame): helpwin(self.helptxt) def handleList(self, event): - self.editItem(); + self.editItem(); def handleNew(self, event): item = self.newval.get() - entire = self.listwidget.get(0, self.listwidget.index('end')); - if item and (not entire) or (not item in self.listwidget.get(0, self.listwidget.index('end'))): - self.listwidget.insert('end', item) - if self.list != None: self.list.append(item) - apply(self.editor, (item,)) - self.newval.set('') + if item: + entire = self.listwidget.get(0, self.listwidget.index('end')); + if item and (not entire) or (not item in self.listwidget.get(0, self.listwidget.index('end'))): + self.listwidget.insert('end', item) + if self.list != None: self.list.append(item) + apply(self.editor, (item,)) + self.newval.set('') def editItem(self): select = self.listwidget.curselection() @@ -1665,6 +1666,14 @@ Or you can just select `Quit' to exit the launcher now. """, width=600).pack(side=TOP) Button(self, text='Quit', fg='blue', command=self.leave).pack() + sysversion = string.split(sys.version, " ")[0] + if sysversion < "1.5.2": + Message(self, text=""" +Warning: it looks like your Python version is older than 1.5.2. +Double-clicking an empty listbox entry may cause fetchmailconf +to abort (this seems to be a tkinter bug). We recommend upgrading. +""", width=600).pack(side=TOP) + def configure(self): self.configbutton.configure(state=DISABLED) Configurator(self.outfile, Toplevel(), |