Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
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
eta
gajim
Commits
ff7aa9b7
Commit
ff7aa9b7
authored
19 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
gajim-remote now has get_status_message
parent
b3f631f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/helpers.py
+12
-0
12 additions, 0 deletions
src/common/helpers.py
src/gajim-remote.py
+7
-1
7 additions, 1 deletion
src/gajim-remote.py
src/remote_control.py
+16
-0
16 additions, 0 deletions
src/remote_control.py
with
35 additions
and
1 deletion
src/common/helpers.py
+
12
−
0
View file @
ff7aa9b7
...
...
@@ -496,6 +496,18 @@ def get_global_show():
if
connected
>
maxi
:
maxi
=
connected
return
gajim
.
SHOW_LIST
[
maxi
]
def
get_global_status
():
maxi
=
0
for
account
in
gajim
.
connections
:
if
not
gajim
.
config
.
get_per
(
'
accounts
'
,
account
,
'
sync_with_global_status
'
):
continue
connected
=
gajim
.
connections
[
account
].
connected
if
connected
>
maxi
:
maxi
=
connected
status
=
gajim
.
connections
[
account
].
status
return
status
def
get_icon_name_to_show
(
contact
,
account
=
None
):
'''
Get the icon name to show in online, away, requested, ...
'''
...
...
This diff is collapsed.
Click to expand it.
src/gajim-remote.py
+
7
−
1
View file @
ff7aa9b7
...
...
@@ -196,7 +196,13 @@ class GajimRemote:
(
_
(
'
account
'
),
_
(
''
),
False
)
]
],
'
get_status_message
'
:
[
_
(
'
Returns current status message(the global one unless account is specified)
'
),
[
(
_
(
'
account
'
),
_
(
''
),
False
)
]
],
}
if
self
.
argv_len
<
2
or
\
sys
.
argv
[
1
]
not
in
self
.
commands
.
keys
():
# no args or bad args
...
...
This diff is collapsed.
Click to expand it.
src/remote_control.py
+
16
−
0
View file @
ff7aa9b7
...
...
@@ -107,6 +107,7 @@ class SignalObject(DbusPrototype):
self
.
add_contact
,
self
.
remove_contact
,
self
.
get_status
,
self
.
get_status_message
,
])
def
raise_signal
(
self
,
signal
,
arg
):
...
...
@@ -137,6 +138,20 @@ class SignalObject(DbusPrototype):
# return show for the given account
index
=
gajim
.
connections
[
account
].
connected
return
STATUS_LIST
[
index
]
def
get_status_message
(
self
,
*
args
):
'''
get_status(account = None)
returns status which is the global one
unless account is given
'''
account
=
self
.
_get_real_arguments
(
args
,
1
)[
0
]
accounts
=
gajim
.
contacts
.
keys
()
if
not
account
:
# If user did not ask for account, returns the global status
return
str
(
helpers
.
get_global_status
())
# return show for the given account
status
=
gajim
.
connections
[
account
].
status
return
str
(
status
)
def
send_file
(
self
,
*
args
):
'''
send_file(file_path, jid, account=None)
...
...
@@ -488,3 +503,4 @@ class SignalObject(DbusPrototype):
remove_contact
=
method
(
INTERFACE
)(
remove_contact
)
add_contact
=
method
(
INTERFACE
)(
add_contact
)
get_status
=
method
(
INTERFACE
)(
get_status
)
get_status_message
=
method
(
INTERFACE
)(
get_status_message
)
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