Commit Graph

6042 Commits

Author SHA1 Message Date
James Cameron
58224cb15d Fix traceback when an icon name matches a GNOME theme icon
When an icon file name matches a GNOME theme icon;

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sugar3/graphics/icon.py", line 214, in _get_attach_points
    cp.readfp(config_file)
  File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.

Caused by reading a .png file as if it were config file, in turn
because the icon was expected by the toolkit to be .svg file type.

Regression introduced by f796638.

Fixes https://github.com/sugarlabs/activity-abacus/issues/16
2018-05-24 08:46:58 +05:30
Pro-Panda
5407ae4cdb Remove unused imports 2018-05-21 17:20:29 +10:00
Pro-Panda
7589102e34 Remove example unrelated to Sugar Toolkit 2018-05-21 17:17:58 +10:00
Pro-Panda
8f047b5819 Remove redundant code in get_activity_root
- same condition is being checked in the module function get_activity_root
2018-04-02 08:41:59 +10:00
James Cameron
30139a3a9e sugar3.speech - remove GConf compatibility support 2018-03-26 14:35:28 +11:00
Pro-Panda
a07bef8be5 Change signal name on enter keypress in title entry
- 'enter-key-press' is more intuitive for the reader than 'entered'
2018-03-05 19:51:43 +11:00
Pro-Panda
1bc171d5d6 enter key after editing title will closes the activity toolbar(if present)
- No change for activities having titleEntry without the toolbar (Eg: chat)

Tested on:
Ubuntu 16.04, Sugar 0.112, GTK 3.18.9
2018-03-05 19:51:43 +11:00
James Cameron
cc2357c787 Add warnings for missing activity metadata
- report a warning if either activity_version, icon, or license are
  missing,

- fix typo in missing bundle_id exception message.

Fixes #378

Co-authored-by: Rahul Bothra <f2016015@pilani.bits-pilani.ac.in>
2018-02-15 14:52:55 +11:00
James Cameron
7e216a04d5 Adjust metadata reference 2018-02-13 12:55:30 +11:00
Pro-Panda
0bd9e8fabf Update example to explain various response states
- As a part of #379, which fixed the Response sent on Timeout by TimeoutAlert and NotifyAlert

modified:   examples/alert.py
2018-02-09 08:53:08 +11:00
Pro-Panda
af31aa8059 Fix: TimeoutAlert response on Timeout
Explanation:
There was inconsistency between docs and the code.
 - Docs said it returns -1 on timeout
 - Code returned Gtk.Response.OK on timeout

Effect of this commit:
 - Code returns -1 on timeout
2018-02-09 08:53:08 +11:00
James Cameron
5876bc4a00 TitleEntry - clear selection
When editing stops, clear the selection.
2018-01-15 17:03:49 +11:00
James Cameron
1cf9ba8190 TitleEntry - rename callbacks, use arguments 2018-01-15 17:03:49 +11:00
Pro-Panda
f3dd2c2042 TitleEntry - save title on activate (Enter)
Learners have to use tab to finish editing, followed by clicking the
activity icon to dismiss the dialog.  A slow work flow and inconsistent
with journal list view.  The enter key is ignored.

Add an activate signal handler to save the title.  Force the focus to
move by calling hide and show.

Signed-off-by: James Cameron <quozl@laptop.org>
2018-01-15 17:03:49 +11:00
James Cameron
aaea86066d Icon - increase LRU cache sizes
Some activities suffer from performance penalties once the number of
icons backed by SVGs exceeds 50.

Double the cache sizes.

Tested on OLPC XO-1, the weakest known system on which Sugar is used.
2018-01-06 15:01:00 +11:00
James Cameron
a77ae5fb57 Activity.get_preview fails for no window in canvas
When an activity deletes the window associated with the canvas, save may
fail because Gdk.cairo_create is given an argument of None.  Activity
continues to run without a window.

Reproduced with Chat activity and pressing Stop.

Avoid exception by returning None from get_preview when there is no
window.
2018-01-02 14:15:15 +11:00
James Cameron
e13c4fefab Fix bundlebuilder genpot test
Lurking copy and paste error.
2018-01-02 14:14:46 +11:00
James Cameron
ab7e9a8247 Fix service_name deprecated whitespace 2017-12-11 13:47:07 +11:00
James Cameron
9b687cab3f translate.sugarlabs.org synchronisation
- consequence of POT changes
2017-12-11 13:46:29 +11:00
James Cameron
2dc3f76775 translate.sugarlabs.org synchronisation {en,zh_TW,am,id,es,de} 2017-12-11 13:44:48 +11:00
leonardcj
70eafc5160 translate.sugarlabs.org synchronisation {lt} 2017-11-07 16:07:58 +11:00
James Cameron
ef28adcce6 translate.sugarlabs.org synchronisation {fy,it} 2017-11-02 16:22:46 +11:00
James Cameron
cf07b687a1 Update POT file
Method used was;

xgettext --join-existing --language=Python --keyword=_ --add-comments=TRANS: --output po/sugar-toolkit-gtk3.pot $(sort po/POTFILES.in)
2017-10-16 19:02:28 +11:00
James Cameron
9722cfab1e wip; sugar3.speech - espeak-ng does not have default voice 2017-10-10 14:34:53 +11:00
James Cameron
7c2a2ba94a Fix sugar3.speech.SpeechManager get all translated voices
- fix method name,

- return translated voices,

- low impact; method not yet used in any of the most frequently used
  activities,

- old method name retained for compatibility just in case, but
  deprecate.
2017-10-06 12:39:05 +11:00
James Cameron
f0b479f068 Release Sugar 0.112 stable 2017-10-06 12:39:05 +11:00
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
45cc6502dd translate.sugarlabs.org synchronisation {zh_CN} 2017-09-13 15:01:23 +10:00
James Cameron
4e4f1fbbcb Release Sugar 0.111 unstable 2017-09-09 11:54:31 +10: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
351143a857 Documentation - introduction
- update the copyright date,

- add an introduction to the documentation.
2017-07-19 17:27:23 +10:00
James Cameron
73df533b06 README - add build and install 2017-07-19 12:38:43 +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
2f3c47ffb0 translate.sugarlabs.org synchronisation 2017-07-17 17:37:52 +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
James Cameron
12de9f0412 Remove noisy output from sugar-activity 2017-06-10 08:42:02 +10:00
leonardcj
49a703b93b Update translations for ach, da, hr, pt_BR 2017-06-05 10:33:16 +10:00
leonardcj
98ab73dc9f Delete Dari (fa_AF) from LINGUAS file
This will need to go back in when we get the Dari project fixed on Pootle,
2017-06-05 10:33:16 +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