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
Erik Huelsmann
gajim
Commits
5e47ab69
Commit
5e47ab69
authored
20 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
we can now set our priority
parent
f518f2c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/core.py
+4
-5
4 additions, 5 deletions
core/core.py
plugins/gtkgui/config.py
+18
-5
18 additions, 5 deletions
plugins/gtkgui/config.py
plugins/gtkgui/gtkgui.glade
+268
-1
268 additions, 1 deletion
plugins/gtkgui/gtkgui.glade
plugins/gtkgui/gtkgui.py
+9
-4
9 additions, 4 deletions
plugins/gtkgui/gtkgui.py
with
299 additions
and
15 deletions
core/core.py
+
4
−
5
View file @
5e47ab69
...
...
@@ -305,12 +305,11 @@ class GajimCore:
con
=
self
.
connect
(
ev
[
1
])
if
self
.
connected
[
ev
[
1
]]:
#send our presence
p
=
common
.
jabber
.
Presence
()
p
.
setShow
(
ev
[
2
][
0
])
p
.
setStatus
(
ev
[
2
][
1
])
type
=
'
available
'
if
ev
[
2
][
0
]
==
'
invisible
'
:
p
.
setType
(
'
invisible
'
)
con
.
send
(
p
)
type
=
'
invisible
'
prio
=
str
(
self
.
cfgParser
.
tab
[
ev
[
1
]][
'
priority
'
])
con
.
sendPresence
(
type
,
prio
,
ev
[
2
][
0
],
ev
[
2
][
1
])
self
.
hub
.
sendPlugin
(
'
STATUS
'
,
ev
[
1
],
ev
[
2
][
0
])
#ask our VCard
iq
=
common
.
jabber
.
Iq
(
type
=
"
get
"
)
...
...
This diff is collapsed.
Click to expand it.
plugins/gtkgui/config.py
+
18
−
5
View file @
5e47ab69
...
...
@@ -354,6 +354,8 @@ class accountPreference_Window:
self
.
xml
.
get_widget
(
"
entry_password
"
).
set_text
(
infos
[
'
password
'
])
if
infos
.
has_key
(
'
ressource
'
):
self
.
xml
.
get_widget
(
"
entry_ressource
"
).
set_text
(
infos
[
'
ressource
'
])
if
infos
.
has_key
(
'
priority
'
):
self
.
xml
.
get_widget
(
"
entry_priority
"
).
set_text
(
str
(
infos
[
'
priority
'
]))
if
infos
.
has_key
(
'
use_proxy
'
):
self
.
xml
.
get_widget
(
"
checkbutton_proxy
"
).
set_active
(
infos
[
'
use_proxy
'
])
if
infos
.
has_key
(
'
proxyhost
'
):
...
...
@@ -367,6 +369,8 @@ class accountPreference_Window:
"""
When save button is clicked : Save informations in config file
"""
entryPass
=
self
.
xml
.
get_widget
(
"
entry_password
"
)
entryRessource
=
self
.
xml
.
get_widget
(
"
entry_ressource
"
)
entryPriority
=
self
.
xml
.
get_widget
(
"
entry_priority
"
)
prio
=
entryPriority
.
get_text
()
check
=
self
.
xml
.
get_widget
(
"
checkbutton
"
)
entryName
=
self
.
xml
.
get_widget
(
"
entry_name
"
)
entryJid
=
self
.
xml
.
get_widget
(
"
entry_jid
"
)
...
...
@@ -395,6 +399,12 @@ class accountPreference_Window:
except
ValueError
:
warning_Window
(
_
(
"
Proxy Port must be a port number
"
))
return
0
if
prio
!=
''
:
try
:
prio
=
string
.
atoi
(
prio
)
except
ValueError
:
warning_Window
(
_
(
"
Priority must be a number
"
))
return
0
(
login
,
hostname
)
=
string
.
split
(
jid
,
'
@
'
)
#if we are modifying an account
if
self
.
modify
:
...
...
@@ -419,8 +429,9 @@ class accountPreference_Window:
self
.
plugin
.
send
(
'
ACC_CHG
'
,
self
.
account
,
name
)
self
.
plugin
.
accounts
[
name
]
=
{
'
name
'
:
login
,
'
hostname
'
:
hostname
,
\
'
password
'
:
entryPass
.
get_text
(),
'
ressource
'
:
\
entryRessource
.
get_text
(),
'
use_proxy
'
:
useProxy
,
'
proxyhost
'
:
\
entryProxyhost
.
get_text
(),
'
proxyport
'
:
proxyPort
}
entryRessource
.
get_text
(),
'
priority
'
:
prio
,
'
use_proxy
'
:
\
useProxy
,
'
proxyhost
'
:
entryProxyhost
.
get_text
(),
'
proxyport
'
:
\
proxyPort
}
self
.
plugin
.
send
(
'
CONFIG
'
,
None
,
(
'
accounts
'
,
self
.
plugin
.
accounts
))
#refresh accounts window
if
self
.
plugin
.
windows
.
has_key
(
'
accounts
'
):
...
...
@@ -437,15 +448,15 @@ class accountPreference_Window:
#if we neeed to register a new account
if
check
.
get_active
():
self
.
plugin
.
send
(
'
NEW_ACC
'
,
None
,
(
hostname
,
login
,
\
entryPass
.
get_text
(),
name
,
entryRessource
.
get_text
(),
\
entryPass
.
get_text
(),
name
,
entryRessource
.
get_text
(),
prio
,
\
checkProxy
.
get_active
(),
entryProxyhost
.
get_text
(),
\
entryProxyport
.
get_text
()))
check
.
set_active
(
FALSE
)
return
self
.
plugin
.
accounts
[
name
]
=
{
'
name
'
:
login
,
'
hostname
'
:
hostname
,
\
'
password
'
:
entryPass
.
get_text
(),
'
ressource
'
:
\
entryRessource
.
get_text
(),
'
use_proxy
'
:
useProxy
,
'
proxyhost
'
:
\
entryProxyhost
.
get_text
(),
'
proxyport
'
:
proxyPort
}
entryRessource
.
get_text
(),
'
priority
'
:
prio
,
'
use_proxy
'
:
useProxy
,
\
'
proxyhost
'
:
entryProxyhost
.
get_text
(),
'
proxyport
'
:
proxyPort
}
self
.
plugin
.
send
(
'
CONFIG
'
,
None
,
(
'
accounts
'
,
self
.
plugin
.
accounts
))
#update variables
self
.
plugin
.
windows
[
name
]
=
{
'
infos
'
:
{},
'
chats
'
:
{}}
...
...
@@ -557,6 +568,8 @@ class accounts_Window:
infos
[
'
password
'
]
=
self
.
plugin
.
accounts
[
account
][
"
password
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
ressource
"
):
infos
[
'
ressource
'
]
=
self
.
plugin
.
accounts
[
account
][
"
ressource
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
priority
"
):
infos
[
'
priority
'
]
=
self
.
plugin
.
accounts
[
account
][
"
priority
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
use_proxy
"
):
infos
[
'
use_proxy
'
]
=
self
.
plugin
.
accounts
[
account
][
"
use_proxy
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
proxyhost
"
):
...
...
This diff is collapsed.
Click to expand it.
plugins/gtkgui/gtkgui.glade
+
268
−
1
View file @
5e47ab69
This diff is collapsed.
Click to expand it.
plugins/gtkgui/gtkgui.py
+
9
−
4
View file @
5e47ab69
...
...
@@ -690,6 +690,8 @@ class roster_Window:
infos
[
'
password
'
]
=
self
.
plugin
.
accounts
[
account
][
"
password
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
ressource
"
):
infos
[
'
ressource
'
]
=
self
.
plugin
.
accounts
[
account
][
"
ressource
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
priority
"
):
infos
[
'
priority
'
]
=
self
.
plugin
.
accounts
[
account
][
"
priority
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
use_proxy
"
):
infos
[
'
use_proxy
'
]
=
self
.
plugin
.
accounts
[
account
][
"
use_proxy
"
]
if
self
.
plugin
.
accounts
[
account
].
has_key
(
"
proxyhost
"
):
...
...
@@ -1280,7 +1282,7 @@ class plugin:
#It must be an agent
if
not
self
.
roster
.
contacts
[
ev
[
1
]].
has_key
(
ji
):
user1
=
user
(
ji
,
ji
,
[
'
Agents
'
],
ev
[
2
][
1
],
\
ev
[
2
][
2
],
'
from
'
,
resource
)
ev
[
2
][
2
],
'
from
'
,
resource
,
0
)
self
.
roster
.
contacts
[
ev
[
1
]][
ji
]
=
[
user1
]
self
.
roster
.
add_user_to_roster
(
ji
,
ev
[
1
])
else
:
...
...
@@ -1328,10 +1330,13 @@ class plugin:
warning_Window
(
_
(
"
error contacting %s
"
)
%
ev
[
2
][
0
])
else
:
agentRegistration_Window
(
ev
[
2
][
0
],
ev
[
2
][
1
],
self
,
ev
[
1
])
#('ACC_OK', account, (hostname, login, pasword, name, ressource))
#('ACC_OK', account, (hostname, login, pasword, name, ressource, prio,
#use_proxy, proxyhost, proxyport))
elif
ev
[
0
]
==
'
ACC_OK
'
:
self
.
accounts
[
ev
[
2
][
3
]]
=
{
'
ressource
'
:
ev
[
2
][
4
],
\
'
password
'
:
ev
[
2
][
2
],
'
hostname
'
:
ev
[
2
][
0
],
'
name
'
:
ev
[
2
][
1
]}
self
.
accounts
[
ev
[
2
][
3
]]
=
{
'
name
'
:
ev
[
2
][
1
],
'
hostname
'
:
ev
[
2
][
0
],
\
'
password
'
:
ev
[
2
][
2
],
'
ressource
'
:
ev
[
2
][
4
],
'
priority
'
:
\
ev
[
2
][
5
],
'
use_proxy
'
:
ev
[
2
][
6
],
'
proxyhost
'
:
ev
[
2
][
7
],
\
'
proxyport
'
:
ev
[
2
][
8
]}
self
.
send
(
'
CONFIG
'
,
None
,
(
'
accounts
'
,
self
.
accounts
))
self
.
windows
[
name
]
=
{
'
infos
'
:
{},
'
chats
'
:
{}}
self
.
queues
[
name
]
=
{}
...
...
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