Commit from One Laptop Per Child: Translation System by user HoboPrimate. 31 of 31...
[journal-activity.git] / tagbox.py
blobfe19da01cf6e436edee9940658c301f3524c0d5b
1 # Copyright (C) 2007, One Laptop Per Child
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 from gettext import gettext as _
18 import hippo
20 from sugar.graphics import style
22 class TagBox(hippo.CanvasBox, hippo.CanvasItem):
23 def __init__(self, model):
24 hippo.CanvasBox.__init__(self)
25 self.props.box_width = style.GRID_CELL_SIZE * 3
27 self._model = model
28 """
29 self.append(hippo.CanvasText(text=_('Add a new tag:'),
30 xalign=hippo.ALIGNMENT_START,
31 font_desc=style.FONT_NORMAL.get_pango_desc()))
33 self.append(Entry(), hippo.PACK_EXPAND)
34 """