Add GPL headers, remove some obsolete tests

This commit is contained in:
Marco Pesenti Gritti 2006-10-15 01:16:43 +02:00
parent 30eedd9e2e
commit ae9b28cb1b
11 changed files with 149 additions and 104 deletions

View File

@ -1,3 +1,19 @@
# Copyright (C) 2006, 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
from sugar.simulator import Bot
bot = Bot()

View File

@ -1,3 +1,19 @@
# Copyright (C) 2006, 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 random
from sugar.simulator import Bot

View File

@ -1,3 +1,19 @@
# Copyright (C) 2006, 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
from sugar.simulator import Bot
bot = Bot()

17
tests/simulator/simulator Executable file → Normal file
View File

@ -1,4 +1,21 @@
#!/usr/bin/python
# Copyright (C) 2006, 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
import gobject

17
tests/test-browser.py Executable file → Normal file
View File

@ -1,4 +1,21 @@
#!/usr/bin/python
# Copyright (C) 2006, 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 pygtk
pygtk.require('2.0')

View File

@ -1,59 +0,0 @@
#!/usr/bin/python
import pygtk
pygtk.require('2.0')
from sugar.session.UITestSession import UITestSession
session = UITestSession()
session.start()
import gtk
import goocanvas
from sugar.graphics.iconcolor import IconColor
from sugar.graphics.IconItem import IconItem
from sugar.graphics.CanvasView import CanvasView
from sugar.graphics.CanvasBox import CanvasBox
from sugar.graphics.Grid import Grid
def _new_icon_clicked_cb(icon):
box.remove_child(icon)
def _icon_clicked_cb(icon):
icon = IconItem(color=IconColor(), icon_name='activity-groupchat')
icon.connect('clicked', _new_icon_clicked_cb)
box.set_constraints(icon, 3, 3)
box.add_child(icon, 0)
model = goocanvas.CanvasModelSimple()
root = model.get_root_item()
grid = Grid()
box = CanvasBox(grid, CanvasBox.HORIZONTAL, 1)
grid.set_constraints(box, 3, 3)
root.add_child(box)
rect = goocanvas.Rect(fill_color='red')
box.set_constraints(rect, 3, 3)
box.add_child(rect)
icon = IconItem(color=IconColor(), icon_name='activity-web')
icon.connect('clicked', _icon_clicked_cb)
box.set_constraints(icon, 3, 3)
box.add_child(icon)
icon = IconItem(color=IconColor(), icon_name='activity-groupchat')
box.set_constraints(icon, 3, 3)
box.add_child(icon)
window = gtk.Window()
window.connect("destroy", lambda w: gtk.main_quit())
window.show()
canvas = CanvasView()
canvas.show()
window.add(canvas)
canvas.set_model(model)
gtk.main()

View File

@ -1,45 +0,0 @@
#!/usr/bin/python
import pygtk
pygtk.require('2.0')
from sugar.session.UITestSession import UITestSession
session = UITestSession()
session.start()
import sys
import random
import gtk
import hippo
from sugar.graphics import IconColor
from sugar.graphics.CanvasIcon import CanvasIcon
from sugar.graphics.CanvasView import CanvasView
window = gtk.Window()
window.connect("destroy", lambda w: gtk.main_quit())
window.show()
canvas = hippo.Canvas()
canvas.show()
window.add(canvas)
box = hippo.CanvasBox(background_color=0x4f4f4fff)
canvas.set_root(box)
icon_names = [ 'stock-buddy', 'activity-groupchat', 'activity-web']
k = 0
while k < 1:
i = 0
while i < 10:
color = IconColor.IconColor()
icon_name_n = int(random.random() * len(icon_names))
icon = CanvasIcon(icon_name=icon_names[icon_name_n],
size=75, color=color)
box.append(icon, 0)
i += 1
k += 1
gtk.main()

17
tests/test-snowflake-box.py Executable file → Normal file
View File

@ -1,4 +1,21 @@
#!/usr/bin/python
# Copyright (C) 2006, 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 pygtk
pygtk.require('2.0')
import gobject

16
tests/test-spread-box.py Executable file → Normal file
View File

@ -1,3 +1,19 @@
# Copyright (C) 2006, 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
#!/usr/bin/python
import pygtk
pygtk.require('2.0')

17
tests/test-theme.py Executable file → Normal file
View File

@ -1,4 +1,21 @@
#!/usr/bin/python
# Copyright (C) 2006, 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 pygtk
pygtk.require('2.0')

17
tests/test-window-manager.py Executable file → Normal file
View File

@ -1,4 +1,21 @@
#!/usr/bin/python
# Copyright (C) 2006, 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 pygtk
pygtk.require('2.0')