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
0cb3d7cb
Commit
0cb3d7cb
authored
18 years ago
by
dkirov
Browse files
Options
Downloads
Patches
Plain Diff
we don't need escape for strings, that are
displayed as text
parent
7719f41e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/filetransfers_window.py
+8
-13
8 additions, 13 deletions
src/filetransfers_window.py
with
8 additions
and
13 deletions
src/filetransfers_window.py
+
8
−
13
View file @
0cb3d7cb
...
...
@@ -173,15 +173,14 @@ class FileTransfersWindow:
(
file_path
,
file_name
)
=
os
.
path
.
split
(
file_props
[
'
file-name
'
])
else
:
file_name
=
file_props
[
'
name
'
]
sectext
=
'
\t
'
+
_
(
'
Filename: %s
'
)
%
\
gtkgui_helpers
.
escape_for_pango_markup
(
file_name
)
sectext
=
'
\t
'
+
_
(
'
Filename: %s
'
)
%
file_name
sectext
+=
'
\n\t
'
+
_
(
'
Size: %s
'
)
%
\
helpers
.
convert_bytes
(
file_props
[
'
size
'
])
if
file_props
[
'
type
'
]
==
'
r
'
:
jid
=
unicode
(
file_props
[
'
sender
'
]).
split
(
'
/
'
)[
0
]
sender_name
=
gajim
.
contacts
.
get_first_contact_from_jid
(
file_props
[
'
tt_account
'
],
jid
).
get_shown_name
()
sender
=
gtkgui_helpers
.
escape_for_pango_markup
(
sender_name
)
sender
=
sender_name
else
:
#You is a reply of who sent a file
sender
=
_
(
'
You
'
)
...
...
@@ -191,14 +190,13 @@ class FileTransfersWindow:
jid
=
unicode
(
file_props
[
'
receiver
'
]).
split
(
'
/
'
)[
0
]
receiver_name
=
gajim
.
contacts
.
get_first_contact_from_jid
(
file_props
[
'
tt_account
'
],
jid
).
get_shown_name
()
recipient
=
gtkgui_helpers
.
escape_for_pango_markup
(
receiver_name
)
recipient
=
receiver_name
else
:
#You is a reply of who received a file
recipient
=
_
(
'
You
'
)
sectext
+=
recipient
if
file_props
[
'
type
'
]
==
'
r
'
:
sectext
+=
'
\n\t
'
+
_
(
'
Saved in: %s
'
)
%
\
gtkgui_helpers
.
escape_for_pango_markup
(
file_path
)
sectext
+=
'
\n\t
'
+
_
(
'
Saved in: %s
'
)
%
file_path
self
.
dialog
=
dialogs
.
HigDialog
(
None
,
gtk
.
MESSAGE_INFO
,
gtk
.
BUTTONS_NONE
,
_
(
'
File transfer completed
'
),
sectext
)
if
file_props
[
'
type
'
]
==
'
r
'
:
...
...
@@ -235,10 +233,8 @@ _('Connection with peer cannot be established.'))
file_name
=
os
.
path
.
basename
(
file_props
[
'
file-name
'
])
else
:
file_name
=
file_props
[
'
name
'
]
sectext
=
'
\t
'
+
_
(
'
Filename: %s
'
)
%
\
gtkgui_helpers
.
escape_for_pango_markup
(
file_name
)
sectext
+=
'
\n\t
'
+
_
(
'
Sender: %s
'
)
%
\
gtkgui_helpers
.
escape_for_pango_markup
(
jid
)
sectext
=
'
\t
'
+
_
(
'
Filename: %s
'
)
%
file_name
sectext
+=
'
\n\t
'
+
_
(
'
Sender: %s
'
)
%
jid
dialogs
.
ErrorDialog
(
_
(
'
File transfer stopped by the contact of the other side
'
),
\
sectext
)
self
.
tree
.
get_selection
().
unselect_all
()
...
...
@@ -563,9 +559,8 @@ _('Connection with peer cannot be established.'))
(
file_path
,
file_name
)
=
os
.
path
.
split
(
file_props
[
'
file-name
'
])
else
:
file_name
=
file_props
[
'
name
'
]
text_props
=
gtkgui_helpers
.
escape_for_pango_markup
(
file_name
)
+
'
\n
'
text_props
+=
gtkgui_helpers
.
escape_for_pango_markup
(
contact
.
get_shown_name
())
text_props
=
file_name
+
'
\n
'
text_props
+=
contact
.
get_shown_name
()
self
.
model
.
set
(
iter
,
1
,
text_labels
,
2
,
text_props
,
C_SID
,
file_props
[
'
type
'
]
+
file_props
[
'
sid
'
])
self
.
set_progress
(
file_props
[
'
type
'
],
file_props
[
'
sid
'
],
0
,
iter
)
...
...
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