Commit Graph

529 Commits

Author SHA1 Message Date
James Cameron
04a1ff181f Fix Python GI API version warning in Wikipedia
The Wikipedia activity imports from sugar3.graphics.icon without any
other use of GTK+, causing a version warning.
2017-10-03 13:30:25 +11:00
James Cameron
e2ea171cfb Sort list of po files 2017-09-09 11:51:57 +10:00
James Cameron
1875a30075 Fix Python GI API warnings for web activities 2017-08-01 09:40:16 +10:00
James Cameron
f3f22ad124 Remove message, best voice for LANG 2017-08-01 09:39:52 +10:00
James Cameron
dd512c9c29 Fix common typo, occured should be occurred 2017-08-01 09:39:02 +10:00
James Cameron
5750773dda Documentation - rewrite activity section
- rewrite of activity section, bundle section, graphics.alert, and
  graphics.window.
2017-07-19 17:31:09 +10:00
James Cameron
4652b7ca2a Bundlebuilder - update documentation 2017-07-19 17:30:44 +10:00
James Cameron
72a34528f2 Bundlebuilder - accept repository for AppStream metadata
AppStream metadata generator was looking for key repository_url, but
Wiki and common usage has adopted repository.
2017-07-19 17:29:35 +10:00
James Cameron
ae62708a7f Documentation - small typos 2017-07-19 17:29:09 +10:00
James Cameron
002349f290 NormalizedVersion - accept ~ as version separator
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.
2017-07-17 17:39:31 +10:00
James Cameron
2265623933 Fix Python GI API version warning in datastore
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.
2017-06-10 12:26:38 +10:00
Utkarsh Tiwari
ba6993d705 Save As - show a save-as alert on stop
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>
2017-06-01 13:30:27 +10:00
James Cameron
3a574ae778 Save As - add busy cursor methods
Add methods for use by activity for showing and removing a busy cursor.
2017-06-01 13:19:09 +10:00
James Cameron
6bcd664289 Save As - track stop buttons in Activity instance
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.
2017-06-01 13:18:22 +10:00
James Cameron
b1d1129759 Save As - document keep failure
- add a comment to explain the causes of keep failure,

- rename the keep failure response callback to fit convention,

- fix typo and whitespace nearby.
2017-06-01 13:10:55 +10:00
James Cameron
286387b22e Save As - return copied datastore object
When a datastore object is copied, return the new object to the caller.
2017-06-01 12:57:34 +10:00
James Cameron
83697d21f9 Save As - add an optional Gtk.Entry to Alert
An Alert may have a Gtk.Entry, which is placed between the title and the
buttons.  It is for when text is to be input during the alert.
2017-06-01 12:50:29 +10:00
James Cameron
926a262306 Save As - add profile.get_save_as
Add a method for reading the save-as setting.
2017-06-01 12:49:10 +10:00
James Cameron
7d5abe2684 Predictable POT file ordering
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.
2017-06-01 08:09:53 +10:00
James Cameron
c26c902dc7 Remove Python GI API version warnings
- reported in Clock-19 testing.
2017-05-30 14:10:30 +10:00
James Cameron
2c3d1d0707 Specify library version prior to import
- web activities caused two warnings every time they were started,

- warnings cost disk write wait time.
2017-05-19 14:22:28 +10:00
György Balló
281e56c442 Allow to disable installing .desktop files 2017-04-22 08:29:58 +10:00
Sam Parkinson
f17e1a66b4 Write docs for constants in sugar3.graphics.style
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>
2017-04-22 08:26:41 +10:00
Hrishi
f4fc8c0d1f
Write documentation for sugar3.graphics.ColorToolButton
- add one example,

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs

Added documentation and example for Colorbutton
2017-01-09 04:02:19 -03:00
Hrishi
4f7ab56c3e Write documentation for sugar3.graphics.ProgressIcon
- add one example,

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs
2017-01-04 20:52:16 -03:00
James Cameron
a6e62a52b6
Fix screen resize race
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
2017-01-02 04:38:37 -03:00
James Cameron
99130b0263
Write documentation for sugar3.power 2017-01-02 02:48:48 -03:00
Eduard Sanou
05a18a2dc6
[PATCH] Sort translation files
Sort translation files when generating the .desktop file to output
reproducible results.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848633

Reviewed-by: James Cameron <quozl@laptop.org>
2017-01-02 02:25:29 -03:00
James Cameron
a71a011496 Fix documentation typo, SPCAING 2017-01-02 15:22:51 +11:00
Hrishi
c7d1c7acfb Write documentation for sugar3.graphics.ToggleToolButton
- add one example,

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs

Signed-off-by: James Cameron <quozl@laptop.org>
2016-12-31 07:57:52 +11:00
James Cameron
c92d0009df Write documentation for sugar3.graphics.ToolButton
- add two examples,

- document critical properties as keyword arguments in the class init,

- ensure documentation is consistent between RadioToolButton and
  ToolButton, (as some of the text is similar),

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs

- follow How To Guide
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs/How_To_Write

Derived from work by

- Hrishi <hrishipatel99@gmail.com> (31176ea) and

- radicalonion <ndefilippis98@gmail.com> (db89aca).
2016-12-12 15:51:49 +11:00
James Cameron
ee93ad3bef Further gi.require_version calls
Activity logs have continued to report GObject Introspection version
warnings.
2016-11-09 13:32:49 +11:00
Sam Parkinson
2330ef8ebc
Proper deprecation of Palette.popdown state argument
The popdown state argument was removed in 90cec5b, as the palette
popdowns were unified.  However, this is a public api.  Removing
the argument caused exceptions to be raised, breaking applications.
Most uses of the state argument were for the SECONDARY state, which
is now the default behaviour.

This commit re-adds the argument with a deprecation notice.
2016-09-04 21:48:51 +10:00
Sam Parkinson
f06d510eba
Merge branch 'animator-do-stop' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 2016-08-02 08:27:30 +10:00
Sebastian Silva
4f3f32fd5a Assign icon to window regardless of environment.
Makes Sugar Activities more standard.
2016-07-27 01:52:05 -05:00
Sam Parkinson
92ea35d724
Fix typos in sugar3.graphics.animator docs 2016-07-26 21:14:10 +10:00
Sam Parkinson
d37da7ee88
Add do_stop method for animations
This adds a explicit method for cleaning up the animation.  Previously,
animations expected the next_frame to be called where frame=end.

That guarantee was never provided by the api.  This resulted in
animations sometimes being in odd states.  For example, Browse activity
had an animation that overrode the Gtk "draw" signal.  If the signal
was not unbound, the animated object was mistakenly rendered after
the completion of the animation, obstructing the user's view.

This api is explicit and allows cleaner code in the animation
implementation.  The clean up code goes in do_stop rather than in a
conditional of next_frame.
2016-07-26 21:06:44 +10:00
Sam Parkinson
61bc42f2c2
Merge branch 'bundlebuilder' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 2016-07-26 08:10:40 +10:00
Sam Parkinson
4d770fef01
Merge branch 'fix-4965' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 2016-07-26 08:09:25 +10:00
Sam Parkinson
2f9ae6ef51
Bundlebuilder: relabel repository url as bugtracker
Many activities already have the repository url pointing to their GitHub
page - which also serves as a bug tracker for many of the projects.  The
repository url is not part of the spec, but the bug tracker url is.
2016-07-16 07:55:57 +10:00
James Cameron
1f93659c95 Avoid private member access to Bundle
ActivityBundle was making reference to _path private in Bundle, change
to use get_path public method.
2016-07-15 12:55:26 +10:00
Sam Parkinson
9b5ed7e80c
Bundlebuilder: Translate AppData files 2016-07-15 09:16:18 +10:00
Sam Parkinson
6d337718d1
Bundlebuilder: Generate AppStream AppData files
This commit adds the 1st pass generator for these files.  It also adds
documentation about the required fields in the "activity.info"
file, as AppStream requires more metadata than most activities currently
include.
2016-07-15 08:19:05 +10:00
Sam Parkinson
7779c74f44
Bundlebuilder: Use installed icon path in .desktop file
Previously, the bundle builder referenced the icon path in the
source directory - which was obviously not installed in the package.
2016-07-14 16:20:22 +10:00
Sam Parkinson
c288d54ab8
Bundlebuilder: submodules can have "/.git" as a file
When created via "git submodules add", a submodules may have the
"/.git" path be a file rather than a directory.  The bundlebuilder
previously thought that all submodules had "/.git" as a directory.
2016-07-14 16:16:25 +10:00
Sam Parkinson
2522e0b21f
Version the GdkX11 import, fixes #4965
The unversioned import results in the following log noise:

    /usr/lib/python2.7/site-packages/sugar3/graphics/window.py:26: PyGIWarning: GdkX11 was imported without specifying a version first. Use gi.require_version('GdkX11', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import GdkX11
2016-07-12 09:16:22 +10:00
Sam Parkinson
e0c38a8b8a
Merge branch 'no-2nd-popdown' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 2016-07-10 20:55:58 +10:00
Sam Parkinson
d60989cd92
Merge branch '2016-190-enter-notify' of https://github.com/quozl/sugar-toolkit-gtk3 2016-07-10 20:52:00 +10:00
Sam Parkinson
4009e2a476
Merge branch 'long-press-eventicons' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 2016-07-08 22:22:40 +10:00
Sam Parkinson
6c5bef2f78
Merge branch 'show-icons' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 2016-07-08 22:15:55 +10:00