<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=User%3AWalter%2Ffavoriteslayout.py</id>
	<title>User:Walter/favoriteslayout.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=User%3AWalter%2Ffavoriteslayout.py"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;action=history"/>
	<updated>2026-05-13T18:59:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=49186&amp;oldid=prev</id>
		<title>Patrol: moved Walter is a wanker 2/favoriteslayout.py to User:Walter/favoriteslayout.py over redirect: revert</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=49186&amp;oldid=prev"/>
		<updated>2010-03-01T18:26:10Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php?title=Walter_is_a_wanker_2/favoriteslayout.py&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Walter is a wanker 2/favoriteslayout.py (page does not exist)&quot;&gt;Walter is a wanker 2/favoriteslayout.py&lt;/a&gt; to &lt;a href=&quot;/go/User:Walter/favoriteslayout.py&quot; title=&quot;User:Walter/favoriteslayout.py&quot;&gt;User:Walter/favoriteslayout.py&lt;/a&gt; over redirect: revert&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:26, 1 March 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patrol</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=49100&amp;oldid=prev</id>
		<title>Pmv2: moved User:Walter/favoriteslayout.py to Walter is a wanker 2/favoriteslayout.py:&amp;#32;Walter is a wanker</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=49100&amp;oldid=prev"/>
		<updated>2010-03-01T18:19:43Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/go/User:Walter/favoriteslayout.py&quot; title=&quot;User:Walter/favoriteslayout.py&quot;&gt;User:Walter/favoriteslayout.py&lt;/a&gt; to &lt;a href=&quot;/index.php?title=Walter_is_a_wanker_2/favoriteslayout.py&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Walter is a wanker 2/favoriteslayout.py (page does not exist)&quot;&gt;Walter is a wanker 2/favoriteslayout.py&lt;/a&gt;: Walter is a wanker&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:19, 1 March 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pmv2</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=45665&amp;oldid=prev</id>
		<title>Patrol: moved Anal bleaching 3/favoriteslayout.py to User:Walter/favoriteslayout.py over redirect: revert</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=45665&amp;oldid=prev"/>
		<updated>2010-02-21T23:03:03Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php?title=Anal_bleaching_3/favoriteslayout.py&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Anal bleaching 3/favoriteslayout.py (page does not exist)&quot;&gt;Anal bleaching 3/favoriteslayout.py&lt;/a&gt; to &lt;a href=&quot;/go/User:Walter/favoriteslayout.py&quot; title=&quot;User:Walter/favoriteslayout.py&quot;&gt;User:Walter/favoriteslayout.py&lt;/a&gt; over redirect: revert&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:03, 21 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patrol</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=44496&amp;oldid=prev</id>
		<title>Anal bleaching: moved User:Walter/favoriteslayout.py to Anal bleaching 3/favoriteslayout.py:&amp;#32;Anal bleaching</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=44496&amp;oldid=prev"/>
		<updated>2010-02-21T22:15:47Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/go/User:Walter/favoriteslayout.py&quot; title=&quot;User:Walter/favoriteslayout.py&quot;&gt;User:Walter/favoriteslayout.py&lt;/a&gt; to &lt;a href=&quot;/index.php?title=Anal_bleaching_3/favoriteslayout.py&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Anal bleaching 3/favoriteslayout.py (page does not exist)&quot;&gt;Anal bleaching 3/favoriteslayout.py&lt;/a&gt;: Anal bleaching&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:15, 21 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Anal bleaching</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=9611&amp;oldid=prev</id>
		<title>Walter at 23:31, 13 October 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=9611&amp;oldid=prev"/>
		<updated>2008-10-13T23:31:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:31, 13 October 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==/usr/share/sugar/shell/view/home/favoriteslayout.py==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Copyright (C) 2008 One Laptop Per Child&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Copyright (C) 2008 One Laptop Per Child&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Walter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=9602&amp;oldid=prev</id>
		<title>Walter: update for 0.82</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=9602&amp;oldid=prev"/>
		<updated>2008-10-13T23:03:14Z</updated>

		<summary type="html">&lt;p&gt;update for 0.82&lt;/p&gt;
&lt;a href=&quot;https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;amp;diff=9602&amp;amp;oldid=8677&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Walter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8677&amp;oldid=prev</id>
		<title>Walter: User:Walter/favoritelayout.py moved to User:Walter/favoriteslayout.py</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8677&amp;oldid=prev"/>
		<updated>2008-09-10T04:50:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=User:Walter/favoritelayout.py&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:Walter/favoritelayout.py (page does not exist)&quot;&gt;User:Walter/favoritelayout.py&lt;/a&gt; moved to &lt;a href=&quot;/go/User:Walter/favoriteslayout.py&quot; title=&quot;User:Walter/favoriteslayout.py&quot;&gt;User:Walter/favoriteslayout.py&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:50, 10 September 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Walter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8658&amp;oldid=prev</id>
		<title>Walter at 22:47, 9 September 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8658&amp;oldid=prev"/>
		<updated>2008-09-09T22:47:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:47, 9 September 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l223&quot;&gt;Line 223:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 223:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         # radius is proportional to index/children_count&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         # radius is proportional to index/children_count&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         myminimum = _MINIMUM_RADIUS * .667&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         myminimum = _MINIMUM_RADIUS * .667&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         newradius = ((radius - myminimum) * (index * 1.1) / children_count)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         newradius = ((radius - myminimum) * (index * 1.1) / children_count) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;+&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                         &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;+ &lt;/del&gt;myminimum&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                         myminimum&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         x = newradius * math.cos(angle) + (width - icon_size) / 2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         x = newradius * math.cos(angle) + (width - icon_size) / 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         y = newradius * math.sin(angle) + (height - icon_size -&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         y = newradius * math.sin(angle) + (height - icon_size -&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Walter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8657&amp;oldid=prev</id>
		<title>Walter at 22:44, 9 September 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8657&amp;oldid=prev"/>
		<updated>2008-09-09T22:44:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:44, 9 September 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l218&quot;&gt;Line 218:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 218:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     def _calculate_position(self, radius, icon_size, index, children_count):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     def _calculate_position(self, radius, icon_size, index, children_count):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         width, height = self.box.get_allocation()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         width, height = self.box.get_allocation()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        # angle decreases as the radius increases&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# go around 2 times, e&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;g&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, 4 pi&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;inc = 12&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0 + index / 6&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         angle = index * (&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4 &lt;/del&gt;* math.pi / &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;children_count&lt;/del&gt;) - math.pi / 2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         angle = index * (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2 &lt;/ins&gt;* math.pi / &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;inc&lt;/ins&gt;) - math.pi / 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         x = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;radius &lt;/del&gt;* math.cos(angle) + (width - icon_size) / 2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        # radius is proportional to index/children_count&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         y = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;radius &lt;/del&gt;* math.sin(angle) + (height - icon_size -&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        myminimum = _MINIMUM_RADIUS * .667&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        newradius = ((radius - myminimum) * (index * 1.1) / children_count)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                                        + myminimum&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         x = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;newradius &lt;/ins&gt;* math.cos(angle) + (width - icon_size) / 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         y = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;newradius &lt;/ins&gt;* math.sin(angle) + (height - icon_size -&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                         style.GRID_CELL_SIZE) / 2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                         style.GRID_CELL_SIZE) / 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return x, y&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return x, y&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Walter</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8412&amp;oldid=prev</id>
		<title>Walter: New page: &lt;pre&gt; # Copyright (C) 2008 One Laptop Per Child # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Walter/favoriteslayout.py&amp;diff=8412&amp;oldid=prev"/>
		<updated>2008-08-27T20:01:50Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; # Copyright (C) 2008 One Laptop Per Child # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# Copyright (C) 2008 One Laptop Per Child&lt;br /&gt;
#&lt;br /&gt;
# This program is free software; you can redistribute it and/or modify&lt;br /&gt;
# it under the terms of the GNU General Public License as published by&lt;br /&gt;
# the Free Software Foundation; either version 2 of the License, or&lt;br /&gt;
# (at your option) any later version.&lt;br /&gt;
#&lt;br /&gt;
# This program is distributed in the hope that it will be useful,&lt;br /&gt;
# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
# GNU General Public License for more details.&lt;br /&gt;
#&lt;br /&gt;
# You should have received a copy of the GNU General Public License&lt;br /&gt;
# along with this program; if not, write to the Free Software&lt;br /&gt;
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA&lt;br /&gt;
&lt;br /&gt;
import logging&lt;br /&gt;
import math&lt;br /&gt;
import hashlib&lt;br /&gt;
&lt;br /&gt;
import gobject&lt;br /&gt;
import gtk&lt;br /&gt;
import hippo&lt;br /&gt;
&lt;br /&gt;
from sugar.graphics import style&lt;br /&gt;
from sugar import activity&lt;br /&gt;
&lt;br /&gt;
from view.home.grid import Grid&lt;br /&gt;
&lt;br /&gt;
_logger = logging.getLogger(&amp;#039;FavoritesLayout&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
_CELL_SIZE = 4&lt;br /&gt;
_BASE_SCALE = 1000&lt;br /&gt;
&lt;br /&gt;
class FavoritesLayout(gobject.GObject, hippo.CanvasLayout):&lt;br /&gt;
    __gtype_name__ = &amp;#039;FavoritesLayout&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self):&lt;br /&gt;
        gobject.GObject.__init__(self)&lt;br /&gt;
        self.box = None&lt;br /&gt;
        self.fixed_positions = {}&lt;br /&gt;
&lt;br /&gt;
    def do_set_box(self, box):&lt;br /&gt;
        self.box = box&lt;br /&gt;
&lt;br /&gt;
    def do_get_height_request(self, for_width):&lt;br /&gt;
        return 0, gtk.gdk.screen_height() - style.GRID_CELL_SIZE&lt;br /&gt;
&lt;br /&gt;
    def do_get_width_request(self):&lt;br /&gt;
        return 0, gtk.gdk.screen_width()&lt;br /&gt;
&lt;br /&gt;
    def compare_activities(self, icon_a, icon_b):&lt;br /&gt;
        return 0&lt;br /&gt;
&lt;br /&gt;
    def append(self, icon, locked=False):&lt;br /&gt;
        self.box.insert_sorted(icon, 0, self.compare_activities)&lt;br /&gt;
        if hasattr(icon, &amp;#039;fixed_position&amp;#039;):&lt;br /&gt;
            relative_x, relative_y = icon.fixed_position&lt;br /&gt;
            if relative_x &amp;gt;= 0 and relative_y &amp;gt;= 0:&lt;br /&gt;
                min_width_, width = self.box.get_width_request()&lt;br /&gt;
                min_height_, height = self.box.get_height_request(width)&lt;br /&gt;
                self.fixed_positions[icon] = \&lt;br /&gt;
                        (int(relative_x * _BASE_SCALE / float(width)),&lt;br /&gt;
                         int(relative_y * _BASE_SCALE / float(height)))&lt;br /&gt;
&lt;br /&gt;
    def remove(self, icon):&lt;br /&gt;
        if icon in self.fixed_positions:&lt;br /&gt;
            del self.fixed_positions[icon]&lt;br /&gt;
        self.box.remove(icon)&lt;br /&gt;
&lt;br /&gt;
    def move_icon(self, icon, x, y, locked=False):&lt;br /&gt;
        if icon not in self.box.get_children():&lt;br /&gt;
            raise ValueError(&amp;#039;Child not in box.&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
        if hasattr(icon, &amp;#039;get_bundle_id&amp;#039;) and hasattr(icon, &amp;#039;get_version&amp;#039;):&lt;br /&gt;
            min_width_, width = self.box.get_width_request()&lt;br /&gt;
            min_height_, height = self.box.get_height_request(width)&lt;br /&gt;
            registry = activity.get_registry()&lt;br /&gt;
            registry.set_activity_position(&lt;br /&gt;
                    icon.get_bundle_id(), icon.get_version(),&lt;br /&gt;
                    x * width / float(_BASE_SCALE),&lt;br /&gt;
                    y * height / float(_BASE_SCALE))&lt;br /&gt;
            self.fixed_positions[icon] = (x, y)&lt;br /&gt;
&lt;br /&gt;
    def do_allocate(self, x, y, width, height, req_width, req_height,&lt;br /&gt;
                    origin_changed):&lt;br /&gt;
        raise NotImplementedError()&lt;br /&gt;
&lt;br /&gt;
    def allow_dnd(self):&lt;br /&gt;
        return False&lt;br /&gt;
&lt;br /&gt;
class RandomLayout(FavoritesLayout):&lt;br /&gt;
    __gtype_name__ = &amp;#039;RandomLayout&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self):&lt;br /&gt;
        FavoritesLayout.__init__(self)&lt;br /&gt;
&lt;br /&gt;
        min_width_, width = self.do_get_width_request()&lt;br /&gt;
        min_height_, height = self.do_get_height_request(width)&lt;br /&gt;
&lt;br /&gt;
        self._grid = Grid(width / _CELL_SIZE, height / _CELL_SIZE)&lt;br /&gt;
        self._grid.connect(&amp;#039;child-changed&amp;#039;, self.__grid_child_changed_cb)&lt;br /&gt;
&lt;br /&gt;
    def __grid_child_changed_cb(self, grid, child):&lt;br /&gt;
        child.emit_request_changed()&lt;br /&gt;
&lt;br /&gt;
    def append(self, icon, locked=False):&lt;br /&gt;
        FavoritesLayout.append(self, icon, locked)&lt;br /&gt;
&lt;br /&gt;
        min_width_, child_width = icon.get_width_request()&lt;br /&gt;
        min_height_, child_height = icon.get_height_request(child_width)&lt;br /&gt;
        min_width_, width = self.box.get_width_request()&lt;br /&gt;
        min_height_, height = self.box.get_height_request(width)&lt;br /&gt;
&lt;br /&gt;
        if icon in self.fixed_positions:&lt;br /&gt;
            x, y = self.fixed_positions[icon]&lt;br /&gt;
            x = min(x, width - child_width)&lt;br /&gt;
            y = min(y, height - child_height)&lt;br /&gt;
        elif hasattr(icon, &amp;#039;get_bundle_id&amp;#039;):&lt;br /&gt;
            name_hash = hashlib.md5(icon.get_bundle_id())&lt;br /&gt;
            x = int(name_hash.hexdigest()[:5], 16) % (width - child_width)&lt;br /&gt;
            y = int(name_hash.hexdigest()[-5:], 16) % (height - child_height)&lt;br /&gt;
        else:&lt;br /&gt;
            x = None&lt;br /&gt;
            y = None&lt;br /&gt;
&lt;br /&gt;
        if x is None or y is None:&lt;br /&gt;
            self._grid.add(icon,&lt;br /&gt;
                           child_width / _CELL_SIZE, child_height / _CELL_SIZE)&lt;br /&gt;
        else:&lt;br /&gt;
            self._grid.add(icon,&lt;br /&gt;
                           child_width / _CELL_SIZE, child_height / _CELL_SIZE,&lt;br /&gt;
                           x / _CELL_SIZE, y / _CELL_SIZE)&lt;br /&gt;
&lt;br /&gt;
    def remove(self, icon):&lt;br /&gt;
        self._grid.remove(icon)&lt;br /&gt;
        FavoritesLayout.remove(self, icon)&lt;br /&gt;
&lt;br /&gt;
    def move_icon(self, icon, x, y, locked=False):&lt;br /&gt;
        self._grid.move(icon, x / _CELL_SIZE, y / _CELL_SIZE, locked)&lt;br /&gt;
        FavoritesLayout.move_icon(self, icon, x, y, locked)&lt;br /&gt;
&lt;br /&gt;
    def do_allocate(self, x, y, width, height, req_width, req_height,&lt;br /&gt;
                    origin_changed):&lt;br /&gt;
        for child in self.box.get_layout_children():&lt;br /&gt;
            # We need to always get requests to not confuse hippo&lt;br /&gt;
            min_w_, child_width = child.get_width_request()&lt;br /&gt;
            min_h_, child_height = child.get_height_request(child_width)&lt;br /&gt;
&lt;br /&gt;
            rect = self._grid.get_child_rect(child.item)&lt;br /&gt;
            child.allocate(rect.x * _CELL_SIZE,&lt;br /&gt;
                           rect.y * _CELL_SIZE,&lt;br /&gt;
                           child_width,&lt;br /&gt;
                           child_height,&lt;br /&gt;
                           origin_changed)&lt;br /&gt;
&lt;br /&gt;
    def allow_dnd(self):&lt;br /&gt;
        return True&lt;br /&gt;
&lt;br /&gt;
_MINIMUM_RADIUS = style.XLARGE_ICON_SIZE / 2 + style.DEFAULT_SPACING + \&lt;br /&gt;
        style.STANDARD_ICON_SIZE * 2&lt;br /&gt;
_MAXIMUM_RADIUS = (gtk.gdk.screen_height() - style.GRID_CELL_SIZE) / 2 - \&lt;br /&gt;
        style.STANDARD_ICON_SIZE - style.DEFAULT_SPACING&lt;br /&gt;
&lt;br /&gt;
class RingLayout(FavoritesLayout):&lt;br /&gt;
    __gtype_name__ = &amp;#039;RingLayout&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self):&lt;br /&gt;
        FavoritesLayout.__init__(self)&lt;br /&gt;
        self._locked_children = {}&lt;br /&gt;
&lt;br /&gt;
    def append(self, icon, locked=False):&lt;br /&gt;
        FavoritesLayout.append(self, icon, locked)&lt;br /&gt;
        if locked:&lt;br /&gt;
            child = self.box.find_box_child(icon)&lt;br /&gt;
            self._locked_children[child] = (0, 0)&lt;br /&gt;
&lt;br /&gt;
    def remove(self, icon):&lt;br /&gt;
        child = self.box.find_box_child(icon)&lt;br /&gt;
        if child in self._locked_children:&lt;br /&gt;
            del self._locked_children[child]&lt;br /&gt;
        FavoritesLayout.remove(self, icon)&lt;br /&gt;
&lt;br /&gt;
    def move_icon(self, icon, x, y, locked=False):&lt;br /&gt;
        FavoritesLayout.move_icon(self, icon, x, y, locked)&lt;br /&gt;
        if locked:&lt;br /&gt;
            child = self.box.find_box_child(icon)&lt;br /&gt;
            self._locked_children[child] = (x, y)&lt;br /&gt;
&lt;br /&gt;
    def _calculate_radius_and_icon_size(self, children_count):&lt;br /&gt;
        angle = 2 * math.pi / children_count&lt;br /&gt;
&lt;br /&gt;
        # what&amp;#039;s the radius required without downscaling?&lt;br /&gt;
        distance = style.STANDARD_ICON_SIZE + style.DEFAULT_SPACING&lt;br /&gt;
        icon_size = style.STANDARD_ICON_SIZE&lt;br /&gt;
        &lt;br /&gt;
        if children_count == 1:&lt;br /&gt;
            radius = 0&lt;br /&gt;
        else:&lt;br /&gt;
            radius = math.sqrt(distance ** 2 /&lt;br /&gt;
                    (math.sin(angle) ** 2 + (math.cos(angle) - 1) ** 2))&lt;br /&gt;
        &lt;br /&gt;
        if radius &amp;lt; _MINIMUM_RADIUS:&lt;br /&gt;
            # we can upscale, if we want&lt;br /&gt;
            icon_size += style.STANDARD_ICON_SIZE * \&lt;br /&gt;
                    (0.5 * (_MINIMUM_RADIUS - radius) / _MINIMUM_RADIUS)&lt;br /&gt;
            radius = _MINIMUM_RADIUS&lt;br /&gt;
        elif radius &amp;gt; _MAXIMUM_RADIUS:&lt;br /&gt;
            radius = _MAXIMUM_RADIUS&lt;br /&gt;
            # need to downscale. what&amp;#039;s the icon size required?&lt;br /&gt;
            distance = math.sqrt((radius * math.sin(angle)) ** 2 + \&lt;br /&gt;
                    (radius * (math.cos(angle) - 1)) ** 2)&lt;br /&gt;
            icon_size = distance - style.DEFAULT_SPACING&lt;br /&gt;
        &lt;br /&gt;
        return radius, icon_size&lt;br /&gt;
&lt;br /&gt;
    def _calculate_position(self, radius, icon_size, index, children_count):&lt;br /&gt;
        width, height = self.box.get_allocation()&lt;br /&gt;
&lt;br /&gt;
        # go around 2 times, e.g., 4 pi&lt;br /&gt;
        angle = index * (4 * math.pi / children_count) - math.pi / 2&lt;br /&gt;
        x = radius * math.cos(angle) + (width - icon_size) / 2&lt;br /&gt;
        y = radius * math.sin(angle) + (height - icon_size -&lt;br /&gt;
                                        style.GRID_CELL_SIZE) / 2&lt;br /&gt;
        return x, y&lt;br /&gt;
&lt;br /&gt;
    def _get_children_in_ring(self):&lt;br /&gt;
        children_in_ring = [child for child in self.box.get_layout_children() \&lt;br /&gt;
                if child not in self._locked_children]&lt;br /&gt;
        return children_in_ring&lt;br /&gt;
&lt;br /&gt;
    def _update_icon_sizes(self):&lt;br /&gt;
        children_in_ring = self._get_children_in_ring()&lt;br /&gt;
        radius_, icon_size = \&lt;br /&gt;
                self._calculate_radius_and_icon_size(len(children_in_ring))&lt;br /&gt;
&lt;br /&gt;
        for child in children_in_ring:&lt;br /&gt;
            child.item.props.size = icon_size&lt;br /&gt;
&lt;br /&gt;
    def do_allocate(self, x, y, width, height, req_width, req_height,&lt;br /&gt;
                    origin_changed):&lt;br /&gt;
        children_in_ring = self._get_children_in_ring()&lt;br /&gt;
        if children_in_ring:&lt;br /&gt;
            radius, icon_size = \&lt;br /&gt;
                    self._calculate_radius_and_icon_size(len(children_in_ring))&lt;br /&gt;
&lt;br /&gt;
            for n in range(len(children_in_ring)):&lt;br /&gt;
                child = children_in_ring[n]&lt;br /&gt;
&lt;br /&gt;
                x, y = self._calculate_position(radius, icon_size, n,&lt;br /&gt;
                                                len(children_in_ring))&lt;br /&gt;
                # We need to always get requests to not confuse hippo&lt;br /&gt;
                min_w_, child_width = child.get_width_request()&lt;br /&gt;
                min_h_, child_height = child.get_height_request(child_width)&lt;br /&gt;
&lt;br /&gt;
                child.allocate(int(x), int(y), child_width, child_height,&lt;br /&gt;
                               origin_changed)&lt;br /&gt;
&lt;br /&gt;
                # decrease the radius slightly with each icon&lt;br /&gt;
                radius -= 6;&lt;br /&gt;
&lt;br /&gt;
        for child in self._locked_children.keys():&lt;br /&gt;
            x, y = self._locked_children[child]&lt;br /&gt;
&lt;br /&gt;
            # We need to always get requests to not confuse hippo&lt;br /&gt;
            min_w_, child_width = child.get_width_request()&lt;br /&gt;
            min_h_, child_height = child.get_height_request(child_width)&lt;br /&gt;
&lt;br /&gt;
            child.allocate(int(x), int(y), child_width, child_height,&lt;br /&gt;
                            origin_changed)&lt;br /&gt;
&lt;br /&gt;
    def compare_activities(self, icon_a, icon_b):&lt;br /&gt;
        if hasattr(icon_a, &amp;#039;installation_time&amp;#039;) and \&lt;br /&gt;
                hasattr(icon_b, &amp;#039;installation_time&amp;#039;):&lt;br /&gt;
            return icon_b.installation_time - icon_a.installation_time&lt;br /&gt;
        else:&lt;br /&gt;
            return 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Walter</name></author>
	</entry>
</feed>