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:
authorPhilipp Hörist <philipp@hoerist.com>2019-08-17 23:02:09 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-08-17 23:02:09 +0300
commit573af5cdeb817577e862a479931275aef053b367 (patch)
tree0e2898820da1164cec1231bbefd0b4a1c5f300bb
parent1a5395cf6f71269af9c22436a67965e2ffe970ac (diff)
Remove obsolete code
-rw-r--r--gajim/common/contacts.py11
-rw-r--r--gajim/common/events.py5
-rw-r--r--gajim/message_window.py15
-rw-r--r--test/no_gui/unit/test_contacts.py1
4 files changed, 0 insertions, 32 deletions
diff --git a/gajim/common/contacts.py b/gajim/common/contacts.py
index 4651e532b..50be2aa61 100644
--- a/gajim/common/contacts.py
+++ b/gajim/common/contacts.py
@@ -301,13 +301,6 @@ class LegacyContactsAPI:
self._metacontact_manager = MetacontactManager(self)
self._accounts = {}
- def change_account_name(self, old_name, new_name):
- self._accounts[new_name] = self._accounts[old_name]
- self._accounts[new_name].name = new_name
- del self._accounts[old_name]
-
- self._metacontact_manager.change_account_name(old_name, new_name)
-
def add_account(self, account_name):
self._accounts[account_name] = Account(account_name, Contacts(),
GC_Contacts())
@@ -779,10 +772,6 @@ class MetacontactManager():
self._metacontacts_tags = {}
self._contacts = contacts
- def change_account_name(self, old_name, new_name):
- self._metacontacts_tags[new_name] = self._metacontacts_tags[old_name]
- del self._metacontacts_tags[old_name]
-
def add_account(self, account):
if account not in self._metacontacts_tags:
self._metacontacts_tags[account] = {}
diff --git a/gajim/common/events.py b/gajim/common/events.py
index ae885f15f..801500db0 100644
--- a/gajim/common/events.py
+++ b/gajim/common/events.py
@@ -215,11 +215,6 @@ class Events:
for listener in self._event_removed_listeners:
listener(event_list)
- def change_account_name(self, old_name, new_name):
- if old_name in self._events:
- self._events[new_name] = self._events[old_name]
- del self._events[old_name]
-
def add_account(self, account):
self._events[account] = {}
diff --git a/gajim/message_window.py b/gajim/message_window.py
index 3e8ece282..63a92fec3 100644
--- a/gajim/message_window.py
+++ b/gajim/message_window.py
@@ -269,17 +269,6 @@ class MessageWindow:
self.notebook.set_current_page(number - 1)
return
- def change_account_name(self, old_name, new_name):
- if old_name in self._controls:
- self._controls[new_name] = self._controls[old_name]
- del self._controls[old_name]
-
- for ctrl in self.controls():
- if ctrl.account == old_name:
- ctrl.account = new_name
- if self.account == old_name:
- self.account = new_name
-
def change_jid(self, account, old_jid, new_jid):
"""
Called when the full jid of the control is changed
@@ -905,10 +894,6 @@ class MessageWindowMgr(GObject.GObject):
Gtk.Window.set_default_icon_list(get_app_icon_list(parent_window))
- def change_account_name(self, old_name, new_name):
- for win in self.windows():
- win.change_account_name(old_name, new_name)
-
def _new_window(self, acct, type_):
parent_win = None
parent_paned = None
diff --git a/test/no_gui/unit/test_contacts.py b/test/no_gui/unit/test_contacts.py
index 3cfaa2639..e85a43bea 100644
--- a/test/no_gui/unit/test_contacts.py
+++ b/test/no_gui/unit/test_contacts.py
@@ -99,7 +99,6 @@ class TestContacts(unittest.TestCase):
self.contacts.add_account("one")
self.contacts.add_account("two")
- self.contacts.change_account_name("two", "old")
self.contacts.remove_account("one")
self.assertEqual(["old"], self.contacts.get_accounts())