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
98a52fd6
Commit
98a52fd6
authored
Sep 02, 2010
by
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Userfriendly names for Shows. Don't tab-warn on message coming from the ROOM itself
parent
85d9e693
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
src/gui.py
src/gui.py
+14
-5
No files found.
src/gui.py
View file @
98a52fd6
...
...
@@ -55,6 +55,13 @@ ERROR_AND_STATUS_CODES = {
'503'
:
'The maximum number of users has been reached'
,
}
SHOW_NAME
=
{
'dnd'
:
_
(
'busy'
),
'away'
:
_
(
'away'
),
'xa'
:
_
(
'not available'
),
'chat'
:
_
(
'chatty'
),
''
:
_
(
'available'
)
}
def
doupdate
():
curses
.
doupdate
()
...
...
@@ -292,8 +299,8 @@ class Gui(object):
msg
+=
_
(
'affiliation: %s,'
)
%
affiliation
if
role
!=
user
.
role
:
msg
+=
_
(
'role: %s,'
)
%
role
if
show
!=
user
.
show
:
msg
+=
_
(
'show: %s,'
)
%
show
if
show
!=
user
.
show
and
show
in
SHOW_NAME
.
keys
()
:
msg
+=
_
(
'show: %s,'
)
%
SHOW_NAME
[
show
]
if
status
!=
user
.
status
:
msg
+=
_
(
'status: %s,'
)
%
status
msg
=
msg
[:
-
1
]
# remove the last ","
...
...
@@ -617,8 +624,10 @@ class Gui(object):
else
:
delayed
=
False
date
=
None
nick_from
=
message
[
'
from'
].
resource
nick_from
=
message
[
'
mucnick'
]
room_from
=
message
.
getMucroom
()
if
nick_from
==
room_from
:
nick_from
=
None
room
=
self
.
get_room_by_name
(
room_from
)
if
(
self
.
ignores
.
has_key
(
room_from
))
and
(
nick_from
in
self
.
ignores
[
room_from
]):
return
...
...
@@ -626,8 +635,8 @@ class Gui(object):
if
not
room
:
self
.
information
(
_
(
"message received for a non-existing room: %s"
)
%
(
room_from
))
return
body
=
message
[
'body'
]
#stanza.getBody()
subject
=
message
[
'subject'
]
#stanza.getSubject()
body
=
message
[
'body'
]
subject
=
message
[
'subject'
]
if
subject
:
if
nick_from
:
self
.
add_message_to_room
(
room
,
_
(
"%(nick)s changed the subject to: %(subject)s"
)
%
{
'nick'
:
nick_from
,
'subject'
:
subject
},
time
=
date
)
...
...
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