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
Weblate
gajim
Commits
ba12a63d
Commit
ba12a63d
authored
16 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
[thorstenp] replace file with open
parent
567f1e17
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
setup_osx.py
+3
-3
3 additions, 3 deletions
setup_osx.py
src/gtkgui_helpers.py
+2
-2
2 additions, 2 deletions
src/gtkgui_helpers.py
src/osx/dbus.py
+2
-2
2 additions, 2 deletions
src/osx/dbus.py
src/osx/growler.py
+2
-2
2 additions, 2 deletions
src/osx/growler.py
with
9 additions
and
9 deletions
setup_osx.py
+
3
−
3
View file @
ba12a63d
...
...
@@ -88,7 +88,7 @@ def force(func):
def
writeScript
(
filename
,
contents
):
script
=
file
(
filename
,
"
w+
"
)
script
=
open
(
filename
,
"
w+
"
)
script
.
write
(
contents
)
script
.
close
()
system
(
"
chmod +x %s
"
%
filename
)
...
...
@@ -148,8 +148,8 @@ def setupPrep():
copy
(
"
src/osx/prep_py2app.py
"
,
APP_RS
)
move
(
"
dist/Gajim.app/Contents/Resources/__boot__.py
"
,
"
dist/Gajim.app/Contents/Resources/__boot__.py.org
"
)
new
=
file
(
"
dist/Gajim.app/Contents/Resources/__boot__.py
"
,
"
w+
"
)
org
=
file
(
"
dist/Gajim.app/Contents/Resources/__boot__.py.org
"
)
new
=
open
(
"
dist/Gajim.app/Contents/Resources/__boot__.py
"
,
"
w+
"
)
org
=
open
(
"
dist/Gajim.app/Contents/Resources/__boot__.py.org
"
)
for
line
in
org
:
new
.
write
(
line
)
if
((
'
site.addsitedir
'
in
line
)
and
(
'
Python
'
in
line
)):
...
...
This diff is collapsed.
Click to expand it.
src/gtkgui_helpers.py
+
2
−
2
View file @
ba12a63d
...
...
@@ -157,7 +157,7 @@ def get_default_font():
if
os
.
path
.
exists
(
xfce_config_file
):
try
:
for
line
in
file
(
xfce_config_file
):
for
line
in
open
(
xfce_config_file
):
if
line
.
find
(
'
name=
"
Gtk/FontName
"'
)
!=
-
1
:
start
=
line
.
find
(
'
value=
"'
)
+
7
return
line
[
start
:
line
.
find
(
'"'
,
start
)].
decode
(
'
utf-8
'
)
...
...
@@ -167,7 +167,7 @@ def get_default_font():
elif
os
.
path
.
exists
(
kde_config_file
):
try
:
for
line
in
file
(
kde_config_file
):
for
line
in
open
(
kde_config_file
):
if
line
.
find
(
'
font=
'
)
==
0
:
# font=Verdana,9,other_numbers
start
=
5
# 5 is len('font=')
line
=
line
[
start
:]
...
...
This diff is collapsed.
Click to expand it.
src/osx/dbus.py
+
2
−
2
View file @
ba12a63d
...
...
@@ -20,7 +20,7 @@ _GTK_BASE = "/Library/Frameworks/GTK+.framework/Versions/Current"
def
readEnv
():
gajimpaths
.
add_from_root
(
u
'
dbus.env
'
,
u
'
dbus.env
'
)
try
:
dbus_env
=
file
(
gajimpaths
[
u
'
dbus.env
'
],
"
r
"
)
dbus_env
=
open
(
gajimpaths
[
u
'
dbus.env
'
],
"
r
"
)
except
Exception
:
return
False
try
:
...
...
@@ -64,7 +64,7 @@ def setEnv(env):
def
writeEnv
(
env
):
gajimpaths
.
add_from_root
(
u
'
dbus.env
'
,
u
'
dbus.env
'
)
try
:
dbus_env
=
file
(
gajimpaths
[
u
'
dbus.env
'
],
"
w+
"
)
dbus_env
=
open
(
gajimpaths
[
u
'
dbus.env
'
],
"
w+
"
)
dbus_env
.
write
(
"
DBUS_SESSION_BUS_ADDRESS=
\"
"
+
env
[
0
]
+
"
\"\n
"
)
dbus_env
.
write
(
"
DBUS_SESSION_BUS_PID=
\"
"
+
env
[
1
]
+
"
\"\n
"
)
dbus_env
.
close
()
...
...
This diff is collapsed.
Click to expand it.
src/osx/growler.py
+
2
−
2
View file @
ba12a63d
...
...
@@ -23,7 +23,7 @@ growler = None
def
init
():
global
growler
,
notifications
icon
=
file
(
os
.
path
.
join
(
gajim
.
DATA_DIR
,
"
pixmaps
"
,
"
gajim.icns
"
),
"
r
"
)
icon
=
open
(
os
.
path
.
join
(
gajim
.
DATA_DIR
,
"
pixmaps
"
,
"
gajim.icns
"
),
"
r
"
)
growler
=
GrowlNotifier
(
applicationName
=
"
Gajim
"
,
notifications
=
notifications
,
applicationIcon
=
icon
.
read
(),
...
...
@@ -46,7 +46,7 @@ def notify(event_type, jid, account, msg_type, path_to_image, title, text):
path_to_image
=
os
.
path
.
abspath
(
os
.
path
.
join
(
gajim
.
DATA_DIR
,
'
pixmaps
'
,
'
events
'
,
'
chat_msg_recv.png
'
))
# img to display
icon
=
file
(
path_to_image
,
"
r
"
)
icon
=
open
(
path_to_image
,
"
r
"
)
context
=
[
account
,
jid
,
msg_type
]
growler
.
notify
(
event_type
,
title
,
text
,
icon
.
read
(),
False
,
None
,
context
)
...
...
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