This commit is contained in:
parent
8f069c0166
commit
9a7ed9488a
|
@ -77,7 +77,7 @@ class Events:
|
||||||
self._events[account][jid] = [event]
|
self._events[account][jid] = [event]
|
||||||
else:
|
else:
|
||||||
self._events[account][jid].append(event)
|
self._events[account][jid].append(event)
|
||||||
if event.show_in_systray:
|
if event.show_in_systray and gajim.interface.systray_capabilities:
|
||||||
gajim.interface.systray.set_img()
|
gajim.interface.systray.set_img()
|
||||||
|
|
||||||
def remove_events(self, account, jid, event = None, types = []):
|
def remove_events(self, account, jid, event = None, types = []):
|
||||||
|
@ -94,6 +94,7 @@ class Events:
|
||||||
del self._events[account][jid]
|
del self._events[account][jid]
|
||||||
else:
|
else:
|
||||||
self._events[account][jid].remove(event)
|
self._events[account][jid].remove(event)
|
||||||
|
if event.show_in_systray and gajim.interface.systray_capabilities:
|
||||||
gajim.interface.systray.set_img()
|
gajim.interface.systray.set_img()
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
@ -109,10 +110,12 @@ class Events:
|
||||||
self._events[account][jid] = new_list
|
self._events[account][jid] = new_list
|
||||||
else:
|
else:
|
||||||
del self._events[account][jid]
|
del self._events[account][jid]
|
||||||
|
if gajim.interface.systray_capabilities:
|
||||||
gajim.interface.systray.set_img()
|
gajim.interface.systray.set_img()
|
||||||
return
|
return
|
||||||
# no event nor type given, remove them all
|
# no event nor type given, remove them all
|
||||||
del self._events[account][jid]
|
del self._events[account][jid]
|
||||||
|
if gajim.interface.systray_capabilities:
|
||||||
gajim.interface.systray.set_img()
|
gajim.interface.systray.set_img()
|
||||||
|
|
||||||
def get_nb_events(self, types = []):
|
def get_nb_events(self, types = []):
|
||||||
|
|
Loading…
Reference in New Issue