Bastien Nocera
a1dd22ea17
background: Add/Remove features in pictures source
...
Remember added files, so they cannot be added twice to the pictures
store (using UUID of the URI as key).
Implement removing items from the list.
Fix memory leaks.
2011-02-14 19:11:20 +00:00
Bastien Nocera
db0b5b1195
background: Use objects for CcBackgroundItem storage
...
So that we don't need to unref the items in the list store by hand.
2011-02-14 19:11:20 +00:00
Bastien Nocera
7aca4e1ab2
background: Add support for source-url in XML
2011-02-14 19:11:20 +00:00
Bastien Nocera
f77d23f35a
background: Add "needs-download" property
...
Rather than relying on source-url being NULL, which would mean
we can't then save it.
2011-02-14 19:11:20 +00:00
Bastien Nocera
5ca5367018
background: Remove files that don't exist
...
If an xml file references a wallpaper that doesn't exist
(as seen by installing the desktop-backgrounds-basic package
on Fedora), then just don't add it to the list of wallpapers.
Reported by Matthias Clasen
2011-02-14 15:11:17 +00:00
Bastien Nocera
4809be2b3f
background: Implement 'Add' button
2011-02-14 15:04:55 +00:00
Matthias Clasen
81ae3f4466
background: Avoid resizing the drawing area if controls are hidden
2011-02-14 09:31:38 -05:00
Bastien Nocera
bad4e389ef
background: Avoid warning when XML file doesn't exist
2011-02-14 14:28:46 +00:00
Bastien Nocera
8eace42d8a
background: Update preview correctly for custom bgs
...
When we're creating our new item for custom wallpapers, make
sure that we update the ->current_background, otherwise we'll
still be displaying the previous configuration.
2011-02-14 13:26:40 +00:00
Bastien Nocera
8bca545902
background: Fix errors when saving current wp
...
As report by Matthias Clasen
2011-02-14 13:26:39 +00:00
Bastien Nocera
78e16e52f4
background: Add first pass at "add" button
...
With a hard-coded filename for now.
2011-02-14 13:26:39 +00:00
Bastien Nocera
e6cb9f5b12
background: Add ability to add a single file
...
To the pictures backend.
2011-02-14 13:26:39 +00:00
Bastien Nocera
c32b0da4e4
background: Only accept URIs when creating items
2011-02-14 13:26:39 +00:00
Bastien Nocera
715474fb30
background: Update comment
2011-02-14 13:26:39 +00:00
Bastien Nocera
1933bfdf17
background: Use correct cache directory
2011-02-14 13:26:39 +00:00
Bastien Nocera
2866a70f6a
background: Don't show an error if no cache dir
...
We don't want to see errors if the directory doesn't exist.
2011-02-14 13:26:39 +00:00
Bastien Nocera
9ac7a0aa32
background: Remove code for impossible situation
...
We can never have placement be "none" as we create new items
with "scaled" by default. So just set "zoom" all the time.
2011-02-14 13:26:39 +00:00
Bastien Nocera
87f05ef0ed
background: Also look for items in ~/.cache
...
We'll be saving items in ~/.cache/gnome-control-center/backgrounds
for the Flickr and manual additions of items, so look there as well.
2011-02-14 13:26:39 +00:00
Bastien Nocera
575d8d2463
background: Add "add" button
...
To allow adding arbitrary files to the list.
2011-02-14 13:26:39 +00:00
Bastien Nocera
fbe3926ed3
background: Try our hardest to remember the last bg
...
Save the current background as XML, and try to load it back up
when starting. If the saved background pretty much matches what we
have in GSettings, then it's the same item, and we try and remember
all the metadata, including the name.
https://bugzilla.gnome.org/show_bug.cgi?id=630417
2011-02-14 09:44:05 +00:00
Bastien Nocera
ecdcb2c235
background: Implement saving a single item
2011-02-14 09:44:05 +00:00
Bastien Nocera
329aabf0b1
background: Set the shading for pictures
2011-02-14 09:44:05 +00:00
Bastien Nocera
2a146db805
background: Handle no-flags from saved config
2011-02-14 09:44:05 +00:00
Bastien Nocera
5517949b4e
background: Treat empty URI as NULL
...
So that comparisons are easier.
2011-02-14 09:44:05 +00:00
Bastien Nocera
758242bb8e
background: Add function to compare 2 bg items
2011-02-14 09:44:05 +00:00
Bastien Nocera
66ee58bf52
background: Add function to load a single XML file
...
And its item out of it. So that we can load a file on startup
and check whether it corresponds to our configuration.
2011-02-14 09:44:05 +00:00
Bastien Nocera
7448e7698e
background: Add more info to _dump() function
...
Also print out the placement and shading of the background.
2011-02-14 09:44:05 +00:00
Bastien Nocera
d3eb413b24
background: Move settings loading
...
Into a separate function, so that we can extend it.
2011-02-14 09:44:05 +00:00
Bastien Nocera
ee62ca5e9b
background: Add note about saving location
...
To the unused XML save code.
2011-02-12 03:17:02 +00:00
Bastien Nocera
e5fb92268f
background: Show 'Adwaita' as the first in the list
...
https://bugzilla.gnome.org/show_bug.cgi?id=637384
2011-02-12 03:14:00 +00:00
Bastien Nocera
c4baa04942
background: Add ability to parse single XML file
...
To load a particular file by hand.
2011-02-12 03:13:59 +00:00
Bastien Nocera
265e10af1a
background: Remove unused variable
2011-02-12 03:13:58 +00:00
Bastien Nocera
ce4f4d5627
background: Make loading wallpapers seem faster
...
As the UI actually updates as the files are loaded.
2011-02-12 03:13:56 +00:00
Bastien Nocera
c2e84e2c8a
background: Add "added" signal to CcBackgroundXml
...
So that the front-end can load the wallpapers piece-meal, and
avoid overloading the UI on startup.
2011-02-12 03:13:55 +00:00
Bastien Nocera
415d4c1111
background: GnomeWpXml to CcBackgroundXml
...
and into a GObject.
2011-02-12 03:13:53 +00:00
Bastien Nocera
2e9519a57f
background: Remove unneeded include
2011-02-12 03:13:51 +00:00
Bastien Nocera
c016e5cea2
background: Remove the "changed" signal
...
It wasn't used anyway.
2011-02-12 03:13:50 +00:00
Bastien Nocera
555bf47f51
background: Load bg data when selected
...
And only when selected. There's no point in loading it straight
away, as we have more than enough metadata to display it in the
icon view, and we'll need to load up the data when we display
it anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=641414
2011-02-11 19:01:20 +00:00
Bastien Nocera
2e8faa10f0
background: Don't warn when trying to load a gradient
2011-02-11 18:52:38 +00:00
Bastien Nocera
2735c788b4
background: Use URIs everywhere internally
...
Now we'd just need gnome-bg to make the jump.
This also fixes unique IDs for the wallpapers source, as
multiple backgrounds can be defined in a single XML file.
2011-02-11 18:11:11 +00:00
Bastien Nocera
eda2f27c51
background: Remove unused settings struct member
2011-02-11 18:04:05 +00:00
Bastien Nocera
eb5b455097
background: Remove some unneeded allocations
2011-02-11 16:22:54 +00:00
Bastien Nocera
7f9f1cabe0
background: Remove debug
2011-02-11 16:16:13 +00:00
Bastien Nocera
6b4f95e9d1
background: Copy to set the new background
...
Instead of reusing the item from the list store, otherwise we
might be tweaking properties for an item that we shouldn't,
and leaking user preferences into the "static" list store.
2011-02-11 12:48:48 +00:00
Bastien Nocera
85b2cad706
background: Add function to copy a background item
2011-02-11 12:48:28 +00:00
Bastien Nocera
9b55bb20e3
background: Load initial state from GSettings
...
gnome_wp_item_update() used to do that for us.
2011-02-11 12:39:51 +00:00
Bastien Nocera
4bd51634a0
background: Make update_size() work in _load()
...
If we never got an initial frame, it wouldn't work too well.
2011-02-11 12:38:46 +00:00
Bastien Nocera
ba72b7ab18
background: Remove read-only source property
...
And squash together the code to setup the editing widgets.
2011-02-11 12:24:48 +00:00
Bastien Nocera
15a5849384
background: Use the item flags
...
When setting a new background. That ensures that we don't lose
existing settings when the background item doesn't provide one
(for example, setting the background colour when setting a picture
item).
2011-02-11 03:51:38 +00:00
Bastien Nocera
9e3903a828
background: Set the flags for the pictures source
2011-02-11 03:49:49 +00:00