Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/OficinaActivity.py
diff options
context:
space:
mode:
authorAlexandre Antonino Gonçalves Martinazzo <alexandremartinazzo@gmail.com>2007-08-06 18:14:02 (GMT)
committer Alexandre Antonino Gonçalves Martinazzo <alexandremartinazzo@gmail.com>2007-08-06 18:14:02 (GMT)
commite28ee58054e4248ac916b2f1d4a4bfe557d45f16 (patch)
tree460e8217db097bfeb39ab99b818d8f1e4d67e1ca /OficinaActivity.py
parent61b8778e4abdbece8de2225ed2190bd1bbe94b45 (diff)
New signals added in Area.py: undo & redo
Diffstat (limited to 'OficinaActivity.py')
-rw-r--r--OficinaActivity.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/OficinaActivity.py b/OficinaActivity.py
index a75810b..4169554 100644
--- a/OficinaActivity.py
+++ b/OficinaActivity.py
@@ -60,7 +60,6 @@ import gtk
from sugar.activity import activity
-#from Oficina import Oficina
from toolbox import Toolbox
from Area import Area
import logging
@@ -81,17 +80,18 @@ class OficinaActivity(activity.Activity):
os.chdir(activity.get_bundle_path())
#print activity.get_bundle_path()
+ self._fixed = gtk.Fixed()
+ self._area = Area(self)
+
toolbox = Toolbox(self)
self.set_toolbox(toolbox)
toolbox.show()
- # addind a textview widget
sw = gtk.ScrolledWindow()
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
- self._fixed = gtk.Fixed()
- self._area = Area(self)
+
color = gtk.gdk.color_parse("white")
self._fixed.modify_bg(gtk.STATE_NORMAL, color)
@@ -126,16 +126,14 @@ class OficinaActivity(activity.Activity):
file_path --
'''
- logging.debug('reading file')
- logging.debug(file_path)
+ logging.debug('reading file %s', file_path)
+# logging.debug(file_path)
- #self._area.d.limpatudo()
- #self._area.d.clear()
self._area.d.loadImage(file_path, self._area)
# Does this work?
- self._area.undo_times = 1
- self._area.redo_times = 0
+# self._area.undo_times = 1
+# self._area.redo_times = 0
def write_file(self, file_path):
@@ -145,8 +143,8 @@ class OficinaActivity(activity.Activity):
file_path --
'''
- logging.debug('writting file')
- logging.debug(file_path)
+ logging.debug('saving as PNG')
+ logging.debug('writting file %s', file_path)
width, height = self._area.window.get_size()
pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, width, height)