Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-07-08 Thread Gary Martin
On 8 Jul 2011, at 10:28, Daniel Drake  wrote:

> On 27 June 2011 12:27, Sascha Silbe  wrote:
>> This duplicates the existing functionality in the Control Panel for more
>> convenient access. Disabling wifi devices can save power, thereby increasing
>> battery life.
> 
> On XO-1 (and also currently on XO-1.5) we have the option of removing
> power from the wifi device when it is disabled. While this is clearly
> desirable, we don't have the code in place right now, but it will
> come.
> 
> So, this will cause the device to disppear and the frame will be
> updated accordingly. This means that you'd lose symmetry - you could
> disable the device from the frame, but then the icon would disappear
> and you wouldn't have the same way of enabling it again.
> 
> I know it is a rare case for a user to have multiple active wireless
> devices, but the way that you are linking a global wifi on-off switch
> to an individual wireless device lacks a bit of consistency in design
> (and is actually the cause of the above).

I have to agree with you, Sacha has quite a long list of network related UI 
design change preposals and this seemed like the least offensive one, but if, 
as you point out above, the frame icon will be removed when the device is 
really powered off (with some future patch), then I'd not want to see this 
extra menu item landed.

My original suggestion for covering the extra functionality that Sacha has been 
preposing was to work on a feature allowing a control panel module to be opened 
directly from else where in Sugar (the wireless device palette opening the 
networking module in this case), so that a user could quickly access the 
relevant cp module, in context, for more advanced tweaking. The new features 
can than be added to cp modules as needed. I believe this was originally 
preposed by Eben some time back to try and help keep the primary Sugar UI 
design as focused as possible and avoid feature creep/clutter.

Regards,
--Gary

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


Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-07-08 Thread Daniel Drake
On 27 June 2011 12:27, Sascha Silbe  wrote:
> This duplicates the existing functionality in the Control Panel for more
> convenient access. Disabling wifi devices can save power, thereby increasing
> battery life.

On XO-1 (and also currently on XO-1.5) we have the option of removing
power from the wifi device when it is disabled. While this is clearly
desirable, we don't have the code in place right now, but it will
come.

So, this will cause the device to disppear and the frame will be
updated accordingly. This means that you'd lose symmetry - you could
disable the device from the frame, but then the icon would disappear
and you wouldn't have the same way of enabling it again.

I know it is a rare case for a user to have multiple active wireless
devices, but the way that you are linking a global wifi on-off switch
to an individual wireless device lacks a bit of consistency in design
(and is actually the cause of the above).

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


Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-07-08 Thread Frederick Grose
On Thu, Jul 7, 2011 at 11:44 PM, Frederick Grose  wrote:
> On Mon, Jun 27, 2011 at 7:27 AM, Sascha Silbe  
> wrote:
>> This duplicates the existing functionality in the Control Panel for more
>> convenient access. Disabling wifi devices can save power, thereby increasing
>> battery life.
>>
>> Signed-off-by: Sascha Silbe 
>> ---
>>{...}
>>
>> We could also do with a better icon. Maybe something like the circles
>> from emblem-outofrange combined with the arrow from emblem-charging,
>> striking out the arrow depending on the current action (disable or enable
>> wifi)?
>
> Two potential icons for this purpose follow:
>
> (Adapted from the Fedora HighContrast network-wireless.svg)
>
> Enabling coloring of the icon would help to indicate the locality of the 
> action.
>
> I'm uncertain if the background handling is optimal for the black
> control palette.

Two more variations using the XO radio LED shape.
One set with broadcast and receive wavefront lines; the other with
broadcast wavefronts only.

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


Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-07-07 Thread Frederick Grose
On Mon, Jun 27, 2011 at 7:27 AM, Sascha Silbe  wrote:
> This duplicates the existing functionality in the Control Panel for more
> convenient access. Disabling wifi devices can save power, thereby increasing
> battery life.
>
> Signed-off-by: Sascha Silbe 
> ---
>{...}
>
> We could also do with a better icon. Maybe something like the circles
> from emblem-outofrange combined with the arrow from emblem-charging,
> striking out the arrow depending on the current action (disable or enable
> wifi)?

Two potential icons for this purpose follow:

(Adapted from the Fedora HighContrast network-wireless.svg)

Enabling coloring of the icon would help to indicate the locality of the action.

I'm uncertain if the background handling is optimal for the black
control palette.

http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
    
    
]>http://www.w3.org/2000/svg";
xmlns:cc="http://creativecommons.org/ns#";
xmlns:dc="http://purl.org/dc/elements/1.1/";
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
xmlns:svg="http://www.w3.org/2000/svg";>image/svg+xmlhttp://purl.org/dc/dcmitype/StillImage"/>




http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
    
    
]>http://www.w3.org/2000/svg";
xmlns:cc="http://creativecommons.org/ns#";
xmlns:svg="http://www.w3.org/2000/svg";>image/svg+xmlhttp://purl.org/dc/dcmitype/StillImage"/>



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


Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-06-27 Thread Gary Martin
On 27 Jun 2011, at 14:49, Walter Bender  wrote:

> On Mon, Jun 27, 2011 at 9:44 AM, Gary Martin  
> wrote:
>> Hi Sascha,
>> 
>> On 27 Jun 2011, at 12:27, Sascha Silbe  wrote:
>> 
>>> This duplicates the existing functionality in the Control Panel for more
>>> convenient access. Disabling wifi devices can save power, thereby increasing
>>> battery life.
>>> 
>>> Signed-off-by: Sascha Silbe 
>>> ---
>>> 
>>> This is fully working but I'm not sure about the correct way to change
>>> the label of a MenuItem. Accessing it via MenuItem.child seems hacky.
>>> Suggestions?
>>> 
>>> We could also do with a better icon. Maybe something like the circles
>>> from emblem-outofrange combined with the arrow from emblem-charging,
>>> striking out the arrow depending on the current action (disable or enable
>>> wifi)?
>> 
>> I'll have a think.
>> 
>>> Since the wiki is down I've uploaded the screenshot to the scratch area on 
>>> my
>>> own server [1,2].
>>> 
>>> [1] http://sascha.silbe.org/tmp/sugar-wifi-conn-disable.png
>>> [2] http://sascha.silbe.org/tmp/sugar-wifi-enable.png
>> 
>> Thanks for the screenshots. For the sugar-wifi-enable palette can we loose 
>> the empty section at the top, or perhaps if that's complicated we can place 
>> some descriptive text there so it doesn't look like a bug?
>> 
>> Would the text better read as "Enable my wireless radio" and "Disable my 
>> wireless radio"?
> 
> "Wireless radio" is a bit redundant, do you think? :)

Lol, how true! :)

I was trying to avoid 'devices' as it's a little technical, and not used 
elsewhere in sugar that I remember — so looked at the language used in the 
Networking module, 'Turn off the wireless radio to save battery life'... I'd 
like to claim I was a victim of group think :)

How about 'Enable my radio network' with 'Disable my radio network'?

Or 'Enable my wireless network' with 'Disable my wireless network'?

--Gary

> -walter
>> 
>> How does this interact with Mesh/Adhoc? I assume their icons will vanish 
>> from the neighbourhood as well, and their palettes will have the same 
>> enable/disable radio menu option?
>> 
>> Regards,
>> --Gary
>> 
>>> 
>>> extensions/deviceicon/network.py |   57 
>>> ++
>>> 1 files changed, 57 insertions(+), 0 deletions(-)
>>> 
>>> diff --git a/extensions/deviceicon/network.py 
>>> b/extensions/deviceicon/network.py
>>> index 9a74237..85ca884 100644
>>> --- a/extensions/deviceicon/network.py
>>> +++ b/extensions/deviceicon/network.py
>>> @@ -72,12 +72,15 @@ class WirelessPalette(Palette):
>>> __gsignals__ = {
>>> 'deactivate-connection': (gobject.SIGNAL_RUN_FIRST, 
>>> gobject.TYPE_NONE,
>>>   ([])),
>>> +'disable-wifi': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
>>> +'enable-wifi': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
>>> }
>>> 
>>> def __init__(self, primary_text):
>>> Palette.__init__(self, label=primary_text)
>>> 
>>> self._disconnect_item = None
>>> +self._enabled = True
>>> 
>>> self._channel_label = gtk.Label()
>>> self._channel_label.props.xalign = 0.0
>>> @@ -109,6 +112,13 @@ class WirelessPalette(Palette):
>>>   self.__disconnect_activate_cb)
>>> self.menu.append(self._disconnect_item)
>>> 
>>> +label = glib.markup_escape_text(_('Disable all wireless devices'))
>>> +self._powercontrol_item = MenuItem(label, 'system-shutdown')
>>> +self._powercontrol_item.connect('activate',
>>> +self.__powercontrol_activate_cb)
>>> +self._powercontrol_item.show()
>>> +self.menu.append(self._powercontrol_item)
>>> +
>>> def set_connecting(self):
>>> self.props.secondary_text = _('Connecting...')
>>> 
>>> @@ -132,9 +142,26 @@ class WirelessPalette(Palette):
>>> self._disconnect_item.hide()
>>> self.set_content(None)
>>> 
>>> +def set_enabled(self, enabled):
>>> +self._enabled = enabled
>>> +if enabled:
>>> +label = glib.markup_escape_text(_('Disable all wireless 
>>> devices'))
>>> +else:
>>> +self.set_disconnected()
>>> +label = glib.markup_escape_text(_('Enable wireless devices'))
>>> +
>>> +# FIXME: what's the right way to do this?
>>> +self._powercontrol_item.child.set_markup(label)
>>> +
>>> def __disconnect_activate_cb(self, menuitem):
>>> self.emit('deactivate-connection')
>>> 
>>> +def __powercontrol_activate_cb(self, menuitem):
>>> +if self._enabled:
>>> +self.emit('disable-wifi')
>>> +else:
>>> +self.emit('enable-wifi')
>>> +
>>> def _set_frequency(self, frequency):
>>> channel = network.frequency_to_channel(frequency)
>>> self._set_channel(channel)
>>> @@ -402,6 +429,8 @@ class WirelessDeviceView(ToolButton):
>>> self._palette = WirelessPalette

Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-06-27 Thread Walter Bender
On Mon, Jun 27, 2011 at 9:44 AM, Gary Martin  wrote:
> Hi Sascha,
>
> On 27 Jun 2011, at 12:27, Sascha Silbe  wrote:
>
>> This duplicates the existing functionality in the Control Panel for more
>> convenient access. Disabling wifi devices can save power, thereby increasing
>> battery life.
>>
>> Signed-off-by: Sascha Silbe 
>> ---
>>
>> This is fully working but I'm not sure about the correct way to change
>> the label of a MenuItem. Accessing it via MenuItem.child seems hacky.
>> Suggestions?
>>
>> We could also do with a better icon. Maybe something like the circles
>> from emblem-outofrange combined with the arrow from emblem-charging,
>> striking out the arrow depending on the current action (disable or enable
>> wifi)?
>
> I'll have a think.
>
>> Since the wiki is down I've uploaded the screenshot to the scratch area on my
>> own server [1,2].
>>
>> [1] http://sascha.silbe.org/tmp/sugar-wifi-conn-disable.png
>> [2] http://sascha.silbe.org/tmp/sugar-wifi-enable.png
>
> Thanks for the screenshots. For the sugar-wifi-enable palette can we loose 
> the empty section at the top, or perhaps if that's complicated we can place 
> some descriptive text there so it doesn't look like a bug?
>
> Would the text better read as "Enable my wireless radio" and "Disable my 
> wireless radio"?

"Wireless radio" is a bit redundant, do you think? :)

-walter
>
> How does this interact with Mesh/Adhoc? I assume their icons will vanish from 
> the neighbourhood as well, and their palettes will have the same 
> enable/disable radio menu option?
>
> Regards,
> --Gary
>
>>
>> extensions/deviceicon/network.py |   57 
>> ++
>> 1 files changed, 57 insertions(+), 0 deletions(-)
>>
>> diff --git a/extensions/deviceicon/network.py 
>> b/extensions/deviceicon/network.py
>> index 9a74237..85ca884 100644
>> --- a/extensions/deviceicon/network.py
>> +++ b/extensions/deviceicon/network.py
>> @@ -72,12 +72,15 @@ class WirelessPalette(Palette):
>>     __gsignals__ = {
>>         'deactivate-connection': (gobject.SIGNAL_RUN_FIRST, 
>> gobject.TYPE_NONE,
>>                                   ([])),
>> +        'disable-wifi': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
>> +        'enable-wifi': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
>>     }
>>
>>     def __init__(self, primary_text):
>>         Palette.__init__(self, label=primary_text)
>>
>>         self._disconnect_item = None
>> +        self._enabled = True
>>
>>         self._channel_label = gtk.Label()
>>         self._channel_label.props.xalign = 0.0
>> @@ -109,6 +112,13 @@ class WirelessPalette(Palette):
>>                                       self.__disconnect_activate_cb)
>>         self.menu.append(self._disconnect_item)
>>
>> +        label = glib.markup_escape_text(_('Disable all wireless devices'))
>> +        self._powercontrol_item = MenuItem(label, 'system-shutdown')
>> +        self._powercontrol_item.connect('activate',
>> +                                        self.__powercontrol_activate_cb)
>> +        self._powercontrol_item.show()
>> +        self.menu.append(self._powercontrol_item)
>> +
>>     def set_connecting(self):
>>         self.props.secondary_text = _('Connecting...')
>>
>> @@ -132,9 +142,26 @@ class WirelessPalette(Palette):
>>         self._disconnect_item.hide()
>>         self.set_content(None)
>>
>> +    def set_enabled(self, enabled):
>> +        self._enabled = enabled
>> +        if enabled:
>> +            label = glib.markup_escape_text(_('Disable all wireless 
>> devices'))
>> +        else:
>> +            self.set_disconnected()
>> +            label = glib.markup_escape_text(_('Enable wireless devices'))
>> +
>> +        # FIXME: what's the right way to do this?
>> +        self._powercontrol_item.child.set_markup(label)
>> +
>>     def __disconnect_activate_cb(self, menuitem):
>>         self.emit('deactivate-connection')
>>
>> +    def __powercontrol_activate_cb(self, menuitem):
>> +        if self._enabled:
>> +            self.emit('disable-wifi')
>> +        else:
>> +            self.emit('enable-wifi')
>> +
>>     def _set_frequency(self, frequency):
>>         channel = network.frequency_to_channel(frequency)
>>         self._set_channel(channel)
>> @@ -402,6 +429,8 @@ class WirelessDeviceView(ToolButton):
>>         self._palette = WirelessPalette(self._name)
>>         self._palette.connect('deactivate-connection',
>>                               self.__deactivate_connection_cb)
>> +        self._palette.connect('disable-wifi', self.__disable_wifi_cb)
>> +        self._palette.connect('enable-wifi', self.__enable_wifi_cb)
>>         self.set_palette(self._palette)
>>         self._palette.set_group_id('frame')
>>
>> @@ -420,6 +449,16 @@ class WirelessDeviceView(ToolButton):
>>                                       path=self._device.object_path,
>>                                       dbus_interface=_NM_DEVICE_IFACE)
>>
>> +        obj = self._bus.get_object(_NM_SERVICE, _NM

Re: [Sugar-devel] [DESIGN] [PATCH RFC sugar] Wireless network Frame device: add suport for disabling wireless devices

2011-06-27 Thread Gary Martin
Hi Sascha,

On 27 Jun 2011, at 12:27, Sascha Silbe  wrote:

> This duplicates the existing functionality in the Control Panel for more
> convenient access. Disabling wifi devices can save power, thereby increasing
> battery life.
> 
> Signed-off-by: Sascha Silbe 
> ---
> 
> This is fully working but I'm not sure about the correct way to change
> the label of a MenuItem. Accessing it via MenuItem.child seems hacky.
> Suggestions?
> 
> We could also do with a better icon. Maybe something like the circles
> from emblem-outofrange combined with the arrow from emblem-charging,
> striking out the arrow depending on the current action (disable or enable
> wifi)?

I'll have a think.

> Since the wiki is down I've uploaded the screenshot to the scratch area on my
> own server [1,2].
> 
> [1] http://sascha.silbe.org/tmp/sugar-wifi-conn-disable.png
> [2] http://sascha.silbe.org/tmp/sugar-wifi-enable.png

Thanks for the screenshots. For the sugar-wifi-enable palette can we loose the 
empty section at the top, or perhaps if that's complicated we can place some 
descriptive text there so it doesn't look like a bug?

Would the text better read as "Enable my wireless radio" and "Disable my 
wireless radio"? 

How does this interact with Mesh/Adhoc? I assume their icons will vanish from 
the neighbourhood as well, and their palettes will have the same enable/disable 
radio menu option?

Regards,
--Gary

> 
> extensions/deviceicon/network.py |   57 ++
> 1 files changed, 57 insertions(+), 0 deletions(-)
> 
> diff --git a/extensions/deviceicon/network.py 
> b/extensions/deviceicon/network.py
> index 9a74237..85ca884 100644
> --- a/extensions/deviceicon/network.py
> +++ b/extensions/deviceicon/network.py
> @@ -72,12 +72,15 @@ class WirelessPalette(Palette):
> __gsignals__ = {
> 'deactivate-connection': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
>   ([])),
> +'disable-wifi': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
> +'enable-wifi': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
> }
> 
> def __init__(self, primary_text):
> Palette.__init__(self, label=primary_text)
> 
> self._disconnect_item = None
> +self._enabled = True
> 
> self._channel_label = gtk.Label()
> self._channel_label.props.xalign = 0.0
> @@ -109,6 +112,13 @@ class WirelessPalette(Palette):
>   self.__disconnect_activate_cb)
> self.menu.append(self._disconnect_item)
> 
> +label = glib.markup_escape_text(_('Disable all wireless devices'))
> +self._powercontrol_item = MenuItem(label, 'system-shutdown')
> +self._powercontrol_item.connect('activate',
> +self.__powercontrol_activate_cb)
> +self._powercontrol_item.show()
> +self.menu.append(self._powercontrol_item)
> +
> def set_connecting(self):
> self.props.secondary_text = _('Connecting...')
> 
> @@ -132,9 +142,26 @@ class WirelessPalette(Palette):
> self._disconnect_item.hide()
> self.set_content(None)
> 
> +def set_enabled(self, enabled):
> +self._enabled = enabled
> +if enabled:
> +label = glib.markup_escape_text(_('Disable all wireless 
> devices'))
> +else:
> +self.set_disconnected()
> +label = glib.markup_escape_text(_('Enable wireless devices'))
> +
> +# FIXME: what's the right way to do this?
> +self._powercontrol_item.child.set_markup(label)
> +
> def __disconnect_activate_cb(self, menuitem):
> self.emit('deactivate-connection')
> 
> +def __powercontrol_activate_cb(self, menuitem):
> +if self._enabled:
> +self.emit('disable-wifi')
> +else:
> +self.emit('enable-wifi')
> +
> def _set_frequency(self, frequency):
> channel = network.frequency_to_channel(frequency)
> self._set_channel(channel)
> @@ -402,6 +429,8 @@ class WirelessDeviceView(ToolButton):
> self._palette = WirelessPalette(self._name)
> self._palette.connect('deactivate-connection',
>   self.__deactivate_connection_cb)
> +self._palette.connect('disable-wifi', self.__disable_wifi_cb)
> +self._palette.connect('enable-wifi', self.__enable_wifi_cb)
> self.set_palette(self._palette)
> self._palette.set_group_id('frame')
> 
> @@ -420,6 +449,16 @@ class WirelessDeviceView(ToolButton):
>   path=self._device.object_path,
>   dbus_interface=_NM_DEVICE_IFACE)
> 
> +obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
> +network_manager = dbus.Interface(obj, _NM_IFACE)
> +self._nm_props = dbus.Interface(network_manager, 
> dbus.PROPERTIES_IFACE)
> +self._nm_props.connect_to_signal('PropertiesChanged',
> +