[ocrfeeder] Add the deskew images option to the preferences dialog
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Add the deskew images option to the preferences dialog
- Date: Tue, 27 Jul 2010 22:14:17 +0000 (UTC)
commit a17d16ed497899f47c6c19441f3bf1046850b7fb
Author: Joaquim Rocha <jrocha igalia com>
Date: Tue Jul 20 17:48:58 2010 +0200
Add the deskew images option to the preferences dialog
studio/widgetPresenter.py | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/studio/widgetPresenter.py b/studio/widgetPresenter.py
index 8d8a227..b60d35a 100644
--- a/studio/widgetPresenter.py
+++ b/studio/widgetPresenter.py
@@ -1103,7 +1103,8 @@ class PreferencesDialog(gtk.Dialog):
self.__makeGeneralPreferences(self.__makeTemporaryFolder(),
self.__makeColors())
self.__makeToolsPreferences(self.__makeUnpaper(),
- self.__makeEngines())
+ self.__makeEngines(),
+ self.__makePreProcessorPreferences())
self.__makeRecognitionPreferences(self.__makeTextPreferences(),
self.__makeWindowSize(),
self.__makeColumnDetectionPreferences(),
@@ -1146,6 +1147,8 @@ class PreferencesDialog(gtk.Dialog):
self.adjust_boxes_bounds.get_active()
self.configuration_manager.bounds_adjustment_size = \
self.__getBoundsAdjustmentSize()
+ self.configuration_manager.deskew_images_after_addition = \
+ self.deskew_images.get_active()
index = self.engines_combo.get_active()
if index != -1:
lib.debug('ACTIVE INDEX: ', index, self.ocr_engines[index][0].name)
@@ -1447,6 +1450,19 @@ class PreferencesDialog(gtk.Dialog):
color_button.set_alpha(color[3] << 8)
return color_button
+ def __makePreProcessorPreferences(self):
+ preprocessing_frame = PlainFrame(_('Image Pre-processing'))
+ self.deskew_images = gtk.CheckButton(_('Des_kew images'),
+ use_underline = True)
+ self.deskew_images.set_tooltip_text(_('Tries to straighten the images '
+ 'before they are added'))
+ self.deskew_images.set_active(
+ self.configuration_manager.deskew_images_after_addition)
+ box = gtk.HBox()
+ box.pack_start(self.deskew_images, False)
+ preprocessing_frame.add(box)
+ return preprocessing_frame
+
class SystemEnginesDialog(gtk.Dialog):
def __init__(self, engines):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]