Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NewDialog(Gtk.Dialog):
- __gtype_name__ = "NewDialog"
- def __new__(cls):
- """Special static method that's automatically called by Python when
- constructing a new instance of this class.
- Returns a fully instantiated NewDialog object.
- """
- builder = get_builder('NewDialog')
- new_object = builder.get_object('new_dialog')
- new_object.finish_initializing(builder)
- return new_object
- def finish_initializing(self,builder):
- """Called when we're finished initializing.
- finish_initalizing should be called after parsing the ui definition
- and creating a NewDialog object with it in order to
- finish initializing the start of the new NewDialog
- instance.
- """
- # Get a reference to the builder and set up the signals.
- self.builder = builder
- self.ui = builder.get_ui(self)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement