Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evert Mouw
gajim-plugins
Commits
f4ad05a4
Commit
f4ad05a4
authored
12 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
ChatstatePlugin. gtk3 support
parent
0b495e09
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
chatstate/__init__.py
+1
-1
1 addition, 1 deletion
chatstate/__init__.py
chatstate/chatstate.py
+7
-7
7 additions, 7 deletions
chatstate/chatstate.py
chatstate/manifest.ini
+1
-1
1 addition, 1 deletion
chatstate/manifest.ini
with
9 additions
and
9 deletions
chatstate/__init__.py
+
1
−
1
View file @
f4ad05a4
from
chatstate
import
ChatstatePlugin
from
.
chatstate
import
ChatstatePlugin
This diff is collapsed.
Click to expand it.
chatstate/chatstate.py
+
7
−
7
View file @
f4ad05a4
# -*- coding: utf-8 -*-
##
import
go
bject
from
gi.repository
import
GO
bject
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
...
...
@@ -21,11 +21,11 @@ def paragraph_direction_mark(text):
for
char
in
text
:
bidi
=
unicodedata
.
bidirectional
(
char
)
if
bidi
==
'
L
'
:
return
u
'
\u200E
'
return
'
\u200E
'
elif
bidi
==
'
AL
'
or
bidi
==
'
R
'
:
return
u
'
\u200F
'
return
'
\u200F
'
return
u
'
\u200E
'
return
'
\u200E
'
class
ChatstatePlugin
(
GajimPlugin
):
...
...
@@ -57,7 +57,7 @@ class ChatstatePlugin(GajimPlugin):
child_iters
=
gajim
.
interface
.
roster
.
_get_contact_iter
(
obj
.
jid
,
obj
.
conn
.
name
,
contact
,
self
.
model
)
name
=
go
bject
.
markup_escape_text
(
contact
.
get_shown_name
())
name
=
GO
bject
.
markup_escape_text
(
contact
.
get_shown_name
())
contact_instances
=
gajim
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
contact
.
jid
)
...
...
@@ -68,7 +68,7 @@ class ChatstatePlugin(GajimPlugin):
nb_connected_contact
+=
1
if
nb_connected_contact
>
1
:
name
+=
paragraph_direction_mark
(
unicode
(
name
))
name
+=
u
'
(%d)
'
%
nb_connected_contact
name
+=
'
(%d)
'
%
nb_connected_contact
for
child_iter
in
child_iters
:
if
chatstate
!=
'
gone
'
:
...
...
@@ -82,7 +82,7 @@ class ChatstatePlugin(GajimPlugin):
max_lines
=
1
)
name
+=
'
\n
<span size=
"
small
"
style=
"
italic
"
'
\
'
foreground=
"
%s
"
>%s</span>
'
%
(
self
.
status_color
,
go
bject
.
markup_escape_text
(
status
))
GO
bject
.
markup_escape_text
(
status
))
self
.
model
[
child_iter
][
1
]
=
name
@log_calls
(
'
ChatstatePlugin
'
)
...
...
This diff is collapsed.
Click to expand it.
chatstate/manifest.ini
+
1
−
1
View file @
f4ad05a4
...
...
@@ -7,4 +7,4 @@ description: Chat State Notifications in roster.
The
plugin
does
not
work
if
you
use
custom
font
color
for
contacts
in
roster.
authors
=
Denis Fomin <fominde@gmail.com>
homepage
=
http://trac-plugins.gajim.org/wiki/ChatstatePlugin
m
ax
_gajim_version:
0.15.
9
m
in
_gajim_version:
0.15.
10
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment