Re: [Sugar-devel] Q on tracker cleanup / triage

2010-07-05 Thread Tomeu Vizoso
On 07/04/2010 01:11 AM, Tim McNamara wrote:
 Hi devs,

 500+ unclosed bugs causes problems. I feel intimidated  overwhelmed by
 this number. I also find it difficult to find material sift through bug
 reports, to find areas where I can help (although, at the moment, I'm
 quite content with sugar-love level problems).

About 500+ bugs being hard to handle, I think that maybe what happens is
that either those are not correctly categorized, or our tools are not
making use of all info and thus unwanted results appear in our queries
making difficult to find what we look for.

 However, 500+ bugs isn't
 that accurate. Some have been identified as upstream problems, but their
 resolution status remains open.

As it has been said in another reply, sometimes we want to track
upstream resolution status, and sometimes even a workaround in Sugar itself.

 I suggest that we make more use of the wontfix resolution status. In 5
 minutes, I've found some likely candidates. wontfix comes with a high
 risk of alienating people submitting bugs, but a polite note saying that
 it's upstream or possibly something like Unfortunately, we have higher
 priority areas to work on right now. However we would welcome a patch if
 you are still wiling to work on this issue. It's great that you've taken
 the time to submit the bug, and we have looked into resolving things for
 you.

Well, if we are willing to accept a patch to solve an issue, then I
think that the issue is definitely worth an open ticket.

 Some candidates:

Sorry, no net acces right now, will reply later about specific tickets.

Thanks a lot for your interest in this very important topic,

Tomeu

 wontfix - upstream
 http://bugs.sugarlabs.org/ticket/1307

 wontfix - other priorities
 http://bugs.sugarlabs.org/ticket/288
 http://bugs.sugarlabs.org/ticket/292

 duplicates
 http://bugs.sugarlabs.org/ticket/172
 http://bugs.sugarlabs.org/ticket/394

 I think that resolving bugs, even if by using the wontfix tag will make
 other areas easier.

 Also, I don't know if I have the permission to change resolution status
 when something hasn't been touched for 12+ months. If I were to change
 status on likely candidates, would this anger the other developers?

 Tim



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Q on tracker cleanup / triage

2010-07-05 Thread Tomeu Vizoso
On 07/04/2010 05:15 PM, Bernie Innocenti wrote:
 El Sun, 04-07-2010 a las 02:29 +0100, Gary Martin escribió:


 Also, I don't know if I have the permission to change resolution
 status when something hasn't been touched for 12+ months. If I were
 to change status on likely candidates, would this anger the other
 developers?


 I know it's sensitive, for us slightly more delicate souls, but if you
 feel strongly about a bug status... I'd say go for its change of
 status. It will trigger either action/indifference from genuinely
   interested parties, possibly patches/discussion, action, and glory ;)

 Yes, I would encourage users to apply the Be Bold mantra [1] to the bug
 tracker as well as the wiki. If in doubt, go ahead and change. If you
 were wrong, someone will revert your change.


 [1] http://en.wikipedia.org/wiki/Wikipedia:Be_bold

Agreed as well, with the warning that if the changes are in mass and
exceed the capacity of the rest of interested parties to react, review
or revert those changes, it may not be such a good idea. Normally when
developers get angry at some triaging activity it's because of automated
changes, not because of spontaneous triaging.

 It seems fair to say there is some level of (completely
 understandable) analysis paralysis for some level of bugs. Bug triage
 activity is at a low at the moment. Don't apologise for bringing that
 task back up in everyones focus/face.

 Low? Not really:

http://bugs.sugarlabs.org/timeline

I'm offline right now so I cannot check (though I have seen lots of
activity from you and Silbe in the past weeks, kudos!), but I would like
to encourage people interested in triaging that read and improve
http://wiki.sugarlabs.org/go/BugSquad/Triage_Guide so we follow a
consistent set of guidelines and specially so bugs get out from the
triaging queue once someone has been able to look at it.

Thanks,

Tomeu
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Q on tracker cleanup / triage

2010-07-05 Thread Sascha Silbe
Excerpts from Tomeu Vizoso's message of Mon Jul 05 10:47:44 + 2010:

  [...] or possibly something like  Unfortunately, we have higher priority
  areas to work on right now.
  Never close bugs because nobody has time to fix them. Rather use the
  priority field to indicate the maintainer isn't interested in working
  on the issue, but would welcome patches.
 Maybe s/maintainer/development team?
Actually the priority field is something that nags me about our current
bug tracker. It's a single field, but bugs have different priorities to
different people. For example the issues with the NetworkManager
integration are so annoying that they were (*) of high priority to me, but
apparently not to other members of the Development Team; maybe because
deployments have different network setups and the issues don't appear
there.

 Guess we have enough bugs to have a triaging team (or bug squad, though
 I don't like the name) instead of just a bug master.
I still think the activity (!= number of open bugs) on our bug tracker is low 
enough for a single person. It shouldn't take more than say an hour a day.
Even Gentoo had a single bug master for a very long time.
A triage team might help with cleaning up _old_ bugs, though.


(*) I'm currently using system connections and cnetworkmanager so I can
use IEEE 802.1x authentication on the university network instead of
the buggy VPN client. This works significantly better than using
Sugar-managed user connections.
With user connections getting thrown out [1] of NetworkManager, quite
a few of our problems might get solved for us (or be tackled by the
rewrite of the NetworkManager integration that might be required).

Sascha

[1] http://live.gnome.org/NetworkManager/RemovingUserSettings


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Lint sugar sources

2010-07-05 Thread Aleksey Lim
Hi all,

I'm using/planing-to-use lint tools in several projects. And since I'm
not using jhbuild which support pylint/pep8.py tools, I created
sugar-lint[1] project.

There is single command - sugar-lint which will call pylint (should be
installed before) with custom configuration file and pep8.py (comes
with sugar-lint sources).

[1] http://wiki.sugarlabs.org/go/Activity_Team/Sugar_Lint

-- 
Aleksey
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Bump v0.88.0

2010-07-05 Thread Tomeu Vizoso
Sounds good to me.

Regards,

Tomeu

On Mon, Jul 5, 2010 at 06:21, Aleksey Lim alsr...@member.fsf.org wrote:
 ---
  NEWS         |    3 +++
  configure.ac |    2 +-
  2 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/NEWS b/NEWS
 index b20eb59..4aa03d1 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -1,3 +1,6 @@
 +v0.88.0 2010-03-29
 +* fix migration from 0.82 data store (#1838)
 +
  v0.87.4 2010-03-10
  * Do not remove internal metadata fields while rewriting object #1813
  * Auto detect mime type in copy-to-journal #586 (tomeu)
 diff --git a/configure.ac b/configure.ac
 index ddf7ffb..0fcdb49 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1,4 +1,4 @@
 -AC_INIT([sugar-datastore],[0.87.4],[],[sugar-datastore])
 +AC_INIT([sugar-datastore],[0.88.0],[],[sugar-datastore])

  AC_PREREQ([2.59])

 --
 1.7.0.4

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity title update

2010-07-05 Thread Bernie Innocenti
On Mon, 2010-07-05 at 15:04 +0200, Tomeu Vizoso wrote:

 Guess I'm a bit late, but I think I have heard this before and I'm not
 sure what means to has finished changing an edit widget. Do you know
 of another GUI toolkit with such a signal?

http://doc.qt.nokia.com/4.6/qlineedit.html#editingFinished

It's a pretty useful and obvious feature, even Microsoft's MFC did let
me do it easily in 1992.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Journal Volumes Backup and Restore

2010-07-05 Thread Martin Abente
Add a basic backup and restore feature for the Sugar Journal.
It provides:

- Generic Backup and Restore dialog GUI.
- Process manager class as an abstraction layer between the dialog and
  backup/restore scripts. (Allowing to work with many backup and restore
  technologies, using the same GUI, with no need for script rewrite).
- Basic file system Volume Restore and Backup scripts implemented in Python.
- New backup and restore options for journal volumes palettes.

This patch is based on Esteban Arias (Plan Ceibal) Volume Backup and Restore
patch, with a few changes:

- Refactor original Backup dialog class into a generic dialog class.
- Create specialized VolumeBackupDialog and VolumeRestoreDialog subclasses.
- Rewrite backup and restore scripts in python for an easier sugar interaction.
- Add backup identification helpers to jarabe.journal.misc.
---
 bin/Makefile.am   |4 +-
 bin/journal-backup-volume |   57 
 bin/journal-restore-volume|   67 +
 src/jarabe/journal/Makefile.am|3 +-
 src/jarabe/journal/misc.py|   27 
 src/jarabe/journal/processdialog.py   |  248 +
 src/jarabe/journal/volumestoolbar.py  |5 +-
 src/jarabe/model/Makefile.am  |3 +-
 src/jarabe/model/processmanagement.py |   98 +
 src/jarabe/view/palettes.py   |   44 ++
 10 files changed, 551 insertions(+), 5 deletions(-)
 create mode 100644 bin/journal-backup-volume
 create mode 100644 bin/journal-restore-volume
 create mode 100644 src/jarabe/journal/processdialog.py
 create mode 100644 src/jarabe/model/processmanagement.py

diff --git a/bin/Makefile.am b/bin/Makefile.am
index 05a9215..8cc87b5 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -5,7 +5,9 @@ python_scripts =\
sugar-install-bundle\
sugar-launch\
sugar-session   \
-   sugar-ui-check
+   sugar-ui-check  \
+   journal-backup-volume   \
+   journal-restore-volume
 
 bin_SCRIPTS =  \
sugar   \
diff --git a/bin/journal-backup-volume b/bin/journal-backup-volume
new file mode 100644
index 000..4f3ec8a
--- /dev/null
+++ b/bin/journal-backup-volume
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# Copyright (C) 2010, Paraguay Educa tecnolo...@paraguayeduca.org
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see http://www.gnu.org/licenses/.
+#
+
+import os
+import sys
+import subprocess
+import logging
+
+from sugar import env
+#from sugar.datastore import datastore
+
+backup_identifier = sys.argv[2]
+volume_path = sys.argv[1]
+
+if len(sys.argv) != 3:
+print 'Usage: %s volume_path backup_identifier' % sys.argv[0]
+exit(1)
+
+logging.debug('Backup started')
+
+backup_path = os.path.join(volume_path, 'backup', backup_identifier)
+
+if not os.path.exists(backup_path):
+os.makedirs(backup_path)
+
+#datastore.freeze()
+subprocess.call(['pkill', '-9', '-f', 'python.*datastore-service'])
+
+result = 0
+try:
+cmd = ['tar', '-C', env.get_profile_path(), '-czf', \
+   os.path.join(backup_path, 'datastore.tar.gz'), 'datastore']
+
+subprocess.check_call(cmd)
+
+except Exception, e:
+logging.error('Backup failed: %s', str(e))
+result = 1
+
+#datastore.thaw()
+
+logging.debug('Backup finished')
+exit(result)
diff --git a/bin/journal-restore-volume b/bin/journal-restore-volume
new file mode 100644
index 000..aa14ad0
--- /dev/null
+++ b/bin/journal-restore-volume
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# Copyright (C) 2010, Paraguay Educa tecnolo...@paraguayeduca.org
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see http://www.gnu.org/licenses/.
+#
+
+import os
+import sys
+import shutil
+import logging
+import subprocess
+
+from sugar import env
+#from 

[Sugar-devel] [PATCH] Journal XS backup and restore

2010-07-05 Thread Martin Abente
Include a new journal volumes toolbar icon. The icon represents
the schoolserver. The icon palette provides a backup and restore
options.
---
 src/jarabe/desktop/favoritesview.py  |2 +
 src/jarabe/journal/processdialog.py  |   30 ++
 src/jarabe/journal/volumestoolbar.py |   37 +--
 src/jarabe/view/palettes.py  |   39 +-
 4 files changed, 104 insertions(+), 4 deletions(-)

diff --git a/src/jarabe/desktop/favoritesview.py 
b/src/jarabe/desktop/favoritesview.py
index aca945a..a311b52 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -42,6 +42,7 @@ from jarabe.view import launcher
 from jarabe.model.buddy import BuddyModel
 from jarabe.model import shell
 from jarabe.model import bundleregistry
+from jarabe.journal.journalactivity import get_journal
 from jarabe.journal import misc
 
 from jarabe.desktop import schoolserver
@@ -328,6 +329,7 @@ class FavoritesView(hippo.Canvas):
 alert.props.msg = _('You are now registered ' \
 'with your school server.')
 self._my_icon.remove_register_menu()
+get_journal()._volumes_toolbar.setup_xs_button()
 
 ok_icon = Icon(icon_name='dialog-ok')
 alert.add_button(gtk.RESPONSE_OK, _('Ok'), ok_icon)
diff --git a/src/jarabe/journal/processdialog.py 
b/src/jarabe/journal/processdialog.py
index 8217973..4d8704e 100644
--- a/src/jarabe/journal/processdialog.py
+++ b/src/jarabe/journal/processdialog.py
@@ -246,3 +246,33 @@ class VolumeRestoreDialog(ProcessDialog):
 self._message.set_markup('%s %s.\n\n' % (_('Journal content will be 
restored from'), volume_path) + \
  'bigb%s/b %s/big' % (_('Warning:'), 
_('Current Journal content will be deleted!')))
 
+class XSBackupDialog(ProcessDialog):
+
+def __init__(self, xs_hostname):
+ProcessDialog.__init__(self, 'journal-backup')
+self._resetup_information(xs_hostname)
+
+def _resetup_information(self, xs_hostname):
+self._start_message = '%s %s.' % (_('Please wait, saving Journal 
content to'), xs_hostname)
+
+self._finished_message = _('The journal content has been saved.')
+
+self._title.set_markup('bigb%s/b/big' % _('Backup'))
+
+self._message.set_text('%s %s.' % (_('Journal content will be saved 
to'), xs_hostname))
+
+class XSRestoreDialog(ProcessDialog):
+
+def __init__(self, xs_hostname):
+ProcessDialog.__init__(self, 'journal-restore')
+self._resetup_information(xs_hostname)
+
+def _resetup_information(self, xs_hostname):
+self._start_message = '%s %s.' % (_('Please wait, restoring journal 
content from'), xs_hostname)
+
+self._finished_message = _('The journal content has been restored.')
+
+self._title.set_markup('bigb%s/b/big' % _('Restore'))
+
+self._message.set_text('%s %s.' % (_('Journal content will be restored 
from'), xs_hostname))
+
diff --git a/src/jarabe/journal/volumestoolbar.py 
b/src/jarabe/journal/volumestoolbar.py
index 2e64fe2..e1f9ce0 100644
--- a/src/jarabe/journal/volumestoolbar.py
+++ b/src/jarabe/journal/volumestoolbar.py
@@ -22,12 +22,14 @@ import gio
 import gtk
 import gconf
 
+from sugar.graphics.toolbutton import ToolButton
 from sugar.graphics.radiotoolbutton import RadioToolButton
+from sugar.graphics.icon import Icon
 from sugar.graphics.palette import Palette
 from sugar.graphics.xocolor import XoColor
 
 from jarabe.journal import model
-from jarabe.view.palettes import JournalVolumePalette
+from jarabe.view.palettes import JournalVolumePalette, JournalXSPalette
 
 class VolumesToolbar(gtk.Toolbar):
 __gtype_name__ = 'VolumesToolbar'
@@ -52,6 +54,7 @@ class VolumesToolbar(gtk.Toolbar):
 
 self.connect('destroy', self.__destroy_cb)
 
+self.setup_xs_button()
 gobject.idle_add(self._set_up_volumes)
 
 def __destroy_cb(self, widget):
@@ -59,6 +62,21 @@ class VolumesToolbar(gtk.Toolbar):
 volume_monitor.disconnect(self._mount_added_hid)
 volume_monitor.disconnect(self._mount_removed_hid)
 
+def setup_xs_button(self):
+client = gconf.client_get_default()
+backup_url = client.get_string('/desktop/sugar/backup_url')
+
+if backup_url:
+xs_button = XSButton()
+xs_button.set_palette(JournalXSPalette(backup_url))
+#xs_button.props.group = self._volume_buttons[0]
+xs_button.show()
+
+self._volume_buttons.append(xs_button)
+position = len(self._volume_buttons) - 1
+self.insert(xs_button, position)
+self.show()
+
 def _set_up_volumes(self):
 volume_monitor = gio.volume_monitor_get()
 self._mount_added_hid = \
@@ -104,8 +122,9 @@ class VolumesToolbar(gtk.Toolbar):
 def _get_button_for_mount(self, mount):
 mount_point = 

[Sugar-devel] [PATCH] School Server Icon

2010-07-05 Thread Martin Abente
---
 icons/scalable/device/Makefile.am   |1 +
 icons/scalable/device/school-server.svg |   20 
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 icons/scalable/device/school-server.svg

diff --git a/icons/scalable/device/Makefile.am 
b/icons/scalable/device/Makefile.am
index 28818ab..198488b 100644
--- a/icons/scalable/device/Makefile.am
+++ b/icons/scalable/device/Makefile.am
@@ -77,6 +77,7 @@ icon_DATA =   \
network-wireless-connected-100.svg  \
network-wireless-connected-100.icon \
printer.svg \
+   school-server.svg   \
speaker-000.svg \
speaker-033.svg \
speaker-066.svg \
diff --git a/icons/scalable/device/school-server.svg 
b/icons/scalable/device/school-server.svg
new file mode 100644
index 000..28a854d
--- /dev/null
+++ b/icons/scalable/device/school-server.svg
@@ -0,0 +1,20 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; [
+  !ENTITY fill_color #FF
+  !ENTITY stroke_color #010101
+]
+svg xmlns=http://www.w3.org/2000/svg; width=55 height=55
+path d=M10,50 S8,50 8,48 L8,35 L27.5,24 L47,35 L47,48 S47,50 45,50 z 
fill=fill_color; stroke=stroke_color; stroke-width=1.75/
+path d=M33,50 L33,39 S33,37 31,37 L24,37 S22,37 22,39 L22,50 z 
fill=stroke_color; stroke=stroke_color; stroke-width=1.75/
+path d=M20,23.5 L20,10 L35,10 L35,23.5 z fill=stroke_color; 
stroke=stroke_color; stroke-width=3.5/
+line x1=6 y1=33.5 x2=27.5 y2=21.5 stroke=stroke_color; 
stroke-width=6.75 stroke-linecap=round/
+line x1=49 y1=33.5 x2=27.5 y2=21.5 stroke=stroke_color; 
stroke-width=6.75 stroke-linecap=round/
+line x1=6 y1=33.5 x2=27.5 y2=21.5 stroke=fill_color; 
stroke-width=3.5 stroke-linecap=round/
+line x1=49 y1=33.5 x2=27.5 y2=21.5 stroke=fill_color; 
stroke-width=3.5 stroke-linecap=round/
+path d=M20,23.7 L20,10 L35,10 L35,23.7 z fill=fill_color; 
stroke=none stroke-width=2/
+path d=M18,9.25 L27.5,3.25 L37,9.25 z fill=stroke_color; 
stroke=stroke_color; stroke-width=2.25/
+circle cx=27.5 cy=15.5 r=3.25 fill=stroke_color; stroke=none 
stroke-width=2/
+path d=M24.25,19.25 L24.25,15.5 L30.75,15.5 L30.75,19.25 z 
fill=stroke_color; stroke=none stroke-width=2/
+line x1=24.25 y1=19 x2=30.75 y2=19 stroke=stroke_color; 
stroke-width=2.5 stroke-linecap=round/
+circle cx=27.5 cy=20.5 r=1.25 fill=stroke_color; stroke=none 
stroke-width=2/
+/svg
-- 
1.6.0.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MANIFEST pointlessness

2010-07-05 Thread Bernie Innocenti
On Mon, 2010-07-05 at 15:13 +0200, Tomeu Vizoso wrote:

 Would be good to have some way of tracking what needs to be solved
 before we can do the switch. Two questions off the top of my head are
 how first-time activity authors are going to package their software

Now they do:

  ./setup.py fix_manifest
  ./setup.py dist_xo

When we remove the manifest thing, they could do:

  ./setup.py dist_xo


None of the activities I have seen so far store a manually generated
MANIFEST in git. In case they'd need to exclude some files, hopefully
setup.py would provide extensibility hooks.

Actually, I've never seen a setup.py containing anything else than the
two lines of copy-pasted code (plus the usual dozen lines of legal
crap). Activities which need to build binaries, such as Physics, require
a manual build step.

This confirms my theory that the xo bundle format is so easy to use just
because it doesn't do any of the things that a packaging system needs to
do. Currently, setup.py is just a glorified zip -r.


 and also what those people will have to do to modify an activity
 installed in their system. (But maybe not discuss these in this
 thread?).

Currently, upgrading an activity causes the new files to be merged with
the old ones. This is clearly a bug that should be fixed.

The MANIFEST doesn't play any role in activity installation. The version
of Sugar shipped in F11-0.88 contains a patch that removes all this code
and it is functionally identical from the user's point of view, apart
from not logging warnings when the MANIFEST contains inconsistencies.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity title update

2010-07-05 Thread Tomeu Vizoso
On Sun, Jul 4, 2010 at 17:08, Bernie Innocenti ber...@codewiz.org wrote:
 El Fri, 02-07-2010 a las 08:36 +, Sascha Silbe escribió:

 FWIW, in an unrelated project I'm using the changed signal and have not
 noticed any missing updates so far (except for SpinButtons which should
 have been fixed in GTK by now IIRC).

 The changed signal fires on each keystroke. We can't use this event
 directly, because updating metadata in the datastore causes a ~1sec
 freeze on slow hardware such as the XO-1. Also, probably due to event
 ping-pong, the cursor gets reset to the beginning of the edit-field and
 all interim keystrokes end up in the wrong position.

 The old approach was to listen for changed with a 1-second timeout to
 trigger the metadata update. The timeout logic was also buggy, which is
 what the patch applied in git fixes.

 I can't believe GTK wouldn't offer a reliable way to tell when a user
 has finished changing an edit widget.

Guess I'm a bit late, but I think I have heard this before and I'm not
sure what means to has finished changing an edit widget. Do you know
of another GUI toolkit with such a signal?

Thanks,

Tomeu

 --
   // Bernie Innocenti - http://codewiz.org/
  \X/  Sugar Labs       - http://sugarlabs.org/

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MANIFEST pointlessness

2010-07-05 Thread Tomeu Vizoso
On Mon, Jul 5, 2010 at 16:04, Bernie Innocenti ber...@codewiz.org wrote:
 On Mon, 2010-07-05 at 15:13 +0200, Tomeu Vizoso wrote:

 Would be good to have some way of tracking what needs to be solved
 before we can do the switch. Two questions off the top of my head are
 how first-time activity authors are going to package their software

 Now they do:

  ./setup.py fix_manifest
  ./setup.py dist_xo

 When we remove the manifest thing, they could do:

  ./setup.py dist_xo


 None of the activities I have seen so far store a manually generated
 MANIFEST in git. In case they'd need to exclude some files, hopefully
 setup.py would provide extensibility hooks.

 Actually, I've never seen a setup.py containing anything else than the
 two lines of copy-pasted code (plus the usual dozen lines of legal
 crap). Activities which need to build binaries, such as Physics, require
 a manual build step.

 This confirms my theory that the xo bundle format is so easy to use just
 because it doesn't do any of the things that a packaging system needs to
 do. Currently, setup.py is just a glorified zip -r.


 and also what those people will have to do to modify an activity
 installed in their system. (But maybe not discuss these in this
 thread?).

 Currently, upgrading an activity causes the new files to be merged with
 the old ones. This is clearly a bug that should be fixed.

 The MANIFEST doesn't play any role in activity installation. The version
 of Sugar shipped in F11-0.88 contains a patch that removes all this code
 and it is functionally identical from the user's point of view, apart
 from not logging warnings when the MANIFEST contains inconsistencies.

Sorry about the confusion, these questions were about the move from xo
bundles to packages :(

Regards,

Tomeu

 --
   // Bernie Innocenti - http://codewiz.org/
  \X/  Sugar Labs       - http://sugarlabs.org/


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Clocks on XOs

2010-07-05 Thread Daniel Drake
On 3 July 2010 16:52, Bernie Innocenti ber...@codewiz.org wrote:
 I checked: olpc-update-query only sets the clock if it's off by more
 than 24hours, so it cannot serve as a replacement for ntpdate.

What's the requirement for super-accurate clocks on the XO?

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] School Server Icon

2010-07-05 Thread Martin Abente
This is the icon provided by Gary Martin.


On Mon,  5 Jul 2010 10:00:10 -0400, Martin Abente
mabe...@paraguayeduca.org wrote:
 ---
  icons/scalable/device/Makefile.am   |1 +
  icons/scalable/device/school-server.svg |   20 
  2 files changed, 21 insertions(+), 0 deletions(-)
  create mode 100644 icons/scalable/device/school-server.svg
 
 diff --git a/icons/scalable/device/Makefile.am
 b/icons/scalable/device/Makefile.am
 index 28818ab..198488b 100644
 --- a/icons/scalable/device/Makefile.am
 +++ b/icons/scalable/device/Makefile.am
 @@ -77,6 +77,7 @@ icon_DATA = \
   network-wireless-connected-100.svg  \
   network-wireless-connected-100.icon \
   printer.svg \
 + school-server.svg   \
   speaker-000.svg \
   speaker-033.svg \
   speaker-066.svg \
 diff --git a/icons/scalable/device/school-server.svg
 b/icons/scalable/device/school-server.svg
 new file mode 100644
 index 000..28a854d
 --- /dev/null
 +++ b/icons/scalable/device/school-server.svg
 @@ -0,0 +1,20 @@
 +?xml version=1.0 encoding=UTF-8?
 +!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN
 http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; [
 +  !ENTITY fill_color #FF
 +  !ENTITY stroke_color #010101
 +]
 +svg xmlns=http://www.w3.org/2000/svg; width=55 height=55
 +path d=M10,50 S8,50 8,48 L8,35 L27.5,24 L47,35 L47,48 S47,50
45,50
 z fill=fill_color; stroke=stroke_color; stroke-width=1.75/
 +path d=M33,50 L33,39 S33,37 31,37 L24,37 S22,37 22,39 L22,50 z
 fill=stroke_color; stroke=stroke_color; stroke-width=1.75/
 +path d=M20,23.5 L20,10 L35,10 L35,23.5 z fill=stroke_color;
 stroke=stroke_color; stroke-width=3.5/
 +line x1=6 y1=33.5 x2=27.5 y2=21.5 stroke=stroke_color;
 stroke-width=6.75 stroke-linecap=round/
 +line x1=49 y1=33.5 x2=27.5 y2=21.5 stroke=stroke_color;
 stroke-width=6.75 stroke-linecap=round/
 +line x1=6 y1=33.5 x2=27.5 y2=21.5 stroke=fill_color;
 stroke-width=3.5 stroke-linecap=round/
 +line x1=49 y1=33.5 x2=27.5 y2=21.5 stroke=fill_color;
 stroke-width=3.5 stroke-linecap=round/
 +path d=M20,23.7 L20,10 L35,10 L35,23.7 z fill=fill_color;
 stroke=none stroke-width=2/
 +path d=M18,9.25 L27.5,3.25 L37,9.25 z fill=stroke_color;
 stroke=stroke_color; stroke-width=2.25/
 +circle cx=27.5 cy=15.5 r=3.25 fill=stroke_color;
 stroke=none stroke-width=2/
 +path d=M24.25,19.25 L24.25,15.5 L30.75,15.5 L30.75,19.25 z
 fill=stroke_color; stroke=none stroke-width=2/
 +line x1=24.25 y1=19 x2=30.75 y2=19 stroke=stroke_color;
 stroke-width=2.5 stroke-linecap=round/
 +circle cx=27.5 cy=20.5 r=1.25 fill=stroke_color;
 stroke=none stroke-width=2/
 +/svg
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity title update

2010-07-05 Thread Tomeu Vizoso
On Mon, Jul 5, 2010 at 15:38, Bernie Innocenti ber...@codewiz.org wrote:
 On Mon, 2010-07-05 at 15:04 +0200, Tomeu Vizoso wrote:

 Guess I'm a bit late, but I think I have heard this before and I'm not
 sure what means to has finished changing an edit widget. Do you know
 of another GUI toolkit with such a signal?

 http://doc.qt.nokia.com/4.6/qlineedit.html#editingFinished

 It's a pretty useful and obvious feature, even Microsoft's MFC did let
 me do it easily in 1992.

But you can do the same with Gtk+, cannot you?

This signal is emitted when the Return or Enter key is pressed or the
line edit loses focus

Regards,

Tomeu

 --
   // Bernie Innocenti - http://codewiz.org/
  \X/  Sugar Labs       - http://sugarlabs.org/


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] DESIGN

2010-07-05 Thread Kandarp Kaushik
Hello,

I am using Sugar on Debian and wanted to report a feature not
functioning as desired.

Issue:
In the control panel, even though I do not have a 3g modem, there is
an icon to set up a 3g modem.

Steps to reproduce:
1) Start Sugar.
2) Select My Settings.
3) Select Modem Configuration.

What I expected:
Sugar should do hardware detection prior to showing icon.

Regards,
Kandarp.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity title update

2010-07-05 Thread Bernie Innocenti
On Mon, 2010-07-05 at 16:37 +0200, Tomeu Vizoso wrote:

 But you can do the same with Gtk+, cannot you?
 
 This signal is emitted when the Return or Enter key is pressed or the
 line edit loses focus

No, GTK does not seem to send a focus-out-event when the user clicks
on the close button. Which is what makes my approach fail.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-05 Thread Tomeu Vizoso
Some comments on top of Sascha's excellent review:

On Fri, Jul 2, 2010 at 12:03, Sascha Silbe
sascha-ml-ui-sugar-de...@silbe.org wrote:
 Excerpts from anishmangal2002's message of Thu Jul 01 15:03:16 + 2010:

 +        gobject.timeout_add(1000, self.__timer_cb)
 The use of polling (i.e. a timer) seems to be necessary as /proc/stat
 doesn't provide a better interface. (I.e. the way you do it is fine)

We should check timeout_add() doesn't add a reference to self. I used
to at least some time ago and it would mean leaking palette instances
and timers. It may have been made to use weak references in the mean
time, not sure.

If that's the case, we need to remove the timer on popdown and create
a new one on popup.

 +    def __getTimeList(self):
 Single underscore should suffice. No one is going to subclass this, and
 even then it's not something that needs protection from being overridden
 in the subclass.

We use lowercase_separated_by_underscores for method names, see
Naming Conventions in http://www.python.org/dev/peps/pep-0008/ .

 +        statFile = file(/proc/stat, r)
 Tomeu will nag you about  vs. '' ;)
 (always use '' unless there's an apostrophe in the string itself).

Also, lowercase_separated_by_underscores for all variables.

 +    def __popup_cb(self, gobject):
 +        self.updating = True
 +
 +    def __popdown_cb(self, gobject):
 +        self.updating = False

 Please stop the timer instead. Calculating values while we don't need them 
 wastes energy and will prevent the CPU from entering low-power states (i.e. 
 auto-suspend) in the future.

True, but keep in mind the potential issue with leaking Palette instances.

 +            name, value, unit = line.split()[:3]
 +            if 'MemTotal:' == name: total = value
 +            elif 'MemFree:' == name: free = value
 +            elif 'Buffers:' == name: buffers = value
 +            elif 'Cached:' == name: cached = value
 +            elif 'Active:' == name: break

We try to avoid multiple statements in a single line, so lines need to be split.

A few more nitpicks:

+from gettext import gettext as _
+
+import logging

logging should be grouped with gettext because both are in the python
std library.

+from sugar.graphics import style
+from jarabe.frame.frameinvoker import FrameWidgetInvoker

The jarabe import should be in a separate group because is part of the
currently running program.

+icon_name = 'computer'

You may want to make it a constant similar to FRAME_POSITION_RELATIVE.

+self.updating = False
+self.proc_stat_old = []
+self.proc_stat_new = []

This should be private (leading underscore).

+self._cpu_text.set_label('CPU free: %d%%' % cpu_free)

We don't want to translate this string?

+vbox.pack_start(self._cpu_text, padding=10)

The padding shouldn't be hardcoded to a number of pixels, see the
constants in style.py.

+statFile.close()

Maybe use try..finally?

+for i in range(len(timeList)) :

for i in time_list: doesn't work?

+return 100 * (int(free)+int(buffers)+int(cached)) / int(total)

Operators should have spaces around.

Great patch!

Thanks,

Tomeu
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ANNOUNCE] 0.90 Schedule

2010-07-05 Thread Simon Schampijer
Hi,

I have filled out the missing pieces in the 0.90 development cycle [1]. 
I want to highlight some important dates:

* 16th August: Feature Freeze

* 29th September: The final, new stable release

* 27th October: Bug fix release

The Sugar 0.89.x schedule is based on the GNOME 2.31.x development cycle 
[2]. One reason is that Sugar as based on the GNOME stack. Another 
reason is that GNOME makes sure that their release will be able to be 
shipped by the major distributions. The dates of the release are made 
accordingly to the GNOME schedule.

As there is not much time left for 0.90 we will focus on stabilizing and 
landing the features that were left over from the last release. As well 
as landing all the patches that are currently pending. New Features are 
handled by the Feature process, as it has been the case in the past [3]. 
Make sure to read the policy what needs to be done in order that your 
feature can be accepted [4]. It is a sanity check, so don't be too 
worried. It is there to help the submitter and maintainer in order to 
get input from the community and the release manager to track features 
and their status. The actual code gets reviewed by the module maintainer.

If there are any questions, about the policy or the schedule, please ask.

Regards,
Simon

[1] http://wiki.sugarlabs.org/go/0.90/Roadmap#Schedule
[2] http://live.gnome.org/TwoPointThirtyone
[3] http://wiki.sugarlabs.org/go/Features/Policy
[4] http://wiki.sugarlabs.org/go/Features/Policy#Acceptance_of_a_feature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Delete activities profile data when uninstall

2010-07-05 Thread Martin Abente
When activities are uninstalled, profile data persists. Profile
data can consume a lot of disk space. Therefore it is necessary
to delete it.

More info http://bugs.sugarlabs.org/ticket/2074
---
 src/sugar/bundle/activitybundle.py |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/sugar/bundle/activitybundle.py 
b/src/sugar/bundle/activitybundle.py
index c83257f..51ad312 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -25,6 +25,7 @@ import locale
 import os
 import tempfile
 import logging
+import shutil
 
 from sugar import env
 from sugar import util
@@ -417,6 +418,10 @@ class ActivityBundle(Bundle):
os.readlink(path).startswith(install_path):
 os.remove(path)
 
+profile_path = env.get_profile_path(self._bundle_id)
+if os.path.exists(profile_path):
+shutil.rmtree(profile_path)
+
 self._uninstall(install_path)
 
 def is_user_activity(self):
-- 
1.6.0.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Delete activities profile data when uninstall

2010-07-05 Thread Sascha Silbe
Excerpts from Martin Abente's message of Mon Jul 05 19:49:10 + 2010:

[src/sugar/bundle/activitybundle.py]
 @@ -417,6 +418,10 @@ class ActivityBundle(Bundle):
[...]
 +profile_path = env.get_profile_path(self._bundle_id)
 +if os.path.exists(profile_path):
 +shutil.rmtree(profile_path)
 +
If the directory contains files or directories with mode 000 (unusual, but
possible) or owned by somebody else (e.g. root) this will fail and throw
an exception.
You could use os.walk() + os.chmod() to handle the 000 case, though I'm
unsure whether it's worth the effort. Passing ignore_errors=True to
rmtree() to avoid breaking for any other reason is certainly a good idea,
though. If you want to check whether rmtree() was successful, just check
if profile_path still exists.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Delete activities profile data when uninstall

2010-07-05 Thread Martin Abente
On Mon, 2010-07-05 at 20:19 +, Sascha Silbe wrote:
 Excerpts from Martin Abente's message of Mon Jul 05 19:49:10 + 2010:
 
 [src/sugar/bundle/activitybundle.py]
  @@ -417,6 +418,10 @@ class ActivityBundle(Bundle):
 [...]
  +profile_path = env.get_profile_path(self._bundle_id)
  +if os.path.exists(profile_path):
  +shutil.rmtree(profile_path)
  +
 If the directory contains files or directories with mode 000 (unusual, but
 possible) or owned by somebody else (e.g. root) this will fail and throw
 an exception.
 You could use os.walk() + os.chmod() to handle the 000 case, though I'm
 unsure whether it's worth the effort. Passing ignore_errors=True to
 rmtree() to avoid breaking for any other reason is certainly a good idea,
 though. If you want to check whether rmtree() was successful, just check
 if profile_path still exists.
 

Thanks for help, I also found a problem with the patch...

When the user upgrades an activity, the older version is being deleted,
and so will be the profile data. That could be a problem. 

Any suggestions?

I was thinking about a new parameter to the uninstall ActivityBundle
method, something like: reason_upgrade=False. So it wont delete the
profile directory in those cases.

This solution will also require to add the same parameter to
bundleregistry uninstall method.

 Sascha
 
 --
 http://sascha.silbe.org/
 http://www.infra-silbe.de/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [design] hiding icons in control panel for hardware which is not installed.

2010-07-05 Thread David Farning
I just wanted to raise this to the attention of the design team for
the July 10th meeting.

I would like to clarify that icons for hardware that is not present
can be hidden.

david

On Mon, Jul 5, 2010 at 9:38 AM, Kandarp Kaushik kand...@seeta.in wrote:
 Hello,

 I am using Sugar on Debian and wanted to report a feature not
 functioning as desired.

 Issue:
 In the control panel, even though I do not have a 3g modem, there is
 an icon to set up a 3g modem.

 Steps to reproduce:
 1) Start Sugar.
 2) Select My Settings.
 3) Select Modem Configuration.

 What I expected:
 Sugar should do hardware detection prior to showing icon.

 Regards,
 Kandarp.

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity list favorites view

2010-07-05 Thread Gary Martin
On 6 Jul 2010, at 04:09, Bernie Innocenti wrote:

 On Tue, 2010-07-06 at 12:47 +1000, James Cameron wrote:
 
 The only time I've seen this is when the keyboard F2 key was pressed
 instead of F3.  ;-}
 
 lol, that could *really* be the correct explanation!
 
 Activity ring in list view with a bogus search string also looks
 remarkably empty.  It persists when switching between views.
 
 I wonder why we don't allow searching in the favourites view as well.

Long outstanding bug I burnt my fingers years back in my youth :-) Feedback was 
that folks were accidentally hitting keys while in fav. view. This would 
trigger an unexpected search and user would be lost – usually left looking at 
an empty results screen.

Problem was that the home fav. view search field was focused by default and any 
key presses landed there. The canvas could not accept focus, so I submitted a 
(hack) patch to defocus the search field by focusing on the ring toolbar button 
instead. Cscott didn't like it (fair enough), and went to watch some baseball 
match instead – I slagged him off for it – release went ahead without any patch 
;-b

Search in home fav view has been disabled ever since.

I'm sure there are better solutions, probably a drop down menu with all results 
would be best (rather than switching the user to list view), but switching to 
list view would be a fair start if the search input text field can be defocused 
in a friendly was so as not to catch stray key strokes.

Regards,
--Gary

 -- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/
 
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Write-70

2010-07-05 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4201

Sugar Platform:
0.86 - 0.88

Download Now:
http://activities.sugarlabs.org/downloads/file/26971/write-70.xo

Release notes:
Fix startup zoom level (sl#1121)



Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Distance-19

2010-07-05 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4264

Sugar Platform:
0.82 - 0.88

Download Now:
http://activities.sugarlabs.org/downloads/file/26970/distance-19.xo

Release notes:
Fixes a bug on Sugar 0.84 (and possibly later versions too): 
http://dev.laptop.org/ticket/10199.


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel