Skip to content
Snippets Groups Projects
Commit ea229746 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Remote: Remove possibility to adjust settings via DBus

parent 90cf076a
No related branches found
No related tags found
No related merge requests found
......@@ -37,14 +37,6 @@ Shows a help on specific command
Prints a list of registered accounts
.Ss list_contacts Bq account
Prints a list of all contacts in the roster. Each contact appears on a separate line
.Ss prefs_del Aq key
Deletes a preference item
.Ss prefs_list
Lists all preferences and their values
.Ss prefs_put Aq key=value
Sets value of 'key' to 'value'.
.Ss prefs_store
Writes the current state of Gajim preferences to the .config file
.Ss remove_contact Ao jid Ac Bq account
Removes contact from roster
.Ss send_chat_message Ao jid Ac Ao message Ac Bo PGP key Bc Bq account
......
......@@ -164,28 +164,6 @@ def __init__(self):
'account'), False)
]
],
'prefs_list': [
_('Lists all preferences and their values'),
[]
],
'prefs_put': [
_('Sets value of \'key\' to \'value\'.'),
[
(_('key=value'), _('\'key\' is the name of the preference, '
'\'value\' is what to set it to'), True)
]
],
'prefs_del': [
_('Deletes a preference item'),
[
(_('key'), _('name of the preference to be deleted'), True)
]
],
'prefs_store': [
_('Writes the current state of Gajim preferences to the .config '
'file'),
[]
],
'remove_contact': [
_('Removes contact from contact list'),
[
......
......@@ -165,20 +165,6 @@ class GajimRemote(Server):
<arg name='message' type='s' />
<arg direction='out' type='b' />
</method>
<method name='prefs_del'>
<arg name='key' type='s' />
<arg direction='out' type='b' />
</method>
<method name='prefs_list'>
<arg direction='out' type='a{ss}' />
</method>
<method name='prefs_put'>
<arg name='key' type='s' />
<arg direction='out' type='b' />
</method>
<method name='prefs_store'>
<arg direction='out' type='b' />
</method>
<method name='remove_contact'>
<arg name='jid' type='s' />
<arg name='account' type='s' />
......@@ -739,53 +725,6 @@ def list_contacts(self, account):
result.append(item)
return result
def prefs_list(self):
prefs_dict = {}
def get_prefs(data, name, path, value):
if value is None:
return
key = ''
if path is not None:
for node in path:
key += node + '#'
key += name
prefs_dict[key] = str(value)
app.config.foreach(get_prefs)
return prefs_dict
def prefs_store(self):
try:
app.interface.save_config()
except Exception:
return False
return True
def prefs_del(self, key):
if not key:
return False
key_path = key.split('#', 2)
if len(key_path) != 3:
return False
if key_path[2] == '*':
app.config.del_per(key_path[0], key_path[1])
else:
app.config.del_per(key_path[0], key_path[1], key_path[2])
return True
def prefs_put(self, key):
if not key:
return False
key_path = key.split('#', 2)
if len(key_path) < 3:
subname, value = key.split('=', 1)
app.config.set(subname, value)
return True
subname, value = key_path[2].split('=', 1)
app.config.set_per(key_path[0], key_path[1], subname, value)
return True
def add_contact(self, jid, account):
if account:
if app.account_is_available(account):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment