Skip to content
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

Load background images from journal #741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Load background images from journal #741

wants to merge 1 commit into from

Conversation

cvgarciarea
Copy link

GCI Task: https://codein.withgoogle.com/dashboard/task-instances/5616648155299840/

I used datastore.find for add images in the view from the journal, and when the user select a journal image, copy that to "/home/user/.sugar/background.[extension]".
Why? Because sugar remove all images journal directory when it's restarted, and aren't yet created when it is necessary to load them as a background, for that, I copy the selected image to the above mentioned address.

@i5o
Copy link
Contributor

i5o commented Dec 14, 2016

Tested and seems good to me; anyone else is welcome to discuss about it


from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GObject
from gi.repository import GdkPixbuf

from sugar3 import env
from sugar3 import mime
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sugar3.mime imported but not used.

@devAbnull
Copy link
Contributor

Tested. Looks good :)

@quozl
Copy link
Contributor

quozl commented Dec 14, 2016

Reviewed;

  • how is the file eventually deleted; some systems have very little disk space, and every file is important,
  • why did you avoid model.py? We have a Model-View design pattern yet your change is to View only,
  • in the commit message, please explain what the problem was and how the patch fixes it, (in particular because without a Google account the GCI task link does not work, and besides it won't be useful for future regression analysis; only the commit message is preserved in the git repository, we do not preserve pull request comments),
  • in the commit message, please explain how to test the patch; expected result vs previous result,

I'd like to see your commit message grow. Use the first line as summary, then press enter twice before going into detail.

@quozl
Copy link
Contributor

quozl commented Feb 20, 2017

A deleted comment received by e-mail quoted from the GCI task;

Load background from Journal in "Background" section of control panel

Add an option in background control panel section to let the user load a background (image) from journal, showing all images from Journal in the list is another possible way to do it.

Right now the only option is by copying the image to the Documents folder, and then setting it on the control panel.

This is a good basis for writing the commit message, though it would be conventional to describe the problem first, then the solution. See Making commits in the guide to contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants