[Sugar-devel] [PATCH] add restart option configurable via gconf (#1206)

Tomeu Vizoso tomeu at sugarlabs.org
Wed Oct 13 04:34:17 EDT 2010


On Tue, Oct 12, 2010 at 03:13, James Cameron <quozl at laptop.org> wrote:
> Nepal requested reordering and removal of restart, which was patched for
> them in 0.82 and implemented in 0.84.
>
> Paraguay and Uruguay detected the change in 0.84 and requested the
> restart option be restored.
>
> This patch restores the restart option as a configurable option, using
> the gconf key /desktop/sugar/show_restart, default true.
>
> Refer to http://bugs.sugarlabs.org/ticket/1206 for discussion.

Acked-by: Tomeu Vizoso <tomeu.vizoso at collabora.co.uk>

But we cannot push it yet to master because we haven't branched yet.

We need someone to create the 0.90 branches in Pootle before we can
branch in git.

Regards,

Tomeu

> ---
>  data/sugar.schemas.in        |   12 ++++++++++++
>  src/jarabe/view/buddymenu.py |    6 ++++++
>  2 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/data/sugar.schemas.in b/data/sugar.schemas.in
> index cfa7edf..474753b 100644
> --- a/data/sugar.schemas.in
> +++ b/data/sugar.schemas.in
> @@ -192,6 +192,18 @@
>     </schema>
>
>     <schema>
> +      <key>/schemas/desktop/sugar/show_restart</key>
> +      <applyto>/desktop/sugar/show_restart</applyto>
> +      <owner>sugar</owner>
> +      <type>bool</type>
> +      <default>true</default>
> +      <locale name="C">
> +        <short>Show Restart</short>
> +        <long>If TRUE, Sugar will show a "Restart" option.</long>
> +      </locale>
> +    </schema>
> +
> +    <schema>
>       <key>/schemas/desktop/sugar/peripherals/keyboard/layouts</key>
>       <applyto>/desktop/sugar/peripherals/keyboard/layouts</applyto>
>       <owner>sugar</owner>
> diff --git a/src/jarabe/view/buddymenu.py b/src/jarabe/view/buddymenu.py
> index 0ba6cc1..8ea2598 100644
> --- a/src/jarabe/view/buddymenu.py
> +++ b/src/jarabe/view/buddymenu.py
> @@ -86,6 +86,12 @@ class BuddyMenu(Palette):
>
>         client = gconf.client_get_default()
>
> +        if client.get_bool('/desktop/sugar/show_restart'):
> +            item = MenuItem(_('Restart'), 'system-restart')
> +            item.connect('activate', self.__reboot_activate_cb)
> +            self.menu.append(item)
> +            item.show()
> +
>         if client.get_bool('/desktop/sugar/show_logout'):
>             item = MenuItem(_('Logout'), 'system-logout')
>             item.connect('activate', self.__logout_activate_cb)
> --
> 1.7.1
>
> --
> James Cameron
> http://quozl.linux.org.au/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list