def __init__(self, win, age): Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL) self.win = win self.win.set_main_widget(self) self.page_control = self.win.create_page_control(3, _("Back").upper(), _("Continue").upper()) self.page_control.disable_next() self.pack_end(self.page_control, False, False, 0) self.page_control.connect("next-button-clicked", self.register_handler) self.page_control.connect("back-button-clicked", self.prev_page) title = Heading(_('Character creator'), _('Sign up with your email')) self.pack_start(title.container, False, False, 0) image_viewer = ImageView(self) self.pack_start(image_viewer, False, False, 0) # Get character image filename = os.path.join(AVATAR_DEFAULT_LOC, AVATAR_ENV_SHIFTED) image_viewer.set_image(filename) # Pass age into the Data screen - decide whether to ask for # Guardian's email self.data_screen = GetData3(age) self.data_screen.connect("widgets-filled", self.enable_next) self.data_screen.connect("widgets-empty", self.disable_next) # Put it with the same y coordinate as the menu image_viewer.put(self.data_screen, 400, 30) self.show_all()
def __init__(self, win): Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL) self.win = win self.win.set_main_widget(self) self.page_control = self.win.create_page_control(2, _("Back").upper(), _("Next").upper()) self.page_control.next_button.set_sensitive(False) self.pack_end(self.page_control, False, False, 0) self.page_control.connect("next-button-clicked", self.next_page) self.page_control.connect("back-button-clicked", self.prev_page) title = Heading( _('Character creator'), _('Choose a cool name and secure password') ) self.pack_start(title.container, False, False, 0) # This time we need the picture with the login screen to one side. image_viewer = ImageView(self) self.pack_start(image_viewer, False, False, 0) filename = os.path.join(AVATAR_DEFAULT_LOC, AVATAR_ENV_SHIFTED) image_viewer.set_image(filename) self.data_screen = GetData2() self.data_screen.connect("widgets-filled", self.enable_next) self.data_screen.connect("widgets-empty", self.disable_next) # Put it with the same y-coordinate as the menu image_viewer.put(self.data_screen, 400, 30) self.win.show_all()