6067 Commits (12a899f3740f2d82ea16c2ec28b24198f76fd47a)
 

Author SHA1 Message Date
James Cameron 12a899f374 Defer Gtk.Window.iconify
Defer iconify call to after the activity has been shown.  Remember the
iconify call was requested, and make the call just prior to entering the
main loop.

On Ubuntu 18.04 with Metacity 3.32.0 the Journal does appear over the
Home View on Sugar start on a VM with two virtual CPUs, yet the previous
fix in Metacity (074af8f) is present.  This is suggestive of a race
condition.

Tests with a minimal GTK reproducer shows order of three specific calls
is critical to success of iconify.  The ordering and results are;

* iconify, maximize, show; not iconified,

* maximize, iconify, show; not iconified,

* iconify, show, maximize; not iconified,

* maximize, show, iconify; app with focus will flicker, iconified,

* show, maximize, iconify; app with focus may flicker, iconified,

* show, iconify, maximize; app with focus may flicker, iconified,

Sugar Toolkit combined with Journal uses the "maximize, iconify, show"
ordering.  Using a Hello World activity with a call to iconify, the new
activity is not iconified.

When changed to "mazimise, show, iconify" ordering, there is no flicker
of the app in focus, and the new activity is iconified.
5 years ago
James Cameron a7735e6a97 Release Sugar 0.114 stable 5 years ago
James Cameron 4c4332c65c translate.sugarlabs.org synchronisation {mn,ru}
Thanks to khishigjargal and martenix.
5 years ago
James Cameron 5fa33b2d2c Build for either python 2 or python 3
`configure` and `autogen.sh` now accept `--with-python2` or
`--with-python3` options, with the default of python 2.

aa8a5e7 introduced building for python 3, but broke build for python 2,
requiring patching `configure.ac` prior to build.

Code was derived from rpmfusion-packager, found using a GitHub search of
`configure.ac` files for both `python2` and `python3`, and is GPLv3.

Tested on Ubuntu 18.04.

Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron 481e0bac80 Fix collaboration call_async
Port to Python 3 via Six aa8a5e7 did introduce a regression during
activity collaboration on both sharing and joining.

Fixes https://github.com/sugarlabs/sugar-toolkit-gtk3/issues/406
5 years ago
James Cameron 2453d13b03 Clean up activity environment variables
Ensure environment variables needed by Python activities are available
in each of the three supported scenarios;

- started from Sugar,

- started from Terminal inside Sugar,

- started by other desktop environments.

Variables always available are;

SUGAR_ACTIVITY_ROOT
SUGAR_BUNDLE_ID
SUGAR_BUNDLE_NAME
SUGAR_BUNDLE_PATH
SUGAR_BUNDLE_VERSION

Variables also available when started from Sugar are;

SUGAR_ACTIVITIES_HIDDEN
SUGAR_APISOCKET_KEY
SUGAR_APISOCKET_PORT
SUGAR_GROUP_LABELS
SUGAR_HOME
SUGAR_MIME_DEFAULTS
SUGAR_PROFILE
SUGAR_SCALING
SUGAR_VERSION

Variables also available when started from Terminal are;

SUGAR_TERMINAL_VERSION

Other changes;

- use os.makedirs in place of distutils.dir_util.mkpath,

- avoid redundant setting of SUGAR_BUNDLE_PATH,

- do not set SUGAR_BUNDLE_ID unnecessarily,

- add explanatory comment,

Tested on Ubuntu 18.04.

Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron 359dbf2c45 Add distributed source to .gitignore
File is generated by "make dist" or "make distclean".
5 years ago
James Cameron b6e314bbe5 Add flake8 suppression 5 years ago
James Cameron 830e7c50fb Release Sugar 0.113 unstable 5 years ago
James Cameron 0aaeca48b6 translate.sugarlabs.org synchronisation {ach,da,fy,he,is,lt,nl,pt,pt_BR,sq}
Thanks to numerous translators.
5 years ago
James Cameron 78309a2b8e Update POT file
No string changes.

Line number changes only.
5 years ago
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron 6345da8e07 docs - move get_activity_root description
When it was moved from the class to the module, the full description did
not move with it.
5 years ago
Frederick Grose f228909710 get_profile() - Use tuple instead of list.
Fixes fix 39b7e606 handle new OpenSSH DSA key format.
5 years ago
James Cameron 39b7e606df get_profile() - handle new OpenSSH DSA key format
OpenSSH changed the format of the DSA key, and this broke Sugar
connection to Jabber.

Fixes https://github.com/sugarlabs/sugar/issues/814

Fixes http://bugs.sugarlabs.org/ticket/4992
5 years ago
James Cameron 87fcfb62e4 Fedora 18 backport - GLib does not have unix_signal_add 5 years ago
James Cameron 85fc4680e9 Fedora 18 backport - GObject.ParamFlags does not have READWRITE 5 years ago
Vipul Gupta (@vipulgupta2048) c7a7dcea7d Add to tags
Add new parameters category, categories, website
Update example of browse activity
Add more description of already defined parameters from https://wiki.sugarlabs.org/go/Development_Team/Almanac/Activity_Bundles#.info_file_format

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
6 years ago
James Cameron 13fc98e193 Review: Port from GObject to GLib
Fix a typo in 13a2282.
6 years ago
James Cameron 84a7286986 Review: Port from GObject to GLib
Fix new flake8 issues introduced by cb0d6e2.
6 years ago
Rahul Bothra 13a2282e5e Port from GObject to GLib 6 years ago
James Cameron 6730d129cd Handle SIGINT from Ctrl+C in shell
Used when testing from the shell prompt using sugar-activity{,3}.
When Ctrl+C is pressed, close the activity.

May be used by other processes to request a clean activity stop, but
with save-as enabled may require user input.
6 years ago
Pro-Panda 06a28fae0e use created to send signal on receiving Created signal
Tested-by: Rahul Bothra <f2016015@pilani.bits-pilani.ac.in> # Ubuntu 16.04
6 years ago
James Cameron e32aea6a4f sugar3/bundle - activity metadata standard rewording
Move definition of bundle identifier from Wiki.
6 years ago
Vipul Gupta (@vipulgupta2048) 47563e678f sugar3/bundle - activity metadata standard
* encourage "url" for either home page or user documentation,

* give examples for categorisation tags, define format,

* make "website" an alias for "url",

* make "category" and "categories" aliases for "tags".

* add the aliases to deprecated list; valid for use, but not encouraged.

Deprecates https://wiki.sugarlabs.org/go/Development_Team/Almanac/Activity_Bundles#.info_file_format

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
Signed-off-by: James Cameron <quozl@laptop.org>
Reviewed-by: Rahul Bothra <f2016015@pilani.bits-pilani.ac.in>
Reviewed-by: Yash Agrawal <yagrawal900@gmail.com>
6 years ago
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
6 years ago
Pro-Panda 5407ae4cdb Remove unused imports 6 years ago
Pro-Panda 7589102e34 Remove example unrelated to Sugar Toolkit 6 years ago
Pro-Panda 8f047b5819 Remove redundant code in get_activity_root
- same condition is being checked in the module function get_activity_root
6 years ago
James Cameron 30139a3a9e sugar3.speech - remove GConf compatibility support 6 years ago
Pro-Panda a07bef8be5 Change signal name on enter keypress in title entry
- 'enter-key-press' is more intuitive for the reader than 'entered'
6 years ago
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
6 years ago
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>
6 years ago
James Cameron 7e216a04d5 Adjust metadata reference 6 years ago
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
6 years ago
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
6 years ago
James Cameron 5876bc4a00 TitleEntry - clear selection
When editing stops, clear the selection.
6 years ago
James Cameron 1cf9ba8190 TitleEntry - rename callbacks, use arguments 6 years ago
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>
6 years ago
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.
6 years ago
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.
6 years ago
James Cameron e13c4fefab Fix bundlebuilder genpot test
Lurking copy and paste error.
6 years ago
James Cameron ab7e9a8247 Fix service_name deprecated whitespace 6 years ago
James Cameron 9b687cab3f translate.sugarlabs.org synchronisation
- consequence of POT changes
6 years ago
James Cameron 2dc3f76775 translate.sugarlabs.org synchronisation {en,zh_TW,am,id,es,de} 6 years ago
leonardcj 70eafc5160 translate.sugarlabs.org synchronisation {lt} 7 years ago
James Cameron ef28adcce6 translate.sugarlabs.org synchronisation {fy,it} 7 years ago
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)
7 years ago
James Cameron 9722cfab1e wip; sugar3.speech - espeak-ng does not have default voice 7 years ago
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.
7 years ago