A group of kids from the OLPC project in Caacupe have translated both
the sugar shell and the sugar gtk3 toolkit to Guarani. They are also in
the process of translating sugar activities [1].
This patch add the gn entry to the LINGUAS file so the gn.po file can be
properly installed, as already is being done with the sugar shell.
[1] http://translate.sugarlabs.org/gn/
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Historically, distro packagers have been using bunblebuilder, via
"setup.py install", to populate packages directories and files.
The install procedure uses ActivityBundle.install_mime_type to install
custom mime types, by creating symlinks and updating the system mime
types database via the update-mime-database tool.
When ActivityBundle.install_mime_type is executed during packages
creation, the symlinks end-up broken in the final package and the use
of update-mime-database populates the final packages with a new copy
of the database files which could clash with the system copy.
This patch adds a new option, called --skip-install-mime to "setup.py
install" to skip the execution of ActivityBundle.install_mime_type and
avoid the issues mentioned above.
Activity packagers should use this new option. The creation of symlinks
and the execution of update-mime-database should be done in post install
packaging steps.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
If is not initialized, the check for the espeak plugin will fail.
This patch also check for the espeak plugin at the beginnig
avoiding check every time the function enabled() is called.
There are two different palette widgets in Sugar.
_PaletteMenuWidget is a Gtk.Menu and _PaletteWindowWidget is a Gtk.Window.
Only the palettes where the widget is a Gtk.Window can do present()
After add the directory to the IGNORE_DIRS array,
we need make the standard procedure to get the list off files
for the bundle, get_files_in_git honor the configured ignored
files and dirs. That was not a problem until now,
because that files was already not added to git,
but in the case of the screenshots, are included in git,
but we don't want include them in our bundles.
This new invoker is able to handle all the palettes on a treeview,
removing the need of one invoker per cell renderer (CellRendererInvoker).
This simplifies the code and makes it more efficient.
Also removes the logic from the CellRendererIcon, which
should only care about drawing itself. [1]
Is important to note than in Gtk3 a CellRenderer is not a GtkWidget
then can't know when the mouse is over it or have the usual events
used by other invokers, making the implementation CellRendererInvoker
very complicate.
This commit also removes the invoker of CellRendererIcon.
The ScrollingDetector logic is simplified too,
because now there are only one invoker instead of one by renderer
and the example code updated.
[1] https://developer.gnome.org/gtk3/stable/GtkCellRenderer.html
Detecting if the treeview is scrolling we can improve the performance of
the CellRendererIcon by avoiding unneeded calculations.
The example scrollingdetector.py shows how this can be used. The
changes are backward compatible.
Signed-off-by: Manuel Quiñones <manuel.por.aca@gmail.com>
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
On commodity hardware without olpc-powerd, there is unnecessary
filesystem access.
On XO laptop hardware there are unnecessary errors in log for every
object delete:
ERROR root: Inhibit Suspend: Could not delete file
/var/run/powerd-inhibit-suspend/1773
Exception AttributeError: "'NoneType' object has no attribute
'endswith'" in <bound method PowerManager.__del__ of
<sugar3.power.PowerManager instance at 0xa15962c>> ignored
The Clock activity in speaking mode is a good reproducer.
Following changes are made:
- move the directory check to __init__, and set self._path to None if
olpc-powerd is not present,
- on inhibit_suspend, use self._path, which avoids a check of the
directory,
- on restore_suspend or __del__, avoid a call to os.unlink if
olpc-powerd is not present.
Use a more efficient method to check if the pointer is inside the cell,
because we have the cell_area in the do_render method.
Signed-off-by: Manuel Quiñones <manuel.por.aca@gmail.com>
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
This commit adds the `launch_bundle` function in `sugar3.activity.
activity` which accesses the same function in the shell is over dbus.
This is means the shell process launches the bundle. Activities
should not launch child processes as per the Rainbow security model
[1].
[1] http://wiki.laptop.org/go/Rainbow
If a translator add a '\n' char in the summary translation
ConfigParser can't parse the linfo file.
Remove them when the file is created and show a message to warning
to the developer.
When we ported sugar to Gtk3 we removed the support of the fields
exec and service_name due they were deprecated for a long time [1].
But this is still a problem in deployments, and we already added
compatibility for the service_name field.
Here [3] there is a long thred were we discussed this issue.
[1] ae85dd62d4
[2] 32f97b48c3
[3] http://lists.sugarlabs.org/archive/sugar-devel/2013-October/045404.html