Manually tracking which properties are set on a CcBackgroundItem is only
properly done in the background XML loader. Doing this manually is
error-prone and should instead be done inside the relevant property
setters. That would avoid forgetting to set some of the flags, which is
especially relevant for comparing two background items.
This adds automatic setting of background item flags to fix this.
To make the CcBackgroundPaintable fully reusable, it has to know the
desired thumbnail size and the thumbnail factory. We add a width and
height property, and modify the thumbnail retrieval of CcBackgroundItem
to use the scale factor now.
This also allows us to greatly simplify the background sources, so that
they now only do one thing: provide CcBackgroundItems from different
sources.
We keep the fixed thumbnail height and width for the chooser, which
makes more sense now that it is in the chooser code instead of the
background source code.
Undefine the value before overriding it to avoid the following warnings:
../panels/background/cc-background-chooser.c:22: warning: "G_LOG_DOMAIN" redefined
The BG_RECENT_SOURCE (user_data) call was done before it was checked if is was
cancelled. At this point user_data is pointing to an object that has been deleted.
Fixes#729
BgRecentSource is a background source implementation that
keeps track of recently added backgrounds.
The backgrounds are copied to $(local data dir)/backgrounds,
which is monitored. When copying files to this folder, the
current time is added as prefix to avoid filename collisions.