Extend notifications model

Add a buffer to the model. This buffer stores the notifications
that are received from the DBus interface. These notifications
are indexed by application name.

Add a new signal for when a buffer is emptied, for an specific
application name.

Considering that the notifications are shown in UI elements such
as Palettes, which are generated on demand, it is necessary to
store notifications so they can be added later.

Basically, this approach is follows a publisher and subscriber
model.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Initial backupmanager and section in the control panel

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Support volumes backup

Add Backup and Restore classes. These classes implement
backup and restore mechanisms to be used with external
volumes, such as memory sticks.

Add helpers functions to calculate pre-conditions such
as available space, and datastore size.

Comply with interfaces defined by Martin Abente and
Gonzalo Odiard, for sugar upstream backup GUI.

Comply with pep8.

VERSION 2: Added volumes and checkpoints selection logic.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add UI interaction to the backend

Options are displayed to the user if requested by the backend,
and a progressbar is displayed while the backup/restore is done.

The frontend and backend are separated to make easier create alternative
implementations.

A property is_cancellable is added to the SectionView,
because the restore can't be cancelled, and need modify the toolbar
buttons according to that.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Better naming of the generated backup file

The file is named based in the xo serial number, or user name if
is not available, and the date. The name is checked for invalid chars.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Save metadata in generated backup file

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Show a start message earlier

The message is shown before the initial testing
Add mime type for backup files
Save the mime type in the generated backup file metadata

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Add tests

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Solve the flow of text with long messages in backup/restore cp
General notifications container widget

Add a new widget, called NotificationBox, that handles all
the UI logic for displaying notifications in a Palette. The
widget interacts directly with the notifications model.

Using this widget, any sugar shell palette can display
notifications, by simply specifying an application name
to which it belongs.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Listen notifications from activities tray

Connect to notifications model signals, so the activities
tray, so it can show and hide badges in all the tray buttons.

For doing this, it assumes a covention that these buttons
provides a show_badge and a hide_badge methods.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add system notifications widgets

Add a NotificationPulsingIcon widget, that can draw
badges and simplifies the icon name and colors setting.

Add a NotificationButton, that will be used for system
notifications in activities tray. This button supports
the badges convention.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add or remove system notification buttons

Check if there is no button for the received notification,
and create a new button to include it in the activities
tray.

Check if there is a button for the cleared buffer, based
on the application name, and remove it from the activities
tray.

And with this, we already have system notifications that
follows the behaviour described in the design discussions.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Update corner notification icon

Move corner notification icon to the top left
corner of the screen.

Make frame visible when clicking on the corner
notification icon.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Updater: show icons for new activities - Fixes #4657

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Clean temporary icons before microformat query

Delete temporary icons each time a query is issued.

In this way, we avoid acumulating unnecessary temporary
icons, when the users select "Refresh" in the updater
over and over.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Merge pull request #284 from godiard/backup_feature-try5

Backup feature try5
Change icon for Backup in Caontrol Panel