def setup_view(self):
        # first page of the notebook
        profile = config.current_profile.get('connection', 'dialer_profile')

        if profile == 'default':
            self['vbox2'].set_sensitive(False)
        else:
            self['custom_profile_checkbutton'].set_active(True)

        # third page of the notebook
        exit_without_confirmation = config.getboolean('preferences',
                                                'exit_without_confirmation')
        chkbt = self['exit_without_confirmation_checkbutton']
        chkbt.set_active(exit_without_confirmation)

        show_icon = config.getboolean('preferences', 'show_icon')
        self['show_icon_checkbutton'].set_active(show_icon)

        minimize_to_tray = config.getboolean('preferences', 'close_minimizes')
        self['close_window_checkbutton'].set_active(minimize_to_tray)
        self['close_window_checkbutton'].set_sensitive(show_icon)

        manage_keyring = config.getboolean('preferences', 'manage_keyring')
        self['gnomekeyring_checkbutton'].set_active(manage_keyring)

        #setup dialer_combobox
        self.setup_dialer_combobox()

        self.setup_browser_combobox()
        self.setup_mail_combobox()

        self.setup_usage_options()
Beispiel #2
0
    def setup_view(self):
        # first page of the notebook
        profile = config.current_profile.get('connection', 'dialer_profile')

        if profile == 'default':
            self['vbox2'].set_sensitive(False)
        else:
            self['custom_profile_checkbutton'].set_active(True)

        # third page of the notebook
        exit_without_confirmation = config.getboolean(
            'preferences', 'exit_without_confirmation')
        chkbt = self['exit_without_confirmation_checkbutton']
        chkbt.set_active(exit_without_confirmation)

        show_icon = config.getboolean('preferences', 'show_icon')
        self['show_icon_checkbutton'].set_active(show_icon)

        minimize_to_tray = config.getboolean('preferences', 'close_minimizes')
        self['close_window_checkbutton'].set_active(minimize_to_tray)
        self['close_window_checkbutton'].set_sensitive(show_icon)

        manage_keyring = config.getboolean('preferences', 'manage_keyring')
        self['gnomekeyring_checkbutton'].set_active(manage_keyring)

        #setup dialer_combobox
        self.setup_dialer_combobox()

        self.setup_browser_combobox()
        self.setup_mail_combobox()

        self.setup_usage_options()
    def on_preferences_cancel_button_clicked(self, widget):
        # restore to saved state
        show_icon = config.getboolean('preferences', 'show_icon')
        show_icon_chkbtn = self.view['show_icon_checkbutton']
        show_icon_chkbtn.set_active(show_icon)
        self.show_icon_cb(show_icon_chkbtn)

        self._hide_ourselves()
    def on_preferences_cancel_button_clicked(self, widget):
        # restore to saved state
        show_icon = config.getboolean('preferences', 'show_icon')
        show_icon_chkbtn = self.view['show_icon_checkbutton']
        show_icon_chkbtn.set_active(show_icon)
        self.show_icon_cb(show_icon_chkbtn)

        self._hide_ourselves()
 def setup_usage_options(self):
     #XXX: From Current Profile if any?
     max_traffic = config.getint('preferences', 'max_traffic')
     threshold = config.getint('preferences', 'traffic_threshold')
     usage_notification = \
                 config.getboolean('preferences', 'usage_notification')
     self['maximum_traffic_entry'].set_value(max_traffic)
     self['threshold_entry'].set_value(threshold)
     self['usage_notification_check'].set_active(usage_notification)
     self['threshold_entry'].set_sensitive(usage_notification)
Beispiel #6
0
 def setup_usage_options(self):
     #XXX: From Current Profile if any?
     max_traffic = config.getint('preferences', 'max_traffic')
     threshold = config.getint('preferences', 'traffic_threshold')
     usage_notification = \
                 config.getboolean('preferences', 'usage_notification')
     self['maximum_traffic_entry'].set_value(max_traffic)
     self['threshold_entry'].set_value(threshold)
     self['usage_notification_check'].set_active(usage_notification)
     self['threshold_entry'].set_sensitive(usage_notification)
Beispiel #7
0
    def notify_auth_ok(self):
        """Called when authentication was successful"""
        if not self.auth_was_ready:
            # we can only register a keyring if we authenticated beforehand
            from vmc.common.config import config
            manage_kring = config.getboolean('preferences', 'manage_keyring')
            if manage_kring and self.collaborator.keyring:
                register = self.collaborator.keyring.register
                d = register(self.device, self.collaborator.pin)
                d.addCallback(lambda _: self._notify_auth_ok())
                return

        # if auth was ready or there's no keyring then notify auth ok directly
        self._notify_auth_ok()
 def notify_auth_ok(self):
     """Called when authentication was successful"""
     if not self.auth_was_ready:
         # we can only register a keyring if we authenticated beforehand
         from vmc.common.config import config
         manage_kring = config.getboolean('preferences', 'manage_keyring')
         if manage_kring and self.collaborator.keyring:
             register = self.collaborator.keyring.register
             d = register(self.device, self.collaborator.pin)
             d.addCallback(lambda _: self._notify_auth_ok())
             return
     
     # if auth was ready or there's no keyring then notify auth ok directly
     self._notify_auth_ok()
Beispiel #9
0
 def setup_view(self):
     from vmc.common.config import config
     active = config.getboolean('preferences', 'manage_keyring')
     self['gnomekeyring_checkbutton'].set_active(active)
 def setup_view(self):
     from vmc.common.config import config
     active = config.getboolean('preferences', 'manage_keyring')
     self['gnomekeyring_checkbutton'].set_active(active)