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
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
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
wusspuss
gajim
Commits
cb1fcc8c
Commit
cb1fcc8c
authored
15 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
update ft proxies list
parent
ea973ddc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure.ac
+1
-1
1 addition, 1 deletion
configure.ac
src/common/config.py
+1
-2
1 addition, 2 deletions
src/common/config.py
src/common/defs.py
+1
-1
1 addition, 1 deletion
src/common/defs.py
src/common/optparser.py
+50
-44
50 additions, 44 deletions
src/common/optparser.py
with
53 additions
and
48 deletions
configure.ac
+
1
−
1
View file @
cb1fcc8c
AC_INIT([Gajim - A Jabber Instant Messager],
[0.12.5.
7
-dev],[http://trac.gajim.org/],[gajim])
[0.12.5.
8
-dev],[http://trac.gajim.org/],[gajim])
AC_PREREQ([2.59])
AC_CONFIG_HEADER(config.h)
...
...
This diff is collapsed.
Click to expand it.
src/common/config.py
+
1
−
2
View file @
cb1fcc8c
...
...
@@ -326,8 +326,7 @@ class Config:
'
http_auth
'
:
[
opt_str
,
'
ask
'
],
# yes, no, ask
'
dont_ack_subscription
'
:
[
opt_bool
,
False
,
_
(
'
Jabberd2 workaround
'
)],
# proxy65 for FT
'
file_transfer_proxies
'
:
[
opt_str
,
'
proxy65.talkonaut.com, proxy.jabber.org, proxy.netlab.cz, transfer.jabber.freenet.de, proxy.jabber.cd.chalmers.se
'
],
'
file_transfer_proxies
'
:
[
opt_str
,
'
proxy.eu.jabber.org, proxy.jabber.ru, proxy.jabbim.cz
'
],
'
use_ft_proxies
'
:
[
opt_bool
,
True
,
_
(
'
If checked, Gajim will use your IP and proxies defined in file_transfer_proxies option for file transfer.
'
),
True
],
'
msgwin-x-position
'
:
[
opt_int
,
-
1
],
# Default is to let the wm decide
'
msgwin-y-position
'
:
[
opt_int
,
-
1
],
# Default is to let the wm decide
...
...
This diff is collapsed.
Click to expand it.
src/common/defs.py
+
1
−
1
View file @
cb1fcc8c
...
...
@@ -27,7 +27,7 @@
datadir
=
'
../
'
localedir
=
'
../po
'
version
=
'
0.12.5.
7
-dev
'
version
=
'
0.12.5.
8
-dev
'
import
sys
,
os
.
path
for
base
in
(
'
.
'
,
'
common
'
):
...
...
This diff is collapsed.
Click to expand it.
src/common/optparser.py
+
50
−
44
View file @
cb1fcc8c
...
...
@@ -216,12 +216,51 @@ def update_config(self, old_version, new_version):
self
.
update_config_to_01256
()
if
old
<
[
0
,
12
,
5
,
7
]
and
new
>=
[
0
,
12
,
5
,
7
]:
self
.
update_config_to_01257
()
if
old
<
[
0
,
12
,
5
,
8
]
and
new
>=
[
0
,
12
,
5
,
8
]:
self
.
update_config_to_01258
()
gajim
.
logger
.
init_vars
()
gajim
.
config
.
set
(
'
version
'
,
new_version
)
caps
.
capscache
.
initialize_from_db
()
def
assert_unread_msgs_table_exists
(
self
):
'''
create table unread_messages if there is no such table
'''
back
=
os
.
getcwd
()
os
.
chdir
(
logger
.
LOG_DB_FOLDER
)
con
=
sqlite
.
connect
(
logger
.
LOG_DB_FILE
)
os
.
chdir
(
back
)
cur
=
con
.
cursor
()
try
:
cur
.
executescript
(
'''
CREATE TABLE unread_messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
jid_id INTEGER
);
'''
)
con
.
commit
()
gajim
.
logger
.
init_vars
()
except
sqlite
.
OperationalError
:
pass
con
.
close
()
def
update_ft_proxies
(
self
,
to_remove
=
[],
to_add
=
[]):
for
account
in
gajim
.
config
.
get_per
(
'
accounts
'
):
proxies_str
=
gajim
.
config
.
get_per
(
'
accounts
'
,
account
,
'
file_transfer_proxies
'
)
proxies
=
[
p
.
strip
()
for
p
in
proxies_str
.
split
(
'
,
'
)]
for
wrong_proxy
in
to_remove
:
if
wrong_proxy
in
proxies
:
proxies
.
remove
(
wrong_proxy
)
for
new_proxy
in
to_add
:
if
new_proxy
not
in
proxies
:
proxies
.
append
(
new_proxy
)
proxies_str
=
'
,
'
.
join
(
proxies
)
gajim
.
config
.
set_per
(
'
accounts
'
,
account
,
'
file_transfer_proxies
'
,
proxies_str
)
def
update_config_x_to_09
(
self
):
# Var name that changed:
# avatar_width /height -> chat_avatar_width / height
...
...
@@ -262,38 +301,10 @@ def update_config_x_to_09(self):
theme
=
gajim
.
config
.
get_per
(
'
themes
'
)[
0
]
gajim
.
config
.
set
(
'
roster_theme
'
,
theme
)
# new proxies in accounts.name.file_transfer_proxies
for
account
in
gajim
.
config
.
get_per
(
'
accounts
'
):
proxies
=
gajim
.
config
.
get_per
(
'
accounts
'
,
account
,
'
file_transfer_proxies
'
)
if
proxies
.
find
(
'
proxy.netlab.cz
'
)
<
0
:
proxies
+=
'
,
'
+
'
proxy.netlab.cz
'
gajim
.
config
.
set_per
(
'
accounts
'
,
account
,
'
file_transfer_proxies
'
,
proxies
)
self
.
update_ft_proxies
(
to_add
=
[
'
proxy.netlab.cz
'
])
gajim
.
config
.
set
(
'
version
'
,
'
0.9
'
)
def
assert_unread_msgs_table_exists
(
self
):
'''
create table unread_messages if there is no such table
'''
back
=
os
.
getcwd
()
os
.
chdir
(
logger
.
LOG_DB_FOLDER
)
con
=
sqlite
.
connect
(
logger
.
LOG_DB_FILE
)
os
.
chdir
(
back
)
cur
=
con
.
cursor
()
try
:
cur
.
executescript
(
'''
CREATE TABLE unread_messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
jid_id INTEGER
);
'''
)
con
.
commit
()
gajim
.
logger
.
init_vars
()
except
sqlite
.
OperationalError
:
pass
con
.
close
()
def
update_config_09_to_010
(
self
):
if
'
usetabbedchat
'
in
self
.
old_values
and
not
\
self
.
old_values
[
'
usetabbedchat
'
]:
...
...
@@ -311,21 +322,8 @@ def update_config_09_to_010(self):
self
.
old_values
[
'
always_compact_view_gc
'
]
!=
'
False
'
:
gajim
.
config
.
set
(
'
always_hide_groupchat_buttons
'
,
True
)
for
account
in
gajim
.
config
.
get_per
(
'
accounts
'
):
proxies_str
=
gajim
.
config
.
get_per
(
'
accounts
'
,
account
,
'
file_transfer_proxies
'
)
proxies
=
proxies_str
.
split
(
'
,
'
)
for
i
in
range
(
0
,
len
(
proxies
)):
proxies
[
i
]
=
proxies
[
i
].
strip
()
for
wrong_proxy
in
(
'
proxy65.jabber.autocom.pl
'
,
'
proxy65.jabber.ccc.de
'
):
if
wrong_proxy
in
proxies
:
proxies
.
remove
(
wrong_proxy
)
if
not
'
transfer.jabber.freenet.de
'
in
proxies
:
proxies
.
append
(
'
transfer.jabber.freenet.de
'
)
proxies_str
=
'
,
'
.
join
(
proxies
)
gajim
.
config
.
set_per
(
'
accounts
'
,
account
,
'
file_transfer_proxies
'
,
proxies_str
)
self
.
update_ft_proxies
(
to_remove
=
[
'
proxy65.jabber.autocom.pl
'
,
'
proxy65.jabber.ccc.de
'
],
to_add
=
[
'
transfer.jabber.freenet.de
'
])
# create unread_messages table if needed
self
.
assert_unread_msgs_table_exists
()
...
...
@@ -811,4 +809,12 @@ def update_config_to_01257(self):
'
simplebulb
'
,
'
stellar
'
):
gajim
.
config
.
set
(
'
iconset
'
,
gajim
.
config
.
DEFAULT_ICONSET
)
gajim
.
config
.
set
(
'
version
'
,
'
0.12.5.7
'
)
def
update_config_to_01258
(
self
):
self
.
update_ft_proxies
(
to_remove
=
[
'
proxy65.talkonaut.com
'
,
'
proxy.jabber.org
'
,
'
proxy.netlab.cz
'
,
'
transfer.jabber.freenet.de
'
,
'
proxy.jabber.cd.chalmers.se
'
],
to_add
=
[
'
proxy.eu.jabber.org
'
,
'
proxy.jabber.ru
'
,
'
proxy.jabbim.cz
'
])
gajim
.
config
.
set
(
'
version
'
,
'
0.12.5.8
'
)
# vim: se ts=3:
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