28 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
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 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
Walter Bender d0cca91fe8 Assign max_participants in activity.info
As part of an effort to "honor" max_participants, this patch supports setting
max_participants in activity.info, thus making it available in the bundle.

By default, if it is not set in the bundle, the previous behavior persists.

In support of this change, a cache of Activity bundles is
maintained. The goal is to eliminate unnecessary calls to the file
system.
10 years ago
Emil Dudev db2ba3e579 GConf to GSettings port 10 years ago
Daniel Narvaez d12a1d5131 Fix translations domains to point to new toolkit 11 years ago
Daniel Narvaez b83ddaefaf Revert "Fix translations domains to point to new toolkit"
This reverts commit abe0de3ef8.
11 years ago
Daniel Narvaez abe0de3ef8 Fix translations domains to point to new toolkit 11 years ago
William Orr 8a6c935dd0 pep8'd sugar3.activity 11 years ago
Daniel Narvaez db448c4eea Remove a lot of unused imports
Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
11 years ago
Manuel Kaufmann 7b8fa5e406 Activity title entry: auto-select text when tap/click in the entry, SL #4036
When the user taps/clicks in the activity title entry, the text
is selected automatically to change the whole title of the activity
easily.

Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer 6064fb30cc Add support for locking Palettes, SL #4008
This adds a property that indicates that a Palette should
behave in a locking manner. The behaviour is the same
as with the secondary Toolbars: when you hover over the invoking
widget the Palette will popdown and react to mouse movements,
leaving the invoker area or the Palette itself will popdown
the Palette again. When you click the invoking widget
the Palette will be locked. You have to unlock it again
to pop it down.

This patch makes the DescriptionButton and the Colorbutton
work.

If the DescriptionButton or the Colorbutton are placed in
the primary toolbar they will share the locked state with
the secondary toolbars. Only one can be locked at a time.

When a secondary toolbar is unlocked we do force that the
open Palettes are closed. Having a locking Palette in
a subtoolbar will also work (Activity Toolbar case or
ColorButton case in a few examples). There is no state
sharing implemented here at the moment, but so far we
do only have cases with one lockable Palette in a
subtoolbar.

This will also fix the case where we want to use the
OSK to edit the description of the activity SL #3887.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Manuel Quiñones ac3b0a3a14 Update style of Description palette - SL #4167
We can now use the PaletteMenuBox.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer 2834344b98 DescriptionButton, ShareButton: set the toggle_palette option to True
Setting this option will popup the Palette on left click or tap
and popdown the Palette if it is up. This functionality has been
added with c4165967d5e05607db8b3e0969b516da87855431.

The ShareButton, which derrives from the RadioMenuButton, had the
desired behavior already overriding the on_clicked method, we
do this now in the invoker.

The DescriptionButton did only handle the popup part so far, with
this change the Palette will also popdown when the button is clicked
and the Palette is up.

Since both are Toolbuttons we have to set the hide_tooltip_on_click
property to False otherwise the popdown part would not function, see
1a8f89226b for more info.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 063e40d77d ActivityButton: set the toggle_palette option to True
Setting this option will popup the Palette on left click or tap
and popdown the Palette if it is up. This functionality has been
added with c4165967d5e05607db8b3e0969b516da87855431.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 433c6391ec Activity Toolbar Description input field wrap text, SL #3586
Signed-off-by: Gary C. Martin <garycmartin@googlemail.com
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer ef2c624b5a s/Descriptions/Description fixup of d9e1a72fcd
Spotted by Chris Leonard: we use Description in all the other
places.
12 years ago
Simon Schampijer d9e1a72fcd Add DescriptionEntry to the activity sub-toolbar
This is the implementation of the 'Write to Journal anytime'
feature [1].

The patch itself adds a DescriptionItem to the activity
sub-toolbar to make editing a Journal entry description
from within the activity possible. The code has the same
error handling as the TitleEntry.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Signed-off-by: Walter Bender <walter.bender@gmail.com>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Reviewed-by: Manuel Quiñones <manuq@laptop.org>

[1] http://wiki.sugarlabs.org/go/Features/Write_to_journal_anytime
12 years ago
Simon Schampijer b5de7ef332 Remove support for the old deprecated toolbar
- removed deprecated imports from the activity module, use the
  widgets module instead
- removed the ActivityToolbox class
- removed the Stop button from the ActivityToolbar
- removed set_toolbar/get_toolbar API from the window module

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
12 years ago
Simon Schampijer a8342ecf8c Finally remove the keep button completely
see 0082e10f8e for
the complete reasoning.

e022aa8e4a already made the button
invisible, keeping it only for backwards compatibility.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-By: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Daniel Drake <dsd@laptop.org>
12 years ago
Sascha Silbe 820efa56b9 Run pygi-convert.sh for automatic conversion from GTK2 to GTK3 + pygi.
This is only on a best-effort basis; the code will be in a broken state after
this patch and need to be fixed manually.

The purpose of committing the intermediate, non-working output is to make it
reproducible. It's impractical to manually review the changes.

The exact version used was 4f637212f13b197a95c824967a58496b9e3b877c from the
main pygobject repository [1] plus a custom patch [2] that hasn't been sent
upstream yet.

[1] git://git.gnome.org/pygobject
[2] https://sascha.silbe.org/patches/pygobject-convert-sugar-20111122.patch

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Sascha Silbe aed295ec4e Import GDK in preparation for GTK3 conversion
Some parts of GTK moved to GDK, so we need to import the latter for things to
work after the conversion script runs.

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 000ed75cbe Rename the module to sugar3
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago