[Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame
This patch adds an icon to the frame, whose palette menu displays the memory and cpu resources. For computing free memory, the code reads the /proc/meminfo file (thanks quozl) and for computing cpu usage, the code reads the /proc/stat file. The palette menu entries are only updated (in one second intervals) when the palette menu is visible thus possibly saving cpu cycles. Signed-off-by: anishmangal2002 --- extensions/deviceicon/Makefile.am |3 +- extensions/deviceicon/resources.py | 188 2 files changed, 190 insertions(+), 1 deletions(-) create mode 100644 extensions/deviceicon/resources.py diff --git a/extensions/deviceicon/Makefile.am b/extensions/deviceicon/Makefile.am index 8a2e765..038c059 100644 --- a/extensions/deviceicon/Makefile.am +++ b/extensions/deviceicon/Makefile.am @@ -5,4 +5,5 @@ sugar_PYTHON = \ battery.py \ network.py \ speaker.py \ - volume.py + volume.py \ + resources.py diff --git a/extensions/deviceicon/resources.py b/extensions/deviceicon/resources.py new file mode 100644 index 000..7503bef --- /dev/null +++ b/extensions/deviceicon/resources.py @@ -0,0 +1,188 @@ +# Copyright (C) Anish Mangal +# +# 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. +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +from gettext import gettext as _ +import logging +import os + +import gobject +import gtk +import gconf + +from sugar.graphics.tray import TrayIcon +from sugar.graphics.xocolor import XoColor +from sugar.graphics.palette import Palette +from sugar.graphics import style + +from jarabe.frame.frameinvoker import FrameWidgetInvoker + +class DeviceView(TrayIcon): + +FRAME_POSITION_RELATIVE = 500 + +def __init__(self): +client = gconf.client_get_default() +color = XoColor(client.get_string('/desktop/sugar/user/color')) +TrayIcon.__init__(self, icon_name='computer', xo_color=color) +self.set_palette_invoker(FrameWidgetInvoker(self)) + +def create_palette(self): +palette = ResourcePalette(_('System resources')) +palette.set_group_id('frame') +return palette + +class ResourcePalette(Palette): + +def __init__(self, primary_text): +Palette.__init__(self, label=primary_text) + +self._popup_cb_id = self.connect('popup', self._popup_cb) +self._popdown_cb_id = self.connect('popdown', self._popdown_cb) + +self.vbox = gtk.VBox() +self.set_content(self.vbox) + +self._cpu_text = gtk.Label() +self.vbox.pack_start(self._cpu_text, padding=style.DEFAULT_PADDING) +self._cpu_text.show() + +self._cpu_bar = gtk.ProgressBar() +self._cpu_bar.set_size_request( +style.zoom(style.GRID_CELL_SIZE * 4), -1) +self.vbox.pack_start(self._cpu_bar, padding=style.DEFAULT_PADDING) +self._cpu_bar.show() + +self._memory_text = gtk.Label() +self.vbox.pack_start(self._memory_text, padding=style.DEFAULT_PADDING) +self._memory_text.show() + +self._memory_bar = gtk.ProgressBar() +self._memory_bar.set_size_request( +style.zoom(style.GRID_CELL_SIZE * 4), -1) +self.vbox.pack_start(self._memory_bar, padding=style.DEFAULT_PADDING) +self._memory_bar.show() + +self.vbox.show() + +try: +self._cpu_times = self._get_cpu_times_list() +except Exception: +logging.exception('An error ocurred while attempting to ' +'read /proc/stat') +self._remove_callbacks() + +def _get_cpu_times_list(self): +"""Return various cpu times as read from /proc/stat + +This method returns the following cpu times measured +in jiffies (1/100 of a second for x86 systems) +as an ordered list of numbers - [user, nice, +system, idle, iowait] where, + +user: normal processes executing in user mode +nice: niced processes executing in user mode +system: processes executing in kernel mode +idle: twiddling thumbs +iowait: waiting for I/O to complete + +Note: For systems having 2 or more CPU's, the above +numbers would be the cumulative sum of these times +for all CPU's present in the system. + +""" +return [int(count) +
Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame
Thanks for reviewing this patch. I think I have addressed all issues raised by tomeu, silbe and quozl. Additionally, I've put the portion of code that accesses the /proc/stat and /proc/meminfo files in a try...except block. When an exception occurs, all the widgets barring _cpu_text are removed and _cpu_text displays an error message "Cannot compute CPU and memory usage statistics!" in the palette. -- Anish On Sat, Jul 10, 2010 at 1:04 PM, anishmangal2002 wrote: > This patch adds an icon to the frame, whose palette > menu displays the memory and cpu resources. For computing > free memory, the code reads the /proc/meminfo file (thanks > quozl) and for computing cpu usage, the code reads the > /proc/stat file. > > The palette menu entries are only updated (in one second > intervals) when the palette menu is visible thus > possibly saving cpu cycles. > > Signed-off-by: anishmangal2002 > --- > extensions/deviceicon/Makefile.am | 3 +- > extensions/deviceicon/resources.py | 188 > > 2 files changed, 190 insertions(+), 1 deletions(-) > create mode 100644 extensions/deviceicon/resources.py > > diff --git a/extensions/deviceicon/Makefile.am > b/extensions/deviceicon/Makefile.am > index 8a2e765..038c059 100644 > --- a/extensions/deviceicon/Makefile.am > +++ b/extensions/deviceicon/Makefile.am > @@ -5,4 +5,5 @@ sugar_PYTHON = \ > battery.py \ > network.py \ > speaker.py \ > - volume.py > + volume.py \ > + resources.py > diff --git a/extensions/deviceicon/resources.py > b/extensions/deviceicon/resources.py > new file mode 100644 > index 000..7503bef > --- /dev/null > +++ b/extensions/deviceicon/resources.py > @@ -0,0 +1,188 @@ > +# Copyright (C) Anish Mangal > +# > +# 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. > +# > +# 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, write to the Free Software > +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > + > +from gettext import gettext as _ > +import logging > +import os > + > +import gobject > +import gtk > +import gconf > + > +from sugar.graphics.tray import TrayIcon > +from sugar.graphics.xocolor import XoColor > +from sugar.graphics.palette import Palette > +from sugar.graphics import style > + > +from jarabe.frame.frameinvoker import FrameWidgetInvoker > + > +class DeviceView(TrayIcon): > + > + FRAME_POSITION_RELATIVE = 500 > + > + def __init__(self): > + client = gconf.client_get_default() > + color = XoColor(client.get_string('/desktop/sugar/user/color')) > + TrayIcon.__init__(self, icon_name='computer', xo_color=color) > + self.set_palette_invoker(FrameWidgetInvoker(self)) > + > + def create_palette(self): > + palette = ResourcePalette(_('System resources')) > + palette.set_group_id('frame') > + return palette > + > +class ResourcePalette(Palette): > + > + def __init__(self, primary_text): > + Palette.__init__(self, label=primary_text) > + > + self._popup_cb_id = self.connect('popup', self._popup_cb) > + self._popdown_cb_id = self.connect('popdown', self._popdown_cb) > + > + self.vbox = gtk.VBox() > + self.set_content(self.vbox) > + > + self._cpu_text = gtk.Label() > + self.vbox.pack_start(self._cpu_text, padding=style.DEFAULT_PADDING) > + self._cpu_text.show() > + > + self._cpu_bar = gtk.ProgressBar() > + self._cpu_bar.set_size_request( > + style.zoom(style.GRID_CELL_SIZE * 4), -1) > + self.vbox.pack_start(self._cpu_bar, padding=style.DEFAULT_PADDING) > + self._cpu_bar.show() > + > + self._memory_text = gtk.Label() > + self.vbox.pack_start(self._memory_text, > padding=style.DEFAULT_PADDING) > + self._memory_text.show() > + > + self._memory_bar = gtk.ProgressBar() > + self._memory_bar.set_size_request( > + style.zoom(style.GRID_CELL_SIZE * 4), -1) > + self.vbox.pack_start(self._memory_bar, padding=style.DEFAULT_PADDING) > + self._memory_bar.show() > + > + self.vbox.show() > + > + try: > + self._cpu_times = self._get_cpu_times_list() > + except Exception: > + logging.exception('An error ocurred while attempting to ' > + 'read /proc/stat') > + self._remove_callbacks() > + > + def _get_cpu_times_list(self): > +
Re: [Sugar-devel] [PATCH 1/3] Touchpad extension for the frame
> +def read_touchpad_mode(): > + """ Read the touchpad mode from the node path. """ > + node_file_handle = open(NODE_PATH, "r") > + text = node_file_handle.read() > + node_file_handle.close() > + > + > +def write_touchpad_mode(touchpad): > + """ Write the touchpad mode to the node path. """ > + touchpad_mode_index = TOUCHPAD_MODES.index(touchpad) > + > + node_file_handle = open(NODE_PATH, "w") > + node_file_handle.write(str(touchpad_mode_index)) > + node_file_handle.close() ... > + > + if touchpad_mode_index == 0: > + if os.path.exists(FLAG_PATH): > + os.remove(FLAG_PATH) > + else: > + flag_file_handle = open(FLAG_PATH, "w") > + flag_file_handle.close() Maybe s/"w"/'w'/ and s/"r"/'r'/ ;-) ? I missed reporting this earlier. On Fri, Jul 9, 2010 at 10:28 AM, Walter Bender wrote: > I think I addressed all of the issues raised by Marco and Anish: > > --- > extensions/deviceicon/touchpad.py | 129 > + > 1 files changed, 129 insertions(+), 0 deletions(-) > create mode 100644 extensions/deviceicon/touchpad.py > > diff --git a/extensions/deviceicon/touchpad.py > b/extensions/deviceicon/touchpad.py > new file mode 100644 > index 000..a182d9c > --- /dev/null > +++ b/extensions/deviceicon/touchpad.py > @@ -0,0 +1,129 @@ > +# Copyright (C) 2010, Walter Bender, Sugar Labs > +# > +# 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. > +# > +# 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, write to the Free Software > +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > + > + > +from gettext import gettext as _ > + > +import gtk > +import gconf > +import os > + > +from sugar.graphics.tray import TrayIcon > +from sugar.graphics.xocolor import XoColor > +from sugar.graphics.palette import Palette > +from sugar.graphics import style > + > +from jarabe.frame.frameinvoker import FrameWidgetInvoker > + > +TOUCHPAD_MODES = ['capacitive', 'resistive'] > +STATUS_TEXT = {TOUCHPAD_MODES[0]: _('finger'), TOUCHPAD_MODES[1]: > _('stylus')} > +STATUS_ICON = {TOUCHPAD_MODES[0]: 'touchpad-' + TOUCHPAD_MODES[0], > + TOUCHPAD_MODES[1]: 'touchpad-' + TOUCHPAD_MODES[1]} > +# FLAG_PATH is used to preserve status between boots. > +FLAG_PATH = '/home/olpc/.olpc-pentablet-mode' > +# NODE_PATH is used to communicate with the touchpad device. > +NODE_PATH = '/sys/devices/platform/i8042/serio1/ptmode' > + > +class DeviceView(TrayIcon): > + """ Manage the touchpad mode from the device palette on the Frame. """ > + > + FRAME_POSITION_RELATIVE = 500 > + > + def __init__(self): > + """ Create the touchpad palette and display it on Frame. """ > + icon_name = STATUS_ICON[read_touchpad_mode()] > + > + client = gconf.client_get_default() > + color = XoColor(client.get_string('/desktop/sugar/user/color')) > + TrayIcon.__init__(self, icon_name=icon_name, xo_color=color) > + > + self.set_palette_invoker(FrameWidgetInvoker(self)) > + self.connect('button-release-event', self.__button_release_event_cb) > + > + def create_palette(self): > + """ On create, set the current mode """ > + self.palette = ResourcePalette(_('My touchpad'), self.icon) > + self.palette.set_group_id('frame') > + return self.palette > + > + def __button_release_event_cb(self, widget, event): > + """ On button release, switch modes """ > + self.palette.toggle_mode() > + return True > + > + > +class ResourcePalette(Palette): > + """ Query the current state of the touchpad and update the display. """ > + > + def __init__(self, primary_text, icon): > + """ Get the status. """ > + Palette.__init__(self, label=primary_text) > + > + self._icon = icon > + > + vbox = gtk.VBox() > + self.set_content(vbox) > + > + self._status_text = gtk.Label() > + vbox.pack_start(self._status_text, padding=style.DEFAULT_PADDING) > + self._status_text.show() > + > + vbox.show() > + > + self._mode = read_touchpad_mode() > + self._update() > + > + def _update(self): > + """ Update the label and icon based on the current mode. """ > + self._status_text.set_label(STATUS_TEXT[self._mode]) > + self._icon.props.icon_name = STATUS_ICON[self._mode] > + > + def toggle_mode(self): > + """ On mouse click, toggle the mode. """ > +
Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame
On 10 Jul 2010, at 08:43, Anish Mangal wrote: >> diff --git a/extensions/deviceicon/resources.py >> b/extensions/deviceicon/resources.py >> new file mode 100644 >> index 000..7503bef >> --- /dev/null >> +++ b/extensions/deviceicon/resources.py >> @@ -0,0 +1,188 @@ >> +# Copyright (C) Anish Mangal >> +# >> +# 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. >> +# >> +# 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, write to the Free Software >> +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA >> + >> +from gettext import gettext as _ >> +import logging >> +import os >> + >> +import gobject >> +import gtk >> +import gconf >> + >> +from sugar.graphics.tray import TrayIcon >> +from sugar.graphics.xocolor import XoColor >> +from sugar.graphics.palette import Palette >> +from sugar.graphics import style >> + >> +from jarabe.frame.frameinvoker import FrameWidgetInvoker >> + >> +class DeviceView(TrayIcon): >> + >> +FRAME_POSITION_RELATIVE = 500 >> + >> +def __init__(self): >> +client = gconf.client_get_default() >> +color = XoColor(client.get_string('/desktop/sugar/user/color')) >> +TrayIcon.__init__(self, icon_name='computer', xo_color=color) >> +self.set_palette_invoker(FrameWidgetInvoker(self)) >> + >> +def create_palette(self): >> +palette = ResourcePalette(_('System resources')) >> +palette.set_group_id('frame') >> +return palette >> + >> +class ResourcePalette(Palette): >> + >> +def __init__(self, primary_text): >> +Palette.__init__(self, label=primary_text) >> + >> +self._popup_cb_id = self.connect('popup', self._popup_cb) >> +self._popdown_cb_id = self.connect('popdown', self._popdown_cb) >> + >> +self.vbox = gtk.VBox() >> +self.set_content(self.vbox) >> + >> +self._cpu_text = gtk.Label() >> +self.vbox.pack_start(self._cpu_text, padding=style.DEFAULT_PADDING) >> +self._cpu_text.show() >> + >> +self._cpu_bar = gtk.ProgressBar() >> +self._cpu_bar.set_size_request( >> +style.zoom(style.GRID_CELL_SIZE * 4), -1) >> +self.vbox.pack_start(self._cpu_bar, padding=style.DEFAULT_PADDING) >> +self._cpu_bar.show() >> + >> +self._memory_text = gtk.Label() >> +self.vbox.pack_start(self._memory_text, >> padding=style.DEFAULT_PADDING) >> +self._memory_text.show() >> + >> +self._memory_bar = gtk.ProgressBar() >> +self._memory_bar.set_size_request( >> +style.zoom(style.GRID_CELL_SIZE * 4), -1) >> +self.vbox.pack_start(self._memory_bar, >> padding=style.DEFAULT_PADDING) >> +self._memory_bar.show() >> + >> +self.vbox.show() >> + >> +try: >> +self._cpu_times = self._get_cpu_times_list() >> +except Exception: >> +logging.exception('An error ocurred while attempting to ' >> +'read /proc/stat') Which exceptions do you expect to happen and in which situations? Catch all exceptions are generally a bad idea. >> +self._remove_callbacks() >> + >> +def _get_cpu_times_list(self): >> +"""Return various cpu times as read from /proc/stat >> + >> +This method returns the following cpu times measured >> +in jiffies (1/100 of a second for x86 systems) >> +as an ordered list of numbers - [user, nice, >> +system, idle, iowait] where, >> + >> +user: normal processes executing in user mode >> +nice: niced processes executing in user mode >> +system: processes executing in kernel mode >> +idle: twiddling thumbs >> +iowait: waiting for I/O to complete >> + >> +Note: For systems having 2 or more CPU's, the above >> +numbers would be the cumulative sum of these times >> +for all CPU's present in the system. >> + >> +""" >> +return [int(count) >> + for count in file('/proc/stat').readline().split()[1:6]] >> + >> +def _percentage_cpu_available(self): >> +""" >> +Return free CPU resources as a percentage >> + >> +""" >> +_cpu_times_new = self._get_cpu_times_list() >> +_cpu_times_current = [(new - old) >> +for new, old in zip(_cpu_times_new, self._cpu_times)] >> +user, nice, system, idle, iowait = _cpu_times_current >> +cpu_free = (idle + iowait) * 100.0 / sum(_cpu_times_cu
Re: [Sugar-devel] Design Team meeting (was: Re: UI experiments: pop-up menus and hot corners)
A couple of thoughts prior to the meeting today: (1) Re new vs resume, I would argue that we already have a mechanism in place, the delayed palette on the home view. If we made the palette appear instantly, much of the problem would be addressed and we'd not have to introduce an additional modal dialog. A couple of suggestions for improvements: (a) have the initial palette appear with just two choices: new and resume (most recent); (b) have the cursor positioned between these two choices (move up to select new, down to resume); (c) have a delay before additional resume choices appear (essentially what we have now, although they could be arranged radially). (2) If there is time, I'd like to discuss "write to Journal any time." My proposal would be to add this only to the 0.86+ toolbar as in general, that toolbar's Activity toolbar is sparsely populated. The design would simply be a button (Jounal icon with a pen) that brings up a text entry field that is used to append messages to the Journal description field. regards. -walter -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] WikiBrowse from sugar-emulator (ubuntu 10.04) ?
Hi all, Emmanuel is the author of Kiwix (http://www.kiwix.org), an offline reader for wikis based on mediawiki. He installed Sugar on Ubuntu 10.04 with sugar-emulator 0.88 then tried to install WikipediaEN from these packages : * http://dev.laptop.org/~cjb/enwiki/WikipediaEN-4.xo * http://dev.laptop.org/~cjb/eswiki/Wikipedia-10.xo None of them work -- does anyone can help having a working version of WikipediaEN (or WikiBrowse) on this version of Sugar ? Emmanuel wants to explore WikiBrowse to better understand the requirements for a future kiwix.xo. Thanks for your help, -- Bastien ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Pathagar issue with Django middleware
I am trying to install pathagar on Fedora 11. Everything seems to work OK until I get to accessing the server on port 8000, then I get this: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 279, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 651, in __call__ return self.application(environ, start_response) File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 230, in __call__ self.load_middleware() File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 42, in load_middleware raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) ImproperlyConfigured: Error importing middleware debug_toolbar.middleware: "No module named debug_toolbar.middleware" Obviously siomething is missing, but I'm having a hard time figuring out what. Can you point mein the right direction? Thanks, James Simmons ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] Resume/New pie menu menu mockup
Hi Gary I think this is very interesting. The visual design isn't quite there yet, but I think that the interaction is a good one to consider. There is something quite intuitive about maintaining the selected item at the center. I think we could try a few alternate visual explorations, such as what would happen if the second ring wasn't as articulated. For instance, what about having a gray background overlay covering the entire view, and removing the gray hairlines around the elements in the pie menu, but otherwise leaving the information where it is? I also wonder about showing both text and icon, and whether we should treat this more as an additional layer on the home UI, with hover states for each icon in the menu as you would expect from the main view. If it's OK, I will try a few variations since I think this does have potential! Christian On Sat, Jul 10, 2010 at 1:15 PM, Gary C Martin wrote: > Here's a mockup for Walter's previous pie menu suggestion (starting a new > thread as Sascha though the last one was getting too long). Pie menus have > some nice UI properties, but can also be difficult to get working right for > all cases (I've tried not to cheat in the mockup). I'd consider this a more > touch friendly layout than current palettes/hover-menus (something the > fullscreen dialogue approach was also trying to take into account). The inner > two choices appear instantly on click. The outer segments appear on delay > hover, with a 90% alpha to help keep the user in context (though given our > ongoing lack of compositing, solid fill might have to do). Rolling over a > segment lights up its fill, the whole of each segment needs to accept hits. > > --Gary > > > > > > -- anyth...@christianmarcschmidt.com 917/ 575 0013 http://www.christianmarcschmidt.com http://www.linkedin.com/in/christianmarcschmidt http://twitter.com/cms_ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] Resume/New pie menu menu mockup
Hi Gary, On 07/10/2010 07:15 PM, Gary C Martin wrote: > Here's a mockup for Walter's previous pie menu suggestion (starting a new > thread as Sascha though the last one was getting too long). Pie menus have > some nice UI properties, but can also be difficult to get working right for > all cases (I've tried not to cheat in the mockup). I'd consider this a more > touch friendly layout than current palettes/hover-menus (something the > fullscreen dialogue approach was also trying to take into account). The inner > two choices appear instantly on click. The outer segments appear on delay > hover, with a 90% alpha to help keep the user in context (though given our > ongoing lack of compositing, solid fill might have to do). Rolling over a > segment lights up its fill, the whole of each segment needs to accept hits. That looks pretty nice, but something instantly comes to mind: when this pie menu is open, what if I realize I clicked on the wrong activity, and the one I wanted is now *under* the pie menu? Do I have to click outside so that the menu disappears, then I can finally open the pie menu for the activity I was interested in? How about something like this: o x o o / o o - x o o \ o x (yes, this is a poor ascii-art for the Sugar activity launcher :) The circle of « o »'s represents the activities in the launcher, and when the rightmost one is clicked/hovered/..., then the recent items (the ones you have put in a pie chart, here represented by the « x »'s) appear in a semi-pie-menu (its orientation depending on where the corresponding activity is located on the circle). This way, the menu remains out of the way of launching another activity as an afterthought. This could also help the « I had this document that I want to open again but I don't remember the pretty picture I have to click to open it » situation (although I'm not sure it is a common one, and the journal would help anyway). What do you think? -- Mathieu PS: Sorry if this had already been suggested and dismissed, I haven't really been following this mailing-list recently. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] Resume/New pie menu menu mockup
Hi Mathieu, On 10 Jul 2010, at 18:52, Mathieu Bridon wrote: > Hi Gary, > > On 07/10/2010 07:15 PM, Gary C Martin wrote: >> Here's a mockup for Walter's previous pie menu suggestion (starting a new >> thread as Sascha though the last one was getting too long). Pie menus have >> some nice UI properties, but can also be difficult to get working right for >> all cases (I've tried not to cheat in the mockup). I'd consider this a more >> touch friendly layout than current palettes/hover-menus (something the >> fullscreen dialogue approach was also trying to take into account). The >> inner two choices appear instantly on click. The outer segments appear on >> delay hover, with a 90% alpha to help keep the user in context (though given >> our ongoing lack of compositing, solid fill might have to do). Rolling over >> a segment lights up its fill, the whole of each segment needs to accept hits. > > That looks pretty nice, but something instantly comes to mind: when this pie > menu is open, what if I realize I clicked on the wrong activity, and the one > I wanted is now *under* the pie menu? Do I have to click outside so that the > menu disappears, then I can finally open the pie menu for the activity I was > interested in? The pie could be dismissed on rollout and/or clicking outside (clicking event outside would be solution for touch devices). > How about something like this: > >o x > o o / >o o - x > o o \ >o x > > (yes, this is a poor ascii-art for the Sugar activity launcher :) :) > The circle of « o »'s represents the activities in the launcher, and when the > rightmost one is clicked/hovered/..., then the recent items (the ones you > have put in a pie chart, here represented by the « x »'s) appear in a > semi-pie-menu (its orientation depending on where the corresponding activity > is located on the circle). This way, the menu remains out of the way of > launching another activity as an afterthought. > > This could also help the « I had this document that I want to open again but > I don't remember the pretty picture I have to click to open it » situation > (although I'm not sure it is a common one, and the journal would help anyway). > > What do you think? Yes, it's another possible option, assuming we always and only have a circle fav view layout. I'm trying to imagine what happens as you add more and more fav activities (as kids do), would the resume 'slices' shrink along with the main activity icon in the ring (as if you zoomed further and further back from the whole UI as the ring grows)? Actually this whole pie concept is starting to feel like a conversation Michael Stone started with me off list a year ago :) --Gary > -- > Mathieu > > > PS: Sorry if this had already been suggested and dismissed, I haven't really > been following this mailing-list recently. > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] Resume/New pie menu menu mockup
Gary C Martin wrote: > Actually this whole pie concept is starting to feel like a conversation > Michael Stone started with me off list a year ago :) I always scatter acorns as I walk so that, one day, we may rest beneath the shade of mighty oaks. Michael ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] WikiBrowse from sugar-emulator (ubuntu 10.04) ?
Excerpts from Bastien's message of Sat Jul 10 16:11:17 + 2010: > He installed Sugar on Ubuntu 10.04 with sugar-emulator 0.88 then > tried to install WikipediaEN from these packages : > > * http://dev.laptop.org/~cjb/enwiki/WikipediaEN-4.xo > * http://dev.laptop.org/~cjb/eswiki/Wikipedia-10.xo Ubuntu removed python-xpcom for 10.04, so hulahop and anything based on it (Browse, Wikipedia, ...) is broken. That's the primary reason we don't support Ubuntu 10.04 for sugar-jhbuild. I recommend to use Debian Squeeze instead for developing Sugar (both core and activities). For me it has been more stable than Ubuntu releases - and if there are show-stopper bugs, they actually get fixed rather than stay the way they are for more than three releases. 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] [Design] Resume/New pie menu menu mockup
On Sat, Jul 10, 2010 at 07:52:58PM +0200, Mathieu Bridon wrote: > Hi Gary, > > The circle of « o »'s represents the activities in the launcher, and > when the rightmost one is clicked/hovered/..., then the recent items > (the ones you have put in a pie chart, here represented by the « x »'s) Just an issue that I dont know if is being addressed, or should be, but I have my xo with 'a screenfull of activities' (most of aslo), so I needed to use the sunflower layout. Would all those designs work with other layouts? Just a thought. -- | .''`. == Debian GNU/Linux ==.| http://kevix.myopenid.com..| | : :' : The Universal OS| mysite.verizon.net/kevin.mark/.| | `. `' http://www.debian.org/.| http://counter.li.org [#238656]| |___`-Unless I ask to be CCd,.assume I am subscribed._| ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [Design] Fwd: Write to Journal any time
Cross-posting. -walter -- Forwarded message -- From: Walter Bender Date: Sat, Jul 10, 2010 at 6:13 PM Subject: Write to Journal any time To: des...@lists.laptop.org I've been thinking that maybe the place to add this feature is the Frame. We could include it as a menu option (like view source) easily enough and just use the existing NamingAlert code. That would mean no changes to the toolbar and backward compatibility for all existing activities. Comments? -walter -- Walter Bender Sugar Labs http://www.sugarlabs.org -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [DESIGN] hide OLPC mesh icon in frame when mesh is not being used
On Fri, Jul 9, 2010 at 1:53 PM, Daniel Drake wrote: > Hi, > > In http://bugs.sugarlabs.org/ticket/2086, Simon raised the question: > Do we want to hide the OLPC mesh icon (which currently appears all the > time in the frame, if you're running an XO-1) when we are not > connected to the mesh? > > Daniel Does anyone recall the rationale for including it to begin with? Unlike the ad hoc icon, you cannot use it to create a mesh network (or can you?) -walter > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Pathagar issue: I figured it out
Sayamindu, I figured out how to set up Pathagar and get it running. I'm going to be writing it up in my book. One comment: the book list shows the books in sequence by how they were entered into the database. I would think other sort sequences would be more useful. Second comment: I'd make the pictures for the book cover display larger. You have the space on the page, why not use it? Also, I wouldn't necessarily call it a "cover". Books in the public domain don't have nice book jackets, but they do have nice title pages, interior illustrations, etc. The image that represents the book best is not necessarily its cover. I ended up commenting out the entries in settings.py that refer to the debug toolbar. You might put in comments showing how to do that. James Simmons ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [IAEP] [Design] Fwd: Write to Journal any time
Hi Walter, On 10 Jul 2010, at 23:17, Walter Bender wrote: > Cross-posting. > > -walter > > -- Forwarded message -- > From: Walter Bender > Date: Sat, Jul 10, 2010 at 6:13 PM > Subject: Write to Journal any time > To: des...@lists.laptop.org > > I've been thinking that maybe the place to add this feature is the > Frame. We could include it as a menu option (like view source) easily > enough and just use the existing NamingAlert code. That would mean no > changes to the toolbar and backward compatibility for all existing > activities. Comments? Yes, that would at least avoid having to upgrade all activities to support it — the 'new' toolbar is a good example of what we can expect for activity development lag. It has been almost a year since the new toolbar work, and there are still plenty of activities that don't make use of it (bad for our UI consistency). Most of our target users still have never seen the new toolbars as deployers have been focusing on working with 0.84 based builds for deployment. Maybe, by the time a newer Sugar lands in a major deployment most activities will have caught up ;) On a general note, for me the (automatic) NamingAlert at the end of a session is still quite controversial, it always seems to manage to get in the way right when I'm trying to focus on what I need next (a distraction rather than helpful, by the time I hit Stop I already have a next task in mind, not the already completed one I'm trying to get rid of). Most of the time I'm stabbing at close widget, cussing under my breath. However I do understand you found it useful in a teaching environment last year by specifically instructing students to fill it out. If we allow the NamingAlert to be called up when needed, will we still need to trigger it automatically at the end of a session? Regards, --Gary > > -walter > > -- > Walter Bender > Sugar Labs > http://www.sugarlabs.org > > > > -- > Walter Bender > Sugar Labs > http://www.sugarlabs.org > ___ > IAEP -- It's An Education Project (not a laptop project!) > i...@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/iaep ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [DESIGN] hide OLPC mesh icon in frame when mesh is not being used
On 10 Jul 2010, at 23:19, Walter Bender wrote: > On Fri, Jul 9, 2010 at 1:53 PM, Daniel Drake wrote: >> Hi, >> >> In http://bugs.sugarlabs.org/ticket/2086, Simon raised the question: >> Do we want to hide the OLPC mesh icon (which currently appears all the >> time in the frame, if you're running an XO-1) when we are not >> connected to the mesh? >> >> Daniel > > Does anyone recall the rationale for including it to begin with? > Unlike the ad hoc icon, you cannot use it to create a mesh network (or > can you?) No sorry, I can't remember that discussion either. It would seem to be sensible to hide devices and/or CP modules when ever we can test if the specific functionality is available. There is an argument of discoverability (i.e. how do you know Sugar supports 3G connection if you don't see a 3G CP module for it), but that inexorably leads to a more cluttered UI over time (slowing down discovery of perhaps other more important features). With Sugar targeting more hardware configurations, hiding seems the sane design choice — making sure new features are clearly documented in release notes, which they have been so far, thanks Simon! Regards, --Gary > -walter > >> ___ >> Sugar-devel mailing list >> Sugar-devel@lists.sugarlabs.org >> http://lists.sugarlabs.org/listinfo/sugar-devel >> > > > > -- > Walter Bender > Sugar Labs > http://www.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] [IAEP] [Design] Fwd: Write to Journal any time
On Sat, Jul 10, 2010 at 9:00 PM, Gary Martin wrote: > Hi Walter, > > On 10 Jul 2010, at 23:17, Walter Bender wrote: > >> Cross-posting. >> >> -walter >> >> -- Forwarded message -- >> From: Walter Bender >> Date: Sat, Jul 10, 2010 at 6:13 PM >> Subject: Write to Journal any time >> To: des...@lists.laptop.org >> >> I've been thinking that maybe the place to add this feature is the >> Frame. We could include it as a menu option (like view source) easily >> enough and just use the existing NamingAlert code. That would mean no >> changes to the toolbar and backward compatibility for all existing >> activities. Comments? > > Yes, that would at least avoid having to upgrade all activities to support it > — the 'new' toolbar is a good example of what we can expect for activity > development lag. It has been almost a year since the new toolbar work, and > there are still plenty of activities that don't make use of it (bad for our > UI consistency). Most of our target users still have never seen the new > toolbars as deployers have been focusing on working with 0.84 based builds > for deployment. Maybe, by the time a newer Sugar lands in a major deployment > most activities will have caught up ;) > > On a general note, for me the (automatic) NamingAlert at the end of a session > is still quite controversial, it always seems to manage to get in the way > right when I'm trying to focus on what I need next (a distraction rather than > helpful, by the time I hit Stop I already have a next task in mind, not the > already completed one I'm trying to get rid of). Most of the time I'm > stabbing at close widget, cussing under my breath. However I do understand > you found it useful in a teaching environment last year by specifically > instructing students to fill it out. If we allow the NamingAlert to be called > up when needed, will we still need to trigger it automatically at the end of > a session? The idea is to replace the automatic triggering with the on-demand access. Just how to invoke it. Integrating it into the toolbar had been the plan, but I am more and more convinced that on the Frame is the way to go. Let's see what others think. Meanwhile, I'll create a patch we can test the idea with. -walter > > Regards, > --Gary > >> >> -walter >> >> -- >> Walter Bender >> Sugar Labs >> http://www.sugarlabs.org >> >> >> >> -- >> Walter Bender >> Sugar Labs >> http://www.sugarlabs.org >> ___ >> IAEP -- It's An Education Project (not a laptop project!) >> i...@lists.sugarlabs.org >> http://lists.sugarlabs.org/listinfo/iaep > -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel