Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
178
Issues
178
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
b46f0f5e
Commit
b46f0f5e
authored
May 03, 2014
by
mathieui
3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #2072 (only resize a tab if the size changed since the last display)
parent
ea935ded
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
17 additions
and
12 deletions
+17
-12
src/core/core.py
src/core/core.py
+1
-3
src/tabs/basetabs.py
src/tabs/basetabs.py
+8
-1
src/tabs/conversationtab.py
src/tabs/conversationtab.py
+1
-1
src/tabs/data_forms.py
src/tabs/data_forms.py
+1
-1
src/tabs/muclisttab.py
src/tabs/muclisttab.py
+1
-1
src/tabs/muctab.py
src/tabs/muctab.py
+2
-1
src/tabs/privatetab.py
src/tabs/privatetab.py
+1
-2
src/tabs/rostertab.py
src/tabs/rostertab.py
+1
-1
src/tabs/xmltab.py
src/tabs/xmltab.py
+1
-1
No files found.
src/core/core.py
View file @
b46f0f5e
...
...
@@ -1582,9 +1582,7 @@ class Core(object):
self
.
resize_global_information_win
()
with
g_lock
:
for
tab
in
self
.
tabs
:
if
config
.
get
(
'lazy_resize'
,
True
):
tab
.
need_resize
=
True
else
:
if
not
config
.
get
(
'lazy_resize'
,
True
):
tab
.
resize
()
if
self
.
tabs
:
self
.
full_screen_redraw
()
...
...
src/tabs/basetabs.py
View file @
b46f0f5e
...
...
@@ -95,10 +95,10 @@ class Tab(object):
self
.
_state
=
'normal'
self
.
_prev_state
=
None
self
.
need_resize
=
False
self
.
key_func
=
{}
# each tab should add their keys in there
# and use them in on_input
self
.
commands
=
{}
# and their own commands
self
.
_saved_size
=
(
-
1
,
-
1
)
@
property
...
...
@@ -184,6 +184,13 @@ class Tab(object):
elif
not
self
.
_prev_state
:
self
.
_state
=
'normal'
def
push_size
(
self
):
self
.
_saved_size
=
(
self
.
height
,
self
.
width
)
@
property
def
need_resize
(
self
):
return
self
.
_saved_size
!=
(
self
.
height
,
self
.
width
)
@
staticmethod
def
resize
(
scr
):
with
g_lock
:
...
...
src/tabs/conversationtab.py
View file @
b46f0f5e
...
...
@@ -260,7 +260,6 @@ class ConversationTab(ChatTab):
callback
=
callback
)
def
resize
(
self
):
self
.
need_resize
=
False
if
self
.
size
.
tab_degrade_y
:
display_bar
=
False
info_win_height
=
0
...
...
@@ -283,6 +282,7 @@ class ConversationTab(ChatTab):
-
tab_win_height
,
0
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
push_size
()
def
refresh
(
self
):
if
self
.
need_resize
:
...
...
src/tabs/data_forms.py
View file @
b46f0f5e
...
...
@@ -64,7 +64,6 @@ class DataFormsTab(Tab):
self
.
form_win
.
on_input
(
key
)
def
resize
(
self
):
self
.
need_resize
=
False
self
.
topic_win
.
resize
(
1
,
self
.
width
,
0
,
0
)
self
.
form_win
.
resize
(
self
.
height
-
3
-
Tab
.
tab_win_height
(),
self
.
width
,
1
,
0
)
...
...
@@ -72,6 +71,7 @@ class DataFormsTab(Tab):
self
.
help_win_dyn
.
resize
(
1
,
self
.
width
,
self
.
height
-
2
-
Tab
.
tab_win_height
(),
0
)
self
.
lines
=
[]
self
.
push_size
()
def
refresh
(
self
):
if
self
.
need_resize
:
...
...
src/tabs/muclisttab.py
View file @
b46f0f5e
...
...
@@ -77,7 +77,6 @@ class MucListTab(Tab):
self
.
input
.
refresh
()
def
resize
(
self
):
self
.
need_resize
=
False
if
self
.
size
.
tab_degrade_y
:
info_win_height
=
0
tab_win_height
=
0
...
...
@@ -99,6 +98,7 @@ class MucListTab(Tab):
self
.
listview
.
resize
(
self
.
height
-
3
-
info_win_height
-
tab_win_height
,
self
.
width
,
1
,
0
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
push_size
()
def
on_slash
(
self
):
"""
...
...
src/tabs/muctab.py
View file @
b46f0f5e
...
...
@@ -796,7 +796,7 @@ class MucTab(ChatTab):
"""
Resize the whole window. i.e. all its sub-windows
"""
self
.
need_resize
=
False
log
.
debug
(
'RESIZE PLS'
)
if
config
.
get
(
"hide_user_list"
,
False
)
or
self
.
size
.
tab_degrade_x
:
display_user_list
=
False
text_width
=
self
.
width
...
...
@@ -833,6 +833,7 @@ class MucTab(ChatTab):
-
tab_win_height
,
0
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
push_size
()
def
refresh
(
self
):
if
self
.
need_resize
:
...
...
src/tabs/privatetab.py
View file @
b46f0f5e
...
...
@@ -237,8 +237,6 @@ class PrivateTab(ChatTab):
self
.
parent_muc
.
command_info
(
user
)
def
resize
(
self
):
self
.
need_resize
=
False
if
self
.
size
.
tab_degrade_y
:
info_win_height
=
0
tab_win_height
=
0
...
...
@@ -254,6 +252,7 @@ class PrivateTab(ChatTab):
-
tab_win_height
,
0
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
push_size
()
def
refresh
(
self
):
if
self
.
need_resize
:
...
...
src/tabs/rostertab.py
View file @
b46f0f5e
...
...
@@ -266,7 +266,6 @@ class RosterInfoTab(Tab):
self
.
core
.
command_last_activity
(
jid
)
def
resize
(
self
):
self
.
need_resize
=
False
if
self
.
size
.
tab_degrade_x
:
display_info
=
False
roster_width
=
self
.
width
...
...
@@ -302,6 +301,7 @@ class RosterInfoTab(Tab):
roster_width
,
0
,
0
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
default_help_message
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
push_size
()
def
completion
(
self
):
# Check if we are entering a command (with the '/' key)
...
...
src/tabs/xmltab.py
View file @
b46f0f5e
...
...
@@ -164,7 +164,6 @@ class XMLTab(Tab):
self
.
core
.
close_tab
()
def
resize
(
self
):
self
.
need_resize
=
False
if
self
.
size
.
tab_degrade_y
:
info_win_size
=
0
tab_win_height
=
0
...
...
@@ -180,6 +179,7 @@ class XMLTab(Tab):
-
tab_win_height
,
0
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
)
self
.
push_size
()
def
refresh
(
self
):
if
self
.
need_resize
:
...
...
Link Mauve
@linkmauve
mentioned in issue
#2287 (closed)
·
Aug 21, 2018
mentioned in issue
#2287 (closed)
mentioned in issue #2287
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment