def findSizeFields(self): # Save the current encapsulation level of each field savedEncapsulationLevel = [] for field in self.vocabularyController.treeSymbolController.selectedSymbol.getExtendedFields(): savedEncapsulationLevel.append(field.getEncapsulationLevel()) sizeFieldIdentifier = SizeFieldIdentifier() # Show the progression dialog dialog = Gtk.Dialog(title=_("Size Fields Identifications"), flags=0, buttons=None) panel = Gtk.Table(rows=2, columns=2, homogeneous=False) panel.show() # Progress bar self.progressBarSizeField = NetzobProgressBar() panel.attach(self.progressBarSizeField, 0, 2, 0, 1, xoptions=Gtk.AttachOptions.FILL, yoptions=0, xpadding=5, ypadding=5) # Buttons cancelSizeFieldButton = NetzobButton(_("Cancel")) startSizeFieldButton = NetzobButton(_("Start")) cancelSizeFieldButton.set_sensitive(False) cancelSizeFieldButton.connect("clicked", self.cancelfindSizeFields_cb, dialog, startSizeFieldButton, sizeFieldIdentifier) startSizeFieldButton.connect("clicked", self.findSizeFields_cb, dialog, sizeFieldIdentifier, [self.vocabularyController.treeSymbolController.selectedSymbol], cancelSizeFieldButton, savedEncapsulationLevel) panel.attach(startSizeFieldButton, 0, 1, 1, 2, xoptions=Gtk.AttachOptions.FILL, yoptions=0, xpadding=5, ypadding=5) panel.attach(cancelSizeFieldButton, 1, 2, 1, 2, xoptions=Gtk.AttachOptions.FILL, yoptions=0, xpadding=5, ypadding=5) dialog.vbox.pack_start(panel, True, True, 0) dialog.show()