Philipp Hörist pushed to branch master at gajim / gajim
Commits:
9c5d86d8 by lovetox at 2022-06-15T19:45:59+02:00
fix: Remove dead dbus signals/methods
These signals/methods would not work because the events/code does not exist
anymore
- - - - -
9a99f7fe by lovetox at 2022-06-15T19:49:12+02:00
refactor: Remove start_chat dbus method
This is available directly via `gajim --start-chat`
- - - - -
1 changed file:
- gajim/remote_control.py
Changes:
=====================================
gajim/remote_control.py
=====================================
@@ -204,19 +204,9 @@ class GajimRemote(Server):
<arg name='prio' type='s' />
<arg name='account' type='s' />
</method>
- <method name='show_roster' />
- <method name='start_chat'>
- <arg name='jid' type='s' />
- <arg direction='out' type='b' />
- </method>
- <method name='toggle_ipython' />
- <method name='toggle_roster_appearance' />
<signal name='AccountPresence'>
<arg type='av' />
</signal>
- <signal name='ChatState'>
- <arg type='av' />
- </signal>
<signal name='ContactAbsence'>
<arg type='av' />
</signal>
@@ -226,30 +216,15 @@ class GajimRemote(Server):
<signal name='ContactStatus'>
<arg type='av' />
</signal>
- <signal name='EntityTime'>
- <arg type='av' />
- </signal>
<signal name='GCMessage'>
<arg type='av' />
</signal>
- <signal name='GCPresence'>
- <arg type='av' />
- </signal>
<signal name='MessageSent'>
<arg type='av' />
</signal>
- <signal name='NewAccount'>
- <arg type='av' />
- </signal>
<signal name='NewMessage'>
<arg type='av' />
</signal>
- <signal name='Roster'>
- <arg type='av' />
- </signal>
- <signal name='RosterInfo'>
- <arg type='av' />
- </signal>
<signal name='Subscribe'>
<arg type='av' />
</signal>
@@ -259,9 +234,6 @@ class GajimRemote(Server):
<signal name='Unsubscribed'>
<arg type='av' />
</signal>
- <signal name='VcardInfo'>
- <arg type='av' />
- </signal>
</interface>
</node>
'''
@@ -273,10 +245,6 @@ def __init__(self):
super().__init__(self.con, '/org/gajim/dbus/RemoteObject')
self.first_show = True
- app.ged.register_event_handler('time-result-received', ged.POSTGUI,
- self.on_time)
- app.ged.register_event_handler('roster-info', ged.POSTGUI,
- self.on_roster_info)
app.ged.register_event_handler('presence-received', ged.POSTGUI,
self.on_presence_received)
app.ged.register_event_handler('subscribe-presence-received',
@@ -291,10 +259,6 @@ def __init__(self):
ged.POSTGUI, self._nec_decrypted_message_received)
app.ged.register_event_handler('our-show', ged.POSTGUI,
self.on_our_status)
- app.ged.register_event_handler('account-created', ged.POSTGUI,
- self.on_account_created)
- app.ged.register_event_handler('vcard-received', ged.POSTGUI,
- self.on_vcard_received)
app.ged.register_event_handler('message-sent', ged.POSTGUI,
self.on_message_sent)
@@ -306,15 +270,6 @@ def on_message_sent(self, obj):
self.raise_signal('MessageSent', (obj.account, [
obj.jid, obj.message, chatstate]))
- def on_time(self, obj):
- self.raise_signal('EntityTime', (obj.conn.name, [obj.jid.bare,
- obj.jid.resource,
- obj.time_info]))
-
- def on_roster_info(self, obj):
- self.raise_signal('RosterInfo', (obj.conn.name, [obj.jid, obj.nickname,
- obj.sub, obj.ask, obj.groups]))
-
def on_presence_received(self, obj):
if obj.old_show < 2 and obj.new_show > 1:
event = 'ContactPresence'
@@ -360,12 +315,6 @@ def _nec_decrypted_message_received(self, obj):
def on_our_status(self, event):
self.raise_signal('AccountPresence', (event.show, event.account))
- def on_account_created(self, obj):
- self.raise_signal('NewAccount', (obj.conn.name, obj.account_info))
-
- def on_vcard_received(self, obj):
- self.raise_signal('VcardInfo', (obj.account, obj.vcard_dict))
-
def raise_signal(self, event_name, data):
log.info('Send event %s', event_name)
self.con.emit_signal(None,
@@ -780,10 +729,6 @@ def _contacts_as_dbus_structure(self, bare_contact):
def get_unread_msgs_number(self):
return str(app.window.get_total_unread_count())
- def start_chat(self, jid=''):
- app.app.activate_action('start-chat', GLib.Variant('s', jid))
- return True
-
def send_xml(self, xml, account):
if account:
app.connections[account].send_stanza(str(xml))
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/a46a10952a3608b814dc71b788f66d9b3f461f4f...9a99f7fe2ac5f5ef6a2c5f9ea5940b2996cde773
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/a46a10952a3608b814dc71b788f66d9b3f461f4f...9a99f7fe2ac5f5ef6a2c5f9ea5940b2996cde773
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits