152 Commits (aa8a5e70c415e6c2acf4ff373d9b366ac4692bb1)

Author SHA1 Message Date
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
James Cameron 87fcfb62e4 Fedora 18 backport - GLib does not have unix_signal_add 5 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 5407ae4cdb Remove unused imports 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
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 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 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 e2ea171cfb Sort list of po files 7 years ago
James Cameron 1875a30075 Fix Python GI API warnings for web activities 7 years ago
James Cameron 5750773dda Documentation - rewrite activity section
- rewrite of activity section, bundle section, graphics.alert, and
  graphics.window.
7 years ago
James Cameron 4652b7ca2a Bundlebuilder - update documentation 7 years ago
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.
7 years ago
James Cameron ae62708a7f Documentation - small typos 7 years ago
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>
7 years ago
James Cameron 3a574ae778 Save As - add busy cursor methods
Add methods for use by activity for showing and removing a busy cursor.
7 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago
György Balló 281e56c442 Allow to disable installing .desktop files 7 years ago
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
7 years ago
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>
7 years ago
James Cameron ee93ad3bef Further gi.require_version calls
Activity logs have continued to report GObject Introspection version
warnings.
8 years ago
Sebastian Silva 4f3f32fd5a Assign icon to window regardless of environment.
Makes Sugar Activities more standard.
8 years ago
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.
8 years ago
Sam Parkinson 9b5ed7e80c
Bundlebuilder: Translate AppData files 8 years ago
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.
8 years ago
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.
8 years ago
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.
8 years ago
Sam Parkinson 6c5bef2f78
Merge branch 'show-icons' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 8 years ago
Sam Parkinson da65b6db55
Merge branch 'git-submodules-bundlebuilder-try2' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 8 years ago
Sam Parkinson 6079d7ff70
Show icons in buttons
Gtk 3.20 recently changed the default setting so that buttons hide
their icons.  This is regression in terms of the Sugar HIG.
8 years ago
Sam Parkinson 535ece85c3
Generate .desktop files for activities during install
This will allow .desktops for all of the activities to be
packaged.  In the future, we could ship a special launcher script
so that the user can choose the jobject to run, but for now
we just open the activity using the command specified in the
activity.info file.
8 years ago
Sebastian Silva 966c65082e Allow running GTK3 Sugar Activities in HTML5 8 years ago
James Cameron 6f2550cde0 Ignore empty translated summary 8 years ago
Sam Parkinson ea3b673f51 Merge branch 'master' of https://github.com/icarito/sugar-toolkit-gtk3 8 years ago
Sebastian Silva 2f2b2d20d8 Allow to run activities without Sugar shell.
- Handle lack of GSettings gracefully.
- Still requires sugar-datastore.
- Supports avoiding X11 docks/panels.
- Provides icons for Activity windows.

Try it outside Sugar. Go to an Activity directory and run 'sugar-activity'.
Tested it with Terminal, Finance, Write, Browse, Memorize under XFCE4.
Tested in Gnome under OLPC-OS.
Also works from Sugar Terminal Activity.
Does not affect regular Sugar operation.

This is patch v.2 -
    Addresses most concerns:
    - Removed commented code, sorry.
    - Changed code to use profile.get_nickname and get_color where possible.

    Couldn't the launcher just pass this info?
    Maybe the launcher could set the activity root as well?
        - It is intended to be usable from the command line also.
    Should put sugar version in the environment
        - It is intended to work even without Sugar Shell installed.
    Why don't we always set the icon?
        - On XO it might use some memory. I was concerned to degrade
        performance.
    Also, imports should be at the top of the file?
        - Also a concern about performance on XO.
        This way it is only loaded in this use case.
        Maybe it is insignificant -moved as requested.
    It would be nice if the changes to the POT for sugar-toolkit-gtk3
    could be incorporated in this pull request, please.
        - There were no changes to POT files as part of this patch. Maybe
        it is worth translating low level command line tools, not sure.
    Suggest packaged activities might also provide .desktop files.
        - Intriguing but not sure within scope of this patch. You mean generate
        a .desktop file automatically as an option? Sounds nice!
    Suggest sugar-activity might also accept path to unpacked bundle.
        - Implemented!
8 years ago
Sam Parkinson bde85bc7e8 Merge branch 'activityhandle-docs2' of https://github.com/ndefilippis/sugar-toolkit-gtk3 8 years ago
James Cameron 8d4298ee9e Remove Rainbow, avoid race in creating directories
Sugar depended on Rainbow for clearing the activity instance/ and tmp/
directories.  But Rainbow is no longer used downstream.

- remove support for Rainbow,

- avoid race when creating directories; don't check they exist before we
  create.
8 years ago
Sam Parkinson 0a50431b98 Handle git submodules in bundlebuilder
Git submodules are only listed by their root directory in the
output of "git ls-files".  Therefore, we must handle this case
so that the files from the module are included in the install
and dist_xo commands.

To reproduce the issue, you could do something like the following:

    cd pippy
    git clone https://github.com/samdroid-apps/collabwrapper
    git add collabwrapper
    python setup.py install  # or just osbuild run
8 years ago
radicalonion 28053c83b1 Improve docs for sugar3.activity.activityhandle 8 years ago
Gonzalo Odiard 1bd8349b84 Deprecate create_jobject parameter on activity.py - Fixes #3450
As the ticket describe, create a object in the Journal
is no longer optional. The change do not break activities,
because the optional parameter is not removed, just ignored.
9 years ago
Gonzalo Odiard 7c804354a0 Improve documentation on activity module 9 years ago