As described in SL#4307 Gtk.Clipboard.set_with_data is not
introspectable, therefore it can't be accessed though python
Gtk bindings.
Therefore, as a workaround for this issue, we provide acesss
to this method though a custom SugarExt binding.
This solution uses Carlos Garnacho annotations as described in
https://bugzilla.gnome.org/show_bug.cgi?id=656312#c18
Fixes SL#4307.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Now when the espeak plugin is not installed there will be an
error (logging.error) in the log. Instead of the ugly message
of Gst
Also, if Gst isnt installed it debug a error too.
Fixes#3345
The BundleBuilder currently crashes on a malformed translation file. This is
good for humans (makes them fix their issues) but crashes bots who need it
compiled and don't care about that single translation file.
This patch adds a --no-fail option which stops the builder from crashing
To display a list of translated language names in the UI,
we add a list of the available languages, because the espeak
language names are not translated.
git version 1.9.3, in a activity directory created inside sugar-build/activities
return a empty string when the command "git ls-files" is executed,
and no repository is configured.
We need verify that condition, and process a file list from the filesystem.
Use set_active and save events to keep track of the time,
in seconds, that the activity is on the main screen. The
time is calculated and stored each time an activity is
open/resumed and closed. Therefore, each activity entry
will have an array of seconds for each time it was used.
This makes a 1 to 1 relationship between the spent and
lauch times. In orders words, we can reflect not only the
"when", but also the " for how long".
Even though this time does not necessarily represents the
real time the user "used" the activity, it is a low-cost
approach for reflecting time.
This is a long requested featured from deployments that have
been using statistics tools on journal metadata, and this
patch is already being used by OLPC-AU.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
PaletteWindow is the parent class of two different subclases,
Palette and _ToolBarPalette. Palette uses state changes intensively
in order to display secondary content, but _ToolBarPalette does not.
Because of this, Palette overwrites PaletteWindow's popup and popdown
methods adding one extra param called "state". This param is not required
either in PaletteWindow and specially not in _ToolBarPalette.
Therefore, any piece of code inside PaletteWindow which is meant for
Palette subclassing, should be moved out of PaletteWindow and placed
in the Palette class, where it corresponds.
This patch fixes the cases where _ToolBarPalette breaks because of this
mismatch.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Push the palette widget opening process to the latest
in order to avoid the race condition where the animation
takes of the place of the real palette.
Fixes#2184
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
When we implemented read max_participants from activity.info [1]
we changed the default value of max_participants, from 0 to 1.
Before, was responsability of the activities set max_participants == 1,
when the activity not implemented collaboration.
This change make the default backwards compatible.
[1] d0cca91fe8
When calculated the palette height based in the size of children,
forgoten add the border size. That moved the palette in the device icons
4 pixels to the bottom, then the gap was miscalcuated and the border
button border was not draw.
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
In Gtk 3.10, Gtk.Window is drawing a gray border around the palette.
This patch draw a black rectangle defore we draw Gtk.render_frame_gap
to draw the border but with a gap to connect to the attached widget.
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Removes unnecessary code ie., changing label color.
Refactor label settings, to put all in the same place.
Fix changes to label_alignment that does not honor
original vertical padding settings.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
On Gtk 3.10, Gtk.Menu at the bottom of the screen are resized
to avoid fall out of the screen, then report a wrong height.
We need calculate the size of the children and move the Menu up.
This problem is visible on the Clipboard icon palettes,
and in journal objects palettes at the bottom of the screen.
This patch also rename a variable 'rect' to 'req', because is
a Requisition (width, height) and not a Rectangle (x, y, width, height).
Finally, to avoid a error with the secondary text on the palette,
when copy text from the terminal, reove the '¬r' character.
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
This problem only happen in activities configured with the option -s
in the activity.info "exec" field, and the objective is use a single process,
even when starting more than one instance. If the process do not reply,
start a new process, instead of show a error.
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
As part of an effort to "honor" max_participants, this patch supports setting
max_participants in activity.info, thus making it available in the bundle.
By default, if it is not set in the bundle, the previous behavior persists.
In support of this change, a cache of Activity bundles is
maintained. The goal is to eliminate unnecessary calls to the file
system.
Add get_badge_size method to Icon class, so it can be accessed
by other Icon sub-classes.
ie., jarabe.frame.notification.NotificationPulsingIcon.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>