Ejemplo n.º 1
0
        def _you_are_connected_via_ethernet(self):
            self.remove_main_widget()
            title = _("You are already connected via ethernet.")
            description = _("Do you still want to connect with WiFi?")

            # Decide which callback to use depending on if wifi dongle is
            # plugged in
            buttons = [
                {
                    'label': _("NO"),
                    'color': 'red',
                    'callback': Gtk.main_quit,
                    'type': 'KanoButton'
                },
                {
                    'label': _("YES"),
                    'color': 'green',
                    'callback': self._ethernet_next_step,
                    'type': 'KanoButton',
                    'focus': True
                }
            ]

            img_path = os.path.join(img_dir, "ethernet-2.png")

            screen = Template(
                title,
                description,
                buttons,
                self.is_plug(),
                img_path
            )
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 2
0
        def _you_have_internet_screen(self, wiface):
            self.remove_main_widget()
            title = _("You already have internet!")
            description = _("Do you want to change network?")
            buttons = [
                {
                    'label': _("NO"),
                    'color': 'red',
                    'callback': Gtk.main_quit,
                    'type': 'KanoButton'
                },
                {
                    'label': _("YES"),
                    'color': 'green',
                    'callback': self.refresh_networks,
                    'type': 'KanoButton',
                    'focus': True
                }
            ]
            img_path = os.path.join(img_dir, "internet.png")

            screen = Template(
                title,
                description,
                buttons,
                self.is_plug(),
                img_path
            )
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 3
0
        def _you_have_internet_screen(self, wiface):
            self.remove_main_widget()
            title = _("You already have internet!")
            description = _("Do you want to change network?")
            buttons = [
                {
                    'label': _("NO"),
                    'color': 'red',
                    'callback': Gtk.main_quit,
                    'type': 'KanoButton'
                },
                {
                    'label': _("YES"),
                    'color': 'green',
                    'callback': self.refresh_networks,
                    'type': 'KanoButton',
                    'focus': True
                }
            ]
            img_path = os.path.join(img_dir, "internet.png")

            screen = Template(
                title,
                description,
                buttons,
                self.is_plug(),
                img_path
            )
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 4
0
        def _plug_in_wifi_dongle(self):
            self.remove_main_widget()
            title = _("You don't seem to have a WiFi dongle\nplugged in.")
            description = _("Plug one in and try again")
            buttons = [
                {
                    'label': ""
                },
                {
                    'label': _("TRY AGAIN"),
                    'color': 'green',
                    'callback': self._launch_application,
                    'type': 'KanoButton',
                    'focus': True
                },
                {
                    'label': _("Skip"),
                    'callback': Gtk.main_quit,
                    'type': 'OrangeButton'
                }
            ]

            img_path = os.path.join(img_dir, "dongle2.png")

            screen = Template(
                title,
                description,
                buttons,
                self.is_plug(),
                img_path
            )
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 5
0
        def _you_are_connected_via_ethernet(self):
            self.remove_main_widget()
            title = _("You are already connected via ethernet.")
            description = _("Do you still want to connect with WiFi?")

            # Decide which callback to use depending on if wifi dongle is
            # plugged in
            buttons = [
                {
                    'label': _("NO"),
                    'color': 'red',
                    'callback': Gtk.main_quit,
                    'type': 'KanoButton'
                },
                {
                    'label': _("YES"),
                    'color': 'green',
                    'callback': self._ethernet_next_step,
                    'type': 'KanoButton',
                    'focus': True
                }
            ]

            img_path = os.path.join(img_dir, "ethernet-2.png")

            screen = Template(
                title,
                description,
                buttons,
                self.is_plug(),
                img_path
            )
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 6
0
        def _plug_in_wifi_dongle(self):
            self.remove_main_widget()
            title = _("You don't seem to have a WiFi dongle\nplugged in.")
            description = _("Plug one in and try again")
            buttons = [
                {
                    'label': ""
                },
                {
                    'label': _("TRY AGAIN"),
                    'color': 'green',
                    'callback': self._launch_application,
                    'type': 'KanoButton',
                    'focus': True
                },
                {
                    'label': _("Skip"),
                    'callback': Gtk.main_quit,
                    'type': 'OrangeButton'
                }
            ]

            img_path = os.path.join(img_dir, "dongle2.png")

            screen = Template(
                title,
                description,
                buttons,
                self.is_plug(),
                img_path
            )
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 7
0
        def _you_have_internet_screen(self, wiface):
            self.remove_main_widget()
            title = _("You already have internet!")
            description = _("Do you want to change network?")
            buttons = [
                {"label": _("NO"), "color": "red", "callback": Gtk.main_quit, "type": "KanoButton"},
                {
                    "label": _("YES"),
                    "color": "green",
                    "callback": self.refresh_networks,
                    "type": "KanoButton",
                    "focus": True,
                },
            ]
            img_path = os.path.join(img_dir, "internet.png")

            screen = Template(title, description, buttons, self.is_plug(), img_path)
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 8
0
        def _plug_in_wifi_dongle(self):
            self.remove_main_widget()
            title = _("You don't seem to have a WiFi dongle\nplugged in.")
            description = _("Plug one in and try again")
            buttons = [
                {"label": ""},
                {
                    "label": _("TRY AGAIN"),
                    "color": "green",
                    "callback": self._launch_application,
                    "type": "KanoButton",
                    "focus": True,
                },
                {"label": _("Skip"), "callback": Gtk.main_quit, "type": "OrangeButton"},
            ]

            img_path = os.path.join(img_dir, "dongle2.png")

            screen = Template(title, description, buttons, self.is_plug(), img_path)
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()
Ejemplo n.º 9
0
        def _you_are_connected_via_ethernet(self):
            self.remove_main_widget()
            title = _("You are already connected via ethernet.")
            description = _("Do you still want to connect with WiFi?")

            # Decide which callback to use depending on if wifi dongle is
            # plugged in
            buttons = [
                {"label": _("NO"), "color": "red", "callback": Gtk.main_quit, "type": "KanoButton"},
                {
                    "label": _("YES"),
                    "color": "green",
                    "callback": self._ethernet_next_step,
                    "type": "KanoButton",
                    "focus": True,
                },
            ]

            img_path = os.path.join(img_dir, "ethernet-2.png")

            screen = Template(title, description, buttons, self.is_plug(), img_path)
            self.set_main_widget(screen)
            screen.button_grab_focus()
            screen.show_all()