Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate

#sugar-newbies, 2016-06-15

 « Previous day | Index | Today | Next day »     Channels | Search | Join

All times shown according to UTC.

Time Nick Message
07:47 inderpartap <inderpartap!~webchat@rev-18-85-44-69.sugarlabs.org> has joined #sugar-newbies
07:47 inderpartap icarito: ping
07:48 meeting: ping
07:48 meeting: ping
07:48 meeting pong
07:48 pong
07:48 inderpartap Hi
07:48 i am new to this
07:49 can you please help me
07:49 inderpartap has quit IRC
11:07 meeting <meeting!~sugaroid@rev-18-85-44-69.sugarlabs.org> has joined #sugar-newbies
13:57 iamutkarshtiwari <iamutkarshtiwari!~androirc@103.235.198.48> has joined #sugar-newbies
13:58 icarito hi
13:58 iamutkarshtiwari #startmeeting
13:58 meeting Meeting started Wed Jun 15 13:58:14 2016 UTC. The chair is iamutkarshtiwari. Information about MeetBot at http://wiki.debian.org/MeetBot.
13:58 Useful Commands: #action #agreed #help #info #idea #link #topic #endmeeting
13:58 icarito i've been away how are you?
13:58 iamutkarshtiwari icarito: hi
13:58 I am good.
13:58 How are you?
13:59 qwebirc113534 <qwebirc113534!67ebc630@gateway/web/freenode/ip.103.235.198.48> has joined #sugar-newbies
14:00 iamutkarshtiwari has quit IRC
14:01 iamutkarshtiwari <iamutkarshtiwari!~androirc@103.235.198.48> has joined #sugar-newbies
14:01 icarito thanks well
14:01 please send our regards to the team in nepal
14:01 we admire their dedication :-)
14:02 qwebirc113534 icarito: Surely will do.
14:02 They are very warm hearted and dedicated programmers.
14:03 icarito: We are close to wrapping up JSFiddler and Screenshot patch.
14:03 Will start with 'save as' from tomorrow.
14:04 icarito iamutkarshtiwari, we are in very different circumstances we are the volunteer support team
14:04 qwebirc113534 is now known as iamutkarsh
14:05 icarito i need to add your blog to the sugarlabs planet
14:05 iamutkarsh I'll be happy to see it there.
14:05 I'll keep updating it regularly with my progress.
14:06 I would be needing help with setting up XSCE server on my laptop.
14:06 for testing InfoSlicer and GetBooks activities.
14:08 icarito i see
14:08 for that you should first refer to schoolserver.org
14:08 if thats the address
14:09 you probably can use a virtual machine such as virtualbox
14:09 i've never done it
14:13 it would be ideal for me to know exactly what they mean when they say schoolserver
14:14 that is xsce server (centos based) with preselected/preconfigured services (?)
14:59 tony37 <tony37!~tony@194.152.247.2> has joined #sugar-newbies
15:01 iamutkarsh tony37, icarito: Hi
15:01 icarito: Sorry,  I went AFK
15:03 tony37 hello
15:03 iamutkarsh Hi
15:03 tony37 Give me a moment to get the XO working
15:03 topic is save as
15:04 iamutkarsh #jsfiddle
15:04 I tried including html5print inside Browse-package but I had a hard time with it
15:05 tony37 Your last email said it was working
15:05 iamutkarsh It was working. But including it manually inside the package breaks it.
15:05 tony37 This is a common problem with activities.
15:06 iamutkarsh Are we fine with "pip install html5print" ?
15:06 tony37 No - because this creates a dependency on Sugar. If you have it within the bundle. it is onlu loaded when the bundle is installed.
15:07 That said, Browse is a special case since it can be considered as an integral part of Sugar.
15:07 iamutkarsh I have been struggling  with it for a while..
15:07 https://pypi.python.org/pypi/html5print/
15:07 tony37 I understand your frustration
15:08 iamutkarsh Please try it ^ see if you can find away to use it inside the bundle. I'll try it myself too.
15:08 tony37 Am I correct in assuming that beautifulsoup prettify doesn't handle css
15:08 iamutkarsh a way*
15:08 yes.
15:08 tony37 so the need for html5print
15:08 iamutkarsh Html5Print is way better than beautifulsoup
15:09 it can -
15:09 tony37 OK, but if you use pip, this needs to be done on the first launch of the Browse activity. Can you check to see if it is installed on subsequent Browse
15:09 launches.
15:10 iamutkarsh That's what I thought of. Is it possible to do such a thing with activities?
15:10 allowing installation of dependencies on first run?
15:10 tony37 Yes, you would need a check in Browse to see if html5print is installed, if not then install it
15:11 iamutkarsh or better yet I will find a way to include html5print in the bundle.
15:11 icarito hi - if it has a compiled part it will be an issue
15:11 tony37 With python, it is compiled as needed so shouldn't be a problem
15:11 iamutkarsh icarito: What will be an issue?
15:12 icarito some external python modules have parts in C
15:12 tony37 I don't think this one does. If so, that is a big problem since we have two different processor architectures
15:13 icarito pip installing html5print
15:13 iamutkarsh icarito: html5print doesn't seem to have any parts written in C I guess..
15:13 icarito but it has a dependency on  slimit-0.8.1 tinycss2-0.5 webencodings-0.5
15:13 none have parts in C it seems
15:14 just a lot of stuff
15:14 iamutkarsh icarito: I think it's included in the package?
15:14 https://pypi.python.org/packag[…]154d1d2198905c731
15:14 try extracting it ^
15:15 icarito yes no they are not included
15:15 except as requirements.txt
15:15 beautifulsoup4>=4.3.2
15:15 chardet>=2.2.1
15:15 html5lib>=0.999
15:15 requests>=2.3.5
15:15 slimit>=0.8.1
15:15 tinycss2>=0.4
15:15 ply==3.4
15:16 iamutkarsh icarito: What would you suggest then?
15:16 tony37 Are you saying that html5print depends on beautifulsoup
15:16 iamutkarsh Yes it depends.
15:16 It's an advanced version of BS4
15:17 tony37 One option is to prettify css with your own code and use beautifulsoup 3 for the html and javascript
15:17 icarito so you'd have to include those in the bundle including beautifulsoup unless tony has another idea
15:17 tony37, or we could make this feature depend on having those libraries installed
15:18 iamutkarsh I think it would be easier to let Browse installl the dependecies itself on first run?
15:18 icarito install procedure would either include pip install process or come bundled with images
15:18 tony37 I prefer to minimize dependencies - beautifulsoup is included in the image but the other packages would have to be in the bundle
15:18 icarito iamutkarsh, usually browse doesn't run with privileges
15:19 iamutkarsh tony37, icarito: I'll try to find a way by tomorrow to get it done.
15:19 tony37 Agreed, and this is an issue because a script in Browse cannot install with root privileges
15:19 icarito i'm not sure something like sudo is included on standard images sometimes they may even come without root
15:19 tony37 The problem is that sudo must be invoked by a tty
15:20 iamutkarsh tony37: What's 'tty' ?
15:20 tony37 A
15:20 icarito there exists gksudo or gsudo but they'd have to be already installed
15:20 tony37 An interactive window
15:20 As far as I know they are not
15:21 iamutkarsh #SaveAs
15:21 tony37 Yes!
15:21 icarito so it's unrealistic to merge into browse a sudo mechanism if it's not already installed - lets just have the feature grey unless libraries are found.
15:21 tony37 Look at activity.py in /usr/lib/python2.7/site-packages/sugar
15:22 iamutkarsh I already researched through it a bit.
15:22 tony37 icarito - this is a security protection designed not to be defeated
15:23 iamutkarsh - activity.py is in activity in the above path
15:23 iamutkarsh Are you sure that each and every activity on sugar that runs uses the copy of 'acitvity.py' presend inside /sugar3/activity/activity.py
15:23 ?
15:23 present*
15:24 tony37 No - there are actually 2 versions - one for GTK and one for GTK3
15:25 One is /sugar and the other /sugar3
15:25 iamutkarsh I tried running an alert on close (for testing purpose) , some activiteis responded to it, and some didn't
15:25 oh..I guess I made changes to only sugar3/acitivity.py not sugar/acitivity.py
15:25 tony37 One step at a time. The problem I want to show you is at about line 321
15:26 The line with 'if handle.objectid'
15:27 iamutkarsh tony37: Are we talking about GTK based activity.py ?
15:27 tony37 Do you see it?
15:27 Yes, but the sugar3 is similar
15:27 iamutkarsh yes I see it.
15:28 tony37 Ok, the problem is that this code is executed when an activity is resumed but it uses the handle as the jobject for the instance
15:28 At about line 351, the code for a new start is shown.
15:29 iamutkarsh "pservice = presenceservice.get_instance()"
15:29 ?
15:29 tony37 If handle.object_id is None and create_jobject
15:30 iamutkarsh That's on link 337 in my acitivity.py ( I am refering to sugar/activity.py)
15:30 line*
15:31 tony37 OK The point is that if it is a new start, a new journal object is created. If it is a resume, the existing object is used.
15:31 I don't suppose we refer to bugs anymore, this is an issue.
15:32 iamutkarsh tony37: How do you want me to handle this?
15:33 tony37 With care. The problem is that when an object is resumed, a new object needs to be created with a copy of the metadata and file from the original.
15:33 This means that the object has a different handle than the original.
15:34 Which means when you 'save as', you can overwrite the original if the title is the same or write a new object if the title is changed.
15:35 iamutkarsh Oh..I get it.
15:35 tony37 For coding simplicity, rather than overwrite, I would save the new object and delete the original. The alternative is to write the new object and leave the original.
15:35 icarito this needs to be done both in gtk2 and gtk3 right tony? will sugar labs accept new features in gtk2 toolkit?
15:36 tony37 Everything needs to be done in both.
15:36 iamutkarsh You don't want to modify the previous instance. It's like- "pass by value" instead of "pass by reference" ?
15:36 icarito +1 gtk2 still needs support
15:37 tony37 Exactly. My example would be to launch Paint and draw an X. Save it as X. Then resume X and draw an O. When you quit, try to resume the X version.
15:38 In 0.106 this is not possible because the save overwrites the X version, even if you change the title.
15:38 iamutkarsh So if user save the resumed object with a new name, the previous instance should still persist in the Journal?
15:39 tony37 No the new version would persist and the original would be lost
15:39 In any other desktop, if I change the name of a document via save as, both versions would be saved
15:40 iamutkarsh We should give the user a choice to choose between "overwrite' or 'save with the new name'
15:41 tony37 Yes, that is the purpose of the alert. Give the user a change to change the title and save or leave the title and save (overwriting).
15:41 iamutkarsh I'll try to implement the exact behaviour as to what happens when we close a document editor (like libreoffice or msword).
15:42 tony37 Exactly - the difference is that in Sugar, the user does not have to identify a location for the save. It goes to the Journal.
15:42 iamutkarsh For the GUI, do you prefer alert( similar to the one that appears on closing fiddler) or the popup dialog(like the one in screenshot) ?
15:42 tony37 The other important area is 'def self.complete_close
15:43 It must be the 'standard' as you used in screenshot.
15:44 iamutkarsh But I personally feel 'alert' would be better.
15:44 tony37 I like the one for 'save' in fiddler, but apparently Sam Parkinson has dictated that we must use his popup window standard
15:45 iamutkarsh tony37: Haha :D
15:45 tony37: As I used his popup module, it seems to add a bug in my screenshot module.
15:46 tony37 An important goal for the human interface in Sugar is to use the same UX as far as possible to enable learners to predict how to use the interface
15:46 iamutkarsh https://github.com/sugarlabs/s[…]comment-226126947
15:46 I agree with that.
15:47 tony37 As I said earlier, I think you should use your code for the save dialog and let the other become part of the PR by the request of the development team.
15:47 Using new code is problematic. We should wait until it stabilizes.
15:47 iamutkarsh But facing a popup everytime a user closes an activity would seem irritating (because of which Mr. Bender's module was pulled out previously) ?
15:48 tony37 No! First of all, there is an activity menu in the standard toolbar. If the user supplies a title there, no 'save as' popup is needed since
15:48 the user has supplied a 'title-supplied-by-user'.
15:49 Second, the problem with Walter's popup is that it required a description for each file saved. This was overkill and didn't address the save as isssue at all
15:49 iamutkarsh oh..
15:50 tony37 Certainly, this feature is no more irritating that the same dialog in other desktops.
15:50 iamutkarsh I agree.
15:50 tony37 If a user attempts to save a document with the name 'untitled', the software will ask for a new name.
15:51 In our case, we give it the name 'Write.activity' or 'Paint.activity'
15:52 iamutkarsh "The other important area is 'def self.complete_close" you were telling something about it? sorry for interrupting at that time
15:53 tony37 That is where activity.py 'closes' the activity, so this is where the 'save as' dialog is needed. Somehow you need to keep track of the original title - supplied by user or not.
15:53 If the title is changed, a 'new' object needs to be saved with that title. If it is not changed. then you need to present the save as dialog.
15:55 iamutkarsh Okay..
15:55 tony37 You will need to do it before the 'self.destroy'.
15:55 iamutkarsh I am now understanding the whole senario here.
15:56 tony37 I haven't looked in detail, you may need to do it before then when the 'write_file' is executed since that is the mechanism for saving the object.
15:56 iamutkarsh tony37: Mr. Bender was once told me that activity.py registers the acitivties in the Journal at the start of the instance.
15:57 I mean as soon as the activity starts, it gets registered in the Journal. So we might need to delete that specific object if we don't want to save.
15:58 tony37 Look at the code at lines 321 and 351 to see how this is done. When you create a new object - that is registering it. This is why we need to register a new object so we have the option to keep the new one and optionally delete the original.
15:58 I think the easiest way is to always write a new object and then depending on the situation delete the original object.
15:59 Oops, I need to run. I am looking forward to the new version of Browse. We can meet at this time tomorrow if you wish. Send me an email.
16:00 tony37 has quit IRC
16:24 iamutkarshtiwari has quit IRC
16:24 iamutkarshtiwari <iamutkarshtiwari!~androirc@103.235.198.48> has joined #sugar-newbies
16:25 iamutkarshtiwari <iamutkarshtiwari!~androirc@103.235.198.48> has joined #sugar-newbies
17:42 iamutkarshtiwari has quit IRC
18:31 iamutkarsh has quit IRC
19:34 iamutkarshtiwari <iamutkarshtiwari!~androirc@103.235.198.48> has joined #sugar-newbies
19:41 iamutkarshtiwari has quit IRC

 « Previous day | Index | Today | Next day »     Channels | Search | Join

Powered by ilbot/Modified.
Webmaster