[ocrfeeder] Move the contents to widgetPresenter
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Move the contents to widgetPresenter
- Date: Sat, 20 Dec 2014 22:41:01 +0000 (UTC)
commit e07bbd103447c13ecc2cecf7734f168691da6843
Author: Joaquim Rocha <me joaquimrocha com>
Date: Sat Dec 20 22:30:16 2014 +0000
Move the contents to widgetPresenter
po/POTFILES.in | 1 -
src/ocrfeeder/studio/Makefile.am | 1 -
src/ocrfeeder/studio/customWidgets.py | 52 -------------------------------
src/ocrfeeder/studio/widgetPresenter.py | 31 ++++++++++++++++++-
4 files changed, 30 insertions(+), 55 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 677510c..a4caf0a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,7 +7,6 @@ src/ocrfeeder/feeder/documentGeneration.py
src/ocrfeeder/feeder/imageManipulation.py
src/ocrfeeder/feeder/layoutAnalysis.py
src/ocrfeeder/feeder/ocrEngines.py
-src/ocrfeeder/studio/customWidgets.py
src/ocrfeeder/studio/dataHolder.py
src/ocrfeeder/studio/studioBuilder.py
src/ocrfeeder/studio/widgetModeler.py
diff --git a/src/ocrfeeder/studio/Makefile.am b/src/ocrfeeder/studio/Makefile.am
index 8a210f4..74c99a7 100644
--- a/src/ocrfeeder/studio/Makefile.am
+++ b/src/ocrfeeder/studio/Makefile.am
@@ -2,7 +2,6 @@ ocrfeeder_studiodir = $(pkgpythondir)/studio/
ocrfeeder_studio_PYTHON = \
__init__.py \
- customWidgets.py \
dataHolder.py \
project.py \
studioBuilder.py \
diff --git a/src/ocrfeeder/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
index f0b51b1..5bdb281 100644
--- a/src/ocrfeeder/studio/widgetPresenter.py
+++ b/src/ocrfeeder/studio/widgetPresenter.py
@@ -19,7 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###########################################################################
-from customWidgets import PlainFrame, PlainExpander
from dataHolder import DataBox, TEXT_TYPE, IMAGE_TYPE
from ocrfeeder.util import lib, PAPER_SIZES
from ocrfeeder.util.configuration import ConfigurationManager
@@ -2172,3 +2171,33 @@ class SpellCheckerDialog():
def __fillSuggest(self, suggests):
for suggest in suggests:
self.suggestions_list.append([suggest])
+
+class PlainFrame(Gtk.Frame):
+
+ def __init__(self, label):
+ super(PlainFrame, self).__init__()
+ label_widget = Gtk.Label()
+ label_widget.set_markup('<b>' + label + '</b>')
+ self.set_label_widget(label_widget)
+ self._container = Gtk.Alignment.new(0, 0, 1, 1)
+ self._container.set_padding(12, 0, 12, 12)
+ super(PlainFrame, self).add(self._container)
+ self.set_shadow_type(Gtk.ShadowType.NONE)
+
+ def add(self, widget):
+ self._container.add(widget)
+
+class PlainExpander(Gtk.Expander):
+
+ def __init__(self, label):
+ super(PlainExpander, self).__init__()
+ label_widget = Gtk.Label()
+ label_widget.set_markup('<b>' + label + '</b>')
+ self.set_label_widget(label_widget)
+ self._container = Gtk.Alignment.new(0, 0, 1, 1)
+ self._container.set_padding(12, 0, 12, 12)
+ super(PlainExpander, self).add(self._container)
+ self.set_expanded(False)
+
+ def add(self, widget):
+ self._container.add(widget)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]