Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Antonino Gonçalves Martinazzo <alexandremartinazzo@gmail.com>2007-09-12 15:30:53 (GMT)
committer Alexandre Antonino Gonçalves Martinazzo <alexandremartinazzo@gmail.com>2007-09-12 15:30:53 (GMT)
commit01cbd87929d18cf495d86ea17a00313efad68249 (patch)
tree6ac59d40ac3f0a81b46e9537fbdd4340bd1665c2
parent5e07389d79dbb25ecb819a89550e2a087a840c6a (diff)
Bug #3320 fixed; Default tab now is 'Tools'
MANIFEST file updated Merging with other commits (at svn): - Updated translations files (nathalia.sautchuk) - adding greek name of the activity (nathalia.sautchuk) - adding greek and arabic translations (nathalia.sautchuk) - resize func is changed, work better but pixmaps are confused , Andre knows more about this (pekayatt) - New coments standard with doxygen compatibility (pekayatt)
-rw-r--r--Area.py349
-rw-r--r--Desenho.py695
-rw-r--r--MANIFEST6
-rw-r--r--OficinaActivity.py21
-rw-r--r--locale/ar/LC_MESSAGES/ar.mobin0 -> 2162 bytes
-rw-r--r--locale/ar/LC_MESSAGES/ar.po256
-rw-r--r--locale/ar/activity.linfo2
-rw-r--r--locale/de/LC_MESSAGES/de.mobin2297 -> 1942 bytes
-rw-r--r--locale/de/LC_MESSAGES/de.po300
-rw-r--r--locale/el/LC_MESSAGES/el.mobin0 -> 2215 bytes
-rw-r--r--locale/el/LC_MESSAGES/el.po250
-rw-r--r--locale/el/activity.linfo2
-rw-r--r--locale/es/LC_MESSAGES/es.mobin2337 -> 2517 bytes
-rw-r--r--locale/es/LC_MESSAGES/es.po296
-rw-r--r--locale/fr/LC_MESSAGES/fr.mobin2329 -> 2324 bytes
-rw-r--r--locale/fr/LC_MESSAGES/fr.po288
-rw-r--r--locale/ko_KO/LC_MESSAGES/ko_KO.mobin2069 -> 1942 bytes
-rw-r--r--locale/ko_KO/LC_MESSAGES/ko_KO.po300
-rw-r--r--locale/paint.pot196
-rw-r--r--locale/pt_BR/LC_MESSAGES/pt_BR.mobin2362 -> 2517 bytes
-rw-r--r--locale/pt_BR/LC_MESSAGES/pt_BR.po290
-rw-r--r--locale/zh_CN/LC_MESSAGES/zh_CN.mobin2302 -> 1918 bytes
-rw-r--r--locale/zh_CN/LC_MESSAGES/zh_CN.po287
-rw-r--r--locale/zh_TW/LC_MESSAGES/zh_TW.mobin2301 -> 1918 bytes
-rw-r--r--locale/zh_TW/LC_MESSAGES/zh_TW.po287
-rwxr-xr-xsetup.py5
-rw-r--r--toolbox.py297
27 files changed, 2182 insertions, 1945 deletions
diff --git a/Area.py b/Area.py
index 448ee45..80e6961 100644
--- a/Area.py
+++ b/Area.py
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
+
"""
-Area.py
+@namespace Area
-Tools and events manipulation
+ Tools and events manipulation
Copyright 2007, NATE-LSI-EPUSP
@@ -53,44 +54,35 @@ Roseli de Deus Lopes (roseli@lsi.usp.br)
"""
-# import pygtk
-# pygtk.require('2.0')
+
import gtk, gobject, logging, os
-# import sys, socket
-# from gtk import gdk
import math
import pango
from fill import *
-# import Image
-# import StringIO
from Desenho import Desenho
-WIDTH = 800
-HEIGHT = 600
-
+##Tools and events manipulation are handle with this class.
class Area(gtk.DrawingArea):
+
__gsignals__ = {
'undo' : (gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ([])),
'redo' : (gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ([])),
'action-saved' : (gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ([])),
- #TODO: this signal still not used.
-# 'copy' : (gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ([])),
'selected' : (gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ([])),
}
def __init__(self, janela):
""" Initialize the object from class Area which is derived from gtk.DrawingArea.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- janela -- the parent window
+ @param self -- the Area object (GtkDrawingArea)
+ @param janela -- the parent window
"""
logging.debug('Area.__init__(self, janela)')
gtk.DrawingArea.__init__(self)
- self.set_size_request(WIDTH, HEIGHT)
+ self.set_size_request(800, 600)
self.set_events(gtk.gdk.POINTER_MOTION_MASK |
gtk.gdk.POINTER_MOTION_HINT_MASK |
gtk.gdk.BUTTON_PRESS_MASK |
@@ -103,7 +95,7 @@ class Area(gtk.DrawingArea):
self.connect("button_release_event", self.mouseup)
self.set_extension_events(gtk.gdk.EXTENSION_EVENTS_CURSOR)
-
+ ##Define which tool is been used
self.tool = None
self.desenha = False
self.selmove = False
@@ -138,26 +130,28 @@ class Area(gtk.DrawingArea):
self._set_selection_bounds(0,0,0,0)
#start of UNDO and REDO
+ ## This flag is used when is the first time you click on Undo
self.first_undo = True
+ ## When you are just clicking on undo or redo and not drawing undo_surf is True
self.undo_surf = False
self.undo_times = 0
self.redo_times = 0
- self.undo_list=[]#pixmaps list to Undo func
+ ##pixmaps list to Undo func
+ self.undo_list=[]
- # Number of sides for regular polygon
+ ##Number of sides for regular polygon
self.polygon_sides = 5
- # Shapes will be filled or not?
+ ##Shapes will be filled or not?
self.fill = True
- # Create a new backing pixmap of the appropriate size
+
def configure_event(self, widget, event):
"""Configure the Area object.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- widget -- the Area object (GtkDrawingArea)
- event -- GdkEvent
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
+ @param event -- GdkEvent
"""
logging.debug('Area.configure_event(self, widget, event)')
@@ -166,12 +160,13 @@ class Area(gtk.DrawingArea):
width = win.get_geometry()[2]
height = win.get_geometry()[3]
+ ##It is the main pixmap, who is display most of the time.
self.pixmap = gtk.gdk.Pixmap(win, width, height, -1)
self.pixmap.draw_rectangle(widget.get_style().white_gc, True, 0, 0, width, height)
-
+ ##This pixmap is showed when we need show something and not draw it.
self.pixmap_temp = gtk.gdk.Pixmap(win, width, height, -1)
self.pixmap_temp.draw_rectangle(widget.get_style().white_gc, True, 0, 0, width, height)
-
+ ##When something is selected this pixmap draw and rectangular box out of the selection
self.pixmap_sel = gtk.gdk.Pixmap(win, width, height, -1)
self.pixmap_sel.draw_rectangle(widget.get_style().white_gc, True, 0, 0, width, height)
@@ -201,13 +196,11 @@ class Area(gtk.DrawingArea):
return True
- # set the new line size
def configure_line(self, size):
- """Configure the line's size.
+ """Configure the new line's size.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- size --
+ @param self -- the Area object (GtkDrawingArea)
+ @param size -- the size of the new line
"""
#logging.debug('Area.configure_line(self, size)')
@@ -216,12 +209,12 @@ class Area(gtk.DrawingArea):
self.gc_line.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
def expose(self, widget, event):
- """Show up the Area object (GtkDrawingArea).
+ """ This function define which pixmap will be showed to the user.
+ Show up the Area object (GtkDrawingArea).
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- widget -- the Area object (GtkDrawingArea)
- event -- GdkEvent
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
+ @param event -- GdkEvent
"""
#logging.debug('Area.expose(self, widget, event)')
@@ -237,12 +230,11 @@ class Area(gtk.DrawingArea):
return False
def mousedown(self,widget,event):
- """Make the Area object (GtkDrawingArea) recognize that the mouse button was pressed.
+ """Make the Area object (GtkDrawingArea) recognize that the mouse button has been pressed.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- widget -- the Area object (GtkDrawingArea)
- event -- GdkEvent
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
+ @param event -- GdkEvent
"""
width, height = self.window.get_size()
@@ -278,24 +270,24 @@ class Area(gtk.DrawingArea):
self.last = -1, -1
self.d.eraser(widget, coords, self.last, self.line_size, self.eraser_shape)
self.last = coords
- if self.tool == 'brush':
+ elif self.tool == 'brush':
self.last = -1, -1
self.d.brush(widget, coords, self.last, self.line_size, self.brush_shape)
self.last = coords
- if self.tool == 'rainbow':
+ elif self.tool == 'rainbow':
self.last = -1, -1
self.d.rainbow(widget, coords, self.last, self.rainbow_counter,self.line_size, self.brush_shape)
self.last = coords
- if self.tool == 'polygon':
+ elif self.tool == 'polygon':
self.configure_line(self.line_size)
x , y, state = event.window.get_pointer()
x0, y0, x1, y1 = self.get_selection_bounds()
-
- if (state & gtk.gdk.BUTTON3_MASK):
+
+ if (state & gtk.gdk.BUTTON3_MASK):#Handle with the right button click event.
self.sel_get_out = True
self.pixmap_sel.draw_drawable(self.gc, self.pixmap_temp, 0,0,0,0, width, height)
- elif state & gtk.gdk.BUTTON1_MASK:
+ elif state & gtk.gdk.BUTTON1_MASK:#Handle with the left button click event.
if not (x0<x<x1 and y0<y<y1) and self.selmove:
self.sel_get_out = True
self.pixmap_sel.draw_drawable(self.gc, self.pixmap_temp, 0,0,0,0, width, height)
@@ -308,21 +300,18 @@ class Area(gtk.DrawingArea):
def mousemove(self,widget,event):
"""Make the Area object (GtkDrawingArea) recognize that the mouse is moving.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- widget -- the Area object (GtkDrawingArea)
- event -- GdkEvent
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
+ @param event -- GdkEvent
"""
x , y, state = event.window.get_pointer()
coords = int(x), int(y)
if state & gtk.gdk.BUTTON1_MASK and self.pixmap != None:
- #eraser
if self.tool == 'eraser':
self.d.eraser(widget, coords, self.last, self.line_size, self.eraser_shape)
self.last = coords
- #brush
elif self.tool == 'brush':
self.d.brush(widget, coords, self.last, self.line_size, self.brush_shape)
self.last = coords
@@ -333,108 +322,90 @@ class Area(gtk.DrawingArea):
self.rainbow_counter = 0
self.last = coords
if self.desenha:
- # line
if self.tool == 'line':
self.configure_line(self.line_size)
- self.d.line(widget, coords)
- # pencil
+ self.d.line(widget, coords)
+
elif self.tool == 'pencil':
self.configure_line(self.line_size)
- self.d.pencil(widget, coords)
- # ellipse
+ self.d.pencil(widget, coords)
+
elif self.tool == 'ellipse':
self.configure_line(self.line_size)
- #self.d.circle(widget,coords,True,True)
self.d.circle(widget,coords,True,self.fill)
- # rectangle
+
elif self.tool == 'rectangle':
self.configure_line(self.line_size)
- #self.d.square(widget,coords,True,True)
self.d.square(widget,coords,True,self.fill)
- # selection
+
elif self.tool == 'marquee-rectangular' and not self.selmove:
x1, y1, x2, y2 = self.d.selection(widget,coords,True,False)
self._set_selection_bounds(x1, y1, x2, y2)
- # selection
+ # selected
elif self.tool == 'marquee-rectangular' and self.selmove:
if self.pixbuf_sel!=None:
self.d.moveSelection(widget,coords,True,self.pixbuf_sel)
else:
self.d.moveSelection(widget,coords)
- #polygon
+
elif self.tool == 'polygon':
self.configure_line(self.line_size)
- #self.d.polygon(widget,coords,True,False)
self.d.polygon(widget,coords,True,self.fill)
- #triangle
+
elif self.tool == 'triangle':
self.configure_line(self.line_size)
- #self.d.triangle(widget,coords,True,True)
self.d.triangle(widget,coords,True,self.fill)
- #trapezoid
+
elif self.tool == 'trapezoid':
self.configure_line(self.line_size)
- #self.d.trapezoid(widget,coords,True,True)
self.d.trapezoid(widget,coords,True,self.fill)
- #arrow
+
elif self.tool == 'arrow':
self.configure_line(self.line_size)
- #self.d.arrow(widget,coords,True,True)
self.d.arrow(widget,coords,True,self.fill)
- #parallelogram
+
elif self.tool == 'parallelogram':
self.configure_line(self.line_size)
- #self.d.parallelogram(widget,coords,True,True)
self.d.parallelogram(widget,coords,True,self.fill)
- #star
+
elif self.tool == 'star':
self.configure_line(self.line_size)
- #self.d.star(widget,coords,True,True)
- #self.d.star(widget,coords,True,self.fill)
self.d.star(widget,coords,self.polygon_sides,True,self.fill)
- #polygon regular
+
elif self.tool == 'polygon_regular':
self.configure_line(self.line_size)
- #n = 7
- #self.d.polygon_regular(widget,coords,self.polygon_sides,True,True)
self.d.polygon_regular(widget,coords,self.polygon_sides,True,self.fill)
- #Heart
+
elif self.tool == 'heart':
self.configure_line(self.line_size)
- #self.d.heart(widget,coords,True,True)
self.d.heart(widget,coords,True,self.fill)
def mouseup(self,widget,event):
"""Make the Area object (GtkDrawingArea) recognize that the mouse was released.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- widget -- the Area object (GtkDrawingArea)
- event -- GdkEvent
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
+ @param event -- GdkEvent
"""
coords = int(event.x), int(event.y)
width, height = self.window.get_size()
if self.desenha == True:
- # line
if self.tool == 'line':
self.pixmap.draw_line(self.gc_line,self.oldx,self.oldy, int (event.x), int(event.y))
widget.queue_draw()
self.enableUndo(widget)
- # ellipse
+
elif self.tool == 'ellipse':
- #self.d.circle(widget,coords,False,True)
self.d.circle(widget,coords,False,self.fill)
self.enableUndo(widget)
- # rectangle
+
elif self.tool == 'rectangle':
- #self.d.square(widget,coords,False,True)
self.d.square(widget,coords,False,self.fill)
self.enableUndo(widget)
- # selection
+
elif self.tool == 'marquee-rectangular':
- # FIXME: Adicionar cursor formato selecao
if self.selmove == False:
self.pixmap_temp.draw_drawable(self.gc,self.pixmap, 0,0,0,0, width, height)
self.pixmap_sel.draw_drawable(self.gc,self.pixmap, 0,0,0,0, width, height)
@@ -451,77 +422,61 @@ class Area(gtk.DrawingArea):
self.oldx, self.oldy = coords
self.enableUndo(widget)
self.emit('selected')
- # polygon
+
elif self.tool == 'polygon':
- #self.d.polygon(widget, coords, False, False)
self.d.polygon(widget, coords, False, self.fill)
- #to undo pencil
- elif self.tool == 'pencil':
- widget.queue_draw()
- self.enableUndo(widget)
- #bucket
+
elif self.tool == 'bucket':
width, height = self.window.get_size()
fill(self.pixmap, self.gc, coords[0], coords[1], width, height, self.gc_line.foreground.pixel)
widget.queue_draw()
self.enableUndo(widget)
- #triangle
+
elif self.tool == 'triangle':
- #self.d.triangle(widget,coords,False,True)
self.d.triangle(widget,coords,False,self.fill)
self.enableUndo(widget)
- #trapezoid
+
elif self.tool == 'trapezoid':
- #self.d.trapezoid(widget,coords,False,True)
self.d.trapezoid(widget,coords,False,self.fill)
self.enableUndo(widget)
- #arrow
+
elif self.tool == 'arrow':
- #self.d.arrow(widget,coords,False,True)
self.d.arrow(widget,coords,False,self.fill)
self.enableUndo(widget)
- #parallelogram
+
elif self.tool == 'parallelogram':
- #self.d.parallelogram(widget,coords,False,True)
self.d.parallelogram(widget,coords,False,self.fill)
self.enableUndo(widget)
- #star
+
elif self.tool == 'star':
- #self.d.star(widget,coords,False,True)
- #self.d.star(widget,coords,False,self.fill)
self.d.star(widget,coords,self.polygon_sides,False,self.fill)
self.enableUndo(widget)
- #polygon regular
+
elif self.tool == 'polygon_regular':
- #n = 7
- #self.d.polygon_regular(widget,coords,self.polygon_sides,False,True)
self.d.polygon_regular(widget,coords,self.polygon_sides,False,self.fill)
self.enableUndo(widget)
- #heart
+
elif self.tool == 'heart':
- #self.d.heart(widget,coords,False,True)
self.d.heart(widget,coords,False,self.fill)
self.enableUndo(widget)
- if self.tool == 'brush' or self.tool == 'eraser' or self.tool == 'rainbow':
+ if self.tool == 'brush' or self.tool == 'eraser' or self.tool == 'rainbow' or self.tool== 'pencil' :
self.last = -1, -1
widget.queue_draw()
self.enableUndo(widget)
self.desenha = False
-
- #this func make a basic Undo
def undo(self):
"""Undo the last drawing change.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
"""
logging.debug('Area.undo(self)')
width, height = self.window.get_size()
- if self.first_undo:#if is the first time you click on UNDO
+ #if is the first time you click on UNDO (because undo_list always wait for the NEXT image)
+ if self.first_undo:
self.undo_times -= 1
#print "Undo no.%d" %(self.undo_times)
@@ -546,21 +501,13 @@ class Area(gtk.DrawingArea):
if self.tool == 'polygon':
self.polygon_start = True #start the polygon again
- # emits 'undo' and 'redo' signals only in case of first action,
- # (first undo or first redo) or no actions available
- # FIXME: this way, things work strangely; emiting signals everytime
-# if self.undo_times <= 1:
-# self.emit('undo')
-# if self.redo_times <= 1:
-# self.emit('redo')
+
self.emit('undo')
- #self.emit('redo')
def redo(self):
"""Redo the last undo operation.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
"""
logging.debug('Area.redo(self)')
@@ -579,22 +526,13 @@ class Area(gtk.DrawingArea):
self.undo_times-=1
self.queue_draw()
- # emits 'undo' and 'redo' signals only in case of first action,
- # (first undo or first redo) or no actions available
- # FIXME: this way, things work strangely; emiting signals everytime
-# if self.undo_times <= 1:
-# self.emit('undo')
-# if self.redo_times <= 1:
-# self.emit('redo')
- #self.emit('undo')
self.emit('redo')
def enableUndo(self,widget):
"""Keep the last change in a list for Undo/Redo commands.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- widget -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
"""
logging.debug('Area.enableUndo(self,widget)')
@@ -611,29 +549,19 @@ class Area(gtk.DrawingArea):
self.first_undo = True
self.undo_surf = False
- #this is the part where we can limit the steps of undo/redo
+ #This is the part where we can limit the steps of undo/redo
if self.undo_times==12:
self.undo_list.pop(0)
self.undo_times-=1
- # emits 'undo' and 'redo' signals only in case of first action,
- # (first undo or first redo) or no actions available
- # FIXME: this way, things work strangely; emiting signals everytime
-# if self.undo_times <= 1:
-# self.emit('undo')
-# if self.redo_times <= 1:
-# self.emit('redo')
- #self.emit('undo')
- #self.emit('redo')
self.emit('action-saved')
def copy(self):
""" Copy Image.
- When the tool selection is working make the change the copy of selectioned area
+ When the tool selection is working make the change the copy of selectioned area
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
"""
clipBoard = gtk.Clipboard()
tempPath = os.path.join("/tmp", "tempFile")
@@ -658,16 +586,31 @@ class Area(gtk.DrawingArea):
pixbuf_copy.get_from_drawable(self.pixmap, gtk.gdk.colormap_get_system(), x, y, 0, 0, w, h)
pixbuf_copy.save(tempPath,'png')
+ #with this func we can send the image to the clipboard with right MIME type, but we cannot past the image!
#gtk.Clipboard().set_with_data( [('text/uri-list', 0, 0)], self._copyGetFunc, self._copyClearFunc, tempPath ) this make the icon seens right, but with none data
clipBoard.set_image(pixbuf_copy)
else :
logging.debug('Area.copy(self): Please select some area first')
- def _copyGetFunc( self, clipboard, selection_data, info, data ):
+ def _copyGetFunc( self, clipboard, selection_data, info, data ):
+ """ Determine type data to put in clipboard
+
+ @param self -- the Area object (GtkDrawingArea)
+ @param clipboard -- a gtk.Clipboard object
+ @param selection_data -- data of selection
+ @param info -- the application assigned integer associated with a target
+ @param data -- user data (tempPath)
+ """
selection_data.set( "text/uri-list", 8, data)
-
- def _copyClearFunc( self, clipboard, data ):
+
+ def _copyClearFunc( self, clipboard, data ):
+ """ Clear the clipboard
+
+ @param self -- the Area object (GtkDrawingArea)
+ @param clipboard -- a gtk.Clipboard object
+ @param data -- user data (tempPath)
+ """
if (data != None):
if (os.path.exists(data)):
os.remove( data )
@@ -677,8 +620,7 @@ class Area(gtk.DrawingArea):
""" Past image.
Past image that is in pixmap
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
"""
width, height = self.window.get_size()
@@ -704,15 +646,15 @@ class Area(gtk.DrawingArea):
self.emit('selected')
else:
self.loadImage(tempPath, self, True)
+ logging.debug('Area.past(self): Load from clipboard fails, loading from tempPatch')
self.queue_draw()
def set_fill_color(self, color):
"""Set fill color.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- color -- a gdk.Color object
+ @param self -- the Area object (GtkDrawingArea)
+ @param color -- a gdk.Color object
"""
logging.debug('Area._set_fill_color(self, color)')
@@ -723,9 +665,8 @@ class Area(gtk.DrawingArea):
def set_stroke_color(self, color):
"""Set stroke color.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
- color -- a gdk.Color object
+ @param self -- the Area object (GtkDrawingArea)
+ @param color -- a gdk.Color object
"""
logging.debug('Area._set_stroke_color(self, color)')
@@ -737,8 +678,8 @@ class Area(gtk.DrawingArea):
def grayscale(self,widget):
"""Apply grayscale effect.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
"""
logging.debug('Area._set_grayscale(self,widget)')
@@ -756,10 +697,26 @@ class Area(gtk.DrawingArea):
self.enableUndo(widget)
def _pixbuf2Image(self, pb):
+ """change a pixbuf to RGB image
+
+ @param self -- the Area object (GtkDrawingArea)
+ @param pb -- the pixbuf object (gtk.gdk.Pixbuf)
+
+ @return RGB Image
+
+ """
width,height = pb.get_width(),pb.get_height()
return Image.fromstring("RGB",(width,height),pb.get_pixels() )
def _image2pixbuf(self, im):
+ """change a RGB image to a pixbuf
+
+ @param self -- the Area object (GtkDrawingArea)
+ @param im -- a RGB image
+
+ @return pixbuf
+
+ """
file1 = StringIO.StringIO()
im.save(file1, "ppm")
contents = file1.getvalue()
@@ -773,8 +730,9 @@ class Area(gtk.DrawingArea):
def _rotate_left(self, widget):
"""Rotate the image.
- Keyword arguments:
- self -- the Area object (GtkDrawingArea)
+ @param self -- the Area object (GtkDrawingArea)
+ @param widget -- the Area object (GtkDrawingArea)
+
"""
logging.debug('Area._rotate_left(self)')
@@ -801,9 +759,12 @@ class Area(gtk.DrawingArea):
logging.debug('Please select some area first')
def can_undo(self):
- '''
+ """
Indicate if is there some action to undo
- '''
+
+ @param self -- the Area object (GtkDrawingArea)
+
+ """
# logging.debug('Area.can_undo(self)')
undo_times = self.undo_times
@@ -817,9 +778,12 @@ class Area(gtk.DrawingArea):
return True
def can_redo(self):
- '''
+ """
Indicate if is there some action to redo
- '''
+
+ @param self -- the Area object (GtkDrawingArea)
+
+ """
logging.debug('Area.can_redo(self)')
if self.redo_times < 1:
@@ -828,9 +792,12 @@ class Area(gtk.DrawingArea):
return True
def is_selected(self):
- '''
- Indicate if there is some thing selected
- '''
+ """
+ Return True if there is some thing selected
+
+ @param self -- the Area object (GtkDrawingArea)
+
+ """
logging.debug('Area.is_selected(self)')
@@ -840,17 +807,32 @@ class Area(gtk.DrawingArea):
return False
def _set_selection_bounds(self, x1, y1, x2, y2):
+ """
+ Set selection bounds
+
+ @param self -- the Area object (GtkDrawingArea)
+ @param x1,y1,x2,y2 -- the coords of limit points
+ """
self._selection_corners = (x1, y1, x2, y2)
def get_selection_bounds(self):
+ """
+ Get points of selection
+
+ @param self -- the Area object (GtkDrawingArea)
+
+ @return selection_corners
+
+ """
return self._selection_corners[0], self._selection_corners[1], self._selection_corners[2], self._selection_corners[3]
def loadImage(self, name, widget, load_selected):
"""Load an image.
- Keyword arguments:
- self -- Area.area instance
- name -- string (image file path)
+ @param self -- Area instance
+ @param name -- string (image file path)
+ @param widget -- GtkDrawingArea
+ @param load_selected -- if this func is called by Journal
"""
self.pixbuf_sel = gtk.gdk.pixbuf_new_from_file(name)
@@ -879,6 +861,9 @@ class Area(gtk.DrawingArea):
self.queue_draw()
def clear(self):
+ """ Clear Canvas
+ @param self -- Area instance
+ """
self.d.clear()
self.enableUndo(self)
diff --git a/Desenho.py b/Desenho.py
index a08243c..aa25028 100644
--- a/Desenho.py
+++ b/Desenho.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-Desenho.py
+@namespace Desenho
-Pixmap manipulation
+ Pixmap manipulation
Copyright 2007, NATE-LSI-EPUSP
@@ -64,100 +64,99 @@ import pango
WIDTH = 1195
HEIGHT = 800
-
+##Pixmap manipulation
class Desenho:
- def __init__(self, d_):
+ def __init__(self, widget):
"""Initialize Desenho object.
- Keyword arguments:
- self -- Desenho.Desenho instance
- d_ -- Area object (GtkDrawingArea)
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
"""
- self.d = d_
+ #self.d = widget
def line(self, widget, coords):
"""Draw line.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
"""
- width, height = self.d.window.get_size()
- self.d.pixmap_temp.draw_drawable(self.d.gc,self.d.pixmap, 0 , 0 ,0,0, width, height)
- self.d.pixmap_temp.draw_line(self.d.gc_line,self.d.oldx,self.d.oldy,coords[0],coords[1])
- #self.d.newx = coords[0]
- #self.d.newy = coords[1]
+ width, height = widget.window.get_size()
+ widget.pixmap_temp.draw_drawable(widget.gc,widget.pixmap, 0 , 0 ,0,0, width, height)
+ widget.pixmap_temp.draw_line(widget.gc_line,widget.oldx,widget.oldy,coords[0],coords[1])
+ #widget.newx = coords[0]
+ #widget.newy = coords[1]
widget.queue_draw()
def eraser(self, widget, coords, last, size = 30, shape = 'circle'):
"""Erase part of the drawing.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
- size -- integer (default 30)
- shape -- string (default 'circle')
+ @param self -- Desenho.Desenho instance
+ @param last -- last of oldx
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param size -- integer (default 30)
+ @param shape -- string (default 'circle')
"""
- self.d.desenha = False
+ widget.desenha = False
if(shape == 'circle'):
- self.d.pixmap.draw_arc(self.d.gc_eraser, True, coords[0], coords[1], size, size, 0, 360*64)
+ widget.pixmap.draw_arc(widget.gc_eraser, True, coords[0], coords[1], size, size, 0, 360*64)
if last[0] != -1:
- self.d.gc_eraser.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
- self.d.pixmap.draw_line(self.d.gc_eraser,last[0]+size/2,last[1]+size/2,coords[0]+size/2,coords[1]+size/2)
- self.d.gc_eraser.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
+ widget.gc_eraser.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
+ widget.pixmap.draw_line(widget.gc_eraser,last[0]+size/2,last[1]+size/2,coords[0]+size/2,coords[1]+size/2)
+ widget.gc_eraser.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
if(shape == 'square'):
- self.d.pixmap.draw_rectangle(self.d.gc_eraser, True, coords[0], coords[1], size, size)
+ widget.pixmap.draw_rectangle(widget.gc_eraser, True, coords[0], coords[1], size, size)
if last[0] != -1:
points = [coords, last, (last[0]+size,last[1]+size), (coords[0]+size,coords[1]+size)]
- self.d.pixmap.draw_polygon(self.d.gc_eraser,True,points)
+ widget.pixmap.draw_polygon(widget.gc_eraser,True,points)
points = [(last[0]+size,last[1]), (coords[0]+size,coords[1]), (coords[0],coords[1]+size), (last[0],last[1]+size)]
- self.d.pixmap.draw_polygon(self.d.gc_eraser,True,points)
+ widget.pixmap.draw_polygon(widget.gc_eraser,True,points)
widget.queue_draw()
def brush(self, widget, coords, last, size = 5, shape = 'circle'):
"""Paint with brush.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
- size -- integer (default 30)
- shape -- string (default 'circle')
+ @param self -- Desenho.Desenho instance
+ @param last -- last of oldx
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param size -- integer (default 30)
+ @param shape -- string (default 'circle')
"""
- self.d.desenha = False
+ widget.desenha = False
if(shape == 'circle'):
- self.d.pixmap.draw_arc(self.d.gc_brush, True, coords[0], coords[1], size, size, 0, 360*64)
+ widget.pixmap.draw_arc(widget.gc_brush, True, coords[0], coords[1], size, size, 0, 360*64)
if last[0] != -1:
- self.d.gc_brush.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
- self.d.pixmap.draw_line(self.d.gc_brush,last[0]+size/2,last[1]+size/2,coords[0]+size/2,coords[1]+size/2)
- self.d.gc_brush.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
+ widget.gc_brush.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
+ widget.pixmap.draw_line(widget.gc_brush,last[0]+size/2,last[1]+size/2,coords[0]+size/2,coords[1]+size/2)
+ widget.gc_brush.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
if(shape == 'square'):
- self.d.pixmap.draw_rectangle(self.d.gc_brush, True, coords[0], coords[1], size, size)
+ widget.pixmap.draw_rectangle(widget.gc_brush, True, coords[0], coords[1], size, size)
if last[0] != -1:
points = [coords, last, (last[0]+size,last[1]+size), (coords[0]+size,coords[1]+size)]
- self.d.pixmap.draw_polygon(self.d.gc_brush,True,points)
+ widget.pixmap.draw_polygon(widget.gc_brush,True,points)
points = [(last[0]+size,last[1]), (coords[0]+size,coords[1]), (coords[0],coords[1]+size), (last[0],last[1]+size)]
- self.d.pixmap.draw_polygon(self.d.gc_brush,True,points)
+ widget.pixmap.draw_polygon(widget.gc_brush,True,points)
widget.queue_draw()
def rainbow(self, widget, coords, last, color, size = 5, shape = 'circle'):
"""Paint with rainbow.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
- size -- integer (default 30)
- shape -- string (default 'circle')
+ @param self -- Desenho.Desenho instance
+ @param last -- last of oldx
+ @param widget -- Area object (GtkDrawingArea)
+ @param color -- select the color adress
+ @param coords -- Two value tuple
+ @param size -- integer (default 30)
+ @param shape -- string (default 'circle')
"""
- colormap = self.d.get_colormap()
+ colormap = widget.get_colormap()
rainbow_colors = [
colormap.alloc_color('#ff0000', True, True), # vermelho
colormap.alloc_color('#ff8000', True, True), # laranja
@@ -173,275 +172,278 @@ class Desenho:
colormap.alloc_color('#ff0080', True, True), # violeta
]
- self.d.gc_rainbow.set_foreground(rainbow_colors[color])
- self.d.desenha = False
+ widget.gc_rainbow.set_foreground(rainbow_colors[color])
+ widget.desenha = False
if(shape == 'circle'):
- self.d.pixmap.draw_arc(self.d.gc_rainbow, True, coords[0], coords[1], size, size, 0, 360*64)
+ widget.pixmap.draw_arc(widget.gc_rainbow, True, coords[0], coords[1], size, size, 0, 360*64)
if last[0] != -1:
- self.d.gc_rainbow.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
- self.d.pixmap.draw_line(self.d.gc_rainbow,last[0]+size/2,last[1]+size/2,coords[0]+size/2,coords[1]+size/2)
- self.d.gc_rainbow.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
+ widget.gc_rainbow.set_line_attributes(size, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
+ widget.pixmap.draw_line(widget.gc_rainbow,last[0]+size/2,last[1]+size/2,coords[0]+size/2,coords[1]+size/2)
+ widget.gc_rainbow.set_line_attributes(0, gtk.gdk.LINE_SOLID, gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_ROUND)
if(shape == 'square'):
if last[0] != -1:
- self.d.pixmap.draw_rectangle(self.d.gc_rainbow, True, last[0], last[1], size, size)
+ widget.pixmap.draw_rectangle(widget.gc_rainbow, True, last[0], last[1], size, size)
points = [coords, last, (last[0]+size,last[1]+size), (coords[0]+size,coords[1]+size)]
- self.d.pixmap.draw_polygon(self.d.gc_rainbow,True,points)
+ widget.pixmap.draw_polygon(widget.gc_rainbow,True,points)
points = [(last[0]+size,last[1]), (coords[0]+size,coords[1]), (coords[0],coords[1]+size), (last[0],last[1]+size)]
- self.d.pixmap.draw_polygon(self.d.gc_rainbow,True,points)
- self.d.pixmap.draw_rectangle(self.d.gc_rainbow, True, coords[0], coords[1], size, size)
+ widget.pixmap.draw_polygon(widget.gc_rainbow,True,points)
+ widget.pixmap.draw_rectangle(widget.gc_rainbow, True, coords[0], coords[1], size, size)
widget.queue_draw()
def square(self, widget, coords, temp, fill):
"""Draw a square.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- dx = math.fabs(coords[0] - self.d.oldx)
- dy = math.fabs(coords[1] - self.d.oldy)
+ dx = math.fabs(coords[0] - widget.oldx)
+ dy = math.fabs(coords[1] - widget.oldy)
- if coords[0] < self.d.oldx:
+ if coords[0] < widget.oldx:
x = coords[0]
else:
- x = self.d.oldx
- if coords[1] < self.d.oldy:
+ x = widget.oldx
+ if coords[1] < widget.oldy:
y = coords[1]
else:
- y = self.d.oldy
+ y = widget.oldy
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_rectangle(self.d.gc,True,x,y,dx,dy)
- pixmap.draw_rectangle(self.d.gc_line,False,x,y,dx,dy)
+ pixmap.draw_rectangle(widget.gc,True,x,y,dx,dy)
+ pixmap.draw_rectangle(widget.gc_line,False,x,y,dx,dy)
widget.queue_draw()
def triangle(self, widget, coords, temp, fill):
"""Draw a triangle.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- points = [(self.d.oldx,self.d.oldy), (self.d.oldx+int((coords[0]-self.d.oldx)/2),coords[1]), (coords[0],self.d.oldy)]
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ points = [(widget.oldx,widget.oldy), (widget.oldx+int((coords[0]-widget.oldx)/2),coords[1]), (coords[0],widget.oldy)]
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_polygon(self.d.gc,True,points)
- pixmap.draw_polygon(self.d.gc_line,False,points)
+ pixmap.draw_polygon(widget.gc,True,points)
+ pixmap.draw_polygon(widget.gc_line,False,points)
widget.queue_draw()
def trapezoid(self, widget, coords, temp, fill):
"""Draw a trapezoid.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- dif = int((coords[0] - self.d.oldx)/4)
- points = [(self.d.oldx, self.d.oldy), (self.d.oldx+dif, coords[1]), (coords[0]-dif, coords[1]) , (coords[0],self.d.oldy)]
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ dif = int((coords[0] - widget.oldx)/4)
+ points = [(widget.oldx, widget.oldy), (widget.oldx+dif, coords[1]), (coords[0]-dif, coords[1]) , (coords[0],widget.oldy)]
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_polygon(self.d.gc, True, points)
- pixmap.draw_polygon(self.d.gc_line,False,points)
+ pixmap.draw_polygon(widget.gc, True, points)
+ pixmap.draw_polygon(widget.gc_line,False,points)
widget.queue_draw()
def arrow(self, widget, coords, temp, fill):
"""Draw a arrow.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
-
- x = coords[0] - self.d.oldx
- y = coords[1] - self.d.oldy
- points = [(self.d.oldx,self.d.oldy),\
-(self.d.oldx+int(x/6),self.d.oldy+y),\
-(self.d.oldx+int(x/6),self.d.oldy+int(y/3)),\
-(self.d.oldx+x,self.d.oldy+int(y/3)),\
-(self.d.oldx+x,self.d.oldy-int(y/3)),\
-(self.d.oldx+int(x/6),self.d.oldy-int(y/3)),\
-(self.d.oldx+int(x/6),self.d.oldy-y)]
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
+
+ x = coords[0] - widget.oldx
+ y = coords[1] - widget.oldy
+ points = [(widget.oldx,widget.oldy),\
+(widget.oldx+int(x/6),widget.oldy+y),\
+(widget.oldx+int(x/6),widget.oldy+int(y/3)),\
+(widget.oldx+x,widget.oldy+int(y/3)),\
+(widget.oldx+x,widget.oldy-int(y/3)),\
+(widget.oldx+int(x/6),widget.oldy-int(y/3)),\
+(widget.oldx+int(x/6),widget.oldy-y)]
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_polygon(self.d.gc,True,points)
- pixmap.draw_polygon(self.d.gc_line,False,points)
+ pixmap.draw_polygon(widget.gc,True,points)
+ pixmap.draw_polygon(widget.gc_line,False,points)
widget.queue_draw()
def parallelogram(self, widget, coords, temp, fill):
"""Draw a parallelogram.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
-
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- x = int((coords[0] - self.d.oldx)/4)
- points = [(self.d.oldx,self.d.oldy), (coords[0]-x, self.d.oldy), (coords[0],coords[1]), (self.d.oldx+x,coords[1])]
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ x = int((coords[0] - widget.oldx)/4)
+ points = [(widget.oldx,widget.oldy), (coords[0]-x, widget.oldy), (coords[0],coords[1]), (widget.oldx+x,coords[1])]
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_polygon(self.d.gc,True,points)
- pixmap.draw_polygon(self.d.gc_line,False,points)
+ pixmap.draw_polygon(widget.gc,True,points)
+ pixmap.draw_polygon(widget.gc_line,False,points)
widget.queue_draw()
def star(self, widget, coords, n, temp, fill):
"""Draw polygon with n sides.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
- n -- number of sides
- temp -- switch between pixmap and pixmap_temp
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param n -- number of sides
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- x = coords[0] - self.d.oldx
- y = coords[1] - self.d.oldy
+ x = coords[0] - widget.oldx
+ y = coords[1] - widget.oldy
A = math.atan2(y,x)
dA = 2*math.pi/n
r = math.hypot(y,x)
- p = [(self.d.oldx+int(r*math.cos(A)),self.d.oldy+int(r*math.sin(A))),\
- (self.d.oldx+int(0.4*r*math.cos(A+dA/2)),self.d.oldy+int(0.4*r*math.sin(A+dA/2)))]
+ p = [(widget.oldx+int(r*math.cos(A)),widget.oldy+int(r*math.sin(A))),\
+ (widget.oldx+int(0.4*r*math.cos(A+dA/2)),widget.oldy+int(0.4*r*math.sin(A+dA/2)))]
for i in range(n-1):
A = A+dA
- p.append((self.d.oldx+int(r*math.cos(A)),self.d.oldy+int(r*math.sin(A))))
- p.append((self.d.oldx+int(0.4*r*math.cos(A+dA/2)),self.d.oldy+int(0.4*r*math.sin(A+dA/2))))
+ p.append((widget.oldx+int(r*math.cos(A)),widget.oldy+int(r*math.sin(A))))
+ p.append((widget.oldx+int(0.4*r*math.cos(A+dA/2)),widget.oldy+int(0.4*r*math.sin(A+dA/2))))
tp = tuple(p)
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_polygon(self.d.gc,True,tp)
- pixmap.draw_polygon(self.d.gc_line,False,tp)
+ pixmap.draw_polygon(widget.gc,True,tp)
+ pixmap.draw_polygon(widget.gc_line,False,tp)
widget.queue_draw()
def polygon_regular(self, widget, coords, n, temp, fill):
"""Draw polygon with n sides.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
- n -- number of sides
- temp -- switch between pixmap and pixmap_temp
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param n -- number of sides
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- x = coords[0] - self.d.oldx
- y = coords[1] - self.d.oldy
+ x = coords[0] - widget.oldx
+ y = coords[1] - widget.oldy
A = math.atan2(y,x)
dA = 2*math.pi/n
r = math.hypot(y,x)
- p = [(self.d.oldx+int(r*math.cos(A)),self.d.oldy+int(r*math.sin(A)))]
+ p = [(widget.oldx+int(r*math.cos(A)),widget.oldy+int(r*math.sin(A)))]
for i in range(n-1):
A = A+dA
- p.append((self.d.oldx+int(r*math.cos(A)),self.d.oldy+int(r*math.sin(A))))
+ p.append((widget.oldx+int(r*math.cos(A)),widget.oldy+int(r*math.sin(A))))
tp = tuple(p)
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_polygon(self.d.gc,True,tp)
- pixmap.draw_polygon(self.d.gc_line,False,tp)
+ pixmap.draw_polygon(widget.gc,True,tp)
+ pixmap.draw_polygon(widget.gc_line,False,tp)
widget.queue_draw()
def heart(self, widget, coords, temp, fill):
"""Draw polygon with n sides.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
- n -- number of sides
- temp -- switch between pixmap and pixmap_temp
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- if coords[0] < self.d.oldx:
+ if coords[0] < widget.oldx:
x = coords[0]
else:
- x = self.d.oldx
- if coords[1] < self.d.oldy:
+ x = widget.oldx
+ if coords[1] < widget.oldy:
y = coords[1]
else:
- y = self.d.oldy
+ y = widget.oldy
- dx = math.fabs(coords[0] - self.d.oldx)
- dy = math.fabs(coords[1] - self.d.oldy)
+ dx = math.fabs(coords[0] - widget.oldx)
+ dy = math.fabs(coords[1] - widget.oldy)
w=int(4*dx)
e=int(4*dx/math.sqrt(3))
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_arc(self.d.gc,True,int(self.d.oldx-dx),int(self.d.oldy-e/2),w,e,180*64,60*64)
- pixmap.draw_arc(self.d.gc,True,int(self.d.oldx-3*dx),int(self.d.oldy-e/2),w,e,300*64,60*64)
- pixmap.draw_arc(self.d.gc,True,int(self.d.oldx-dx*0.2),int(self.d.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),0,180*64)
- pixmap.draw_arc(self.d.gc,True,int(self.d.oldx-dx),int(self.d.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),0,180*64)
- pixmap.draw_arc(self.d.gc_line,False,int(self.d.oldx-dx),int(self.d.oldy-e/2),w,e,180*64,60*64)
- pixmap.draw_arc(self.d.gc_line,False,int(self.d.oldx-dx-w/2),int(self.d.oldy-e/2),w,e,300*64,60*64)
- pixmap.draw_arc(self.d.gc_line,False,int(self.d.oldx-dx*0.2),int(self.d.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),0,132*64)
- pixmap.draw_arc(self.d.gc_line,False,int(self.d.oldx-dx),int(self.d.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),48*64,132*64)
+ pixmap.draw_arc(widget.gc,True,int(widget.oldx-dx),int(widget.oldy-e/2),w,e,180*64,60*64)
+ pixmap.draw_arc(widget.gc,True,int(widget.oldx-3*dx),int(widget.oldy-e/2),w,e,300*64,60*64)
+ pixmap.draw_arc(widget.gc,True,int(widget.oldx-dx*0.2),int(widget.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),0,180*64)
+ pixmap.draw_arc(widget.gc,True,int(widget.oldx-dx),int(widget.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),0,180*64)
+ pixmap.draw_arc(widget.gc_line,False,int(widget.oldx-dx),int(widget.oldy-e/2),w,e,180*64,60*64)
+ pixmap.draw_arc(widget.gc_line,False,int(widget.oldx-dx-w/2),int(widget.oldy-e/2),w,e,300*64,60*64)
+ pixmap.draw_arc(widget.gc_line,False,int(widget.oldx-dx*0.2),int(widget.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),0,132*64)
+ pixmap.draw_arc(widget.gc_line,False,int(widget.oldx-dx),int(widget.oldy-0.6*dx+2),int(1.2*dx),int(1.2*dx),48*64,132*64)
widget.queue_draw()
@@ -449,113 +451,109 @@ class Desenho:
def circle(self, widget, coords, temp, fill):
"""Draw a circle.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- if coords[0] < self.d.oldx:
+ if coords[0] < widget.oldx:
x = coords[0]
else:
- x = self.d.oldx
- if coords[1] < self.d.oldy:
+ x = widget.oldx
+ if coords[1] < widget.oldy:
y = coords[1]
else:
- y = self.d.oldy
+ y = widget.oldy
- dx = math.fabs(coords[0] - self.d.oldx)
- dy = math.fabs(coords[1] - self.d.oldy)
+ dx = math.fabs(coords[0] - widget.oldx)
+ dy = math.fabs(coords[1] - widget.oldy)
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill == True:
- pixmap.draw_arc(self.d.gc,True,x,y,dx,dy,0,360*64)
- pixmap.draw_arc(self.d.gc_line,False,x,y,dx,dy,0,360*64)
+ pixmap.draw_arc(widget.gc,True,x,y,dx,dy,0,360*64)
+ pixmap.draw_arc(widget.gc_line,False,x,y,dx,dy,0,360*64)
widget.queue_draw()
def pencil(self, widget, coords):
"""Draw a pencil.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
"""
- width, height = self.d.window.get_size()
- self.d.pixmap_temp.draw_drawable(self.d.gc,self.d.pixmap, 0 , 0 ,0,0, width, height)
- self.d.pixmap.draw_line(self.d.gc_line,self.d.oldx,self.d.oldy,coords[0],coords[1])
- self.d.oldx = coords[0]
- self.d.oldy = coords[1]
+ width, height = widget.window.get_size()
+ widget.pixmap_temp.draw_drawable(widget.gc,widget.pixmap, 0 , 0 ,0,0, width, height)
+ widget.pixmap.draw_line(widget.gc_line,widget.oldx,widget.oldy,coords[0],coords[1])
+ widget.oldx = coords[0]
+ widget.oldy = coords[1]
widget.queue_draw()
def clear(self):
"""Clear the drawing.
- Keyword arguments:
- self -- Desenho.Desenho instance
+ @param self -- Desenho.Desenho instance
"""
width, height = self.d.window.get_size()
- self.d.desenho = []
- self.d.textos = []
- self.d.pixmap.draw_rectangle(self.d.get_style().white_gc, True,0, 0, width, height)
- self.d.pixmap_temp.draw_rectangle(self.d.get_style().white_gc, True,0, 0, width, height)
- self.d.queue_draw()
+ widget.desenho = []
+ widget.textos = []
+ widget.pixmap.draw_rectangle(widget.get_style().white_gc, True,0, 0, width, height)
+ widget.pixmap_temp.draw_rectangle(widget.get_style().white_gc, True,0, 0, width, height)
+ widget.queue_draw()
def text(self,widget,event):
- """Make a selection.
+ """Display and draw text in the drawing area.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- event -- GdkEvent
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param event -- GdkEvent
"""
-
- #print self.d.estadoTexto
- if self.d.estadoTexto == 0:
- self.d.estadoTexto = 1
+ if widget.estadoTexto == 0:
+ widget.estadoTexto = 1
- self.d.janela._fixed.move(self.d.janela._textview, int(event.x)+200, int(event.y)+100)
+ widget.janela._fixed.move(widget.janela._textview, int(event.x)+200, int(event.y)+100)
# Area size has changed...
- #self.d.janela._fixed.move(self.d.janela._textview, int(event.x), int(event.y))
- self.d.janela._textview.show()
- self.d.janela._textview.grab_focus()
+ #widget.janela._fixed.move(widget.janela._textview, int(event.x), int(event.y))
+ widget.janela._textview.show()
+ widget.janela._textview.grab_focus()
else:
- self.d.estadoTexto = 0
+ widget.estadoTexto = 0
try:
# This works for a gtk.Entry
- text = self.d.janela._textview.get_text()
+ text = widget.janela._textview.get_text()
except AttributeError:
# This works for a gtk.TextView
- buf = self.d.janela._textview.get_buffer()
+ buf = widget.janela._textview.get_buffer()
start, end = buf.get_bounds()
text = buf.get_text(start, end)
- layout = self.d.create_pango_layout(text)
- #layout.set_font_description(self.d.font)
+ layout = widget.create_pango_layout(text)
+ #layout.set_font_description(widget.font)
- self.d.pixmap.draw_layout(self.d.gc, self.d.oldx, self.d.oldy, layout)
- self.d.pixmap_temp.draw_layout(self.d.gc, self.d.oldx, self.d.oldy, layout)
- self.d.janela._textview.hide()
+ widget.pixmap.draw_layout(widget.gc, widget.oldx, widget.oldy, layout)
+ widget.pixmap_temp.draw_layout(widget.gc, widget.oldx, widget.oldy, layout)
+ widget.janela._textview.hide()
try:
- self.d.janela._textview.set_text('')
+ widget.janela._textview.set_text('')
except AttributeError:
buf.set_text('')
- self.d.enableUndo(widget)
+ widget.enableUndo(widget)
widget.queue_draw()
@@ -563,178 +561,185 @@ class Desenho:
def selection(self, widget, coords, temp, fill):
"""Make a selection.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
+
+ @return (x0,y0,x1,y1) -- coords of corners
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- dx = int(math.fabs(coords[0] - self.d.oldx))
- dy = int(math.fabs(coords[1] - self.d.oldy))
+ dx = int(math.fabs(coords[0] - widget.oldx))
+ dy = int(math.fabs(coords[1] - widget.oldy))
- if coords[0] < self.d.oldx:
+ if coords[0] < widget.oldx:
x = int(coords[0])
else:
- x = self.d.oldx
- if coords[1] < self.d.oldy:
+ x = widget.oldx
+ if coords[1] < widget.oldy:
y = int(coords[1])
else:
- y = self.d.oldy
+ y = widget.oldy
- pixmap.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0,width,height)
+ pixmap.draw_drawable(widget.gc,widget.pixmap,0,0,0,0,width,height)
if fill:
- pixmap.draw_rectangle(self.d.gc,True,x,y,dx,dy)
+ pixmap.draw_rectangle(widget.gc,True,x,y,dx,dy)
- pixmap.draw_rectangle(self.d.gc_selection,False,x,y,dx,dy)
- pixmap.draw_rectangle(self.d.gc_selection1,False,x-1,y-1,dx+2,dy+2)
+ pixmap.draw_rectangle(widget.gc_selection,False,x,y,dx,dy)
+ pixmap.draw_rectangle(widget.gc_selection1,False,x-1,y-1,dx+2,dy+2)
widget.queue_draw()
return x,y,x+dx,y+dy
def moveSelection(self, widget, coords, mvcopy=False, pixbuf_copy=None):
+ self.draw_widget = widget
"""Move the selection.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param mvcopy -- Copy or Move
+ @param pixbuf_copy -- For import image
"""
- width, height = self.d.window.get_size()
+ width, height = widget.window.get_size()
- self.d.pixmap_sel.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0, width, height)
+ widget.pixmap_sel.draw_drawable(widget.gc,widget.pixmap,0,0,0,0, width, height)
- if self.d.sx > self.d.oldx:
- x0 = int(self.d.oldx)
+ if widget.sx > widget.oldx:
+ x0 = int(widget.oldx)
else:
- x0 = int(self.d.sx)
+ x0 = int(widget.sx)
- if self.d.sy > self.d.oldy:
- y0 = int(self.d.oldy)
+ if widget.sy > widget.oldy:
+ y0 = int(widget.oldy)
else:
- y0 = int(self.d.sy)
+ y0 = int(widget.sy)
- w = int(math.fabs(self.d.sx - self.d.oldx))
- h = int(math.fabs(self.d.sy - self.d.oldy))
+ w = int(math.fabs(widget.sx - widget.oldx))
+ h = int(math.fabs(widget.sy - widget.oldy))
- self.d._set_selection_bounds(coords[0]-w/2, coords[1]-h/2, coords[0]+w/2, coords[1]+h/2)
+ widget._set_selection_bounds(coords[0]-w/2, coords[1]-h/2, coords[0]+w/2, coords[1]+h/2)
if not mvcopy:
- self.d.pixmap_sel.draw_rectangle(self.d.get_style().white_gc, True, x0, y0, w, h)
+ widget.pixmap_sel.draw_rectangle(widget.get_style().white_gc, True, x0, y0, w, h)
- if pixbuf_copy!=None: #to import or past image
- self.d.pixmap_sel.draw_pixbuf(self.d.gc, pixbuf_copy, 0, 0, coords[0] - w/2, coords[1]- h/2, w, h, dither=gtk.gdk.RGB_DITHER_NORMAL, x_dither=0, y_dither=0)
- self.d.pixmap_temp.draw_pixbuf(self.d.gc, pixbuf_copy, 0, 0, coords[0] - w/2, coords[1]- h/2, w, h, dither=gtk.gdk.RGB_DITHER_NORMAL, x_dither=0, y_dither=0)
+ if pixbuf_copy!=None: #to import or paste image
+ widget.pixmap_sel.draw_pixbuf(widget.gc, pixbuf_copy, 0, 0, coords[0] - w/2, coords[1]- h/2, w, h, dither=gtk.gdk.RGB_DITHER_NORMAL, x_dither=0, y_dither=0)
+ widget.pixmap_temp.draw_pixbuf(widget.gc, pixbuf_copy, 0, 0, coords[0] - w/2, coords[1]- h/2, w, h, dither=gtk.gdk.RGB_DITHER_NORMAL, x_dither=0, y_dither=0)
else:
- self.d.pixmap_sel.draw_drawable(self.d.gc, self.d.pixmap, x0, y0, coords[0] - w/2, coords[1]- h/2, w, h)
- self.d.pixmap_temp.draw_drawable(self.d.gc, self.d.pixmap_sel,0,0,0,0, width, height)
+ widget.pixmap_sel.draw_drawable(widget.gc, widget.pixmap, x0, y0, coords[0] - w/2, coords[1]- h/2, w, h)
+ widget.pixmap_temp.draw_drawable(widget.gc, widget.pixmap_sel,0,0,0,0, width, height)
#to draw the selection black and white line rectangle
- self.d.pixmap_sel.draw_rectangle(self.d.gc_selection, False ,coords[0] - w/2, coords[1]- h/2, w, h)
- self.d.pixmap_sel.draw_rectangle(self.d.gc_selection1, False ,coords[0] - w/2-1, coords[1]- h/2-1, w+2, h+2)
+ widget.pixmap_sel.draw_rectangle(widget.gc_selection, False ,coords[0] - w/2, coords[1]- h/2, w, h)
+ widget.pixmap_sel.draw_rectangle(widget.gc_selection1, False ,coords[0] - w/2-1, coords[1]- h/2-1, w+2, h+2)
widget.queue_draw()
def resizeSelection(self, widget, width_percent, height_percent):
"""Resize the selection.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param width_percent -- Percent of x scale
+ @param height_percent -- Percent of y scale
"""
- width, height = self.d.window.get_size()
-
- self.d.pixmap_sel.draw_drawable(self.d.gc,self.d.pixmap,0,0,0,0, width, height)
+ #widget = self.draw_widget
+ width, height = widget.window.get_size()
- if self.d.sx > self.d.oldx:
- x0 = int(self.d.oldx)
+
+ widget.pixmap.draw_drawable(widget.gc,widget.pixmap_temp,0,0,0,0, width, height)
+
+ if widget.sx > widget.oldx:
+ x0 = int(widget.oldx)
else:
- x0 = int(self.d.sx)
+ x0 = int(widget.sx)
- if self.d.sy > self.d.oldy:
- y0 = int(self.d.oldy)
+ if widget.sy > widget.oldy:
+ y0 = int(widget.oldy)
else:
- y0 = int(self.d.sy)
+ y0 = int(widget.sy)
- w = int(math.fabs(self.d.sx - self.d.oldx))
- h = int(math.fabs(self.d.sy - self.d.oldy))
-
- width_percent, height_percent = 2,2
+ w = int(math.fabs(widget.sx - widget.oldx))
+ h = int(math.fabs(widget.sy - widget.oldy))
- delta_x = int( w*(width_percent-1)/2 )
- delta_y = int( h*(height_percent-1)/2 )
+ #delta_x = int( w*(width_percent-1)/2 )
+ #delta_y = int( h*(height_percent-1)/2 )
pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, w, h)
- pixbuf.get_from_drawable(self.d.pixmap, gtk.gdk.colormap_get_system(), x0, y0, 0, 0, w, h)
+ pixbuf.get_from_drawable(widget.pixmap_temp, gtk.gdk.colormap_get_system(), x0, y0, 0, 0, w, h)
pixbuf = pixbuf.scale_simple(int(w*width_percent), int(h*height_percent), gtk.gdk.INTERP_BILINEAR)
-
- #self.d.pixmap_sel.draw_rectangle(self.d.get_style().white_gc, True, x0 - delta_x/2, x1 - delta_y/2, int(w*width_percent), int(h*height_percent))
- self.d.pixmap_sel.draw_rectangle(self.d.get_style().white_gc, True, x0 - delta_x, y0 - delta_y, int(w*width_percent), int(h*height_percent))
- self.d.pixmap_sel.draw_pixbuf(self.d.get_style().white_gc,pixbuf,0,0,x0 - delta_x, y0 - delta_y,int(w*width_percent), int(h*height_percent))
-
- self.d.pixmap_temp.draw_drawable(self.d.gc, self.d.pixmap_sel,0,0,0,0, width, height)
+ widget.pixmap.draw_rectangle(widget.get_style().white_gc, True, x0 , y0 , int(w*width_percent), int(h*height_percent))
+ widget.pixmap.draw_pixbuf(widget.get_style().white_gc,pixbuf,0,0,x0 , y0 ,int(w*width_percent), int(h*height_percent))
+
+ #widget.pixmap_temp.draw_drawable(widget.gc, widget.pixmap_sel,0,0,0,0, width, height)
#to draw the selection black and white line rectangle
- self.d.pixmap_sel.draw_rectangle(self.d.gc_selection, False ,x0- delta_x, y0- delta_y-4,2*w+1, 2*h+1)
- self.d.pixmap_sel.draw_rectangle(self.d.gc_selection1, False ,x0- delta_x, y0- delta_y-5,2*w +2, 2*h +2)
-
+ #widget.pixmap_sel.draw_rectangle(widget.gc_selection, False ,x0, y0-2,int(width_percent*w+1), int(height_percent*h+1))
+ #widget.pixmap_sel.draw_rectangle(widget.gc_selection1, False ,x0, y0-3,int(width_percent*w +2), int(height_percent*h +2))
+
+
+ #widget.pixmap.draw_drawable(widget.gc, widget.pixmap_temp, 0,0,0,0, width, height)
+
widget.queue_draw()
+ widget.enableUndo(widget)
def polygon(self, widget, coords, temp, fill):
"""Draw polygon.
- Keyword arguments:
- self -- Desenho.Desenho instance
- widget -- Area object (GtkDrawingArea)
- coords -- Two value tuple
+ @param self -- Desenho.Desenho instance
+ @param widget -- Area object (GtkDrawingArea)
+ @param coords -- Two value tuple
+ @param temp -- switch between pixmap and pixmap_temp
+ @param fill -- Fill object
"""
if temp == True:
- pixmap = self.d.pixmap_temp
+ pixmap = widget.pixmap_temp
else:
- pixmap = self.d.pixmap
- width, height = self.d.window.get_size()
+ pixmap = widget.pixmap
+ width, height = widget.window.get_size()
- pixmap.draw_drawable(self.d.gc, self.d.pixmap, 0, 0, 0, 0, width, height)
+ pixmap.draw_drawable(widget.gc, widget.pixmap, 0, 0, 0, 0, width, height)
- if self.d.polygon_start == True: # Starting a new polygon ?
+ if widget.polygon_start == True: # Starting a new polygon ?
if temp == True:
- pixmap.draw_line(self.d.gc_line,self.d.oldx,self.d.oldy, coords[0], coords[1])
+ pixmap.draw_line(widget.gc_line,widget.oldx,widget.oldy, coords[0], coords[1])
else:
- pixmap.draw_line(self.d.gc_line,self.d.oldx,self.d.oldy, coords[0], coords[1])
- self.d.enableUndo(widget)
- self.d.last = coords
- self.d.first = self.d.oldx, self.d.oldy
- self.d.polygon_start = False
- self.d.points = [self.d.first, coords]
+ pixmap.draw_line(widget.gc_line,widget.oldx,widget.oldy, coords[0], coords[1])
+ widget.enableUndo(widget)
+ widget.last = coords
+ widget.first = widget.oldx, widget.oldy
+ widget.polygon_start = False
+ widget.points = [widget.first, coords]
else:
if temp == True:
- pixmap.draw_line(self.d.gc_line,self.d.last[0],self.d.last[1],coords[0],coords[1])
+ pixmap.draw_line(widget.gc_line,widget.last[0],widget.last[1],coords[0],coords[1])
else:
- x = coords[0] - self.d.first[0]
- y = coords[1] - self.d.first[1]
+ x = coords[0] - widget.first[0]
+ y = coords[1] - widget.first[1]
d = math.hypot(x,y)
if d > 20: # close the polygon ?
- pixmap.draw_line(self.d.gc_line,self.d.last[0],self.d.last[1],coords[0],coords[1])
- self.d.last = coords
- self.d.points.append(coords)
+ pixmap.draw_line(widget.gc_line,widget.last[0],widget.last[1],coords[0],coords[1])
+ widget.last = coords
+ widget.points.append(coords)
else:
- tp = tuple(self.d.points)
+ tp = tuple(widget.points)
if fill == True:
- pixmap.draw_polygon(self.d.gc, True, tp)
- pixmap.draw_polygon(self.d.gc_line, False, tp)
- self.d.last = -1, -1
- self.d.polygon_start = True
- self.d.undo_times -= 1#destroy the undo screen of polygon start
- self.d.enableUndo(widget)
+ pixmap.draw_polygon(widget.gc, True, tp)
+ pixmap.draw_polygon(widget.gc_line, False, tp)
+ widget.last = -1, -1
+ widget.polygon_start = True
+ widget.undo_times -= 1#destroy the undo screen of polygon start
+ widget.enableUndo(widget)
widget.queue_draw()
diff --git a/MANIFEST b/MANIFEST
index 6d4e969..d3943d7 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -65,9 +65,15 @@ images/star.png
images/text.png
images/trapezoid.png
images/triangle.png
+locale/ar/LC_MESSAGES/ar.mo
+locale/ar/LC_MESSAGES/ar.po
+locale/ar/activity.linfo
locale/de/LC_MESSAGES/de.mo
locale/de/LC_MESSAGES/de.po
locale/de/activity.linfo
+locale/el/LC_MESSAGES/el.mo
+locale/el/LC_MESSAGES/el.po
+locale/el/activity.linfo
locale/es/LC_MESSAGES/es.mo
locale/es/LC_MESSAGES/es.po
locale/es/activity.linfo
diff --git a/OficinaActivity.py b/OficinaActivity.py
index 6e9dea7..3d54bb3 100644
--- a/OficinaActivity.py
+++ b/OficinaActivity.py
@@ -65,12 +65,14 @@ from Area import Area
import logging
class OficinaActivity(activity.Activity):
+ def oficina(self, widget, data=None):
+ logging.info('Oficina')
+
def __init__(self, handle):
"""Initialize the OficinaActivity object.
- Keyword arguments:
- self --
- handle --
+ @param self
+ @param handle
"""
activity.Activity.__init__(self, handle)
@@ -101,11 +103,9 @@ class OficinaActivity(activity.Activity):
self._fixed.put(self.bg, 200, 100)
self.bg.show()
- #FIXME: use a textview instead of an Entry
self._textview = gtk.TextView()
# If we use this, text viewer will have constant size, we don't want that
#self._textview.set_size_request(100,100)
- #self._textview = gtk.Entry()
self._fixed.put(self._area, 200 , 100)
# Area size increased
@@ -129,8 +129,8 @@ class OficinaActivity(activity.Activity):
def read_file(self, file_path):
'''Read file from Sugar Journal.
- self --
- file_path --
+ @param self
+ @param file_path
'''
logging.debug('reading file %s', file_path)
@@ -138,16 +138,13 @@ class OficinaActivity(activity.Activity):
self._area.loadImage(file_path, self._area, False)
- # Does this work?
-# self._area.undo_times = 1
-# self._area.redo_times = 0
def write_file(self, file_path):
'''Save file on Sugar Journal.
- self --
- file_path --
+ @param self
+ @param file_path
'''
logging.debug('saving as PNG')
diff --git a/locale/ar/LC_MESSAGES/ar.mo b/locale/ar/LC_MESSAGES/ar.mo
new file mode 100644
index 0000000..f591804
--- /dev/null
+++ b/locale/ar/LC_MESSAGES/ar.mo
Binary files differ
diff --git a/locale/ar/LC_MESSAGES/ar.po b/locale/ar/LC_MESSAGES/ar.po
new file mode 100644
index 0000000..8f9e013
--- /dev/null
+++ b/locale/ar/LC_MESSAGES/ar.po
@@ -0,0 +1,256 @@
+# Arabian translation for Oficina package.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Khaled Hosny <khaledhosny@eglug.org>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 14:09-0300\n"
+"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
+"Language-Team: Arabic <doc@arabeyes.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\nnplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+
+#: toolbox.py:75
+msgid "Edit"
+msgstr "حرّر"
+
+#: toolbox.py:79
+msgid "Tools"
+msgstr "أدوات"
+
+#: toolbox.py:83
+msgid "Shapes"
+msgstr "أشكال"
+
+#: toolbox.py:87
+msgid "Text"
+msgstr "نص"
+
+#: toolbox.py:91
+msgid "Image"
+msgstr "صورة"
+
+#: toolbox.py:95
+msgid "Effects"
+msgstr "مؤثِّرات"
+
+#: toolbox.py:110
+msgid "Undo"
+msgstr ""
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr ""
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr ""
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr ""
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr ""
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr ""
+
+#: toolbox.py:227
+msgid "Pencil"
+msgstr "قلم"
+
+#: toolbox.py:232
+msgid "Brush"
+msgstr "فرشاة"
+
+#: toolbox.py:241
+msgid "Eraser"
+msgstr "ممحاة"
+
+#: toolbox.py:250
+#: toolbox.py:715
+msgid "Polygon"
+msgstr "مضلع"
+
+#: toolbox.py:259
+msgid "Bucket"
+msgstr "محفظة"
+
+#: toolbox.py:283
+msgid "Rectangular Marquee"
+msgstr "معلِّمة مربّعة"
+
+#: toolbox.py:313
+msgid "Square"
+msgstr "مربّع"
+
+#: toolbox.py:314
+msgid "Circle"
+msgstr "دائرة"
+
+#: toolbox.py:333
+#: toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
+msgid "1"
+msgstr "١"
+
+#: toolbox.py:558
+msgid "2"
+msgstr "٢"
+
+#: toolbox.py:559
+msgid "3"
+msgstr "٣"
+
+#: toolbox.py:560
+msgid "5"
+msgstr "٥"
+
+#: toolbox.py:561
+#: toolbox.py:1306
+msgid "10"
+msgstr "١٠"
+
+#: toolbox.py:562
+msgid "20"
+msgstr "٢٠"
+
+#: toolbox.py:563
+#: toolbox.py:1304
+msgid "50"
+msgstr "٥٠"
+
+#: toolbox.py:564
+#: toolbox.py:1303
+msgid "100"
+msgstr "١٠٠"
+
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
+msgid "Ellipse"
+msgstr "بيضاوي"
+
+#: toolbox.py:701
+msgid "Rectangle"
+msgstr "مستطيل"
+
+#: toolbox.py:710
+msgid "Line"
+msgstr "خط"
+
+#: toolbox.py:733
+msgid "Heart"
+msgstr "قلب"
+
+#: toolbox.py:743
+msgid "Parallelogram"
+msgstr "متوازي أضلا"
+
+#: toolbox.py:752
+msgid "Arrow"
+msgstr "سهم"
+
+#: toolbox.py:761
+msgid "Star"
+msgstr "نجمة"
+
+#: toolbox.py:770
+msgid "Trapezoid"
+msgstr "معيّن"
+
+#: toolbox.py:779
+msgid "Triangle"
+msgstr "مثلّث"
+
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr ""
+
+#: toolbox.py:987
+msgid "Type"
+msgstr "نوع"
+
+#: toolbox.py:1061
+msgid "Insert Image"
+msgstr "أدرج صورة"
+
+#: toolbox.py:1083
+msgid "Height"
+msgstr "الارتفا"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "العرض"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
+msgid "Open File..."
+msgstr "افتح ملف..."
+
+#: toolbox.py:1188
+msgid "Grayscale"
+msgstr "تدرج رمادي"
+
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
+
+#: toolbox.py:1299
+msgid "1000"
+msgstr ""
+
+#: toolbox.py:1300
+msgid "500"
+msgstr ""
+
+#: toolbox.py:1301
+msgid "200"
+msgstr ""
+
+#: toolbox.py:1302
+msgid "150"
+msgstr ""
+
+#: toolbox.py:1305
+msgid "25"
+msgstr ""
+
+#: toolbox.py:1319
+msgid "ZOOM +"
+msgstr "زووم +"
+
+#: toolbox.py:1324
+msgid "ZOOM -"
+msgstr "زووم -"
+
diff --git a/locale/ar/activity.linfo b/locale/ar/activity.linfo
new file mode 100644
index 0000000..d56dcd0
--- /dev/null
+++ b/locale/ar/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = رسْم
diff --git a/locale/de/LC_MESSAGES/de.mo b/locale/de/LC_MESSAGES/de.mo
index 055e4b2..9251667 100644
--- a/locale/de/LC_MESSAGES/de.mo
+++ b/locale/de/LC_MESSAGES/de.mo
Binary files differ
diff --git a/locale/de/LC_MESSAGES/de.po b/locale/de/LC_MESSAGES/de.po
index 3c35d6f..f3deb97 100644
--- a/locale/de/LC_MESSAGES/de.po
+++ b/locale/de/LC_MESSAGES/de.po
@@ -1,292 +1,248 @@
-# Deutsch translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# Germany translation for Drawing Activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Nathalia <nathalia.sautchuk@gmail.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 13:49-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 13:57-0300\n"
+"Last-Translator: Nathalia <nathalia.sautchuk@gmail.com>\n"
"Language-Team: Language locale/de/LC\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
-msgstr "Redigieren"
+msgstr "Bearbeiten"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "Werkzeuge"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "Formen"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "Text"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "Bild"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
-msgstr "Effekt"
+msgstr "Effekte"
+
+#: toolbox.py:110
+msgid "Undo"
+msgstr ""
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr ""
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr ""
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr ""
-#: toolbox.py:195
+#: toolbox.py:123
+msgid "Clear"
+msgstr ""
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr ""
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "Bleistift"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
-msgstr "Bürste"
+msgstr "Pinsel"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
msgstr "Radiergummi"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
msgstr "Polygon"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
-msgstr "Wanne"
+msgstr "Farbeimer"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
-msgstr "Rechteckiges Festzelt"
+msgstr "Rechteckige Auswahl"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "Quadrat"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "Kreis"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Black"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "White"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Maroon"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Red"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Olive"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Yellow"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Green"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Lime"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Teal"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Aqua"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Navy"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Blue"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Purple"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fuchsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr "Ellipse"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
msgstr "Viereck"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "Linie"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "Herz"
+
+#: toolbox.py:743
msgid "Parallelogram"
-msgstr "Parallelogram"
+msgstr "Parallelogramm"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
msgstr "Pfeil"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr "Stern"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
msgstr "Paralleltrapez"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr "Dreieck"
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr ""
+
+#: toolbox.py:987
msgid "Type"
msgstr "Type"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr "Bild-einsetzen"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "Höhe"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "Breite"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
msgid "Open File..."
-msgstr "Akte öffnen…"
+msgstr "Datei öffnen…"
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
-msgstr "Graue Skala"
+msgstr "Graustufen"
+
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
-#: toolbox.py:940
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "ZOOM +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "ZOOM -"
-
diff --git a/locale/el/LC_MESSAGES/el.mo b/locale/el/LC_MESSAGES/el.mo
new file mode 100644
index 0000000..03c5065
--- /dev/null
+++ b/locale/el/LC_MESSAGES/el.mo
Binary files differ
diff --git a/locale/el/LC_MESSAGES/el.po b/locale/el/LC_MESSAGES/el.po
new file mode 100644
index 0000000..9371997
--- /dev/null
+++ b/locale/el/LC_MESSAGES/el.po
@@ -0,0 +1,250 @@
+# Greek translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Simos Xenitellis <simos.lists@googlemail.com>, 2007.
+# G Mwralhs <>, 2007.
+# FivosZ <>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 13:58-0300\n"
+"Last-Translator: Simos Xenitellis <simos.lists@googlemail.com>\n"
+"Language-Team: Greek <olpc-l10n-el@googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: toolbox.py:75
+msgid "Edit"
+msgstr "Επεξεργασία"
+
+#: toolbox.py:79
+msgid "Tools"
+msgstr "Εργαλεία"
+
+#: toolbox.py:83
+msgid "Shapes"
+msgstr "Σχήματα"
+
+#: toolbox.py:87
+msgid "Text"
+msgstr "Κείμενο"
+
+#: toolbox.py:91
+msgid "Image"
+msgstr "Εικόνα"
+
+#: toolbox.py:95
+msgid "Effects"
+msgstr "Εφέ"
+
+#: toolbox.py:110
+msgid "Undo"
+msgstr ""
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr ""
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr ""
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr ""
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr ""
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr ""
+
+#: toolbox.py:227
+msgid "Pencil"
+msgstr "Μολύβι"
+
+#: toolbox.py:232
+msgid "Brush"
+msgstr "Πινέλο"
+
+#: toolbox.py:241
+msgid "Eraser"
+msgstr "Γόμα"
+
+#: toolbox.py:250 toolbox.py:715
+msgid "Polygon"
+msgstr "Πολύγωνο"
+
+#: toolbox.py:259
+msgid "Bucket"
+msgstr "Κουβάς"
+
+#: toolbox.py:283
+msgid "Rectangular Marquee"
+msgstr "Ορθογώνια επιλογή"
+
+#: toolbox.py:313
+msgid "Square"
+msgstr "Τετράγωνο"
+
+#: toolbox.py:314
+msgid "Circle"
+msgstr "Κύκλος"
+
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
+msgid "1"
+msgstr "1"
+
+#: toolbox.py:558
+msgid "2"
+msgstr "2"
+
+#: toolbox.py:559
+msgid "3"
+msgstr "3"
+
+#: toolbox.py:560
+msgid "5"
+msgstr "5"
+
+#: toolbox.py:561 toolbox.py:1306
+msgid "10"
+msgstr "10"
+
+#: toolbox.py:562
+msgid "20"
+msgstr "20"
+
+#: toolbox.py:563 toolbox.py:1304
+msgid "50"
+msgstr "50"
+
+#: toolbox.py:564 toolbox.py:1303
+msgid "100"
+msgstr "100"
+
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
+msgid "Ellipse"
+msgstr "Έλλειψη"
+
+#: toolbox.py:701
+msgid "Rectangle"
+msgstr "Ορθογώνιο"
+
+#: toolbox.py:710
+msgid "Line"
+msgstr "Γραμμή"
+
+#: toolbox.py:733
+msgid "Heart"
+msgstr "Καρδιά"
+
+#: toolbox.py:743
+msgid "Parallelogram"
+msgstr "Παραλληλόγραμμο"
+
+#: toolbox.py:752
+msgid "Arrow"
+msgstr "Βέλος"
+
+#: toolbox.py:761
+msgid "Star"
+msgstr "Άστρο"
+
+#: toolbox.py:770
+msgid "Trapezoid"
+msgstr "Τραπέζιο"
+
+#: toolbox.py:779
+msgid "Triangle"
+msgstr "Τρίγωνο"
+
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr ""
+
+#: toolbox.py:987
+msgid "Type"
+msgstr "Τύπος"
+
+#: toolbox.py:1061
+msgid "Insert Image"
+msgstr "Εισαγωγή εικόνας"
+
+#: toolbox.py:1083
+msgid "Height"
+msgstr "Ύψος"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "Πλάτος"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
+msgid "Open File..."
+msgstr "Άνοιγμα αρχείου..."
+
+#: toolbox.py:1188
+msgid "Grayscale"
+msgstr "Κλίμακα του γκρι"
+
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
+
+#: toolbox.py:1299
+msgid "1000"
+msgstr "1000"
+
+#: toolbox.py:1300
+msgid "500"
+msgstr "500"
+
+#: toolbox.py:1301
+msgid "200"
+msgstr "200"
+
+#: toolbox.py:1302
+msgid "150"
+msgstr "150"
+
+#: toolbox.py:1305
+msgid "25"
+msgstr "25"
+
+#: toolbox.py:1319
+msgid "ZOOM +"
+msgstr "ΕΣΤΙΑΣΗ +"
+
+#: toolbox.py:1324
+msgid "ZOOM -"
+msgstr "ΕΣΤΙΑΣΗ -"
diff --git a/locale/el/activity.linfo b/locale/el/activity.linfo
new file mode 100644
index 0000000..ea27f99
--- /dev/null
+++ b/locale/el/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = Ζωγραφική
diff --git a/locale/es/LC_MESSAGES/es.mo b/locale/es/LC_MESSAGES/es.mo
index 8ba1617..9c1b8c8 100644
--- a/locale/es/LC_MESSAGES/es.mo
+++ b/locale/es/LC_MESSAGES/es.mo
Binary files differ
diff --git a/locale/es/LC_MESSAGES/es.po b/locale/es/LC_MESSAGES/es.po
index cf40f69..bed109e 100644
--- a/locale/es/LC_MESSAGES/es.po
+++ b/locale/es/LC_MESSAGES/es.po
@@ -1,292 +1,248 @@
-# Spanish translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# Spanish translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Nathalia <nathalia.sautchuk@gmail.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: Oficina <oficina@lsi.usp.br>\n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 13:50-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 13:58-0300\n"
+"Last-Translator: Nathalia <nathalia.sautchuk@gmail.com>\n"
"Language-Team: Language locale/es/LC\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr "Editar"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "Herramientas"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "Formas"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "Texto"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "Imagen"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr "Efectos"
-#: toolbox.py:195
+#: toolbox.py:110
+msgid "Undo"
+msgstr "Deshacer"
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr "Rehacer"
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr "Copiar"
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr "Pegar"
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr "Limpiar"
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr "Color da Herramienta"
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "Lápiz"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
msgstr "Pincel"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
-msgstr "Goma"
+msgstr "Borrador"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
msgstr "Polígono"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
msgstr "Balde"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
msgstr "Selección Rectangular"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "Cuadrado"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "Círculo"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Black"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "White"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Maroon"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Red"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Olive"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Yellow"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Green"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Lime"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Teal"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Aqua"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Navy"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Blue"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Purple"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fuchsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr "Llenar"
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr "Color de llenado"
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr "Color de trazo"
+
+#: toolbox.py:692
msgid "Ellipse"
-msgstr "Elipsis"
+msgstr "Elipse"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
msgstr "Rectángulo"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "Línea"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "Corazón"
+
+#: toolbox.py:743
msgid "Parallelogram"
msgstr "Paralelogramo"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
-msgstr "Saeta"
+msgstr "Flecha"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr "Estrella"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
-msgstr "Trapecio"
+msgstr "Trapezoide"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr "Triángulo"
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr "Lados: "
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr "Puntos: "
+
+#: toolbox.py:987
msgid "Type"
-msgstr "Tipo"
+msgstr "Teclear"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr "Insertar Imagen"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "Altura"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "Anchura"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr "Retamañar (%)"
+
+#: toolbox.py:1148
msgid "Open File..."
-msgstr "Abrir el Fichero..."
+msgstr "Abrir Archivo..."
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
msgstr "Escala de Gris"
-#: toolbox.py:940
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr "Arco iris"
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr "Tamaño"
+
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "ZOOM +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "ZOOM -"
-
diff --git a/locale/fr/LC_MESSAGES/fr.mo b/locale/fr/LC_MESSAGES/fr.mo
index 07adc93..4657758 100644
--- a/locale/fr/LC_MESSAGES/fr.mo
+++ b/locale/fr/LC_MESSAGES/fr.mo
Binary files differ
diff --git a/locale/fr/LC_MESSAGES/fr.po b/locale/fr/LC_MESSAGES/fr.po
index 99023b7..31edd15 100644
--- a/locale/fr/LC_MESSAGES/fr.po
+++ b/locale/fr/LC_MESSAGES/fr.po
@@ -1,292 +1,248 @@
-# French translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# French translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Nathalia <nathalia.sautchuk@gmail.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: oficina <oficina@lsi.usp.br>\n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 13:51-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 13:59-0300\n"
+"Last-Translator: Nathalia <nathalia.sautchuk@gmail.com>\n"
"Language-Team: Language locale/fr/LC\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr "Éditer"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "Outils"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "Formes"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "Texte"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "Image"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr "Effet"
-#: toolbox.py:195
+#: toolbox.py:110
+msgid "Undo"
+msgstr "Défaire"
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr "Refaire"
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr "Copier"
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr "Collier"
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr "Nettoyer"
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr "Couleur de le Outil"
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "Crayon"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
msgstr "Pinceau"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
msgstr "Gomme"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
msgstr "Polygone"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
msgstr "Seau"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
msgstr "Sélection Rectangulaire"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "Carré"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "Cercle"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Black"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "White"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Maroon"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Red"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Olive"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Yellow"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Green"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Lime"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Teal"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Aqua"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Navy"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Blue"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Purple"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fuchsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr "Ellipse"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
msgstr "Rectangle"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "Ligne"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "Coeur"
+
+#: toolbox.py:743
msgid "Parallelogram"
msgstr "Parallélogramme"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
msgstr "Flèche"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr "Étoile"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
msgstr "Trapèze"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr "Triangle"
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr "Côtés: "
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr "Points: "
+
+#: toolbox.py:987
msgid "Type"
-msgstr "Type"
+msgstr "Saisir"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr "Insérer la Image"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "Hauteur"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "Largeur"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
msgid "Open File..."
msgstr "Ouvrir le Dossier..."
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
-msgstr "Escala de Gris"
+msgstr "Escale de Gris"
+
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr "Arc-en-ciel"
-#: toolbox.py:940
+#: toolbox.py:1262
+msgid "Size"
+msgstr "Taille"
+
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "ZOOM +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "ZOOM -"
-
diff --git a/locale/ko_KO/LC_MESSAGES/ko_KO.mo b/locale/ko_KO/LC_MESSAGES/ko_KO.mo
index d166544..60031b2 100644
--- a/locale/ko_KO/LC_MESSAGES/ko_KO.mo
+++ b/locale/ko_KO/LC_MESSAGES/ko_KO.mo
Binary files differ
diff --git a/locale/ko_KO/LC_MESSAGES/ko_KO.po b/locale/ko_KO/LC_MESSAGES/ko_KO.po
index 437093d..ebaf512 100644
--- a/locale/ko_KO/LC_MESSAGES/ko_KO.po
+++ b/locale/ko_KO/LC_MESSAGES/ko_KO.po
@@ -1,292 +1,248 @@
-# Korean translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-# Do Young-Min (jeju123@gmail.com)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# Korean translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Do Young-Min <jeju123@gmail.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: oficina <oficina@lsi.usp.br>\n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 14:43-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 13:59-0300\n"
+"Last-Translator: Do Young-Min <jeju123@gmail.com>\n"
"Language-Team: Language locale/ko\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr "편집"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "툴"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "도형"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "텍스트"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "이미지"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr "효과"
-#: toolbox.py:195
+#: toolbox.py:110
+msgid "Undo"
+msgstr ""
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr ""
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr ""
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr ""
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr ""
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr ""
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "연필"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
msgstr "붓"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
msgstr "지우개"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
-msgstr ""
+msgstr "다각형"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
msgstr "부켓"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
-msgstr "사각 마퀴"
+msgstr "사각 선택툴"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "사각형"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "원"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Black"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "White"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Maroon"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Red"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Olive"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Yellow"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Green"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Lime"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Teal"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Aqua"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Navy"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Blue"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Purple"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fuchsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr "이클립스"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
-msgstr "사각"
+msgstr "사각형"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "선"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "중심"
+
+#: toolbox.py:743
msgid "Parallelogram"
-msgstr ""
+msgstr "평행사각형"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
-msgstr ""
+msgstr "화살표"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
-msgstr ""
+msgstr "별표"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
-msgstr ""
+msgstr "사다리꼴"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
+msgstr "삼각형"
+
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
msgstr ""
-#: toolbox.py:745
+#: toolbox.py:987
msgid "Type"
msgstr "타입"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
-msgstr "오브젝트 삽입"
+msgstr "이미지 삽입"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "높이"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "폭"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
msgid "Open File..."
msgstr "파일 열기…"
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
msgstr "그레이 스케일"
-#: toolbox.py:940
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
+
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "줌 +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "줌 -"
-
diff --git a/locale/paint.pot b/locale/paint.pot
index 46e138e..e39030a 100644
--- a/locale/paint.pot
+++ b/locale/paint.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-07-31 13:45-0300\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,222 +16,234 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr ""
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr ""
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr ""
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr ""
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr ""
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr ""
-#: toolbox.py:195
-msgid "Pencil"
+#: toolbox.py:110
+msgid "Undo"
msgstr ""
-#: toolbox.py:201
-msgid "Brush"
+#: toolbox.py:111
+msgid "Redo"
msgstr ""
-#: toolbox.py:208
-msgid "Eraser"
+#: toolbox.py:112
+msgid "Copy"
msgstr ""
-#: toolbox.py:214
-msgid "Polygon"
+#: toolbox.py:113
+msgid "Paste"
msgstr ""
-#: toolbox.py:219
-msgid "Bucket"
+#: toolbox.py:123
+msgid "Clear"
msgstr ""
-#: toolbox.py:243
-msgid "Rectangular Marquee"
+#: toolbox.py:198
+msgid "Tool Color"
msgstr ""
-#: toolbox.py:263
-msgid "Square"
-msgstr ""
-
-#: toolbox.py:264
-msgid "Circle"
-msgstr ""
-
-#: toolbox.py:333 toolbox.py:404
-msgid "Black"
-msgstr ""
-
-#: toolbox.py:334 toolbox.py:405
-msgid "White"
-msgstr ""
-
-#: toolbox.py:335 toolbox.py:406
-msgid "Maroon"
-msgstr ""
-
-#: toolbox.py:336 toolbox.py:407
-msgid "Red"
-msgstr ""
-
-#: toolbox.py:337 toolbox.py:408
-msgid "Olive"
-msgstr ""
-
-#: toolbox.py:338 toolbox.py:409
-msgid "Yellow"
+#: toolbox.py:227
+msgid "Pencil"
msgstr ""
-#: toolbox.py:339 toolbox.py:410
-msgid "Green"
+#: toolbox.py:232
+msgid "Brush"
msgstr ""
-#: toolbox.py:340 toolbox.py:411
-msgid "Lime"
+#: toolbox.py:241
+msgid "Eraser"
msgstr ""
-#: toolbox.py:341 toolbox.py:412
-msgid "Teal"
+#: toolbox.py:250 toolbox.py:715
+msgid "Polygon"
msgstr ""
-#: toolbox.py:342 toolbox.py:413
-msgid "Aqua"
+#: toolbox.py:259
+msgid "Bucket"
msgstr ""
-#: toolbox.py:343 toolbox.py:414
-msgid "Navy"
+#: toolbox.py:283
+msgid "Rectangular Marquee"
msgstr ""
-#: toolbox.py:344 toolbox.py:415
-msgid "Blue"
+#: toolbox.py:313
+msgid "Square"
msgstr ""
-#: toolbox.py:345 toolbox.py:416
-msgid "Purple"
+#: toolbox.py:314
+msgid "Circle"
msgstr ""
-#: toolbox.py:346 toolbox.py:417
-msgid "Fuchsia"
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
msgstr ""
-#: toolbox.py:484
+#: toolbox.py:557
msgid "1"
msgstr ""
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr ""
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr ""
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr ""
-#: toolbox.py:488 toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr ""
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr ""
-#: toolbox.py:490 toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr ""
-#: toolbox.py:491 toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr ""
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr ""
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
msgstr ""
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr ""
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr ""
+
+#: toolbox.py:743
msgid "Parallelogram"
msgstr ""
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
msgstr ""
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr ""
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
msgstr ""
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr ""
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr ""
+
+#: toolbox.py:987
msgid "Type"
msgstr ""
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr ""
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr ""
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr ""
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
msgid "Open File..."
msgstr ""
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
msgstr ""
-#: toolbox.py:940
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
+
+#: toolbox.py:1299
msgid "1000"
msgstr ""
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr ""
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr ""
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr ""
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr ""
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr ""
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr ""
diff --git a/locale/pt_BR/LC_MESSAGES/pt_BR.mo b/locale/pt_BR/LC_MESSAGES/pt_BR.mo
index 8d80932..29f4ed4 100644
--- a/locale/pt_BR/LC_MESSAGES/pt_BR.mo
+++ b/locale/pt_BR/LC_MESSAGES/pt_BR.mo
Binary files differ
diff --git a/locale/pt_BR/LC_MESSAGES/pt_BR.po b/locale/pt_BR/LC_MESSAGES/pt_BR.po
index eeeb95b..f32772b 100644
--- a/locale/pt_BR/LC_MESSAGES/pt_BR.po
+++ b/locale/pt_BR/LC_MESSAGES/pt_BR.po
@@ -1,292 +1,248 @@
-# Portuguese translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# Brazilian Portuguese translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Nathalia <nathalia.sautchuk@gmail.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: Oficina <oficina@lsi.usp.br>\n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 13:52-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 14:00-0300\n"
+"Last-Translator: Nathalia <nathalia.sautchuk@gmail.com>\n"
"Language-Team: Language locale/pt\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr "Editar"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "Ferramentas"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "Formas"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "Texto"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "Imagem"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr "Efeitos"
-#: toolbox.py:195
+#: toolbox.py:110
+msgid "Undo"
+msgstr "Desfazer"
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr "Refazer"
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr "Copiar"
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr "Colar"
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr "Limpar"
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr "Cor da Ferramenta"
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "Lápis"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
msgstr "Pincel"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
msgstr "Borracha"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
msgstr "Polígono"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
msgstr "Balde"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
-msgstr "Seleção Retangular"
+msgstr "Seleção Rectangular"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "Quadrado"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "Círculo"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Preto"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "Branco"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Vinho"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Vermelho"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Verde Oliva"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Amarelo"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Verde"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Verde Limão"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Verde"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Verde Água"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Azul Marinho"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Azul"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Roxo"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fucsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr "Preenchimento"
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr "Cor do Preenchimento"
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr "Cor da Linha"
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr "Elipse"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
-msgstr "Rectângulo"
+msgstr "Retângulo"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "Linha"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "Coração"
+
+#: toolbox.py:743
msgid "Parallelogram"
msgstr "Paralelogramo"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
msgstr "Seta"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr "Estrela"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
msgstr "Trapézio"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr "Triângulo"
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr "Lados: "
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr "Pontos: "
+
+#: toolbox.py:987
msgid "Type"
-msgstr "Tipo"
+msgstr "Digite"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr "Inserir Imagem"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "Altura"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "Largura"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr "Redimensionar (%): "
+
+#: toolbox.py:1148
msgid "Open File..."
msgstr "Abrir Arquivo..."
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
msgstr "Escala de Cinza"
-#: toolbox.py:940
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr "Arco-Íris"
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr "Tamanho"
+
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "ZOOM +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "ZOOM -"
-
diff --git a/locale/zh_CN/LC_MESSAGES/zh_CN.mo b/locale/zh_CN/LC_MESSAGES/zh_CN.mo
index 4b68bca..20f2d1a 100644
--- a/locale/zh_CN/LC_MESSAGES/zh_CN.mo
+++ b/locale/zh_CN/LC_MESSAGES/zh_CN.mo
Binary files differ
diff --git a/locale/zh_CN/LC_MESSAGES/zh_CN.po b/locale/zh_CN/LC_MESSAGES/zh_CN.po
index a0f1057..fb72bc2 100644
--- a/locale/zh_CN/LC_MESSAGES/zh_CN.po
+++ b/locale/zh_CN/LC_MESSAGES/zh_CN.po
@@ -1,293 +1,248 @@
-# Simplified Chinese translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-# Ho Tsung Yin (johnytyh@lsi.usp.br)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# Simplified Chinese translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Ho Tsung Yin <johnytyh@lsi.usp.br>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: oficina <oficina@lsi.usp.br>\n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 14:02-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 14:01-0300\n"
+"Last-Translator: Ho Tsung Yin <johnytyh@lsi.usp.br>\n"
"Language-Team: Language locale/zh\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr "编辑"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "工具"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "形状"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "文字"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "图片"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr "效果"
-#: toolbox.py:195
+#: toolbox.py:110
+msgid "Undo"
+msgstr ""
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr ""
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr ""
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr ""
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr ""
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr ""
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "铅笔"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
msgstr "刷子"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
msgstr "橡皮艇"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
msgstr "多边形"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
msgstr "色彩桶"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
msgstr "方形选择"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "方形"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "圆形"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Black"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "White"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Maroon"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Red"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Olive"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Yellow"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Green"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Lime"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Teal"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Aqua"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Navy"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Blue"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Purple"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fuchsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr "椭圆形"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
msgstr "矩形"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "线条"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "中心"
+
+#: toolbox.py:743
msgid "Parallelogram"
msgstr "平行四边形"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
msgstr "箭头"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr "星状"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
msgstr "梯形"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr "三角形"
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr ""
+
+#: toolbox.py:987
msgid "Type"
msgstr "类型"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr "插入物件"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "高度"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "宽度"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
msgid "Open File..."
-msgstr "开启旧档"
+msgstr "开启旧档..."
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
msgstr "灰阶"
-#: toolbox.py:940
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
+
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "ZOOM +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "ZOOM -"
-
diff --git a/locale/zh_TW/LC_MESSAGES/zh_TW.mo b/locale/zh_TW/LC_MESSAGES/zh_TW.mo
index d004f11..eed4904 100644
--- a/locale/zh_TW/LC_MESSAGES/zh_TW.mo
+++ b/locale/zh_TW/LC_MESSAGES/zh_TW.mo
Binary files differ
diff --git a/locale/zh_TW/LC_MESSAGES/zh_TW.po b/locale/zh_TW/LC_MESSAGES/zh_TW.po
index 3542877..c688c42 100644
--- a/locale/zh_TW/LC_MESSAGES/zh_TW.po
+++ b/locale/zh_TW/LC_MESSAGES/zh_TW.po
@@ -1,293 +1,248 @@
-# Tradicional Chinese translations for Oficina package.
-# Copyright 2007, NATE-LSI-EPUSP
-
-# Oficina is developed in Brazil at Escola Politécnica of
-# Universidade de São Paulo. NATE is part of LSI (Integrable
-# Systems Laboratory) and stands for Learning, Work and Entertainment
-# Research Group. Visit our web page:
-# www.lsi.usp.br/nate
-# Suggestions, bugs and doubts, please email oficina@lsi.usp.br
-
-# Oficina is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation version 2 of
-# the License.
-# Oficina is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-# You should have received a copy of the GNU General Public
-# License along with Oficina; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-# The copy of the GNU General Public License is found in the
-# COPYING file included in the source distribution.
-
-# Authors:
-# Joyce Alessandra Saul (joycealess@gmail.com)
-# Andre Mossinato (andremossinato@gmail.com)
-# Nathalia Sautchuk Patrício (nathalia.sautchuk@gmail.com)
-# Pedro Kayatt (pekayatt@gmail.com)
-# Rafael Barbolo Lopes (barbolo@gmail.com)
-# Alexandre A. Gonçalves Martinazzo (alexandremartinazzo@gmail.com)
-
-# Colaborators:
-# Bruno Gola (brunogola@gmail.com)
-# Ho Tsung Yin (johnytyh@lsi.usp.br)
-
-# Group Manager:
-# Irene Karaguilla Ficheman (irene@lsi.usp.br)
-
-# Cientific Coordinator:
-# Roseli de Deus Lopes (roseli@lsi.usp.br)
-
+# Tradicional Chinese translation of Drawing activity.
+# Copyright (C) 2007 NATE LSI-USP
+# This file is distributed under the same license as the Oficina package.
+#
+# Ho Tsung Yin <johnytyh@lsi.usp.br>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: 1.0\n"
-"Report-Msgid-Bugs-To: Oficina <oficina@lsi.usp.br>\n"
-"POT-Creation-Date: 2007-07-31 10:21-0300\n"
-"PO-Revision-Date: 2007-07-31 13:54-0300\n"
-"Last-Translator: Nathalia Sautchuk Patrício <nathysautchuk@usp.br>\n"
+"Project-Id-Version: drawing.master\n"
+"Report-Msgid-Bugs-To: oficina@lsi.usp.br\n"
+"POT-Creation-Date: 2007-09-11 13:52-0300\n"
+"PO-Revision-Date: 2007-09-11 14:01-0300\n"
+"Last-Translator: Ho Tsung Yin <johnytyh@lsi.usp.br>\n"
"Language-Team: Language locale/zh\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: toolbox.py:74
+#: toolbox.py:75
msgid "Edit"
msgstr "編輯"
-#: toolbox.py:78
+#: toolbox.py:79
msgid "Tools"
msgstr "工具"
-#: toolbox.py:82
+#: toolbox.py:83
msgid "Shapes"
msgstr "形狀"
-#: toolbox.py:86
+#: toolbox.py:87
msgid "Text"
msgstr "文字"
-#: toolbox.py:90
+#: toolbox.py:91
msgid "Image"
msgstr "圖片"
-#: toolbox.py:94
+#: toolbox.py:95
msgid "Effects"
msgstr "效果"
-#: toolbox.py:195
+#: toolbox.py:110
+msgid "Undo"
+msgstr ""
+
+#: toolbox.py:111
+msgid "Redo"
+msgstr ""
+
+#: toolbox.py:112
+msgid "Copy"
+msgstr ""
+
+#: toolbox.py:113
+msgid "Paste"
+msgstr ""
+
+#: toolbox.py:123
+msgid "Clear"
+msgstr ""
+
+#: toolbox.py:198
+msgid "Tool Color"
+msgstr ""
+
+#: toolbox.py:227
msgid "Pencil"
msgstr "鉛筆"
-#: toolbox.py:201
+#: toolbox.py:232
msgid "Brush"
msgstr "刷子"
-#: toolbox.py:208
+#: toolbox.py:241
msgid "Eraser"
msgstr "橡皮艇"
-#: toolbox.py:214
+#: toolbox.py:250 toolbox.py:715
msgid "Polygon"
msgstr "多邊形"
-#: toolbox.py:219
+#: toolbox.py:259
msgid "Bucket"
msgstr "色彩桶"
-#: toolbox.py:243
+#: toolbox.py:283
msgid "Rectangular Marquee"
msgstr "矩形選擇"
-#: toolbox.py:263
+#: toolbox.py:313
msgid "Square"
msgstr "方形"
-#: toolbox.py:264
+#: toolbox.py:314
msgid "Circle"
msgstr "圓形"
-#: toolbox.py:333
-#: toolbox.py:404
-msgid "Black"
-msgstr "Black"
-
-#: toolbox.py:334
-#: toolbox.py:405
-msgid "White"
-msgstr "White"
-
-#: toolbox.py:335
-#: toolbox.py:406
-msgid "Maroon"
-msgstr "Maroon"
-
-#: toolbox.py:336
-#: toolbox.py:407
-msgid "Red"
-msgstr "Red"
-
-#: toolbox.py:337
-#: toolbox.py:408
-msgid "Olive"
-msgstr "Olive"
-
-#: toolbox.py:338
-#: toolbox.py:409
-msgid "Yellow"
-msgstr "Yellow"
-
-#: toolbox.py:339
-#: toolbox.py:410
-msgid "Green"
-msgstr "Green"
-
-#: toolbox.py:340
-#: toolbox.py:411
-msgid "Lime"
-msgstr "Lime"
-
-#: toolbox.py:341
-#: toolbox.py:412
-msgid "Teal"
-msgstr "Teal"
-
-#: toolbox.py:342
-#: toolbox.py:413
-msgid "Aqua"
-msgstr "Aqua"
-
-#: toolbox.py:343
-#: toolbox.py:414
-msgid "Navy"
-msgstr "Navy"
-
-#: toolbox.py:344
-#: toolbox.py:415
-msgid "Blue"
-msgstr "Blue"
-
-#: toolbox.py:345
-#: toolbox.py:416
-msgid "Purple"
-msgstr "Purple"
-
-#: toolbox.py:346
-#: toolbox.py:417
-msgid "Fuchsia"
-msgstr "Fuchsia"
-
-#: toolbox.py:484
+#: toolbox.py:333 toolbox.py:949
+msgid "Fill"
+msgstr ""
+
+#: toolbox.py:557
msgid "1"
msgstr "1"
-#: toolbox.py:485
+#: toolbox.py:558
msgid "2"
msgstr "2"
-#: toolbox.py:486
+#: toolbox.py:559
msgid "3"
msgstr "3"
-#: toolbox.py:487
+#: toolbox.py:560
msgid "5"
msgstr "5"
-#: toolbox.py:488
-#: toolbox.py:947
+#: toolbox.py:561 toolbox.py:1306
msgid "10"
msgstr "10"
-#: toolbox.py:489
+#: toolbox.py:562
msgid "20"
msgstr "20"
-#: toolbox.py:490
-#: toolbox.py:945
+#: toolbox.py:563 toolbox.py:1304
msgid "50"
msgstr "50"
-#: toolbox.py:491
-#: toolbox.py:944
+#: toolbox.py:564 toolbox.py:1303
msgid "100"
msgstr "100"
-#: toolbox.py:628
+#: toolbox.py:657
+msgid "Fill Color"
+msgstr ""
+
+#: toolbox.py:669
+msgid "Stroke Color"
+msgstr ""
+
+#: toolbox.py:692
msgid "Ellipse"
msgstr "橢圓形"
-#: toolbox.py:633
+#: toolbox.py:701
msgid "Rectangle"
msgstr "矩形"
-#: toolbox.py:638
+#: toolbox.py:710
msgid "Line"
msgstr "線條"
-#: toolbox.py:660
+#: toolbox.py:733
+msgid "Heart"
+msgstr "中心"
+
+#: toolbox.py:743
msgid "Parallelogram"
msgstr "平行四邊形"
-#: toolbox.py:665
+#: toolbox.py:752
msgid "Arrow"
msgstr "箭頭"
-#: toolbox.py:670
+#: toolbox.py:761
msgid "Star"
msgstr "星狀"
-#: toolbox.py:675
+#: toolbox.py:770
msgid "Trapezoid"
msgstr "梯形"
-#: toolbox.py:680
+#: toolbox.py:779
msgid "Triangle"
msgstr "三角形"
-#: toolbox.py:745
+#: toolbox.py:882
+msgid "Sides: "
+msgstr ""
+
+#: toolbox.py:925
+msgid "Points: "
+msgstr ""
+
+#: toolbox.py:987
msgid "Type"
msgstr "類型"
-#: toolbox.py:819
+#: toolbox.py:1061
msgid "Insert Image"
msgstr "插入物件"
-#: toolbox.py:863
+#: toolbox.py:1083
+msgid "Height"
+msgstr "高度"
+
+#: toolbox.py:1088
+msgid "Width"
+msgstr "寬度"
+
+#: toolbox.py:1139
+msgid "Resize (%): "
+msgstr ""
+
+#: toolbox.py:1148
msgid "Open File..."
-msgstr "開啟舊檔"
+msgstr "開啟舊檔..."
-#: toolbox.py:900
+#: toolbox.py:1188
msgid "Grayscale"
msgstr "灰階"
-#: toolbox.py:940
+#: toolbox.py:1193
+msgid "Rainbow"
+msgstr ""
+
+#: toolbox.py:1262
+msgid "Size"
+msgstr ""
+
+#: toolbox.py:1299
msgid "1000"
msgstr "1000"
-#: toolbox.py:941
+#: toolbox.py:1300
msgid "500"
msgstr "500"
-#: toolbox.py:942
+#: toolbox.py:1301
msgid "200"
msgstr "200"
-#: toolbox.py:943
+#: toolbox.py:1302
msgid "150"
msgstr "150"
-#: toolbox.py:946
+#: toolbox.py:1305
msgid "25"
msgstr "25"
-#: toolbox.py:960
+#: toolbox.py:1319
msgid "ZOOM +"
msgstr "ZOOM +"
-#: toolbox.py:965
+#: toolbox.py:1324
msgid "ZOOM -"
msgstr "ZOOM -"
-
diff --git a/setup.py b/setup.py
index 3b9166d..791a375 100755
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,5 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from sugar.activity import bundlebuilder
-
-bundlebuilder.start('Paint')
-
+if __name__ == "__main__":
+ bundlebuilder.start('Paint')
diff --git a/toolbox.py b/toolbox.py
index 3aa2b46..3de6395 100644
--- a/toolbox.py
+++ b/toolbox.py
@@ -63,8 +63,9 @@ from sugar.graphics.toggletoolbutton import ToggleToolButton
from sugar.graphics.combobox import ComboBox
from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
-
+#Create toolbars for the activity
class Toolbox(ActivityToolbox):
+ ## The Constructor
def __init__(self, activity):
ActivityToolbox.__init__(self, activity)
@@ -99,8 +100,11 @@ class Toolbox(ActivityToolbox):
#self._view_toolbar.show()
self.set_current_toolbar(2)
+
+##Make the Edit Toolbar
class DrawEditToolbar(EditToolbar):
+ ## The Constructor
def __init__(self, activity):
EditToolbar.__init__(self)
@@ -159,7 +163,7 @@ class DrawEditToolbar(EditToolbar):
def _on_signal_action_saved_cb(self, widget, data=None):
self._verify_sensitive_buttons()
-
+ ##define when a button is active
def _verify_sensitive_buttons(self):
self.undo.set_sensitive( self._activity._area.can_undo() )
self.redo.set_sensitive( self._activity._area.can_redo() )
@@ -170,7 +174,7 @@ class DrawEditToolbar(EditToolbar):
def _clear_all_cb(self, widget, data=None):
self._activity._area.clear()
-
+##Determine Tools of the Toolbar
class ToolsToolbar(gtk.Toolbar):
#Tool default definitions
@@ -194,7 +198,7 @@ class ToolsToolbar(gtk.Toolbar):
'sides' : None,
'points' : None
}
-
+ ##The Constructor
_TOOL_ERASER = {
'name' : 'eraser',
'size' : 20,
@@ -396,11 +400,11 @@ class ToolsToolbar(gtk.Toolbar):
def _configure_palette(self, widget, tool=None):
- '''Set palette for a tool
- widget - the widget which Palette will be set, a ToolButton object
- tool - the reference tool for Palette creation. Its values are
- restricted to Class constants
- '''
+ """Set palette for a tool
+ @param self -- gtk.Toolbar
+ @param widget - the widget which Palette will be set, a ToolButton object
+ @param tool - the reference tool for Palette creation. Its values are restricted to Class constants
+ """
logging.debug('setting a palette for %s', tool['name'])
@@ -510,34 +514,28 @@ class ToolsToolbar(gtk.Toolbar):
def set_shape(self, widget=None, tool=None, shape=None):
- '''
+ """
Set a tool shape according to user choice at Tool Palette
- '''
-# if tool == self._TOOL_BRUSH:
-# self._activity._area.brush_shape = shape
-# elif tool == self._TOOL_ERASER:
-# self._activity._area.eraser_shape = shape
+ @param self -- gtk.Toolbar
+ @param widget -- The connected widget, if any; necessary in case this method is used in a connect()
+ @param tool -- A dictionnary to determine which tool is been using
+ @param shape -- Determine which shape Brush and Erase will use
+ """
+
tool['shape'] = shape
self.set_tool(tool=tool)
def set_tool(self, widget=None, tool=None):
- '''
+ """
Set tool to the Area object. Configures tool's color and size.
- '''
-# # setting tool
-# self._activity._area.tool = tool
-#
-# # setting size and color
-# size = self._stroke_size.get_size()
-# self._stroke_size.set_stroke_size(size)
-#
-# color = self._stroke_color.get_color()
-# self._stroke_color.set_stroke_color(color)
+ @param self -- gtk.Toolbar
+ @param widget -- The connected widget, if any; necessary in case this method is used in a connect()
+ @param tool -- A dictionnary to determine which tool is been using
+ """
- # New method to set tools
- #tool['size'] = self._stroke_size.get_size()
+ # New method to set tools; using dict
# Color must be allocated; if not, it will be displayed as black
new_color = self._stroke_color.get_color()
@@ -567,9 +565,13 @@ class ToolsToolbar(gtk.Toolbar):
self.set_tool(tool=tool)
def _on_fill_checkbutton_map(self, checkbutton, data=None):
- '''
+ """
Update checkbutton condition to agree with Area.Area object; this prevents tools to have fill checked but be drawed not filled.
- '''
+
+ @param self -- gtk.Toolbar
+ @param checkbutton
+ @param data
+ """
self._activity._area.fill = checkbutton.get_active()
def _on_color_set(self, colorbutton, tool):
@@ -589,46 +591,39 @@ class ToolsToolbar(gtk.Toolbar):
if radiobutton.get_active():
self.set_shape(tool=tool, shape=shape)
+'''
+##Class to manage Fill colors
class ComboFillColors(ToolComboBox):
- """Class to manage Fill colors """
-
- def __init__(self, activity):
- """Initialize the object
-
- Keyword arguments:
- activity -- the OficinaActivity object
- """
-
+ ## The Constructor
+ def __init__(self, activity):
ToolComboBox.__init__(self)
self._activity = activity
self._fill_color = self.combo
- self._fill_color.append_item(self.alloc_color('#000000'), _('Black'))
- self._fill_color.append_item(self.alloc_color('#ffffff'), _('White'))
- self._fill_color.append_item(self.alloc_color('#800000'), _('Maroon'))
- self._fill_color.append_item(self.alloc_color('#ff0000'), _('Red'))
- self._fill_color.append_item(self.alloc_color('#808000'), _('Olive'))
- self._fill_color.append_item(self.alloc_color('#ffff00'), _('Yellow'))
- self._fill_color.append_item(self.alloc_color('#008000'), _('Green'))
- self._fill_color.append_item(self.alloc_color('#00ff00'), _('Lime'))
- self._fill_color.append_item(self.alloc_color('#008080'), _('Teal'))
- self._fill_color.append_item(self.alloc_color('#00ffff'), _('Aqua'))
- self._fill_color.append_item(self.alloc_color('#000080'), _('Navy'))
- self._fill_color.append_item(self.alloc_color('#0000ff'), _('Blue'))
- self._fill_color.append_item(self.alloc_color('#800080'), _('Purple'))
- self._fill_color.append_item(self.alloc_color('#ff00ff'), _('Fuchsia'))
+ self._fill_color.append_item(self.alloc_color('#000000'), 'Black')
+ self._fill_color.append_item(self.alloc_color('#ffffff'), 'White')
+ self._fill_color.append_item(self.alloc_color('#800000'), 'Maroon')
+ self._fill_color.append_item(self.alloc_color('#ff0000'), 'Red')
+ self._fill_color.append_item(self.alloc_color('#808000'), 'Olive')
+ self._fill_color.append_item(self.alloc_color('#ffff00'), 'Yellow')
+ self._fill_color.append_item(self.alloc_color('#008000'), 'Green')
+ self._fill_color.append_item(self.alloc_color('#00ff00'), 'Lime')
+ self._fill_color.append_item(self.alloc_color('#008080'), 'Teal')
+ self._fill_color.append_item(self.alloc_color('#00ffff'), 'Aqua')
+ self._fill_color.append_item(self.alloc_color('#000080'), 'Navy')
+ self._fill_color.append_item(self.alloc_color('#0000ff'), 'Blue')
+ self._fill_color.append_item(self.alloc_color('#800080'), 'Purple')
+ self._fill_color.append_item(self.alloc_color('#ff00ff'), 'Fuchsia')
self._fill_color.set_active(0)
self._fill_color.connect('changed', self._combo_changed_cb)
def alloc_color(self, color):
"""Alloc new color.
-
- Keyword arguments:
- color -- hexadecimal number
+ @param self -- gtk.Toolbar
+ @param color -- hexadecimal number
- Return:
- a gdk.Color object
+ @return gdk.Color object
"""
colormap = self.get_colormap()
@@ -641,65 +636,56 @@ class ComboFillColors(ToolComboBox):
def set_fill_color(self, color):
"""Set the fill color in Area
-
- Keyword arguments:
- color -- a gdk.Color object
+ @param self -- gtk.Toolbar
+ @param color -- a gdk.Color object
"""
self._activity._area._set_fill_color(color)
def get_color(self):
"""Get the fill color from combobox
-
- Return:
- a gdk.Color object
+ @param self -- gtk.Toolbar
+
+ @return gdk.Color object
"""
model = self.combo.get_model()
active = self.combo.get_active()
return model[active][0]
-
+##Class to manage Stroke colors
class ComboStrokeColors(ToolComboBox):
- """Class to manage Stroke colors """
-
+ ##The Constructor
def __init__(self, activity):
- """Initialize the object
-
- Keyword arguments:
- activity -- the OficinaActivity object
- """
ToolComboBox.__init__(self)
self._activity = activity
self._stroke_color = self.combo
- self._stroke_color.append_item(self.alloc_color('#000000'), _('Black'))
- self._stroke_color.append_item(self.alloc_color('#ffffff'), _('White'))
- self._stroke_color.append_item(self.alloc_color('#800000'), _('Maroon'))
- self._stroke_color.append_item(self.alloc_color('#ff0000'), _('Red'))
- self._stroke_color.append_item(self.alloc_color('#808000'), _('Olive'))
- self._stroke_color.append_item(self.alloc_color('#ffff00'), _('Yellow'))
- self._stroke_color.append_item(self.alloc_color('#008000'), _('Green'))
- self._stroke_color.append_item(self.alloc_color('#00ff00'), _('Lime'))
- self._stroke_color.append_item(self.alloc_color('#008080'), _('Teal'))
- self._stroke_color.append_item(self.alloc_color('#00ffff'), _('Aqua'))
- self._stroke_color.append_item(self.alloc_color('#000080'), _('Navy'))
- self._stroke_color.append_item(self.alloc_color('#0000ff'), _('Blue'))
- self._stroke_color.append_item(self.alloc_color('#800080'), _('Purple'))
- self._stroke_color.append_item(self.alloc_color('#ff00ff'), _('Fuchsia'))
+ self._stroke_color.append_item(self.alloc_color('#000000'), 'Black')
+ self._stroke_color.append_item(self.alloc_color('#ffffff'), 'White')
+ self._stroke_color.append_item(self.alloc_color('#800000'), 'Maroon')
+ self._stroke_color.append_item(self.alloc_color('#ff0000'), 'Red')
+ self._stroke_color.append_item(self.alloc_color('#808000'), 'Olive')
+ self._stroke_color.append_item(self.alloc_color('#ffff00'), 'Yellow')
+ self._stroke_color.append_item(self.alloc_color('#008000'), 'Green')
+ self._stroke_color.append_item(self.alloc_color('#00ff00'), 'Lime')
+ self._stroke_color.append_item(self.alloc_color('#008080'), 'Teal')
+ self._stroke_color.append_item(self.alloc_color('#00ffff'), 'Aqua')
+ self._stroke_color.append_item(self.alloc_color('#000080'), 'Navy')
+ self._stroke_color.append_item(self.alloc_color('#0000ff'), 'Blue')
+ self._stroke_color.append_item(self.alloc_color('#800080'), 'Purple')
+ self._stroke_color.append_item(self.alloc_color('#ff00ff'), 'Fuchsia')
self._stroke_color.set_active(0)
self._stroke_color.connect('changed', self._combo_changed_cb)
def alloc_color(self, color):
"""Alloc new color.
-
- Keyword arguments:
- color -- hexadecimal number
+ @param self -- gtk.Toolbar
+ @param color -- hexadecimal number
- Return:
- a gdk.Color object
+ @return gdk.Color object
"""
colormap = self.get_colormap()
@@ -712,9 +698,9 @@ class ComboStrokeColors(ToolComboBox):
def get_color(self):
"""Get the fill color from combobox
-
- Return:
- a gdk.Color object
+ @param self -- gtk.Toolbar
+
+ @return a gdk.Color object
"""
model = self.combo.get_model()
@@ -723,14 +709,13 @@ class ComboStrokeColors(ToolComboBox):
def set_stroke_color(self, color):
"""Set the fill color in Area
-
- Keyword arguments:
- color -- a gdk.Color object
+ @param self -- gtk.Toolbar
+ @param color -- a gdk.Color object
"""
self._activity._area._set_stroke_color(color)
-
-
+'''
+##Class to manage Stroke Size
class ComboStrokeSize(ToolComboBox):
_ACTION_1 = 1
@@ -748,7 +733,7 @@ class ComboStrokeSize(ToolComboBox):
_ACTION_10000 = 10000
_ACTION_100000 = 100000
"""
-
+ ##The Constructor
def __init__(self, activity):
ToolComboBox.__init__(self)
self._activity = activity
@@ -788,9 +773,9 @@ class ComboStrokeSize(ToolComboBox):
active = self.combo.get_active()
return model[active][0]
-
+##Class to manage the Fill Color of a Button
class ButtonFillColor(gtk.ColorButton):
-
+ ##The Constructor
def __init__(self, activity):
gtk.ColorButton.__init__(self)
self._activity = activity
@@ -809,9 +794,9 @@ class ButtonFillColor(gtk.ColorButton):
new_color = self.alloc_color(color)
self._activity._area._set_fill_color(new_color)
-
+##Class to manage the Stroke Color of a Button
class ButtonStrokeColor(gtk.ColorButton):
-
+ ##The Constructor
def __init__(self, activity):
gtk.ColorButton.__init__(self)
self._activity = activity
@@ -830,7 +815,7 @@ class ButtonStrokeColor(gtk.ColorButton):
new_color = self.alloc_color(color)
self._activity._area._set_stroke_color(new_color)
-
+##Make the Shapes Toolbar
class ShapesToolbar(gtk.Toolbar):
_SHAPE_ARROW = 'arrow'
@@ -845,7 +830,7 @@ class ShapesToolbar(gtk.Toolbar):
_SHAPE_STAR = 'star'
_SHAPE_TRAPEZOID = 'trapezoid'
_SHAPE_TRIANGLE = 'triangle'
-
+ ##The Constructor
def __init__(self, activity):
gtk.Toolbar.__init__(self)
@@ -1139,11 +1124,11 @@ class ShapesToolbar(gtk.Toolbar):
self._create_simple_palette(self._shape_triangle)
def _create_simple_palette(self, button):
- '''
+ """
Create a simple palette with an CheckButton named "Fill". Most tools use only this.
- Keyword arguments:
- widget -- a ToolButton to associate the palette.
- '''
+ @param self -- gtk.Toolbar
+ @param button -- a ToolButton to associate the palette.
+ """
palette = button.get_palette()
fill_checkbutton = gtk.CheckButton(_('Fill'))
@@ -1158,20 +1143,24 @@ class ShapesToolbar(gtk.Toolbar):
palette.set_content(fill_checkbutton)
def _on_fill_checkbutton_map(self, checkbutton, data=None):
- '''
+ """
Update checkbutton condition to agree with Area.Area object; this prevents tools to have fill checked but be drawed not filled.
- '''
+
+ @param self -- gtk.Toolbar
+ @param checkbutton
+ @param data
+ """
self._activity._area.fill = checkbutton.get_active()
# def _on_fill_checkbutton_after_clicked(self, widget, checkbutton):
# # Trying to prevent same condition described at self._on_fill_checkbutton_map
# self._activity._area.fill = checkbutton.get_active()
-
+##Make the Text Toolbar
class TextToolbar(gtk.Toolbar):
_ACTION_TEXT = 'text'
-
+ ##The Constructor
def __init__(self, activity):
gtk.Toolbar.__init__(self)
@@ -1240,7 +1229,7 @@ class TextToolbar(gtk.Toolbar):
cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() , pixbuf, 6, 21)
self._activity._area.window.set_cursor(cursor)
-
+##Make the Images Toolbar
class ImageToolbar(gtk.Toolbar):
_OBJECT_HEIGHT = 'height'
@@ -1248,7 +1237,7 @@ class ImageToolbar(gtk.Toolbar):
_OBJECT_ROTATE_LEFT = 'rotate-left'
_OBJECT_ROTATE_RIGHT = 'rotate-right'
_OBJECT_WIDTH = 'width'
-
+ ##The Constructor
def __init__(self, activity):
gtk.Toolbar.__init__(self)
@@ -1271,11 +1260,12 @@ class ImageToolbar(gtk.Toolbar):
self.insert(self._object_rotate_right, -1)
self._object_rotate_right.show()
self._object_rotate_right.set_tooltip(_('Rotate Right'))
+
+ """
self._object_height = ToolButton('object-height')
self.insert(self._object_height, -1)
self._object_height.show()
- self._object_height.connect('clicked', test_connect, activity, 'object-height')
self._object_height.set_tooltip(_('Height'))
self._object_width = ToolButton('object-width')
@@ -1284,18 +1274,61 @@ class ImageToolbar(gtk.Toolbar):
self._object_width.set_tooltip(_('Width'))
- self._object_height.connect('clicked', set_tool, activity, 'object-height', self._OBJECT_HEIGHT)
- """
+ self._configure_palette_resize(self._object_height, 'object-height', activity)
+ self._configure_palette_resize(self._object_width, 'object-width', activity)
+
+# self._object_height.connect('clicked', self.resize, activity, 'object-height', self._OBJECT_HEIGHT)
+
self._object_insert.connect('clicked', self.insertImage, activity)
#self._object_rotate_left.connect('clicked', self.rotate_left, activity)
#self._object_rotate_right.connect('clicked', set_tool, activity, 'object-rotate-right', self._OBJECT_ROTATE_RIGHT)
- #self._object_width.connect('clicked', set_tool, activity, 'object-width', self._OBJECT_WIDTH)
+# self._object_width.connect('clicked', self.resize, activity, 'object-width', self._OBJECT_WIDTH)
def rotate_left(self, widget, activity):
#activity._area._rotate_left(widget)
pass
-
+ def _resize(self, spinButton, tool, activity):
+ size = spinButton.get_value_as_int()
+ if activity._area.tool == 'marquee-rectangular' and activity._area.selmove:
+ if tool == "object-height":
+ activity._area.d.resizeSelection(activity._area,1., float(size)/100)
+ elif tool == "object-width":
+ activity._area.d.resizeSelection(activity._area,float(size)/100, 1.)
+
+ def _configure_palette_resize(self, widget, tool, activity):
+ """Set palette for a tool - width or height
+
+ @param self -- gtk.Toolbar
+ @param widget - the widget which Palette will be set, a ToolButton object
+ @param tool
+ @param activity
+ """
+ logging.debug('setting a palette for %s', tool)
+
+ palette = widget.get_palette()
+
+ spin = gtk.SpinButton()
+ spin.show()
+
+ # When inserted in a Palette, a spinbutton does not display text in black
+ black = gtk.gdk.Color(0,0,0)
+ spin.modify_text(gtk.STATE_NORMAL, black)
+
+ # This is where we set restrictions for Resizing:
+ # Initial value, minimum value, maximum value, step
+ initial = float(100)
+ adj = gtk.Adjustment(initial, 10.0, 500.0, 1.0)
+ spin.set_adjustment(adj)
+ spin.set_numeric(True)
+
+ label = gtk.Label(_('Resize (%): '))
+ label.show()
+ palette.action_bar.pack_start(label)
+ palette.action_bar.pack_start(spin)
+
+ spin.connect('value-changed', self._resize, tool, activity)
+
def insertImage(self, widget, activity):
# TODO: add a filter to display images only.
dialog = gtk.FileChooserDialog(title=(_('Open File...')),
@@ -1320,12 +1353,12 @@ class ImageToolbar(gtk.Toolbar):
dialog.destroy()
-
+##Make the Effects Tools Toolbar
class EffectsToolbar(gtk.Toolbar):
_EFFECT_GRAYSCALE = 'grayscale'
_EFFECT_RAINBOW = 'rainbow'
-
+ ##The Constructor
def __init__(self, activity):
gtk.Toolbar.__init__(self)
@@ -1364,10 +1397,10 @@ class EffectsToolbar(gtk.Toolbar):
"""
self._effect_grayscale.connect('clicked', self.grayscale)
self._effect_rainbow.connect('clicked', self.rainbow)
-
+ ##Make the colors be in grayscale
def grayscale(self, widget):
self._activity._area.grayscale(widget)
-
+ ##Like the brush, but change it color when painting
def rainbow(self, widget):
self._activity._area.tool = self._EFFECT_RAINBOW
@@ -1383,11 +1416,11 @@ class EffectsToolbar(gtk.Toolbar):
def _configure_palette(self, widget, tool=None):
- '''Set palette for a tool
- widget - the widget which Palette will be set
- tool - the reference tool for Palette creation. Its values are
- restricted to Class constants
- '''
+ """Set palette for a tool
+ @param self -- gtk.Toolbar
+ @param widget - the widget which Palette will be set
+ @param tool - the reference tool for Palette creation. Its values are restricted to Class constants
+ """
logging.debug('setting a palette for %s', tool)
@@ -1427,7 +1460,7 @@ class EffectsToolbar(gtk.Toolbar):
self.rainbow(self._effect_rainbow)
-
+##Make the View Toolbar
class ViewToolbar(gtk.Toolbar):
_ACTION_1000 = 0
@@ -1439,7 +1472,7 @@ class ViewToolbar(gtk.Toolbar):
_ACTION_25 = 6
_ACTION_10 = 7
-
+ ##The Constructor
def __init__(self, activity):
gtk.Toolbar.__init__(self)