Ejemplo n.º 1
0
 def __init__(self, controller, *args, **kwargs):
     import dbus
     from ubiquity import misc, nm
     from gi.repository import Gtk
     if 'UBIQUITY_AUTOMATIC' in os.environ:
         self.page = None
         return
     # Check whether we can talk to NM at all (e.g. debugging ubiquity
     # over ssh with X forwarding).
     try:
         misc.has_connection()
     except dbus.DBusException:
         self.page = None
         return
     self.controller = controller
     builder = Gtk.Builder()
     self.controller.add_builder(builder)
     builder.add_from_file(os.path.join(os.environ['UBIQUITY_GLADE'], 'stepWireless.ui'))
     builder.connect_signals(self)
     self.page = builder.get_object('stepWireless')
     self.nmwidget = builder.get_object('nmwidget')
     self.nmwidget.connect('connection', self.state_changed)
     self.nmwidget.connect('selection_changed', self.selection_changed)
     self.nmwidget.connect('pw_validated', self.pw_validated)
     self.use_wireless = builder.get_object('use_wireless')
     self.use_wireless.connect('toggled', self.wireless_toggled)
     self.plugin_widgets = self.page
     self.have_selection = False
     self.state = self.nmwidget.get_state()
     self.next_normal = True
     self.back_normal = True
     self.connect_text = None
     self.stop_text = None
     self.skip = False
Ejemplo n.º 2
0
 def __init__(self, controller, *args, **kwargs):
     import dbus
     from ubiquity import misc, nm
     from gi.repository import Gtk
     if 'UBIQUITY_AUTOMATIC' in os.environ:
         self.page = None
         return
     # Check whether we can talk to NM at all (e.g. debugging ubiquity
     # over ssh with X forwarding).
     try:
         misc.has_connection()
     except dbus.DBusException:
         self.page = None
         return
     self.controller = controller
     builder = Gtk.Builder()
     self.controller.add_builder(builder)
     builder.add_from_file(
         os.path.join(os.environ['UBIQUITY_GLADE'], 'stepWireless.ui'))
     builder.connect_signals(self)
     self.page = builder.get_object('stepWireless')
     self.nmwidget = builder.get_object('nmwidget')
     self.nmwidget.connect('connection', self.state_changed)
     self.nmwidget.connect('selection_changed', self.selection_changed)
     self.nmwidget.connect('pw_validated', self.pw_validated)
     self.use_wireless = builder.get_object('use_wireless')
     self.use_wireless.connect('toggled', self.wireless_toggled)
     self.plugin_widgets = self.page
     self.have_selection = False
     self.state = self.nmwidget.get_state()
     self.next_normal = True
     self.back_normal = True
     self.connect_text = None
     self.stop_text = None
     self.skip = False
Ejemplo n.º 3
0
 def __init__(self, controller, *args, **kwargs):
     from ubiquity import nm
     from gi.repository import Gtk
     if ('UBIQUITY_AUTOMATIC' in os.environ
         or not nm.wireless_hardware_present() or misc.has_connection()):
         self.page = None
         return
     self.controller = controller
     builder = Gtk.Builder()
     self.controller.add_builder(builder)
     builder.add_from_file(os.path.join(os.environ['UBIQUITY_GLADE'], 'stepWireless.ui'))
     builder.connect_signals(self)
     self.page = builder.get_object('stepWireless')
     self.nmwidget = builder.get_object('nmwidget')
     self.nmwidget.connect('connection', self.state_changed)
     self.nmwidget.connect('selection_changed', self.selection_changed)
     self.use_wireless = builder.get_object('use_wireless')
     self.use_wireless.connect('toggled', self.wireless_toggled)
     self.plugin_widgets = self.page
     self.have_selection = False
     self.state = self.nmwidget.get_state()
     self.next_normal = True
     self.back_normal = True
     self.connect_text = None
     self.stop_text = None
Ejemplo n.º 4
0
    def __init__(self, controller, *args, **kwargs):
        WirelessPageBase.__init__(self)
        import dbus
        from ubiquity import misc

        if self.is_automatic:
            self.page = None
            return
        # Check whether we can talk to NM at all (e.g. debugging ubiquity
        # over ssh with X forwarding).
        try:
            misc.has_connection()
        except dbus.DBusException:
            self.page = None
            return
        self.controller = controller
        self._setup_page()
        self.plugin_widgets = self.page
Ejemplo n.º 5
0
    def __init__(self, controller, *args, **kwargs):
        WirelessPageBase.__init__(self)
        import dbus
        from gi.repository import Gtk

        from ubiquity import misc
        # NOTE: Import 'nmwidgets' even though it's not used in this function
        # as importing it as the side effect of registering
        # NetworkManagerWidget which we DO use in the Wireless step UI.
        from ubiquity.frontend.gtk_components import nmwidgets
        assert nmwidgets  # silence, pyflakes

        if self.is_automatic:
            self.page = None
            return
        # Check whether we can talk to NM at all (e.g. debugging ubiquity
        # over ssh with X forwarding).
        try:
            misc.has_connection()
        except dbus.DBusException:
            self.page = None
            return
        self.controller = controller
        builder = Gtk.Builder()
        self.controller.add_builder(builder)
        builder.add_from_file(os.path.join(
            os.environ['UBIQUITY_GLADE'], 'stepWireless.ui'))
        builder.connect_signals(self)
        self.page = builder.get_object('stepWireless')
        self.nmwidget = builder.get_object('nmwidget')
        self.nmwidget.connect('connection', self.state_changed)
        self.nmwidget.connect('selection_changed', self.selection_changed)
        self.no_wireless = builder.get_object('no_wireless')
        self.use_wireless = builder.get_object('use_wireless')
        self.use_wireless.connect('toggled', self.wireless_toggled)
        self.plugin_widgets = self.page
        self.have_selection = False
        self.state = self.nmwidget.get_state()
        self.next_normal = True
        self.back_normal = True
        self.connect_text = None
        self.stop_text = None
        self.skip = False
Ejemplo n.º 6
0
    def __init__(self, controller, *args, **kwargs):
        import dbus

        # NOTE: Import 'nm' even though it's not used in this function as
        # importing it as the side effect of registering NetworkManagerWidget
        # which we DO use in the Wireless step UI.
        from ubiquity import misc, nm
        from gi.repository import Gtk

        if "UBIQUITY_AUTOMATIC" in os.environ:
            self.page = None
            return
        # Check whether we can talk to NM at all (e.g. debugging ubiquity
        # over ssh with X forwarding).
        try:
            misc.has_connection()
        except dbus.DBusException:
            self.page = None
            return
        self.controller = controller
        builder = Gtk.Builder()
        self.controller.add_builder(builder)
        builder.add_from_file(os.path.join(os.environ["UBIQUITY_GLADE"], "stepWireless.ui"))
        builder.connect_signals(self)
        self.page = builder.get_object("stepWireless")
        self.nmwidget = builder.get_object("nmwidget")
        self.nmwidget.connect("connection", self.state_changed)
        self.nmwidget.connect("selection_changed", self.selection_changed)
        self.nmwidget.connect("pw_validated", self.pw_validated)
        self.use_wireless = builder.get_object("use_wireless")
        self.use_wireless.connect("toggled", self.wireless_toggled)
        self.plugin_widgets = self.page
        self.have_selection = False
        self.state = self.nmwidget.get_state()
        self.next_normal = True
        self.back_normal = True
        self.connect_text = None
        self.stop_text = None
        self.skip = False