From ae9b28cb1b26a5181ec6bcfae0c44b8dd47e760c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 15 Oct 2006 01:16:43 +0200 Subject: [PATCH] Add GPL headers, remove some obsolete tests --- tests/simulator/demo/chaitanya.py | 16 +++++++++ tests/simulator/demo/others.py | 16 +++++++++ tests/simulator/demo/penelope.py | 16 +++++++++ tests/simulator/simulator | 17 +++++++++ tests/test-browser.py | 17 +++++++++ tests/test-grid.py | 59 ------------------------------- tests/test-icons.py | 45 ----------------------- tests/test-snowflake-box.py | 17 +++++++++ tests/test-spread-box.py | 16 +++++++++ tests/test-theme.py | 17 +++++++++ tests/test-window-manager.py | 17 +++++++++ 11 files changed, 149 insertions(+), 104 deletions(-) mode change 100755 => 100644 tests/simulator/simulator mode change 100755 => 100644 tests/test-browser.py delete mode 100755 tests/test-grid.py delete mode 100755 tests/test-icons.py mode change 100755 => 100644 tests/test-snowflake-box.py mode change 100755 => 100644 tests/test-spread-box.py mode change 100755 => 100644 tests/test-theme.py mode change 100755 => 100644 tests/test-window-manager.py diff --git a/tests/simulator/demo/chaitanya.py b/tests/simulator/demo/chaitanya.py index 09423cb1..7d374a3d 100644 --- a/tests/simulator/demo/chaitanya.py +++ b/tests/simulator/demo/chaitanya.py @@ -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() diff --git a/tests/simulator/demo/others.py b/tests/simulator/demo/others.py index 6e204253..7fee290f 100644 --- a/tests/simulator/demo/others.py +++ b/tests/simulator/demo/others.py @@ -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 diff --git a/tests/simulator/demo/penelope.py b/tests/simulator/demo/penelope.py index 48415663..60cc1fe3 100644 --- a/tests/simulator/demo/penelope.py +++ b/tests/simulator/demo/penelope.py @@ -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() diff --git a/tests/simulator/simulator b/tests/simulator/simulator old mode 100755 new mode 100644 index 9faae83a..6a0a0a8a --- a/tests/simulator/simulator +++ b/tests/simulator/simulator @@ -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 diff --git a/tests/test-browser.py b/tests/test-browser.py old mode 100755 new mode 100644 index 6407df8f..c7180be4 --- a/tests/test-browser.py +++ b/tests/test-browser.py @@ -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') diff --git a/tests/test-grid.py b/tests/test-grid.py deleted file mode 100755 index 7d031372..00000000 --- a/tests/test-grid.py +++ /dev/null @@ -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() diff --git a/tests/test-icons.py b/tests/test-icons.py deleted file mode 100755 index f3b6037b..00000000 --- a/tests/test-icons.py +++ /dev/null @@ -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() diff --git a/tests/test-snowflake-box.py b/tests/test-snowflake-box.py old mode 100755 new mode 100644 index 8c0c2fa9..86667432 --- a/tests/test-snowflake-box.py +++ b/tests/test-snowflake-box.py @@ -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 diff --git a/tests/test-spread-box.py b/tests/test-spread-box.py old mode 100755 new mode 100644 index e503a451..6c1672b0 --- a/tests/test-spread-box.py +++ b/tests/test-spread-box.py @@ -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') diff --git a/tests/test-theme.py b/tests/test-theme.py old mode 100755 new mode 100644 index e049fb16..4c5d2e76 --- a/tests/test-theme.py +++ b/tests/test-theme.py @@ -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') diff --git a/tests/test-window-manager.py b/tests/test-window-manager.py old mode 100755 new mode 100644 index 413a9dd5..5a0274bc --- a/tests/test-window-manager.py +++ b/tests/test-window-manager.py @@ -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')