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
739c1657
Commit
739c1657
authored
20 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
when we autoconnect, ask the status message if ask_online_status is set in the preferences
parent
ac17b238
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
plugins/gtkgui/dialogs.py
+6
-1
6 additions, 1 deletion
plugins/gtkgui/dialogs.py
plugins/gtkgui/gtkgui.py
+4
-1
4 additions, 1 deletion
plugins/gtkgui/gtkgui.py
plugins/gtkgui/roster_window.py
+2
-2
2 additions, 2 deletions
plugins/gtkgui/roster_window.py
with
12 additions
and
4 deletions
plugins/gtkgui/dialogs.py
+
6
−
1
View file @
739c1657
...
...
@@ -274,6 +274,8 @@ class Away_message_dialog:
"""
Class for Away message dialog
"""
def
run
(
self
):
"""
Wait for OK button to be pressed and return away messsage
"""
if
self
.
autoconnect
:
gtk
.
gdk
.
threads_enter
()
rep
=
self
.
window
.
run
()
if
rep
==
gtk
.
RESPONSE_OK
:
beg
,
end
=
self
.
message_buffer
.
get_bounds
()
...
...
@@ -282,6 +284,8 @@ class Away_message_dialog:
else
:
message
=
-
1
self
.
window
.
destroy
()
if
self
.
autoconnect
:
gtk
.
gdk
.
threads_leave
()
return
message
def
on_message_comboboxentry_changed
(
self
,
widget
,
data
=
None
):
...
...
@@ -297,10 +301,11 @@ class Away_message_dialog:
if
(
event
.
state
&
gtk
.
gdk
.
CONTROL_MASK
):
self
.
window
.
response
(
gtk
.
RESPONSE_OK
)
def
__init__
(
self
,
plugin
):
def
__init__
(
self
,
plugin
,
autoconnect
=
0
):
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
away_message_dialog
'
,
APP
)
self
.
window
=
self
.
xml
.
get_widget
(
'
away_message_dialog
'
)
self
.
plugin
=
plugin
self
.
autoconnect
=
autoconnect
message_textview
=
self
.
xml
.
get_widget
(
'
message_textview
'
)
self
.
message_buffer
=
message_textview
.
get_buffer
()
self
.
message_buffer
.
set_text
(
self
.
plugin
.
config
[
'
last_msg
'
])
...
...
This diff is collapsed.
Click to expand it.
plugins/gtkgui/gtkgui.py
+
4
−
1
View file @
739c1657
...
...
@@ -657,10 +657,13 @@ class plugin:
def
autoconnect
(
self
):
"""
auto connect at startup
"""
message
=
self
.
roster
.
get_status_message
(
'
online
'
,
1
)
if
message
==
-
1
:
return
for
a
in
self
.
accounts
.
keys
():
if
self
.
accounts
[
a
].
has_key
(
'
autoconnect
'
):
if
self
.
accounts
[
a
][
'
autoconnect
'
]:
self
.
roster
.
send_status
(
a
,
'
online
'
,
'
Online
'
,
1
)
self
.
roster
.
send_status
(
a
,
'
online
'
,
message
,
1
)
return
0
def
show_systray
(
self
):
...
...
This diff is collapsed.
Click to expand it.
plugins/gtkgui/roster_window.py
+
2
−
2
View file @
739c1657
...
...
@@ -725,12 +725,12 @@ class roster_window:
else
:
self
.
plugin
.
sleeper_state
[
account
]
=
0
def
get_status_message
(
self
,
status
):
def
get_status_message
(
self
,
status
,
autoconnect
=
0
):
if
(
status
==
'
online
'
and
not
self
.
plugin
.
config
[
'
ask_online_status
'
])
\
or
(
status
==
'
offline
'
and
not
\
self
.
plugin
.
config
[
'
ask_offline_status
'
]):
return
status
w
=
Away_message_dialog
(
self
.
plugin
)
w
=
Away_message_dialog
(
self
.
plugin
,
autoconnect
)
message
=
w
.
run
()
return
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