[Sugar-devel] Need help with sugar-toolkit-gtk3

Utkarsh Tiwari iamutkarshtiwari at gmail.com
Mon Apr 4 16:56:42 EDT 2016


I did that. Even after disabling "datastore.write()" functions inside
activity.py ... the activity instance is stiil getting registered in
the Journal.

Thanks,
Utkarsh Tiwari

On 4/5/16, James Cameron <quozl at laptop.org> wrote:
> Try this?
>
> When the shell (aka home view) starts a new instance of an activity,
> it calls the Activity.__init__() method, which calls
> _initialize_journal_object() method, which calls datastore.create(),
> followed by datastore.write().
>
> On Mon, Apr 04, 2016 at 05:08:10PM +0530, Utkarsh Tiwari wrote:
>> Hi,
>>    Whenever we start an activity from homeview, it gets registered in
>> the Journal (through datastore.write()).
>>
>>  I have inspected the activity.py file but there is someplace else
>> besides activity.py where the datastore is being modified(activity
>> instance is being added). I need to figure this out to implement the
>> "Save As" feature to intervene the datastore.write() call so that user
>> could provide the activity name. Could anyone please  point me in the
>> right direction?
>>
>> Thanks,
>> Utkarsh Tiwari
>>
>> On 3/22/16, Tony Anderson <tony_anderson at usa.net> wrote:
>> > Hi,
>> >
>> > I am not sure what you are asking. Read the excellent comment in
>> > activity.py. There are set_canvas, read_file, and write_file among
>> > other
>> > examples of functions in activity.py directly accessible by the
>> > sub-class. Normally, that activity is referenced by 'self'.
>> >
>> > Tony
>> >
>> > On 03/22/2016 12:02 AM, Utkarsh Tiwari wrote:
>> >> Hi,
>> >>
>> >> Is there any way to get the currently active
>> >> activity(sugar3.activity.activity -> class Activity()) instance ?
>> >>
>> >> I need this access to call a function of "Activity class" in
>> >> activity.py to activate a feature I have integrated.
>> >>
>> >> Thanks,
>> >> Utkarsh Tiwari
>> >> _______________________________________________
>> >> Sugar-devel mailing list
>> >> Sugar-devel at lists.sugarlabs.org
>> >> http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> > _______________________________________________
>> > Sugar-devel mailing list
>> > Sugar-devel at lists.sugarlabs.org
>> > http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
> --
> James Cameron
> http://quozl.netrek.org/
>


More information about the Sugar-devel mailing list