Skip to content

Commit

Permalink
Fix return to the main window if no text is found
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Maksimov committed Jun 7, 2022
1 parent ff99aa4 commit 78da913
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frog/screenshot_backend.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# screenshot_backend.py
#
# Copyright 2021 Andrey Maksimov
# Copyright 2022 Andrey Maksimov
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -112,6 +112,9 @@ def decode_image(self, lang: str, filename: str, copy: bool = False) -> None:

if extracted:
self.emit('decoded', extracted, copy)

else:
self.emit('erorr', f'No text found.')

def capture_cancelled(self, cancellable: Gio.Cancellable) -> None:
self.emit('error', 'Cancelled')

0 comments on commit 78da913

Please sign in to comment.