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
0d6c7276
Commit
0d6c7276
authored
Sep 16, 2010
by
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes a crash on shlex.
parent
6018d243
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
24 deletions
+11
-24
src/gui.py
src/gui.py
+2
-1
src/tab.py
src/tab.py
+1
-1
src/window.py
src/window.py
+8
-22
No files found.
src/gui.py
View file @
0d6c7276
...
...
@@ -38,6 +38,7 @@ from config import config
from
tab
import
MucTab
,
InfoTab
,
PrivateTab
,
RosterInfoTab
from
user
import
User
from
room
import
Room
from
roster
import
Roster
from
message
import
Message
from
text_buffer
import
TextBuffer
from
keyboard
import
read_char
...
...
@@ -74,7 +75,7 @@ class Gui(object):
self
.
init_curses
(
self
.
stdscr
)
self
.
xmpp
=
xmpp
default_tab
=
InfoTab
(
self
.
stdscr
,
"Info"
)
if
self
.
xmpp
.
anon
\
else
RosterInfoTab
(
self
.
stdscr
,
"Roster"
)
else
RosterInfoTab
(
self
.
stdscr
,
self
.
xmpp
.
roster
)
self
.
tabs
=
[
default_tab
]
# a unique buffer used to store global informations
# that are displayed in almost all tabs, in an
...
...
src/tab.py
View file @
0d6c7276
...
...
@@ -384,8 +384,8 @@ class RosterInfoTab(Tab):
self
.
input
.
resize
(
1
,
self
.
width
,
self
.
height
-
1
,
0
,
stdscr
,
self
.
visible
)
def
refresh
(
self
,
tabs
,
informations
):
self
.
v_separator
.
refresh
()
self
.
roster_win
.
refresh
(
self
.
roster
)
self
.
v_separator
.
refresh
()
self
.
info_win
.
refresh
(
informations
)
self
.
tab_win
.
refresh
(
tabs
,
tabs
[
0
])
self
.
input
.
refresh
()
...
...
src/window.py
View file @
0d6c7276
...
...
@@ -439,8 +439,9 @@ class TextWin(Win):
try
:
splitted
=
shlex
.
split
(
txt
)
except
ValueError
:
txt
=
txt
.
replace
(
'"'
,
''
)
splitted
=
shlex
.
split
(
txt
)
from
common
import
debug
debug
(
'SHLEX FAILED on: [%s]
\n
'
%
(
txt
,))
splitted
=
'shlex failed here. See debug'
.
split
()
for
word
in
splitted
:
if
word
in
list
(
special_words
.
keys
()):
self
.
addstr
(
word
,
curses
.
color_pair
(
special_words
[
word
]))
...
...
@@ -876,22 +877,6 @@ class Input(Win):
def
clear_text
(
self
):
self
.
win
.
erase
()
# class RosterWin(Win):
# def __init__(self, height, width, y, x, parent_win, visible):
# Win.__init__(self, height, width, y, x, parent_win)
# self.visible = visible
# def resize(self, height, width, y, x, stdscr, visible):
# self._resize(height, width, y, x, stdscr)
# self.visible = visible
# def refresh(self, roster):
# g_lock.acquire()
# self.win.erase()
# self.addnstr('teub', 4)
# self.win.refresh()
# g_lock.release()
class
VerticalSeparator
(
Win
):
"""
Just a one-column window, with just a line in it, that is
...
...
@@ -919,8 +904,6 @@ class VerticalSeparator(Win):
self
.
rewrite_line
()
class
RosterWin
(
Win
):
"""
"""
def
__init__
(
self
,
height
,
width
,
y
,
x
,
parent_win
,
visible
):
self
.
visible
=
visible
Win
.
__init__
(
self
,
height
,
width
,
y
,
x
,
parent_win
)
...
...
@@ -928,12 +911,15 @@ class RosterWin(Win):
def
resize
(
self
,
height
,
width
,
y
,
x
,
stdscr
,
visible
):
self
.
_resize
(
height
,
width
,
y
,
x
,
stdscr
)
self
.
visible
=
visible
def
refresh
(
self
,
roster
=
None
):
def
refresh
(
self
,
roster
):
"""
We get the roster object
"""
if
not
self
.
visible
or
not
roster
:
from
common
import
debug
debug
(
'anus%s, %s'
%
(
roster
,
self
.
visible
))
if
not
self
.
visible
:
return
g_lock
.
acquire
()
self
.
win
.
erase
()
...
...
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