Commit graph

62 commits

Author SHA1 Message Date
Debarshi Ray
b37165de9c background: Fix a few memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=757189
2015-10-27 17:32:50 +01:00
Debarshi Ray
c66c73d6ec background: Fix a few memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=757189
2015-10-27 14:38:38 +01:00
Bastien Nocera
57aab756e9 background: Fix possible crash when date isn't available
https://bugzilla.gnome.org/show_bug.cgi?id=736475
2014-10-23 11:32:34 +02:00
Bastien Nocera
c33e98d1c7 background: Fix semi-random placement style when selecting "Picture"
When selecting a background from the Pictures source, make sure that
the placement is reset from whatever it was set to before, otherwise
it will make use of the previous one, leading to tiled wallpapers if a
colour was selected before, for example.

https://bugzilla.gnome.org/show_bug.cgi?id=703057
2014-07-18 18:28:36 +02:00
Bastien Nocera
65d4ba163a background: Create a placeholder for manually added items
When adding things that might be screenshots, always create a
placeholder if the image was added manually.

https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-07-18 18:28:36 +02:00
Bastien Nocera
41be6eeace background: Copy all the manually added backgrounds
Except the ones already in the Pictures directory

https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-07-18 18:28:36 +02:00
Bastien Nocera
e8e3d5ff05 background: Ensure screenshots are removed from the list
Even the ones that weren't detected as PNG in the first place.
2014-07-18 18:28:36 +02:00
Bastien Nocera
cf26e6ca93 background: Make placeholder the same size as thumbnails
Otherwise they look tiny and compacted.

https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-07-18 18:28:36 +02:00
Bastien Nocera
c3fc12893a background: Split up creation of loading icon
https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-07-18 18:28:36 +02:00
Bastien Nocera
ccf7dc70d4 background: Re-add drag'n'drop support
Inside the chooser dialogue itself.

https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-07-18 18:28:36 +02:00
Debarshi Ray
7f606870a3 background: Composite the emblems ourselves
We were assuming that setting stock-size would affect the emblems in
GEmblemedIcons, but not the icons themselves. This is a bit weird.
GtkCellRendererPixbuf:gicon is meant to work with
GtkCellRendererPixbuf:stock-size, and this was only working so far
because GTK_ICON_LOOKUP_FORCE_SIZE was not being used when loading
the icon.

Let's composite the emblems ourselves so that we don't have to depend
on this quirky interpretation of stock-size.

Unfortunately, we can not directly use the pixbufs because they are
unaware of the scale factor and GTK+ will scale them on HiDpi
displays. Since our pixbufs already have enough pixels to work well
with such devices, scaling them further will lead to giant, fuzzy
thumbnails. Hence, we use GtkCellRendererPixbuf:surface with the
scale factor codified in it.

https://bugzilla.gnome.org/show_bug.cgi?id=732375
2014-07-16 17:42:18 +02:00
Debarshi Ray
a3247e73a4 background: Use higher resolution thumbnails on HiDpi displays
https://bugzilla.gnome.org/show_bug.cgi?id=731713
2014-06-17 18:50:28 +02:00
Debarshi Ray
9475b514bc background: Remove empty property getters and setters
https://bugzilla.gnome.org/show_bug.cgi?id=731713
2014-06-17 18:50:27 +02:00
Debarshi Ray
ea58777b82 background: Add support for Flickr pictures
Listen to CcBackgroundGriloMiner::media-found and them to
BgPicturesSource.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-18 11:15:22 +01:00
Debarshi Ray
24670aebb0 Revert "background: Add support for Flickr pictures"
This was never meant to be pushed.

This reverts commit 725b85db77.
2014-02-17 19:58:50 +01:00
Debarshi Ray
725b85db77 background: Add support for Flickr pictures
Listen to CcBackgroundGriloMiner::media-found and them to
BgPicturesSource.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-17 19:53:30 +01:00
Debarshi Ray
8758ed328b background: Remove redundant and unused parameter from add_single_file
There is no need to pass the source-uri as a parameter as we can get it
from the file itself. This would help in using the same code paths for
local and remote pictures.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-13 15:27:27 +01:00
Debarshi Ray
91e56738b7 background: Minor clean up
https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-13 14:03:08 +01:00
Debarshi Ray
8ef67d6be0 background: Guard against XDG_PICTURES_DIR not being defined
https://bugzilla.gnome.org/show_bug.cgi?id=709771
2014-02-13 12:37:58 +01:00
Debarshi Ray
57c83a1d59 background: Add a placeholder icon before creating thumbnails
We do not wait until the first thumbnail is created to start filling up
the store. This avoids the "No Pictures Found" message from showing up
on slow machines were I/O and decoding the data may take a while.

However, placeholders are not shown for PNGs since they might be
screenshots.

https://bugzilla.gnome.org/show_bug.cgi?id=708943
2014-02-03 15:56:27 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Debarshi Ray
2e0687c0d3 background: Add JPEG 2000 to the list of valid content types
https://bugzilla.gnome.org/show_bug.cgi?id=722599
2014-01-20 15:01:47 +01:00
Debarshi Ray
04ef265fa0 background: Add PNM to the list of valid content types
https://bugzilla.gnome.org/show_bug.cgi?id=722599
2014-01-20 14:43:05 +01:00
Debarshi Ray
50269ab1d9 background: Fix a memory leak when add_single_file failed
https://bugzilla.gnome.org/show_bug.cgi?id=708942
2013-11-20 14:08:21 +01:00
Debarshi Ray
c852ece88a background: Consolidate exit path
https://bugzilla.gnome.org/show_bug.cgi?id=708942
2013-11-18 15:55:48 +01:00
Debarshi Ray
3ec49452a1 background: Consolidate exit path
https://bugzilla.gnome.org/show_bug.cgi?id=708942
2013-11-14 15:37:03 +01:00
Debarshi Ray
f06a349a2a Use a consistent set of permissions when creating directories
https://bugzilla.gnome.org/show_bug.cgi?id=709417
2013-10-04 12:10:14 +02:00
Debarshi Ray
9ce45bfd3f background: Be robust against missing directories, and warn otherwise
We want to track the busy state of the source. To do that we will keep
a count of the number of pending operations. Not having a check for
NOT_FOUND makes it slightly easier to do that. Not a big deal, but I
think it outweighs the downfall of showing an extra warning.

Plus we are trying to create the directories before using them, so the
warning means something fishy has been going on with your system.

https://bugzilla.gnome.org/show_bug.cgi?id=708943
2013-10-04 11:52:29 +02:00
Bastien Nocera
ed589cd5b8 background: Fix memory leak in Pictures source
The enumerator was never unref'ed.

https://bugzilla.gnome.org/show_bug.cgi?id=709243
2013-10-02 18:21:18 +02:00
Bastien Nocera
3942035180 background: Fix memory leak in the picture sources
The list store was taking a reference to the background item,
so we need to unref it on our side to avoid leaking it.

https://bugzilla.gnome.org/show_bug.cgi?id=709243
2013-10-02 18:21:18 +02:00
Bastien Nocera
00d8f80586 background: Use g_clear_* helpers when possible
https://bugzilla.gnome.org/show_bug.cgi?id=707602
2013-09-09 16:24:37 +02:00
Bastien Nocera
f9c0732a6c background: Fix handling of cancellation in async calls
A few of the async calls were still handling the user_data before
checking that it was still valid (eg. the operation was not cancelled),
and also printing warnings when the error was a cancellation.
2013-03-26 15:43:39 +01:00
Michael Wood
ce409d4542 background: Monitor the Pictures and cache directory for new files
Monitor the pictures directory and cache directory for any new files
added or removed. Re-purposes the add/remove api that was no longer used.

https://bugzilla.gnome.org/show_bug.cgi?id=693329
2013-03-01 11:13:19 +00:00
Michael Wood
09baf812ea background: Offload the sorting of the initial list of files
Sorting after the image scale for each image causes the list to change
as you're viewing it depending on the size of the image.
This can be quite jarring visually.

https://bugzilla.gnome.org/show_bug.cgi?id=691800
2013-03-01 11:13:00 +00:00
Michael Wood
c3446cccdc background: Sort Pictures in order of most recently modified
In the picture browser you see the most recently modified pictures
first.

https://bugzilla.gnome.org/show_bug.cgi?id=691800
2013-01-31 11:46:07 +01:00
William Jon McCann
79ec684fa4 background: New background panel design
Implement a new design for the wallpaper selection.

https://bugzilla.gnome.org/show_bug.cgi?id=676539
2012-08-17 17:57:27 -04:00
Cosimo Cecchi
761f5f0b8b background: always pass a cancellable down to I/O operations
So they will be properly cancelled when the panel is disposed.
Also, check early if the operation was cancelled, since it's not safe to
assume the data of the callback is valid anymore before that point.

https://bugzilla.gnome.org/show_bug.cgi?id=672572
2012-06-11 09:16:44 -04:00
Bastien Nocera
3d79e1174e background: Only show the image types we support
And add image/bmp to those types.

https://bugzilla.gnome.org/show_bug.cgi?id=669960
2012-05-17 18:12:49 +01:00
Jon McCann
0bb2e2142a background: Sort Pictures folder by name
https://bugzilla.gnome.org/show_bug.cgi?id=672925
2012-04-26 11:13:12 +01:00
Bastien Nocera
a3055b3202 background: Ignore screenshots
Don't list screenshots coming from gnome-screenshot in our
Pictures source.

https://bugzilla.gnome.org/show_bug.cgi?id=672925
2012-04-26 11:07:08 +01:00
Rodrigo Moya
aa850977a5 background: Allow SVG image files as background
https://bugzilla.gnome.org/show_bug.cgi?id=648764
2011-08-30 10:31:23 +02:00
Alexander Larsson
4e06cd6236 Fix includes for gdesktop-enums.h
The file is in $incdir/gsettings-desktop-schemas/gdesktop-enums.h,
and pkg-config returns -I$incdir/gsettings-desktop-schemas, so the
right way is to #include <gdesktop-enums.h> which is what other modules
do.

https://bugzilla.gnome.org/show_bug.cgi?id=642369
2011-02-17 20:59:55 +01:00
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
e6cb9f5b12 background: Add ability to add a single file
To the pictures backend.
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
329aabf0b1 background: Set the shading for pictures 2011-02-14 09:44:05 +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