[Sugar-devel] [DESIGN] [PATCH] "About" dialog design and implementation

Sebastian Silva sebastian at somosazucar.org
Tue Apr 12 21:38:45 EDT 2011


Hello all,
As promised, I've designed and implemented a generic "About this 
activity" dialog.
I have been obsessing about it for longer than I hoped and now I'm 
pretty satisfied.

Screenshot of About Dialog
(screenshot from trisquel sweets packages - looks similar on dextrose 
only fonts look larger.

I've taken code snippets and inspiration from Implode, My Settings, Get 
Books, Turtle Art, Surf, Write and probably more.

Here's the features:
     - 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.
     - For this it provides an icon (attached). "i" for information is 
pretty standard internationally, but suggestions/replacements are welcome.
     - Its a drop-in inclusion as shown in the diff below [1].
     - It will display information from the following files if they are 
found in the bundle path:
             ABOUT - NEWS - README / DEVELOPING - HACKING - TODO / 
COPYING / MANTAINERS - AUTHORS
     - Information is grouped in four screens (navigation is in the 
toolbar, by Combobox or forward-back buttons):
             About this Activity / How to contribute / License / Credits
     - 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).
     - Should be quite simple to extend with logos and such.
     - Still there might be some rough edges - this is the first 
iteration. Feedback is welcome!

The reason I took this approach is we don't want to replicate 
information which is already inside the Bundle.
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.

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.
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.
Maybe we can agree to mantain ABOUT and MANTAINERS/AUTHORS files as well 
as COPYING?

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.

Thanks for your time and eyes.
Sebastian

[1]
Added generic About dialog.


diff --git a/activity.py b/activity.py
index 5b06254..fe3da0b 100644
--- a/activity.py
+++ b/activity.py
@@ -29,6 +29,7 @@ from sugar.activity.widgets import TitleEntry
  from sugar.activity.widgets import StopButton
  from sugar.activity.widgets import ShareButton
  from sugar.activity.widgets import KeepButton
+from about import AboutButton

  class HelloWorldActivity(activity.Activity):
      """HelloWorldActivity class as specified in activity.info"""
@@ -66,6 +67,10 @@ class HelloWorldActivity(activity.Activity):
          toolbar_box.toolbar.insert(separator, -1)
          separator.show()

+        about_button = AboutButton(self)
+        toolbar_box.toolbar.insert(about_button, -1)
+        about_button.show()
+
          stop_button = StopButton(self)
          toolbar_box.toolbar.insert(stop_button, -1)
          stop_button.show()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110412/fc8acf1b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: About.png
Type: image/png
Size: 69685 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110412/fc8acf1b/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: about.py
Type: text/x-python
Size: 11350 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110412/fc8acf1b/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: activity-about.svg
Type: image/svg+xml
Size: 3412 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110412/fc8acf1b/attachment-0001.svg>


More information about the Sugar-devel mailing list