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
49caa2a6
Commit
49caa2a6
authored
Jan 21, 2010
by
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrige le bug du clignottement
parent
23320f0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
src/gui.py
src/gui.py
+7
-5
src/window.py
src/window.py
+5
-5
No files found.
src/gui.py
View file @
49caa2a6
...
...
@@ -159,10 +159,11 @@ class Gui(object):
if
room_from
==
room
.
name
:
room
.
add_message
(
nick_from
,
stanza
.
getBody
())
if
room
==
self
.
rooms
[
0
]:
# self.window.text_win.refresh(room.lines)
# self.window.user_win.refresh(room.users)
# self.window.input.refresh()
self
.
window
.
refresh
(
self
.
rooms
[
0
])
self
.
window
.
text_win
.
refresh
(
room
.
lines
)
self
.
window
.
user_win
.
refresh
(
room
.
users
)
self
.
window
.
input
.
refresh
()
# self.window.refresh(self.rooms[0])
curses
.
doupdate
()
break
def
room_presence
(
self
,
stanza
):
...
...
@@ -174,6 +175,7 @@ class Gui(object):
if
room
==
self
.
rooms
[
0
]:
self
.
window
.
text_win
.
refresh
(
room
.
lines
)
self
.
window
.
user_win
.
refresh
(
room
.
users
)
curses
.
doupdate
()
break
def
execute
(
self
):
...
...
@@ -201,7 +203,7 @@ class Gui(object):
def
main_loop
(
self
,
stdscr
):
while
1
:
stdscr
.
refresh
()
curses
.
doupdate
()
# self.window.input.refresh()
key
=
stdscr
.
getch
()
if
key
==
curses
.
KEY_RESIZE
:
...
...
src/window.py
View file @
49caa2a6
...
...
@@ -52,7 +52,7 @@ class UserList(Win):
self
.
win
.
addstr
(
y
,
1
,
user
.
nick
)
self
.
win
.
attroff
(
curses
.
color_pair
(
color
))
y
+=
1
self
.
win
.
refresh
()
self
.
win
.
nout
refresh
()
def
resize
(
self
,
height
,
width
,
y
,
x
,
stdscr
):
self
.
_resize
(
height
,
width
,
y
,
x
,
stdscr
)
...
...
@@ -68,8 +68,8 @@ class Info(Win):
self
.
win
.
clear
()
self
.
win
.
addstr
(
0
,
0
,
room_name
+
" "
*
(
self
.
width
-
len
(
room_name
)
-
1
)
,
curses
.
color_pair
(
1
))
# self.win.addstr(0, 0, "fion"
)
self
.
win
.
refresh
()
self
.
win
.
noutrefresh
(
)
class
TextWin
(
Win
):
def
__init__
(
self
,
height
,
width
,
y
,
x
,
parent_win
):
...
...
@@ -86,7 +86,7 @@ class TextWin(Win):
elif
len
(
line
)
==
3
:
self
.
win
.
addstr
(
y
,
0
,
'['
+
line
[
0
].
strftime
(
"%H:%M:%S"
)
+
"] "
+
line
[
1
]
+
": "
+
line
[
2
])
y
+=
1
self
.
win
.
refresh
()
self
.
win
.
nout
refresh
()
def
resize
(
self
,
height
,
width
,
y
,
x
,
stdscr
):
self
.
_resize
(
height
,
width
,
y
,
x
,
stdscr
)
...
...
@@ -115,7 +115,7 @@ class Input(Win):
self
.
txt
=
self
.
input
.
gather
()
def
refresh
(
self
):
self
.
win
.
refresh
()
self
.
win
.
nout
refresh
()
def
clear_text
(
self
):
self
.
win
.
clear
()
...
...
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