def __init__(self, account, parent): settings = [ Setting(SettingKind.ENTRY, _('Password'), SettingType.ACCOUNT_CONFIG, 'password', name='password', enabledif=('savepass', True)), Setting(SettingKind.SWITCH, _('Save Password'), SettingType.ACCOUNT_CONFIG, 'savepass', name='savepass'), Setting(SettingKind.CHANGEPASSWORD, _('Change Password'), SettingType.DIALOG, callback=self.on_password_change, props={'dialog': None}), ] SettingsDialog.__init__(self, parent, _('Login Settings'), Gtk.DialogFlags.MODAL, settings, account) self.connect('destroy', self.on_destroy)
def __init__(self, account): settings = [ Setting(SettingKind.DIALOG, _('Profile'), SettingType.DIALOG, props={'dialog': ZeroconfProfileDialog}), Setting(SettingKind.SWITCH, _('Connect on startup'), SettingType.ACCOUNT_CONFIG, 'autoconnect', desc=_('Use environment variable')), Setting(SettingKind.SWITCH, _('Save conversations for all contacts'), SettingType.ACCOUNT_CONFIG, 'no_log_for', desc=_('Store conversations on the harddrive')), Setting(SettingKind.SWITCH, _('Global Status'), SettingType.ACCOUNT_CONFIG, 'sync_with_global_status', desc=_('Synchronize the status of all accounts')), ] GenericSettingPage.__init__(self, account, settings)
def __init__(self, account): settings = [ Setting(SettingKind.SWITCH, _('Idle Time'), SettingType.ACCOUNT_CONFIG, 'send_idle_time', desc=_('Disclose the time of your last activity')), Setting(SettingKind.SWITCH, _('Local System Time'), SettingType.ACCOUNT_CONFIG, 'send_time_info', desc=_('Disclose the local system time of the ' 'device Gajim runs on')), Setting(SettingKind.SWITCH, _('Client / Operating System'), SettingType.ACCOUNT_CONFIG, 'send_os_info', desc=_('Disclose informations about the client ' 'and operating system you currently use')), Setting(SettingKind.SWITCH, _('Ignore Unknown Contacts'), SettingType.ACCOUNT_CONFIG, 'ignore_unknown_contacts', desc=_('Ignore everything from contacts not in your ' 'Roster')), ] GenericSettingPage.__init__(self, account, settings)
def __init__(self, account, parent): settings = [ Setting(SettingKind.FILECHOOSER, _('Client Certificate'), SettingType.ACCOUNT_CONFIG, 'client_cert', props={'filefilter': (_('PKCS12 Files'), '*.p12')}), Setting(SettingKind.SWITCH, _('Encrypted Certificate'), SettingType.ACCOUNT_CONFIG, 'client_cert_encrypted'), ] SettingsDialog.__init__(self, parent, _('Certificate Settings'), Gtk.DialogFlags.MODAL, settings, account)
def __init__(self, account, parent): settings = [ Setting(SettingKind.ENTRY, _('First Name'), SettingType.ACCOUNT_CONFIG, 'zeroconf_first_name'), Setting(SettingKind.ENTRY, _('Last Name'), SettingType.ACCOUNT_CONFIG, 'zeroconf_last_name'), Setting(SettingKind.ENTRY, _('XMPP Address'), SettingType.ACCOUNT_CONFIG, 'zeroconf_jabber_id'), Setting(SettingKind.ENTRY, _('Email'), SettingType.ACCOUNT_CONFIG, 'zeroconf_email'), ] SettingsDialog.__init__(self, parent, _('Profile'), Gtk.DialogFlags.MODAL, settings, account)
def __init__(self, account): settings = [ Setting(SettingKind.SWITCH, 'HTTP_PROXY', SettingType.ACCOUNT_CONFIG, 'use_env_http_proxy', desc=_('Use environment variable')), Setting(SettingKind.PROXY, _('Proxy'), SettingType.ACCOUNT_CONFIG, 'proxy', name='proxy'), Setting(SettingKind.SWITCH, _('Warn on insecure connection'), SettingType.ACCOUNT_CONFIG, 'warn_when_insecure_ssl_connection'), Setting(SettingKind.SWITCH, _('Send keep-alive packets'), SettingType.ACCOUNT_CONFIG, 'keep_alives_enabled'), Setting(SettingKind.HOSTNAME, _('Hostname'), SettingType.DIALOG, desc=_('Manually set the hostname for the server'), props={'dialog': CutstomHostnameDialog}), Setting(SettingKind.ENTRY, _('Resource'), SettingType.ACCOUNT_CONFIG, 'resource'), Setting(SettingKind.PRIORITY, _('Priority'), SettingType.DIALOG, props={'dialog': PriorityDialog}), ] GenericSettingPage.__init__(self, account, settings)
def __init__(self, plugin, parent): icon_position = [('0', _('Before Avatar')), ('1', _('After Status Icon'))] self.plugin = plugin settings = [ Setting(SettingKind.SWITCH, _('Show Icons in Contact List'), SettingType.VALUE, self.plugin.config['show_in_roster'], callback=self._on_setting, data='show_in_roster'), Setting(SettingKind.SWITCH, _('Show Icons in Tooltip'), SettingType.VALUE, self.plugin.config['show_in_tooltip'], callback=self._on_setting, data='show_in_tooltip'), Setting(SettingKind.SWITCH, _('Show Icon for Unknown Clients'), SettingType.VALUE, self.plugin.config['show_unknown_icon'], callback=self._on_setting, data='show_unknown_icon'), Setting(SettingKind.SWITCH, _('Show Icon for Transports'), SettingType.VALUE, self.plugin.config['show_facebook'], desc=_('Icons for facebook.com and vk.com'), callback=self._on_setting, data='show_facebook'), Setting(SettingKind.COMBO, _('Icon Position'), SettingType.VALUE, self.plugin.config['pos_in_list'], callback=self._on_setting, data='pos_in_list', props={'combo_items': icon_position}), ] SettingsDialog.__init__(self, parent, _('Clients Icons Configuration'), Gtk.DialogFlags.MODAL, settings, None)
def _on_filter_options(self, *args): if self.filter_dialog: self.filter_dialog.present() return combo_accounts = self._get_accounts() combo_accounts.insert(0, (None, _('All Accounts'))) settings = [ Setting(SettingKind.COMBO, _('Account'), SettingType.VALUE, self.selected_account, callback=self._set_account, props={'combo_items': combo_accounts}), Setting(SettingKind.SWITCH, 'Presence', SettingType.VALUE, self.presence, callback=self._on_setting, data='presence'), Setting(SettingKind.SWITCH, 'Message', SettingType.VALUE, self.message, callback=self._on_setting, data='message'), Setting(SettingKind.SWITCH, 'IQ', SettingType.VALUE, self.iq, callback=self._on_setting, data='iq'), Setting(SettingKind.SWITCH, 'Stream Management', SettingType.VALUE, self.stream, callback=self._on_setting, data='stream'), Setting(SettingKind.SWITCH, 'In', SettingType.VALUE, self.incoming, callback=self._on_setting, data='incoming'), Setting(SettingKind.SWITCH, 'Out', SettingType.VALUE, self.outgoing, callback=self._on_setting, data='outgoing'), ] self.filter_dialog = SettingsDialog( self, _('Filter'), Gtk.DialogFlags.DESTROY_WITH_PARENT, settings, self.selected_account) self.filter_dialog.connect('destroy', self._on_filter_destroyed)
def _on_filter_options(self, *args): if self.filter_dialog: self.filter_dialog.present() return options = [ Setting(SettingKind.SWITCH, 'Presence', SettingType.VALUE, self.presence, callback=self._on_option, data='presence'), Setting(SettingKind.SWITCH, 'Message', SettingType.VALUE, self.message, callback=self._on_option, data='message'), Setting(SettingKind.SWITCH, 'IQ', SettingType.VALUE, self.iq, callback=self._on_option, data='iq'), Setting(SettingKind.SWITCH, 'Stream Management', SettingType.VALUE, self.stream, callback=self._on_option, data='stream'), Setting(SettingKind.SWITCH, 'In', SettingType.VALUE, self.incoming, callback=self._on_option, data='incoming'), Setting(SettingKind.SWITCH, 'Out', SettingType.VALUE, self.outgoing, callback=self._on_option, data='outgoing'), ] self.filter_dialog = SettingsDialog(self, 'Filter', Gtk.DialogFlags.DESTROY_WITH_PARENT, options, self.account) self.filter_dialog.connect('destroy', self._on_filter_destroyed)
def __init__(self, account, parent): settings = [ Setting(SettingKind.SWITCH, _('Enable'), SettingType.ACCOUNT_CONFIG, 'use_custom_host', name='custom'), Setting(SettingKind.ENTRY, _('Hostname'), SettingType.ACCOUNT_CONFIG, 'custom_host', enabledif=('custom', True)), Setting(SettingKind.ENTRY, _('Port'), SettingType.ACCOUNT_CONFIG, 'custom_port', enabledif=('custom', True)), ] SettingsDialog.__init__(self, parent, _('Connection Settings'), Gtk.DialogFlags.MODAL, settings, account)
def __init__(self, account, parent): neg_priority = app.config.get('enable_negative_priority') if neg_priority: range_ = (-128, 127) else: range_ = (0, 127) settings = [ Setting(SettingKind.SWITCH, _('Adjust to status'), SettingType.ACCOUNT_CONFIG, 'adjust_priority_with_status', 'adjust'), Setting(SettingKind.SPIN, _('Priority'), SettingType.ACCOUNT_CONFIG, 'priority', enabledif=('adjust', False), props={'range_': range_}), ] SettingsDialog.__init__(self, parent, _('Priority'), Gtk.DialogFlags.MODAL, settings, account) self.connect('destroy', self.on_destroy)
def __init__(self, account): settings = [ Setting(SettingKind.ENTRY, _('Label'), SettingType.ACCOUNT_CONFIG, 'account_label', callback=self._on_account_name_change), Setting(SettingKind.LOGIN, _('Login'), SettingType.DIALOG, props={'dialog': LoginDialog}), Setting(SettingKind.ACTION, _('Import Contacts'), SettingType.ACTION, '-import-contacts', props={'account': account}), Setting(SettingKind.DIALOG, _('Client Certificate'), SettingType.DIALOG, props={'dialog': CertificateDialog}), Setting(SettingKind.SWITCH, _('Connect on startup'), SettingType.ACCOUNT_CONFIG, 'autoconnect'), Setting(SettingKind.SWITCH, _('Save conversations for all contacts'), SettingType.ACCOUNT_CONFIG, 'no_log_for', desc=_('Store conversations on the harddrive')), Setting(SettingKind.SWITCH, _('Global Status'), SettingType.ACCOUNT_CONFIG, 'sync_with_global_status', desc=_('Synchronise the status of all accounts')), Setting(SettingKind.SWITCH, _('Use file transfer proxies'), SettingType.ACCOUNT_CONFIG, 'use_ft_proxies'), ] GenericSettingPage.__init__(self, account, settings)
def __init__(self, plugin, parent): self.plugin = plugin settings = [ Setting('BoardSizeSpinSetting', _('Board Size'), SettingType.VALUE, self.plugin.config['board_size'], callback=self.on_setting, data='board_size', desc=_('Size of the board'), props={'range_': (3, 10)}) ] SettingsDialog.__init__(self, parent, _('TicTacToe Configuration'), Gtk.DialogFlags.MODAL, settings, None, extend=[('BoardSizeSpinSetting', SizeSpinSetting)])
def __init__(self, plugin, parent): self.plugin = plugin qualities = [ ('best', _('Best')), ('1080p', '1080p'), ('720p', '720p'), ('480p', '480p'), ('240p', '240p'), ('144p', '144p'), ] settings = [ Setting( SettingKind.SWITCH, _('Enable database'), SettingType.VALUE, self.plugin.config['DB_ENABLED'], callback=self._on_setting, data='DB_ENABLED', ), Setting( 'DirectoryChooserSetting', _('Video directory'), SettingType.VALUE, self.plugin.config['VIDEO_DIR'], callback=self._on_setting, data='VIDEO_DIR', desc=_('Directory for local video search') ), Setting( SettingKind.COMBO, _('Preferred maximum stream quality'), SettingType.VALUE, self.plugin.config['preferred_maximum_stream_quality'], callback=self._on_setting, data='preferred_maximum_stream_quality', desc=_('Preferred maximum quality for internet videos'), props={'combo_items': qualities}, ), Setting('AlphaColorSetting', _('User message foreground color'), SettingType.VALUE, self.plugin.config['USER_FG_COLOR'], callback=self._on_setting, data='USER_FG_COLOR', desc=_('Foreground color for your messages'), ), Setting('AlphaColorSetting', _('User message background color'), SettingType.VALUE, self.plugin.config['USER_BG_COLOR'], callback=self._on_setting, data='USER_BG_COLOR', desc=_('Background color for your messages'), ), Setting('AlphaColorSetting', _('Partner message foreground color'), SettingType.VALUE, self.plugin.config['PARTNER_FG_COLOR'], callback=self._on_setting, data='PARTNER_FG_COLOR', desc=_('Foreground color for your partner\'s messages'), ), Setting('AlphaColorSetting', _('Partner message background color'), SettingType.VALUE, self.plugin.config['PARTNER_BG_COLOR'], callback=self._on_setting, data='PARTNER_BG_COLOR', desc=_('Background color for your partner\'s messages'), ), ] for p in color_properties: settings.append(Setting( 'AlphaColorSetting', color_properties[p][1], SettingType.VALUE, self.plugin.config[p], callback=self._on_setting, data=p, desc=color_properties[p][2] )) extensions = [ ('DirectoryChooserSetting', DirectoryChooserSetting), ('AlphaColorSetting', AlphaColorSetting), ] SettingsDialog.__init__(self, parent, _('Moov Configuration'), Gtk.DialogFlags.MODAL, settings, None, extend=extensions)
def __init__(self, plugin, parent): sizes = [('262144', '256 KiB'), ('524288', '512 KiB'), ('1048576', '1 MiB'), ('5242880', '5 MiB'), ('10485760', '10 MiB')] actions = [('open_menuitem', _('Open')), ('save_as_menuitem', _('Save as')), ('open_folder_menuitem', _('Open Folder')), ('copy_link_location_menuitem', _('Copy Link Location')), ('open_link_in_browser_menuitem', _('Open Link in Browser')) ] geo_providers = [('no_preview', _('No map preview')), ('Google', _('Google Maps')), ('OSM', _('OpenStreetMap'))] self.plugin = plugin settings = [ Setting('PreviewSizeSpinSetting', _('Preview Size'), SettingType.VALUE, self.plugin.config['PREVIEW_SIZE'], callback=self.on_setting, data='PREVIEW_SIZE', desc=_('Size of preview image'), props={'range_': (100, 1000)}), Setting(SettingKind.COMBO, _('File Size'), SettingType.VALUE, self.plugin.config['MAX_FILE_SIZE'], callback=self.on_setting, data='MAX_FILE_SIZE', desc=_('Maximum file size for preview generation'), props={'combo_items': sizes}), Setting(SettingKind.SWITCH, _('Preview all Image URLs'), SettingType.VALUE, self.plugin.config['ALLOW_ALL_IMAGES'], callback=self.on_setting, data='ALLOW_ALL_IMAGES', desc=_('Generate preview for any URL containing images ' '(may be unsafe)')), Setting(SettingKind.COMBO, _('Left Click'), SettingType.VALUE, self.plugin.config['LEFTCLICK_ACTION'], callback=self.on_setting, data='LEFTCLICK_ACTION', desc=_('Action when left clicking a preview'), props={'combo_items': actions}), Setting(SettingKind.COMBO, _('Map Service'), SettingType.VALUE, self.plugin.config['GEO_PREVIEW_PROVIDER'], callback=self.on_setting, data='GEO_PREVIEW_PROVIDER', desc=_('Service used for map previews'), props={'combo_items': geo_providers}), Setting(SettingKind.SWITCH, _('HTTPS Verification'), SettingType.VALUE, self.plugin.config['VERIFY'], desc=_('Whether to check for a valid certificate'), callback=self.on_setting, data='VERIFY'), ] SettingsDialog.__init__(self, parent, _('UrlImagePreview Configuration'), Gtk.DialogFlags.MODAL, settings, None, extend=[('PreviewSizeSpinSetting', SizeSpinSetting)])