Bundle versions are often described as being decimal floats e.g. 1.2,
but they also accept more than one dot, and a suffix after a dash,
e.g. 1.2.3-peru
Debian project and Ubuntu often use ~ for modified sources to comply
with distribution policy (~dfsg), or developer builds.
The dist_source target for setup.py does not work with
a version suffix like ~dfsg, requiring a manual step to rename the
file.
Adjust the regular expression to accept the ~ form.
When the datastore process begins on Fedora 26, the import of mime.py
causes a version warning to the system journal.
```
Jun 09 10:28:01 localhost-live org.laptop.sugar.DataStore[2197]: /usr/lib/python2.7/site-packages/sugar3/mime.py:29: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
Jun 09 10:28:01 localhost-live org.laptop.sugar.DataStore[2197]: from gi.repository import GdkPixbuf
```
Accidental finding on #4989.
When an activity is to stop, and the save-as setting is enabled, and the
journal entry has not been named, show an alert asking for a name, with
keyboard focus in the name entry with the name selected.
Return key commits the save with the name as shown.
Escape key cancels the alert and the stop.
While the alert is shown, the activity stop button(s) will be
insensitive.
As a side-effect, when an entry is resumed, switching to the journal
will show a clone entry with the same name. When the activity is
stopped, the clone entry will be removed or renamed. Forced power down
and reboot will show the clone entry.
https://wiki.sugarlabs.org/go/Features/Save-As
Signed-off-by: James Cameron <quozl@laptop.org>
Track the stop buttons for the activity, so that they can be set
insensitive or not in a later patch.
Our API allows for more than one stop button, though the use of more
than one is very rare.
- add a comment to explain the causes of keep failure,
- rename the keep failure response callback to fit convention,
- fix typo and whitespace nearby.
Every time an activity maintainer uses the `python setup.py genpot`
command the resulting po/Activity.pot file has changes caused by random
ordering of filesystem inodes.
This makes the output unpredictable.
Sort the list of source files.
The constants must be documented, because otherwise they are hidden
from the generated online documentation.
[changes arising from review comments and flake8 compliance]
Signed-off-by: James Cameron <quozl@laptop.org>
When an activity is launched, an import should first search the activity
bundle source rather than /usr/bin
Fixes the need to change activity sources every time a system package
conflicts with an import.
May impact any activity that relies on a system package being in search
path before the bundle source. Forty activities were tested, and none
relied on this.
- replaced Gtk.HBox/Gtk.VBox by GtkBox as seen in [1] and [2]
GtkHbox and GtkVBox are deprecated
- use delete-event instead of destroy event in GtkWindow
- replaced icon_size for pixel_size where used
it's also deprecated as seen in commit [3]
- use sugar_theme in all examples; set it manually not by just
importing common module
- fixed GtkBox.pack_start arguments
- flake/pep8 fixes
[1] https://developer.gnome.org/gtk3/stable/GtkHBox.html
[2] https://developer.gnome.org/gtk3/stable/GtkVBox.html
[3] 5802d67ee1
When an external monitor is connected or disconnected, about 25% of the
time an activity does not resize correctly; a size-changed signal occurs
but the workarea geometry has not changed.
Underlying problem is an update race in get_monitor_workarea, so the fix
is to call get_monitor_geometry for obtaining the width and height.
Can be reproduced easily without an external monitor by switching
display panel resolution repeatedly;
xrandr --output eDP1 --mode 1024x768
xrandr --output eDP1 --mode 1366x768
Part of a fix for https://bugs.sugarlabs.org/ticket/4968