Beispiel #1
0
    def __init__(self, win):

        self.win = win
        self.win.set_decorated(False)

        img_width = 590
        img_height = 270

        header = _("Oops! You need Internet to make a profile")
        subheader = _(
            "But you can skip this if you have no connection right now")
        image_filename = get_image('login', "", 'no-internet',
                                   str(img_width) + 'x' + str(img_height))
        kano_button_label = _("CONNECT")
        orange_button_label = _("Register later")

        Template.__init__(self, image_filename, header, subheader,
                          kano_button_label, orange_button_label)

        self.win.set_main_widget(self)
        self.kano_button.connect('button_release_event', self.connect)

        # Since cannot pass with keyboard, set it so it cannot receive
        # keyboard focus
        self.kano_button.set_can_focus(False)

        self.orange_button.connect('button_release_event', self.register_later)
        self.kano_button.grab_focus()
        self.win.show_all()
Beispiel #2
0
    def __init__(self, win):

        self.win = win
        self.win.set_decorated(False)

        img_width = 590
        img_height = 270

        header = _("Oops! You need Internet to make a profile")
        subheader = _(
            "But you can skip this if you have no connection right now"
        )
        image_filename = get_image('login', "", 'no-internet',
                                   str(img_width) + 'x' + str(img_height))
        kano_button_label = _("CONNECT")
        orange_button_label = _("Register later")

        Template.__init__(self, image_filename, header, subheader,
                          kano_button_label, orange_button_label)

        self.win.set_main_widget(self)
        self.kano_button.connect('button_release_event', self.connect)

        # Since cannot pass with keyboard, set it so it cannot receive
        # keyboard focus
        self.kano_button.set_can_focus(False)

        self.orange_button.connect('button_release_event', self.register_later)
        self.kano_button.grab_focus()
        self.win.show_all()
    def __init__(self, win):

        # Set window
        self.win = win
        self.win.set_decorated(False)
        self.win.set_resizable(True)

        # Set text depending on login
        login = is_registered()
        if login:
            header = _("Profile activated!")
            subheader = _(
                u"Now you can share stuff, build your character, " \
                u"and connect with friends! You've earned some " \
                u"rewards\N{HORIZONTAL ELLIPSIS}"
            )
            image_name = 'profile-created'
            button_label = _("LET'S GO")
        else:
            header = _("No online profile - for now.")
            subheader = _(
                "Your profile stores all your rewards, projects, and " \
                "challenges. But fear not - we'll save everything for " \
                "when you have internet."
            )
            image_name = 'no-profile-new'
            button_label = _("LET'S GO")

        # Set image
        img_width = 590
        img_height = 270
        image_filename = get_image(
            'login', '', image_name, str(img_width) + 'x' + str(img_height)
        )

        # Create template
        Template.__init__(self, image_filename, header, subheader,
                          button_label, "")

        self.win.set_main_widget(self)
        self.kano_button.connect('button_release_event', self.next_screen)
        self.kano_button.connect('key_release_event', self.next_screen)
        self.kano_button.grab_focus()
        self.win.show_all()

        # Force the cross button to hide
        self.win.headerbar.close_button.hide()
Beispiel #4
0
    def __init__(self, win):

        # Set window
        self.win = win
        self.win.set_decorated(False)
        self.win.set_resizable(True)

        # Set text depending on login
        login = is_registered()
        if login:
            header = _("Profile activated!")
            subheader = _(
                u"Now you can share stuff, build your character, " \
                u"and connect with friends! You've earned some " \
                u"rewards\N{HORIZONTAL ELLIPSIS}"
            )
            image_name = 'profile-created'
            button_label = _("LET'S GO")
        else:
            header = _("No online profile - for now.")
            subheader = _(
                "Your profile stores all your rewards, projects, and " \
                "challenges. But fear not - we'll save everything for " \
                "when you have internet."
            )
            image_name = 'no-profile-new'
            button_label = _("LET'S GO")

        # Set image
        img_width = 590
        img_height = 270
        image_filename = get_image('login', '', image_name,
                                   str(img_width) + 'x' + str(img_height))

        # Create template
        Template.__init__(self, image_filename, header, subheader,
                          button_label, "")

        self.win.set_main_widget(self)
        self.kano_button.connect('button_release_event', self.next_screen)
        self.kano_button.connect('key_release_event', self.next_screen)
        self.kano_button.grab_focus()
        self.win.show_all()

        # Force the cross button to hide
        self.win.headerbar.close_button.hide()