Commit graph

43 commits

Author SHA1 Message Date
Bastien Nocera
3ae9e15ebf background: Fix initial state when loading gradients
And fix saving as well, as we were saving from the item,
instead of the current_background, thus losing name, etc.
2011-02-14 19:49:27 +00:00
Bastien Nocera
558d6752f9 background: Add/Remove features for panel
Remove unused "backgrounds-liststore" object from .ui file, and
add remove button.

Make remove button sensitive for files that were copied to the cache,
and implement remove itself.

Remember needs_download when copying CcBackgroundItem objects.

Make "Add" button unsensitive in chooser when background was
already added to the list, to avoid duplicates.

Ellipsise background label.
2011-02-14 19:11:20 +00:00
Bastien Nocera
4809be2b3f background: Implement 'Add' button 2011-02-14 15:04:55 +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
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
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
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
2e9519a57f background: Remove unneeded include 2011-02-12 03:13:51 +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
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
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
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
ca14846ef9 background: Major rework of the CcBackgroundItem code
It now is a full GObject, will be able to track the original
XML file for a wallpaper, as well as which values are set in it.

This will allow us to restore wallpapers properly, and only offer
editing options when those aren't already hard-coded inside the
item.
2011-02-10 20:35:02 +00:00
Bastien Nocera
9a209fa181 background: Rename gnome-wp-item to cc-background-item 2011-02-10 20:35:02 +00:00
Bastien Nocera
7ca2a8a3e5 background: Use g_settings_delay() properly
g_settings_delay() doesn't work like GConf's changesets. Either
you create a separate GSettings for non-delayed application,
or you call g_settings_apply() any time you want changes applied.
2010-12-16 19:38:31 +00:00
Bastien Nocera
30d878cfd5 background: Try to fix original state 2010-12-16 18:37:59 +00:00
Bastien Nocera
59f84a7088 background: Avoid the size changing when changing preview
The gnome_wp_item_update_size() code was working off old data.
We need to copy the height and width as well if we want it to
match the current background. The next call to _update_size()
will fill in ->size if it wasn't already set.
2010-12-16 18:37:59 +00:00
Bastien Nocera
2365e47228 background: Better handling of colours and gradients
Implement gradients, make sure that selecting one particular
gradient or solid colour doesn't overwrite the previous one.
2010-12-15 16:46:53 +00:00
Bastien Nocera
035126a970 background: Add emblem for slideshow previews
Though for some reason the icon ends up being tiny...
2010-12-14 20:29:33 +00:00
Bastien Nocera
f48054ccf1 background: Show wallpaper size on startup
When available. Remove the "px" from the size label.
2010-12-14 19:24:19 +00:00
Bastien Nocera
39f452afee background: Follow mockups
Add icon to represent slideshows, always show a name for the
currently set background on startup, show whether a background
is a slideshow, and its pixel size if available.
2010-12-14 18:27:11 +00:00
Bastien Nocera
adfe6ef8fc background: Fix broken preview
The style wasn't set properly on startup, and then incorrectly
applied to the preview because the numbering of the items in
the style-liststore doesn't match the GDesktopBackgroundStyle
enum 1-to-1.
2010-12-14 18:27:10 +00:00
William Jon McCann
7ecc6029cc [background] Don't use iter if you didn't get one 2010-11-01 19:07:03 -04:00
Rodrigo Moya
7cc99ddc87 background: Use g_settings_get/_set_enum for background options and shading 2010-10-14 13:30:29 +02:00
Rodrigo Moya
2b5a938d26 background: Port to GSettings 2010-10-14 13:01:31 +02:00
Cosimo Cecchi
6dfc24e3e6 Make flickr background setting not segfault. 2010-10-06 12:31:03 +02:00
William Jon McCann
533b044dc9 A couple more updates use the GTK3 drawing APIs 2010-10-02 17:45:40 -04:00
Kalev Lember
c55ec39f81 background: Come up with 'Wallpapers' selected and displayed
https://bugzilla.gnome.org/show_bug.cgi?id=630417
2010-09-29 12:29:30 +01:00
Bastien Nocera
e3bbc6eedb background: use symbolic name for columns
Rather than hard-code numbers.
2010-09-21 16:08:53 +01:00
Bastien Nocera
2db5695c9f background: remove unused variables 2010-09-20 18:00:19 +01:00
Thomas Wood
ce8cd97754 background: implement new UI design from Jakub Steiner 2010-08-25 19:18:05 +01:00
Thomas Wood
f41e3268df background: hide the placement options only when a background is selected
Only update the visibility of the placement options when a background is
selected, not when the source is selected.
2010-08-13 17:06:19 +01:00
Thomas Wood
93042f0835 background: prefix the cache filename to avoid conflicts 2010-08-13 17:06:19 +01:00
Thomas Wood
2b56a5ea0f background: fix various leaks
Fix various leaks found by valgrind.
2010-08-12 15:12:04 +01:00
Thomas Wood
1418445e13 background: ensure the panel object is still valid when file copy finishes
Take a reference on the panel object when the asynchronous copy is started
so that it is still valid in the callback when the panel is being
destroyed.
2010-08-12 15:12:04 +01:00
Thomas Wood
abdb42e9e2 background: derive background sources from a common source object
Add the BgSource object to define the common aspects of background sources
and make sure the existing sources inherit from it.
2010-08-10 17:01:15 +01:00
Thomas Wood
e721f417ad Add initial implementation of "background" panel
The background settings panel provides a way for users to change the
desktop background by selecting an image and/or colour.
2010-08-10 15:26:07 +01:00