[ocrfeeder] Use the configuration variables directly instead of their get methods
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Use the configuration variables directly instead of their get methods
- Date: Tue, 27 Jul 2010 22:13:33 +0000 (UTC)
commit 7f8ad5ac8f3861ce7c7df5754d0eb5bbc3363dec
Author: Joaquim Rocha <jrocha igalia com>
Date: Mon Jul 12 16:49:48 2010 +0200
Use the configuration variables directly instead of their get methods
studio/studioBuilder.py | 4 ++--
studio/widgetModeler.py | 16 ++++++++--------
studio/widgetPresenter.py | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/studio/studioBuilder.py b/studio/studioBuilder.py
index 6a5434e..b376822 100644
--- a/studio/studioBuilder.py
+++ b/studio/studioBuilder.py
@@ -146,7 +146,7 @@ class Studio:
paths.append(path)
for path in paths:
if os.path.splitext(path)[1] == '.pdf':
- folder = lib.convertPdfToImages(path, self.configuration_manager.getTemporaryDir())
+ folder = lib.convertPdfToImages(path, self.configuration_manager.temporary_dir)
self.__addImagesToReviewer(lib.getImagesFromFolder(folder))
else:
try:
@@ -181,7 +181,7 @@ class Studio:
self.main_window.window)
item = AsyncItem(lib.convertPdfToImages,
(file_name,
- self.configuration_manager.getTemporaryDir()),
+ self.configuration_manager.temporary_dir),
self.__loadPdfFinishedCb,
(dialog,))
info = (_('Loading PDF'), _('Please waitâ?¦'))
diff --git a/studio/widgetModeler.py b/studio/widgetModeler.py
index 6fe9f3c..9b00caf 100644
--- a/studio/widgetModeler.py
+++ b/studio/widgetModeler.py
@@ -385,9 +385,9 @@ class ImageReviewer_Controler:
def addImage(self, pixbuf, image):
image_reviewer = ImageReviewer(self.main_window, image, self.ocr_engines)
image_reviewer.selectable_boxes_area.connect('changed_zoom', self.__setZoomStatus)
- image_reviewer.setTextFillColor(self.configuration_manager.getTextFill())
- image_reviewer.setBoxesStrokeColor(self.configuration_manager.getBoxesStroke())
- image_reviewer.setImageFillColor(self.configuration_manager.getImageFill())
+ image_reviewer.setTextFillColor(self.configuration_manager.text_fill)
+ image_reviewer.setBoxesStrokeColor(self.configuration_manager.boxes_stroke)
+ image_reviewer.setImageFillColor(self.configuration_manager.image_fill)
self.image_reviewer_dict[pixbuf] = image_reviewer
self.addImageReviewer(image_reviewer.reviewer_area)
return image_reviewer
@@ -492,7 +492,7 @@ class ImageReviewer_Controler:
if not project_name.endswith('.ocrf'):
project_name += '.ocrf'
pages_data = self.getPagesData(self.getPixbufsSorted())
- project_saver = ProjectSaver(pages_data, self.configuration_manager.getTemporaryDir())
+ project_saver = ProjectSaver(pages_data, self.configuration_manager.temporary_dir)
project_saver.serialize(project_name)
def openProject(self, clear_current = True):
@@ -601,7 +601,7 @@ class ImageReviewer_Controler:
def unpaperTool(self):
current_reviewer = self.__getCurrentReviewer()
- unpaper_dialog = UnpaperDialog(current_reviewer, self.configuration_manager.getUnpaper(), self.configuration_manager.getTemporaryDir())
+ unpaper_dialog = UnpaperDialog(current_reviewer, self.configuration_manager.unpaper, self.configuration_manager.temporary_dir)
if unpaper_dialog.run() == gtk.RESPONSE_ACCEPT:
unpapered_image = unpaper_dialog.getUnpaperedImage()
current_reviewer.updateBackgroundImage(unpapered_image)
@@ -621,9 +621,9 @@ class ImageReviewer_Controler:
def updateFromConfiguration(self):
for reviewer in self.image_reviewer_dict.values():
- reviewer.setTextFillColor(self.configuration_manager.getTextFill())
- reviewer.setBoxesStrokeColor(self.configuration_manager.getBoxesStroke())
- reviewer.setImageFillColor(self.configuration_manager.getImageFill())
+ reviewer.setTextFillColor(self.configuration_manager.text_fill)
+ reviewer.setBoxesStrokeColor(self.configuration_manager.boxes_stroke)
+ reviewer.setImageFillColor(self.configuration_manager.image_fill)
reviewer.updateBoxesColors()
def zoomIn(self, zoom_value = 0.05):
diff --git a/studio/widgetPresenter.py b/studio/widgetPresenter.py
index 6456438..3ae38db 100644
--- a/studio/widgetPresenter.py
+++ b/studio/widgetPresenter.py
@@ -1216,7 +1216,7 @@ class PreferencesDialog(gtk.Dialog):
unpaper_frame = PlainFrame(_('Path to unpaper'))
self.unpaper_entry = gtk.Entry()
self.unpaper_entry.set_width_chars(30)
- self.unpaper_entry.set_text(self.configuration_manager.getUnpaper())
+ self.unpaper_entry.set_text(self.configuration_manager.unpaper)
self.unpaper_select = gtk.Button(_('Choose'), gtk.STOCK_OPEN)
unpaper_hbox = gtk.HBox()
unpaper_hbox.pack_start(self.unpaper_entry, False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]