Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
62
Issues
62
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
9bb2bc5c
Commit
9bb2bc5c
authored
Dec 08, 2018
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[preview] Dont crash on errors in other threads
parent
51096a04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
url_image_preview/url_image_preview.py
url_image_preview/url_image_preview.py
+13
-6
No files found.
url_image_preview/url_image_preview.py
View file @
9bb2bc5c
...
...
@@ -379,12 +379,12 @@ class Base(object):
width
,
height
,
GdkPixbuf
.
InterpType
.
BILINEAR
)
thumbnail
.
savev
(
thumbpath
,
'png'
,
[],
[])
except
Exception
as
error
:
dialogs
.
ErrorDialog
(
GLib
.
idle_add
(
self
.
_raise_error_dialog
,
_
(
'Could not save file'
),
_
(
'Exception raised while saving thumbnail '
'for image file (see error log for more '
'information)'
),
transient_for
=
app
.
app
.
get_active_window
())
'information)'
))
log
.
exception
(
error
)
return
return
thumbnail
...
...
@@ -545,11 +545,11 @@ class Base(object):
# Write file to harddisk
self
.
_write_file
(
filepath
,
mem
)
except
Exception
as
e
:
dialogs
.
ErrorDialog
(
GLib
.
idle_add
(
self
.
_raise_error_dialog
,
_
(
'Could not save file'
),
_
(
'Exception raised while saving image file'
' (see error log for more information)'
),
transient_for
=
app
.
app
.
get_active_window
())
' (see error log for more information)'
))
log
.
error
(
str
(
e
))
# Create thumbnail, write it to harddisk and return it
...
...
@@ -713,5 +713,12 @@ class Base(object):
# menu.popup(None, None, None, event.button, event.time)
menu
.
popup_at_pointer
(
event
)
@
staticmethod
def
_raise_error_dialog
(
pritext
,
sectext
):
# Used by methods that run in a different thread
dialogs
.
ErrorDialog
(
pritext
,
sectext
,
transient_for
=
app
.
app
.
get_active_window
())
def
disconnect_from_chat_control
(
self
):
pass
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