[Sugar-devel] [PATCH] FEATURE REQUEST : Write_to_journal_anytime

Walter Bender walter.bender at gmail.com
Tue Nov 30 01:09:36 EST 2010


I haven't done a thorough review of your patch yet, but the problem
with the approach is that it adds another button to the toolbar. This
may cause the toolbar of some activities to be overloaded. There is a
tentative plan to remove the Keep Button, in which case we may be OK.
There is also a sketch which uses a text box on a submenu instead of
opening the non-model dialog. Another approach is to use the button to
simply jump directly into the Journal detail view. We'll try to get
more design team feed back to you ASAP.

regards.

-walter

On Tue, Nov 30, 2010 at 12:49 AM,  <anubhav at seeta.in> wrote:
> From: Anubhav Aggarwal <anubhav at seeta.in>
>
> Now an icon is added in the palletes which calls a popup to enter the name
> decscription and tags , this popup earlier came only at the closing of the
> activity (http://wiki.sugarlabs.org/go/Features/Write_to_journal_anytime)
> ---
>  src/sugar/activity/activity.py    |    7 +++++++
>  src/sugar/activity/namingalert.py |    7 ++++++-
>  2 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
> index 0bda2ea..1267ed2 100644
> --- a/src/sugar/activity/activity.py
> +++ b/src/sugar/activity/activity.py
> @@ -359,6 +359,12 @@ class Activity(Window, gtk.Container):
>
>         return jobject
>
> +    def call_name_alert(self):
> +        title_alert = NamingAlert(self, get_bundle_path())
> +        title_alert.set_activity_status(status=True)
> +        title_alert.set_transient_for(self.get_toplevel())
> +        title_alert.show()
> +
>     def _set_up_sharing(self, mesh_instance, share_scope):
>         # handle activity share/join
>         logging.debug("*** Act %s, mesh instance %r, scope %s",
> @@ -863,6 +869,7 @@ class Activity(Window, gtk.Container):
>                 self._complete_close()
>         else:
>             title_alert = NamingAlert(self, get_bundle_path())
> +            title_alert.set_activity_status(status = False)
>             title_alert.set_transient_for(self.get_toplevel())
>             title_alert.show()
>             self.reveal()
> diff --git a/src/sugar/activity/namingalert.py b/src/sugar/activity/namingalert.py
> index 72db8dc..6531500 100644
> --- a/src/sugar/activity/namingalert.py
> +++ b/src/sugar/activity/namingalert.py
> @@ -168,6 +168,7 @@ class NamingAlert(gtk.Window):
>         self._description = None
>         self._tags = None
>
> +        self._activity_in_progress = False
>         accel_group = gtk.AccelGroup()
>         self.set_data('sugar-accel-group', accel_group)
>         self.add_accel_group(accel_group)
> @@ -207,6 +208,9 @@ class NamingAlert(gtk.Window):
>         widget = self._title.get_property('widget')
>         widget.grab_focus()
>
> +    def set_activity_status(self, status=False):
> +        self._activity_in_progress = status
> +
>     def _create_body(self):
>         body = hippo.CanvasBox()
>         body.props.orientation = hippo.ORIENTATION_VERTICAL
> @@ -351,5 +355,6 @@ class NamingAlert(gtk.Window):
>         self._activity.metadata['description'] = new_description
>
>         self._activity.metadata['title_set_by_user'] = '1'
> -        self._activity.close()
> +        if not self._activity_in_progress:
> +            self._activity.close()
>         self.destroy()
> --
> 1.7.0.4
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list