Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-01-05 15:55:26 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-01-05 15:55:26 (GMT)
commitd208fb9fa335ad64dc5019346830c538caf30b36 (patch)
tree3f169bac2447c5913727008d912073a591e01743
parentfb6fa5b12d689bc0204fbb4a844fab9b4b7a1de4 (diff)
Correct indentation.
-rw-r--r--XbookActivity.py76
1 files changed, 38 insertions, 38 deletions
diff --git a/XbookActivity.py b/XbookActivity.py
index 660f53f..94c953d 100644
--- a/XbookActivity.py
+++ b/XbookActivity.py
@@ -7,41 +7,41 @@ from sugar.activity.Activity import Activity
from toolbar import Toolbar
class XbookActivity(Activity):
- def __init__(self):
- Activity.__init__(self)
-
- logging.debug('Starting xbook...')
- self.set_title(_('Read Activity'))
-
- evince.job_queue_init()
- self._evince_view = evince.View()
-
- vbox = gtk.VBox(False, 0)
- self.add(vbox)
- vbox.show()
-
- self._toolbar = Toolbar(self._evince_view)
- vbox.pack_start(self._toolbar, False)
- self._toolbar.show()
-
- scrolled = gtk.ScrolledWindow()
- vbox.pack_start(scrolled, True, True)
- scrolled.show()
-
- scrolled.add(self._evince_view)
- self._evince_view.show()
-
- def execute(self, command, args):
- if(command == 'open_document'):
- document = evince.factory_get_document('file://' + args[0])
- self._evince_view.set_document(document)
-
- # FIXME: Hack for rendering in a fast way by having an integer scale factor.
- self._evince_view.set_sizing_mode(2)
- self._evince_view.set_zoom(2.0, False)
-
- self._toolbar.set_document(document)
- return True
-
- else :
- return False
+ def __init__(self):
+ Activity.__init__(self)
+
+ logging.debug('Starting xbook...')
+ self.set_title(_('Read Activity'))
+
+ evince.job_queue_init()
+ self._evince_view = evince.View()
+
+ vbox = gtk.VBox(False, 0)
+ self.add(vbox)
+ vbox.show()
+
+ self._toolbar = Toolbar(self._evince_view)
+ vbox.pack_start(self._toolbar, False)
+ self._toolbar.show()
+
+ scrolled = gtk.ScrolledWindow()
+ vbox.pack_start(scrolled, True, True)
+ scrolled.show()
+
+ scrolled.add(self._evince_view)
+ self._evince_view.show()
+
+ def execute(self, command, args):
+ if(command == 'open_document'):
+ document = evince.factory_get_document('file://' + args[0])
+ self._evince_view.set_document(document)
+
+ # FIXME: Hack for rendering in a fast way by having an integer scale factor.
+ self._evince_view.set_sizing_mode(2)
+ self._evince_view.set_zoom(2.0, False)
+
+ self._toolbar.set_document(document)
+
+ return True
+ else:
+ return False