remove one indentation level using a continue in the for loop

This commit is contained in:
Vincent Hanquez 2005-04-20 18:04:26 +00:00
parent d6e9079cd8
commit 5c8314df93
1 changed files with 13 additions and 11 deletions

View File

@ -1436,17 +1436,19 @@ class Service_registration_window:
nbrow = 0
table = self.xml.get_widget('table')
for name in self.infos.keys():
if name != 'key' and name != 'instructions' and name != 'x':
nbrow = nbrow + 1
table.resize(rows=nbrow, columns=2)
label = gtk.Label(name.capitalize() + ':')
table.attach(label, 0, 1, nbrow-1, nbrow, 0, 0, 0, 0)
entry = gtk.Entry()
entry.set_text(self.infos[name])
table.attach(entry, 1, 2, nbrow-1, nbrow, 0, 0, 0, 0)
self.entries[name] = entry
if nbrow == 1:
entry.grab_focus()
if name == 'key' or name == 'instructions' or name == 'x':
continue
nbrow = nbrow + 1
table.resize(rows = nbrow, columns = 2)
label = gtk.Label(name.capitalize() + ':')
table.attach(label, 0, 1, nbrow - 1, nbrow, 0, 0, 0, 0)
entry = gtk.Entry()
entry.set_text(self.infos[name])
table.attach(entry, 1, 2, nbrow - 1, nbrow, 0, 0, 0, 0)
self.entries[name] = entry
if nbrow == 1:
entry.grab_focus()
table.show_all()
def on_ok_button_clicked(self, widget):