[Sugar-devel] [PATCH sugar 7/7] Drop unused intro.py

2012-08-06 Thread Simon Schampijer
From: Daniel Narvaez dwnarv...@gmail.com

It was moved inside jarabe and ported to GTK+.

Signed-off-by: Daniel Narvaez dwnarv...@gmail.com
Acked-by: Simon Schampijer si...@laptop.org
---
 src/intro/intro.py | 271 -
 1 file changed, 271 deletions(-)
 delete mode 100644 src/intro/intro.py

diff --git a/src/intro/intro.py b/src/intro/intro.py
deleted file mode 100644
index 342ce1d..000
--- a/src/intro/intro.py
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# This program 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; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program 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 this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-import os
-from gettext import gettext as _
-
-import gtk
-import gobject
-import hippo
-import logging
-
-from sugar import env
-from sugar.graphics import style
-from sugar.graphics.icon import Icon
-from sugar.graphics.entry import CanvasEntry
-from sugar.profile import get_profile
-
-import colorpicker
-
-_BACKGROUND_COLOR = style.COLOR_WHITE
-
-class _Page(hippo.CanvasBox):
-__gproperties__ = {
-'valid': (bool, None, None, False,
-  gobject.PARAM_READABLE)
-}
-
-def __init__(self, **kwargs):
-hippo.CanvasBox.__init__(self, **kwargs)
-self.valid = False
-
-def set_valid(self, valid):
-self.valid = valid
-self.notify('valid')
-
-def do_get_property(self, pspec):
-if pspec.name == 'valid':
-return self.valid
-
-def activate(self):
-pass
-
-class _NamePage(_Page):
-def __init__(self, intro):
-_Page.__init__(self, xalign=hippo.ALIGNMENT_CENTER,
-   background_color=_BACKGROUND_COLOR.get_int(),
-   spacing=style.DEFAULT_SPACING,
-   orientation=hippo.ORIENTATION_HORIZONTAL,)
-
-self._intro = intro
-
-label = hippo.CanvasText(text=_(Name:))
-self.append(label)
-
-self._entry = CanvasEntry(box_width=style.zoom(300))
-self._entry.set_background(_BACKGROUND_COLOR.get_html())
-self._entry.connect('notify::text', self._text_changed_cb)
-
-widget = self._entry.props.widget
-widget.set_max_length(45)
-
-self.append(self._entry)
-
-if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-self.reverse()
-
-def _text_changed_cb(self, entry, pspec):
-valid = len(entry.props.text.strip())  0
-self.set_valid(valid)
-
-def get_name(self):
-return self._entry.props.text
-
-def activate(self):
-self._entry.props.widget.grab_focus()
-
-class _ColorPage(_Page):
-def __init__(self, **kwargs):
-_Page.__init__(self, xalign=hippo.ALIGNMENT_CENTER,
-   background_color=_BACKGROUND_COLOR.get_int(),
-   spacing=style.DEFAULT_SPACING,
-   yalign=hippo.ALIGNMENT_CENTER, **kwargs)
-
-self._label = hippo.CanvasText(text=_(Click to change color:),
-   xalign=hippo.ALIGNMENT_CENTER)
-self.append(self._label)
-
-self._cp = colorpicker.ColorPicker(xalign=hippo.ALIGNMENT_CENTER)
-self.append(self._cp)
-
-self._color = self._cp.get_color()
-self.set_valid(True)
-
-def get_color(self):
-return self._cp.get_color()
-
-class _IntroBox(hippo.CanvasBox):
-__gsignals__ = {
-'done': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT,
-   gobject.TYPE_PYOBJECT]))
-}
-
-PAGE_NAME = 0
-PAGE_COLOR = 1
-
-PAGE_FIRST = PAGE_NAME
-PAGE_LAST = PAGE_COLOR
-
-def __init__(self):
-hippo.CanvasBox.__init__(self, padding=style.zoom(30),
- background_color=_BACKGROUND_COLOR.get_int())
-
-self._page = self.PAGE_NAME
-self._name_page = _NamePage(self)
-self._color_page = _ColorPage()
-self._current_page = None
-self._next_button = None
-
-self._setup_page()
-
-def _setup_page(self):
-self.remove_all()
-
-if self._page == self.PAGE_NAME:
-self._current_page = self._name_page
-elif self._page == self.PAGE_COLOR:
-self._current_page = self._color_page
-
-self.append(self._current_page, 

Re: [Sugar-devel] [PATCH sugar 7/7] Drop unused intro.py

2012-08-06 Thread Sascha Silbe
Simon Schampijer si...@schampijer.de writes:

 From: Daniel Narvaez dwnarv...@gmail.com

 It was moved inside jarabe and ported to GTK+.

This file should be removed in the same patch that added the code to
jarabe, so that the code movement can easily be tracked and the actual
code changes be examined.

Sascha
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


pgpdiSSh9Q9Z2.pgp
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar 7/7] Drop unused intro.py

2012-08-06 Thread Simon Schampijer

On 08/06/2012 01:35 PM, Sascha Silbe wrote:

Simon Schampijer si...@schampijer.de writes:


From: Daniel Narvaez dwnarv...@gmail.com

It was moved inside jarabe and ported to GTK+.


This file should be removed in the same patch that added the code to
jarabe, so that the code movement can easily be tracked and the actual
code changes be examined.

Sascha


It has been moved a long time ago, outside this patch series. I guess 
Daniel came across this when grepping for hippo.


Simon

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar 7/7] Drop unused intro.py

2012-08-06 Thread Sascha Silbe
Simon Schampijer si...@schampijer.de writes:

[src/intro/intro.py]
 It has been moved a long time ago, outside this patch series. I guess 
 Daniel came across this when grepping for hippo.

OK. Please mention in the commit message that it has been unused since
1f91f7f7afd34143721ac66936546e950369.

Sascha
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


pgpl3abz2jn0A.pgp
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel