Make work enter on first time dialog. Fix for bug #324.

This commit is contained in:
Tomeu Vizoso 2006-11-10 13:40:49 +01:00
parent 028bf526f2
commit d958e20df7

View File

@ -34,6 +34,7 @@ class FirstTimeDialog(gtk.Dialog):
self._entry = gtk.Entry() self._entry = gtk.Entry()
self._entry.connect('changed', self._entry_changed_cb) self._entry.connect('changed', self._entry_changed_cb)
self._entry.connect('activate', self._entry_activated_cb)
self.vbox.pack_start(self._entry) self.vbox.pack_start(self._entry)
self._entry.show() self._entry.show()
@ -47,7 +48,13 @@ class FirstTimeDialog(gtk.Dialog):
valid = (len(entry.get_text()) > 0) valid = (len(entry.get_text()) > 0)
self._ok.set_sensitive(valid) self._ok.set_sensitive(valid)
def _entry_activated_cb(self, entry):
self._create_buddy_section()
def _ok_button_clicked_cb(self, button): def _ok_button_clicked_cb(self, button):
self._create_buddy_section()
def _create_buddy_section(self):
cp = ConfigParser() cp = ConfigParser()
section = 'Buddy' section = 'Buddy'