added received indicator
a * will appear by the name that received the message if the name is unknown then the * will appear by 'other' this currently only works for XMMP/Jabber acounts the sender has the part before the / extracted thus user@example.com/testing becomes user@example.com then this sender is checked againt the list of all accounts for the user
This commit is contained in:
parent
2af30f8659
commit
8d879ad4a5
@ -36,13 +36,12 @@ class Application(wmoo.Application):
|
|||||||
self._count = 0
|
self._count = 0
|
||||||
self._flasher = 0
|
self._flasher = 0
|
||||||
self.backlit = 0
|
self.backlit = 0
|
||||||
self.lines = [ # name, messages received
|
self.lines = [ # name, messages received, accounts
|
||||||
[" CATHY", 0],
|
[" CATHY", 0, ['cathy@example.com']],
|
||||||
[" FRANK", 0],
|
[" FRANK", 0, ['frank@example.com']],
|
||||||
[" TIM", 0],
|
[" TIM", 0, ['tim@example.com']],
|
||||||
[" LEE", 0],
|
[" LEE", 0, ['lee@example.com']],
|
||||||
[" TANDA", 0],
|
[" OTHER", 0, ['']],
|
||||||
[" OTHER", 0],
|
|
||||||
]
|
]
|
||||||
# Initialize D-Bus and connect to Pidgin's ReceivedIMMsg signal
|
# Initialize D-Bus and connect to Pidgin's ReceivedIMMsg signal
|
||||||
self.register_dbus()
|
self.register_dbus()
|
||||||
@ -98,6 +97,13 @@ class Application(wmoo.Application):
|
|||||||
conversation (str): The conversation identifier.
|
conversation (str): The conversation identifier.
|
||||||
flags (int): Message flags.
|
flags (int): Message flags.
|
||||||
"""
|
"""
|
||||||
|
# find who the message is for or return OTHER
|
||||||
|
self.lines[-1][0] = '* OTHER'
|
||||||
|
for line in self.lines[:-1]:
|
||||||
|
if sender.split('/')[0] in line[2]:
|
||||||
|
line[0] = '*' + line[0][1:]
|
||||||
|
self.lines[-1][0] = ' OTHER'
|
||||||
|
|
||||||
ic("")
|
ic("")
|
||||||
ic(f"sender: {sender}")
|
ic(f"sender: {sender}")
|
||||||
ic(f"message: {message}")
|
ic(f"message: {message}")
|
||||||
@ -211,7 +217,12 @@ class Application(wmoo.Application):
|
|||||||
"""
|
"""
|
||||||
Turn of backlite and zero out messages
|
Turn of backlite and zero out messages
|
||||||
"""
|
"""
|
||||||
|
# clear out text
|
||||||
|
for line in self.lines:
|
||||||
|
line[0] = ' ' + line[0][1:]
|
||||||
|
|
||||||
self.backlite_off()
|
self.backlite_off()
|
||||||
|
self.update()
|
||||||
|
|
||||||
def handle_buttonrelease(self, event):
|
def handle_buttonrelease(self, event):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user