Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
gajim
gajim-plugins
Commits
b208cd5f
Commit
b208cd5f
authored
Jul 09, 2019
by
Daniel Brötzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[omemo] Remove YesNoDialog
parent
f8c6000a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
omemo/file_crypto.py
omemo/file_crypto.py
+15
-6
No files found.
omemo/file_crypto.py
View file @
b208cd5f
...
...
@@ -35,7 +35,9 @@ from gajim.common import app
from
gajim.common
import
configpaths
from
gajim.common.const
import
URIType
from
gajim.plugins.plugins_i18n
import
_
from
gajim.gtk.dialogs
import
ErrorDialog
,
YesNoDialog
from
gajim.gtk.dialogs
import
ErrorDialog
from
gajim.gtk.dialogs
import
DialogButton
from
gajim.gtk.dialogs
import
NewConfirmationDialog
from
omemo.gtk.progress
import
ProgressWindow
from
omemo.backend.aes
import
aes_decrypt_file
...
...
@@ -132,13 +134,20 @@ class FileDecryption:
file
.
filepath
=
os
.
path
.
join
(
DIRECTORY
,
newfilename
)
def
finished
(
self
,
file
):
question
=
_
(
'Do you want to open %s'
)
%
file
.
filename
YesNoDialog
(
_
(
'Open File'
),
question
,
transient_for
=
self
.
window
,
on_response_yes
=
(
self
.
open_file
,
file
.
filepath
))
NewConfirmationDialog
(
_
(
'Open File'
),
_
(
'Open File?'
),
_
(
'Do you want to open %s?'
)
%
file
.
filename
,
[
DialogButton
.
make
(
'Cancel'
,
text
=
_
(
'_No'
)),
DialogButton
.
make
(
'OK'
,
text
=
_
(
'_Open'
),
callback
=
self
.
open_file
(
file
.
filepath
))],
transient_for
=
self
.
window
).
show
()
return
False
def
open_file
(
self
,
checked
,
path
):
def
open_file
(
self
,
path
):
if
platform
.
system
()
==
"Windows"
:
os
.
startfile
(
path
)
elif
platform
.
system
()
==
"Darwin"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment