830 Commits (be91f84a4bf87fa138a20f5b15e8c906b7aa4774)

Author SHA1 Message Date
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 Narvaez 8fff409046 Add missing headers
Fixes distcheck
11 years ago
Daniel Drake 12476caa12 Improve bundle API for bundleregistry changes
The bundle API is a bit confusing and inconsistent. Fix up the
ActivityBundle and ContentBundle classes to be more consistent and to
work with the ongoing improvements being made in bundleregistry.
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
Gonzalo Odiard ad3c163023 Fix ObjectChooser backwards compatibility
The last change brak compatibility with the use in activities
without set the filter_type parameter, because None is not
a allowed value in the dbus call.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Daniel Narvaez f54229efd2 Move setting AT_SPI_CLIENT to discover
It needs to be called as early as possible before unit tests
has a chance to import gtk.

Hopefully will fix random test failures we are seeing in buildbot.
11 years ago
Daniel Narvaez 6d319619f0 Factor out the discover logic to the test module
This avoids duplication in sugar and sugar-toolkit-gtk3
makefiles.
11 years ago
Gonzalo Odiard da3786d2fb Add filter_type optative parameter to objectchooser
Constants are defined to select the different filter_type
values. A comment was added to document the use.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Daniel Narvaez 19bc2268d4 Log the UI tree on error
The dump method doesn't actually print anything, just
returns the tree as a string.
11 years ago
Daniel Narvaez 5bef5a82d2 Set the AT_SPI_CLIENT variable in the tests
This ensures the test itself is not recognized as a client
by the registry. I'm not sure how that happens since we are
not loading gtk, but it does. Not being a real gtk client with
a mainloop we wasn't answering dbus calls and causing the registry
to hang and fail.
11 years ago
Daniel Narvaez 4dc7b9e4a4 Don't set atspi timeout
Looking at the code I'm unconvinced this behaves as expected,
in certain cases at least. So reverting it for now to avoid
confusion.
11 years ago
Daniel Narvaez 521778636e Add a UIUnitTest class
To make it easier to write UI unit tests.
11 years ago
Daniel Narvaez c86c582e19 Resync with the sugar-build implementation of tree.py
Development continued there for a while. Now I will remove it
and used the toolkit implementation instead.

Changes:

* Retry faster
* Handle GLib errors
* Don't always dump the tree
* Support master atspi api
11 years ago
William Orr c736ffefcd pep8'd sugar3 11 years ago
William Orr 1252d95671 pep8'd sugar3.test 11 years ago
William Orr 69a7aa8f68 pep8'd sugar3.presence 11 years ago
William Orr edbc8f53b3 pep8'd sugar3.graphics 11 years ago
William Orr 51f07bba81 pep8'd sugar3.dispatch 11 years ago
William Orr 220c9b68ef pep8'd sugar3.datastore 11 years ago
William Orr 9e4454a2ed pep8'd sugar3.bundle 11 years ago
William Orr 8a6c935dd0 pep8'd sugar3.activity 11 years ago
Walter Bender 3e5c37f3f8 Adding SugarExt for setting hidden attribute on FAT files
This extension is used by Sugar to set the HIDDEN attribute for
.Sugar-Metadata. By creating an extension, we avoid the need to add an
additional dependency (fatattr) to Sugar. The code is modeled after
fatattr, using an IOCTL call get and set FAT file attributes.

There is a corresponding patch for model.py in sugar/src/jarabe/journal
11 years ago
Daniel Narvaez 9396b09ee4 Send bundleId and objectId to javascript
Also use the json module to generate the environemnt
dictionary string. This takes care of a None objectId
cleanly.
11 years ago
Gonzalo Odiard 58bab9cf6a Do not use the translated summary to get the value from gettext in the bundle builder
This patch is a rebased push from pull request #31

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Daniel Narvaez 1f5e39f3a8 Cleanup environment initialization
We are not setting up a single sugar.window.environment object.
11 years ago
Daniel Narvaez a1b73ff527 Rename HTML to web 11 years ago
Daniel Narvaez 8e381f9e2f Make the inspector toggle work reliably 11 years ago
Daniel Narvaez 28fe9b757f Use a relative path in the activities url
It's just a bit cleaner.
11 years ago
Daniel Narvaez a30af509c2 Rework HTMLActivity to not inherit from Activity
This will make the activity use less memory and start faster.
11 years ago
Daniel Narvaez 3aadcbcbf0 Move the websocket service to the shell
It's a first step to make html activities much lighter. It also
just makes a lot more sense to have them interact directly with
the system rather than proxying through the python activity.
11 years ago
Daniel Narvaez b276f61da1 Use javascript to setup websocket port and key 11 years ago
Daniel Narvaez 3f908ef999 Deprecate and ignore the SUGAR_EMULATOR variable 11 years ago
Daniel Narvaez 2fcac13791 Toggle the inspector on and off with ctrl-shift-i 11 years ago
Daniel Narvaez 0abae0e7d0 Use a custom scheme for app content
To get the origin right.
11 years ago
William Orr e649070aa2 Replaced deprecated GObject methods with GLib methods 11 years ago
William Orr 3a8760c9e4 Fixed crash in journal when mousing over activity icons 11 years ago
Simon Schampijer ba1abd4a33 Palettes: remove comment about deprecated API
We make use of this API in the shell and in the toolkit itself
and never removed those deprecated calls. Let's leave it like
this for now and remove the comment.
11 years ago
Daniel Narvaez 55a072470f Silence pyflake 11 years ago
Daniel Narvaez 9f71aa864f Remove various unused bits 11 years ago
Daniel Narvaez 6c4a9b34a1 Add a get_xo_color API 11 years ago
Daniel Narvaez 671ad1ae3e Require authentication before making API calls
Otherwise anything might access the bus.

Note: This will not work if the user moves to another html page.  They
will not have a port/key passed in the query string of the URL, so
they won't be able to connect.
11 years ago
Daniel Narvaez ff5612caee Add API to close an html activity
We are exposing it using a websocket server. The port of the server
is passed in the search string of the file:// url.
11 years ago
Daniel Narvaez 6cbc3d1a48 Improve XOColor fallback logic
We was failing if the value in gconf was None. Also parsing
the string once just to see if it's valid was pretty dumb.
11 years ago
Daniel Narvaez 680c501ad6 Add a binding for gconf_client_set_list (using strings) 11 years ago
Daniel Narvaez d4019684a3 Add exec script to build pure html activities
An hello world activity using the script
http://git.sugarlabs.org/hello-world/mainline/trees/html
11 years ago
Manuel Quiñones 7156e67aa2 Color Palette: get back horizontal padding - SL #4325
The PaletteWindow lost the horizontal padding when it started to be
used as replacement of palette menus.  So now each implementation has
to add the padding.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
11 years ago
Walter Bender b4c0b2258f Use gettext algorithm to determine locale for activity.linfo
When activity bundles are loaded, the activity name and summary are
pulled from an activity.linfo file that is associated with
locale. However, sometimes locale, which uses $LANG has been
superceded by $LANGUAGE as set in
extensions/cpsection/languages/model.py. This patch uses the same
algorithm as gettext.py to find activity.linfo

This problem is seen on the .AU systems which use en_AU for locale and
en_GB for LANGUAGE.
11 years ago
Daniel Narvaez 7cb4a1d72d Handle invalid /desktop/sugar/user/color
This is currently breaking the activity list unit test where
the profile has not been initialized. But, more in general,
it seems like we should not be crashing if our settings has
unexpected values.
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