-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes issue- Fails with Ubuntu 18.04 #9
Conversation
Tested, I get this error.
|
@chimosky Tested the above error has gone. Review again. |
Getting this warning , but activity is running normally. |
Thanks. Reviewed.
Suggest stepping back and looking for why these changes were necessary, and therefore if there are other changes that will be required. Tested on Ubuntu 20.04;
Fixes #6. Evaluated the usefulness of the activity in changed circumstances, and created issue #11. |
cf10e9f
to
2d3d3c0
Compare
@quozl cf10e9f is wrong. The correct solution will be converting new to str as new is assigned to MMPERINCH in method
|
The activity is not yet ported to python 3. I should port it also. |
|
I've diagnosed the cause of the g_hash_table_destroy error. It is caused by calling GdkX11.X11Screen, which is no longer a supported method for finding the display resolution. Instead we now use GTK directly. For interest, the method I used was;
Then to verify the theory, I took the Hello World activity source code, and applied a similar change, see diff, and proved that the g_hash_table_destroy assertion begins to occur. |
Thanks. Reviewed. I've added two commits;
So this pull request seeks to change the data type for the custom_unit metadata. I'm worried about upgrade path. Here's the scenario; a child has been using the released version of Ruler, and so their Journal may contain objects associated with the activity containing floating point_ values for custom_unit, and here's where it will go wrong;
Choices are to either;
I'm worried this is a defect in Datastore that hasn't been resolved since we ported to Python 3. The Python 2 release of Datastore had no such problem, as shown by how Ruler was blithely placing floating point values in metadata. |
We need to carefully test the port to Python3 of Datastore. As shown by the activity, a careful testing is needed in Datastore.
This should be done according to me , We need to fix issues in datastore, in order to fix the issue of storing floating point values in metadata. |
Thanks. Your method of diagnosing looks great. I have checked for GdkX11.X11Screen, the class exists but it does not have methods like width() and height(). I guess it was creating problem. Tried to fix the issue in f0a0035 using Gdk.Screen class. |
Huh. Interesting. On my system an instance of the class certainly does have these methods, and they can be called, and give good results, apart from that apparently harmless error. Python's
Thanks. Yes, it does fix this error. |
@Saumya-Mishra9129 please avoid merge commits as it makes commit history a bit difficult to look at, you can do a rebase instead. Thanks. |
1717dc9
to
c4a9ea8
Compare
Thanks. I've reviewed 3870323 only. It is difficult to understand, and took me a while, because the commit message was so brief, and an unusual variable However, on testing I see a completely different effect. Here is c4a9ea8; note the cm and inch rulers extend beyond the display on either side. and here is 3870323; Keep in mind that the OLPC XO for which this activity was written had a display resolution of 1200x900 which could be rotated to 900x1200. |
@quozl Review and merge it.
Hoping 05cdcf4 will fix this . Yes I am trying this on 1024x768 pixel resolution but It will work on OLPC XO as well. |
Tested 05cdcf4 on a 1366x694 resolution and this was the result; the right hand side still extends beyond the display. |
Can we really fix the right side display?. According to me, we cannot, as custom ruler is of variable size, it is set 1 cm equals to 24.5 mm by default, and we can go to settings and modify it accordingly , so what is the need to fix it initially, if we can change it according to our need. |
Depends, we can fix it by limiting it to a particular length; also I see that the default is 25.4 mm or is that not the case? |
Thanks. Tested. Checked items above that I had observed.
|
Pr should fix #6 . I have tested with Ubuntu 18.04.
In utils.py,(line 107) PangoCairo.create_layout method takes cairo.Context as argument. As cairo.Context argument is already given by RulerActivity.py in line 75. So there is no need to create context again in util.py(line 103).
@quozl Please review.
Fixes #10.