<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all,<br>
As promised, I've designed and implemented a generic "About this
activity" dialog.<br>
I have been obsessing about it for longer than I hoped and now I'm
pretty satisfied.<br>
<br>
<img alt="Screenshot of About Dialog"
src="cid:part1.06090208.00080100@somosazucar.org" height="548"
width="832"><br>
(screenshot from trisquel sweets packages - looks similar on
dextrose only fonts look larger.<br>
<br>
I've taken code snippets and inspiration from Implode, My Settings,
Get Books, Turtle Art, Surf, Write and probably more.<br>
<br>
Here's the features:<br>
- It implements a Toolbutton which is meant to be attached
either in an activity's Activity Toolbar or activities with a simple
toolbar, in the main toolbar.<br>
- For this it provides an icon (attached). "i" for information
is pretty standard internationally, but suggestions/replacements are
welcome.<br>
- Its a drop-in inclusion as shown in the diff below [1]. <br>
- It will display information from the following files if they
are found in the bundle path:<br>
ABOUT - NEWS - README / DEVELOPING - HACKING - TODO /
COPYING / MANTAINERS - AUTHORS<br>
- Information is grouped in four screens (navigation is in the
toolbar, by Combobox or forward-back buttons):<br>
About this Activity / How to contribute / License /
Credits<br>
- There is i18n support. It is done by looking for a file with a
suffix with the language code (for instance: README.es for spanish).<br>
- Should be quite simple to extend with logos and such.<br>
- Still there might be some rough edges - this is the first
iteration. Feedback is welcome!<br>
<br>
The reason I took this approach is we don't want to replicate
information which is already inside the Bundle.<br>
With the exception of ABOUT (the current text I took from the
description in ASLO), these are the files with information I've
found in activities.<br>
<br>
I've pushed the code into
git://git.sugarlabs.org/~icarito/hello-world/hello-icarito.git and
perhaps it could be merged if it makes sense.<br>
Clone it if you'd like to try it: just edit or create any of the
above files with capital filenames to watch the info appear in the
dialog.<br>
Maybe we can agree to mantain ABOUT and MANTAINERS/AUTHORS files as
well as COPYING?<br>
<br>
I'm hoping this dialog gets adopted in the usual activities. For
this, also I'd like to update the HIG to suggest its usage.<br>
<br>
Thanks for your time and eyes.<br>
Sebastian<br>
<br>
[1]<br>
Added generic About dialog.<br>
<br>
<br>
diff --git a/activity.py b/activity.py<br>
index 5b06254..fe3da0b 100644<br>
--- a/activity.py<br>
+++ b/activity.py<br>
@@ -29,6 +29,7 @@ from sugar.activity.widgets import TitleEntry<br>
from sugar.activity.widgets import StopButton<br>
from sugar.activity.widgets import ShareButton<br>
from sugar.activity.widgets import KeepButton<br>
+from about import AboutButton<br>
<br>
class HelloWorldActivity(activity.Activity):<br>
"""HelloWorldActivity class as specified in activity.info"""<br>
@@ -66,6 +67,10 @@ class HelloWorldActivity(activity.Activity):<br>
toolbar_box.toolbar.insert(separator, -1)<br>
separator.show()<br>
<br>
+ about_button = AboutButton(self)<br>
+ toolbar_box.toolbar.insert(about_button, -1)<br>
+ about_button.show()<br>
+<br>
stop_button = StopButton(self)<br>
toolbar_box.toolbar.insert(stop_button, -1)<br>
stop_button.show()<br>
<br>
</body>
</html>