parent
5db9144303
commit
5bfbbb2c24
4 changed files with 26 additions and 6 deletions
|
@ -147,6 +147,11 @@ information_buffer_popup_on = error roster warning help info
|
|||
# one line, the popup will stay visible two second per additional lines
|
||||
popup_time = 4
|
||||
|
||||
# Whether to hide the list of user in the MultiUserChat tabs or not. Useful
|
||||
# for example if you want to copy/paste the content of the buffer, or if you
|
||||
# want to gain space
|
||||
hide_user_list = false
|
||||
|
||||
# A list of words (or sentences) separated by colons (":"). All the
|
||||
# informational messages (described above) containing at least one of those
|
||||
# values will not be shown.
|
||||
|
|
|
@ -196,6 +196,12 @@ section of this documentation.
|
|||
If the message takes more than one line, the popup will stay visible
|
||||
two more second per additional lines
|
||||
|
||||
*hide_user_list*:: false
|
||||
|
||||
Whether to hide the list of user in the MultiUserChat tabs or not. Useful
|
||||
for example if you want to copy/paste the content of the buffer, or if you
|
||||
want to gain space
|
||||
|
||||
*filter_info_messages*:: [empty]
|
||||
|
||||
A list of words or sentences separated by colons (":"). All the
|
||||
|
|
19
src/tabs.py
19
src/tabs.py
|
@ -1157,12 +1157,15 @@ class MucTab(ChatTab):
|
|||
if not self.visible:
|
||||
return
|
||||
self.need_resize = False
|
||||
text_width = (self.width//10)*9
|
||||
if config.get("hide_user_list", "false") == "true":
|
||||
text_width = self.width
|
||||
else:
|
||||
text_width = (self.width//10)*9
|
||||
self.user_win.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), self.width-(self.width//10)*9-1, 1, (self.width//10)*9+1)
|
||||
self.topic_win.resize(1, self.width, 0, 0)
|
||||
self.v_separator.resize(self.height-2 - Tab.tab_win_height(), 1, 1, 9*(self.width//10))
|
||||
self.text_win.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), text_width, 1, 0)
|
||||
self.text_win.rebuild_everything(self._text_buffer)
|
||||
self.user_win.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), self.width-text_width-1, 1, text_width+1)
|
||||
self.info_header.resize(1, self.width, self.height-2-self.core.information_win_size - Tab.tab_win_height(), 0)
|
||||
self.input.resize(1, self.width, self.height-1, 0)
|
||||
|
||||
|
@ -1172,8 +1175,9 @@ class MucTab(ChatTab):
|
|||
log.debug(' TAB Refresh: %s',self.__class__.__name__)
|
||||
self.topic_win.refresh(self.get_single_line_topic())
|
||||
self.text_win.refresh()
|
||||
self.v_separator.refresh()
|
||||
self.user_win.refresh(self.users)
|
||||
if config.get("hide_user_list", "false") == "false":
|
||||
self.v_separator.refresh()
|
||||
self.user_win.refresh(self.users)
|
||||
self.info_header.refresh(self, self.text_win)
|
||||
self.refresh_tab_win()
|
||||
self.info_win.refresh()
|
||||
|
@ -1248,10 +1252,13 @@ class MucTab(ChatTab):
|
|||
def on_info_win_size_changed(self):
|
||||
if self.core.information_win_size >= self.height-3:
|
||||
return
|
||||
text_width = (self.width//10)*9
|
||||
if config.get("hide_user_list", "false") == "true":
|
||||
text_width = self.width
|
||||
else:
|
||||
text_width = (self.width//10)*9
|
||||
self.user_win.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), self.width-(self.width//10)*9-1, 1, (self.width//10)*9+1)
|
||||
self.text_win.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), text_width, 1, 0)
|
||||
self.info_header.resize(1, self.width, self.height-2-self.core.information_win_size - Tab.tab_win_height(), 0)
|
||||
self.user_win.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), self.width-text_width-1, 1, text_width+1)
|
||||
|
||||
def handle_presence(self, presence):
|
||||
from_nick = presence['from'].resource
|
||||
|
|
|
@ -227,6 +227,8 @@ class UserList(Win):
|
|||
|
||||
def refresh(self, users):
|
||||
log.debug('Refresh: %s',self.__class__.__name__)
|
||||
if config.get("hide_user_list", "false") == "true":
|
||||
return # do not refresh if this win is hidden.
|
||||
with g_lock:
|
||||
self._win.erase()
|
||||
if config.get('user_list_sort', 'desc').lower() == 'asc':
|
||||
|
|
Loading…
Reference in a new issue