208 Commits (master)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron e13c4fefab Fix bundlebuilder genpot test
Lurking copy and paste error.
6 years ago
Gonzalo Odiard b02ade879a Implement mime.get_mime_parents using python
This is the only method pending implemented in c,
then we can remove seven files previously used.

Add a test for a corner case untested previously

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
10 years ago
Daniel Narvaez 6fdf5f208a Use python2 shebang
Some distributions have switched to python3 as default and our code
breaks because it's python2 specific. Follow the PEP 394
recommendation.
11 years ago
Daniel Drake be91f84a4b Avoid auto-import of bundle helpers (#4527)
The new bundle helpers were being auto-loaded with sugar3.bundle due
to their placement in __init__.py. This was causing Gi to be imported,
breaking GTK2 activity launches.

Move the helpers to a dedicated module.
11 years ago
Daniel Drake f4c1bd152a Add bundle instantiation helpers
Add some helper functions for use by upcoming changes in the Sugar shell.
11 years ago
William Orr b9e17f640e pep8'd tests 11 years ago
William Orr e649070aa2 Replaced deprecated GObject methods with GLib methods 11 years ago
Daniel Narvaez 9f71aa864f Remove various unused bits 11 years ago
Daniel Narvaez 6202d4d5cc Bind xdgmime in SugarExt
And use it in the sugar3.mime modules. This allows
to get rid of the pygtk generated sugarbase module,
along with the wrapping code.

Also add more cases to test_time to make sure
everything is still working.
11 years ago
Daniel Narvaez e6397cf2db Some initial infrastructure for UI tests
The uitree module exposes the at-spi tree. We can use it to do
functional tests of the UI, by checking if the expected
widgets exists, clicking them etc.

A simple example of how this can be used is in the test, which
runs a window and check that it has the expected button.
11 years ago
Daniel Narvaez 5ad6c4e236 Add test for dev command 11 years ago
Daniel Narvaez 617c11a078 Add test for the genpot command 11 years ago
Daniel Narvaez ac153f3cdc Add test for the build command 11 years ago
Daniel Narvaez f66fbe4c08 Add tests for bundlebuilder 11 years ago
Daniel Narvaez 148655635f Add a make target for tests
We are running the existing test_mime.py. All the other tests which
are not unit tests but more examples of code one can run interactively
are moved to the example directory.
11 years ago
Daniel Narvaez db448c4eea Remove a lot of unused imports
Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
11 years ago
Simon Schampijer 63b8e87b1a ToggleToolbutton: do hide the tooltip when clicked or touched
This is the same behaviour as for the RadioToolButton and the
ToolButton. See 5a1b380dd6 where
we did the same for the RadioToolbutton.

Updated the toolbuttons.py test to be able to test that code
path.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
11 years ago
Manuel Quiñones b9234202ab Add testcase for Gtk.ComboBox
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
11 years ago
Manuel Quiñones 693eaab975 New ProgressIcon widget - SL #4384
A new icon widget useful to display progress.  It is compatible with
sugar3.graphics.icon.Icon .  The progress is represented filling the
icon.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
11 years ago
Manuel Quiñones 5fd2dd8a98 Testsuite: set theme before running the test
Otherwise tests can't load icons before running because the icon theme
is not set.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
11 years ago
Manuel Quiñones 83efac4c57 Add testcase for CellRendererProgress - SL #1395
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
11 years ago
Manuel Quiñones 7931e104f4 Add Gtk.ProgressBar testcase.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Manuel Quiñones 2d9e9ec526 Add insensitive button to buttons testcase - SL #4172
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones dd5a68e8ce Add two testcases: tabs with and without buttons, and sensitive text
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Manuel Quiñones df1397dcf6 Update toolbar buttons testcase with API change for the icon name
Follow up of fe11a3aa23 .

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Manuel Quiñones 1f9684c7bf Add testcase for intro window - SL #3904
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones bb515893ab Add testcase for icon badges - SL #3835
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones a14574c666 Finish the port of the CellRendererIcon
In pygtk custom cellrenderers were done inheriting
gtk.GenericCellRenderer, and overriding the on_* methods.  Now we
inherit Gtk.CellRenderer and the methods to override changed to do_* .

The destroy signal was moved to Gtk.Widget [1] so the Gtk.CellRenderer
doesn't have it anymore.  Now we do the cleanup in the python
destructor method.  A testcase tests/graphics/customdestroy.py shows
how is done.

tests/graphics/cellrenderericon.py tests the usage.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>

[1] http://developer.gnome.org/gtk3/stable/ch24s02.html#id1459754
12 years ago
Manuel Quiñones cb141505fb Add testcase for Gtk buttons
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones 305384be3c Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
Draw a black background in the buttons when the palette is up, as
commit 01a06943 did with the ToolButton.  As the comment for that
commit states, we can change the prelight background color in the
theme, but not when the mouse moves over the Palette.

Also add testcase to test the three toolbuttons.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones be14c34d35 Use the Sugar Theme in the testsuite
To make useful tests for the Sugar widgets, the theme must be the
same.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones e2ddd70c13 Fix the drawing method of _IconWidget, used by IconTray
Invoker draw_rectangle() now receives a Cairo context, as can be seen in [1]

The testcase is also fixed by this commit.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>

[1] http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/palettewindow.py#line1018
12 years ago
Sascha Silbe 820efa56b9 Run pygi-convert.sh for automatic conversion from GTK2 to GTK3 + pygi.
This is only on a best-effort basis; the code will be in a broken state after
this patch and need to be fixed manually.

The purpose of committing the intermediate, non-working output is to make it
reproducible. It's impractical to manually review the changes.

The exact version used was 4f637212f13b197a95c824967a58496b9e3b877c from the
main pygobject repository [1] plus a custom patch [2] that hasn't been sent
upstream yet.

[1] git://git.gnome.org/pygobject
[2] https://sascha.silbe.org/patches/pygobject-convert-sugar-20111122.patch

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 9cb18cdcf3 Remove Canvas* widgets and other hippo-canvas using parts
hippo-canvas isn't available in the GTK3 world, so we need to remove
anything that depends on it. Activities that still use it will need replace
hippo-canvas based widgets with native GTK ones before they can be ported to
GTK3.

[replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Sascha Silbe 7acfbd070f style cleanup: prefer ' for strings
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
14 years ago
Sascha Silbe 4d978fda14 PEP8 cleanup: ensure lines are shorter than 80 characters
Caught by PEP8. This is important for Sugar because the XO has a small screen
where long lines would make the code hard to understand (because you need to
constantly scroll horizontally).

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer<simon@schampijer.de>
CC: Aleksey Lim <alsroot@member.fsf.org>
14 years ago
Sascha Silbe e2231d5620 PEP8 cleanup: fix number of blank lines
Caught by pep8.

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
14 years ago
Sascha Silbe 131c28bb72 fix EOL spaces
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
14 years ago
Tomeu Vizoso 44cabc891b Remove the hacks for asking the X server for screenshots and use gtk.Widget.get_snapshot() instead. 16 years ago
Benjamin Berg d37e90940c Fix the testcase for ticket 2855. 16 years ago
Benjamin Berg ac804177a1 Extend the iconwidget test to also test insensitive icons. 17 years ago
Tomeu Vizoso 7ad5cf3063 Update test for #5389. 17 years ago
Marco Pesenti Gritti cd61c52c7b SugarPreview API improvements 17 years ago
Marco Pesenti Gritti eaef1eb015 Experimental preview implementation using XShmGetImage.
Not hooked up yet.
17 years ago
Marco Pesenti Gritti b44a2916ba Rework sugar.logger and make activities just
redirect their output to a log.
17 years ago
Marco Pesenti Gritti 3a4f4166f0 Snapshot 47f473189e. 17 years ago
Marco Pesenti Gritti 0f32a1e193 Test for a long hippo scrolling view. 17 years ago
Tomeu Vizoso 07107fb81b #2896: Remove sugar.date module. 17 years ago