Re: [sugar] hot corners
Wade Brainerd wrote: If we are adding a delay, would it be acceptable to enable the frame activation along the edges of the screen in addition to the corners? This was why the corners where chosen: http://wiki.laptop.org/go/OLPC_Human_Interface_Guidelines/The_Laptop_Experience/The_Frame#Hot_Corners With the new frame design where activities are placed in the upper frame I trapped myself trying to invoke the frame where I know the activities are placed in the frame to switch between activities. For me that seem to be convenient to add activation at least to the upper frame. Since I guess everyone has it's preferences this sounds like a good thing to tune from the control panel using the 'frame preferences'. Best, Simon ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] hot corners
On Mon, May 12, 2008 at 9:48 AM, Simon Schampijer [EMAIL PROTECTED] wrote: Wade Brainerd wrote: If we are adding a delay, would it be acceptable to enable the frame activation along the edges of the screen in addition to the corners? This was why the corners where chosen: http://wiki.laptop.org/go/OLPC_Human_Interface_Guidelines/The_Laptop_Experience/The_Frame#Hot_Corners With the new frame design where activities are placed in the upper frame I trapped myself trying to invoke the frame where I know the activities are placed in the frame to switch between activities. For me that seem to be convenient to add activation at least to the upper frame. Same here. Thanks, Tomeu ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] Release schedule and process
On Sat, May 10, 2008 at 5:03 PM, Marco Pesenti Gritti [EMAIL PROTECTED] wrote: Hello, I wrote some notes about the process for the next Sugar release. http://wiki.sugarlabs.org/go/Release http://wiki.sugarlabs.org/go/Roadmap [...] Looks pretty good to me. What's the next step? Should we move now to propose features for the next releases? Thanks, Tomeu ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] web-activity fix
Tomeu Vizoso wrote: On Sun, May 11, 2008 at 7:56 PM, Dan Krejsa [EMAIL PROTECTED] wrote: Hi, The attached change in web-activity/downloadmanager.py fix a problem causing Browse downloads to fail with an exception in onProgressChange64() due to _create_journal_object() having failed to be called earlier from onStateChange() when state_flags contained the bit STATE_START, but also other bits as corresponding to State Type Flags from nsIWebProgressListener.idl. I'm pretty confident about the changes in onStateChange(), but the change (eliminating a trailing '' character) in the components.registrar.registerFactory() calls are fairly gratuitous, and should be checked by someone who is familiar with that API. r+ to me. Thanks, Tomeu ''' aStateFlags Flags indicating the new state. This value is a combination of one of the State Transition Flags and one or more of the State Type Flags defined above. ''' The documentation states that the stateFlags is a combination - so the '' makes sense. The '' looks like a typo to me. I checked both changes in. Thanks for the fixes! Simon ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] [PATCH] Log Viewer overhaul.
Hello, Eduardo has been maintaining the log viewer in the past but I think he is busy with work these. Perhaps you could volunteer to take maintenance over or to co-maintain :) Eduardo, what do you think? Do you have time to review the patch? Marco On Mon, May 12, 2008 at 4:05 AM, Wade Brainerd [EMAIL PROTECTED] wrote: This tangent came about when I couldn't launch Browse from the shell, and couldn't figure out why because of the crazy ANSI escape codes in the stack trace in the Log viewer. The patch is almost a complete rewrite, it may be easier to see the changes from the bundle - http://www.wadeb.com/Log-7.xo Best, Wade ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
[sugar] New features proposal
Please propose activities and major new features you would like to get into Sugar 0.82. There is time to do so until Sunday 18 May. See this page for more info about new features proposal: http://wiki.sugarlabs.org/go/Release#New_features_proposal The schedule for 0.82 is available here: http://wiki.sugarlabs.org/go/Roadmap#Schedule The current moduleset is restricted to the strictly necessary modules: http://wiki.sugarlabs.org/go/Roadmap#Moduleset The process is not yet fully fleshed out, questions and suggestions are welcome. Marco ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] Release schedule and process
On Sat, May 10, 2008 at 5:03 PM, Marco Pesenti Gritti [EMAIL PROTECTED] wrote: == New features proposal == At the beginning of each release cycle, maintainers will write a proposal for each major new feature they plan to develop. These will be discussed on the Sugar mailing list, revised on the base of the feedback and made available on the wiki. New modules will require explicit approval by the release team. As part of this process new activities will be proposed for inclusion. Criteria for approval will be: * The maintainer is willing to follow the Sugar schedule. * Supports internationalisation and localisation. * Does not duplicate the functionalities of other activities. * ... Not required but preferred: * Use the sugarlabs infrastructure. As any new module/activity will add some overhead to the release team, perhaps we should ask that any module included in the release process has to provide functionality that the community believes is important to the project goals? So maybe we should ask such a new point: * Provide functionality that the community judges as important for reaching the goals of the project. Cheers, Tomeu ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] [review] controlpanel - modularize model
Marco Pesenti Gritti wrote: On Sat, May 10, 2008 at 9:38 PM, Simon Schampijer [EMAIL PROTECTED] wrote: Hello, http://dev.laptop.org/~erikos/001_controlpanel.patch is the full patch. And you can see the splited patches (the last two) here: http://dev.laptop.org/git?p=users/erikos/sugar;a=shortlog;h=master Very high level review, I'll not be able to do a detailed one until I'm back from vacation... perhaps Tomeu can take this over. Thanks for the review! -sys.path.insert(0, '@prefix@/share/sugar/shell') +path = '@prefix@/share/sugar/shell' + +sys.path.insert(0, path) I'd rather add shell_path to config.py.in http://dev.laptop.org/git?p=users/erikos/sugar;a=commit;h=db6ddf7ad60fc53e0160b87a0d870832fd5558d8 +src/controlpanel/icons/Makefile We already setting up an icons path for the shell: src/main.py:icons_path = os.path.join(config.data_path, 'icons') So I'd just put these icons in sugar/data/icons and install them in data_path/icons http://dev.laptop.org/git?p=users/erikos/sugar;a=commit;h=7fe2c92880b8390a43ddc8f719e961c378e9d1b0 diff --git a/src/controlpanel/controltoolbar.py b/src/controlpanel/controltoolbar.py control in there sounds redundant, I'd just make it toolbar.py +class DetailView(gtk.VBox): DetailView sounds wrong to me. Maybe PanelView or PanelPage? I used SectionView: http://dev.laptop.org/git?p=users/erikos/sugar;a=commit;h=3b090dfa6e2083ad461997cd3ea4d43ed0ed0d09 +__gsignals__ = { +'valid-section': (gobject.SIGNAL_RUN_FIRST, + gobject.TYPE_NONE, + ([bool])) +} Any reason this is not a property? The reason is that with the current code I have to signal the validity of the section to the ControlPanel class. The controlpanel object owns the sectiontoolbar object. The 'ok' icon changes it's sensitivity when the section is not valid. +class InlineAlert(gtk.EventBox): Don't we have already an Alert widget in the toolkit? How is this different? Inline alerts are different from the other alerts beause they are no dialogs, they only inform about a current event, so subclassing from alert would not be right in my opinion. I suggest that we add the inlinealert to the same file though. Or we create a trimmed down alert class where we subclass from. --- A couple of more general notes: At some point we will start using gconf (or similars) and a python model will be unnecessary for those preferences. Also they will support change notification and the view will have to listen for changes. It's probably fine for python models to *not* support change notifications. The undo stuff should be made more generic. A possible approach is to split out the code which initialize the widgets to the current values to a setup() method. Wrap the model module inside a Model object. Model proxies the get_something/set_something method to the module, and remembers the initial values. DetailView.undo() calls the Model.undo()(which resets preferences to the inital values) and then DetailView.setup(). Marco Ok, I will look into it. Thanks, Simon ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] [review] controlpanel - modularize model
On Mon, May 12, 2008 at 5:52 PM, Simon Schampijer [EMAIL PROTECTED] wrote: +__gsignals__ = { +'valid-section': (gobject.SIGNAL_RUN_FIRST, + gobject.TYPE_NONE, + ([bool])) +} Any reason this is not a property? The reason is that with the current code I have to signal the validity of the section to the ControlPanel class. The controlpanel object owns the sectiontoolbar object. The 'ok' icon changes it's sensitivity when the section is not valid. You can listen for gobject property changes. Grep for notify:: in sugar. +class InlineAlert(gtk.EventBox): Don't we have already an Alert widget in the toolkit? How is this different? Inline alerts are different from the other alerts beause they are no dialogs, they only inform about a current event, so subclassing from alert would not be right in my opinion. I suggest that we add the inlinealert to the same file though. Or we create a trimmed down alert class where we subclass from. How is InlineAlert different than the downloads notification in Browse? What are we using for the Browse one? Marco ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] Release schedule and process
On Mon, May 12, 2008 at 5:37 PM, Tomeu Vizoso [EMAIL PROTECTED] wrote: As any new module/activity will add some overhead to the release team, perhaps we should ask that any module included in the release process has to provide functionality that the community believes is important to the project goals? So maybe we should ask such a new point: * Provide functionality that the community judges as important for reaching the goals of the project. Yeah, I think we will need to define some relevance criteria. I wanted to let those emerge from the concrete activities discussions rather than defining them upfront... but your generic definition sounds pretty good, please add it to the wiki so that we keep this in mind. Marco ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] Release schedule and process
On Mon, May 12, 2008 at 7:01 PM, Marco Pesenti Gritti [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 5:37 PM, Tomeu Vizoso [EMAIL PROTECTED] wrote: As any new module/activity will add some overhead to the release team, perhaps we should ask that any module included in the release process has to provide functionality that the community believes is important to the project goals? So maybe we should ask such a new point: * Provide functionality that the community judges as important for reaching the goals of the project. Yeah, I think we will need to define some relevance criteria. I wanted to let those emerge from the concrete activities discussions rather than defining them upfront... but your generic definition sounds pretty good, please add it to the wiki so that we keep this in mind. Btw I think a good way to start defining some of those criteria concretely might be a discussion on its.an.education.project list. Also Walter wrote some criteria to determine the core activities which we could reuse in this context. Marco ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] same mail problem and 0.82 suggestion
Thanks for all the input. We are exited to be a small part of this great movement! But I dont believe our problem has been fully understood. I see it is not only first-world users that will access the internet. You are talking about schoolservers in Nepal etc. getting the kids online. This is wonderful. But the 3rd world kids will have the same problem we first worlders are havinginability to send webpages - or written articles, or drawings - across the net to others. Or to receive them. I'm sure the children will want this function once they are adept. From back-channel discussion with Tomeu I learned that the XO apparently saves things in Open Document and they cannot be decoded at reception. I have Gmail, I can attach a Journal article/item to Gmail (or Yahoo mail) but it will not transfer in readable languageit arrives only in code. I, like most users, am not code-savvy. I dont dare work in Terminal or any activity where my ineptness could cause a breakdown I couldnt correct. I dont dare try to update to a newer build on my own. The 3rd-worlders may not tell you about this problem because they haven't gotten this far yet, but they will. You have discussed putting a toolbar in Browse. That would be wonderful, not only for a search bar, but for items like Save and Send Link. One could save individual pages, not just the entire Browse activity for the day. Eventually Tinymail would work if it transferred in the same language as sent. In simplest form the problem now is how to get data in plain English from the Journal to Gmail to another computer. Perhaps this would not be difficult to resolve. Appreciatively, Val Stansfield On Tue, Apr 29, 2008 at 12:17 PM, Eben Eliason [EMAIL PROTECTED] wrote: On Mon, Apr 28, 2008 at 4:36 PM, J.M. Maurer [EMAIL PROTECTED] wrote: On Mon, 2008-04-28 at 09:26 -0700, ValS wrote: Thanks for this wonderful program! Speaking as an XO user, I am requesting a feature that I imagine would benefit any users that have internet access. I would like to be able to use the Write function, and then send what I have written in an email as an attachment. That way, I can send it to others, send it to a computer with a printer, and use the written material in various ways, even as a book. So is there a chance of compatibility between the Write (and other) functions and the Browse (where we can access email)? If there is any service on the XO that can send email, then this would be trivial to add to Write. Isn't there a Google SoC application this year to create an an email thing based on tinymail for the XO ? Interesting. When I read this the first time, I only considered the approach of first opening an email interface (for instance, Gmail in Browse) and then selecting a file from the Journal to attach to it. I hadn't considered wanting to send the document I'm *currently working on* to someone else as an attachment. One reason for this might be due to the fact that we *do* plan to add a send to... option to the palette/toolbar for each activity, to allow direct file transfers between people running Sugar. Perhaps there is a place in here somewhere for mail to... as well? Or, perhaps under send to it's possible to select an individual, or a group, or an *activity* (!) which could then take some action based upon what it was given. By selecting an email activity, it could generate a new draft message and automatically attach the file. - Eben ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] 65-node simple mesh test (and counting... ;-)
On Fri, May 9, 2008 at 8:47 PM, Marcus Leech [EMAIL PROTECTED] wrote: I was playing in packet-radio circles long before 802.11 was even a gleam in anyones eye :-) Yes, my original response above was really meant for others on devel, since I've found myself trying to explain wired-vs-wireless issues often recently. We had to deal with hidden-terminal issues, non-uniform propagation, etc. The purpose of the experiment I proposed above (measuring the ratio between a Cerebro network equilibrating over both a wired and a wireless network). Yes, there will be differences, but if they're *large* compared to the raw bandwidth ratios, then something isn't working right, particularly if all the Xos are in the same room. I guess the question is, what is working right? One could argue that broadcast according to the 802.11a/b/g/s standard is not working right, if reliability and broadcast speed comparable to wired ethernet is the criterion. You shouldn't have hidden-terminal issues. Yes, there will be laptops that are in the null of another laptops radiation pattern, but in terms of absolute received power, even being in a null (unless it's a *very* deep null indeed) shouldn't dehance the SNR so as to not be able to coherently receive bits. The other thing that I wonder about is the collision behaviour in real life of an 802.11 network. I understand that the network uses a Collision Avoidance (CA) scheme, but I wonder how effective it is in real life. Back in my packet-radio days, we moved from a pure CSMA scheme to one that used P-persistant CSMA, with static determination of P values. This vastly improved overall throughput, and made collisions more rare (not zero, but a lot better). How does the collision model/scheme change between AP mode and ad-hoc/mesh modes? As far as I can tell, it doesn't. 802.11s is interoperable with 802.11abg, which means that the same media access algorithms are used. At least part of our problem might be in the synchronized transmits occurring in our present 802.11s implementation of broadcast, which are probably killing whatever CA scheme 802.11abg dictate. See: http://wiki.laptop.org/go/Path_Discovery_Mechanism:Sanity#Question_.232_-_Does_PDM_traffic_self-interfere.3F which is trying to deal with low-level path discovery requests, which also use the broadcast mechanism. --scott -- ( http://cscott.net/ ) ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
[sugar] [PATCH] Merge activities.default into favorites.
From 7f9eb78b2585504669d3ebe648e8ee3b356a5d6e Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso [EMAIL PROTECTED] Date: Mon, 12 May 2008 20:42:24 +0200 Subject: [PATCH] Merge activities.default into favorites. --- data/Makefile.am |1 + data/activities.defaults | 19 +++ service/bundleregistry.py | 128 +++-- 3 files changed, 108 insertions(+), 40 deletions(-) create mode 100644 data/activities.defaults diff --git a/data/Makefile.am b/data/Makefile.am index 7771ce9..698721d 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -8,6 +8,7 @@ sugar-xo.gtkrc: gtkrc.em sugardir = $(pkgdatadir)/data sugar_DATA = \ + activities.defaults \ kbdconfig \ mime.defaults \ $(GTKRC_FILES) diff --git a/data/activities.defaults b/data/activities.defaults new file mode 100644 index 000..fe229a1 --- /dev/null +++ b/data/activities.defaults @@ -0,0 +1,19 @@ +# Activities to be automatically added to the ring after an upgrade + +org.laptop.Chat +org.laptop.WebActivity +org.laptop.AbiWordActivity +org.laptop.RecordActivity +org.laptop.Oficina +org.laptop.TamTamMini +org.vpri.EtoysActivity +org.laptop.TurtleArtActivity +org.laptop.Pippy +org.laptop.Calculate +org.laptop.Terminal +org.laptop.MeasureActivity +org.laptop.AcousticMeasure +org.laptop.Memorize +org.laptop.TamTamJam +org.laptop.TamTamEdit +org.laptop.TamTamSynthLab diff --git a/service/bundleregistry.py b/service/bundleregistry.py index 88060c3..133ffbf 100644 --- a/service/bundleregistry.py +++ b/service/bundleregistry.py @@ -26,20 +26,6 @@ from sugar import env import config -def _load_mime_defaults(): -defaults = {} - -f = open(os.path.join(config.data_path, 'mime.defaults'), 'r') -for line in f.readlines(): -line = line.strip() -if line and not line.startswith('#'): -mime = line[:line.find(' ')] -handler = line[line.rfind(' ') + 1:] -defaults[mime] = handler -f.close() - -return defaults - class BundleRegistry(gobject.GObject): Service that tracks the available activity bundles @@ -54,22 +40,89 @@ class BundleRegistry(gobject.GObject): def __init__(self): gobject.GObject.__init__(self) - + +self._mime_defaults = self._load_mime_defaults() + self._bundles = [] -self._search_path = [] -self._mime_defaults = _load_mime_defaults() +for activity_dir in self._get_activity_directories(): +self._scan_directory(activity_dir) -path = env.get_profile_path('favorite_activities') -if os.path.exists(path): +self._last_defaults_mtime = -1 +self._favorite_bundles = self._load_favorites() +self._merge_default_favorites() + +def _get_activity_directories(self): +directories = [] +if os.environ.has_key('SUGAR_ACTIVITIES'): +directories.extend(os.environ['SUGAR_ACTIVITIES'].split(':')) + +directories.append(env.get_user_activities_path()) + +return directories + +def _load_mime_defaults(self): +defaults = {} + +f = open(os.path.join(config.data_path, 'mime.defaults'), 'r') +for line in f.readlines(): +line = line.strip() +if line and not line.startswith('#'): +mime = line[:line.find(' ')] +handler = line[line.rfind(' ') + 1:] +defaults[mime] = handler +f.close() + +return defaults + +def _load_favorites(self): +favorite_bundles = [] +favorites_path = env.get_profile_path('favorite_activities') +if os.path.exists(favorites_path): try: -self._favorite_bundles = simplejson.load(open(path)) -print 'loaded %r' % self._favorite_bundles +favorites_data = simplejson.load(open(favorites_path)) +# Old structure was a list instead of a dictionary. +if isinstance(favorites_data, list): +favorite_bundles = favorites_data +else: +favorite_bundles = favorites_data['favorites'] +self._last_defaults_mtime = favorites_data['defaults-mtime'] except ValueError, e: -logging.error('Error while loading favorite_activities: %r.' - % e) -self._favorite_bundles = [] -else: -self._favorite_bundles = [] +logging.error('Error while loading favorite_activities: %r.' % + e) + +return favorite_bundles + +def _merge_default_favorites(self): +default_activities = [] +defaults_path = os.path.join(config.data_path, 'activities.defaults') +if os.path.exists(defaults_path): +file_mtime = os.stat(defaults_path).st_mtime +if file_mtime self._last_defaults_mtime: +f =
Re: [sugar] 65-node simple mesh test (and counting... ;-)
How does the collision model/scheme change between AP mode and ad-hoc/mesh modes? As far as I can tell, it doesn't. 802.11s is interoperable with 802.11abg, which means that the same media access algorithms are used. At least part of our problem might be in the synchronized transmits occurring in our present 802.11s implementation of broadcast, which are probably killing whatever CA scheme 802.11abg dictate. See: http://wiki.laptop.org/go/Path_Discovery_Mechanism:Sanity#Question_.232_-_Does_PDM_traffic_self-interfere.3F which is trying to deal with low-level path discovery requests, which also use the broadcast mechanism. --scott Yes, it is the same 802.11 DCF for both scenarios (infra and mesh). I would like to add to this discussion that sparse and dense mesh are too completely different animals. Most of the problems that we are trying to address now, are associated to the latter. The more we dig into this, the more clear it gets that we need to adapt. Everything we do to increase coverage in a sparse mesh hurt us in a dense cloud. One example: broadcasting or multicasting at 1 or 2Mbps. Likewise, what we do to increase reliability, might actually decrease it. One example: the verbosity or redundancy of some of our protocols. And that's one of the strengths of Cerebro (less is more). So, as a side note: Treating the two animals as different will avoid some bites and scratches. ;-) -- Ricardo Carrano ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] [PATCH] Add speaker device and icon by default
On Tue, May 06, 2008 at 05:40:30PM +0100, Martin Dengler wrote: On Tue, May 06, 2008 at 04:39:30PM +0200, Tomeu Vizoso wrote: On 5/4/08, Martin Dengler [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 02:12:58PM +0200, Tomeu Vizoso wrote: I think that Michael has spotted here a wonderful opportunity for making Sugar more robust, thanks to your patch. ... I haven't forgotten this thread, just been unable to work on it. After working on it a bit more I think the right thing to do is just the small change Tomeu suggested. I would really like in the future to submit a patch that allows one to place a few files in a devices.d/ subdir - like model.py, view.py, icon.svg, etc. - and then the devicesmodel.py code could try to load each model.py appropriately, and so forth, but right now most of our devices really are device brokers (hal-dbus, networkmanager) and such a setup doesn't mesh well with them. Obviously in this patch would be the do the initialization lazily and safely-type of code that would make m_stone a lot happier. But in the meantime the two/three lines Tomeu suggested will still make things safer without adding lots of code; I will resubmit the patch and hopefully that will make everyone a bit happier. Thanks, Tomeu Martin Martin pgp19PvPR6OJ3.pgp Description: PGP signature ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
[sugar] [PATCH] Add speaker device and icon by default
Add speaker device and icon by default, as in http://wiki.laptop.org/go/Designs/Frame#07 --- src/hardware/hardwaremanager.py | 31 +- src/model/devices/Makefile.am |4 +- src/model/devices/devicesmodel.py |8 +++ src/model/devices/speaker.py | 59 ++ src/view/devices/Makefile.am |4 +- src/view/devices/speaker.py | 119 + 6 files changed, 220 insertions(+), 5 deletions(-) create mode 100644 src/model/devices/speaker.py create mode 100644 src/view/devices/speaker.py diff --git a/src/hardware/hardwaremanager.py b/src/hardware/hardwaremanager.py index 5b9e330..284a283 100644 --- a/src/hardware/hardwaremanager.py +++ b/src/hardware/hardwaremanager.py @@ -50,6 +50,13 @@ class HardwareManager(object): if track.flags gst.interfaces.MIXER_TRACK_MASTER: self._master = track +def get_mute(self): +if not self._mixer or not self._master: +logging.error('Cannot get the mute status') +return False +return self._master.flags gst.interfaces.MIXER_TRACK_MUTE \ + == gst.interfaces.MIXER_TRACK_MUTE + def get_volume(self): if not self._mixer or not self._master: logging.error('Cannot get the volume') @@ -57,9 +64,19 @@ class HardwareManager(object): max_volume = self._master.max_volume min_volume = self._master.min_volume -volume = self._mixer.get_volume(self._master)[0] -return volume * 100.0 / (max_volume - min_volume) + min_volume +volumes = self._mixer.get_volume(self._master) + +#sometimes we get a spurious zero from one/more channel(s) +#TODO: consider removing this when trac #6933 is resolved +nonzero_volumes = [v for v in volumes if v 0] + +if len(nonzero_volumes) 0: +#we could just pick the first nonzero volume, but this converges +volume = sum(nonzero_volumes) / len(nonzero_volumes) +return volume * 100.0 / (max_volume - min_volume) + min_volume +else: +return 0 def set_volume(self, volume): if not self._mixer or not self._master: @@ -76,7 +93,15 @@ class HardwareManager(object): volume = volume * (max_volume - min_volume) / 100.0 + min_volume volume_list = [ volume ] * self._master.num_channels -self._mixer.set_volume(self._master, tuple(volume_list)) +#sometimes alsa sets one/more channels' volume to zero instead +# of what we asked for, so try a few times +#TODO: consider removing this loop when trac #6934 is resolved +last_volumes_read = [0] +read_count = 0 +while (0 in last_volumes_read) and (read_count 3): +self._mixer.set_volume(self._master, tuple(volume_list)) +last_volumes_read = self._mixer.get_volume(self._master) +read_count += 1 def set_mute(self, mute): if not self._mixer or not self._master: diff --git a/src/model/devices/Makefile.am b/src/model/devices/Makefile.am index 5440eeb..3124144 100644 --- a/src/model/devices/Makefile.am +++ b/src/model/devices/Makefile.am @@ -5,4 +5,6 @@ sugar_PYTHON = \ __init__.py \ device.py \ devicesmodel.py \ - battery.py + battery.py \ + speaker.py + diff --git a/src/model/devices/devicesmodel.py b/src/model/devices/devicesmodel.py index 691e19e..e72a9d4 100644 --- a/src/model/devices/devicesmodel.py +++ b/src/model/devices/devicesmodel.py @@ -23,6 +23,7 @@ from model.devices import device from model.devices.network import wireless from model.devices.network import mesh from model.devices import battery +from model.devices import speaker from hardware import hardwaremanager from hardware import nmclient @@ -54,6 +55,13 @@ class DevicesModel(gobject.GObject): for udi in hal_manager.FindDeviceByCapability('battery'): self.add_device(battery.Device(udi)) +try: +self.add_device(speaker.Device()) +except Exception, speaker_fail_msg: +logging.error(could not initialize speaker device: %s % + speaker_fail_msg) +logging.debug(traceback.format_exc()) + def _observe_network_manager(self): network_manager = hardwaremanager.get_network_manager() if not network_manager: diff --git a/src/model/devices/speaker.py b/src/model/devices/speaker.py new file mode 100644 index 000..d3b9967 --- /dev/null +++ b/src/model/devices/speaker.py @@ -0,0 +1,59 @@ +# Copyright (C) 2008 Martin Dengler +# +# 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 2 of the License, or +# (at your option) any later version. +# +#
[sugar] Release management for upcoming bug fix releases and August release
Development and Testing community, We have started planning for the next SW releases. The goal is a bug fix release in a few weeks (8.1.1), and then the major August release (8.2.0). [NOTE: the release numbers are based on my last reading of the numbering convention... not sure if it is final.] A high level view of this process: 1) Prioritize feature and bug fix requests from deployments, developers, support, our sales/marketing group 2) Triage bugs to determine which bugs are critical to fix to meet the priorities 3) Translate these requests into requirements, use cases, and trac items (bug fixes or task items). After that planning, a weekly meeting can be held to manage the high priority items (Wed 2pm EDT). Michael Stone volunteered to be the release manager for the 8.1.0 (Update.1) release and is willing to continue through to the August release. He will provide much needed communications, planning, help in unblocking technical problems, and general project management. We are hiring people so I expect we will have some help for Michael soon. Don't hesitate to reply with thoughts or ideas on this process. Regards, Kim ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] Release management for upcoming bug fix releases and August release
On Tue, May 13, 2008 at 1:41 AM, Kim Quirk [EMAIL PROTECTED] wrote: 2) Triage bugs to determine which bugs are critical to fix to meet the priorities I spent quite a bit of time on this today, for the Sugar UI modules. Lots more to be done though... Marco ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
Re: [sugar] [PATCH] Log Viewer overhaul.
I'm happy to co-maintain. Eduardo, were you planning to integrate more stuff from Memphis into Log Viewer? I don't want to interfere with that work of course. Off topic- 'Log Viewer Activity' does not fit in the activity toolbar's title entry. I have seen this problem with other activities as well. Can we consider expanding the default size of this entry, or else dropping the word 'Activity' from the default titles? Best, Wade On Mon, May 12, 2008 at 4:21 AM, Marco Pesenti Gritti [EMAIL PROTECTED] wrote: Hello, Eduardo has been maintaining the log viewer in the past but I think he is busy with work these. Perhaps you could volunteer to take maintenance over or to co-maintain :) Eduardo, what do you think? Do you have time to review the patch? Marco On Mon, May 12, 2008 at 4:05 AM, Wade Brainerd [EMAIL PROTECTED] wrote: This tangent came about when I couldn't launch Browse from the shell, and couldn't figure out why because of the crazy ANSI escape codes in the stack trace in the Log viewer. The patch is almost a complete rewrite, it may be easier to see the changes from the bundle - http://www.wadeb.com/Log-7.xo Best, Wade ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar
[sugar] Log Viewer - View Log? (Was: [PATCH] Log Viewer overhaul)
2008/5/13, Wade Brainerd [EMAIL PROTECTED]: I'm happy to co-maintain. Eduardo, were you planning to integrate more stuff from Memphis into Log Viewer? I don't want to interfere with that work of course. Off topic- 'Log Viewer Activity' does not fit in the activity toolbar's title entry. I have seen this problem with other activities as well. Can we consider expanding the default size of this entry, or else dropping the word 'Activity' from the default titles? Forking the thread here, but I wonder if this activity could be renamed to something more closely following the verb standard, like View log(s)? Nitpick perhaps, but goes along my opinion that our dictionaries don't have enough verbs to exactly identify all activities that will appear, so adding a noun when necessary would improve things. Best, Wade Eduardo On Mon, May 12, 2008 at 4:21 AM, Marco Pesenti Gritti [EMAIL PROTECTED] wrote: Hello, Eduardo has been maintaining the log viewer in the past but I think he is busy with work these. Perhaps you could volunteer to take maintenance over or to co-maintain :) Eduardo, what do you think? Do you have time to review the patch? Marco On Mon, May 12, 2008 at 4:05 AM, Wade Brainerd [EMAIL PROTECTED] wrote: This tangent came about when I couldn't launch Browse from the shell, and couldn't figure out why because of the crazy ANSI escape codes in the stack trace in the Log viewer. The patch is almost a complete rewrite, it may be easier to see the changes from the bundle - http://www.wadeb.com/Log-7.xo Best, Wade ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar ___ Sugar mailing list Sugar@lists.laptop.org http://lists.laptop.org/listinfo/sugar