Changes

Jump to navigation Jump to search
248 bytes added ,  14:37, 11 April 2010
m
formatting
Line 14: Line 14:  
==== How can I create a Sugar Activity? ====
 
==== How can I create a Sugar Activity? ====
   −
Documentation is available from [[Activity Team/Resources]].
+
:Documentation is available from [[Activity Team/Resources]].
    
==== Where do I find information about implementing X in Sugar? ====
 
==== Where do I find information about implementing X in Sugar? ====
Line 53: Line 53:     
:You can go into the Sugar Control Panel; it is listed on the about-computer panel (which accesses jarabe.config.version).  
 
:You can go into the Sugar Control Panel; it is listed on the about-computer panel (which accesses jarabe.config.version).  
 
+
<ol style="list-style-type:none">
From the Terminal, you can type:
+
<li>From the Terminal, you can type:
rpm -q sugar
+
<pre>
or you can:
+
rpm -q sugar
grep version jarabe/config.py
+
</pre></li>
or:
+
<li>or you can:</li>
python -c "from jarabe import config; print config.version"
+
<li>
 +
<pre>
 +
grep version jarabe/config.py
 +
</pre></li>
 +
<li>or:</li>
 +
<li>
 +
<pre>
 +
python -c "from jarabe import config; print config.version"
 +
</pre></li>
 +
</ol>
    
==== How do I know if my activity is running on an OLPC XO laptop? ====
 
==== How do I know if my activity is running on an OLPC XO laptop? ====
    
:You can test for the existence of '/etc/olpc-release':
 
:You can test for the existence of '/etc/olpc-release':
 
+
<ol style="list-style-type:none">
if os.path.exists('/etc/olpc-release'):
+
<li>
 +
<pre>
 +
if os.path.exists('/etc/olpc-release'):
 
     ...
 
     ...
 +
</pre></li>
 +
</ol>
    
==== How do I tell Sugar that my activity does not write any data to the Journal? ====
 
==== How do I tell Sugar that my activity does not write any data to the Journal? ====
   −
One of my activities is a game that does not produce any document in the journal. How do I inform Sugar?
+
:One of my activities is a game that does not produce any document in the journal. How do I inform Sugar?
 
  −
Pass to Activity.__init__ create_jobject=False e.g.
  −
 
  −
class MyActivity(activity.Activity):
  −
    def __init__(self, handle):
  −
        activity.Activity.__init__(self, handle, create_jobject=False)
     −
(But keep in mind http://bugs.sugarlabs.org/ticket/1714)
+
:Pass to Activity.__init__ create_jobject=False
 +
<ol style="list-style-type:none">
 +
<li>
 +
<pre>
 +
class MyActivity(activity.Activity):
 +
    def __init__(self, handle):
 +
        activity.Activity.__init__(self, handle, create_jobject=False)
 +
</pre></li>
 +
<li>(But keep in mind http://bugs.sugarlabs.org/ticket/1714)</li>
 +
</ol>

Navigation menu