Advertisement
Guest User

Error

a guest
Jul 3rd, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. class NewDialog(Gtk.Dialog):
  2.     __gtype_name__ = "NewDialog"
  3.  
  4.     def __new__(cls):
  5.         """Special static method that's automatically called by Python when
  6.        constructing a new instance of this class.
  7.        
  8.        Returns a fully instantiated NewDialog object.
  9.        """
  10.         builder = get_builder('NewDialog')
  11.         new_object = builder.get_object('new_dialog')
  12.         new_object.finish_initializing(builder)
  13.         return new_object
  14.  
  15.     def finish_initializing(self,builder):
  16.         """Called when we're finished initializing.
  17.  
  18.        finish_initalizing should be called after parsing the ui definition
  19.        and creating a NewDialog object with it in order to
  20.        finish initializing the start of the new NewDialog
  21.        instance.
  22.        """
  23.         # Get a reference to the builder and set up the signals.
  24.         self.builder = builder
  25.         self.ui = builder.get_ui(self)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement