Bring back dragging of elements from the activities to the frame clipboard - SL #3819

TestCase:

- open an activity like Browse, Read, Log (not Write, is a special case)
- bring up the frame
- drag things to the left side panel of the frame (images, links, or selected text)

The elements should be added to the clipboard which is inside the
panel.  They should have the proper icon and they should popup a
palette to act on them.

Note: if the dragged object is a link from Browse, Sugar tries to copy
the html to the disk.  But the current implementation looks wrong.  I
have opened #4477 to track it: http://bugs.sugarlabs.org/ticket/4477

Note: this doesn't solve the inverse operation: drag from the
clipboard to the activity.  This will be done in another patch.

API fixes:

- gtk.SelectionData.type  ->  Gtk.SelectionData.get_data_type().name() [1]
- gtk.SelectionData.data  ->  Gtk.SelectionData.get_data() [2]
- gtk.SelectionData.target  ->  Gtk.SelectionData.get_target() [3]
- context.targets  ->  context.list_targets() [4]
- context.drop_finish(...)  ->  Gdk.drop_finish(context, ...) [5]
- context.drag_status(...)  ->  Gdk.drag_status(context, ...) [6]
- context.get_source_widget()  ->  Gdk.drag_get_source_widget(context) [7]

[1] https://developer.gnome.org/gtk3/3.5/gtk3-Selections.html#gtk-selection-data-get-data-type
[2] https://developer.gnome.org/gtk3/3.5/gtk3-Selections.html#gtk-selection-data-get-data
[3] https://developer.gnome.org/gtk3/3.5/gtk3-Selections.html#gtk-selection-data-get-target
[4] https://developer.gnome.org/gdk/stable/gdk-Drag-and-Drop.html#gdk-drag-context-list-targets
[5] https://developer.gnome.org/gdk/stable/gdk-Drag-and-Drop.html#gdk-drop-finish
[6] https://developer.gnome.org/gdk/stable/gdk-Drag-and-Drop.html#gdk-drag-status
[7] https://developer.gnome.org/gtk3/stable/gtk3-Drag-and-Drop.html#gtk-drag-get-source-widget

The type of Gtk.SelectionData now comes as a Gdk.Atom instead of
string.  We use the name of the type to keep our code working.

The data for the type 'text/uri-list' comes with a character '\x00' at
the end now.  But using SelectionData.get_uris() returns a proper list
(thanks to Flavio Danesse for the recommendation).  So we can use that
list instead of doing selection.get_data().split('\n') or
sugar3.mime.split_uri_list (which could be obsolete now).  In fact,
this change was made a while ago in clipboardpanelwindow.py, but not
in clipboardtray.py.  See commit f0d194f3 .

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Bring back dragging of elements from the clipboard to the activities - SL #4485

This is another API fix for code not yet ported to GTK+3, similar
to #3819:

- gtk.SelectionData.type  ->  Gtk.SelectionData.get_data_type()
- context.set_icon_pixbuf(...)  ->  Gtk.drag_set_icon_pixbuf(context, ...) [2]

[1] https://developer.gnome.org/gtk3/3.5/gtk3-Selections.html#gtk-selection-data-get-data-type
[2] https://developer.gnome.org/gtk3/stable/gtk3-Drag-and-Drop.html#gtk-drag-set-icon-pixbuf

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Journal: fix the API for drag and drop - SL #3999

TestCase:

- open Paint activity, draw something
- go to the Journal
- drag the Paint entry to the Documents drive
- insert a USB stick
- drag the Paint entry to the USB drive

The paint should be in Documents and in the stick

Note: this needs the upstream fix
https://bugzilla.gnome.org/show_bug.cgi?id=692844 which is not in GTK+
3.6 but is added in current olpc builds as gtk3-3.6.4.1.fc18.olpc2.
So it can be tested on an XO.

Note: this does not fix the unwanted palette popup as described in the
ticket.  That will be a separate patch.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
More frame drag and drop fixes - SL #3819

- Errors introduced in recent commit 0aca8e59,
  jarabe.frame.clipboardobject.Format class doesn't have get_uri()
  method.

- jarabe.frame.clipboardobject.ClipboardObject: if format is
  'text/uri-list', Format.get_data() will contain only one URL.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Complete port to introspection; fix problem with language setting

This series of patches completes the conversion to intropection for
the keyboard section of the Sugar control panel. The issues were: (1)
conversion to XKL (import xklavier was causing Sugar to crash); (2)
work-around for the problem with gconf get_list and set_list (dnarvaez
added a Sugar extention to enable set_list to save a list of keyboard
layouts); and (3) fixing a problem with setting the proper default
languages in the UI.

Part 3 requires a conversion from ISO-639 2-character codes to ISO-639
3-character codes. This is accomplished by making use of a table
available at:
http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt
A snapshot of this table is now included in sugar/data.
use read_byte_async

This series of patches fixes the Sugar updater in the control
panel. In switching to Gio, the underlying stream IO has changed. The
new code is modelled after jarabe/model/filetransfer.py. See SL #4285