[ocrfeeder/master-wip: 4/5] Update the box editor's OCR controls sensitiveness
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder/master-wip: 4/5] Update the box editor's OCR controls sensitiveness
- Date: Fri, 1 Aug 2014 09:50:04 +0000 (UTC)
commit 80c95ae944bb37366f5a23dbb4e7d675aacb86d4
Author: Joaquim Rocha <me joaquimrocha com>
Date: Wed Jul 30 23:59:07 2014 +0200
Update the box editor's OCR controls sensitiveness
The sensitiveness is updated according to the existence of OCR
engines so the user is not able to perform the OCR recognition
when there are no engines configured.
src/ocrfeeder/studio/widgetPresenter.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/ocrfeeder/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
index 47e738e..eeb23e6 100644
--- a/src/ocrfeeder/studio/widgetPresenter.py
+++ b/src/ocrfeeder/studio/widgetPresenter.py
@@ -688,6 +688,11 @@ class BoxEditor(Gtk.ScrolledWindow):
self.ocr_combo_box.append_text(engine)
if engines_list:
self.ocr_combo_box.set_active(0)
+ self.ocr_combo_box.set_sensitive(True)
+ self.perform_ocr_button.set_sensitive(True)
+ else:
+ self.ocr_combo_box.set_sensitive(False)
+ self.perform_ocr_button.set_sensitive(False)
def setType(self, new_type):
if new_type == TEXT_TYPE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]