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
99de39fc
Commit
99de39fc
authored
18 years ago
by
dkirov
Browse files
Options
Downloads
Patches
Plain Diff
don't keep dialog references in self.
(problem when we open several FT choosers, or info dialogs)
parent
64e66817
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
+10
-11
10 additions, 11 deletions
src/filetransfers_window.py
with
10 additions
and
11 deletions
src/filetransfers_window.py
+
10
−
11
View file @
99de39fc
...
...
@@ -153,9 +153,8 @@ class FileTransfersWindow:
'''
show a dialog saying that file (file_props) has been transferred
'''
self
.
window
.
present
()
self
.
window
.
window
.
focus
()
def
on_open
(
widget
,
file_props
):
self
.
dialog
.
destroy
()
dialog
.
destroy
()
if
not
file_props
.
has_key
(
'
file-name
'
):
return
(
path
,
file
)
=
os
.
path
.
split
(
file_props
[
'
file-name
'
])
...
...
@@ -192,17 +191,17 @@ class FileTransfersWindow:
sectext
+=
recipient
if
file_props
[
'
type
'
]
==
'
r
'
:
sectext
+=
'
\n\t
'
+
_
(
'
Saved in: %s
'
)
%
file_path
self
.
dialog
=
dialogs
.
HigDialog
(
None
,
gtk
.
MESSAGE_INFO
,
gtk
.
BUTTONS_NONE
,
dialog
=
dialogs
.
HigDialog
(
None
,
gtk
.
MESSAGE_INFO
,
gtk
.
BUTTONS_NONE
,
_
(
'
File transfer completed
'
),
sectext
)
if
file_props
[
'
type
'
]
==
'
r
'
:
button
=
gtk
.
Button
(
_
(
'
_Open Containing Folder
'
))
button
.
connect
(
'
clicked
'
,
on_open
,
file_props
)
self
.
dialog
.
action_area
.
pack_start
(
button
)
ok_button
=
self
.
dialog
.
add_button
(
gtk
.
STOCK_OK
,
gtk
.
RESPONSE_OK
)
dialog
.
action_area
.
pack_start
(
button
)
ok_button
=
dialog
.
add_button
(
gtk
.
STOCK_OK
,
gtk
.
RESPONSE_OK
)
def
on_ok
(
widget
):
self
.
dialog
.
destroy
()
dialog
.
destroy
()
ok_button
.
connect
(
'
clicked
'
,
on_ok
)
self
.
dialog
.
show_all
()
dialog
.
show_all
()
def
show_request_error
(
self
,
file_props
):
'''
show error dialog to the recipient saying that transfer
...
...
@@ -237,7 +236,7 @@ _('Connection with peer cannot be established.'))
def
show_file_send_request
(
self
,
account
,
contact
):
def
on_ok
(
widget
):
file_dir
=
None
files_path_list
=
self
.
dialog
.
get_filenames
()
files_path_list
=
dialog
.
get_filenames
()
files_path_list
=
gtkgui_helpers
.
decode_filechooser_file_paths
(
files_path_list
)
for
file_path
in
files_path_list
:
...
...
@@ -245,16 +244,16 @@ _('Connection with peer cannot be established.'))
file_dir
=
os
.
path
.
dirname
(
file_path
)
if
file_dir
:
gajim
.
config
.
set
(
'
last_send_dir
'
,
file_dir
)
self
.
dialog
.
destroy
()
dialog
.
destroy
()
self
.
dialog
=
dialogs
.
FileChooserDialog
(
_
(
'
Choose File to Send...
'
),
dialog
=
dialogs
.
FileChooserDialog
(
_
(
'
Choose File to Send...
'
),
gtk
.
FILE_CHOOSER_ACTION_OPEN
,
(
gtk
.
STOCK_CANCEL
,
gtk
.
RESPONSE_CANCEL
),
gtk
.
RESPONSE_OK
,
True
,
# select multiple true as we can select many files to send
gajim
.
config
.
get
(
'
last_send_dir
'
),
)
btn
=
self
.
dialog
.
add_button
(
_
(
'
_Send
'
),
gtk
.
RESPONSE_OK
)
btn
=
dialog
.
add_button
(
_
(
'
_Send
'
),
gtk
.
RESPONSE_OK
)
btn
.
set_use_stock
(
True
)
# FIXME: add send icon to this button (JUMP_TO)
btn
.
connect
(
'
clicked
'
,
on_ok
)
...
...
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