From 97f1f8b836f4858076141d8ea14c2ddf19b8e9be Mon Sep 17 00:00:00 2001 From: steffen123 Date: Tue, 10 Aug 2010 03:50:26 +0200 Subject: [PATCH] display existing configs in IMAP tab --- pyfpdb/GuiImapFetcher.py | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/pyfpdb/GuiImapFetcher.py b/pyfpdb/GuiImapFetcher.py index d8e4d18e..4d155c6a 100644 --- a/pyfpdb/GuiImapFetcher.py +++ b/pyfpdb/GuiImapFetcher.py @@ -34,7 +34,7 @@ class GuiImapFetcher (threading.Thread): label=gtk.Label("To cancel just close this tab") self.buttonsHBox.add(label) - self.saveButton = gtk.Button("_Save Configuration") + self.saveButton = gtk.Button("_Save (doesn't work yet)") self.saveButton.connect('clicked', self.saveClicked) self.buttonsHBox.add(self.saveButton) @@ -70,9 +70,30 @@ class GuiImapFetcher (threading.Thread): #end def get_vbox def displayConfig(self): - print self.config.emails - for email in self.config.emails: - print self.config.emails[email] + box=gtk.HBox(homogeneous=True) + for text in ("Site", "Fetch Type", "Mailserver", "Username", "Password", "Mail Folder", "Use SSL"): + label=gtk.Label(text) + box.add(label) + self.rowVBox.pack_start(box, expand=False) + for email in self.config.emails: + config=self.config.emails[email] + box=gtk.HBox(homogeneous=True) + for field in (config.siteName, config.fetchType, config.host, config.username, config.password, config.folder): + entry=gtk.Entry() + entry.set_text(field) + box.add(entry) + + sslBox = gtk.combo_box_new_text() + sslBox.append_text("Yes") + sslBox.append_text("No") + sslBox.set_active(0) + box.add(sslBox) + + #TODO: useSsl + self.rowVBox.pack_start(box, expand=False) + #print + + self.rowVBox.show_all() #end def displayConfig #end class GuiImapFetcher