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
204
Issues
204
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
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
7f6957b9
Commit
7f6957b9
authored
Jan 12, 2011
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid various crashes by denying the resize AND the refresh on too small size
parent
9f514d8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
src/core.py
src/core.py
+1
-3
src/tabs.py
src/tabs.py
+19
-0
No files found.
src/core.py
View file @
7f6957b9
...
...
@@ -631,9 +631,8 @@ class Core(object):
# Cancel the programmed software resize
self
.
resize_timer
.
cancel
()
# add the new timer
self
.
resize_timer
=
threading
.
Timer
(
0.
1
,
self
.
resize_window
)
self
.
resize_timer
=
threading
.
Timer
(
0.
2
,
self
.
resize_window
)
self
.
resize_timer
.
start
()
# self.resize_window()
def
resize_window
(
self
):
"""
...
...
@@ -699,7 +698,6 @@ class Core(object):
"""
curses
.
curs_set
(
1
)
curses
.
noecho
()
# curses.raw()
theme
.
init_colors
()
stdscr
.
keypad
(
True
)
...
...
src/tabs.py
View file @
7f6957b9
...
...
@@ -274,6 +274,8 @@ class InfoTab(ChatTab):
def
resize
(
self
):
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
self
.
tab_win
.
resize
(
1
,
self
.
width
,
self
.
height
-
2
,
0
,
self
.
core
.
stdscr
)
self
.
info_win
.
resize
(
self
.
height
-
2
,
self
.
width
,
0
,
0
,
self
.
core
.
stdscr
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
,
self
.
core
.
stdscr
)
...
...
@@ -529,6 +531,8 @@ class MucTab(ChatTab):
Resize the whole window. i.e. all its sub-windows
"""
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
text_width
=
(
self
.
width
//
10
)
*
9
self
.
topic_win
.
resize
(
1
,
self
.
width
,
0
,
0
,
self
.
core
.
stdscr
)
self
.
text_win
.
resize
(
self
.
height
-
4
-
self
.
core
.
information_win_size
,
text_width
,
1
,
0
,
self
.
core
.
stdscr
)
...
...
@@ -657,6 +661,8 @@ class PrivateTab(ChatTab):
def
resize
(
self
):
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
self
.
text_win
.
resize
(
self
.
height
-
3
-
self
.
core
.
information_win_size
,
self
.
width
,
0
,
0
,
self
.
core
.
stdscr
)
self
.
text_win
.
rebuild_everything
(
self
.
_room
)
self
.
info_header
.
resize
(
1
,
self
.
width
,
self
.
height
-
3
-
self
.
core
.
information_win_size
,
0
,
self
.
core
.
stdscr
)
...
...
@@ -759,6 +765,8 @@ class RosterInfoTab(Tab):
def
resize
(
self
):
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
roster_width
=
self
.
width
//
2
info_width
=
self
.
width
-
roster_width
-
1
self
.
v_separator
.
resize
(
self
.
height
-
2
,
1
,
0
,
roster_width
,
self
.
core
.
stdscr
)
...
...
@@ -1029,6 +1037,8 @@ class ConversationTab(ChatTab):
def
resize
(
self
):
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
self
.
text_win
.
resize
(
self
.
height
-
4
-
self
.
core
.
information_win_size
,
self
.
width
,
1
,
0
,
self
.
core
.
stdscr
)
self
.
text_win
.
rebuild_everything
(
self
.
_room
)
self
.
upper_bar
.
resize
(
1
,
self
.
width
,
0
,
0
,
self
.
core
.
stdscr
)
...
...
@@ -1125,6 +1135,8 @@ class MucListTab(Tab):
self
.
resize
()
def
refresh
(
self
,
tabs
,
informations
,
roster
):
if
not
self
.
visible
:
return
self
.
upper_message
.
refresh
()
self
.
list_header
.
refresh
()
self
.
listview
.
refresh
()
...
...
@@ -1133,6 +1145,8 @@ class MucListTab(Tab):
def
resize
(
self
):
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
self
.
upper_message
.
resize
(
1
,
self
.
width
,
0
,
0
,
self
.
core
.
stdscr
)
column_size
=
{
'node-part'
:
(
self
.
width
-
5
)
//
4
,
'name'
:
(
self
.
width
-
5
)
//
4
*
3
,
...
...
@@ -1255,11 +1269,16 @@ class SimpleTextTab(Tab):
self
.
core
.
close_tab
()
def
resize
(
self
):
Tab
.
resize
(
self
)
if
not
self
.
visible
:
return
self
.
text_win
.
resize
(
self
.
height
-
2
,
self
.
width
,
0
,
0
,
self
.
core
.
stdscr
)
self
.
tab_win
.
resize
(
1
,
self
.
width
,
self
.
height
-
2
,
0
,
self
.
core
.
stdscr
)
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
,
self
.
core
.
stdscr
)
def
refresh
(
self
,
tabs
,
information
,
roster
):
if
not
self
.
visible
:
return
self
.
text_win
.
refresh
()
self
.
tab_win
.
refresh
(
tabs
,
tabs
[
0
])
self
.
input
.
refresh
()
...
...
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