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()
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()
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()
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()
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()
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()