<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DanielDrake</id>
	<title>Sugar Labs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DanielDrake"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/go/Special:Contributions/DanielDrake"/>
	<updated>2026-05-14T00:14:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Content_support&amp;diff=88618</id>
		<title>Features/Content support</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Content_support&amp;diff=88618"/>
		<updated>2013-07-04T14:57:54Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{GoogleTrans-en}}{{TOCright}}&lt;br /&gt;
[[Category:Feature|Content support]]&lt;br /&gt;
[[Category:Feature Page Incomplete]]&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Sugar should be able to support easy installation and distribution of books, multimedia, and other content.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
[[User:DanielDrake|DanielDrake]] dsd@laptop.org&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
&lt;br /&gt;
* Targeted release: 0.100&lt;br /&gt;
* Last updated: July 2013&lt;br /&gt;
* Percentage of completion: 100%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
[[Content bundles]] have long been both a crucial part of the OLPC-Sugar offering (see http://wiki.laptop.org/go/Creating_a_collection), and a pain through having some deficiencies.&lt;br /&gt;
&lt;br /&gt;
They are important because it is the only easy way for a deployment to add pre-made content to Sugar (e.g. books). The strong point of the design here is that beyond a not-too-strange library.info metadata file, you do not have to interact with anything too technical (e.g. python) beyond the HTML content itself. It is something that seems to fall within&lt;br /&gt;
capabilities of deployment teams without much difficulty, whereas activity development is often a painful step up.&lt;br /&gt;
&lt;br /&gt;
They are quite widely used and in my experience visiting deployments &amp;quot;how do we add our content to the laptop&amp;quot; is a very frequent question - I always ran training sessions on content bundles in response. Here are some examples of the kinds of bundles that exist:&lt;br /&gt;
* World maps&lt;br /&gt;
* Music (e.g., one album)&lt;br /&gt;
* Grade 3 textbooks&lt;br /&gt;
* Grade 5 textbooks&lt;br /&gt;
* Collections of local historical tales&lt;br /&gt;
* Multimedia about local culture (dance/music)&lt;br /&gt;
&lt;br /&gt;
However they are a pain because Sugar never really supported them very well. Sugar can launch them from the Journal, but shipped content that the user has never opened before does not exist in the Journal, so there was something missing here.&lt;br /&gt;
&lt;br /&gt;
To fill the gap, OLPC added a system (olpc-library) to produce a HTML index of content bundles and this is the Browse homepage, but that isn&#039;t great either - it&#039;s not part of Sugar where it should be, and users have to open the web browser as if they are going online when they are just looking to open some preinstalled content.&lt;br /&gt;
&lt;br /&gt;
With my recent work on [[Features/Automatic activity updates|automatic activity updates]], we had to add content bundles to the bundle registry so that they will be updated appropriately. Now that this is done, it is very easy to remove this deficiency.Content bundles now appear alongside activities, in the list and favourites views. They are launched as expected with a click.&lt;br /&gt;
&lt;br /&gt;
Sugar&#039;s support for content is currently minimal. You are limited to shipping the content on USB disk to each computer, or through a website (one-click-per-file). The widely-deployed .xol content bundles only have minimal support (they can only be launched from the journal).&lt;br /&gt;
&lt;br /&gt;
With this change, it is envisioned that the OLPC-specific way of providing a content bundle index (through olpc-library) would go away. The [[Content bundles|content bundle format]] has been tweaked to remove unused fields. However, it is fully compatible with existing content bundles.&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
Sugar deployers finally have a simple method of shipping content to all systems within a deployment.&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&lt;br /&gt;
A small Sugar patch is needed, to show content bundles on the home screen (rather than ignore them), and some tweaks to the ContentBundle class is needed so that it matches the API of the ActivityBundle class.&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
&lt;br /&gt;
Install content bundles and make sure that you can open them. Make them available on the favorites view and check they can be opened from there. Check that you can erase them and that they are then gone from disk.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&lt;br /&gt;
to be written after implementation and testing&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Talk:Features/Content_support&amp;diff=88617</id>
		<title>Talk:Features/Content support</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Talk:Features/Content_support&amp;diff=88617"/>
		<updated>2013-07-04T14:50:13Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note that most of the discussion below refers to parts of the proposed feature which are no longer being proposed now (for the time being at least).&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
I&#039;d argue for a somewhat different approach to achieving the same goals. Instead of introducing yet another modal dialog, why not eliminate the list view and replace it with the star function in the Journal itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Any object that is starred will show up on the Home View. (Ideally, there would be multiple stars corresponding to multiple Home Views, e.g., one for school, one for home...)&lt;br /&gt;
&lt;br /&gt;
Features of this approach:&lt;br /&gt;
* No confusing list view&lt;br /&gt;
* Media objects in list view&lt;br /&gt;
* Utilization of star in Journal view which currently does nothing&lt;br /&gt;
* Reutilization of current Journal filters&lt;br /&gt;
&lt;br /&gt;
--[[User:Walter|Walter]] 16:39, 20 July 2010 (EDT)&lt;br /&gt;
== Home views as Journal favorites views ==&lt;br /&gt;
&lt;br /&gt;
I imagine the Home view becoming tightly integrated with the Journal through the Journal favorites as Walter suggests.&lt;br /&gt;
&lt;br /&gt;
The &#039;List&#039; Home view should be replaced by a Journal icon that would take the learner to a &amp;quot;non-favorite&amp;quot;-limited filter in the Journal view of the currently-selected Home group.  Where &amp;quot;Home group&amp;quot; would be the alternate views such as, School, Games, Music, Photos, etc., created by new Journal tagging features.  (The default Home view, would continue to be the favorite list of installed Activities.)&lt;br /&gt;
&lt;br /&gt;
A sub-row of Home group icons (which would instantly reveal on hover) would be provided on the Home view Frame button palette to allow the learner to jump to alternate Favorite views.  The Favorites Home view button would gain the same sub-row palette, and the alternate view patterns would be a sub-palette that would reveal only on a persistent hover or right-mouse button click.&lt;br /&gt;
&lt;br /&gt;
To complement the easy Journal access from the Home view, we should provide a direct Home view button on the Journal toolbar&amp;amp;mdash;the Journal Favorites view (aka, Home view). To conserve the valuable toolbar space, this should qualify for one of the corner positions.  (Are we reserving the corners for alert beacons or what?)&lt;br /&gt;
&lt;br /&gt;
--[[User:FGrose|FGrose]] 16:33, 21 July 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
http://lists.sugarlabs.org/archive/sugar-devel/2010-July/025615.html describes a Journal group design to support Activity and content grouping. --[[User:FGrose|FGrose]] 11:26, 28 July 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
== (Ab)using the Journal for stuff that the user didn&#039;t	do, create, or 	access ==&lt;br /&gt;
&lt;br /&gt;
Both of these comments break a pretty core concept of the current journal design, in my opinion.&lt;br /&gt;
&lt;br /&gt;
http://www.mail-archive.com/sugar-devel@lists.sugarlabs.org/msg07888.html&lt;br /&gt;
: Amend the &amp;quot;non-favorite&amp;quot; filter above to include only learner-tagged objects/events. Then we could extend the Journal concept to My Journal and Others&#039; Journals (some higher level filter with appropriate colors and names).  This would accommodate shared Journals and the core content that came with the Sugar image.  --[[User:FGrose|FGrose]] 17:52, 21 July 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
:This proposal somewhat exasperates the confusion over things pre-installed in the Journal, but this is a preexisting problem. --[[User:Walter|Walter]] 20:55, 21 July 2010 (EDT)&lt;br /&gt;
:: True, but with the concept of My Journal vs. Others&#039;, a System Journal may come to conveniently represent the machine (with appropriate groups, such as event and error logs, that are more closely associated with the system vs. the learner).  We could find a natural way to introduce pre-installed content, which, once activated, become learner Activity instances, such as the e-book with my annotations and last page number, etc.  --[[User:FGrose|FGrose]] 23:17, 21 July 2010 (EDT)&lt;br /&gt;
:::It is the &amp;quot;natural way to introduce pre-installed content&amp;quot; part I still struggle with, but as I said, this is a preexisting problem and shouldn&#039;t be roadblock to this feature proposal. --[[User:Walter|Walter]] 08:22, 22 July 2010 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Adding a search interface for non-user-created content ==&lt;br /&gt;
&lt;br /&gt;
I like these suggestions a lot; it seems to me quite important to implement a first pass for use/testing/discussion.&lt;br /&gt;
&lt;br /&gt;
The idea of making better use of the home screen for finding/accessing content in particular could be enhanced by making good use of the search bar there (currently disabled).  &lt;br /&gt;
 &lt;br /&gt;
The results of a search should be an interface for discovering content of all sorts.  It could also replace the current software update interface.  I&#039;d like to see it include (copied in part from [http://dev.laptop.org/ticket/10244 bug 10244]):&lt;br /&gt;
&lt;br /&gt;
# Support discovery of local and remote content, including:&lt;br /&gt;
#* Content available locally on the machine&lt;br /&gt;
#* Content whose metadata / last known location is on the machine (found by searching a local metadata catalog)&lt;br /&gt;
#* Content whose metadata / last known location is in a public catalog (found by visiting a URL)&lt;br /&gt;
#:&lt;br /&gt;
# Support discovery of many types of content:&lt;br /&gt;
#* activities and content bundles (using .xo/.xol microformats or other)&lt;br /&gt;
#* individual books (using OPDS data or other)&lt;br /&gt;
#* journal entries (using standardized journal metadata if searching &amp;quot;others&#039; public journals&amp;quot;)&lt;br /&gt;
#:&lt;br /&gt;
# Support the notion of updates&lt;br /&gt;
#* Checking for new catalog data and offering to update local catalog data when searches are run&lt;br /&gt;
#* Checking metalists of available (distributed) catalogs and offering to check new catalogs for more activities/content&lt;br /&gt;
#* Comparing version IDs or timestamps for activities/content that have it&lt;br /&gt;
#* Offering hints as to the number of updates available for content already stored locally &lt;br /&gt;
#*: &amp;lt;small&amp;gt;(as the current Activity Update interface offers. the default hint should probably be less bold; rather than a page listing the updates in detail and asking you to click &amp;quot;go!&amp;quot;)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browse can handle content bundles directly ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The widely-deployed .xol content bundles only have minimal support (they can only be launched from the journal).&#039;&#039;&lt;br /&gt;
: Not true, you can view .xol (or any ZIP file) contents in Browse &#039;&#039;without installing or unpacking&#039;&#039; using the jar: protocol ({{bug|1258}}).&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into your browse bar , including the &amp;quot;jar:&amp;quot; on the front.&lt;br /&gt;
 jar:http://wiki.laptop.org/images/3/3e/Biology-9.jar!/Biology/index.en.html&lt;br /&gt;
&lt;br /&gt;
This has some interesting implications.&lt;br /&gt;
* Sugar code doesn&#039;t have to keep a .xol and a Library directory in sync, installing and uninstalling the latter as .xols are opened and erased.&lt;br /&gt;
* The file system determines if a content bundle conflicts with another.&lt;br /&gt;
* Instead of making web pages telling readers how great some content is, they can view it for themselves before they download.&lt;br /&gt;
&lt;br /&gt;
There are limitations to this:&lt;br /&gt;
* Some collections have an index.html that does a meta http-equiv refresh to a path in file:///home/olpc/Library , this won&#039;t work (and I think breaks anyway in other Sugar environments)&lt;br /&gt;
* Some collections (Biology, NatureImages, TranslationDictionary) reference a /usr/share/library-common/css/master.css).  This won&#039;t work if you browse them remotely.&lt;br /&gt;
* I don&#039;t know what the performance implications are.  I know Firefox 3.6 has additional performance boosts as Mozilla moved more files into a single runtime .jar file.&lt;br /&gt;
-- [[User:Skierpage|Skierpage]] 06:40, 4 September 2010 (EDT)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Content_bundles&amp;diff=88601</id>
		<title>Content bundles</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Content_bundles&amp;diff=88601"/>
		<updated>2013-07-03T19:37:55Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: Created page with &amp;quot;Sugar supports &amp;lt;em&amp;gt;content bundles&amp;lt;/em&amp;gt;, a distributable archive of content to be made available under Sugar.  == Rationale ==  The most popular use for content bundles is to ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sugar supports &amp;lt;em&amp;gt;content bundles&amp;lt;/em&amp;gt;, a distributable archive of content to be made available under Sugar.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
The most popular use for content bundles is to provide an easy way for deployers to pre-install content (e.g. textbooks) on all the Sugar installations in a deployment. The content is either provided as HTML documents and images, or an HTML index to other media is provided.&lt;br /&gt;
&lt;br /&gt;
Another option here would be for deployers to create an activity that provides a browseable index to the content being distributed. However, technically, this is a major step up in complexity. Content bundles have simplicity on their side, and basic HTML is a widespread skill. Python is not.&lt;br /&gt;
&lt;br /&gt;
So, as Sugar does not provide a better answer for the frequently asked deployer question &amp;quot;how can I ship a load of textbooks on all these Sugar installations?&amp;quot;, content bundles have actually become rather popular in the field.&lt;br /&gt;
&lt;br /&gt;
== Creating a content bundle ==&lt;br /&gt;
&lt;br /&gt;
Currently, the &amp;quot;launcher page&amp;quot; for your content bundle must be a HTML document.&lt;br /&gt;
&lt;br /&gt;
In a new directory for the files to be included in the bundle:&lt;br /&gt;
# Create an index.html file that acts as the front page of your content, or that provides an index to the content you wish to make available&lt;br /&gt;
# Add all the content to the directory structure (i.e. the things you link to from index.html and any resources that they require)&lt;br /&gt;
# Create a library subdirectory and place a library.info file there&lt;br /&gt;
&lt;br /&gt;
Now zip up the directory structure from one level up, and rename the zip file to have a .xol extension. Content bundle complete!&lt;br /&gt;
&lt;br /&gt;
If you were to examine the contents of the zip file for a content bundle named Dictionary, you would now see the following directory structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dictionary/                     (directory)&lt;br /&gt;
Dictionary/index.html           (index page)&lt;br /&gt;
Dictionary/page1.html           (content linked from index)&lt;br /&gt;
Dictionary/page2.html           (content linked from index)&lt;br /&gt;
Dictionary/grammar.png          (an image resource shown in page1)&lt;br /&gt;
Dictionary/library/             (directory)&lt;br /&gt;
Dictionary/library/icon.svg     (icon image)&lt;br /&gt;
Dictionary/library/library.info (detailed below)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== library.info specification ==&lt;br /&gt;
&lt;br /&gt;
The most complex part of creating a content bundle is creating a metadata file that gives Sugar some basic information about your content (title, etc). This is done in a .ini style format, in a file that &amp;lt;b&amp;gt;must&amp;lt;/b&amp;gt; be placed at location &amp;lt;tt&amp;gt;library/library.info&amp;lt;/tt&amp;gt; inside your content bundle.&lt;br /&gt;
&lt;br /&gt;
On the first line, place the section name which must be:&lt;br /&gt;
  [Library]&lt;br /&gt;
&lt;br /&gt;
The remaining lines are used as key-value pairs, in the format:&lt;br /&gt;
  key = value&lt;br /&gt;
&lt;br /&gt;
The available keys, some of which are required, are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; &#039;&#039;(required)&#039;&#039;: The (localized) name of your content bundle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;global_name&amp;lt;/tt&amp;gt; &#039;&#039;(required)&#039;&#039;&lt;br /&gt;
: This is the unique content bundle identifier. It&#039;s as if you were to write a domain name backwards, perhaps with more specific information at the end. Think of it as something like this:&lt;br /&gt;
&lt;br /&gt;
:* If your email address is &#039;&#039;yourname&#039;&#039;@&#039;&#039;somemailhost&#039;&#039;.com, then you could use &#039;&#039;com.somemailhost.yourname&#039;&#039;.&#039;&#039;YourContent&#039;&#039;.&lt;br /&gt;
:* You could set up a web page on a free hosting service with information about your content, and use a name derived from its URL.  For example, if you create a page at http://www.geocities.com/xotumusica for your content, then com.geocities.www.xotumusica is a reasonable global_name.&lt;br /&gt;
:* If nothing else is available, even org.sugarlabs.wiki.&#039;&#039;Your Activity Page Title&#039;&#039; is probably a reasonable global_name, provided that you create the &#039;Your Activity Page Title&#039; page.  Remember, global_names should be unique, so you should double check that the &#039;Your Activity Page Title&#039; page doesn&#039;t already exist (and then create it) before using this as your global_name.&lt;br /&gt;
&lt;br /&gt;
: Tech talk: The name should conform to the [http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names D-Bus spec] - in particular, hyphens are not allowed. It is recommended that [http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions Java package naming conventions] are used when chosing bundle identifiers, to ensure uniqueness. The reversed domain name part is supposed to be rooted in some actual DNS-rooted namespace.  You don&#039;t need to own this domain; you just need to have a reasonable claim on some &#039;&#039;unique&#039;&#039; name at that domain.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;library_version&amp;lt;/tt&amp;gt; &#039;&#039;(required)&#039;&#039;: The version is a single positive integer that refers to the version of the collection. Larger numbers are considered &amp;quot;newer&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;host_version&amp;lt;/tt&amp;gt; &#039;&#039;(required)&#039;&#039;: The host version is a single positive integer that refers to the version of Sugar which the collection is compatible with. For now, the version is 1. Do not use a different value.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;icon&amp;lt;/tt&amp;gt; &#039;&#039;(required)&#039;&#039;: The filename of the icon within the &#039;library&#039; directory of your content bundle. SVG is the recommended format, but PNG and JPEG will work as well.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;license&amp;lt;/tt&amp;gt;: This field names the license used for the content bundle.  The contents of this field should conform to the same guidelines as the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License:_field &amp;lt;code&amp;gt;License:&amp;lt;/code&amp;gt; field] of an RPM package; consult the [http://fedoraproject.org/wiki/Packaging/LicensingGuidelines Fedora Licensing Guidelines] for more information.  A &#039;license&#039; field naming an entry or entries in the &amp;quot;Good Licenses&amp;quot; table for Content Licenses at [http://fedoraproject.org/wiki/Licensing Fedora&#039;s Licensing list] is required for any content distributed by OLPC.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;locale&amp;lt;/tt&amp;gt;: This is the ISO code for the language of the collection, in lowercase, followed by an underscore, and then its localization information (also represented in ISO code). For example, US-localized English is represented as en_US. UK-localized English, for example, would be represented as en_UK.   &lt;br /&gt;
&lt;br /&gt;
:It is possible to indicate language but not localization information. An example would be:&lt;br /&gt;
:&amp;lt;code&amp;gt;locale = es &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:It is also possible to indicate multiple languages and/or locales. An example would be:&lt;br /&gt;
:&amp;lt;code&amp;gt;locale = en_US;en_UK;es_PE;es_AR;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that values are separated by semi-colons, and that the final value must end with a semi-colon as well.&lt;br /&gt;
&lt;br /&gt;
: For a list of ISO 639 language codes, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes. For a list of ISO country codes, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;activity_start&amp;lt;/tt&amp;gt;: This refers to the start page of your content bundle. The default is &amp;lt;tt&amp;gt;index.html&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Collections tend to rely much more heavily on text than code, and the usual way to localize content is to make a separate bundle for each language. Indicate the language of your collection in the locale field of the library.info file.&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88543</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88543"/>
		<updated>2013-06-21T18:58:28Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Scope and implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|Automatic activity updates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations as well.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that simply should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the [[Activity_Team/Activity_Microformat|OLPC activity update microformat]] which is widely used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope and implementation ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set.&lt;br /&gt;
&lt;br /&gt;
To handle periodic updates (when system upgrades have not happened), 10 minutes after launch, Sugar will check if sufficient time has passed since the last successful update. If a configured threshold has been met, an activity update will be run. This check will then be repeated at 60 minute intervals.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file &amp;lt;tt&amp;gt;~/.sugar-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/last_activity_update&amp;lt;/tt&amp;gt;. The amount of time that passes before an automatic activity update is executed is defined by the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/auto_update_frequency&amp;lt;/tt&amp;gt;, units in days, default 0 (which means no periodic update).&lt;br /&gt;
&lt;br /&gt;
The gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/backend&amp;lt;/tt&amp;gt; will specify which update mechanism to use (ASLO or microformat), and the &amp;lt;tt&amp;gt;/desktop/sugar/update/microformat_update_url&amp;lt;/tt&amp;gt; gconf key will specify the base server URI to use for the microformat update backend.&lt;br /&gt;
&lt;br /&gt;
The idea is that the deployer sets the appropriate gconf keys according to his preferences and infrastructure.&lt;br /&gt;
&lt;br /&gt;
The core of the activity update code (src/extensions/cpsection/update/model.py and the backends) will be moved into src/jarabe/model/update, where it will be shared between the activity update control panel, and the automatic background update.&lt;br /&gt;
&lt;br /&gt;
The background update will be run in the main sugar-shell process. A previous design considered making this a separate service, but upon investigation, the in-process bundle registry is a key part of the whole process, and keeping things in process reduces scope/complexity of this feature substantially.&lt;br /&gt;
&lt;br /&gt;
The one significant change needed is that bundleregistry must offer asynchronous activity installation to avoid horrible UI hangs while background updates are going on. This will be done by bundleregistry doing its install/upgrade work in a separate thread. GIL contention is not a concern because pygobject is good at dropping the GIL (i.e. it&#039;s never held on idle) and the installation thread is IO-bound so is not expected to contend the GIL much either. Beyond threading, the only other added complexity is that the bundle registry must now be protected by a lock, as the installation thread needs to use it very briefly before starting any update.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
The implementation will also bring in some cleanups to Bundle handling including a fix to #3707.&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88493</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88493"/>
		<updated>2013-06-13T22:01:08Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Scope and implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|Automatic activity updates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations as well.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that simply should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the [[Activity_Team/Activity_Microformat|OLPC activity update microformat]] which is widely used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope and implementation ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set.&lt;br /&gt;
&lt;br /&gt;
To handle periodic updates (when system upgrades have not happened), 10 minutes after launch, Sugar will check if sufficient time has passed since the last successful update. If a configured threshold has been met, an activity update will be run. This check will then be repeated at 60 minute intervals.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file &amp;lt;tt&amp;gt;~/.sugar-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/last_activity_update&amp;lt;/tt&amp;gt;. The amount of time that passes before an automatic activity update is executed is defined by the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/auto_update_frequency&amp;lt;/tt&amp;gt;, units in days, default 0 (which means no periodic update).&lt;br /&gt;
&lt;br /&gt;
The gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_mechanism&amp;lt;/tt&amp;gt; will specify which update mechanism to use (ASLO or microformat), and the &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_uri&amp;lt;/tt&amp;gt; gconf key will specify the base server URI to use.&lt;br /&gt;
&lt;br /&gt;
The core of the activity update code (src/extensions/cpsection/update/model.py and the backends) will be moved into src/jarabe/model/update, where it will be shared between the activity update control panel, and the automatic background update.&lt;br /&gt;
&lt;br /&gt;
The background update will be run in the main sugar-shell process. A previous design considered making this a separate service, but upon investigation, the in-process bundle registry is a key part of the whole process, and keeping things in process reduces scope/complexity of this feature substantially.&lt;br /&gt;
&lt;br /&gt;
The one significant change needed is that bundleregistry must offer asynchronous activity installation to avoid horrible UI hangs while background updates are going on. This will be done by bundleregistry doing its install/upgrade work in a separate thread. GIL contention is not a concern because pygobject is good at dropping the GIL (i.e. it&#039;s never held on idle) and the installation thread is IO-bound so is not expected to contend the GIL much either. Beyond threading, the only other added complexity is that the bundle registry must now be protected by a lock, as the installation thread needs to use it very briefly before starting any update.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
The implementation will also bring in some cleanups to Bundle handling including a fix to #3707.&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88443</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88443"/>
		<updated>2013-06-11T22:31:32Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Scope and implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|Automatic activity updates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations as well.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that simply should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the [[Activity_Team/Activity_Microformat|OLPC activity update microformat]] which is widely used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope and implementation ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set.&lt;br /&gt;
&lt;br /&gt;
To handle periodic updates (when system upgrades have not happened), 10 minutes after launch, Sugar will check if sufficient time has passed since the last successful update. If a configured threshold has been met, an activity update will be run. This check will then be repeated at 60 minute intervals.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file &amp;lt;tt&amp;gt;~/.sugar/default/activity_update_urgent&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/last_activity_update&amp;lt;/tt&amp;gt;. The amount of time that passes before an automatic activity update is executed is defined by the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/auto_update_frequency&amp;lt;/tt&amp;gt;, units in days, default 0 (which means no periodic update).&lt;br /&gt;
&lt;br /&gt;
The gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_mechanism&amp;lt;/tt&amp;gt; will specify which update mechanism to use (ASLO or microformat), and the &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_uri&amp;lt;/tt&amp;gt; gconf key will specify the base server URI to use.&lt;br /&gt;
&lt;br /&gt;
The core of the activity update code (src/extensions/cpsection/update/model.py and the backends) will be moved into src/jarabe/model/update, where it will be shared between the activity update control panel, and the automatic background update.&lt;br /&gt;
&lt;br /&gt;
The background update will be run in the main sugar-shell process. A previous design considered making this a separate service, but upon investigation, the in-process bundle registry is a key part of the whole process, and keeping things in process reduces scope/complexity of this feature substantially.&lt;br /&gt;
&lt;br /&gt;
The one significant change needed is that bundleregistry must offer asynchronous activity installation to avoid horrible UI hangs while background updates are going on. This will be done by bundleregistry doing its install/upgrade work in a separate thread. GIL contention is not a concern because pygobject is good at dropping the GIL (i.e. it&#039;s never held on idle) and the installation thread is IO-bound so is not expected to contend the GIL much either. Beyond threading, the only other added complexity is that the bundle registry must now be protected by a lock, as the installation thread needs to use it very briefly before starting any update.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
The implementation will also bring in some cleanups to Bundle handling including a fix to #3707.&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88442</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88442"/>
		<updated>2013-06-11T22:30:30Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|Automatic activity updates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations as well.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that simply should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the [[Activity_Team/Activity_Microformat|OLPC activity update microformat]] which is widely used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope and implementation ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set.&lt;br /&gt;
&lt;br /&gt;
To handle periodic updates (when system upgrades have not happened), 10 minutes after launch, Sugar will check if sufficient time has passed since the last successful update. If a configured threshold has been met, an activity update will be run. This check will then be repeated at 60 minute intervals.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file &amp;lt;tt&amp;gt;~/.sugar/default/activity_update_urgent&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/last_activity_update&amp;lt;/tt&amp;gt;. The amount of time that passes before an automatic activity update is executed is defined by the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/auto_update_frequency&amp;lt;/tt&amp;gt;, units in days, default 0 (which means no periodic update).&lt;br /&gt;
&lt;br /&gt;
The gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_mechanism&amp;lt;/tt&amp;gt; will specify which update mechanism to use (ASLO or microformat), and the &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_uri&amp;lt;/tt&amp;gt; gconf key will specify the base server URI to use.&lt;br /&gt;
&lt;br /&gt;
The core of the activity update code (src/extensions/cpsection/update/model.py and the backends) will be moved into src/jarabe/model/update, where it will be shared between the activity update control panel, and the automatic background update.&lt;br /&gt;
&lt;br /&gt;
The background update will be run in the main sugar-shell process. A previous design considered making this a separate service, but upon investigation, the in-process bundle registry is a key part of the whole process, and keeping things in process reduces scope/complexity of this feature substantially.&lt;br /&gt;
&lt;br /&gt;
The one significant change needed is that bundleregistry must offer asynchronous activity installation to avoid horrible UI hangs while background updates are going on. This will be done by bundleregistry doing its install/upgrade work in a separate thread. GIL contention is not a concern because pygobject is good at dropping the GIL (i.e. it&#039;s never held on idle) and the installation thread is IO-bound so is not expected to contend the GIL much either. Beyond threading, the only other added complexity is that the bundle registry must now be protected by a lock, as the installation thread needs to use it very briefly before starting any update.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
#3707 will be addressed as part of this implementation.&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88393</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=88393"/>
		<updated>2013-06-03T21:39:09Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|Automatic activity updates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations that I have visited.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the OLPC activity update microformat which is used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set, or if the last update happened beyond a configurable amount of time in the past.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file &amp;lt;tt&amp;gt;~/.sugar/default/activity_update_urgent&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/last_activity_update&amp;lt;/tt&amp;gt;. The amount of time that passes before an automatic activity update is executed is defined by the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/auto_update_frequency&amp;lt;/tt&amp;gt;, units in days, default 0 (which means no periodic update).&lt;br /&gt;
&lt;br /&gt;
The gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_mechanism&amp;lt;/tt&amp;gt; will specify which update mechanism to use (ASLO or microformat), and the &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_uri&amp;lt;/tt&amp;gt; gconf key will specify the base server URI to use.&lt;br /&gt;
&lt;br /&gt;
The core of the activity updating code (looking for updates, downloading them, installing them) will be moved to a dbus-activated service on the session bus with name XXX. This service, referred to as activity-updater, will automatically exit after 2 minutes of inactivity when no activity updates are ongoing. It will only allow one activity update to happen at a time. The D-Bus API will have the following methods and signals:&lt;br /&gt;
&lt;br /&gt;
* GetStatus(): get the status of the current activity update session (if any). Returns the status code last emitted from the SessionStatus signal, the number of activities that are included in any in-progress update, and the number of activity updates already completed.&lt;br /&gt;
* GetCurrentUpdateStatus(): get information about the current activity being updated: its name, download size, a boolean flag indicating whether the download has completed, and a percentage progress indication (of either the download or the installation).&lt;br /&gt;
* Cancel(): Cancel the ongoing update session, waiting for a safe point before cancelling (e.g. to avoid aborting halfway through installing an activity). This will return immediately but the cancel will not be complete until indicated by the SessionStatus signal.&lt;br /&gt;
* FindUpdates(array of activities to check, optional automatic update parameter): Start a new update session, querying for available activity updates. Returns a list of updates available. Each list entry will have: (bundle_id, URL, download_size, current_installed_version_number, update_version_number). An optional parameter can be passed to trigger automatic upgrade to the new activities that are found.&lt;br /&gt;
* GetDetails(bundle_id): For a given bundle_id already identified as an update, download and return the activity name (localised) and icon.&lt;br /&gt;
* DoUpdate(bundle_id_1, bundle_id_2, ...): For the given bundle_ids already identified as updates and passed in as parameters, perform the activity update process (download, install).&lt;br /&gt;
&lt;br /&gt;
* Signal ActivityUpdating(bundle_id, download_size, download_completed, progress): Raised when an activity update is started, and then every 10 seconds until it is completed. The download_completed flag indicates whether the activity is downloading or installing, and the progress parameter indicates the percentage of the download or install.&lt;br /&gt;
* Signal ActivityUpdated(bundle_id, success): Raised when an activity update completes, with the success flag indicating success or failure.&lt;br /&gt;
* Signal UpdateCompleted(success): Raised when an update session completes, with a flag indicating whether errors were encountered or not.&lt;br /&gt;
* Signal SessionStatus(status): Raised with a code indicating the status of the activity updater.&lt;br /&gt;
** 0: inactive&lt;br /&gt;
** 1: new session opened, for automatic activity update&lt;br /&gt;
** 2: new session opened, updates have been queried&lt;br /&gt;
** 3: activity download/installation is in progress&lt;br /&gt;
&lt;br /&gt;
This API is intended for internal use only.&lt;br /&gt;
&lt;br /&gt;
When Sugar wants to launch an automatic activity update, it will make a dbus method call to FindUpdates(), requesting that an automatic upgrade is performed.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
Activity installation/update will be done with the sugar-toolkit bundle API (like sugar-install-bundle). Sugar will become aware of these events through the way it already watches the filesystem. It might be worth addressing #3707 as part of this implementation effort so that this is fully reliable.&lt;br /&gt;
&lt;br /&gt;
== Future possibilities ==&lt;br /&gt;
&lt;br /&gt;
* Improve the bundle registry so that it is accessible over dbus and doesn&#039;t need the update service to also create its own registry in memory.&lt;br /&gt;
&lt;br /&gt;
==UI Design==&lt;br /&gt;
&#039;&#039;Does the feature have a direct impact on the work flow, or does it need a UI? Link here mockups, or add detailed descriptions.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&#039;&#039;What other packages (RPMs) depend on this package?  Are there changes outside the developers&#039; control on which completion of this feature depends?  In other words, does your feature depend on completion of another feature owned by someone else or that you would need to coordinate, which might cause you to be unable to finish on time?  Other upstream projects like Python?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Contingency Plan ==&lt;br /&gt;
&#039;&#039;If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as &amp;quot;None necessary, revert to previous release behaviour.&amp;quot;  Or it might not.  If your feature is not completed in time, we want to assure others that other parts of Sugar will not be in jeopardy.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&#039;&#039;Is there upstream documentation on this feature, or notes you have written yourself?  Has this topic been discussed in the mailing list or during a meeting? Link to that material here so other interested developers can get involved.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=82103</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=82103"/>
		<updated>2012-08-09T21:03:39Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|.]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations that I have visited.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the OLPC activity update microformat which is used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set, or if the last update happened beyond a configurable amount of time in the past.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file &amp;lt;tt&amp;gt;~/.sugar/default/activity_update_urgent&amp;lt;/tt&amp;gt;.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/last_activity_update&amp;lt;/tt&amp;gt;. The amount of time that passes before an automatic activity update is executed is defined by the gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/auto_update_frequency&amp;lt;/tt&amp;gt;, units in days, default 0 (which means no periodic update).&lt;br /&gt;
&lt;br /&gt;
The gconf key &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_mechanism&amp;lt;/tt&amp;gt; will specify which update mechanism to use (ASLO or microformat), and the &amp;lt;tt&amp;gt;/desktop/sugar/update/activity_update_uri&amp;lt;/tt&amp;gt; gconf key will specify the base server URI to use.&lt;br /&gt;
&lt;br /&gt;
The core of the activity updating code (looking for updates, downloading them, installing them) will be moved to a dbus-activated service on the session bus with name XXX. This service, referred to as activity-updater, will automatically exit after 2 minutes of inactivity when no activity updates are ongoing. It will only allow one activity update to happen at a time. The D-Bus API will have the following methods and signals:&lt;br /&gt;
&lt;br /&gt;
* GetStatus(): get the status of the current activity update session (if any). Returns the status code last emitted from the SessionStatus signal, the number of activities that are included in any in-progress update, and the number of activity updates already completed.&lt;br /&gt;
* GetCurrentUpdateStatus(): get information about the current activity being updated: its name, download size, a boolean flag indicating whether the download has completed, and a percentage progress indication (of either the download or the installation).&lt;br /&gt;
* Cancel(): Cancel the ongoing update session, waiting for a safe point before cancelling (e.g. to avoid aborting halfway through installing an activity). This will return immediately but the cancel will not be complete until indicated by the SessionStatus signal.&lt;br /&gt;
* QueryUpdates(): Start a new update session, querying for available activity updates. Returns a list of activities available. Each list entry will have: (bundle_id, URL, download_size, current_installed_version_number, update_version_number).&lt;br /&gt;
* GetDetails(bundle_id): For a given bundle_id already identified as an update, download and return the activity name (localised) and icon.&lt;br /&gt;
* DoUpdate(bundle_id_1, bundle_id_2, ...): For the given bundle_ids already identified as updates, perform the activity update process (download, install).&lt;br /&gt;
* StartAutomaticUpdate(): internally perform QueryUpdates() and then run DoUpdates() on all available updates. Returns immediately having kicked off the process internally.&lt;br /&gt;
&lt;br /&gt;
* Signal ActivityUpdating(bundle_id, download_size, download_completed, progress): Raised when an activity update is started, and then every 10 seconds until it is completed. The download_completed flag indicates whether the activity is downloading or installing, and the progress parameter indicates the percentage of the download or install.&lt;br /&gt;
* Signal ActivityUpdated(bundle_id, success): Raised when an activity update completes, with the success flag indicating success or failure.&lt;br /&gt;
* Signal UpdateCompleted(success): Raised when an update session completes, with a flag indicating whether errors were encountered or not.&lt;br /&gt;
* Signal SessionStatus(status): Raised with a code indicating the status of the activity updater.&lt;br /&gt;
** 0: inactive&lt;br /&gt;
** 1: new session opened, for automatic activity update&lt;br /&gt;
** 2: new session opened, updates have been queried&lt;br /&gt;
** 3: activity download/installation is in progress&lt;br /&gt;
&lt;br /&gt;
This API is intended for internal use only.&lt;br /&gt;
&lt;br /&gt;
When Sugar wants to launch an automatic activity update, it will make a dbus method call to StartAutomaticUpdate(), which will return immediately having kicked off an activity update inside activity-updater.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
Activity installation/update will be done with the Sugar bundle registry API (jarabe.model.bundleregistry). The activity updater will instantiate its own bundle registry object in its own process.&lt;br /&gt;
&lt;br /&gt;
Sugar will become aware of these events through the way it already watches the filesystem. Ticket #3707 will be fixed as part of this implementation effort so that this is fully reliable.&lt;br /&gt;
&lt;br /&gt;
== Future possibilities ==&lt;br /&gt;
&lt;br /&gt;
* Improve the bundle registry so that it is accessible over dbus and doesn&#039;t need the update service to also create its own registry in memory.&lt;br /&gt;
&lt;br /&gt;
==UI Design==&lt;br /&gt;
&#039;&#039;Does the feature have a direct impact on the work flow, or does it need a UI? Link here mockups, or add detailed descriptions.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&#039;&#039;What other packages (RPMs) depend on this package?  Are there changes outside the developers&#039; control on which completion of this feature depends?  In other words, does your feature depend on completion of another feature owned by someone else or that you would need to coordinate, which might cause you to be unable to finish on time?  Other upstream projects like Python?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Contingency Plan ==&lt;br /&gt;
&#039;&#039;If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as &amp;quot;None necessary, revert to previous release behaviour.&amp;quot;  Or it might not.  If your feature is not completed in time, we want to assure others that other parts of Sugar will not be in jeopardy.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&#039;&#039;Is there upstream documentation on this feature, or notes you have written yourself?  Has this topic been discussed in the mailing list or during a meeting? Link to that material here so other interested developers can get involved.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=82102</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=82102"/>
		<updated>2012-08-09T20:45:06Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|.]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Provide an optional mechanism for automatically and transparently (i.e. in the background) updating activities from a central server.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* Daniel Drake&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This proposal is based around the needs of the OLPC project in Nicaragua, but reflects a common need (current or future) of other OLPC implementations that I have visited.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The problem:&#039;&#039;&#039; Software updates. Previously, the local foundation visited every school at the end of the academic year and reflashed all the laptops, to provide them with a software update. Now the program has expanded to over 20,000 laptops, that is no longer practical nor affordable.&lt;br /&gt;
&lt;br /&gt;
However, there is still an obvious desire to be able to push software updates to the user base. For the operating system, olpc-update is working well enough: the local team has the infrastructure set up to push OS updates through the school server, and the laptops safely update with no user intervention required. But once the XO reboots into a drastically updated OS version, activities often fail to run due to non-backwards-compatible changes at the system level.&lt;br /&gt;
&lt;br /&gt;
Sugar can be instructed to pop up a &amp;quot;you should update your activities&amp;quot; message, offering three buttons, one of which executes the software update section of the control panel, but this has several problems:&lt;br /&gt;
* This message comes up whether or not connectivity is available, but connectivity is definitely required for the process to complete.&lt;br /&gt;
* In my experience, this message provokes a random response from the user. We&#039;re dealing with young children, and this message is somewhat unexpected anyway (the OS update was automatic and transparent).&lt;br /&gt;
* Relying on 20,000 children to all perform this step (only when connectivity is available), which is not even something that occurs very naturally for them, is not something that would bring good results.&lt;br /&gt;
* If the activity update process fails (e.g. no connectivity), the message doesn&#039;t come back again. But activity updating is something absolutely necessary at this point, so it should not give up so easily.&lt;br /&gt;
* It&#039;s something that should be automatic.&lt;br /&gt;
&lt;br /&gt;
The proposed solution is to remove this message and adds an automatic software update feature that runs in the background. This would be off by default, but could be enabled by deployers of Sugar via system configuration.&lt;br /&gt;
&lt;br /&gt;
The activity updater would run periodically, by default once per week. However, after a system upgrade, an &amp;quot;activity upgrade urgent&amp;quot; flag would be set, resulting in Sugar trying to update its activities every time connectivity becomes available until an update completes successfully.&lt;br /&gt;
&lt;br /&gt;
The existing activity updater in the control panel will still remain for if/when the user wants to perform a foreground update on-demand.&lt;br /&gt;
&lt;br /&gt;
It is assumed that the user has good connectivity to the activity server. This means that either a good internet connection is generally available, or that the activities are hosted on a local school server. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
The activities.sugarlabs.org XML interface used by the existing software update control panel section will remain supported, and support for the OLPC activity microformat will also be added. (I envision the latter case to be more useful and common for deployments.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
The long-term problem of Sugar deployers not being able to push automatic system updates that break activity compatibility would be fixed. The Zamora Teran Foundation in Nicaragua will be able to push new software to their users in future.&lt;br /&gt;
&lt;br /&gt;
Other functionalities also become available. For example, currently there is no hands-off way for a Sugar deployer to push a new activity to the existing install-base. But, as this activity update would run automatically once per week, this now becomes easy.&lt;br /&gt;
&lt;br /&gt;
Sugar will gain support for the OLPC activity update microformat which is used in the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;you should update your activities&amp;quot; message, which has been seen as a source of user confusion, will go away.&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&lt;br /&gt;
Upon establishing a network connection, or upon starting with a network connection already established, where the activity updater has been enabled in the configuration, Sugar will examine whether it needs to launch an automatic activity update if the activity-update-urgent flag is set, or if the last update happened beyond a configurable amount of time in the past.&lt;br /&gt;
&lt;br /&gt;
The activity-update-urgent flag is set based on the presence of the file XXX.&lt;br /&gt;
When an update successfully completes, the update time is recorded in the gconf key XXX. The amount of time that passes before an automatic activity update is executed is defined by the gconf key XXX, units in days, default 7, zero means no periodic update.&lt;br /&gt;
&lt;br /&gt;
The activity updater will be enabled in the boolean gconf key XXX (disabled by default). The gconf key XXX will specify which update mechanism to use (ASLO or microformat), and the XXX gconf key will specify the base server URI to use.&lt;br /&gt;
&lt;br /&gt;
The core of the activity updating code (looking for updates, downloading them, installing them) will be moved to a dbus-activated service on the session bus with name XXX. This service, referred to as activity-updater, will automatically exit after 2 minutes of inactivity when no activity updates are ongoing. It will only allow one activity update to happen at a time. The D-Bus API will have the following methods and signals:&lt;br /&gt;
&lt;br /&gt;
* GetStatus(): get the status of the current activity update session (if any). Returns the status code last emitted from the SessionStatus signal, the number of activities that are included in any in-progress update, and the number of activity updates already completed.&lt;br /&gt;
* GetCurrentUpdateStatus(): get information about the current activity being updated: its name, download size, a boolean flag indicating whether the download has completed, and a percentage progress indication (of either the download or the installation).&lt;br /&gt;
* Cancel(): Cancel the ongoing update session, waiting for a safe point before cancelling (e.g. to avoid aborting halfway through installing an activity). This will return immediately but the cancel will not be complete until indicated by the SessionStatus signal.&lt;br /&gt;
* QueryUpdates(): Start a new update session, querying for available activity updates. Returns a list of activities available. Each list entry will have: (bundle_id, URL, download_size, current_installed_version_number, update_version_number).&lt;br /&gt;
* GetDetails(bundle_id): For a given bundle_id already identified as an update, download and return the activity name (localised) and icon.&lt;br /&gt;
* DoUpdate(bundle_id_1, bundle_id_2, ...): For the given bundle_ids already identified as updates, perform the activity update process (download, install).&lt;br /&gt;
* StartAutomaticUpdate(): internally perform QueryUpdates() and then run DoUpdates() on all available updates. Returns immediately.&lt;br /&gt;
&lt;br /&gt;
* Signal ActivityUpdating(bundle_id, download_size, download_completed, progress): Raised when an activity update is started, and then every 10 seconds until it is completed. The download_completed flag indicates whether the activity is downloading or installing, and the progress parameter indicates the percentage of the download or install.&lt;br /&gt;
* Signal ActivityUpdated(bundle_id, success): Raised when an activity update completes, with the success flag indicating success or failure.&lt;br /&gt;
* Signal UpdateCompleted(success): Raised when an update session completes, with a flag indicating whether errors were encountered or not.&lt;br /&gt;
* Signal SessionStatus(status): Raised with a code indicating the status of the activity updater.&lt;br /&gt;
** 0: inactive&lt;br /&gt;
** 1: new session opened, for automatic activity update&lt;br /&gt;
** 2: new session opened, updates have been queried&lt;br /&gt;
** 3: activity download/installation is in progress&lt;br /&gt;
&lt;br /&gt;
This API is intended for internal use only.&lt;br /&gt;
&lt;br /&gt;
When Sugar wants to launch an automatic activity update, it will make a dbus method call to StartAutomaticUpdate(), which will return immediately having kicked off an activity update inside activity-updater.&lt;br /&gt;
&lt;br /&gt;
When the user opens the &amp;quot;Software Update&amp;quot; section of the control panel, the control panel code will attempt to start listening to any ongoing update session. This means that if the user opens the control panel while an automatic update is happening in the background, that update effectively gets moved to the foreground, and the user can keep an eye on what is happening. If the control panel is opened while no update is active, the user will be able to launch a manually-invoked update in the way that the existing activity updater operates.&lt;br /&gt;
&lt;br /&gt;
To update an individual activity, the activity updater will perform the following steps in this order:&lt;br /&gt;
# Download new activity bundle to temporary storage&lt;br /&gt;
# Delete existing activity&lt;br /&gt;
# Install new activity version&lt;br /&gt;
&lt;br /&gt;
This is intended as a compromise between not requiring the amount of disk space needed for two unzipped versions of the activity, and not deleting the existing activity so early that the user is potentially left without the activity for a long time (especially if the download then fails).&lt;br /&gt;
&lt;br /&gt;
Activity installation/deinstallation will be done with the Sugar bundle registry API (jarabe.model.bundleregistry). The activity updater will instantiate its own bundle registry object in its own process.&lt;br /&gt;
&lt;br /&gt;
Sugar will become aware of these events through the way it already watches the filesystem. Ticket #3707 will be fixed as part of this implementation effort so that this is fully reliable.&lt;br /&gt;
&lt;br /&gt;
==UI Design==&lt;br /&gt;
&#039;&#039;Does the feature have a direct impact on the work flow, or does it need a UI? Link here mockups, or add detailed descriptions.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&#039;&#039;What other packages (RPMs) depend on this package?  Are there changes outside the developers&#039; control on which completion of this feature depends?  In other words, does your feature depend on completion of another feature owned by someone else or that you would need to coordinate, which might cause you to be unable to finish on time?  Other upstream projects like Python?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Contingency Plan ==&lt;br /&gt;
&#039;&#039;If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as &amp;quot;None necessary, revert to previous release behaviour.&amp;quot;  Or it might not.  If your feature is not completed in time, we want to assure others that other parts of Sugar will not be in jeopardy.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&#039;&#039;Is there upstream documentation on this feature, or notes you have written yourself?  Has this topic been discussed in the mailing list or during a meeting? Link to that material here so other interested developers can get involved.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=82101</id>
		<title>Features/Automatic activity updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/Automatic_activity_updates&amp;diff=82101"/>
		<updated>2012-08-09T20:40:49Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: Created page with &amp;quot;&amp;lt;noinclude&amp;gt; Category:Feature Page Incomplete . &amp;lt;!-- You can add categories to tie features back to real deployments/schools requesting them, for examp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|.]]&lt;br /&gt;
&amp;lt;!-- You can add categories to tie features back to real deployments/schools requesting them, for example &lt;br /&gt;
[[Category:Features requested by School Xyz|&amp;lt;Feature Name&amp;gt;]] (the |Feature Name option sorts the entry on the category page under the first letter of &amp;lt;Feature Name&amp;gt;). --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comments and Explanations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are comments (in italic) providing guidance to fill out each section, see also the [[Features/Policy|Feature Policy Page]] for a more detailed explanation of the new-feature process. &#039;&#039;&#039;Copy the source to a &#039;&#039;new page&#039;&#039; named Features/&#039;&#039;Your Feature Name&#039;&#039; before making changes!  DO NOT EDIT THIS TEMPLATE.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- All fields on this form are required to be accepted.&lt;br /&gt;
 We also request that you maintain the same order of sections so that all of the feature pages are uniform.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The actual name of your feature page should look something like: Features/Your Feature Name.  This keeps all features in the same namespace --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&#039;&#039;A sentence or two summarizing what this feature is and what it will do. This information is used for the overall feature summary page for each release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
&#039;&#039;This should link to your home wiki page so we know who you are&#039;&#039;&lt;br /&gt;
* Name: [[User:AcountName| Your Name]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Include you email address that you can be reached should people want to contact you about helping with your feature, status is requested, or technical issues need to be resolved&#039;&#039;&lt;br /&gt;
* Email: &amp;lt;your email address so we can contact you, invite you to meetings, etc.&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: (SUGAR_VERSION)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&#039;&#039;Expand on the summary, if appropriate.  A couple of sentences suffices to explain the goal, but the more details you can provide the better.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&#039;&#039;What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new feature, what capabilities does it bring? Why will Sugar become a better platform or project because of this feature?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Make sure to note here as well if this feature has been requested by a specific deployment, or if it has emerged from a bug report.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
&#039;&#039;What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==UI Design==&lt;br /&gt;
&#039;&#039;Does the feature have a direct impact on the work flow, or does it need a UI? Link here mockups, or add detailed descriptions.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== How To Test ==&lt;br /&gt;
{{:{{PAGENAME}}/Testing}}&lt;br /&gt;
== User Experience ==&lt;br /&gt;
&#039;&#039;If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&#039;&#039;What other packages (RPMs) depend on this package?  Are there changes outside the developers&#039; control on which completion of this feature depends?  In other words, does your feature depend on completion of another feature owned by someone else or that you would need to coordinate, which might cause you to be unable to finish on time?  Other upstream projects like Python?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Contingency Plan ==&lt;br /&gt;
&#039;&#039;If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as &amp;quot;None necessary, revert to previous release behaviour.&amp;quot;  Or it might not.  If your feature is not completed in time, we want to assure others that other parts of Sugar will not be in jeopardy.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&#039;&#039;Is there upstream documentation on this feature, or notes you have written yourself?  Has this topic been discussed in the mailing list or during a meeting? Link to that material here so other interested developers can get involved.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&#039;&#039;The Sugar Release Notes inform end-users about what is new in the release. An Example is [[0.84/Notes]]. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the release team and shipped with the release.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] &amp;lt;!-- This adds a link to the &amp;quot;discussion&amp;quot; tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Sugarcamp_SF_2012&amp;diff=82072</id>
		<title>Sugarcamp SF 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Sugarcamp_SF_2012&amp;diff=82072"/>
		<updated>2012-08-08T16:24:10Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Attendees */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SugarCamp++ will be Mon Oct 22 to Wed Oct 24 in San Francisco, immediately following OLPC SF&#039;s global community summit: http://olpcSF.org/summit&lt;br /&gt;
&lt;br /&gt;
Presenting an opportunity for all to begin real hacking &amp;amp; implementation of the tech/learning/organizational ideas exchanged over the weekend summit. Please join &amp;amp; help strengthen collaborative global education!&lt;br /&gt;
&lt;br /&gt;
We strongly welcome new participants. Read up on [http://planet.sugarlabs.org ongoing] [http://planet.laptop.org projects], think about [mailto:volunteer@laptop.org volunteering] with [http://www.sugarlabs.org Sugar Labs] and [http://one.laptop.org OLPC], open your imagination to what open-learning-for-all might become, and put yourself [http://olpcMAP.net on the map] :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
http://olpcsf.org/sites/default/files/u8/red_xo_in_sf_fog_2012.jpg&lt;br /&gt;
&lt;br /&gt;
= Topics =&lt;br /&gt;
&lt;br /&gt;
Please add project topics below if you will give them legs :)&lt;br /&gt;
&lt;br /&gt;
* [http://cananian.livejournal.com/66654.html XOrduino], Curricular Arcs, Streamlined Teacher Training&lt;br /&gt;
* [http://lists.laptop.org/pipermail/server-devel/2012-August/006126.html School Server Community Edition] (hassle-free [http://ChildrensLibrary.org ICDL], Yes We [http://khanAcademy.org Khan], etc)&lt;br /&gt;
* [http://lists.sugarlabs.org/archive/sugar-devel/2012-August/thread.html#38829 Sugar 0.98 &amp;amp; 1.0 and what lies beyond] (vs Windows 8 releasing Fri Oct 26 ;)&lt;br /&gt;
* Hackers Without Borders, Feedback from Small/Medium-sized Deployments, [http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-05-30T21:08:10 NewCo], [http://wiki.laptop.org/go/ALEARN_Network ALEARN]&lt;br /&gt;
* Documentation within Sugar; Video Tutorials; Books/Histories of OLPC/Sugar&lt;br /&gt;
* Power Infrastructure: developing countries&#039; schools need what??&lt;br /&gt;
&lt;br /&gt;
= Relevant SF Communities =&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Noisebridge Award-winning] anarchistic SF educational hackerspace: http://Noisebridge.net&lt;br /&gt;
* Silicon Valley-San Francisco Bay Area Python Interest Group, meets Oct 25: http://BayPIGgies.net&lt;br /&gt;
&lt;br /&gt;
= Attendees =&lt;br /&gt;
&lt;br /&gt;
Please add your name if you will come &amp;amp; contribute to the future of Sugar/OLPC or similar -- include 2 words about your preferred project:&lt;br /&gt;
&lt;br /&gt;
* Adam Holt, Boston&lt;br /&gt;
* Alex Kleider, SF - XS Community Edition&lt;br /&gt;
* Bastien Guerry? Paris - XS Community Edition?&lt;br /&gt;
* Bernie Innocenti, Boston&lt;br /&gt;
* Bill Stelzer? US Virgin Islands&lt;br /&gt;
* Caryl Bigenho? Los Angeles&lt;br /&gt;
* Christoph Derndorfer, Vienna&lt;br /&gt;
* Craig Perue, Jamaica - Curricular Arcs&lt;br /&gt;
* CScott Ananian? Boston - [http://cananian.livejournal.com/66654.html XOrduino?]&lt;br /&gt;
* Daniel Drake, Nicaragua (will attend but not sure which days)&lt;br /&gt;
* Gary Martin? Scotland&lt;br /&gt;
* George Hunt, NYC - XS Community Edition&lt;br /&gt;
* Jerry Vonau? Winnipeg - XS Community Edition?&lt;br /&gt;
* Kevin Gordon, Toronto/Kenya&lt;br /&gt;
* Mark Battley? Toronto/Kenya - Curricular Arcs&lt;br /&gt;
* Mitch Seaton? Philippines/Australia/Denmark&lt;br /&gt;
* Nancie Severs? New Hampshire&lt;br /&gt;
* Nick Doiron? SF&lt;br /&gt;
* Sameer Verma, SF&lt;br /&gt;
* Simon Schampijer? Berlin&lt;br /&gt;
* Tony Anderson, Rwanda - Karma Learning System, XS Community Edition?&lt;br /&gt;
* Walter Bender, Boston&lt;br /&gt;
* Yoshiki Ohshima? Los Angeles&lt;br /&gt;
&lt;br /&gt;
= Location =&lt;br /&gt;
&lt;br /&gt;
UNCONFIRMED BUT LIKELY:&lt;br /&gt;
&lt;br /&gt;
 San Francisco State University&amp;lt;br&amp;gt;&lt;br /&gt;
 835 Market St, 5th Floor &amp;lt;b&amp;gt;(go downtown, NOT main campus!)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 San Francisco, CA 94103&lt;br /&gt;
&lt;br /&gt;
In a modern classroom (or possibly 2!) Oct 22-24, most business hours and possibly Mon/Tue early evenings.  Nearby pubs will be well-used evenings too.&lt;br /&gt;
&lt;br /&gt;
Cost will be kept to an absolute minimum (possibly free, thanks to the amazing generosity of SFSU) with reliable Wifi included -- lunch/dinner available for purchase downstairs at the large Food Court.&lt;br /&gt;
&lt;br /&gt;
Note the weekend&#039;s [http://olpcSF.org/summit Oct 19-21 Community Summit] itself (structured talks etc, you don&#039;t want to miss) typically costs about $40/person to pay for room rental, supplies etc. That price would be an order of magnitude higher if it weren&#039;t for the astonishing volunteer efforts of the http://olpsSF.org community.&lt;br /&gt;
&lt;br /&gt;
= Accommodations =&lt;br /&gt;
&lt;br /&gt;
San Francisco is not cheap, but great hostels are available if you book them early.  Please write to the olpc-sf@lists.laptop.org public mailing list for tips, so you can get to know &amp;amp; stay nearby others: http://lists.laptop.org/listinfo/olpc-sf&lt;br /&gt;
&lt;br /&gt;
= Suggestions =&lt;br /&gt;
&lt;br /&gt;
Most welcome (register &amp;amp; click Edit above!) &amp;amp; also here: http://wiki.sugarlabs.org/go/Talk:Sugarcamp_SF_2012&lt;br /&gt;
&lt;br /&gt;
Please also join the [http://lists.laptop.org/listinfo/olpc-sf olpc-sf public mailing list] if you&#039;d like to volunteer making this event an important if not historic contribution to global collaborative learning, thanks!  You may also write privately to Adam Holt if you prefer: &amp;lt;b&amp;gt;holt @ laptop.org&amp;lt;/b&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=77418</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=77418"/>
		<updated>2012-04-17T14:33:04Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== Custom Icon cell renderer ===&lt;br /&gt;
&lt;br /&gt;
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;br /&gt;
&lt;br /&gt;
=== xklavier ===&lt;br /&gt;
&lt;br /&gt;
python-xklavier is based on pygtk codegen, we can probably just drop the link to pygtk, but failing that, we will need introspection bindings.&lt;br /&gt;
&lt;br /&gt;
=== gdk_property_get ===&lt;br /&gt;
&lt;br /&gt;
Not working:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def _property_get_trapped(window, prop, prop_type):&lt;br /&gt;
    Gdk.error_trap_push()&lt;br /&gt;
&lt;br /&gt;
    prop_atom = Gdk.Atom.intern(prop, False)&lt;br /&gt;
    type_atom = Gdk.Atom.intern(prop_type, False)&lt;br /&gt;
&lt;br /&gt;
    logging.warning(&amp;quot;get prop %s %s %s&amp;quot;, window, prop_atom, type_atom)&lt;br /&gt;
    prop_info = Gdk.property_get(window, prop_atom, type_atom, 0, 9999, False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 TypeError: Could not caller allocate argument 6 of callable property_get&lt;br /&gt;
&lt;br /&gt;
=== ActivityIcon.do_draw never called ===&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00013.html filed as https://bugzilla.gnome.org/show_bug.cgi?id=672864&lt;br /&gt;
&lt;br /&gt;
=== Port hardcoded styles to the CSS stylesheet ===&lt;br /&gt;
&lt;br /&gt;
For example in sugar/extensions/cpsection/network/view.py we have things like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        label_server = gtk.Label(_(&#039;Server:&#039;))&lt;br /&gt;
        label_server.set_alignment(1, 0.5)&lt;br /&gt;
        label_server.modify_fg(gtk.STATE_NORMAL,&lt;br /&gt;
                               style.COLOR_SELECTION_GREY.get_gdk_color())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Palettes can&#039;t include menu and widgets at the same time ===&lt;br /&gt;
&lt;br /&gt;
We can use anything like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class SugarMenuItem(gtk.EventBox):&lt;br /&gt;
&lt;br /&gt;
    __gsignals__ = {&lt;br /&gt;
        &#039;clicked&#039;: (gobject.SIGNAL_RUN_FIRST, None, [])&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, icon_name, label_text):&lt;br /&gt;
        gtk.EventBox.__init__(self)&lt;br /&gt;
        self._sensitive = True&lt;br /&gt;
        vbox = gtk.VBox()&lt;br /&gt;
        hbox = gtk.HBox()&lt;br /&gt;
        vbox.set_border_width(style.DEFAULT_PADDING)&lt;br /&gt;
        self.icon = Icon()&lt;br /&gt;
        self.icon.props.icon_name = icon_name&lt;br /&gt;
        hbox.pack_start(self.icon, expand=False, fill=False,&lt;br /&gt;
                padding=style.DEFAULT_PADDING)&lt;br /&gt;
        align = gtk.Alignment(xalign=0.0, yalign=0.5, xscale=0.0, yscale=0.0)&lt;br /&gt;
        text = &#039;&amp;lt;span foreground=&amp;quot;%s&amp;quot;&amp;gt;&#039; % style.COLOR_WHITE.get_html() + \&lt;br /&gt;
                    label_text + &#039;&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
        self.label = gtk.Label()&lt;br /&gt;
        self.label.set_use_markup(True)&lt;br /&gt;
        self.label.set_markup(text)&lt;br /&gt;
        align.add(self.label)&lt;br /&gt;
        hbox.pack_start(align, expand=True, fill=True,&lt;br /&gt;
                padding=style.DEFAULT_PADDING)&lt;br /&gt;
        vbox.pack_start(hbox, expand=False, fill=False,&lt;br /&gt;
                padding=style.DEFAULT_PADDING)&lt;br /&gt;
        self.add(vbox)&lt;br /&gt;
        self.id_bt_release_cb = self.connect(&#039;button-release-event&#039;,&lt;br /&gt;
                self.__button_release_cb)&lt;br /&gt;
        self.id_enter_notify_cb = self.connect(&#039;enter-notify-event&#039;,&lt;br /&gt;
                self.__enter_notify_cb)&lt;br /&gt;
        self.id_leave_notify_cb = self.connect(&#039;leave-notify-event&#039;,&lt;br /&gt;
                self.__leave_notify_cb)&lt;br /&gt;
        self.modify_bg(gtk.STATE_NORMAL, style.COLOR_BLACK.get_gdk_color())&lt;br /&gt;
        self.show_all()&lt;br /&gt;
        self.set_above_child(True)&lt;br /&gt;
&lt;br /&gt;
    def __button_release_cb(self, widget, event):&lt;br /&gt;
        self.emit(&#039;clicked&#039;)&lt;br /&gt;
&lt;br /&gt;
    def __enter_notify_cb(self, widget, event):&lt;br /&gt;
        self.modify_bg(gtk.STATE_NORMAL,&lt;br /&gt;
                style.COLOR_BUTTON_GREY.get_gdk_color())&lt;br /&gt;
&lt;br /&gt;
    def __leave_notify_cb(self, widget, event):&lt;br /&gt;
        self.modify_bg(gtk.STATE_NORMAL, style.COLOR_BLACK.get_gdk_color())&lt;br /&gt;
&lt;br /&gt;
    def set_icon(self, icon_name):&lt;br /&gt;
        self.icon.props.icon_name = icon_name&lt;br /&gt;
&lt;br /&gt;
    def set_label(self, label_text):&lt;br /&gt;
        text = &#039;&amp;lt;span foreground=&amp;quot;%s&amp;quot;&amp;gt;&#039; % style.COLOR_WHITE.get_html() + \&lt;br /&gt;
                    label_text + &#039;&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
        self.label.set_markup(text)&lt;br /&gt;
&lt;br /&gt;
    def set_sensitive(self, sensitive):&lt;br /&gt;
        if self._sensitive == sensitive:&lt;br /&gt;
            return&lt;br /&gt;
&lt;br /&gt;
        self._sensitive = sensitive&lt;br /&gt;
        if sensitive:&lt;br /&gt;
            self.handler_unblock(self.id_bt_release_cb)&lt;br /&gt;
            self.handler_unblock(self.id_enter_notify_cb)&lt;br /&gt;
            self.handler_unblock(self.id_leave_notify_cb)&lt;br /&gt;
        else:&lt;br /&gt;
            self.handler_block(self.id_bt_release_cb)&lt;br /&gt;
            self.handler_block(self.id_enter_notify_cb)&lt;br /&gt;
            self.handler_block(self.id_leave_notify_cb)&lt;br /&gt;
            self.modify_bg(gtk.STATE_NORMAL, style.COLOR_BLACK.get_gdk_color())&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add them to a vbox:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        # TODO: private!!!&lt;br /&gt;
        self._content.set_border_width(0)&lt;br /&gt;
 &lt;br /&gt;
        self._play_pause_button = SugarMenuItem(&#039;player_play&#039;,&lt;br /&gt;
                _(&#039;Say selected text&#039;))&lt;br /&gt;
        self._play_pause_button.connect(&#039;clicked&#039;, self.__play_clicked_cb)&lt;br /&gt;
        vbox_menu.add(self._play_pause_button)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do the SegurMenuItem take all the width in the palette, we need set the border_width in _content to zero,&lt;br /&gt;
but that is a private member. Then we need to look if we add a method to set the it, &lt;br /&gt;
or change the api to make the first container (where is the menu today) useful for other type of widgets.&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t call gdk_window_set_user_data() ===&lt;br /&gt;
&lt;br /&gt;
http://mail.gnome.org/archives/python-hackers-list/2011-September/msg00006.html&lt;br /&gt;
&lt;br /&gt;
=== A handful of NMClient issues ===&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-August/msg00003.html and the other posts in the thread. Some problems resolved, some probably still pending.&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Release/Modules&amp;diff=72966</id>
		<title>Development Team/Release/Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Release/Modules&amp;diff=72966"/>
		<updated>2011-12-13T19:36:16Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;[[Category:Development Team]]&lt;br /&gt;
&#039;&#039;&#039;See also&#039;&#039;&#039; [[:Category:Platform Cycle]].&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Bug Tracking&#039;&#039;&#039;: http://bugs.sugarlabs.org/&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Home page&#039;&#039;&#039;: http://sugarlabs.org/&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
== Glucose ==&lt;br /&gt;
:&amp;lt;span style=&amp;quot;font-size: 150%&amp;quot;&amp;gt;(Core modules)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Module&lt;br /&gt;
!Lead Maintainer&lt;br /&gt;
!Co-maintainers&lt;br /&gt;
!Code Repository&lt;br /&gt;
|-&lt;br /&gt;
|sugar&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|[[User:Alsroot|Aleksey Lim]] (Journal) &amp;lt;br&amp;gt; [[User:MartinDengler|Martin Dengler]]&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar&lt;br /&gt;
|-&lt;br /&gt;
|sugar-base&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|[[User:MartinDengler|Martin Dengler]]&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar-base&lt;br /&gt;
|-&lt;br /&gt;
|sugar-datastore&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar-datastore&lt;br /&gt;
|-&lt;br /&gt;
|sugar-presence-service&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|[[User:Cassidy|Guillaume Desmottes]]&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar-presence-service&lt;br /&gt;
|-&lt;br /&gt;
|sugar-toolkit&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|[[User:MartinDengler|Martin Dengler]] &amp;lt;br&amp;gt; [[User:Alsroot|Aleksey Lim]]&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar-toolkit&lt;br /&gt;
|-&lt;br /&gt;
|sugar-toolkit-gtk3&lt;br /&gt;
|[[User:DanielDrake|Daniel Drake]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar-toolkit-gtk3&lt;br /&gt;
|-&lt;br /&gt;
|sugar-artwork&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]] &amp;lt;br&amp;gt; [[User:BenjaminBerg|Benjamin Berg]]&lt;br /&gt;
|[[User:Erikos|Simon Schampijer]] &amp;lt;br&amp;gt; [[User:Garycmartin|Gary C. Martin]]&lt;br /&gt;
|http://git.sugarlabs.org/projects/sugar-artwork&lt;br /&gt;
|-&lt;br /&gt;
|hulahop&lt;br /&gt;
|[[User:sascha_silbe|Sascha Silbe]] &amp;lt;br&amp;gt; [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
|&lt;br /&gt;
|http://git.sugarlabs.org/projects/hulahop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Fructose ==&lt;br /&gt;
:&amp;lt;span style=&amp;quot;font-size: 150%&amp;quot;&amp;gt;(Base activities)&amp;lt;/span&amp;gt;&lt;br /&gt;
===Chat===&lt;br /&gt;
:Lead Maintainer: unmaintained&lt;br /&gt;
:Co-maintainers: [[User:Alsroot|Aleksey Lim]]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/chat&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Chat, [[Activities/Chat]]&lt;br /&gt;
&lt;br /&gt;
===Browse===&lt;br /&gt;
:Lead Maintainer: [[User:Lucian|Lucian Branescu Mihaila]], [[User:sascha_silbe|Sascha Silbe]]&lt;br /&gt;
:Co-maintainers: &lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/browse&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [https://bugs.sugarlabs.org/query?status=accepted&amp;amp;status=assigned&amp;amp;status=new&amp;amp;status=reopened&amp;amp;component=Browse bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Browse, [[Activities/Browse]]&lt;br /&gt;
&lt;br /&gt;
===Read===&lt;br /&gt;
:Lead Maintainer: [http://sayamindu.randomink.org/ Sayamindu Dasgupta]&lt;br /&gt;
:Co-maintainers: [[User:Erikos|Simon Schampijer]]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/read&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Read, [[Activities/Read]]&lt;br /&gt;
&lt;br /&gt;
===Calculate===&lt;br /&gt;
:Lead Maintainer: Reinier Heeres&lt;br /&gt;
:Co-maintainers: &lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/calculate&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Calculate, [[Activities/Calculate]]&lt;br /&gt;
&lt;br /&gt;
===Log===&lt;br /&gt;
:Lead Maintainer: unmaintained&lt;br /&gt;
:Co-maintainers: [http://edsiper.linuxchile.cl Eduardo Silva], [[User:Alsroot|Aleksey Lim]]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/log&lt;br /&gt;
:Release tarballs:http://download.sugarlabs.org/sources/sucrose/fructose/Log/&lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Log&lt;br /&gt;
&lt;br /&gt;
===Write===&lt;br /&gt;
:Lead Maintainer: [http://uwog.net/ J.M. Maurer]&lt;br /&gt;
:Co-maintainers: [http://msevior.livejournal.com/ Martin Sevior]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/write&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Write, [[Activities/Write]]&lt;br /&gt;
&lt;br /&gt;
===Terminal===&lt;br /&gt;
:Lead Maintainer: [http://git.sugarlabs.org/projects/terminal/repos/mainline/blobs/master/MAINTAINERS MAINTAINERS], [http://sayamindu.randomink.org/ Sayamindu Dasgupta]&lt;br /&gt;
:Co-maintainers: [http://edsiper.linuxchile.cl Eduardo Silva], [[User:Wade|Wade Brainerd]]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/terminal&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Terminal, [[Activities/Terminal]]&lt;br /&gt;
&lt;br /&gt;
===Pippy===&lt;br /&gt;
:Lead Maintainer: [http://git.sugarlabs.org/projects/pippy/repos/mainline/blobs/master/MAINTAINERS MAINTAINERS], [[User:m_anish|Anish Mangal]]&lt;br /&gt;
:Co-maintainers: [[User:Cjb|Chris Ball]], [http://cscott.net C. Scott Ananian], [[User:Quozl|James Cameron]]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/pippy&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Pippy, [[Activities/Pippy]]&lt;br /&gt;
&lt;br /&gt;
===Etoys===&lt;br /&gt;
:Lead Maintainer: [[User:Bert|Bert Freudenberg]]&lt;br /&gt;
:Co-maintainers: Squeakland developers&lt;br /&gt;
:Code Repository: http://dev.laptop.org/git/projects/etoys/ and http://etoys.laptop.org/svn/trunk/etoys/&lt;br /&gt;
:Release tarballs: http://download.sugarlabs.org/sources/sucrose/glucose/etoys/&lt;br /&gt;
:Bug Tracking: http://tracker.squeakland.org/&lt;br /&gt;
:Home page: http://www.squeakland.org/&lt;br /&gt;
&lt;br /&gt;
===Etoys-activity===&lt;br /&gt;
:Lead Maintainer: [[User:Bert|Bert Freudenberg]]&lt;br /&gt;
:Co-maintainers: Squeakland developers&lt;br /&gt;
:Code Repository: http://dev.laptop.org/git/projects/etoys/&lt;br /&gt;
:Release tarballs: http://download.sugarlabs.org/sources/sucrose/fructose/Etoys/&lt;br /&gt;
:Bug Tracking: http://tracker.squeakland.org/&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Etoys, [[Activities/Etoys]]&lt;br /&gt;
&lt;br /&gt;
===Imageviewer===&lt;br /&gt;
:Lead Maintainer: [http://sayamindu.randomink.org/ Sayamindu Dasgupta]&lt;br /&gt;
:Co-maintainers: [[User:Alsroot|Aleksey Lim]]&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/imageviewer&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Image Viewer&lt;br /&gt;
&lt;br /&gt;
===Jukebox===&lt;br /&gt;
:Lead Maintainer: [http://kushaldas.in Kushal Das]&lt;br /&gt;
:Co-maintainers:&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/jukebox&lt;br /&gt;
:Release tarballs: &lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org/ bugs.sl.o]&lt;br /&gt;
:Home page: http://wiki.laptop.org/go/Jukebox&lt;br /&gt;
&lt;br /&gt;
===Turtleart===&lt;br /&gt;
:Lead Maintainer: [[User:Walter|Walter Bender]]&lt;br /&gt;
:Co-maintainers: Raúl Gutiérrez Segalés &amp;lt;br&amp;gt;&lt;br /&gt;
:Code Repository: http://git.sugarlabs.org/projects/turtleart&lt;br /&gt;
:Release tarballs: http://download.sugarlabs.org/sources/sucrose/fructose/TurtleArt/&lt;br /&gt;
:Bug Tracking: [http://bugs.sugarlabs.org bugs.sl.o] &amp;lt;br&amp;gt;&lt;br /&gt;
:Home page: [[Activities/Turtle Art]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72873</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72873"/>
		<updated>2011-12-12T15:18:50Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== Custom Icon cell renderer ===&lt;br /&gt;
&lt;br /&gt;
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;br /&gt;
&lt;br /&gt;
=== xklavier ===&lt;br /&gt;
&lt;br /&gt;
python-xklavier is based on pygtk codegen, we can probably just drop the link to pygtk, but failing that, we will need introspection bindings.&lt;br /&gt;
&lt;br /&gt;
=== gdk_property_get ===&lt;br /&gt;
&lt;br /&gt;
Not working:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def _property_get_trapped(window, prop, prop_type):&lt;br /&gt;
    Gdk.error_trap_push()&lt;br /&gt;
&lt;br /&gt;
    prop_atom = Gdk.Atom.intern(prop, False)&lt;br /&gt;
    type_atom = Gdk.Atom.intern(prop_type, False)&lt;br /&gt;
&lt;br /&gt;
    logging.warning(&amp;quot;get prop %s %s %s&amp;quot;, window, prop_atom, type_atom)&lt;br /&gt;
    prop_info = Gdk.property_get(window, prop_atom, type_atom, 0, 9999, False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 TypeError: Could not caller allocate argument 6 of callable property_get&lt;br /&gt;
&lt;br /&gt;
=== ActivityIcon.do_draw never called ===&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00013.html&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72843</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72843"/>
		<updated>2011-12-12T00:14:39Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== Custom Icon cell renderer ===&lt;br /&gt;
&lt;br /&gt;
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;br /&gt;
&lt;br /&gt;
=== xklavier ===&lt;br /&gt;
&lt;br /&gt;
python-xklavier is based on pygtk codegen, we can probably just drop the link to pygtk, but failing that, we will need introspection bindings.&lt;br /&gt;
&lt;br /&gt;
=== gdk_property_get ===&lt;br /&gt;
&lt;br /&gt;
Not working:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def _property_get_trapped(window, prop, prop_type):&lt;br /&gt;
    Gdk.error_trap_push()&lt;br /&gt;
&lt;br /&gt;
    prop_atom = Gdk.Atom.intern(prop, False)&lt;br /&gt;
    type_atom = Gdk.Atom.intern(prop_type, False)&lt;br /&gt;
&lt;br /&gt;
    logging.warning(&amp;quot;get prop %s %s %s&amp;quot;, window, prop_atom, type_atom)&lt;br /&gt;
    prop_info = Gdk.property_get(window, prop_atom, type_atom, 0, 9999, False)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 TypeError: Could not caller allocate argument 6 of callable property_get&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72838</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72838"/>
		<updated>2011-12-11T22:38:19Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== Custom Icon cell renderer ===&lt;br /&gt;
&lt;br /&gt;
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;br /&gt;
&lt;br /&gt;
=== xklavier ===&lt;br /&gt;
&lt;br /&gt;
python-xklavier is based on pygtk codegen, we can probably just drop the link to pygtk, but failing that, we will need introspection bindings.&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72836</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72836"/>
		<updated>2011-12-11T22:28:45Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== Custom Icon cell renderer ===&lt;br /&gt;
&lt;br /&gt;
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72833</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72833"/>
		<updated>2011-12-11T22:09:02Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== missing &amp;quot;destroy&amp;quot; signals in a couple of places ===&lt;br /&gt;
&lt;br /&gt;
e.g. GtkCellRenderer&lt;br /&gt;
&lt;br /&gt;
not really sure why.&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72830</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72830"/>
		<updated>2011-12-11T21:49:39Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* cant call gdkwindow.raise() */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== gconf_client_get_list marked (skip) ===&lt;br /&gt;
&lt;br /&gt;
Not available to pygi.&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== missing &amp;quot;destroy&amp;quot; signals in a couple of places ===&lt;br /&gt;
&lt;br /&gt;
e.g. GtkCellRenderer&lt;br /&gt;
&lt;br /&gt;
not really sure why.&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;br /&gt;
&lt;br /&gt;
See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00011.html&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72829</id>
		<title>Features/GTK3/Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Shell&amp;diff=72829"/>
		<updated>2011-12-11T21:40:45Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: Created page with &amp;quot;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:  === Custom tree model for journal ===  Having trouble...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:&lt;br /&gt;
&lt;br /&gt;
=== Custom tree model for journal ===&lt;br /&gt;
&lt;br /&gt;
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html&lt;br /&gt;
&lt;br /&gt;
=== gconf_client_get_list marked (skip) ===&lt;br /&gt;
&lt;br /&gt;
Not available to pygi.&lt;br /&gt;
&lt;br /&gt;
=== do_forall not working in pygobject ===&lt;br /&gt;
Needs:&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection not yet merged&lt;br /&gt;
* https://bugzilla.gnome.org/show_bug.cgi?id=644926 pygobject missing header file in patch. not yet merged&lt;br /&gt;
&lt;br /&gt;
=== missing &amp;quot;destroy&amp;quot; signals in a couple of places ===&lt;br /&gt;
&lt;br /&gt;
e.g. GtkCellRenderer&lt;br /&gt;
&lt;br /&gt;
not really sure why.&lt;br /&gt;
&lt;br /&gt;
=== cant call gdkwindow.raise() ===&lt;br /&gt;
&lt;br /&gt;
raise is reserved word in Python.&lt;br /&gt;
Workaround: getattr(win, &#039;raise&#039;)()&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=72722</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=72722"/>
		<updated>2011-12-09T20:39:07Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - branch &#039;master&#039;: this is the GTK3 port of sugar-toolkit&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - branch &#039;sucrose-0.94&#039;: the GTK2 version of sugar-toolkit needs a handful of structure changes prompted by our GTK3 work. They are being committed here.&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar/sugar-gtk3 - branch &#039;master&#039;: we are not (yet) porting the sugar shell to GTK3, but a handful of structural changes are needed.&lt;br /&gt;
* &amp;lt;s&amp;gt;http://git.sugarlabs.org/sugar-artwork - branch &#039;gtk3&#039;: mainline sugar-artwork repo containing the new theme work (folder GTK3)&amp;lt;/s&amp;gt;&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-artwork/gtk3 - branch gtk3: now being used instead of the above artwork repo&lt;br /&gt;
* http://git.sugarlabs.org/~dsd/browse/browse-gtk3 - branch &#039;master&#039;: Browse port to GTK3&lt;br /&gt;
* http://git.sugarlabs.org/hello-world - branch &#039;master&#039;: hello-world ported to GTK3&lt;br /&gt;
* http://cgit.collabora.com/git/user/rgs/abacus-gtk3/ - branch &#039;master&#039;: Abacus ported to GTK3 and to use cairo for drawing&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Compile/install a fixed pygobject with [https://bugzilla.gnome.org/show_bug.cgi?id=662994 this chain-up fix]. F16 build available from http://koji.fedoraproject.org/koji/taskinfo?taskID=3473257&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch and build the new GTK3 based sugar toolkit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./sugar-jhbuild build sugar-toolkit-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sugar-toolkit gtk2 version needs some modifications for some restructuring that gtk3 work has prompted. Check out our branch where this happens;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-toolkit&lt;br /&gt;
git remote add -f gtk2-mods-for-gtk3 git://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3.git&lt;br /&gt;
git checkout -b gtk2-mods-for-gtk3 gtk2-mods-for-gtk3/sucrose-0.94&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And similarly for sugar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar&lt;br /&gt;
git remote add -f erikos-gtk3 git://git.sugarlabs.org/~erikos/sugar/sugar-gtk3.git&lt;br /&gt;
git checkout -b gtk3 erikos-gtk3/master&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And for sugar-artwork:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git remote add -f erikos-gtk3  git://git.sugarlabs.org/~erikos/sugar-artwork/gtk3.git&lt;br /&gt;
git checkout -b gtk3 erikos-gtk3/master&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pending upstream work ==&lt;br /&gt;
&lt;br /&gt;
All of these have been worked around (or will be worked around) for now, at the sugar level.&lt;br /&gt;
&lt;br /&gt;
* gobject introspection bindings for librsvg: https://bugzilla.gnome.org/show_bug.cgi?id=663049 &#039;&#039;Solved: fix has been pushed to librsvg master in http://git.gnome.org/browse/librsvg/&#039;&#039;, is in  2.35.0&lt;br /&gt;
** related gobject-introspection fix for libxml2 https://bugzilla.gnome.org/show_bug.cgi?id=663048 &#039;&#039;Solved: fix has been pushed to gobject introspection 42e9ea858c454646ecf5d4b9579ea7a2ce4192fd&#039;&#039;&lt;br /&gt;
* enable GDK introspection access to X11 window properties: https://bugzilla.gnome.org/show_bug.cgi?id=663261. [http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3/commit/c22ec39980f47e78f2341da54f13324333e3d2f0 current workaround patch in sugar-toolkit ] (Raul)  &lt;br /&gt;
* extend gio mime type API so that we can drop our xdgmime copy (e.g. need to be able to get default file extension for a given mime type)&lt;br /&gt;
* chaining up in vfuncs: https://bugzilla.gnome.org/show_bug.cgi?id=662994 &#039;&#039;Solved: fix has been pushed to pygobject master  http://git.gnome.org/browse/pygobject/commit/?id=2fd3aa9d4ca0906a5e609845ee500ba72e358f94&#039;&#039;&lt;br /&gt;
* implementing GtkContainer::forall: https://bugzilla.gnome.org/show_bug.cgi?id=644926, also needs https://bugzilla.gnome.org/show_bug.cgi?id=663052&lt;br /&gt;
* missing parts in pango introspection, [https://bugzilla.gnome.org/show_bug.cgi?id=646788 646788] does contain what we need (there are quite a few introspection related pango bugs open atm, from a quick look I found  https://bugzilla.gnome.org/show_bug.cgi?id=660070, https://bugzilla.gnome.org/show_bug.cgi?id=627973, https://bugzilla.gnome.org/show_bug.cgi?id=645792, https://bugzilla.gnome.org/show_bug.cgi?id=645871, https://bugzilla.gnome.org/show_bug.cgi?id=646788 even with patches attached already for a while)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70977</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70977"/>
		<updated>2011-11-10T18:03:19Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Porting an exisiting activity to GTK3=&lt;br /&gt;
In this guide we will handle the porting of the an existing activity from using GTK2 to use GTK3. Furthermore we will show you what changes you need to do to make usage of the new sugar toolkit that uses now GTK3 as well. In this guide we will use the [http://git.sugarlabs.org/hello-world hello-world] activity as a simple example.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
Before you start porting your activity you are encouraged to branch off a stable branch. This will allow you to keep on doing stable releases on the stable branch and new releases on the master branch.&lt;br /&gt;
&lt;br /&gt;
The latest release was version 3. We highly recommend that you use the &#039;sugar-0.94&#039; as the stable branch name because this will keep the repositories consistent and eases the development work. In git you can create a branch like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has created a local branch. You can show the result by running &#039;git branch&#039;, you should see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch&lt;br /&gt;
* master&lt;br /&gt;
  sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;sugar-0.94&#039; branch is only locally available so far which can be seen by running &#039;git branch -r&#039; which shows the remote branches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only branch available besides the master branch is the &#039;sucrose-0.84&#039; branch. Let&#039;s push now our new branch to the remote repository to make it available for others:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git push origin sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch is now listed as a remote branch. You can verify as well on your [http://git.sugarlabs.org/hello-world/mainline gitorious page].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
  origin/sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can switch now between those branches using &#039;git checkout &amp;lt;branch&amp;gt;&#039;. And you can use &#039;git branch&#039; to see which branch you are on (the one with the * before is the branch you are currently on).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout sugar-0.94&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cleanup, adopt to API changes in the sugar-toolkit==&lt;br /&gt;
&#039;&#039;This should be done only on the master branch&#039;&#039;! In the new sugar-toolkit we have removed old API, you should adjust your activity accordingly:&lt;br /&gt;
* the keep button has been removed completely&lt;br /&gt;
* the old-style toolbar has been removed&lt;br /&gt;
&lt;br /&gt;
==Port the activity from GTK-2 to GTK-3==&lt;br /&gt;
The first thing that changes is the importing instruction for GTK,&lt;br /&gt;
&amp;lt;pre&amp;gt;import gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
has to be replaced by&lt;br /&gt;
&amp;lt;pre&amp;gt;from gi.repository import Gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you have to change each call that involves Gtk, for example creating a button will look now like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;button = Gtk.Button()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple hello world program in GTK-3 does look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from gi.repository import Gtk&lt;br /&gt;
&lt;br /&gt;
def _destroy_cb(widget, data=None):&lt;br /&gt;
    Gtk.main_quit()&lt;br /&gt;
&lt;br /&gt;
w = Gtk.Window()&lt;br /&gt;
w.connect(&amp;quot;destroy&amp;quot;, _destroy_cb)&lt;br /&gt;
label = Gtk.Label(&#039;Hello World!&#039;)&lt;br /&gt;
w.add(label)&lt;br /&gt;
w.show_all()&lt;br /&gt;
&lt;br /&gt;
Gtk.main()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For porting your activity you do have to change your calls for accesing widgets and services in the new GTK3 sugar-toolkit as well. The new namespace is called sugar3, trying to reflect that GTK3 is the underlying technology. For example the import of the base activity class has to be changed from&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar3.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes that were needed to port the hello-world activity can be seen in [http://git.sugarlabs.org/hello-world/mainline/commit/508e1c518b56cbde5508e560c8a2ff38a3518583 this commit].&lt;br /&gt;
&lt;br /&gt;
Ok, let&#039;s do these changes now for your activity. Make sure you are in your master branch using the &#039;git branch&#039; command (the master branch should have a &#039;*&#039; before it). Make your changes, commit them (&#039;git commit -a&#039;) and push them to the remote repository (&#039;git push origin master&#039;).&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide]. &lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Constructor considerations ===&lt;br /&gt;
&lt;br /&gt;
With PyGI it is possible to use Python-like constructors, or &amp;quot;new&amp;quot; functions e.g. the following are (usually) equivalent:&lt;br /&gt;
 label = Gtk.Button()&lt;br /&gt;
 label = Gtk.Button.new()&lt;br /&gt;
&lt;br /&gt;
However, the first form is preferred: it is more Python-like. Internally, the difference is that Gtk.Label.new() translates to a call to gtk_label_new(), whereas Gtk.Label() (the preferred form) will directly construct an instance of GtkLabel at the GObject level.&lt;br /&gt;
&lt;br /&gt;
If the constructor takes parameters, they &#039;&#039;&#039;must&#039;&#039;&#039; be named. The parameters correspond to GObject properties in the API documentation which are usually marked as &amp;quot;Construct&amp;quot;. For example, the following code will not work:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The (confusing) error is:&lt;br /&gt;
 TypeError: GObject.__init__() takes exactly 0 arguments (1 given)&lt;br /&gt;
&lt;br /&gt;
The solution is to go to the [http://developer.gnome.org/gtk3/3.2/GtkExpander.html#GtkExpander.properties GtkExpander API documentation] and find the appropriate property that we wish to set. In this case it is &amp;lt;b&amp;gt;label&amp;lt;/b&amp;gt; (which is a Construct property, further increasing our confidence of success), so the code should be:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(label=&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Combining the two points above, if you wish to call a construct-like function such as gtk_button_new_with_label(), you do have the option of calling Gtk.Button.new_with_label(), however if we check the [http://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties GtkButton properties] we see one called &amp;quot;label&amp;quot; which is equivalent. Therefore gtk_button_new_with_label(&amp;quot;foo&amp;quot;) should be called as:&lt;br /&gt;
 button = Gtk.Button(label=&amp;quot;foo&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== HBox, VBox, pack_start and pack_end ===&lt;br /&gt;
&lt;br /&gt;
GtkHBox and GtkVBox, commonly used containers in GTK2 code, have pack_start and pack_end methods. These take 4 parameters:&lt;br /&gt;
# The widget to pack into the container&lt;br /&gt;
# &#039;&#039;&#039;expand&#039;&#039;&#039;: Whether the child should receive extra space when the container grows (default True)&lt;br /&gt;
# &#039;&#039;&#039;fill&#039;&#039;&#039;: True if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to False. A child is always allocated the full height of a gtk.HBox and the full width of a gtk.VBox. This option affects the other dimension. (default True)&lt;br /&gt;
# &#039;&#039;&#039;padding&#039;&#039;&#039;: extra space in pixels to put between child and its neighbor (default 0)&lt;br /&gt;
&lt;br /&gt;
In PyGTK, the expand, fill and padding parameters were optional: if unspecified, the default values above were used. In PyGI, these parameters are &#039;&#039;&#039;not&#039;&#039;&#039; optional: all 4 must be specified. Hence the rules for adding in the extra parameters are:&lt;br /&gt;
&lt;br /&gt;
# If &#039;&#039;&#039;expand&#039;&#039;&#039; was not set, use value True&lt;br /&gt;
# If &#039;&#039;&#039;fill&#039;&#039;&#039; was not set, use value True. (however, if expand is False, this parameter gets ignored so False is an equally acceptable option when expand=False)&lt;br /&gt;
# If padding was not set, use value 0.&lt;br /&gt;
&lt;br /&gt;
These parameters can be specified either as positional arguments or as named keyword arguments, however all 4 must always be specified. Some developers prefer keyword arguments, arguing that the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, expand=True, fill=False, padding=4)&amp;lt;/pre&amp;gt;&lt;br /&gt;
is much more readable than:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, True, False, 4)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, these functions are called extremely often; any mildly seasoned GTK developer will have memorized the order and meaning of the parameters. Some developers therefore prefer to avoid the extra work of dropping in hundreds of keyword arguments throughout the code and just use the positional ones. This is really up to you.&lt;br /&gt;
&lt;br /&gt;
If you are using pack_start with the default values (expand=True, fill=True and padding=0), you can avoid using pack_start (and the parameter pain that it brings with it) by just using .add for some added cleanliness, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, True, True, 0)&amp;lt;/pre&amp;gt;&lt;br /&gt;
can be replaced with:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.add(widget)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is as far as you need to go for now. However, in GTK3, GtkVBox and GtkHBox have been deprecated, which means they might be removed in GTK4. The replacement is to use GtkBox directly, and you may wish to make this change now. e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it must be noted that if GtkBox is used directly (instead of using GtkHBox/GtkVBox), the default value of &#039;&#039;&#039;expand&#039;&#039;&#039; is now &#039;&#039;&#039;False&#039;&#039;&#039;. The implications of this are:&lt;br /&gt;
# You need to check your .add() calls, as previously they would behave as pack_start with expand=True, but now they will behave as expand=False (you need to change them to use pack_start with expand=True to retain the old behaviour)&lt;br /&gt;
# Every single pack_start call that has expand=False and padding=0 (and any value of fill) can be converted to .add() for cleanliness&lt;br /&gt;
&lt;br /&gt;
=== GtkAlignment considerations ===&lt;br /&gt;
&lt;br /&gt;
In PyGTK, the gtk.Alignment constructor takes four optional parameters:&lt;br /&gt;
# xalign: the fraction of horizontal free space to the left of the child widget. Ranges from 0.0 to 1.0. Default value 0.0.&lt;br /&gt;
# yalign: the fraction of vertical free space above the child widget. Ranges from 0.0 to 1.0. Default value 0.0.&lt;br /&gt;
# xscale: the fraction of horizontal free space that the child widget absorbs, from 0.0 to 1.0. Default value 0.0.&lt;br /&gt;
# yscale: the fraction of vertical free space that the child widget absorbs, from 0.0 to 1.0. Default value 0.0&lt;br /&gt;
&lt;br /&gt;
In PyGI/GTK3, these parameters are still optional when used in the Gtk.Alignment constructor (as keyword arguments, as explained above). However, the default values have changed. They are now:&lt;br /&gt;
# xalign: default value 0.5&lt;br /&gt;
# yalign: default value 0.5&lt;br /&gt;
# xscale: default value 1&lt;br /&gt;
# yscale: default value 1&lt;br /&gt;
&lt;br /&gt;
If your code was relying on the default value of 0 for any of these parameters in PyGTK, you will now need to explicitly specify that in your constructor. Similarly, if you were previously using construction parameters to select the now-default values, those parameters can be dropped.&lt;br /&gt;
&lt;br /&gt;
Additionally, PyGTK accepted these construction parameters as positional arguments. As explained above, they must now be converted to keyword arguments.&lt;br /&gt;
&lt;br /&gt;
==Make a release==&lt;br /&gt;
===Versioning===&lt;br /&gt;
If you do new releases the versioning of the GTK2 and GTK3 release should be different. For GTK2 releases you should use dotted versions for new development releases major versions. Let&#039;s have a look at hello-world as an example. The latest release of hello-world was version 3. Bug fix releases should be named 3.1 then 3.2 and so on. The new releases for the new development branch should be starting with a major number, in this case 4.&lt;br /&gt;
&lt;br /&gt;
== Tips to Activity Developers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this is just a stub&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* GTK-3 does not support Drawable, so the first step is to get your activity running under Cairo.&lt;br /&gt;
:* Example: abacus-cairo&lt;br /&gt;
:* Example: abacus-gtk3&lt;br /&gt;
* The conversion script (here) leaves a few things to be done by hand:&lt;br /&gt;
:* Notes from conversion from abacus-cairo to abacus-gtk3&lt;br /&gt;
&lt;br /&gt;
* Notes from the TurtleArt conversion&lt;br /&gt;
* Removing Hippo&lt;br /&gt;
&lt;br /&gt;
===Taking a screenshot and making a thumbnail===&lt;br /&gt;
To make a screenshot of the window:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
width, height = window.get_width(), window.get_height()&lt;br /&gt;
thumb_surface = Gdk.Window.create_similar_surface(window,&lt;br /&gt;
                                                  cairo.CONTENT_COLOR,&lt;br /&gt;
                                                  width, height)&lt;br /&gt;
&lt;br /&gt;
thumb_width, thumb_height = style.zoom(100), style.zoom(80)&lt;br /&gt;
cairo_context = cairo.Context(thumb_surface)&lt;br /&gt;
thumb_scale_w = thumb_width * 1.0 / width&lt;br /&gt;
thumb_scale_h = thumb_height * 1.0 / height&lt;br /&gt;
cairo_context.scale(thumb_scale_w, thumb_scale_h)&lt;br /&gt;
Gdk.cairo_set_source_window(cairo_context, window, 0, 0)&lt;br /&gt;
cairo_context.paint()&lt;br /&gt;
thumb_surface.write_to_png(png_path_or_filelike_object)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70976</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70976"/>
		<updated>2011-11-10T18:02:50Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* HBox, VBox, pack_start and pack_end */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Porting an exisiting activity to GTK3=&lt;br /&gt;
In this guide we will handle the porting of the an existing activity from using GTK2 to use GTK3. Furthermore we will show you what changes you need to do to make usage of the new sugar toolkit that uses now GTK3 as well. In this guide we will use the [http://git.sugarlabs.org/hello-world hello-world] activity as a simple example.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
Before you start porting your activity you are encouraged to branch off a stable branch. This will allow you to keep on doing stable releases on the stable branch and new releases on the master branch.&lt;br /&gt;
&lt;br /&gt;
The latest release was version 3. We highly recommend that you use the &#039;sugar-0.94&#039; as the stable branch name because this will keep the repositories consistent and eases the development work. In git you can create a branch like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has created a local branch. You can show the result by running &#039;git branch&#039;, you should see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch&lt;br /&gt;
* master&lt;br /&gt;
  sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;sugar-0.94&#039; branch is only locally available so far which can be seen by running &#039;git branch -r&#039; which shows the remote branches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only branch available besides the master branch is the &#039;sucrose-0.84&#039; branch. Let&#039;s push now our new branch to the remote repository to make it available for others:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git push origin sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch is now listed as a remote branch. You can verify as well on your [http://git.sugarlabs.org/hello-world/mainline gitorious page].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
  origin/sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can switch now between those branches using &#039;git checkout &amp;lt;branch&amp;gt;&#039;. And you can use &#039;git branch&#039; to see which branch you are on (the one with the * before is the branch you are currently on).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout sugar-0.94&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cleanup, adopt to API changes in the sugar-toolkit==&lt;br /&gt;
&#039;&#039;This should be done only on the master branch&#039;&#039;! In the new sugar-toolkit we have removed old API, you should adjust your activity accordingly:&lt;br /&gt;
* the keep button has been removed completely&lt;br /&gt;
* the old-style toolbar has been removed&lt;br /&gt;
&lt;br /&gt;
==Port the activity from GTK-2 to GTK-3==&lt;br /&gt;
The first thing that changes is the importing instruction for GTK,&lt;br /&gt;
&amp;lt;pre&amp;gt;import gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
has to be replaced by&lt;br /&gt;
&amp;lt;pre&amp;gt;from gi.repository import Gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you have to change each call that involves Gtk, for example creating a button will look now like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;button = Gtk.Button()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple hello world program in GTK-3 does look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from gi.repository import Gtk&lt;br /&gt;
&lt;br /&gt;
def _destroy_cb(widget, data=None):&lt;br /&gt;
    Gtk.main_quit()&lt;br /&gt;
&lt;br /&gt;
w = Gtk.Window()&lt;br /&gt;
w.connect(&amp;quot;destroy&amp;quot;, _destroy_cb)&lt;br /&gt;
label = Gtk.Label(&#039;Hello World!&#039;)&lt;br /&gt;
w.add(label)&lt;br /&gt;
w.show_all()&lt;br /&gt;
&lt;br /&gt;
Gtk.main()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For porting your activity you do have to change your calls for accesing widgets and services in the new GTK3 sugar-toolkit as well. The new namespace is called sugar3, trying to reflect that GTK3 is the underlying technology. For example the import of the base activity class has to be changed from&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar3.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes that were needed to port the hello-world activity can be seen in [http://git.sugarlabs.org/hello-world/mainline/commit/508e1c518b56cbde5508e560c8a2ff38a3518583 this commit].&lt;br /&gt;
&lt;br /&gt;
Ok, let&#039;s do these changes now for your activity. Make sure you are in your master branch using the &#039;git branch&#039; command (the master branch should have a &#039;*&#039; before it). Make your changes, commit them (&#039;git commit -a&#039;) and push them to the remote repository (&#039;git push origin master&#039;).&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide]. &lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Constructor considerations ===&lt;br /&gt;
&lt;br /&gt;
With PyGI it is possible to use Python-like constructors, or &amp;quot;new&amp;quot; functions e.g. the following are (usually) equivalent:&lt;br /&gt;
 label = Gtk.Button()&lt;br /&gt;
 label = Gtk.Button.new()&lt;br /&gt;
&lt;br /&gt;
However, the first form is preferred: it is more Python-like. Internally, the difference is that Gtk.Label.new() translates to a call to gtk_label_new(), whereas Gtk.Label() (the preferred form) will directly construct an instance of GtkLabel at the GObject level.&lt;br /&gt;
&lt;br /&gt;
If the constructor takes parameters, they &#039;&#039;&#039;must&#039;&#039;&#039; be named. The parameters correspond to GObject properties in the API documentation which are usually marked as &amp;quot;Construct&amp;quot;. For example, the following code will not work:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The (confusing) error is:&lt;br /&gt;
 TypeError: GObject.__init__() takes exactly 0 arguments (1 given)&lt;br /&gt;
&lt;br /&gt;
The solution is to go to the [http://developer.gnome.org/gtk3/3.2/GtkExpander.html#GtkExpander.properties GtkExpander API documentation] and find the appropriate property that we wish to set. In this case it is &amp;lt;b&amp;gt;label&amp;lt;/b&amp;gt; (which is a Construct property, further increasing our confidence of success), so the code should be:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(label=&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Combining the two points above, if you wish to call a construct-like function such as gtk_button_new_with_label(), you do have the option of calling Gtk.Button.new_with_label(), however if we check the [http://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties GtkButton properties] we see one called &amp;quot;label&amp;quot; which is equivalent. Therefore gtk_button_new_with_label(&amp;quot;foo&amp;quot;) should be called as:&lt;br /&gt;
 button = Gtk.Button(label=&amp;quot;foo&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== HBox, VBox, pack_start and pack_end ===&lt;br /&gt;
&lt;br /&gt;
GtkHBox and GtkVBox, commonly used containers in GTK2 code, have pack_start and pack_end methods. These take 4 parameters:&lt;br /&gt;
# The widget to pack into the container&lt;br /&gt;
# &#039;&#039;&#039;expand&#039;&#039;&#039;: Whether the child should receive extra space when the container grows (default True)&lt;br /&gt;
# &#039;&#039;&#039;fill&#039;&#039;&#039;: True if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to False. A child is always allocated the full height of a gtk.HBox and the full width of a gtk.VBox. This option affects the other dimension. (default True)&lt;br /&gt;
# &#039;&#039;&#039;padding&#039;&#039;&#039;: extra space in pixels to put between child and its neighbor (default 0)&lt;br /&gt;
&lt;br /&gt;
In PyGTK, the expand, fill and padding parameters were optional: if unspecified, the default values above were used. In PyGI, these parameters are &#039;&#039;&#039;not&#039;&#039;&#039; optional: all 4 must be specified. Hence the rules for adding in the extra parameters are:&lt;br /&gt;
&lt;br /&gt;
# If &#039;&#039;&#039;expand&#039;&#039;&#039; was not set, use value True&lt;br /&gt;
# If &#039;&#039;&#039;fill&#039;&#039;&#039; was not set, use value True. (however, if expand is False, this parameter gets ignored so False is an equally acceptable option when expand=False)&lt;br /&gt;
# If padding was not set, use value 0.&lt;br /&gt;
&lt;br /&gt;
These parameters can be specified either as positional arguments or as named keyword arguments, however all 4 must always be specified. Some developers prefer keyword arguments, arguing that the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, expand=True, fill=False, padding=4)&amp;lt;/pre&amp;gt;&lt;br /&gt;
is much more readable than:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, True, False, 4)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, these functions are called extremely often; any mildly seasoned GTK developer will have memorized the order and meaning of the parameters. Some developers therefore prefer to avoid the extra work of dropping in hundreds of keyword arguments throughout the code and just use the positional ones. This is really up to you.&lt;br /&gt;
&lt;br /&gt;
If you are using pack_start with the default values (expand=True, fill=True and padding=0), you can avoid using pack_start (and the parameter pain that it brings with it) by just using .add for some added cleanliness, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, True, True, 0)&amp;lt;/pre&amp;gt;&lt;br /&gt;
can be replaced with:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.add(widget)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is as far as you need to go for now. However, in GTK3, GtkVBox and GtkHBox have been deprecated, which means they might be removed in GTK4. The replacement is to use GtkBox directly, and you may wish to make this change now. e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it must be noted that if GtkBox is used directly (instead of using GtkHBox/GtkVBox), the default value of &#039;&#039;&#039;expand&#039;&#039;&#039; is now &#039;&#039;&#039;False&#039;&#039;&#039;. The implications of this are:&lt;br /&gt;
# You need to check your .add() calls, as previously they would behave as pack_start with expand=True, but now they will behave as expand=False (you need to change them to use pack_start with expand=True to retain the old behaviour)&lt;br /&gt;
# Every single pack_start call that has expand=False and padding=0 (and any value of fill) can be converted to .add() for cleanliness&lt;br /&gt;
&lt;br /&gt;
=== GtkAlignment considerations ===&lt;br /&gt;
&lt;br /&gt;
In PyGTK, the gtk.Alignment constructor takes four optional parameters:&lt;br /&gt;
# xalign: the fraction of horizontal free space to the left of the child widget. Ranges from 0.0 to 1.0. Default value 0.0.&lt;br /&gt;
# yalign: the fraction of vertical free space above the child widget. Ranges from 0.0 to 1.0. Default value 0.0.&lt;br /&gt;
# xscale: the fraction of horizontal free space that the child widget absorbs, from 0.0 to 1.0. Default value 0.0.&lt;br /&gt;
# yscale: the fraction of vertical free space that the child widget absorbs, from 0.0 to 1.0. Default value 0.0&lt;br /&gt;
&lt;br /&gt;
In PyGI/GTK3, these parameters are still optional when used in the Gtk.Alignment constructor (as keyword arguments, as explained above). However, the default values have changed. They are now:&lt;br /&gt;
# xalign: default value 0.5&lt;br /&gt;
# yalign: default value 0.5&lt;br /&gt;
# xscale: default value 1&lt;br /&gt;
# yscale: default value 1&lt;br /&gt;
&lt;br /&gt;
If your code was relying on the default value of 0 for any of these parameters in PyGTK, you will now need to explicitly specify that in your constructor. Similarly, if you were previously using construction parameters to select the now-default values, those parameters can be dropped.&lt;br /&gt;
&lt;br /&gt;
Additionally, PyGTK accepted these construction parameters as positional arguments. As explained above, they must now be converted to keyword arguments.&lt;br /&gt;
&lt;br /&gt;
==Make a release==&lt;br /&gt;
===Versioning===&lt;br /&gt;
If you do new releases the versioning of the GTK2 and GTK3 release should be different. For GTK2 releases you should use dotted versions for new development releases major versions. Let&#039;s have a look at hello-world as an example. The latest release of hello-world was version 3. Bug fix releases should be named 3.1 then 3.2 and so on. The new releases for the new development branch should be starting with a major number, in this case 4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Info for merging==&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;br /&gt;
&lt;br /&gt;
Conversion script badness:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        if self.orientation == gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
+        if self.orientation == Gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be Orientation.HORIZONTAL&lt;br /&gt;
&lt;br /&gt;
== Tips to Activity Developers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this is just a stub&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* GTK-3 does not support Drawable, so the first step is to get your activity running under Cairo.&lt;br /&gt;
:* Example: abacus-cairo&lt;br /&gt;
:* Example: abacus-gtk3&lt;br /&gt;
* The conversion script (here) leaves a few things to be done by hand:&lt;br /&gt;
:* Notes from conversion from abacus-cairo to abacus-gtk3&lt;br /&gt;
&lt;br /&gt;
* Notes from the TurtleArt conversion&lt;br /&gt;
* Removing Hippo&lt;br /&gt;
&lt;br /&gt;
===Taking a screenshot and making a thumbnail===&lt;br /&gt;
To make a screenshot of the window:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
width, height = window.get_width(), window.get_height()&lt;br /&gt;
thumb_surface = Gdk.Window.create_similar_surface(window,&lt;br /&gt;
                                                  cairo.CONTENT_COLOR,&lt;br /&gt;
                                                  width, height)&lt;br /&gt;
&lt;br /&gt;
thumb_width, thumb_height = style.zoom(100), style.zoom(80)&lt;br /&gt;
cairo_context = cairo.Context(thumb_surface)&lt;br /&gt;
thumb_scale_w = thumb_width * 1.0 / width&lt;br /&gt;
thumb_scale_h = thumb_height * 1.0 / height&lt;br /&gt;
cairo_context.scale(thumb_scale_w, thumb_scale_h)&lt;br /&gt;
Gdk.cairo_set_source_window(cairo_context, window, 0, 0)&lt;br /&gt;
cairo_context.paint()&lt;br /&gt;
thumb_surface.write_to_png(png_path_or_filelike_object)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70973</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70973"/>
		<updated>2011-11-10T17:47:12Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Constructor considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Porting an exisiting activity to GTK3=&lt;br /&gt;
In this guide we will handle the porting of the an existing activity from using GTK2 to use GTK3. Furthermore we will show you what changes you need to do to make usage of the new sugar toolkit that uses now GTK3 as well. In this guide we will use the [http://git.sugarlabs.org/hello-world hello-world] activity as a simple example.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
Before you start porting your activity you are encouraged to branch off a stable branch. This will allow you to keep on doing stable releases on the stable branch and new releases on the master branch.&lt;br /&gt;
&lt;br /&gt;
The latest release was version 3. We highly recommend that you use the &#039;sugar-0.94&#039; as the stable branch name because this will keep the repositories consistent and eases the development work. In git you can create a branch like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has created a local branch. You can show the result by running &#039;git branch&#039;, you should see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch&lt;br /&gt;
* master&lt;br /&gt;
  sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;sugar-0.94&#039; branch is only locally available so far which can be seen by running &#039;git branch -r&#039; which shows the remote branches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only branch available besides the master branch is the &#039;sucrose-0.84&#039; branch. Let&#039;s push now our new branch to the remote repository to make it available for others:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git push origin sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch is now listed as a remote branch. You can verify as well on your [http://git.sugarlabs.org/hello-world/mainline gitorious page].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
  origin/sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can switch now between those branches using &#039;git checkout &amp;lt;branch&amp;gt;&#039;. And you can use &#039;git branch&#039; to see which branch you are on (the one with the * before is the branch you are currently on).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout sugar-0.94&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cleanup, adopt to API changes in the sugar-toolkit==&lt;br /&gt;
&#039;&#039;This should be done only on the master branch&#039;&#039;! In the new sugar-toolkit we have removed old API, you should adjust your activity accordingly:&lt;br /&gt;
* the keep button has been removed completely&lt;br /&gt;
* the old-style toolbar has been removed&lt;br /&gt;
&lt;br /&gt;
==Port the activity from GTK-2 to GTK-3==&lt;br /&gt;
The first thing that changes is the importing instruction for GTK,&lt;br /&gt;
&amp;lt;pre&amp;gt;import gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
has to be replaced by&lt;br /&gt;
&amp;lt;pre&amp;gt;from gi.repository import Gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you have to change each call that involves Gtk, for example creating a button will look now like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;button = Gtk.Button()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple hello world program in GTK-3 does look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from gi.repository import Gtk&lt;br /&gt;
&lt;br /&gt;
def _destroy_cb(widget, data=None):&lt;br /&gt;
    Gtk.main_quit()&lt;br /&gt;
&lt;br /&gt;
w = Gtk.Window()&lt;br /&gt;
w.connect(&amp;quot;destroy&amp;quot;, _destroy_cb)&lt;br /&gt;
label = Gtk.Label(&#039;Hello World!&#039;)&lt;br /&gt;
w.add(label)&lt;br /&gt;
w.show_all()&lt;br /&gt;
&lt;br /&gt;
Gtk.main()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For porting your activity you do have to change your calls for accesing widgets and services in the new GTK3 sugar-toolkit as well. The new namespace is called sugar3, trying to reflect that GTK3 is the underlying technology. For example the import of the base activity class has to be changed from&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar3.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes that were needed to port the hello-world activity can be seen in [http://git.sugarlabs.org/hello-world/mainline/commit/508e1c518b56cbde5508e560c8a2ff38a3518583 this commit].&lt;br /&gt;
&lt;br /&gt;
Ok, let&#039;s do these changes now for your activity. Make sure you are in your master branch using the &#039;git branch&#039; command (the master branch should have a &#039;*&#039; before it). Make your changes, commit them (&#039;git commit -a&#039;) and push them to the remote repository (&#039;git push origin master&#039;).&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide]. &lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Constructor considerations ===&lt;br /&gt;
&lt;br /&gt;
With PyGI it is possible to use Python-like constructors, or &amp;quot;new&amp;quot; functions e.g. the following are (usually) equivalent:&lt;br /&gt;
 label = Gtk.Button()&lt;br /&gt;
 label = Gtk.Button.new()&lt;br /&gt;
&lt;br /&gt;
However, the first form is preferred: it is more Python-like. Internally, the difference is that Gtk.Label.new() translates to a call to gtk_label_new(), whereas Gtk.Label() (the preferred form) will directly construct an instance of GtkLabel at the GObject level.&lt;br /&gt;
&lt;br /&gt;
If the constructor takes parameters, they &#039;&#039;&#039;must&#039;&#039;&#039; be named. The parameters correspond to GObject properties in the API documentation which are usually marked as &amp;quot;Construct&amp;quot;. For example, the following code will not work:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The (confusing) error is:&lt;br /&gt;
 TypeError: GObject.__init__() takes exactly 0 arguments (1 given)&lt;br /&gt;
&lt;br /&gt;
The solution is to go to the [http://developer.gnome.org/gtk3/3.2/GtkExpander.html#GtkExpander.properties GtkExpander API documentation] and find the appropriate property that we wish to set. In this case it is &amp;lt;b&amp;gt;label&amp;lt;/b&amp;gt; (which is a Construct property, further increasing our confidence of success), so the code should be:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(label=&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Combining the two points above, if you wish to call a construct-like function such as gtk_button_new_with_label(), you do have the option of calling Gtk.Button.new_with_label(), however if we check the [http://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties GtkButton properties] we see one called &amp;quot;label&amp;quot; which is equivalent. Therefore gtk_button_new_with_label(&amp;quot;foo&amp;quot;) should be called as:&lt;br /&gt;
 button = Gtk.Button(label=&amp;quot;foo&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== HBox, VBox, pack_start and pack_end ===&lt;br /&gt;
&lt;br /&gt;
GtkHBox and GtkVBox, commonly used containers in GTK2 code, have pack_start and pack_end methods. These take 4 parameters:&lt;br /&gt;
# The widget to pack into the container&lt;br /&gt;
# &#039;&#039;&#039;expand&#039;&#039;&#039;: Whether the child should receive extra space when the container grows (default True)&lt;br /&gt;
# &#039;&#039;&#039;fill&#039;&#039;&#039;: True if space given to child by the expand option is actually allocated to child, rather than just padding it. This parameter has no effect if expand is set to False. A child is always allocated the full height of a gtk.HBox and the full width of a gtk.VBox. This option affects the other dimension. (default True)&lt;br /&gt;
# &#039;&#039;&#039;padding&#039;&#039;&#039;: extra space in pixels to put between child and its neighbor (default 0)&lt;br /&gt;
&lt;br /&gt;
In PyGTK, the expand, fill and padding parameters were optional: if unspecified, the default values above were used. In PyGI, these parameters are &#039;&#039;&#039;not&#039;&#039;&#039; optional: all 4 must be specified. Hence the rules for adding in the extra parameters are:&lt;br /&gt;
&lt;br /&gt;
# If &#039;&#039;&#039;expand&#039;&#039;&#039; was not set, use value True&lt;br /&gt;
# If &#039;&#039;&#039;fill&#039;&#039;&#039; was not set, use value True. (however, if expand is False, this parameter gets ignored so False is an equally acceptable option when expand=False)&lt;br /&gt;
# If padding was not set, use value 0.&lt;br /&gt;
&lt;br /&gt;
These parameters can be specified either as positional arguments or as named keyword arguments, however all 4 must always be specified. Some developers prefer keyword arguments, arguing that the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, expand=True, fill=False, padding=4)&amp;lt;/pre&amp;gt;&lt;br /&gt;
is much more readable than:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, True, False, 4)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, these functions are called extremely often; any mildly seasoned GTK developer will have memorized the order and meaning of the parameters. Some developers therefore prefer to avoid the extra work of dropping in hundreds of keyword arguments throughout the code and just use the positional ones. This is really up to you.&lt;br /&gt;
&lt;br /&gt;
If you are using pack_start with the default values (expand=True, fill=True and padding=0), you can avoid using pack_start (and the parameter pain that it brings with it) by just using .add for some added cleanliness, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;box.pack_start(widget, True, True, 0)&amp;lt;/pre&amp;gt;&lt;br /&gt;
can be replaced with:&lt;br /&gt;
&amp;lt;pre&amp;gt;box.add(widget)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is as far as you need to go for now. However, in GTK3, GtkVBox and GtkHBox have been deprecated, which means they might be removed in GTK4. The replacement is to use GtkBox directly, and you may wish to make this change now. e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it must be noted that if GtkBox is used directly (instead of using GtkHBox/GtkVBox), the default value of &#039;&#039;&#039;expand&#039;&#039;&#039; is now &#039;&#039;&#039;False&#039;&#039;&#039;. The implications of this are:&lt;br /&gt;
# You need to check your .add() calls, as previously they would behave as pack_start with expand=True, but now they will behave as expand=False (you need to change them to use pack_start with expand=True to retain the old behaviour)&lt;br /&gt;
# Every single pack_start call that has expand=False and padding=0 (and any value of fill) can be converted to .add() for cleanliness&lt;br /&gt;
&lt;br /&gt;
==Make a release==&lt;br /&gt;
===Versioning===&lt;br /&gt;
If you do new releases the versioning of the GTK2 and GTK3 release should be different. For GTK2 releases you should use dotted versions for new development releases major versions. Let&#039;s have a look at hello-world as an example. The latest release of hello-world was version 3. Bug fix releases should be named 3.1 then 3.2 and so on. The new releases for the new development branch should be starting with a major number, in this case 4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Info for merging==&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;br /&gt;
&lt;br /&gt;
Conversion script badness:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        if self.orientation == gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
+        if self.orientation == Gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be Orientation.HORIZONTAL&lt;br /&gt;
&lt;br /&gt;
== Tips to Activity Developers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this is just a stub&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* GTK-3 does not support Drawable, so the first step is to get your activity running under Cairo.&lt;br /&gt;
:* Example: abacus-cairo&lt;br /&gt;
:* Example: abacus-gtk3&lt;br /&gt;
* The conversion script (here) leaves a few things to be done by hand:&lt;br /&gt;
:* Notes from conversion from abacus-cairo to abacus-gtk3&lt;br /&gt;
&lt;br /&gt;
* Notes from the TurtleArt conversion&lt;br /&gt;
* Removing Hippo&lt;br /&gt;
&lt;br /&gt;
===Taking a screenshot and making a thumbnail===&lt;br /&gt;
To make a screenshot of the window:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
width, height = window.get_width(), window.get_height()&lt;br /&gt;
thumb_surface = Gdk.Window.create_similar_surface(window,&lt;br /&gt;
                                                  cairo.CONTENT_COLOR,&lt;br /&gt;
                                                  width, height)&lt;br /&gt;
&lt;br /&gt;
thumb_width, thumb_height = style.zoom(100), style.zoom(80)&lt;br /&gt;
cairo_context = cairo.Context(thumb_surface)&lt;br /&gt;
thumb_scale_w = thumb_width * 1.0 / width&lt;br /&gt;
thumb_scale_h = thumb_height * 1.0 / height&lt;br /&gt;
cairo_context.scale(thumb_scale_w, thumb_scale_h)&lt;br /&gt;
Gdk.cairo_set_source_window(cairo_context, window, 0, 0)&lt;br /&gt;
cairo_context.paint()&lt;br /&gt;
thumb_surface.write_to_png(png_path_or_filelike_object)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70927</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70927"/>
		<updated>2011-11-09T22:58:01Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Constructor considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Porting an exisiting activity to GTK3=&lt;br /&gt;
In this guide we will handle the porting of the an existing activity from using GTK2 to use GTK3. Furthermore we will show you what changes you need to do to make usage of the new sugar toolkit that uses now GTK3 as well. In this guide we will use the [http://git.sugarlabs.org/hello-world hello-world] activity as a simple example.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
Before you start porting your activity you are encouraged to branch off a stable branch. This will allow you to keep on doing stable releases on the stable branch and new releases on the master branch.&lt;br /&gt;
&lt;br /&gt;
The latest release was version 3. We highly recommend that you use the &#039;sugar-0.94&#039; as the stable branch name because this will keep the repositories consistent and eases the development work. In git you can create a branch like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has created a local branch. You can show the result by running &#039;git branch&#039;, you should see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch&lt;br /&gt;
* master&lt;br /&gt;
  sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;sugar-0.94&#039; branch is only locally available so far which can be seen by running &#039;git branch -r&#039; which shows the remote branches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only branch available besides the master branch is the &#039;sucrose-0.84&#039; branch. Let&#039;s push now our new branch to the remote repository to make it available for others:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git push origin sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch is now listed as a remote branch. You can verify as well on your [http://git.sugarlabs.org/hello-world/mainline gitorious page].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
  origin/sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can switch now between those branches using &#039;git checkout &amp;lt;branch&amp;gt;&#039;. And you can use &#039;git branch&#039; to see which branch you are on (the one with the * before is the branch you are currently on).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout sugar-0.94&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cleanup, adopt to API changes in the sugar-toolkit==&lt;br /&gt;
&#039;&#039;This should be done only on the master branch&#039;&#039;! In the new sugar-toolkit we have removed old API, you should adjust your activity accordingly:&lt;br /&gt;
* the keep button has been removed completely&lt;br /&gt;
* the old-style toolbar has been removed&lt;br /&gt;
&lt;br /&gt;
==Port the activity from GTK-2 to GTK-3==&lt;br /&gt;
The first thing that changes is the importing instruction for GTK,&lt;br /&gt;
&amp;lt;pre&amp;gt;import gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
has to be replaced by&lt;br /&gt;
&amp;lt;pre&amp;gt;from gi.repository import Gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you have to change each call that involves Gtk, for example creating a button will look now like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;button = Gtk.Button()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple hello world program in GTK-3 does look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from gi.repository import Gtk&lt;br /&gt;
&lt;br /&gt;
def _destroy_cb(widget, data=None):&lt;br /&gt;
    Gtk.main_quit()&lt;br /&gt;
&lt;br /&gt;
w = Gtk.Window()&lt;br /&gt;
w.connect(&amp;quot;destroy&amp;quot;, _destroy_cb)&lt;br /&gt;
label = Gtk.Label(&#039;Hello World!&#039;)&lt;br /&gt;
w.add(label)&lt;br /&gt;
w.show_all()&lt;br /&gt;
&lt;br /&gt;
Gtk.main()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For porting your activity you do have to change your calls for accesing widgets and services in the new GTK3 sugar-toolkit as well. The new namespace is called sugar3, trying to reflect that GTK3 is the underlying technology. For example the import of the base activity class has to be changed from&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar3.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes that were needed to port the hello-world activity can be seen in [http://git.sugarlabs.org/hello-world/mainline/commit/508e1c518b56cbde5508e560c8a2ff38a3518583 this commit].&lt;br /&gt;
&lt;br /&gt;
Ok, let&#039;s do these changes now for your activity. Make sure you are in your master branch using the &#039;git branch&#039; command (the master branch should have a &#039;*&#039; before it). Make your changes, commit them (&#039;git commit -a&#039;) and push them to the remote repository (&#039;git push origin master&#039;).&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide]. &lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Constructor considerations ===&lt;br /&gt;
&lt;br /&gt;
With PyGI it is possible to use Python-like constructors, or &amp;quot;new&amp;quot; functions e.g. the following are (usually) equivalent:&lt;br /&gt;
 label = Gtk.Button()&lt;br /&gt;
 label = Gtk.Button.new()&lt;br /&gt;
&lt;br /&gt;
However, the first form is preferred: it is more Python-like. Internally, the difference is that Gtk.Label.new() translates to a call to gtk_label_new(), whereas Gtk.Label() (the preferred form) will directly construct an instance of GtkLabel at the GObject level.&lt;br /&gt;
&lt;br /&gt;
If the constructor takes parameters, they &#039;&#039;&#039;must&#039;&#039;&#039; be named. The parameters correspond to GObject properties in the API documentation which are usually marked as &amp;quot;Construct&amp;quot;. For example, the following code will not work:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The (confusing) error is:&lt;br /&gt;
 TypeError: GObject.__init__() takes exactly 0 arguments (1 given)&lt;br /&gt;
&lt;br /&gt;
The solution is to go to the [http://developer.gnome.org/gtk3/3.2/GtkExpander.html#GtkExpander.properties GtkExpander API documentation] and find the appropriate property that we wish to set. In this case it is &amp;lt;b&amp;gt;label&amp;lt;/b&amp;gt; (which is a Construct property, further increasing our confidence of success), so the code should be:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(label=&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Combining the two points above, if you wish to call a construct-like function such as gtk_button_new_with_label(), you do have the option of calling Gtk.Button.new_with_label(), however if we check the [http://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties GtkButton properties] we see one called &amp;quot;label&amp;quot; which is equivalent. Therefore gtk_button_new_with_label(&amp;quot;foo&amp;quot;) should be called as:&lt;br /&gt;
 button = Gtk.Button(label=&amp;quot;foo&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Make a release==&lt;br /&gt;
===Versioning===&lt;br /&gt;
If you do new releases the versioning of the GTK2 and GTK3 release should be different. For GTK2 releases you should use dotted versions for new development releases major versions. Let&#039;s have a look at hello-world as an example. The latest release of hello-world was version 3. Bug fix releases should be named 3.1 then 3.2 and so on. The new releases for the new development branch should be starting with a major number, in this case 4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Info for merging==&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;br /&gt;
&lt;br /&gt;
Conversion script badness:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        if self.orientation == gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
+        if self.orientation == Gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be Orientation.HORIZONTAL&lt;br /&gt;
&lt;br /&gt;
== Tips to Activity Developers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this is just a stub&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* GTK-3 does not support Drawable, so the first step is to get your activity running under Cairo.&lt;br /&gt;
:* Example: abacus-cairo&lt;br /&gt;
:* Example: abacus-gtk3&lt;br /&gt;
* The conversion script (here) leaves a few things to be done by hand:&lt;br /&gt;
:* Notes from conversion from abacus-cairo to abacus-gtk3&lt;br /&gt;
&lt;br /&gt;
* Notes from the TurtleArt conversion&lt;br /&gt;
* Removing Hippo&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70926</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70926"/>
		<updated>2011-11-09T22:53:44Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Constructor considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Porting an exisiting activity to GTK3=&lt;br /&gt;
In this guide we will handle the porting of the an existing activity from using GTK2 to use GTK3. Furthermore we will show you what changes you need to do to make usage of the new sugar toolkit that uses now GTK3 as well. In this guide we will use the [http://git.sugarlabs.org/hello-world hello-world] activity as a simple example.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
Before you start porting your activity you are encouraged to branch off a stable branch. This will allow you to keep on doing stable releases on the stable branch and new releases on the master branch.&lt;br /&gt;
&lt;br /&gt;
The latest release was version 3. We highly recommend that you use the &#039;sugar-0.94&#039; as the stable branch name because this will keep the repositories consistent and eases the development work. In git you can create a branch like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has created a local branch. You can show the result by running &#039;git branch&#039;, you should see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch&lt;br /&gt;
* master&lt;br /&gt;
  sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;sugar-0.94&#039; branch is only locally available so far which can be seen by running &#039;git branch -r&#039; which shows the remote branches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only branch available besides the master branch is the &#039;sucrose-0.84&#039; branch. Let&#039;s push now our new branch to the remote repository to make it available for others:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git push origin sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch is now listed as a remote branch. You can verify as well on your [http://git.sugarlabs.org/hello-world/mainline gitorious page].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
  origin/sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can switch now between those branches using &#039;git checkout &amp;lt;branch&amp;gt;&#039;. And you can use &#039;git branch&#039; to see which branch you are on (the one with the * before is the branch you are currently on).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout sugar-0.94&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cleanup, adopt to API changes in the sugar-toolkit==&lt;br /&gt;
&#039;&#039;This should be done only on the master branch&#039;&#039;! In the new sugar-toolkit we have removed old API, you should adjust your activity accordingly:&lt;br /&gt;
* the keep button has been removed completely&lt;br /&gt;
* the old-style toolbar has been removed&lt;br /&gt;
&lt;br /&gt;
==Port the activity from GTK-2 to GTK-3==&lt;br /&gt;
The first thing that changes is the importing instruction for GTK,&lt;br /&gt;
&amp;lt;pre&amp;gt;import gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
has to be replaced by&lt;br /&gt;
&amp;lt;pre&amp;gt;from gi.repository import Gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you have to change each call that involves Gtk, for example creating a button will look now like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;button = Gtk.Button()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple hello world program in GTK-3 does look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from gi.repository import Gtk&lt;br /&gt;
&lt;br /&gt;
def _destroy_cb(widget, data=None):&lt;br /&gt;
    Gtk.main_quit()&lt;br /&gt;
&lt;br /&gt;
w = Gtk.Window()&lt;br /&gt;
w.connect(&amp;quot;destroy&amp;quot;, _destroy_cb)&lt;br /&gt;
label = Gtk.Label(&#039;Hello World!&#039;)&lt;br /&gt;
w.add(label)&lt;br /&gt;
w.show_all()&lt;br /&gt;
&lt;br /&gt;
Gtk.main()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For porting your activity you do have to change your calls for accesing widgets and services in the new GTK3 sugar-toolkit as well. The new namespace is called sugar3, trying to reflect that GTK3 is the underlying technology. For example the import of the base activity class has to be changed from&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar3.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes that were needed to port the hello-world activity can be seen in [http://git.sugarlabs.org/hello-world/mainline/commit/508e1c518b56cbde5508e560c8a2ff38a3518583 this commit].&lt;br /&gt;
&lt;br /&gt;
Ok, let&#039;s do these changes now for your activity. Make sure you are in your master branch using the &#039;git branch&#039; command (the master branch should have a &#039;*&#039; before it). Make your changes, commit them (&#039;git commit -a&#039;) and push them to the remote repository (&#039;git push origin master&#039;).&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide]. &lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Constructor considerations ===&lt;br /&gt;
&lt;br /&gt;
With PyGI it is possible to use Python-like constructors, or &amp;quot;new&amp;quot; functions e.g. the following are (usually) equivalent:&lt;br /&gt;
 label = Gtk.Button()&lt;br /&gt;
 label = Gtk.Button.new()&lt;br /&gt;
&lt;br /&gt;
However, the first form is preferred: it is more Python-like. Internally, the difference is that Gtk.Label.new() translates to a call to gtk_label_new(), whereas Gtk.Label() (the preferred form) will directly construct an instance of GtkLabel at the GObject level.&lt;br /&gt;
&lt;br /&gt;
If the constructor takes parameters, they &#039;&#039;&#039;must&#039;&#039;&#039; be named. The parameters correspond to GObject properties marked as &amp;quot;Construct&amp;quot; in the API documentation. For example, the following code will not work:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The (confusing) error is:&lt;br /&gt;
 TypeError: GObject.__init__() takes exactly 0 arguments (1 given)&lt;br /&gt;
&lt;br /&gt;
The solution is to go to the [http://developer.gnome.org/gtk3/3.2/GtkExpander.html#GtkExpander.properties GtkExpander API documentation] and find the appropriate &amp;quot;Construct&amp;quot; property that we wish to set. In this case it is &amp;lt;b&amp;gt;label&amp;lt;/b&amp;gt;, so the code should be:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(label=&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Combining the two points above, if you wish to call a construct-like function such as gtk_button_new_with_label(), you do have the option of calling Gtk.Button.new_with_label(), however if we check the [http://developer.gnome.org/gtk3/3.2/GtkButton.html#GtkButton.properties GtkButton Construct parameters] we see one called &amp;quot;label&amp;quot; which is equivalent. Therefore gtk_button_new_with_label(&amp;quot;foo&amp;quot;) should be called as:&lt;br /&gt;
 button = Gtk.Button(label=&amp;quot;foo&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Make a release==&lt;br /&gt;
===Versioning===&lt;br /&gt;
If you do new releases the versioning of the GTK2 and GTK3 release should be different. For GTK2 releases you should use dotted versions for new development releases major versions. Let&#039;s have a look at hello-world as an example. The latest release of hello-world was version 3. Bug fix releases should be named 3.1 then 3.2 and so on. The new releases for the new development branch should be starting with a major number, in this case 4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Info for merging==&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;br /&gt;
&lt;br /&gt;
Conversion script badness:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        if self.orientation == gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
+        if self.orientation == Gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be Orientation.HORIZONTAL&lt;br /&gt;
&lt;br /&gt;
== Tips to Activity Developers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this is just a stub&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* GTK-3 does not support Drawable, so the first step is to get your activity running under Cairo.&lt;br /&gt;
:* Example: abacus-cairo&lt;br /&gt;
:* Example: abacus-gtk3&lt;br /&gt;
* The conversion script (here) leaves a few things to be done by hand:&lt;br /&gt;
:* Notes from conversion from abacus-cairo to abacus-gtk3&lt;br /&gt;
&lt;br /&gt;
* Notes from the TurtleArt conversion&lt;br /&gt;
* Removing Hippo&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70925</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70925"/>
		<updated>2011-11-09T22:47:47Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Port the activity from GTK-2 to GTK-3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Porting an exisiting activity to GTK3=&lt;br /&gt;
In this guide we will handle the porting of the an existing activity from using GTK2 to use GTK3. Furthermore we will show you what changes you need to do to make usage of the new sugar toolkit that uses now GTK3 as well. In this guide we will use the [http://git.sugarlabs.org/hello-world hello-world] activity as a simple example.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
Before you start porting your activity you are encouraged to branch off a stable branch. This will allow you to keep on doing stable releases on the stable branch and new releases on the master branch.&lt;br /&gt;
&lt;br /&gt;
The latest release was version 3. We highly recommend that you use the &#039;sugar-0.94&#039; as the stable branch name because this will keep the repositories consistent and eases the development work. In git you can create a branch like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git branch sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has created a local branch. You can show the result by running &#039;git branch&#039;, you should see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch&lt;br /&gt;
* master&lt;br /&gt;
  sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;sugar-0.94&#039; branch is only locally available so far which can be seen by running &#039;git branch -r&#039; which shows the remote branches:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only branch available besides the master branch is the &#039;sucrose-0.84&#039; branch. Let&#039;s push now our new branch to the remote repository to make it available for others:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git push origin sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The branch is now listed as a remote branch. You can verify as well on your [http://git.sugarlabs.org/hello-world/mainline gitorious page].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[erikos@T61 helloworld]$ git branch -r&lt;br /&gt;
  origin/HEAD -&amp;gt; origin/master&lt;br /&gt;
  origin/master&lt;br /&gt;
  origin/sucrose-0.84&lt;br /&gt;
  origin/sugar-0.94&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can switch now between those branches using &#039;git checkout &amp;lt;branch&amp;gt;&#039;. And you can use &#039;git branch&#039; to see which branch you are on (the one with the * before is the branch you are currently on).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout sugar-0.94&lt;br /&gt;
git checkout master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cleanup, adopt to API changes in the sugar-toolkit==&lt;br /&gt;
&#039;&#039;This should be done only on the master branch&#039;&#039;! In the new sugar-toolkit we have removed old API, you should adjust your activity accordingly:&lt;br /&gt;
* the keep button has been removed completely&lt;br /&gt;
* the old-style toolbar has been removed&lt;br /&gt;
&lt;br /&gt;
==Port the activity from GTK-2 to GTK-3==&lt;br /&gt;
The first thing that changes is the importing instruction for GTK,&lt;br /&gt;
&amp;lt;pre&amp;gt;import gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
has to be replaced by&lt;br /&gt;
&amp;lt;pre&amp;gt;from gi.repository import Gtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you have to change each call that involves Gtk, for example creating a button will look now like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;button = Gtk.Button()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple hello world program in GTK-3 does look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from gi.repository import Gtk&lt;br /&gt;
&lt;br /&gt;
def _destroy_cb(widget, data=None):&lt;br /&gt;
    Gtk.main_quit()&lt;br /&gt;
&lt;br /&gt;
w = Gtk.Window()&lt;br /&gt;
w.connect(&amp;quot;destroy&amp;quot;, _destroy_cb)&lt;br /&gt;
label = Gtk.Label(&#039;Hello World!&#039;)&lt;br /&gt;
w.add(label)&lt;br /&gt;
w.show_all()&lt;br /&gt;
&lt;br /&gt;
Gtk.main()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For porting your activity you do have to change your calls for accesing widgets and services in the new GTK3 sugar-toolkit as well. The new namespace is called sugar3, trying to reflect that GTK3 is the underlying technology. For example the import of the base activity class has to be changed from&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;from sugar3.activity import activity&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The changes that were needed to port the hello-world activity can be seen in [http://git.sugarlabs.org/hello-world/mainline/commit/508e1c518b56cbde5508e560c8a2ff38a3518583 this commit].&lt;br /&gt;
&lt;br /&gt;
Ok, let&#039;s do these changes now for your activity. Make sure you are in your master branch using the &#039;git branch&#039; command (the master branch should have a &#039;*&#039; before it). Make your changes, commit them (&#039;git commit -a&#039;) and push them to the remote repository (&#039;git push origin master&#039;).&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide]. &lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Constructor considerations ===&lt;br /&gt;
&lt;br /&gt;
With PyGI it is possible to use Python-like constructors, or &amp;quot;new&amp;quot; functions e.g. the following are (probably) equivalent:&lt;br /&gt;
 label = Gtk.Label()&lt;br /&gt;
 label = Gtk.Label.new()&lt;br /&gt;
&lt;br /&gt;
However, the first form is preferred: it is more Python-like. Internally, the difference is that Gtk.Label.new() translates to a call to gtk_label_new(), whereas Gtk.Label() (the preferred form) will directly construct an instance of GtkLabel at the GObject level.&lt;br /&gt;
&lt;br /&gt;
If the constructor takes parameters, they &#039;&#039;&#039;must&#039;&#039;&#039; be named. The parameters correspond to GObject properties marked as &amp;quot;Construct&amp;quot; in the API documentation. For example, the following code will not work:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The (confusing) error is:&lt;br /&gt;
 TypeError: GObject.__init__() takes exactly 0 arguments (1 given)&lt;br /&gt;
&lt;br /&gt;
The solution is to go to the [http://developer.gnome.org/gtk3/3.2/GtkExpander.html#GtkExpander.properties GtkExpander API documentation] and find the appropriate &amp;quot;Construct&amp;quot; property that we wish to set. In this case it is &amp;lt;b&amp;gt;label&amp;lt;/b&amp;gt;, so the code should be:&lt;br /&gt;
&lt;br /&gt;
 expander = Gtk.Expander(label=&amp;quot;my expander&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Make a release==&lt;br /&gt;
===Versioning===&lt;br /&gt;
If you do new releases the versioning of the GTK2 and GTK3 release should be different. For GTK2 releases you should use dotted versions for new development releases major versions. Let&#039;s have a look at hello-world as an example. The latest release of hello-world was version 3. Bug fix releases should be named 3.1 then 3.2 and so on. The new releases for the new development branch should be starting with a major number, in this case 4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Info for merging==&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;br /&gt;
&lt;br /&gt;
Conversion script badness:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        if self.orientation == gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
+        if self.orientation == Gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be Orientation.HORIZONTAL&lt;br /&gt;
&lt;br /&gt;
== Tips to Activity Developers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;this is just a stub&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* GTK-3 does not support Drawable, so the first step is to get your activity running under Cairo.&lt;br /&gt;
:* Example: abacus-cairo&lt;br /&gt;
:* Example: abacus-gtk3&lt;br /&gt;
* The conversion script (here) leaves a few things to be done by hand:&lt;br /&gt;
:* Notes from conversion from abacus-cairo to abacus-gtk3&lt;br /&gt;
&lt;br /&gt;
* Notes from the TurtleArt conversion&lt;br /&gt;
* Removing Hippo&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70556</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70556"/>
		<updated>2011-10-30T21:52:54Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - this is the GTK3 port of sugar-toolkit&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 branch sucrose-0.94 - the GTK2 version of sugar-toolkit needs a handful of structure changes prompted by our GTK3 work. They are being committed here.&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar/sugar-gtk3 - we are not (yet) porting the sugar shell to GTK3, but a handful of structural changes are needed.&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
* Browse port to GTK3: http://git.sugarlabs.org/~dsd/browse/browse-gtk3&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Compile/install a fixed pygobject with [https://bugzilla.gnome.org/show_bug.cgi?id=662994 this chain-up fix]. F16 build available from http://koji.fedoraproject.org/koji/taskinfo?taskID=3473257&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sugar-toolkit gtk2 version needs some modifications for some restructuring that gtk3 work has prompted. Check out our branch where this happens;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-toolkit&lt;br /&gt;
git remote add -f gtk2-mods-for-gtk3 git://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3.git&lt;br /&gt;
git checkout -b gtk2-mods-for-gtk3 gtk2-mods-for-gtk3/sucrose-0.94&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And similarly for sugar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar&lt;br /&gt;
git remote add -f erikos-gtk3 git://git.sugarlabs.org/~erikos/sugar/sugar-gtk3.git&lt;br /&gt;
git checkout -b gtk3 erikos-gtk3/master&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pending upstream work ==&lt;br /&gt;
&lt;br /&gt;
All of these have been worked around (or will be worked around) for now, at the sugar level.&lt;br /&gt;
&lt;br /&gt;
* gobject introspection bindings for librsvg: https://bugzilla.gnome.org/show_bug.cgi?id=663049&lt;br /&gt;
* enable GDK introspection access to X11 window properties (Raul)&lt;br /&gt;
* extend gio mime type API so that we can drop our xdgmime copy (e.g. need to be able to get default file extension for a given mime type)&lt;br /&gt;
* chaining up in vfuncs: https://bugzilla.gnome.org/show_bug.cgi?id=662994&lt;br /&gt;
* implementing GtkContainer::forall: https://bugzilla.gnome.org/show_bug.cgi?id=644926, also needs https://bugzilla.gnome.org/show_bug.cgi?id=663052&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70544</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70544"/>
		<updated>2011-10-30T15:24:09Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - this is the GTK3 port of sugar-toolkit&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 branch sucrose-0.94 - the GTK2 version of sugar-toolkit needs a handful of structure changes prompted by our GTK3 work. They are being committed here.&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar/sugar-gtk3 - we are not (yet) porting the sugar shell to GTK3, but a handful of structural changes are needed.&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Compile/install a fixed pygobject with [https://bugzilla.gnome.org/show_bug.cgi?id=662994 this chain-up fix]. F16 build available from http://koji.fedoraproject.org/koji/taskinfo?taskID=3473257&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sugar-toolkit gtk2 version needs some modifications for some restructuring that gtk3 work has prompted. Check out our branch where this happens;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-toolkit&lt;br /&gt;
git remote add -f gtk2-mods-for-gtk3 git://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3.git&lt;br /&gt;
git checkout -b gtk2-mods-for-gtk3 gtk2-mods-for-gtk3/sucrose-0.94&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And similarly for sugar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar&lt;br /&gt;
git remote add -f erikos-gtk3 git://git.sugarlabs.org/~erikos/sugar/sugar-gtk3.git&lt;br /&gt;
git checkout -b gtk3 erikos-gtk3/master&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pending upstream work ==&lt;br /&gt;
&lt;br /&gt;
All of these have been worked around (or will be worked around) for now, at the sugar level.&lt;br /&gt;
&lt;br /&gt;
* gobject introspection bindings for librsvg: https://bugzilla.gnome.org/show_bug.cgi?id=663049&lt;br /&gt;
* enable GDK introspection access to X11 window properties (Raul)&lt;br /&gt;
* extend gio mime type API so that we can drop our xdgmime copy (e.g. need to be able to get default file extension for a given mime type)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70535</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70535"/>
		<updated>2011-10-30T11:35:35Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - this is the GTK3 port of sugar-toolkit&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 branch sucrose-0.94 - the GTK2 version of sugar-toolkit needs a handful of structure changes prompted by our GTK3 work. They are being committed here.&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar/sugar-gtk3 - we are not (yet) porting the sugar shell to GTK3, but a handful of structural changes are needed.&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Compile/install a fixed pygobject with [https://bugzilla.gnome.org/show_bug.cgi?id=662994 this chain-up fix]. F16 build available from http://koji.fedoraproject.org/koji/taskinfo?taskID=3473257&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sugar-toolkit gtk2 version needs some modifications for some restructuring that gtk3 work has prompted. Check out our branch where this happens;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-toolkit&lt;br /&gt;
git remote add -f gtk2-mods-for-gtk3 git://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3.git&lt;br /&gt;
git checkout -b gtk2-mods-for-gtk3 gtk2-mods-for-gtk3/sucrose-0.94&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And similarly for sugar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar&lt;br /&gt;
git remote add -f erikos-gtk3 git://git.sugarlabs.org/~erikos/sugar/sugar-gtk3.git&lt;br /&gt;
git checkout -b gtk3 erikos-gtk3/master&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70528</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70528"/>
		<updated>2011-10-30T07:01:22Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To port PyGTK to PyGI, read this: https://live.gnome.org/PyGObject/IntrospectionPorting (especially the section abouut pygi-convert.sh)&lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants)&lt;br /&gt;
&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;br /&gt;
&lt;br /&gt;
Conversion script badness:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        if self.orientation == gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
+        if self.orientation == Gtk.ORIENTATION_HORIZONTAL:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
should be Orientation.HORIZONTAL&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70527</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=70527"/>
		<updated>2011-10-30T06:50:49Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To port PyGTK to PyGI, read this: https://live.gnome.org/PyGObject/IntrospectionPorting (especially the section abouut pygi-convert.sh)&lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants)&lt;br /&gt;
&lt;br /&gt;
To document:&lt;br /&gt;
* Gtk.Alignment() no longer has default parameters - specify all 4&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70487</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70487"/>
		<updated>2011-10-29T10:46:54Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - this is the GTK3 port of sugar-toolkit&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 branch sucrose-0.94 - the GTK2 version of sugar-toolkit needs a handful of structure changes prompted by our GTK3 work. They are being committed here.&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar/sugar-gtk3 - we are not (yet) porting the sugar shell to GTK3, but a handful of structural changes are needed.&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sugar-toolkit gtk2 version needs some modifications for some restructuring that gtk3 work has prompted. Check out our branch where this happens;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-toolkit&lt;br /&gt;
git remote add -f gtk2-mods-for-gtk3 git://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3.git&lt;br /&gt;
git checkout -b gtk2-mods-for-gtk3 gtk2-mods-for-gtk3/sucrose-0.94&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And similarly for sugar:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar&lt;br /&gt;
git remote add -f erikos-gtk3 git://git.sugarlabs.org/~erikos/sugar/sugar-gtk3.git&lt;br /&gt;
git checkout -b gtk3 erikos-gtk3/master&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70482</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70482"/>
		<updated>2011-10-29T10:39:40Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 - this is the GTK3 port of sugar-toolkit&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 branch sucrose-0.94 - the GTK2 version of sugar-toolkit needs a handful of structure changes prompted by our GTK3 work. They are being committed here.&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
cd ../..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sugar-toolkit gtk2 version needs some modifications for some restructuring that gtk3 work has prompted. Check out our branch where this happens;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add -f gtk2-mods-for-gtk3 git://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3.git&lt;br /&gt;
git checkout -b gtk2-mods-for-gtk3 gtk2-mods-for-gtk3/sucrose-0.94&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70476</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70476"/>
		<updated>2011-10-29T09:03:01Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70475</id>
		<title>Features/GTK3/Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Development&amp;diff=70475"/>
		<updated>2011-10-29T09:02:17Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: Created page with &amp;quot;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.  == Repos ==  * http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3 * Mainli...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page includes repo details and how to get sugar-jhbuild set up with the GTK3 work.&lt;br /&gt;
&lt;br /&gt;
== Repos ==&lt;br /&gt;
&lt;br /&gt;
* http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3&lt;br /&gt;
* Mainline sugar-artwork repo, branch &#039;gtk3&#039;&lt;br /&gt;
&lt;br /&gt;
== jhbuild setup ==&lt;br /&gt;
&lt;br /&gt;
Start with a working &amp;quot;normal&amp;quot; sugar-jhbuild installation.&lt;br /&gt;
&lt;br /&gt;
Apply this patch to sugar-jhbuild: http://dev.laptop.org/~dsd/20111029/sugar-jhbuild-sugar-toolkit-gtk3.patch&lt;br /&gt;
&lt;br /&gt;
Select gtk3 brach of sugar-artwork for the new theme:&lt;br /&gt;
&lt;br /&gt;
{{{&lt;br /&gt;
cd source/sugar-artwork&lt;br /&gt;
git pull&lt;br /&gt;
git checkout gtk3&lt;br /&gt;
make install&lt;br /&gt;
}}}&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=69707</id>
		<title>Marketing Team/Events/Gtk3 Hackfest 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=69707"/>
		<updated>2011-10-02T15:30:25Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Agenda, goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
= Gtk3 Hackfest 2011 =&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, PyGTK, the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of PyGObject Introspection (hereafter &amp;quot;PyGI&amp;quot;). More background info can be found at [[Features/GTK3]]. Goal of this hackfest is to remove the biggest blockers before we can start the porting and potentially start porting over.&lt;br /&gt;
&lt;br /&gt;
[[File:Brmlab_impressions.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Event Details ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Location:&#039;&#039;&#039; Praha (Prague), Czech Republic&lt;br /&gt;
&lt;br /&gt;
The hackfest will be held at the [http://brmlab.cz/| brmlab a hackerspace in Prague]. The place is located [http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Bubensk%C3%A1+1,+Praha-Praha+7,+%C4%8Cesk%C3%A1+republika&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=65.390746,135.263672&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Bubensk%C3%A1+1477/1,+170+00+Praha+7-Hole%C5%A1ovice,+Czech+Republic&amp;amp;view=map|Map here], using [http://idos.dpp.cz/idos/ConnForm.aspx?tt=pid&amp;amp;cl=E5|Prague public transport] you can get here easily, just hop off at (Metro &amp;amp; Tram stop: &amp;quot;Vltavska&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date:&#039;&#039;&#039; Friday, October 28th - Sunday October 30th 2011&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary contact:&#039;&#039;&#039; Simon Schampijer &amp;lt;simon AT laptop DOT org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secondary contact:&#039;&#039;&#039; Tomeu Vizoso &amp;lt;tomeu.vizoso AT collabora DOT co DOT uk&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Target audience ==&lt;br /&gt;
Sugar developers&lt;br /&gt;
&lt;br /&gt;
== Sponsors ==&lt;br /&gt;
[[File:Brmlab.jpg|300px]] We want to thank [http://brmlab.cz/| brmlab] for hosting us during the week.&lt;br /&gt;
&lt;br /&gt;
[[File:Olpc_logo.png|300px]] We want to thank the [http://laptop.org OLPC Foundation] for sponsoring regional trips to the event.&lt;br /&gt;
&lt;br /&gt;
== Sponsoring regional trips ==&lt;br /&gt;
This Hackfest is sponsored by the [http://laptop.org OLPC Foundation]. If you need help for funding your travel, please send an email to simon AT laptop DOT org before 8th of October 2011. We won&#039;t be able to refund more than 150 USD per trip, and we will fund regional (european) travels in priority.&lt;br /&gt;
&lt;br /&gt;
== Agenda, goals ==&lt;br /&gt;
* Removing Hippo and other custom widgets&lt;br /&gt;
** Do we do this before or after GTK3? Note transparent window / icon overlapping issue.&lt;br /&gt;
* migration path to Gtk3 (do we ship two toolkits? Do we migrate the shell and the toolkit and activities at once?)&lt;br /&gt;
** This is expected to be resolved in advance at [[Features/GTK3]].&lt;br /&gt;
* porting Sugar&#039;s theme to gtk3 (go benzea, go!)&lt;br /&gt;
* Port sugar-toolkit to GTK3 and release sugar-toolkit-0.95.x&lt;br /&gt;
* Port Read to GTK3&lt;br /&gt;
* Port Browse to Webkit/GTK3&lt;br /&gt;
* other introspected libraries that need work (namely NM)&lt;br /&gt;
&lt;br /&gt;
== Measuring your success ==&lt;br /&gt;
&#039;&#039;coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Attendants ==&lt;br /&gt;
&lt;br /&gt;
Are you planning to attend?  Add your name and contact info below!&lt;br /&gt;
# [[User:Erikos | Simon Schampijer]]&lt;br /&gt;
# [[User:Tomeu | Tomeu Vizoso]]&lt;br /&gt;
# [[User:Rgs | Raúl Gutiérrez Segalés]]&lt;br /&gt;
# [[User:Walter | Walter Bender]]&lt;br /&gt;
# [[User:BenjaminBerg | Benjamin Berg]]&lt;br /&gt;
# [[User:DanielDrake | Daniel Drake]]&lt;br /&gt;
# [[User:marcopg|Marco Pesenti Gritti]]&lt;br /&gt;
# [[User:Cjb|Chris Ball]] (just for Friday, in Prague 22-28 Oct for Kernel Summit/LinuxCon)&lt;br /&gt;
# [[User:tch|Martin Abente Lahaye]]&lt;br /&gt;
&lt;br /&gt;
== Accommodation ==&lt;br /&gt;
This is a table to find out when people do need accommodation during the hackfest.&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=3 style=&amp;quot;border: 1px solid white; border-collapse: collapse; background: #e3e4e5;&amp;quot;&lt;br /&gt;
 |-style=&amp;quot;background:#787878; color: white;&amp;quot;&lt;br /&gt;
! Name !! 27.10.11 !! 28.10.11 !! 29.10.11 !! 30.10.11 !! 31.10.11 !! Note&lt;br /&gt;
|-&lt;br /&gt;
! Simon Schampijer&lt;br /&gt;
| - || yes || yes || yes || - || -&lt;br /&gt;
|-&lt;br /&gt;
! Raúl Gutiérrez Segalés&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Walter Bender&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Benjamin Berg&lt;br /&gt;
| - || yes || yes || yes || - || Arriving 28.10. 10:15; leaving 31.10. 18:31 Uhr&lt;br /&gt;
|-&lt;br /&gt;
! Daniel Drake&lt;br /&gt;
| - || yes || yes || yes || - || travel confirmed: arriving 28th at 10:20, leaving 31st at 06:00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Lodging ==&lt;br /&gt;
This one does seem to be a reasonable offer: http://www.booking.com/hotel/cz/plus-prague-hostel.en-us.html?sid=efb1e369a800d8137da1013763ae00e9;checkin=2011-10-27;checkout=2011-10-30;srfid=8d0e0147ab19098770fd94887bfca1e1X1&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
=== Friday, October 28 ===&lt;br /&gt;
&lt;br /&gt;
=== Saturday, October 29 ===&lt;br /&gt;
&lt;br /&gt;
=== Sunday, October 30 ===&lt;br /&gt;
&lt;br /&gt;
== Impressions ==&lt;br /&gt;
&#039;&#039;link your photos, add your comments here&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Event]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=69055</id>
		<title>Marketing Team/Events/Gtk3 Hackfest 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=69055"/>
		<updated>2011-09-04T22:45:39Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Accommodation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
= Gtk3 Hackfest 2011 =&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, PyGTK, the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of PyGObject Introspection (hereafter &amp;quot;PyGI&amp;quot;). More background info can be found at [[Features/GTK3]]. Goal of this hackfest is to remove the biggest blockers before we can start the porting and potentially start porting over.&lt;br /&gt;
&lt;br /&gt;
[[File:Brmlab_impressions.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Event Details ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Location:&#039;&#039;&#039; Praha (Prague), Czech Republic&lt;br /&gt;
&lt;br /&gt;
The hackfest will be held at the [http://brmlab.cz/| brmlab a hackerspace in Prague]. The place is located [http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Bubensk%C3%A1+1,+Praha-Praha+7,+%C4%8Cesk%C3%A1+republika&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=65.390746,135.263672&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Bubensk%C3%A1+1477/1,+170+00+Praha+7-Hole%C5%A1ovice,+Czech+Republic&amp;amp;view=map|Map here], using [http://idos.dpp.cz/idos/ConnForm.aspx?tt=pid&amp;amp;cl=E5|Prague public transport] you can get here easily, just hop off at (Metro &amp;amp; Tram stop: &amp;quot;Vltavska&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date:&#039;&#039;&#039; Friday, October 28th - Sunday October 30th 2011&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary contact:&#039;&#039;&#039; Simon Schampijer &amp;lt;simon AT laptop DOT org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secondary contact:&#039;&#039;&#039; Tomeu Vizoso &amp;lt;tomeu.vizoso AT collabora DOT co DOT uk&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Target audience ==&lt;br /&gt;
Sugar developers&lt;br /&gt;
&lt;br /&gt;
== Sponsors ==&lt;br /&gt;
[[File:Brmlab.jpg|300px]] We want to thank [http://brmlab.cz/| brmlab] for hosting us during the week.&lt;br /&gt;
&lt;br /&gt;
[[File:Olpc_logo.png|300px]] We want to thank the [http://laptop.org OLPC Foundation] for sponsoring regional trips to the event.&lt;br /&gt;
&lt;br /&gt;
== Sponsoring regional trips ==&lt;br /&gt;
This Hackfest is sponsored by the [http://laptop.org OLPC Foundation]. If you need help for funding your travel, please send an email to simon AT laptop DOT org before 8th of October 2011. We won&#039;t be able to refund more than 150 USD per trip, and we will fund regional (european) travels in priority.&lt;br /&gt;
&lt;br /&gt;
== Agenda, goals ==&lt;br /&gt;
* Removing Hippo and other custom widgets&lt;br /&gt;
* migration path to Gtk3 (do we ship two toolkits? Do we migrate the shell and the toolkit and activities at once?)&lt;br /&gt;
** This is expected to be resolved in advance at [[Features/GTK3]].&lt;br /&gt;
* porting Sugar&#039;s theme to gtk3 (go benzea, go!)&lt;br /&gt;
* Port sugar-toolkit to GTK3 and release sugar-toolkit-0.95.x&lt;br /&gt;
* Port Read to GTK3&lt;br /&gt;
* Port Browse to Webkit/GTK3&lt;br /&gt;
* other introspected libraries that need work (namely NM)&lt;br /&gt;
&lt;br /&gt;
== Measuring your success ==&lt;br /&gt;
&#039;&#039;coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Attendants ==&lt;br /&gt;
&lt;br /&gt;
Are you planning to attend?  Add your name and contact info below!&lt;br /&gt;
# [[User:Erikos | Simon Schampijer]]&lt;br /&gt;
# [[User:Tomeu | Tomeu Vizoso]]&lt;br /&gt;
# [[User:Rgs | Raúl Gutiérrez Segalés]]&lt;br /&gt;
# [[User:Walter | Walter Bender]]&lt;br /&gt;
# [[User:BenjaminBerg | Benjamin Berg]]&lt;br /&gt;
# [[User:DanielDrake | Daniel Drake]]&lt;br /&gt;
# [[User:marcopg|Marco Pesenti Gritti]]&lt;br /&gt;
&lt;br /&gt;
== Accommodation ==&lt;br /&gt;
This is a table to find out when people do need accommodation during the hackfest.&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=3 style=&amp;quot;border: 1px solid white; border-collapse: collapse; background: #e3e4e5;&amp;quot;&lt;br /&gt;
 |-style=&amp;quot;background:#787878; color: white;&amp;quot;&lt;br /&gt;
! Name !! 27.10.11 !! 28.10.11 !! 29.10.11 !! 30.10.11 !! 31.10.11 !! Note&lt;br /&gt;
|-&lt;br /&gt;
! Simon Schampijer&lt;br /&gt;
| - || yes || yes || yes || - || -&lt;br /&gt;
|-&lt;br /&gt;
! Raúl Gutiérrez Segalés&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Walter Bender&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Benjamin Berg&lt;br /&gt;
| - || yes || yes || yes || - || Arriving 28.10. 10:15; leaving 31.10. 18:31 Uhr&lt;br /&gt;
|-&lt;br /&gt;
! Daniel Drake&lt;br /&gt;
| - || yes || yes || yes || - || travel confirmed: arriving 28th at 10:20, leaving 31st at 06:00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Lodging ==&lt;br /&gt;
This one does seem to be a reasonable offer: http://www.booking.com/hotel/cz/plus-prague-hostel.en-us.html?sid=efb1e369a800d8137da1013763ae00e9;checkin=2011-10-27;checkout=2011-10-30;srfid=8d0e0147ab19098770fd94887bfca1e1X1&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
=== Friday, October 28 ===&lt;br /&gt;
&lt;br /&gt;
=== Saturday, October 29 ===&lt;br /&gt;
&lt;br /&gt;
=== Sunday, October 30 ===&lt;br /&gt;
&lt;br /&gt;
== Impressions ==&lt;br /&gt;
&#039;&#039;link your photos, add your comments here&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Event]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=68918</id>
		<title>Marketing Team/Events/Gtk3 Hackfest 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=68918"/>
		<updated>2011-09-01T16:33:02Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Agenda, goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
= Gtk3 Hackfest 2011 =&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, PyGTK, the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of PyGObject Introspection (hereafter &amp;quot;PyGI&amp;quot;). More background info can be found at [[Features/GTK3]]. Goal of this hackfest is to remove the biggest blockers before we can start the porting and potentially start porting over.&lt;br /&gt;
&lt;br /&gt;
[[File:Brmlab_impressions.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Event Details ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Location:&#039;&#039;&#039; Praha (Prague), Czech Republic&lt;br /&gt;
&lt;br /&gt;
The hackfest will be held at the [http://brmlab.cz/| brmlab a hackerspace in Prague]. The place is located [http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Bubensk%C3%A1+1,+Praha-Praha+7,+%C4%8Cesk%C3%A1+republika&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=65.390746,135.263672&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Bubensk%C3%A1+1477/1,+170+00+Praha+7-Hole%C5%A1ovice,+Czech+Republic&amp;amp;view=map|Map here], using [http://idos.dpp.cz/idos/ConnForm.aspx?tt=pid&amp;amp;cl=E5|Prague public transport] you can get here easily, just hop off at (Metro &amp;amp; Tram stop: &amp;quot;Vltavska&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date:&#039;&#039;&#039; Friday, October 28th - Sunday October 30th 2011&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary contact:&#039;&#039;&#039; Simon Schampijer &amp;lt;simon AT laptop DOT org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secondary contact:&#039;&#039;&#039; Tomeu Vizoso &amp;lt;tomeu.vizoso AT collabora DOT co DOT uk&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Target audience ==&lt;br /&gt;
Sugar developers&lt;br /&gt;
&lt;br /&gt;
== Sponsors ==&lt;br /&gt;
[[File:Brmlab.jpg|300px]] We want to thank [http://brmlab.cz/| brmlab] for hosting us during the week.&lt;br /&gt;
&lt;br /&gt;
[[File:Olpc_logo.png|300px]] We want to thank the [http://laptop.org OLPC Foundation] for sponsoring regional trips to the event.&lt;br /&gt;
&lt;br /&gt;
== Sponsoring regional trips ==&lt;br /&gt;
This Hackfest is sponsored by the [http://laptop.org OLPC Foundation]. If you need help for funding your travel, please send an email to simon AT laptop DOT org before 8th of October 2011. We won&#039;t be able to refund more than 150 USD per trip, and we will fund regional (european) travels in priority.&lt;br /&gt;
&lt;br /&gt;
== Agenda, goals ==&lt;br /&gt;
* Removing Hippo and other custom widgets&lt;br /&gt;
* migration path to Gtk3 (do we ship two toolkits? Do we migrate the shell and the toolkit and activities at once?)&lt;br /&gt;
** This is expected to be resolved in advance at [[Features/GTK3]].&lt;br /&gt;
* porting Sugar&#039;s theme to gtk3 (go benzea, go!)&lt;br /&gt;
* Port sugar-toolkit to GTK3 and release sugar-toolkit-0.95.x&lt;br /&gt;
* Port Read to GTK3&lt;br /&gt;
* Port Browse to Webkit/GTK3&lt;br /&gt;
* other introspected libraries that need work (namely NM)&lt;br /&gt;
&lt;br /&gt;
== Measuring your success ==&lt;br /&gt;
&#039;&#039;coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Attendants ==&lt;br /&gt;
&lt;br /&gt;
Are you planning to attend?  Add your name and contact info below!&lt;br /&gt;
# [[User:Erikos | Simon Schampijer]]&lt;br /&gt;
# [[User:Tomeu | Tomeu Vizoso]]&lt;br /&gt;
# [[User:Rgs | Raúl Gutiérrez Segalés]]&lt;br /&gt;
# [[User:Walter | Walter Bender]]&lt;br /&gt;
# [[User:BenjaminBerg | Benjamin Berg]]&lt;br /&gt;
# [[User:DanielDrake | Daniel Drake]]&lt;br /&gt;
&lt;br /&gt;
== Accommodation ==&lt;br /&gt;
This is a table to find out when people do need accommodation during the hackfest.&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=3 style=&amp;quot;border: 1px solid white; border-collapse: collapse; background: #e3e4e5;&amp;quot;&lt;br /&gt;
 |-style=&amp;quot;background:#787878; color: white;&amp;quot;&lt;br /&gt;
! Name !! 27.10.11 !! 28.10.11 !! 29.10.11 !! 30.10.11 !! 31.10.11 !! Note&lt;br /&gt;
|-&lt;br /&gt;
! Simon Schampijer&lt;br /&gt;
| - || yes || yes || yes || - || -&lt;br /&gt;
|-&lt;br /&gt;
! Raúl Gutiérrez Segalés&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Walter Bender&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Benjamin Berg&lt;br /&gt;
| - || yes || yes || yes || - || Arriving 28.10. 10:15; leaving 31.10. 18:31 Uhr&lt;br /&gt;
|-&lt;br /&gt;
! Daniel Drake&lt;br /&gt;
| - || yes || yes || yes || - || travel not booked yet, should happen soon though!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Lodging ==&lt;br /&gt;
This one does seem to be a reasonable offer: http://www.booking.com/hotel/cz/plus-prague-hostel.en-us.html?sid=efb1e369a800d8137da1013763ae00e9;checkin=2011-10-27;checkout=2011-10-30;srfid=8d0e0147ab19098770fd94887bfca1e1X1&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
=== Friday, October 28 ===&lt;br /&gt;
&lt;br /&gt;
=== Saturday, October 29 ===&lt;br /&gt;
&lt;br /&gt;
=== Sunday, October 30 ===&lt;br /&gt;
&lt;br /&gt;
== Impressions ==&lt;br /&gt;
&#039;&#039;link your photos, add your comments here&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Event]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3&amp;diff=68917</id>
		<title>Features/GTK3</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3&amp;diff=68917"/>
		<updated>2011-09-01T16:30:50Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Hackfests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{TOCright}}&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|GTK3]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sugar needs to rebase itself on new generations of its key underlying technologies: GTK+ 3 and PyGObject Introspection.&#039;&#039;&#039; Sugar is already somewhat broken on recent distribution versions as a result of this. This page aims to summarise options and community opinions around this challenging shift, and to help formulate a plan of how it will be executed. In other words, it tries to take community input, answer all the unanswered questions, and present a logical path forward that can be adopted by the developers.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* This plan/proposal maintained by [[User:DanielDrake|Daniel Drake]] (other editors welcome!)&lt;br /&gt;
* A number of developers will be needed at each stage to successfully execute this; Daniel offers his assistance for a coordination/oversight role if that would be useful.&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: &amp;lt;b&amp;gt;0.96&amp;lt;/b&amp;gt; (at least for sugar-toolkit port)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
At the Desktop summit, Raul Gutierrez Segales, Benjamin Berg and Paul Proteus successfully [http://www.mail-archive.com/sugar-devel@lists.sugarlabs.org/msg22070.html prototyped] some of the ideas below. After only a few hours of effort, a minimal Sugar GTK3 activity was running alongside GTK2 activities. The plan below should therefore be quite credible, but some prerequisites remain.&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, [http://pygtk.org/ PyGTK], the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of [http://live.gnome.org/PyGObject/IntrospectionPorting PyGObject Introspection] (hereafter &amp;quot;PyGI&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
In order to remain innovative and current, and to take advantage of the latest developments, Sugar needs to follow suit and move to GTK3 and PyGI. Lagging behind on this conversion is already bringing negative consequences to Sugar; notably 2 of our most important activities (Read and Browse) are already broken and without a future until we catch up again.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this is an API-incompatible change. As confirmed by the PyGI developers, PyGTK and PyGI cannot be mixed in the same process. This means that the conversion process can&#039;t be done on a fine, incremental basis, and if sugar-toolkit were to be simply replaced with a PyGI/GTK3 port, this means that all existing activities would stop working until they themselves have also been ported - &amp;lt;b&amp;gt;all activities will need modifications as part of this feature&amp;lt;/b&amp;gt;. The community has expressed desire for old activities to continue working (many are unmaintained); unfortunately this is not realistic in the long term. As a compromise, this feature discussion includes the requirement that for a certain period of time, both PyGTK/GTK2 and PyGI/GTK3 activities must be able to function alongside each other. As detailed below, this can be pulled off quite easily and in a way that will not drain resources.&lt;br /&gt;
&lt;br /&gt;
This project will involve modifications to almost every file within Sugar and its activities, making it a huge task, even though the vast majority of code is trivial to port. This feature discussion attempts to identify ways that this porting process can be done in distinct stages, where Sugar remains functional at the completion of each stage, making this more manageable.&lt;br /&gt;
&lt;br /&gt;
For the most part, the port from PyGTK to PyGI only involves changing the names that are used to access methods and constants. PyGI uses a slightly different and more consistent naming scheme to wrap GTK+.&lt;br /&gt;
&lt;br /&gt;
 import gtk&lt;br /&gt;
 gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, &amp;quot;Hello World&amp;quot;).run()&lt;br /&gt;
&lt;br /&gt;
The above PyGTK code rewritten as PyGI is:&lt;br /&gt;
&lt;br /&gt;
 from gi.repository import Gtk&lt;br /&gt;
 Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, Gtk.ButtonsType.CLOSE, &amp;quot;Hello World&amp;quot;).run()&lt;br /&gt;
&lt;br /&gt;
PyGI provides a script which can be used to automate much of the conversion.&lt;br /&gt;
&lt;br /&gt;
The move from GTK2 to GTK3 is also expected to be unproblematic, because the vast majority of code does not need any changes - most GTK3 API/ABI is identical to GTK2. The cases which do require some intervention to solve will take some time, but the changes are [http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html well documented] and the number of cases encountered should be low.&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
# PyGI is technologically better than PyGTK. It is a nicer way of calling into GObject-style libraries from Python that means less maintenance is needed upstream (PyGObject automates the creation of bindings to a degree much higher than PyGTK ever could, and automatically achieves more complete coverage).&lt;br /&gt;
# PyGTK is no longer maintained; PyGI is actively maintained.&lt;br /&gt;
# The move to GTK3 allows us to [http://blog.tomeuvizoso.net/2011/05/time-to-port-your-python-application-to.html keep up with our GNOME neighbours], as they improve and refine the base technologies that we share.&lt;br /&gt;
# The move to PyGI is expected to result in [http://blog.tomeuvizoso.net/2009/05/reducing-sugars-memory-usage.html lower memory usage and faster startup].&lt;br /&gt;
# Browse has no future under GTK2 and is &#039;&#039;&#039;already broken&#039;&#039;&#039;, it [[Features/WebKit|needs to move to WebKit]] and that move is dependent on Sugar moving to PyGI/GTK3.&lt;br /&gt;
# Similarly, Read is &#039;&#039;&#039;already broken&#039;&#039;&#039; under GTK2 due to static evince bindings no longer being maintained and libevince itself moved to GTK3; we need to switch to PyGI/GTK3 to be able to keep calling into evince and let the Read activity live on.&lt;br /&gt;
&lt;br /&gt;
== Implementation Plan ==&lt;br /&gt;
&lt;br /&gt;
Sugar is divided into different components, many of which run in different processes. This means that we are able to divide up the required work on a process-by-process basis. While this work is being conducted, some Sugar processes might be based on PyGI/GTK3 and others based on PyGTK/GTK2, but the platform would keep functioning at each stage. There would be some system resource overhead during this transitional time (as the system would need to have PyGTK, GTK2, PyGI and GTK3 all in memory) but this feature implementation would end with the whole sugar ecosystem using PyGI/GTK3.&lt;br /&gt;
&lt;br /&gt;
=== HippoCanvas removal ===&lt;br /&gt;
&lt;br /&gt;
A prerequisite to porting a Sugar process, component or activity is to remove all its usage of hippocanvas. This library is unmaintained, would be painful to port to GTK3, and can be done better with standard GTK+ code at the Python level. Most users of HippoCanvas can switch to custom GtkContainer widgets.&lt;br /&gt;
&lt;br /&gt;
One complication is that hippo usage is not limited to Sugar&#039;s core; some activities use hippo, or they pull on sugar-toolkit classes which are implemented with hippo. These are: Chat (&amp;lt;em&amp;gt;please list others here&amp;lt;/em&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Theme porting ===&lt;br /&gt;
&lt;br /&gt;
One major internal change in GTK3 is the way that themes are designed. GTK2 allowed themes to be implemented with a special format in a gtkrc file, but GTK3 now requires that themes are implemented using CSS. Therefore another non-trivial prerequisite for a GTK3-based sugar release of any visual component is the porting of the theme.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the gtkrc file format does not seem to be too far away from css (i.e. it applies attributes to classes in a textual format), and css is well known and well documented, so hopefully this is not a major challenge. For an example of the old GTK2 style, see &amp;lt;tt&amp;gt;/usr/share/themes/Adwaita/gtk-2.0/gtkrc&amp;lt;/tt&amp;gt;, and for a GTK3 CSS example see &amp;lt;tt&amp;gt;/usr/share/themes/Adwaita/gtk-3.0/gtk-widgets.css&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backwards-compatibility for activities ===&lt;br /&gt;
&lt;br /&gt;
As mentioned above, as mixing PyGTK/GTK2 and PyGI/GTK3 is impossible, a straightforward port of sugar-toolkit to PyGI/GTK3 would break all activities. However, having backwards compatibility for activities for a limited time is considered a requirement, and having a &amp;quot;flag day&amp;quot; where all activities stop working until ported is not seen as an option - there must be a transition period.&lt;br /&gt;
&lt;br /&gt;
As the conversion process from PyGTK to PyGI makes minor changes to almost every single line of code that involves GTK/glib, maintaining both PyGI and PyGTK codepaths in the same files is not realistic (there would be an unrealistic amount of &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; conditions). &amp;lt;b&amp;gt;We are therefore required to have two copies of sugar-toolkit during the transition period&amp;lt;/b&amp;gt;: one for ported PyGI/GTK3 activities, and another for PyGTK/GTK2 activities that have not yet been ported.&lt;br /&gt;
&lt;br /&gt;
As we do not have plentiful developer resources, I propose that the PyGTK/GTK2 version of sugar-toolkit is frozen as soon as this feature development is underway. No bugfixes or improvements, just a copy of the code at that point.&lt;br /&gt;
&lt;br /&gt;
The GTK3 version of sugar-toolkit would be installed under a new module named &amp;lt;b&amp;gt;sugar1&amp;lt;/b&amp;gt;, distinguishing it from the frozen GTK2 &amp;lt;b&amp;gt;sugar&amp;lt;/b&amp;gt; version to be removed later. All code will need extensive textual changes in moving to GTK3, changing &amp;quot;import sugar.foo&amp;quot; to &amp;quot;import sugar1.foo&amp;quot; will just be another step in that process.&lt;br /&gt;
&lt;br /&gt;
The removal of the GTK2 sugar-toolkit version would happen one year after the first stable release of a sugar-toolkit that includes GTK3 support. In this context, &#039;removal&#039; means that it gets deleted from the sugar-toolkit master branch of the git tree. Old versions of sugar-toolkit will of course be left available, in old git branches and release tarballs.&lt;br /&gt;
&lt;br /&gt;
=== Proposed plan of action ===&lt;br /&gt;
&lt;br /&gt;
The steps below prioritise the porting of sugar-toolkit, as this is where Sugar would see the most immediate benefit: the revival of Browse and Read. The steps that follow can largely be parallelised; the important bit is placing sugar-toolkit first in line.&lt;br /&gt;
&lt;br /&gt;
# Remove hippocanvas from sugar-toolkit&lt;br /&gt;
# Port sugar theme to GTK3&lt;br /&gt;
# Port sugar-toolkit to GTK3 while keeping backwards compatibility, release as sugar-toolkit-0.95.x&lt;br /&gt;
# Rescue Browse and Read, and allow independent activity porting efforts to begin&lt;br /&gt;
# Remove hippocanvas from all other parts of Sugar, including activities&lt;br /&gt;
# Port Sugar core to GTK3&lt;br /&gt;
# Remove sugar-toolkit&#039;s GTK2 compatibility one year after the first GTK3 sugar-toolkit stable release&lt;br /&gt;
&lt;br /&gt;
=== How to port ===&lt;br /&gt;
&lt;br /&gt;
I plan to start a page at [[Features/GTK3/Porting]] that details the porting process, that could be provided as documentation to anyone involved in these efforts (including those working on porting Sugar core, but also those working on activities). The content covered will be:&lt;br /&gt;
&lt;br /&gt;
# How to remove hippo and what to replace it with (links to commits that have done this for other activities, etc)&lt;br /&gt;
# How to select the GTK3 version of sugar-toolkit&lt;br /&gt;
# How to handle each of the sugar-toolkit API changes (detailed in the following section)&lt;br /&gt;
# How to port from PyGTK/GTK2 to PyGI/GTK3.&lt;br /&gt;
#* This basically involves reading the [https://live.gnome.org/PyGObject/IntrospectionPorting PyGObject porting documentation], using pygi-convert.sh, then checking the result.&lt;br /&gt;
#* The [http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html Migrating from GTK+ 2.x to GTK+ 3] should also be read.&lt;br /&gt;
&lt;br /&gt;
== Other considerations ==&lt;br /&gt;
&lt;br /&gt;
=== Version number ===&lt;br /&gt;
&lt;br /&gt;
It goes without saying that such a migration would be the basis of a new major release. When this topic has been discussed before, people have toyed with the idea of calling the GTK3 version of Sugar &amp;quot;Sugar-1.0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are arguments for:&lt;br /&gt;
* This is undoubtedly a paradigm shift for Sugar, so a major bump to the version number is called for.&lt;br /&gt;
* It would make the change really obvious&lt;br /&gt;
&lt;br /&gt;
And there are arguments against:&lt;br /&gt;
* Some people might interpret the number 1.0 as indicating a higher level of maturity than what the developers feel&lt;br /&gt;
* Some developers have very specific ideas about what should be included in Sugar-1.0, even if development of such items is barely even on the horizon&lt;br /&gt;
* Some people want a much longer lead-up time to Sugar-1.0 so that the API can be refined/reworked/perfected&lt;br /&gt;
&lt;br /&gt;
Tomeu, Simon and Marco agreed that the 1.0 version number could be used here, and communicated in a slightly different sense: &amp;quot;we are really still in the first iteration and 1.0 will be when that first iteration reaches maturity, without big changes in the API. After 1.0 we can start working on what will be one day 2.0 which should be the second iteration of Sugar, hopefully using what we have learned during these years.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, current Sugar developers feel strongly that the changes described here are not significant to warrant a major version bump and have specific ideas about what should be included in a 1.0 release. Therefore, in the interest of being slightly less intrusive, this feature does not ultimately propose a version numbering change - it is planned that sugar-toolkit-0.96 will be released as the first with GTK3 support, and once we reach sugar-0.98, the next releases will be 0.100, 0.102, etc.&lt;br /&gt;
&lt;br /&gt;
=== Retaining the &#039;sugar&#039; module name ===&lt;br /&gt;
&lt;br /&gt;
The strategy suggested above involves the GTK3 sugar-toolkit version being installed with the &#039;sugar1&#039; module name. It would be possible to retain the &#039;sugar&#039; name for this module via a Python trick documented below, but it appears that there is no demand for this from the community. Porting to GTK3 requires major textual changes anyway, changing &#039;sugar&#039; to &#039;sugar1&#039; in the same files is therefore regarded as acceptable. Here is how the naming trick could be done anyway:&lt;br /&gt;
&lt;br /&gt;
* The new GTK3 version of sugar toolkit would be installed with name &amp;lt;tt&amp;gt;sugar&amp;lt;/tt&amp;gt;, and the old GTK2 version would be installed with name &amp;lt;tt&amp;gt;sugar_gtk2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Before &amp;lt;tt&amp;gt;sugar-activity&amp;lt;/tt&amp;gt; imports sugar.activity (or any other sugar-toolkit class), it would look for an empty file called &amp;quot;GTK3_PORTED&amp;quot; in the activity&#039;s directory. If present, it would run a little trick:&lt;br /&gt;
 import os&lt;br /&gt;
 import sys&lt;br /&gt;
 if not os.path.exists(&amp;quot;GTK3_PORTED&amp;quot;):&lt;br /&gt;
     import sugar_gtk2&lt;br /&gt;
     sys.modules[&amp;quot;sugar&amp;quot;] = sugar_gtk2&lt;br /&gt;
* The result is that all unported/unmodified activities (without the GTK3_PORTED file) would &amp;lt;tt&amp;gt;import sugar.foo&amp;lt;/tt&amp;gt; as before, but the above trick that modifies Python&#039;s module table would result in them (transparently, magically, automatically) being redirected to sugar_gtk2.foo.&lt;br /&gt;
* At the end of the transition period, sugar_gtk2 would be deleted in entirity, the above addition to sugar-activity would be dropped, and activities could drop the GTK3_PORTED files at their leisure.&lt;br /&gt;
&lt;br /&gt;
Further consideration would need to be given to sugar-base. This package installs some classes which are then used by sugar-toolkit, so they would need to be duplicated into sugar_gtk2.&lt;br /&gt;
&lt;br /&gt;
=== Python 3 ===&lt;br /&gt;
&lt;br /&gt;
Is it worth throwing in a Python 3 migration into this project? I have researched the issue, and my opinion is: no.&lt;br /&gt;
&lt;br /&gt;
* Python 3 brings no immediate obvious benefit, and does not fix any pressing problems. On the other hand, PyGI solves some clear breakage for us.&lt;br /&gt;
* Python 3 (or rather the code that supports it) is not mature. Many modules are still Python2-only.&lt;br /&gt;
* PyGI does support Python 3, but it was [http://mail.gnome.org/archives/python-hackers-list/2011-July/msg00000.html broken] when I tried it. It is not seeing much attention.&lt;br /&gt;
* Our neighbours within GNOME and other open source projects are only just starting to play with Python 3. There is not much similar experience we can build upon. There may be teething problems, such as modules that Sugar uses that haven&#039;t been ported, and bugs in existing ports due to lack of use (such as the fact that PyGI was broken for quite a while with nobody noticing) that hold us back. This is not so for the PyGI transition, where we can look at many PyGTK applications that have been ported and that are actively used.&lt;br /&gt;
* J5 (PyGI developer) suggested that we avoid combining the 2 migrations. It would add more change to an already disruptive project, and increases the risk. It would be better to limit the amount of change we introduce, so that risk is more manageable and to decrease the number of problems and challenges that we face.&lt;br /&gt;
* If the above situation does change, the Python 3 migration will be much easier than this one. Py3 migration does not require invasive code changes. It will be much easier to have Python 2 and 3 support maintained in parallel. The few existing projects that have done this are able to maintain Python2 and Python3 support in the same codebase, without too many if conditions. The &amp;quot;if we&#039;re already making so much change, why not avoid a future migration period by including Py3&amp;quot; argument is not very strong, because the Py3 migration will be much smoother and less complex.&lt;br /&gt;
&lt;br /&gt;
== API changes ==&lt;br /&gt;
&lt;br /&gt;
The fact that almost all Sugar components and activities require sweeping changes as part of this shift presents an interesting opportunity for us to make API changes in sugar-toolkit. The importance here should still be placed on the technology shift, rather than on the opportunity to produce a perfect API (which we could spend all eternity designing and discussing), but this is an opportunity that we should not miss.&lt;br /&gt;
&lt;br /&gt;
I propose that once sugar-toolkit is ported and mostly operational, we run a 30-day window where API changes that have seen some kind of planning and discussion below can be made and committed.&lt;br /&gt;
&lt;br /&gt;
=== Plain text as the default for palettes ===&lt;br /&gt;
&lt;br /&gt;
Sugar&#039;s palette classes currently accept strings, but then they pass those strings to GTK as markup (always, unconditionally). However, markup is only used in a handful of places, and this means that all users of palettes that draw in translations or strings from other sources which might contain characters such as &amp;lt; or &amp;gt; must escape their arguments, leading to big patches [http://article.gmane.org/gmane.comp.education.sugar.devel/32398 like this].&lt;br /&gt;
&lt;br /&gt;
As agreed [http://article.gmane.org/gmane.linux.laptop.olpc.sugar/30466 here], it would make more sense for palettes to pass those strings as standard text by default, and to have different functions to opt-in to receive markup processing. Then the excessive escaping would go, and the only users would have to escape would be those who use markup.&lt;br /&gt;
&lt;br /&gt;
=== Removal of keep button ===&lt;br /&gt;
&lt;br /&gt;
Sugar-0.94 proposes the [http://article.gmane.org/gmane.linux.laptop.olpc.sugar/30771 removal of the Keep button], but the old KeepButton classes would be kept around for activities that directly use it. Porting sugar-toolkit to GTK3 would be a good time to remove these classes.&lt;br /&gt;
&lt;br /&gt;
=== Removal of old toolbars ===&lt;br /&gt;
&lt;br /&gt;
Sugar-0.86 [[Features/New_Toolbar_Design|redesigned activity toolbars]], with the new toolbars implemented by new classes, and the old classes being kept around so that old activities are not immediately broken. This would be a good opportunity to remove the long-deprecated old activity toolbar classes.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
Sugar would start depending on PyGObject built with gobject introspection support, GTK3, and (at the end of the transition period) would drop its dependencies on GTK2 and PyGTK.&lt;br /&gt;
&lt;br /&gt;
== Contingency plan ==&lt;br /&gt;
&lt;br /&gt;
Hopefully, this page has been convincing in that this change is of necessity. Either way, we should consider our options for the case where this migration is found to be more difficult than predicted.&lt;br /&gt;
&lt;br /&gt;
As this migration would take over the course of a major release (or perhaps 2-3 of them, as components are ported individually), our users have the option to remain on older releases in the face of stability issues, and as developers we have the option of delaying major releases until things are ready.&lt;br /&gt;
&lt;br /&gt;
If new PyGI/GTK3-based major releases are found to be unstable, we also have the option of allowing interested community members to pick up maintenance of older GTK2-based release branches (e.g. 0.94) with a &amp;quot;master first&amp;quot; commit policy. Personally, I would suggest that it would be a better use of resources to have those people help fix any problems with the GTK3 version, but as an open source community this is something we must be open to.&lt;br /&gt;
&lt;br /&gt;
In the event of problems in the GTK3 version of sugar-toolkit, activity authors have the (default) choice of staying with GTK2. The transition period before the GTK2 version is removed would obviously be extended in the face of significant problems with GTK3 version.&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&lt;br /&gt;
== Hackfests ==&lt;br /&gt;
&lt;br /&gt;
This work would benefit from some focused attention at in-person meetings.&lt;br /&gt;
&lt;br /&gt;
See [[Features/GTK3/DesktopSummitActivities]] for earlier desktop summit ideas.&lt;br /&gt;
&lt;br /&gt;
On September 10th-12th, a SugarCamp will be held in Paris. We will be working on this plan at the event, starting with the prerequisites.&lt;br /&gt;
&lt;br /&gt;
On October 28th-30th, a hackfest will be held in Prague with the specific purpose of implementing this plan: [[Marketing_Team/Events/Gtk3_Hackfest_2011]]&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3&amp;diff=68916</id>
		<title>Features/GTK3</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3&amp;diff=68916"/>
		<updated>2011-09-01T16:23:30Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Version number */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{TOCright}}&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|GTK3]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sugar needs to rebase itself on new generations of its key underlying technologies: GTK+ 3 and PyGObject Introspection.&#039;&#039;&#039; Sugar is already somewhat broken on recent distribution versions as a result of this. This page aims to summarise options and community opinions around this challenging shift, and to help formulate a plan of how it will be executed. In other words, it tries to take community input, answer all the unanswered questions, and present a logical path forward that can be adopted by the developers.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* This plan/proposal maintained by [[User:DanielDrake|Daniel Drake]] (other editors welcome!)&lt;br /&gt;
* A number of developers will be needed at each stage to successfully execute this; Daniel offers his assistance for a coordination/oversight role if that would be useful.&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: &amp;lt;b&amp;gt;0.96&amp;lt;/b&amp;gt; (at least for sugar-toolkit port)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
At the Desktop summit, Raul Gutierrez Segales, Benjamin Berg and Paul Proteus successfully [http://www.mail-archive.com/sugar-devel@lists.sugarlabs.org/msg22070.html prototyped] some of the ideas below. After only a few hours of effort, a minimal Sugar GTK3 activity was running alongside GTK2 activities. The plan below should therefore be quite credible, but some prerequisites remain.&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, [http://pygtk.org/ PyGTK], the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of [http://live.gnome.org/PyGObject/IntrospectionPorting PyGObject Introspection] (hereafter &amp;quot;PyGI&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
In order to remain innovative and current, and to take advantage of the latest developments, Sugar needs to follow suit and move to GTK3 and PyGI. Lagging behind on this conversion is already bringing negative consequences to Sugar; notably 2 of our most important activities (Read and Browse) are already broken and without a future until we catch up again.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this is an API-incompatible change. As confirmed by the PyGI developers, PyGTK and PyGI cannot be mixed in the same process. This means that the conversion process can&#039;t be done on a fine, incremental basis, and if sugar-toolkit were to be simply replaced with a PyGI/GTK3 port, this means that all existing activities would stop working until they themselves have also been ported - &amp;lt;b&amp;gt;all activities will need modifications as part of this feature&amp;lt;/b&amp;gt;. The community has expressed desire for old activities to continue working (many are unmaintained); unfortunately this is not realistic in the long term. As a compromise, this feature discussion includes the requirement that for a certain period of time, both PyGTK/GTK2 and PyGI/GTK3 activities must be able to function alongside each other. As detailed below, this can be pulled off quite easily and in a way that will not drain resources.&lt;br /&gt;
&lt;br /&gt;
This project will involve modifications to almost every file within Sugar and its activities, making it a huge task, even though the vast majority of code is trivial to port. This feature discussion attempts to identify ways that this porting process can be done in distinct stages, where Sugar remains functional at the completion of each stage, making this more manageable.&lt;br /&gt;
&lt;br /&gt;
For the most part, the port from PyGTK to PyGI only involves changing the names that are used to access methods and constants. PyGI uses a slightly different and more consistent naming scheme to wrap GTK+.&lt;br /&gt;
&lt;br /&gt;
 import gtk&lt;br /&gt;
 gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, &amp;quot;Hello World&amp;quot;).run()&lt;br /&gt;
&lt;br /&gt;
The above PyGTK code rewritten as PyGI is:&lt;br /&gt;
&lt;br /&gt;
 from gi.repository import Gtk&lt;br /&gt;
 Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, Gtk.ButtonsType.CLOSE, &amp;quot;Hello World&amp;quot;).run()&lt;br /&gt;
&lt;br /&gt;
PyGI provides a script which can be used to automate much of the conversion.&lt;br /&gt;
&lt;br /&gt;
The move from GTK2 to GTK3 is also expected to be unproblematic, because the vast majority of code does not need any changes - most GTK3 API/ABI is identical to GTK2. The cases which do require some intervention to solve will take some time, but the changes are [http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html well documented] and the number of cases encountered should be low.&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
# PyGI is technologically better than PyGTK. It is a nicer way of calling into GObject-style libraries from Python that means less maintenance is needed upstream (PyGObject automates the creation of bindings to a degree much higher than PyGTK ever could, and automatically achieves more complete coverage).&lt;br /&gt;
# PyGTK is no longer maintained; PyGI is actively maintained.&lt;br /&gt;
# The move to GTK3 allows us to [http://blog.tomeuvizoso.net/2011/05/time-to-port-your-python-application-to.html keep up with our GNOME neighbours], as they improve and refine the base technologies that we share.&lt;br /&gt;
# The move to PyGI is expected to result in [http://blog.tomeuvizoso.net/2009/05/reducing-sugars-memory-usage.html lower memory usage and faster startup].&lt;br /&gt;
# Browse has no future under GTK2 and is &#039;&#039;&#039;already broken&#039;&#039;&#039;, it [[Features/WebKit|needs to move to WebKit]] and that move is dependent on Sugar moving to PyGI/GTK3.&lt;br /&gt;
# Similarly, Read is &#039;&#039;&#039;already broken&#039;&#039;&#039; under GTK2 due to static evince bindings no longer being maintained and libevince itself moved to GTK3; we need to switch to PyGI/GTK3 to be able to keep calling into evince and let the Read activity live on.&lt;br /&gt;
&lt;br /&gt;
== Implementation Plan ==&lt;br /&gt;
&lt;br /&gt;
Sugar is divided into different components, many of which run in different processes. This means that we are able to divide up the required work on a process-by-process basis. While this work is being conducted, some Sugar processes might be based on PyGI/GTK3 and others based on PyGTK/GTK2, but the platform would keep functioning at each stage. There would be some system resource overhead during this transitional time (as the system would need to have PyGTK, GTK2, PyGI and GTK3 all in memory) but this feature implementation would end with the whole sugar ecosystem using PyGI/GTK3.&lt;br /&gt;
&lt;br /&gt;
=== HippoCanvas removal ===&lt;br /&gt;
&lt;br /&gt;
A prerequisite to porting a Sugar process, component or activity is to remove all its usage of hippocanvas. This library is unmaintained, would be painful to port to GTK3, and can be done better with standard GTK+ code at the Python level. Most users of HippoCanvas can switch to custom GtkContainer widgets.&lt;br /&gt;
&lt;br /&gt;
One complication is that hippo usage is not limited to Sugar&#039;s core; some activities use hippo, or they pull on sugar-toolkit classes which are implemented with hippo. These are: Chat (&amp;lt;em&amp;gt;please list others here&amp;lt;/em&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Theme porting ===&lt;br /&gt;
&lt;br /&gt;
One major internal change in GTK3 is the way that themes are designed. GTK2 allowed themes to be implemented with a special format in a gtkrc file, but GTK3 now requires that themes are implemented using CSS. Therefore another non-trivial prerequisite for a GTK3-based sugar release of any visual component is the porting of the theme.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the gtkrc file format does not seem to be too far away from css (i.e. it applies attributes to classes in a textual format), and css is well known and well documented, so hopefully this is not a major challenge. For an example of the old GTK2 style, see &amp;lt;tt&amp;gt;/usr/share/themes/Adwaita/gtk-2.0/gtkrc&amp;lt;/tt&amp;gt;, and for a GTK3 CSS example see &amp;lt;tt&amp;gt;/usr/share/themes/Adwaita/gtk-3.0/gtk-widgets.css&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backwards-compatibility for activities ===&lt;br /&gt;
&lt;br /&gt;
As mentioned above, as mixing PyGTK/GTK2 and PyGI/GTK3 is impossible, a straightforward port of sugar-toolkit to PyGI/GTK3 would break all activities. However, having backwards compatibility for activities for a limited time is considered a requirement, and having a &amp;quot;flag day&amp;quot; where all activities stop working until ported is not seen as an option - there must be a transition period.&lt;br /&gt;
&lt;br /&gt;
As the conversion process from PyGTK to PyGI makes minor changes to almost every single line of code that involves GTK/glib, maintaining both PyGI and PyGTK codepaths in the same files is not realistic (there would be an unrealistic amount of &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; conditions). &amp;lt;b&amp;gt;We are therefore required to have two copies of sugar-toolkit during the transition period&amp;lt;/b&amp;gt;: one for ported PyGI/GTK3 activities, and another for PyGTK/GTK2 activities that have not yet been ported.&lt;br /&gt;
&lt;br /&gt;
As we do not have plentiful developer resources, I propose that the PyGTK/GTK2 version of sugar-toolkit is frozen as soon as this feature development is underway. No bugfixes or improvements, just a copy of the code at that point.&lt;br /&gt;
&lt;br /&gt;
The GTK3 version of sugar-toolkit would be installed under a new module named &amp;lt;b&amp;gt;sugar1&amp;lt;/b&amp;gt;, distinguishing it from the frozen GTK2 &amp;lt;b&amp;gt;sugar&amp;lt;/b&amp;gt; version to be removed later. All code will need extensive textual changes in moving to GTK3, changing &amp;quot;import sugar.foo&amp;quot; to &amp;quot;import sugar1.foo&amp;quot; will just be another step in that process.&lt;br /&gt;
&lt;br /&gt;
The removal of the GTK2 sugar-toolkit version would happen one year after the first stable release of a sugar-toolkit that includes GTK3 support. In this context, &#039;removal&#039; means that it gets deleted from the sugar-toolkit master branch of the git tree. Old versions of sugar-toolkit will of course be left available, in old git branches and release tarballs.&lt;br /&gt;
&lt;br /&gt;
=== Proposed plan of action ===&lt;br /&gt;
&lt;br /&gt;
The steps below prioritise the porting of sugar-toolkit, as this is where Sugar would see the most immediate benefit: the revival of Browse and Read. The steps that follow can largely be parallelised; the important bit is placing sugar-toolkit first in line.&lt;br /&gt;
&lt;br /&gt;
# Remove hippocanvas from sugar-toolkit&lt;br /&gt;
# Port sugar theme to GTK3&lt;br /&gt;
# Port sugar-toolkit to GTK3 while keeping backwards compatibility, release as sugar-toolkit-0.95.x&lt;br /&gt;
# Rescue Browse and Read, and allow independent activity porting efforts to begin&lt;br /&gt;
# Remove hippocanvas from all other parts of Sugar, including activities&lt;br /&gt;
# Port Sugar core to GTK3&lt;br /&gt;
# Remove sugar-toolkit&#039;s GTK2 compatibility one year after the first GTK3 sugar-toolkit stable release&lt;br /&gt;
&lt;br /&gt;
=== How to port ===&lt;br /&gt;
&lt;br /&gt;
I plan to start a page at [[Features/GTK3/Porting]] that details the porting process, that could be provided as documentation to anyone involved in these efforts (including those working on porting Sugar core, but also those working on activities). The content covered will be:&lt;br /&gt;
&lt;br /&gt;
# How to remove hippo and what to replace it with (links to commits that have done this for other activities, etc)&lt;br /&gt;
# How to select the GTK3 version of sugar-toolkit&lt;br /&gt;
# How to handle each of the sugar-toolkit API changes (detailed in the following section)&lt;br /&gt;
# How to port from PyGTK/GTK2 to PyGI/GTK3.&lt;br /&gt;
#* This basically involves reading the [https://live.gnome.org/PyGObject/IntrospectionPorting PyGObject porting documentation], using pygi-convert.sh, then checking the result.&lt;br /&gt;
#* The [http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html Migrating from GTK+ 2.x to GTK+ 3] should also be read.&lt;br /&gt;
&lt;br /&gt;
== Other considerations ==&lt;br /&gt;
&lt;br /&gt;
=== Version number ===&lt;br /&gt;
&lt;br /&gt;
It goes without saying that such a migration would be the basis of a new major release. When this topic has been discussed before, people have toyed with the idea of calling the GTK3 version of Sugar &amp;quot;Sugar-1.0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are arguments for:&lt;br /&gt;
* This is undoubtedly a paradigm shift for Sugar, so a major bump to the version number is called for.&lt;br /&gt;
* It would make the change really obvious&lt;br /&gt;
&lt;br /&gt;
And there are arguments against:&lt;br /&gt;
* Some people might interpret the number 1.0 as indicating a higher level of maturity than what the developers feel&lt;br /&gt;
* Some developers have very specific ideas about what should be included in Sugar-1.0, even if development of such items is barely even on the horizon&lt;br /&gt;
* Some people want a much longer lead-up time to Sugar-1.0 so that the API can be refined/reworked/perfected&lt;br /&gt;
&lt;br /&gt;
Tomeu, Simon and Marco agreed that the 1.0 version number could be used here, and communicated in a slightly different sense: &amp;quot;we are really still in the first iteration and 1.0 will be when that first iteration reaches maturity, without big changes in the API. After 1.0 we can start working on what will be one day 2.0 which should be the second iteration of Sugar, hopefully using what we have learned during these years.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, current Sugar developers feel strongly that the changes described here are not significant to warrant a major version bump and have specific ideas about what should be included in a 1.0 release. Therefore, in the interest of being slightly less intrusive, this feature does not ultimately propose a version numbering change - it is planned that sugar-toolkit-0.96 will be released as the first with GTK3 support, and once we reach sugar-0.98, the next releases will be 0.100, 0.102, etc.&lt;br /&gt;
&lt;br /&gt;
=== Retaining the &#039;sugar&#039; module name ===&lt;br /&gt;
&lt;br /&gt;
The strategy suggested above involves the GTK3 sugar-toolkit version being installed with the &#039;sugar1&#039; module name. It would be possible to retain the &#039;sugar&#039; name for this module via a Python trick documented below, but it appears that there is no demand for this from the community. Porting to GTK3 requires major textual changes anyway, changing &#039;sugar&#039; to &#039;sugar1&#039; in the same files is therefore regarded as acceptable. Here is how the naming trick could be done anyway:&lt;br /&gt;
&lt;br /&gt;
* The new GTK3 version of sugar toolkit would be installed with name &amp;lt;tt&amp;gt;sugar&amp;lt;/tt&amp;gt;, and the old GTK2 version would be installed with name &amp;lt;tt&amp;gt;sugar_gtk2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Before &amp;lt;tt&amp;gt;sugar-activity&amp;lt;/tt&amp;gt; imports sugar.activity (or any other sugar-toolkit class), it would look for an empty file called &amp;quot;GTK3_PORTED&amp;quot; in the activity&#039;s directory. If present, it would run a little trick:&lt;br /&gt;
 import os&lt;br /&gt;
 import sys&lt;br /&gt;
 if not os.path.exists(&amp;quot;GTK3_PORTED&amp;quot;):&lt;br /&gt;
     import sugar_gtk2&lt;br /&gt;
     sys.modules[&amp;quot;sugar&amp;quot;] = sugar_gtk2&lt;br /&gt;
* The result is that all unported/unmodified activities (without the GTK3_PORTED file) would &amp;lt;tt&amp;gt;import sugar.foo&amp;lt;/tt&amp;gt; as before, but the above trick that modifies Python&#039;s module table would result in them (transparently, magically, automatically) being redirected to sugar_gtk2.foo.&lt;br /&gt;
* At the end of the transition period, sugar_gtk2 would be deleted in entirity, the above addition to sugar-activity would be dropped, and activities could drop the GTK3_PORTED files at their leisure.&lt;br /&gt;
&lt;br /&gt;
Further consideration would need to be given to sugar-base. This package installs some classes which are then used by sugar-toolkit, so they would need to be duplicated into sugar_gtk2.&lt;br /&gt;
&lt;br /&gt;
=== Python 3 ===&lt;br /&gt;
&lt;br /&gt;
Is it worth throwing in a Python 3 migration into this project? I have researched the issue, and my opinion is: no.&lt;br /&gt;
&lt;br /&gt;
* Python 3 brings no immediate obvious benefit, and does not fix any pressing problems. On the other hand, PyGI solves some clear breakage for us.&lt;br /&gt;
* Python 3 (or rather the code that supports it) is not mature. Many modules are still Python2-only.&lt;br /&gt;
* PyGI does support Python 3, but it was [http://mail.gnome.org/archives/python-hackers-list/2011-July/msg00000.html broken] when I tried it. It is not seeing much attention.&lt;br /&gt;
* Our neighbours within GNOME and other open source projects are only just starting to play with Python 3. There is not much similar experience we can build upon. There may be teething problems, such as modules that Sugar uses that haven&#039;t been ported, and bugs in existing ports due to lack of use (such as the fact that PyGI was broken for quite a while with nobody noticing) that hold us back. This is not so for the PyGI transition, where we can look at many PyGTK applications that have been ported and that are actively used.&lt;br /&gt;
* J5 (PyGI developer) suggested that we avoid combining the 2 migrations. It would add more change to an already disruptive project, and increases the risk. It would be better to limit the amount of change we introduce, so that risk is more manageable and to decrease the number of problems and challenges that we face.&lt;br /&gt;
* If the above situation does change, the Python 3 migration will be much easier than this one. Py3 migration does not require invasive code changes. It will be much easier to have Python 2 and 3 support maintained in parallel. The few existing projects that have done this are able to maintain Python2 and Python3 support in the same codebase, without too many if conditions. The &amp;quot;if we&#039;re already making so much change, why not avoid a future migration period by including Py3&amp;quot; argument is not very strong, because the Py3 migration will be much smoother and less complex.&lt;br /&gt;
&lt;br /&gt;
== API changes ==&lt;br /&gt;
&lt;br /&gt;
The fact that almost all Sugar components and activities require sweeping changes as part of this shift presents an interesting opportunity for us to make API changes in sugar-toolkit. The importance here should still be placed on the technology shift, rather than on the opportunity to produce a perfect API (which we could spend all eternity designing and discussing), but this is an opportunity that we should not miss.&lt;br /&gt;
&lt;br /&gt;
I propose that once sugar-toolkit is ported and mostly operational, we run a 30-day window where API changes that have seen some kind of planning and discussion below can be made and committed.&lt;br /&gt;
&lt;br /&gt;
=== Plain text as the default for palettes ===&lt;br /&gt;
&lt;br /&gt;
Sugar&#039;s palette classes currently accept strings, but then they pass those strings to GTK as markup (always, unconditionally). However, markup is only used in a handful of places, and this means that all users of palettes that draw in translations or strings from other sources which might contain characters such as &amp;lt; or &amp;gt; must escape their arguments, leading to big patches [http://article.gmane.org/gmane.comp.education.sugar.devel/32398 like this].&lt;br /&gt;
&lt;br /&gt;
As agreed [http://article.gmane.org/gmane.linux.laptop.olpc.sugar/30466 here], it would make more sense for palettes to pass those strings as standard text by default, and to have different functions to opt-in to receive markup processing. Then the excessive escaping would go, and the only users would have to escape would be those who use markup.&lt;br /&gt;
&lt;br /&gt;
=== Removal of keep button ===&lt;br /&gt;
&lt;br /&gt;
Sugar-0.94 proposes the [http://article.gmane.org/gmane.linux.laptop.olpc.sugar/30771 removal of the Keep button], but the old KeepButton classes would be kept around for activities that directly use it. Porting sugar-toolkit to GTK3 would be a good time to remove these classes.&lt;br /&gt;
&lt;br /&gt;
=== Removal of old toolbars ===&lt;br /&gt;
&lt;br /&gt;
Sugar-0.86 [[Features/New_Toolbar_Design|redesigned activity toolbars]], with the new toolbars implemented by new classes, and the old classes being kept around so that old activities are not immediately broken. This would be a good opportunity to remove the long-deprecated old activity toolbar classes.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
Sugar would start depending on PyGObject built with gobject introspection support, GTK3, and (at the end of the transition period) would drop its dependencies on GTK2 and PyGTK.&lt;br /&gt;
&lt;br /&gt;
== Contingency plan ==&lt;br /&gt;
&lt;br /&gt;
Hopefully, this page has been convincing in that this change is of necessity. Either way, we should consider our options for the case where this migration is found to be more difficult than predicted.&lt;br /&gt;
&lt;br /&gt;
As this migration would take over the course of a major release (or perhaps 2-3 of them, as components are ported individually), our users have the option to remain on older releases in the face of stability issues, and as developers we have the option of delaying major releases until things are ready.&lt;br /&gt;
&lt;br /&gt;
If new PyGI/GTK3-based major releases are found to be unstable, we also have the option of allowing interested community members to pick up maintenance of older GTK2-based release branches (e.g. 0.94) with a &amp;quot;master first&amp;quot; commit policy. Personally, I would suggest that it would be a better use of resources to have those people help fix any problems with the GTK3 version, but as an open source community this is something we must be open to.&lt;br /&gt;
&lt;br /&gt;
In the event of problems in the GTK3 version of sugar-toolkit, activity authors have the (default) choice of staying with GTK2. The transition period before the GTK2 version is removed would obviously be extended in the face of significant problems with GTK3 version.&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&lt;br /&gt;
== Hackfests ==&lt;br /&gt;
&lt;br /&gt;
This work would benefit from some focused attention at in-person meetings.&lt;br /&gt;
&lt;br /&gt;
See [[Features/GTK3/DesktopSummitActivities]] for some initial steps that could be taken at the desktop summit.&lt;br /&gt;
&lt;br /&gt;
On September 10th-11th, a SugarCamp will be held in Paris. We could work on this during or immediately after that event.&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3&amp;diff=68915</id>
		<title>Features/GTK3</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3&amp;diff=68915"/>
		<updated>2011-09-01T16:20:38Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{TOCright}}&lt;br /&gt;
[[Category:Feature Page Incomplete]]&lt;br /&gt;
[[Category:Feature|GTK3]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sugar needs to rebase itself on new generations of its key underlying technologies: GTK+ 3 and PyGObject Introspection.&#039;&#039;&#039; Sugar is already somewhat broken on recent distribution versions as a result of this. This page aims to summarise options and community opinions around this challenging shift, and to help formulate a plan of how it will be executed. In other words, it tries to take community input, answer all the unanswered questions, and present a logical path forward that can be adopted by the developers.&lt;br /&gt;
&lt;br /&gt;
== Owner ==&lt;br /&gt;
* This plan/proposal maintained by [[User:DanielDrake|Daniel Drake]] (other editors welcome!)&lt;br /&gt;
* A number of developers will be needed at each stage to successfully execute this; Daniel offers his assistance for a coordination/oversight role if that would be useful.&lt;br /&gt;
&lt;br /&gt;
== Current status ==&lt;br /&gt;
* Targeted release: &amp;lt;b&amp;gt;0.96&amp;lt;/b&amp;gt; (at least for sugar-toolkit port)&lt;br /&gt;
* Last updated: (DATE)&lt;br /&gt;
* Percentage of completion: XX%&lt;br /&gt;
&lt;br /&gt;
At the Desktop summit, Raul Gutierrez Segales, Benjamin Berg and Paul Proteus successfully [http://www.mail-archive.com/sugar-devel@lists.sugarlabs.org/msg22070.html prototyped] some of the ideas below. After only a few hours of effort, a minimal Sugar GTK3 activity was running alongside GTK2 activities. The plan below should therefore be quite credible, but some prerequisites remain.&lt;br /&gt;
&lt;br /&gt;
== Detailed Description ==&lt;br /&gt;
&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, [http://pygtk.org/ PyGTK], the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of [http://live.gnome.org/PyGObject/IntrospectionPorting PyGObject Introspection] (hereafter &amp;quot;PyGI&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
In order to remain innovative and current, and to take advantage of the latest developments, Sugar needs to follow suit and move to GTK3 and PyGI. Lagging behind on this conversion is already bringing negative consequences to Sugar; notably 2 of our most important activities (Read and Browse) are already broken and without a future until we catch up again.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, this is an API-incompatible change. As confirmed by the PyGI developers, PyGTK and PyGI cannot be mixed in the same process. This means that the conversion process can&#039;t be done on a fine, incremental basis, and if sugar-toolkit were to be simply replaced with a PyGI/GTK3 port, this means that all existing activities would stop working until they themselves have also been ported - &amp;lt;b&amp;gt;all activities will need modifications as part of this feature&amp;lt;/b&amp;gt;. The community has expressed desire for old activities to continue working (many are unmaintained); unfortunately this is not realistic in the long term. As a compromise, this feature discussion includes the requirement that for a certain period of time, both PyGTK/GTK2 and PyGI/GTK3 activities must be able to function alongside each other. As detailed below, this can be pulled off quite easily and in a way that will not drain resources.&lt;br /&gt;
&lt;br /&gt;
This project will involve modifications to almost every file within Sugar and its activities, making it a huge task, even though the vast majority of code is trivial to port. This feature discussion attempts to identify ways that this porting process can be done in distinct stages, where Sugar remains functional at the completion of each stage, making this more manageable.&lt;br /&gt;
&lt;br /&gt;
For the most part, the port from PyGTK to PyGI only involves changing the names that are used to access methods and constants. PyGI uses a slightly different and more consistent naming scheme to wrap GTK+.&lt;br /&gt;
&lt;br /&gt;
 import gtk&lt;br /&gt;
 gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, &amp;quot;Hello World&amp;quot;).run()&lt;br /&gt;
&lt;br /&gt;
The above PyGTK code rewritten as PyGI is:&lt;br /&gt;
&lt;br /&gt;
 from gi.repository import Gtk&lt;br /&gt;
 Gtk.MessageDialog(None, 0, Gtk.MessageType.INFO, Gtk.ButtonsType.CLOSE, &amp;quot;Hello World&amp;quot;).run()&lt;br /&gt;
&lt;br /&gt;
PyGI provides a script which can be used to automate much of the conversion.&lt;br /&gt;
&lt;br /&gt;
The move from GTK2 to GTK3 is also expected to be unproblematic, because the vast majority of code does not need any changes - most GTK3 API/ABI is identical to GTK2. The cases which do require some intervention to solve will take some time, but the changes are [http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html well documented] and the number of cases encountered should be low.&lt;br /&gt;
&lt;br /&gt;
== Benefit to Sugar ==&lt;br /&gt;
&lt;br /&gt;
# PyGI is technologically better than PyGTK. It is a nicer way of calling into GObject-style libraries from Python that means less maintenance is needed upstream (PyGObject automates the creation of bindings to a degree much higher than PyGTK ever could, and automatically achieves more complete coverage).&lt;br /&gt;
# PyGTK is no longer maintained; PyGI is actively maintained.&lt;br /&gt;
# The move to GTK3 allows us to [http://blog.tomeuvizoso.net/2011/05/time-to-port-your-python-application-to.html keep up with our GNOME neighbours], as they improve and refine the base technologies that we share.&lt;br /&gt;
# The move to PyGI is expected to result in [http://blog.tomeuvizoso.net/2009/05/reducing-sugars-memory-usage.html lower memory usage and faster startup].&lt;br /&gt;
# Browse has no future under GTK2 and is &#039;&#039;&#039;already broken&#039;&#039;&#039;, it [[Features/WebKit|needs to move to WebKit]] and that move is dependent on Sugar moving to PyGI/GTK3.&lt;br /&gt;
# Similarly, Read is &#039;&#039;&#039;already broken&#039;&#039;&#039; under GTK2 due to static evince bindings no longer being maintained and libevince itself moved to GTK3; we need to switch to PyGI/GTK3 to be able to keep calling into evince and let the Read activity live on.&lt;br /&gt;
&lt;br /&gt;
== Implementation Plan ==&lt;br /&gt;
&lt;br /&gt;
Sugar is divided into different components, many of which run in different processes. This means that we are able to divide up the required work on a process-by-process basis. While this work is being conducted, some Sugar processes might be based on PyGI/GTK3 and others based on PyGTK/GTK2, but the platform would keep functioning at each stage. There would be some system resource overhead during this transitional time (as the system would need to have PyGTK, GTK2, PyGI and GTK3 all in memory) but this feature implementation would end with the whole sugar ecosystem using PyGI/GTK3.&lt;br /&gt;
&lt;br /&gt;
=== HippoCanvas removal ===&lt;br /&gt;
&lt;br /&gt;
A prerequisite to porting a Sugar process, component or activity is to remove all its usage of hippocanvas. This library is unmaintained, would be painful to port to GTK3, and can be done better with standard GTK+ code at the Python level. Most users of HippoCanvas can switch to custom GtkContainer widgets.&lt;br /&gt;
&lt;br /&gt;
One complication is that hippo usage is not limited to Sugar&#039;s core; some activities use hippo, or they pull on sugar-toolkit classes which are implemented with hippo. These are: Chat (&amp;lt;em&amp;gt;please list others here&amp;lt;/em&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Theme porting ===&lt;br /&gt;
&lt;br /&gt;
One major internal change in GTK3 is the way that themes are designed. GTK2 allowed themes to be implemented with a special format in a gtkrc file, but GTK3 now requires that themes are implemented using CSS. Therefore another non-trivial prerequisite for a GTK3-based sugar release of any visual component is the porting of the theme.&lt;br /&gt;
&lt;br /&gt;
Fortunately, the gtkrc file format does not seem to be too far away from css (i.e. it applies attributes to classes in a textual format), and css is well known and well documented, so hopefully this is not a major challenge. For an example of the old GTK2 style, see &amp;lt;tt&amp;gt;/usr/share/themes/Adwaita/gtk-2.0/gtkrc&amp;lt;/tt&amp;gt;, and for a GTK3 CSS example see &amp;lt;tt&amp;gt;/usr/share/themes/Adwaita/gtk-3.0/gtk-widgets.css&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backwards-compatibility for activities ===&lt;br /&gt;
&lt;br /&gt;
As mentioned above, as mixing PyGTK/GTK2 and PyGI/GTK3 is impossible, a straightforward port of sugar-toolkit to PyGI/GTK3 would break all activities. However, having backwards compatibility for activities for a limited time is considered a requirement, and having a &amp;quot;flag day&amp;quot; where all activities stop working until ported is not seen as an option - there must be a transition period.&lt;br /&gt;
&lt;br /&gt;
As the conversion process from PyGTK to PyGI makes minor changes to almost every single line of code that involves GTK/glib, maintaining both PyGI and PyGTK codepaths in the same files is not realistic (there would be an unrealistic amount of &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; conditions). &amp;lt;b&amp;gt;We are therefore required to have two copies of sugar-toolkit during the transition period&amp;lt;/b&amp;gt;: one for ported PyGI/GTK3 activities, and another for PyGTK/GTK2 activities that have not yet been ported.&lt;br /&gt;
&lt;br /&gt;
As we do not have plentiful developer resources, I propose that the PyGTK/GTK2 version of sugar-toolkit is frozen as soon as this feature development is underway. No bugfixes or improvements, just a copy of the code at that point.&lt;br /&gt;
&lt;br /&gt;
The GTK3 version of sugar-toolkit would be installed under a new module named &amp;lt;b&amp;gt;sugar1&amp;lt;/b&amp;gt;, distinguishing it from the frozen GTK2 &amp;lt;b&amp;gt;sugar&amp;lt;/b&amp;gt; version to be removed later. All code will need extensive textual changes in moving to GTK3, changing &amp;quot;import sugar.foo&amp;quot; to &amp;quot;import sugar1.foo&amp;quot; will just be another step in that process.&lt;br /&gt;
&lt;br /&gt;
The removal of the GTK2 sugar-toolkit version would happen one year after the first stable release of a sugar-toolkit that includes GTK3 support. In this context, &#039;removal&#039; means that it gets deleted from the sugar-toolkit master branch of the git tree. Old versions of sugar-toolkit will of course be left available, in old git branches and release tarballs.&lt;br /&gt;
&lt;br /&gt;
=== Proposed plan of action ===&lt;br /&gt;
&lt;br /&gt;
The steps below prioritise the porting of sugar-toolkit, as this is where Sugar would see the most immediate benefit: the revival of Browse and Read. The steps that follow can largely be parallelised; the important bit is placing sugar-toolkit first in line.&lt;br /&gt;
&lt;br /&gt;
# Remove hippocanvas from sugar-toolkit&lt;br /&gt;
# Port sugar theme to GTK3&lt;br /&gt;
# Port sugar-toolkit to GTK3 while keeping backwards compatibility, release as sugar-toolkit-0.95.x&lt;br /&gt;
# Rescue Browse and Read, and allow independent activity porting efforts to begin&lt;br /&gt;
# Remove hippocanvas from all other parts of Sugar, including activities&lt;br /&gt;
# Port Sugar core to GTK3&lt;br /&gt;
# Remove sugar-toolkit&#039;s GTK2 compatibility one year after the first GTK3 sugar-toolkit stable release&lt;br /&gt;
&lt;br /&gt;
=== How to port ===&lt;br /&gt;
&lt;br /&gt;
I plan to start a page at [[Features/GTK3/Porting]] that details the porting process, that could be provided as documentation to anyone involved in these efforts (including those working on porting Sugar core, but also those working on activities). The content covered will be:&lt;br /&gt;
&lt;br /&gt;
# How to remove hippo and what to replace it with (links to commits that have done this for other activities, etc)&lt;br /&gt;
# How to select the GTK3 version of sugar-toolkit&lt;br /&gt;
# How to handle each of the sugar-toolkit API changes (detailed in the following section)&lt;br /&gt;
# How to port from PyGTK/GTK2 to PyGI/GTK3.&lt;br /&gt;
#* This basically involves reading the [https://live.gnome.org/PyGObject/IntrospectionPorting PyGObject porting documentation], using pygi-convert.sh, then checking the result.&lt;br /&gt;
#* The [http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html Migrating from GTK+ 2.x to GTK+ 3] should also be read.&lt;br /&gt;
&lt;br /&gt;
== Other considerations ==&lt;br /&gt;
&lt;br /&gt;
=== Version number ===&lt;br /&gt;
&lt;br /&gt;
It goes without saying that such a migration would be the basis of a new major release. When this topic has been discussed before, people have toyed with the idea of calling the GTK3 version of Sugar &amp;quot;Sugar-1.0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are arguments for:&lt;br /&gt;
* This is undoubtedly a paradigm shift for Sugar, so a major bump to the version number is called for.&lt;br /&gt;
* It would make the change really obvious&lt;br /&gt;
&lt;br /&gt;
And there are arguments against:&lt;br /&gt;
* Some people might interpret the number 1.0 as indicating a higher level of maturity than what the developers feel&lt;br /&gt;
* Some people want a much longer lead-up time to Sugar-1.0 so that the API can be refined/reworked/perfected&lt;br /&gt;
&lt;br /&gt;
Tomeu, Simon and Marco agreed that the 1.0 version number could be used here, and communicated in a slightly different sense: &amp;quot;we are really still in the first iteration and 1.0 will be when that first iteration reaches maturity, without big changes in the API. After 1.0 we can start working on what will be one day 2.0 which should be the second iteration of Sugar, hopefully using what we have learned during these years.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The migration of sugar-toolkit, sugar, datastore, etc, is likely to take more than 1 release cycle, but the above scheme can still apply. When each component is ported to GTK3, it would then pick up the 1.0 tag. For example, the first major release that includes any GTK3 may well include sugar-toolkit-1.0 (GTK3 ported) alongside sugar-datastore-0.96 (not yet ported).&lt;br /&gt;
&lt;br /&gt;
=== Retaining the &#039;sugar&#039; module name ===&lt;br /&gt;
&lt;br /&gt;
The strategy suggested above involves the GTK3 sugar-toolkit version being installed with the &#039;sugar1&#039; module name. It would be possible to retain the &#039;sugar&#039; name for this module via a Python trick documented below, but it appears that there is no demand for this from the community. Porting to GTK3 requires major textual changes anyway, changing &#039;sugar&#039; to &#039;sugar1&#039; in the same files is therefore regarded as acceptable. Here is how the naming trick could be done anyway:&lt;br /&gt;
&lt;br /&gt;
* The new GTK3 version of sugar toolkit would be installed with name &amp;lt;tt&amp;gt;sugar&amp;lt;/tt&amp;gt;, and the old GTK2 version would be installed with name &amp;lt;tt&amp;gt;sugar_gtk2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Before &amp;lt;tt&amp;gt;sugar-activity&amp;lt;/tt&amp;gt; imports sugar.activity (or any other sugar-toolkit class), it would look for an empty file called &amp;quot;GTK3_PORTED&amp;quot; in the activity&#039;s directory. If present, it would run a little trick:&lt;br /&gt;
 import os&lt;br /&gt;
 import sys&lt;br /&gt;
 if not os.path.exists(&amp;quot;GTK3_PORTED&amp;quot;):&lt;br /&gt;
     import sugar_gtk2&lt;br /&gt;
     sys.modules[&amp;quot;sugar&amp;quot;] = sugar_gtk2&lt;br /&gt;
* The result is that all unported/unmodified activities (without the GTK3_PORTED file) would &amp;lt;tt&amp;gt;import sugar.foo&amp;lt;/tt&amp;gt; as before, but the above trick that modifies Python&#039;s module table would result in them (transparently, magically, automatically) being redirected to sugar_gtk2.foo.&lt;br /&gt;
* At the end of the transition period, sugar_gtk2 would be deleted in entirity, the above addition to sugar-activity would be dropped, and activities could drop the GTK3_PORTED files at their leisure.&lt;br /&gt;
&lt;br /&gt;
Further consideration would need to be given to sugar-base. This package installs some classes which are then used by sugar-toolkit, so they would need to be duplicated into sugar_gtk2.&lt;br /&gt;
&lt;br /&gt;
=== Python 3 ===&lt;br /&gt;
&lt;br /&gt;
Is it worth throwing in a Python 3 migration into this project? I have researched the issue, and my opinion is: no.&lt;br /&gt;
&lt;br /&gt;
* Python 3 brings no immediate obvious benefit, and does not fix any pressing problems. On the other hand, PyGI solves some clear breakage for us.&lt;br /&gt;
* Python 3 (or rather the code that supports it) is not mature. Many modules are still Python2-only.&lt;br /&gt;
* PyGI does support Python 3, but it was [http://mail.gnome.org/archives/python-hackers-list/2011-July/msg00000.html broken] when I tried it. It is not seeing much attention.&lt;br /&gt;
* Our neighbours within GNOME and other open source projects are only just starting to play with Python 3. There is not much similar experience we can build upon. There may be teething problems, such as modules that Sugar uses that haven&#039;t been ported, and bugs in existing ports due to lack of use (such as the fact that PyGI was broken for quite a while with nobody noticing) that hold us back. This is not so for the PyGI transition, where we can look at many PyGTK applications that have been ported and that are actively used.&lt;br /&gt;
* J5 (PyGI developer) suggested that we avoid combining the 2 migrations. It would add more change to an already disruptive project, and increases the risk. It would be better to limit the amount of change we introduce, so that risk is more manageable and to decrease the number of problems and challenges that we face.&lt;br /&gt;
* If the above situation does change, the Python 3 migration will be much easier than this one. Py3 migration does not require invasive code changes. It will be much easier to have Python 2 and 3 support maintained in parallel. The few existing projects that have done this are able to maintain Python2 and Python3 support in the same codebase, without too many if conditions. The &amp;quot;if we&#039;re already making so much change, why not avoid a future migration period by including Py3&amp;quot; argument is not very strong, because the Py3 migration will be much smoother and less complex.&lt;br /&gt;
&lt;br /&gt;
== API changes ==&lt;br /&gt;
&lt;br /&gt;
The fact that almost all Sugar components and activities require sweeping changes as part of this shift presents an interesting opportunity for us to make API changes in sugar-toolkit. The importance here should still be placed on the technology shift, rather than on the opportunity to produce a perfect API (which we could spend all eternity designing and discussing), but this is an opportunity that we should not miss.&lt;br /&gt;
&lt;br /&gt;
I propose that once sugar-toolkit is ported and mostly operational, we run a 30-day window where API changes that have seen some kind of planning and discussion below can be made and committed.&lt;br /&gt;
&lt;br /&gt;
=== Plain text as the default for palettes ===&lt;br /&gt;
&lt;br /&gt;
Sugar&#039;s palette classes currently accept strings, but then they pass those strings to GTK as markup (always, unconditionally). However, markup is only used in a handful of places, and this means that all users of palettes that draw in translations or strings from other sources which might contain characters such as &amp;lt; or &amp;gt; must escape their arguments, leading to big patches [http://article.gmane.org/gmane.comp.education.sugar.devel/32398 like this].&lt;br /&gt;
&lt;br /&gt;
As agreed [http://article.gmane.org/gmane.linux.laptop.olpc.sugar/30466 here], it would make more sense for palettes to pass those strings as standard text by default, and to have different functions to opt-in to receive markup processing. Then the excessive escaping would go, and the only users would have to escape would be those who use markup.&lt;br /&gt;
&lt;br /&gt;
=== Removal of keep button ===&lt;br /&gt;
&lt;br /&gt;
Sugar-0.94 proposes the [http://article.gmane.org/gmane.linux.laptop.olpc.sugar/30771 removal of the Keep button], but the old KeepButton classes would be kept around for activities that directly use it. Porting sugar-toolkit to GTK3 would be a good time to remove these classes.&lt;br /&gt;
&lt;br /&gt;
=== Removal of old toolbars ===&lt;br /&gt;
&lt;br /&gt;
Sugar-0.86 [[Features/New_Toolbar_Design|redesigned activity toolbars]], with the new toolbars implemented by new classes, and the old classes being kept around so that old activities are not immediately broken. This would be a good opportunity to remove the long-deprecated old activity toolbar classes.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
Sugar would start depending on PyGObject built with gobject introspection support, GTK3, and (at the end of the transition period) would drop its dependencies on GTK2 and PyGTK.&lt;br /&gt;
&lt;br /&gt;
== Contingency plan ==&lt;br /&gt;
&lt;br /&gt;
Hopefully, this page has been convincing in that this change is of necessity. Either way, we should consider our options for the case where this migration is found to be more difficult than predicted.&lt;br /&gt;
&lt;br /&gt;
As this migration would take over the course of a major release (or perhaps 2-3 of them, as components are ported individually), our users have the option to remain on older releases in the face of stability issues, and as developers we have the option of delaying major releases until things are ready.&lt;br /&gt;
&lt;br /&gt;
If new PyGI/GTK3-based major releases are found to be unstable, we also have the option of allowing interested community members to pick up maintenance of older GTK2-based release branches (e.g. 0.94) with a &amp;quot;master first&amp;quot; commit policy. Personally, I would suggest that it would be a better use of resources to have those people help fix any problems with the GTK3 version, but as an open source community this is something we must be open to.&lt;br /&gt;
&lt;br /&gt;
In the event of problems in the GTK3 version of sugar-toolkit, activity authors have the (default) choice of staying with GTK2. The transition period before the GTK2 version is removed would obviously be extended in the face of significant problems with GTK3 version.&lt;br /&gt;
&lt;br /&gt;
== Release Notes ==&lt;br /&gt;
&lt;br /&gt;
== Hackfests ==&lt;br /&gt;
&lt;br /&gt;
This work would benefit from some focused attention at in-person meetings.&lt;br /&gt;
&lt;br /&gt;
See [[Features/GTK3/DesktopSummitActivities]] for some initial steps that could be taken at the desktop summit.&lt;br /&gt;
&lt;br /&gt;
On September 10th-11th, a SugarCamp will be held in Paris. We could work on this during or immediately after that event.&lt;br /&gt;
&lt;br /&gt;
== Comments and Discussion ==&lt;br /&gt;
* See [[{{TALKPAGENAME}}|discussion tab for this feature]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=68881</id>
		<title>Marketing Team/Events/Gtk3 Hackfest 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=68881"/>
		<updated>2011-08-31T13:26:06Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Accommodation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
= Gtk3 Hackfest 2011 =&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, PyGTK, the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of PyGObject Introspection (hereafter &amp;quot;PyGI&amp;quot;). More background info can be found at [[Features/GTK3]]. Goal of this hackfest is to remove the biggest blockers before we can start the porting and potentially start porting over.&lt;br /&gt;
&lt;br /&gt;
[[File:Brmlab_impressions.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Event Details ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Location:&#039;&#039;&#039; Praha (Prague), Czech Republic&lt;br /&gt;
&lt;br /&gt;
The hackfest will be held at the [http://brmlab.cz/| brmlab a hackerspace in Prague]. The place is located [http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Bubensk%C3%A1+1,+Praha-Praha+7,+%C4%8Cesk%C3%A1+republika&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=65.390746,135.263672&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Bubensk%C3%A1+1477/1,+170+00+Praha+7-Hole%C5%A1ovice,+Czech+Republic&amp;amp;view=map|Map here], using [http://idos.dpp.cz/idos/ConnForm.aspx?tt=pid&amp;amp;cl=E5|Prague public transport] you can get here easily, just hop off at (Metro &amp;amp; Tram stop: &amp;quot;Vltavska&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date:&#039;&#039;&#039; Friday, October 28th - Sunday October 30th 2011&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary contact:&#039;&#039;&#039; Simon Schampijer &amp;lt;simon AT laptop DOT org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secondary contact:&#039;&#039;&#039; Tomeu Vizoso &amp;lt;tomeu.vizoso AT collabora DOT co DOT uk&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Target audience ==&lt;br /&gt;
Sugar developers&lt;br /&gt;
&lt;br /&gt;
== Sponsors ==&lt;br /&gt;
[[File:Brmlab.jpg|300px]] We want to thank [http://brmlab.cz/| brmlab] for hosting us during the week.&lt;br /&gt;
&lt;br /&gt;
[[File:Olpc_logo.png|300px]] We want to thank the [http://laptop.org OLPC Foundation] for sponsoring regional trips to the event.&lt;br /&gt;
&lt;br /&gt;
== Sponsoring regional trips ==&lt;br /&gt;
This Hackfest is sponsored by the [http://laptop.org OLPC Foundation]. If you need help for funding your travel, please send an email to simon AT laptop DOT org before 8th of October 2011. We won&#039;t be able to refund more than 150 USD per trip, and we will fund regional (european) travels in priority.&lt;br /&gt;
&lt;br /&gt;
== Agenda, goals ==&lt;br /&gt;
* removing Hippo and other custom widgets&lt;br /&gt;
* migration path to Gtk3 (do we ship two toolkits? Do we migrate the shell and the toolkit and activities at once?)&lt;br /&gt;
* porting Sugar&#039;s theme to gtk3 (go benzea, go!)&lt;br /&gt;
* other introspected libraries that need work (namely NM)&lt;br /&gt;
&lt;br /&gt;
== Measuring your success ==&lt;br /&gt;
&#039;&#039;coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Attendants ==&lt;br /&gt;
&lt;br /&gt;
Are you planning to attend?  Add your name and contact info below!&lt;br /&gt;
# [[User:Erikos | Simon Schampijer]]&lt;br /&gt;
# [[User:Tomeu | Tomeu Vizoso]]&lt;br /&gt;
# [[User:Rgs | Raúl Gutiérrez Segalés]]&lt;br /&gt;
# [[User:Walter | Walter Bender]]&lt;br /&gt;
# [[User:BenjaminBerg | Benjamin Berg]]&lt;br /&gt;
# [[User:DanielDrake | Daniel Drake]]&lt;br /&gt;
&lt;br /&gt;
== Accommodation ==&lt;br /&gt;
This is a table to find out when people do need accommodation during the hackfest.&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=3 style=&amp;quot;border: 1px solid white; border-collapse: collapse; background: #e3e4e5;&amp;quot;&lt;br /&gt;
 |-style=&amp;quot;background:#787878; color: white;&amp;quot;&lt;br /&gt;
! Name !! 27.10.11 !! 28.10.11 !! 29.10.11 !! 30.10.11 !! 31.10.11 !! Note&lt;br /&gt;
|-&lt;br /&gt;
! Simon Schampijer&lt;br /&gt;
| - || yes || yes || yes || - || -&lt;br /&gt;
|-&lt;br /&gt;
! Raúl Gutiérrez Segalés&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Walter Bender&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Benjamin Berg&lt;br /&gt;
| - || yes || yes || yes || - || Arriving 28.10. 10:15; leaving 31.10. 18:31 Uhr&lt;br /&gt;
|-&lt;br /&gt;
! Daniel Drake&lt;br /&gt;
| - || yes || yes || yes || - || travel not booked yet, should happen soon though!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Lodging ==&lt;br /&gt;
This one does seem to be a reasonable offer: http://www.booking.com/hotel/cz/plus-prague-hostel.en-us.html?sid=efb1e369a800d8137da1013763ae00e9;checkin=2011-10-27;checkout=2011-10-30;srfid=8d0e0147ab19098770fd94887bfca1e1X1&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
=== Friday, October 28 ===&lt;br /&gt;
&lt;br /&gt;
=== Saturday, October 29 ===&lt;br /&gt;
&lt;br /&gt;
=== Sunday, October 30 ===&lt;br /&gt;
&lt;br /&gt;
== Impressions ==&lt;br /&gt;
&#039;&#039;link your photos, add your comments here&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Event]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=68832</id>
		<title>Marketing Team/Events/Gtk3 Hackfest 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Marketing_Team/Events/Gtk3_Hackfest_2011&amp;diff=68832"/>
		<updated>2011-08-30T17:03:58Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: /* Attendants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
= Gtk3 Hackfest 2011 =&lt;br /&gt;
Two major changes have recently occurred in Sugar&#039;s underlying technologies. Firstly, GTK+ 2 has been obsoleted by GTK+ 3, and GNOME is now based on GTK+ 3. Secondly, PyGTK, the underlying Python library that Sugar uses to call into GTK+, has been deprecated in favour of PyGObject Introspection (hereafter &amp;quot;PyGI&amp;quot;). More background info can be found at [[Features/GTK3]]. Goal of this hackfest is to remove the biggest blockers before we can start the porting and potentially start porting over.&lt;br /&gt;
&lt;br /&gt;
[[File:Brmlab_impressions.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
== Event Details ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Location:&#039;&#039;&#039; Praha (Prague), Czech Republic&lt;br /&gt;
&lt;br /&gt;
The hackfest will be held at the [http://brmlab.cz/| brmlab a hackerspace in Prague]. The place is located [http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Bubensk%C3%A1+1,+Praha-Praha+7,+%C4%8Cesk%C3%A1+republika&amp;amp;sll=37.0625,-95.677068&amp;amp;sspn=65.390746,135.263672&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Bubensk%C3%A1+1477/1,+170+00+Praha+7-Hole%C5%A1ovice,+Czech+Republic&amp;amp;view=map|Map here], using [http://idos.dpp.cz/idos/ConnForm.aspx?tt=pid&amp;amp;cl=E5|Prague public transport] you can get here easily, just hop off at (Metro &amp;amp; Tram stop: &amp;quot;Vltavska&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date:&#039;&#039;&#039; Friday, October 28th - Sunday October 30th 2011&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary contact:&#039;&#039;&#039; Simon Schampijer &amp;lt;simon AT laptop DOT org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secondary contact:&#039;&#039;&#039; Tomeu Vizoso &amp;lt;tomeu.vizoso AT collabora DOT co DOT uk&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Target audience ==&lt;br /&gt;
Sugar developers&lt;br /&gt;
&lt;br /&gt;
== Sponsors ==&lt;br /&gt;
[[File:Brmlab.jpg|300px]] We want to thank [http://brmlab.cz/| brmlab] for hosting us during the week.&lt;br /&gt;
&lt;br /&gt;
[[File:Olpc_logo.png|300px]] We want to thank the [http://laptop.org OLPC Foundation] for sponsoring regional trips to the event.&lt;br /&gt;
&lt;br /&gt;
== Sponsoring regional trips ==&lt;br /&gt;
This Hackfest is sponsored by the [http://laptop.org OLPC Foundation]. If you need help for funding your travel, please send an email to simon AT laptop DOT org before 8th of October 2011. We won&#039;t be able to refund more than 150 USD per trip, and we will fund regional (european) travels in priority.&lt;br /&gt;
&lt;br /&gt;
== Agenda, goals ==&lt;br /&gt;
* removing Hippo and other custom widgets&lt;br /&gt;
* migration path to Gtk3 (do we ship two toolkits? Do we migrate the shell and the toolkit and activities at once?)&lt;br /&gt;
* porting Sugar&#039;s theme to gtk3 (go benzea, go!)&lt;br /&gt;
* other introspected libraries that need work (namely NM)&lt;br /&gt;
&lt;br /&gt;
== Measuring your success ==&lt;br /&gt;
&#039;&#039;coming soon...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Attendants ==&lt;br /&gt;
&lt;br /&gt;
Are you planning to attend?  Add your name and contact info below!&lt;br /&gt;
# [[User:Erikos | Simon Schampijer]]&lt;br /&gt;
# [[User:Tomeu | Tomeu Vizoso]]&lt;br /&gt;
# [[User:Rgs | Raúl Gutiérrez Segalés]]&lt;br /&gt;
# [[User:Walter | Walter Bender]]&lt;br /&gt;
# [[User:BenjaminBerg | Benjamin Berg]]&lt;br /&gt;
# [[User:DanielDrake | Daniel Drake]]&lt;br /&gt;
&lt;br /&gt;
== Accommodation ==&lt;br /&gt;
This is a table to find out when people do need accommodation during the hackfest.&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=3 style=&amp;quot;border: 1px solid white; border-collapse: collapse; background: #e3e4e5;&amp;quot;&lt;br /&gt;
 |-style=&amp;quot;background:#787878; color: white;&amp;quot;&lt;br /&gt;
! Name !! 27.10.11 !! 28.10.11 !! 29.10.11 !! 30.10.11 !! 31.10.11 !! Note&lt;br /&gt;
|-&lt;br /&gt;
! Simon Schampijer&lt;br /&gt;
| - || yes || yes || yes || - || -&lt;br /&gt;
|-&lt;br /&gt;
! Raúl Gutiérrez Segalés&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Walter Bender&lt;br /&gt;
| yes || yes || yes || yes || yes || -&lt;br /&gt;
|-&lt;br /&gt;
! Benjamin Berg&lt;br /&gt;
| - || yes || yes || yes || - || Arriving 28.10. 10:15; leaving 31.10. 18:31 Uhr&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Lodging ==&lt;br /&gt;
This one does seem to be a reasonable offer: http://www.booking.com/hotel/cz/plus-prague-hostel.en-us.html?sid=efb1e369a800d8137da1013763ae00e9;checkin=2011-10-27;checkout=2011-10-30;srfid=8d0e0147ab19098770fd94887bfca1e1X1&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
=== Friday, October 28 ===&lt;br /&gt;
&lt;br /&gt;
=== Saturday, October 29 ===&lt;br /&gt;
&lt;br /&gt;
=== Sunday, October 30 ===&lt;br /&gt;
&lt;br /&gt;
== Impressions ==&lt;br /&gt;
&#039;&#039;link your photos, add your comments here&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Event]]&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68641</id>
		<title>Events/SugarCamp</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68641"/>
		<updated>2011-08-25T14:56:43Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== General information ===&lt;br /&gt;
&lt;br /&gt;
Please see http://olpc-france.org/blog/sugar-camp-2011-in-paris/&lt;br /&gt;
&lt;br /&gt;
=== Accommodation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Person&lt;br /&gt;
! Nights needed&lt;br /&gt;
! Preference&lt;br /&gt;
|-&lt;br /&gt;
| Christoph Derndorfer&lt;br /&gt;
| 9-14&lt;br /&gt;
| staying with Simon between 9 and 12 and will then find sth for the other 2 nights&lt;br /&gt;
|-&lt;br /&gt;
| Daniel Drake&lt;br /&gt;
| 10, 11&lt;br /&gt;
| staying at Hotel Palma&lt;br /&gt;
|-&lt;br /&gt;
| Raul Gutierrez&lt;br /&gt;
| 10, 11&lt;br /&gt;
| staying at Hotel Palma&lt;br /&gt;
|-&lt;br /&gt;
| Gary Martin&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Simon Schampijer&lt;br /&gt;
| 9-11&lt;br /&gt;
| staying at [http://www.paris-hotel-palma.com/index.htm Hotel Palma] w/ Christoph&lt;br /&gt;
|-&lt;br /&gt;
| Sascha Silbe, Sabine Schneider&lt;br /&gt;
| 9-14&lt;br /&gt;
| staying at [http://www.paris-hotel-palma.com/index.htm Hotel Palma]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Mitchell Seaton&lt;br /&gt;
| 7-12&lt;br /&gt;
| Staying at [http://www.montclair-hostel.com/ Le Montclair Hostel]&lt;br /&gt;
|-&lt;br /&gt;
| Christophe Guéret&lt;br /&gt;
| 10&lt;br /&gt;
| Staying at [http://www.booking.com/hotel/fr/de-paris.en-us.html Hotel de Paris]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Venue: 30 Avenue Corentin Cariou, 75019 Paris, FR&lt;br /&gt;
&lt;br /&gt;
Accomodation options (sorted roughly from cheapest to nicest):&lt;br /&gt;
* [http://www.woodstock.fr/rates.php Woodstock hostel] budget hostel. Daniel stayed here before, it&#039;s not the nicest place in the world (but he&#039;d stay again).&lt;br /&gt;
* [http://www.hotel-bb.com/reservation-hotel/hotel_info?hotelId=4244#hotel&amp;amp;utm_source=googlemap&amp;amp;utm_medium=2010&amp;amp;utm_campaign=googlemap B&amp;amp;B Hotel PARIS Porte de la Villette]. Really cheap &amp;quot;internet offer&amp;quot; hotel rooms - ~18 euro per person per night for a twin? [http://www.tripadvisor.co.uk/Hotel_Review-g187147-d261698-Reviews-B_B_Paris_Porte_de_la_Villette-Paris_Ile_de_France.html Dodgy at night?]. 1km to venue.&lt;br /&gt;
* [http://www.st-christophers.co.uk/paris-hostels/book-paris-hostels St Christophers Hostel]. Massive hostel. 1.2km to venue.&lt;br /&gt;
* [http://www.paris-hostel.biz/budget.html Perfect hotel &amp;amp; hostel] affordable double/triple rooms, with private apartments nearby. 4.2km from venue. --&amp;gt; fully booked already [[User:ChristophD|ChristophD]] 08:52, 19 August 2011 (EDT)&lt;br /&gt;
* [http://www.montclair-hostel.com/ Le Montclair Hostel] - a little more expensive. 3.6km to venue.&lt;br /&gt;
* [http://www.caulaincourt.com/eng/resa-eng.php Caulain Square Hostel]. 4.8km from venue.&lt;br /&gt;
* [http://paris.fr.craigslist.fr/vac/] CraigsList&lt;br /&gt;
&lt;br /&gt;
=== Off-schedule hacking sessions ===&lt;br /&gt;
&lt;br /&gt;
There is separate space available on Saturday and Sunday for hacking sessions, and Bastien is looking for somewhere for Monday too (if not, we can tour some cafes).&lt;br /&gt;
&lt;br /&gt;
Ideas for sessions (please add/edit):&lt;br /&gt;
* Focus on a couple of 11.3.0 issues (Daniel, Simon, Saturday afternoon?)&lt;br /&gt;
* Finish some pending design discussions (Simon, Gary, Sascha)&lt;br /&gt;
* The road to PyGI/GTK3: no-hippo, porting Sugar theme to GTK3, etc. (Daniel, Simon, Raul, Sunday and Monday?)&lt;br /&gt;
* Extra documentation session: wikification of OLPC&#039;s new deployment guide PDF, documentation for ongoing Haiti efforts (Christoph)&lt;br /&gt;
* Journal improvements: Action View, multi selection, WebDAV support, version support, etc. (Sascha)&lt;br /&gt;
* Touch screen support (Sascha)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68425</id>
		<title>Events/SugarCamp</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68425"/>
		<updated>2011-08-22T09:19:54Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: Undo revision 68424 by Erikos (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== General information ===&lt;br /&gt;
&lt;br /&gt;
Please see http://olpc-france.org/blog/sugar-camp-2011-in-paris/&lt;br /&gt;
&lt;br /&gt;
=== Accommodation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Person&lt;br /&gt;
! Nights needed&lt;br /&gt;
! Preference&lt;br /&gt;
|-&lt;br /&gt;
| Christoph Derndorfer&lt;br /&gt;
| 9-14&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Daniel Drake&lt;br /&gt;
| 10, 11&lt;br /&gt;
| Whatever&#039;s cheap (dorm fine), but would pay a small amount more to share a private room&lt;br /&gt;
|-&lt;br /&gt;
| Raul Gutierrez&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Gary Martin&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Simon Schampijer&lt;br /&gt;
| 9-11&lt;br /&gt;
| Private room (shared with 1 other?)&lt;br /&gt;
|-&lt;br /&gt;
| Sascha Silbe&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Venue: 30 Avenue Corentin Cariou, 75019 Paris, FR&lt;br /&gt;
&lt;br /&gt;
Accomodation options (sorted roughly from cheapest to nicest):&lt;br /&gt;
* [http://www.woodstock.fr/rates.php Woodstock hostel] budget hostel. Daniel stayed here before, it&#039;s not the nicest place in the world (but he&#039;d stay again).&lt;br /&gt;
* [http://www.hotel-bb.com/reservation-hotel/hotel_info?hotelId=4244#hotel&amp;amp;utm_source=googlemap&amp;amp;utm_medium=2010&amp;amp;utm_campaign=googlemap B&amp;amp;B Hotel PARIS Porte de la Villette]. Really cheap &amp;quot;internet offer&amp;quot; hotel rooms - ~18 euro per person per night for a twin? [http://www.tripadvisor.co.uk/Hotel_Review-g187147-d261698-Reviews-B_B_Paris_Porte_de_la_Villette-Paris_Ile_de_France.html Dodgy at night?]. 1km to venue.&lt;br /&gt;
* [http://www.st-christophers.co.uk/paris-hostels/book-paris-hostels St Christophers Hostel]. Massive hostel. 1.2km to venue.&lt;br /&gt;
* [http://www.paris-hostel.biz/budget.html Perfect hotel &amp;amp; hostel] affordable double/triple rooms, with private apartments nearby. 4.2km from venue. --&amp;gt; fully booked already [[User:ChristophD|ChristophD]] 08:52, 19 August 2011 (EDT)&lt;br /&gt;
* [http://www.montclair-hostel.com/ Le Montclair Hostel] - a little more expensive. 3.6km to venue.&lt;br /&gt;
* [http://www.caulaincourt.com/eng/resa-eng.php Caulain Square Hostel]. 4.8km from venue.&lt;br /&gt;
&lt;br /&gt;
=== Off-schedule hacking sessions ===&lt;br /&gt;
&lt;br /&gt;
There is separate space available on Saturday and Sunday for hacking sessions, and Bastien is looking for somewhere for Monday too (if not, we can tour some cafes).&lt;br /&gt;
&lt;br /&gt;
Ideas for sessions (please add/edit):&lt;br /&gt;
* Focus on a couple of 11.3.0 issues (Daniel, Simon, Saturday afternoon?)&lt;br /&gt;
* Finish some pending design discussions (Simon, Gary)&lt;br /&gt;
* The road to PyGI/GTK3: no-hippo, porting Sugar theme to GTK3, etc. (Daniel, Simon, Raul, Sunday and Monday?)&lt;br /&gt;
* Extra documentation session: wikification of OLPC&#039;s new deployment guide PDF, documentation for ongoing Haiti efforts (Christoph)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68322</id>
		<title>Events/SugarCamp</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68322"/>
		<updated>2011-08-19T11:06:23Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== General information ===&lt;br /&gt;
&lt;br /&gt;
Please see http://olpc-france.org/blog/sugar-camp-2011-in-paris/&lt;br /&gt;
&lt;br /&gt;
=== Accommodation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Person&lt;br /&gt;
! Nights needed&lt;br /&gt;
! Preference&lt;br /&gt;
|-&lt;br /&gt;
| Christoph Derndorfer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Daniel Drake&lt;br /&gt;
| 10, 11&lt;br /&gt;
| Whatever&#039;s cheap (dorm fine), but would pay a small amount more to share a private room&lt;br /&gt;
|-&lt;br /&gt;
| Raul Gutierrez&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Gary Martin&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Simon Schampijer&lt;br /&gt;
| &lt;br /&gt;
| Private room (shared with 1 other?)&lt;br /&gt;
|-&lt;br /&gt;
| Sascha Silbe&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Venue: 30 Avenue Corentin Cariou, 75019 Paris, FR&lt;br /&gt;
&lt;br /&gt;
Accomodation options (sorted roughly from cheapest to nicest):&lt;br /&gt;
* [http://www.woodstock.fr/rates.php Woodstock hostel] budget hostel. Daniel stayed here before, it&#039;s not the nicest place in the world (but he&#039;d stay again).&lt;br /&gt;
* [http://www.hotel-bb.com/reservation-hotel/hotel_info?hotelId=4244#hotel&amp;amp;utm_source=googlemap&amp;amp;utm_medium=2010&amp;amp;utm_campaign=googlemap B&amp;amp;B Hotel PARIS Porte de la Villette]. Really cheap &amp;quot;internet offer&amp;quot; hotel rooms - ~18 euro per person per night for a twin? [http://www.tripadvisor.co.uk/Hotel_Review-g187147-d261698-Reviews-B_B_Paris_Porte_de_la_Villette-Paris_Ile_de_France.html Dodgy at night?]. 1km to venue.&lt;br /&gt;
* [http://www.st-christophers.co.uk/paris-hostels/book-paris-hostels St Christophers Hostel]. Massive hostel. 1.2km to venue.&lt;br /&gt;
* [http://www.paris-hostel.biz/budget.html Perfect hotel &amp;amp; hostel] affordable double/triple rooms, with private apartments nearby. 4.2km from venue.&lt;br /&gt;
* [http://www.montclair-hostel.com/ Le Montclair Hostel] - a little more expensive. 3.6km to venue.&lt;br /&gt;
* [http://www.caulaincourt.com/eng/resa-eng.php Caulain Square Hostel]. 4.8km from venue.&lt;br /&gt;
&lt;br /&gt;
=== Off-schedule hacking sessions ===&lt;br /&gt;
&lt;br /&gt;
There is separate space available on Saturday and Sunday for hacking sessions, and Bastien is looking for somewhere for Monday too (if not, we can tour some cafes).&lt;br /&gt;
&lt;br /&gt;
Ideas for sessions (please add/edit):&lt;br /&gt;
* Focus on a couple of 11.3.0 issues (Daniel, Simon, Saturday afternoon?)&lt;br /&gt;
* Finish some pending design discussions (Simon, Gary)&lt;br /&gt;
* The road to PyGI/GTK3: no-hippo, porting Sugar theme to GTK3, etc. (Daniel, Simon, Raul, Sunday and Monday?)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68321</id>
		<title>Events/SugarCamp</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Events/SugarCamp&amp;diff=68321"/>
		<updated>2011-08-19T11:00:59Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== General information ===&lt;br /&gt;
&lt;br /&gt;
Please see http://olpc-france.org/blog/sugar-camp-2011-in-paris/&lt;br /&gt;
&lt;br /&gt;
=== Accommodation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Person&lt;br /&gt;
! Nights needed&lt;br /&gt;
! Preference&lt;br /&gt;
|-&lt;br /&gt;
| Christoph Derndorfer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Daniel Drake&lt;br /&gt;
| 10, 11&lt;br /&gt;
| Whatever&#039;s cheap (dorm fine), but would pay a small amount more to share a private room&lt;br /&gt;
|-&lt;br /&gt;
| Raul Gutierrez&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Gary Martin&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Simon Schampijer&lt;br /&gt;
| &lt;br /&gt;
| Private room (shared with 1 other?)&lt;br /&gt;
|-&lt;br /&gt;
| Sascha Silbe&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Venue: 30 Avenue Corentin Cariou, 75019 Paris, FR&lt;br /&gt;
&lt;br /&gt;
Accomodation options (sorted roughly from cheapest to nicest):&lt;br /&gt;
* [http://www.woodstock.fr/rates.php Woodstock hostel] budget hostel. Daniel stayed here before, it&#039;s not the nicest place in the world (but he&#039;d stay again).&lt;br /&gt;
* [http://www.paris-hostel.biz/budget.html Perfect hotel &amp;amp; hostel] affordable double/triple rooms, with private apartments nearby. 4.2km from venue.&lt;br /&gt;
* [http://www.montclair-hostel.com/ Le Montclair Hostel] - a little more expensive. 3.6km to venue.&lt;br /&gt;
* [http://www.caulaincourt.com/eng/resa-eng.php Caulain Square Hostel]. 4.8km from venue.&lt;br /&gt;
* [http://www.hotel-bb.com/reservation-hotel/hotel_info?hotelId=4244#hotel&amp;amp;utm_source=googlemap&amp;amp;utm_medium=2010&amp;amp;utm_campaign=googlemap B&amp;amp;B Hotel PARIS Porte de la Villette]. Really cheap &amp;quot;internet offer&amp;quot; hotel rooms - ~18 euro per person per night for a twin? 1km to venue.&lt;br /&gt;
* [http://www.st-christophers.co.uk/paris-hostels/book-paris-hostels St Christophers Hostel]. Massive hostel. 1.2km to venue.&lt;br /&gt;
&lt;br /&gt;
=== Off-schedule hacking sessions ===&lt;br /&gt;
&lt;br /&gt;
There is separate space available on Saturday and Sunday for hacking sessions, and Bastien is looking for somewhere for Monday too (if not, we can tour some cafes).&lt;br /&gt;
&lt;br /&gt;
Ideas for sessions (please add/edit):&lt;br /&gt;
* Focus on a couple of 11.3.0 issues (Daniel, Simon, Saturday afternoon?)&lt;br /&gt;
* Finish some pending design discussions (Simon, Gary)&lt;br /&gt;
* The road to PyGI/GTK3: no-hippo, porting Sugar theme to GTK3, etc. (Daniel, Simon, Raul, Sunday and Monday?)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=67849</id>
		<title>Features/GTK3/Porting</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Features/GTK3/Porting&amp;diff=67849"/>
		<updated>2011-08-06T14:26:28Z</updated>

		<summary type="html">&lt;p&gt;DanielDrake: Created page with &amp;quot;To port PyGTK to PyGI, read this: https://live.gnome.org/PyGObject/IntrospectionPorting (especially the section abouut pygi-convert.sh)  If you are having trouble finding how a p...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To port PyGTK to PyGI, read this: https://live.gnome.org/PyGObject/IntrospectionPorting (especially the section abouut pygi-convert.sh)&lt;br /&gt;
&lt;br /&gt;
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants)&lt;/div&gt;</summary>
		<author><name>DanielDrake</name></author>
	</entry>
</feed>