Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-07-31 18:11:18 +0300
committerlovetox <philipp@hoerist.com>2020-07-31 18:12:33 +0300
commitea229746f58897b478bf642994876f2b11fbe034 (patch)
tree63a3ffd42c1c4df2904a37e4f56d70e88c1da868
parent90cf076abc860cf22a78e5a59f2d75ed7dd5a8a5 (diff)
Remote: Remove possibility to adjust settings via DBus
-rw-r--r--data/gajim-remote.18
-rw-r--r--gajim/gajim_remote.py22
-rw-r--r--gajim/remote_control.py61
3 files changed, 0 insertions, 91 deletions
diff --git a/data/gajim-remote.1 b/data/gajim-remote.1
index 4be942944..53483dd24 100644
--- a/data/gajim-remote.1
+++ b/data/gajim-remote.1
@@ -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
diff --git a/gajim/gajim_remote.py b/gajim/gajim_remote.py
index ad6346c5c..125fd5ac6 100644
--- a/gajim/gajim_remote.py
+++ b/gajim/gajim_remote.py
@@ -164,28 +164,6 @@ class GajimRemote:
'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'),
[
diff --git a/gajim/remote_control.py b/gajim/remote_control.py
index f8204e22b..c17e9445e 100644
--- a/gajim/remote_control.py
+++ b/gajim/remote_control.py
@@ -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 @@ class GajimRemote(Server):
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):