Reset pending messages count in message_win even in more than one tab stay, delete
banners redraw when control whith same nick is present, it's related to accounts now.
This commit is contained in:
parent
587a4d4e73
commit
20dc155f65
1 changed files with 9 additions and 15 deletions
|
@ -310,28 +310,22 @@ class MessageWindow:
|
||||||
if len(self._controls[ctrl.account]) == 0:
|
if len(self._controls[ctrl.account]) == 0:
|
||||||
del self._controls[ctrl.account]
|
del self._controls[ctrl.account]
|
||||||
|
|
||||||
# Notify a dupicate nick to update their banner and clear account display
|
if self.get_num_controls() == 0:
|
||||||
for c in self.controls():
|
|
||||||
if c == self:
|
|
||||||
continue
|
|
||||||
if ctrl.contact.get_shown_name() == c.contact.get_shown_name():
|
|
||||||
c.draw_banner()
|
|
||||||
|
|
||||||
if self.get_num_controls() == 1: # we are going from two tabs to one
|
|
||||||
show_tabs_if_one_tab = gajim.config.get('tabs_always_visible')
|
|
||||||
self.notebook.set_show_tabs(show_tabs_if_one_tab)
|
|
||||||
if not show_tabs_if_one_tab:
|
|
||||||
self.alignment.set_property('top-padding', 0)
|
|
||||||
self.show_title()
|
|
||||||
elif self.get_num_controls() == 0:
|
|
||||||
# These are not called when the window is destroyed like this, fake it
|
# These are not called when the window is destroyed like this, fake it
|
||||||
gajim.interface.msg_win_mgr._on_window_delete(self.window, None)
|
gajim.interface.msg_win_mgr._on_window_delete(self.window, None)
|
||||||
gajim.interface.msg_win_mgr._on_window_destroy(self.window)
|
gajim.interface.msg_win_mgr._on_window_destroy(self.window)
|
||||||
# dnd clean up
|
# dnd clean up
|
||||||
self.notebook.disconnect(self.hid)
|
self.notebook.disconnect(self.hid)
|
||||||
self.notebook.drag_dest_unset()
|
self.notebook.drag_dest_unset()
|
||||||
|
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
return # don't show_title, we are dead
|
||||||
|
elif self.get_num_controls() == 1: # we are going from two tabs to one
|
||||||
|
show_tabs_if_one_tab = gajim.config.get('tabs_always_visible')
|
||||||
|
self.notebook.set_show_tabs(show_tabs_if_one_tab)
|
||||||
|
if not show_tabs_if_one_tab:
|
||||||
|
self.alignment.set_property('top-padding', 0)
|
||||||
|
self.show_title()
|
||||||
|
|
||||||
|
|
||||||
def redraw_tab(self, ctrl, chatstate = None):
|
def redraw_tab(self, ctrl, chatstate = None):
|
||||||
hbox = self.notebook.get_tab_label(ctrl.widget).get_children()[0]
|
hbox = self.notebook.get_tab_label(ctrl.widget).get_children()[0]
|
||||||
|
|
Loading…
Add table
Reference in a new issue