[dimorph] get_unread_msgs_number function in gajim-remote
This commit is contained in:
parent
f4e95cdc8d
commit
2890da56dd
|
@ -210,6 +210,11 @@ class GajimRemote:
|
||||||
(_('account'), _(''), False)
|
(_('account'), _(''), False)
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'get_unread_msgs_number': [
|
||||||
|
_('Returns number of unreaded messages'),
|
||||||
|
[ ]
|
||||||
|
],
|
||||||
}
|
}
|
||||||
if self.argv_len < 2 or \
|
if self.argv_len < 2 or \
|
||||||
sys.argv[1] not in self.commands.keys(): # no args or bad args
|
sys.argv[1] not in self.commands.keys(): # no args or bad args
|
||||||
|
|
|
@ -548,6 +548,9 @@ class SignalObject(DbusPrototype):
|
||||||
contact_dict['resources'] = DBUS_VARIANT(contact_dict['resources'])
|
contact_dict['resources'] = DBUS_VARIANT(contact_dict['resources'])
|
||||||
return contact_dict
|
return contact_dict
|
||||||
|
|
||||||
|
def get_unread_msgs_number(self, *args):
|
||||||
|
return str(gajim.interface.roster.nb_unread)
|
||||||
|
|
||||||
if dbus_support.version[1] >= 30 and dbus_support.version[1] <= 40:
|
if dbus_support.version[1] >= 30 and dbus_support.version[1] <= 40:
|
||||||
method = dbus.method
|
method = dbus.method
|
||||||
signal = dbus.signal
|
signal = dbus.signal
|
||||||
|
@ -576,3 +579,4 @@ class SignalObject(DbusPrototype):
|
||||||
get_status = method(INTERFACE)(get_status)
|
get_status = method(INTERFACE)(get_status)
|
||||||
get_status_message = method(INTERFACE)(get_status_message)
|
get_status_message = method(INTERFACE)(get_status_message)
|
||||||
account_info = method(INTERFACE)(account_info)
|
account_info = method(INTERFACE)(account_info)
|
||||||
|
get_unread_msgs_number = method(INTERFACE)(get_unread_msgs_number)
|
||||||
|
|
Loading…
Reference in New Issue