Commit graph

268 commits

Author SHA1 Message Date
Debarshi Ray
eaed418f2a background: Use a stack with three views for the chooser dialog
Instead of using a GtkGrid and GtkBox to mimic what GtkStack and
GtkStackSwitcher already does for us, let's just use the latter. As a
result each source now has its separate GtkIconView. The pictures
source has a nested GtkStack to switch between the 'empty' box and the
view, which should simplify size-related issues.

https://bugzilla.gnome.org/show_bug.cgi?id=736366
2014-09-12 13:08:13 +02:00
Bastien Nocera
da160033c0 background: Fix memory leak in Flickr support
When the GrlSourceResultCb callback is called, the media's ownership is
given to the callback function (as per documentation that says "media"
is "transfer full").
2014-09-12 10:36:47 +02:00
Debarshi Ray
16a79ae6e4 background: Remove a useless horizontal size request
There are three cases which affect our size calculation:
  - When the dialog is without a parent in the test application.
  - When the dialog is maximized on small screens.
  - When the dialog is used with an unmaximized parent.

The width of the chooser is much more than half the width of the parent
in the third case. So there is no point in doing it.

The width that we set for the grid in the content area is actually what
is useful.

https://bugzilla.gnome.org/show_bug.cgi?id=736366
2014-09-10 18:51:42 +02:00
Bastien Nocera
71c76e9688 background: Make switcher button as tall as other buttons
https://bugzilla.gnome.org/show_bug.cgi?id=734803
2014-08-15 16:49:43 +02:00
Debarshi Ray
fabc31b447 background: Clean up uses of GIcon
Now that we are compositing our own emblems, there is no need to use
GIcon. We can directly use GdkPixbufs everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=732375
2014-08-12 23:48:46 +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
ebbda7a9e3 background: Remember added colours
https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-07-18 18:28:36 +02:00
Bastien Nocera
8115ba4600 background: Allow dropping colours as well
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
Bastien Nocera
e1fab88105 background: Prevent monitor_pictures_model() running multiple times
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
Bastien Nocera
0759090c72 background: Fix compilation warning 2014-06-25 12:46:43 +02:00
Christophe Fergeau
335f8711c3 background: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:28:17 +02:00
Debarshi Ray
9c25c5ce65 background: Remove unnecessary initialization
The entire private struct is initialized to 0 by GObject, so there is
no need to do that again.

https://bugzilla.gnome.org/show_bug.cgi?id=731713
2014-06-17 18:50:28 +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
b950a69f3b background: Rearrange the GObject boilerplate
... so that it is possible to override virtual functions and change
the order of the object creation and destruction process without having
to write a bunch of prototypes. Having the class_init below the others
helps us do that.

https://bugzilla.gnome.org/show_bug.cgi?id=731713
2014-06-17 18:50:27 +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
9ae3c44aa2 background: Unbreak the test program
The dialog in the test program does not have a parent window.

Fallout from 130dd418b8

https://bugzilla.gnome.org/show_bug.cgi?id=692495
2014-06-16 15:24:01 +02:00
Yosef Or Boczko
00b03c5f4e background: Use header bar in the chooser dialog
https://bugzilla.gnome.org/show_bug.cgi?id=724299
2014-04-28 17:29:17 +03:00
Bastien Nocera
130dd418b8 background: Make whole dialog visible on small screens
When using a small screen, make sure that the whole of the dialogue
is visible, including the confirmation buttons. This means that the
dialogue will be maximised when on smaller screens (just like its
parent), and that we won't set a number of columns for the icon
view.

We will also stop making the dialogue much bigger than the
Settings window itself.

https://bugzilla.gnome.org/show_bug.cgi?id=692495
2014-04-14 11:33:01 +02:00
Bastien Nocera
2c9961a4a1 background: Remove black colour from choices
A completely black background will make it impossible to see
whether there is one more workspace in gnome-shell, and as we
do not want to design gnome-shell around the possibility of
a solid black coloured background, remove black from the options.

https://bugzilla.gnome.org/show_bug.cgi?id=649426
2014-04-14 11:20: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
2e86e9e018 background: Add CcBackgroundGriloMiner
It fetches the most recent 50 images from every Grilo source that has
a corresponding GOA account. Currently the only such source is Flickr.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-18 09:31:49 +01:00
Debarshi Ray
50856b824c Revert "background: Add CcBackgroundGriloMiner"
This was never meant to be pushed.

This reverts commit 92d121fe9c.
2014-02-17 20:11:26 +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
92d121fe9c background: Add CcBackgroundGriloMiner
It fetches the most recent 50 images from every Grilo source that has
a corresponding GOA account. Currently the only such source is Flickr.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-17 19:53:29 +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
6c05a7d176 background: Remove uses of libsocialweb and BgFlickrSource
BgFlickrSource will be merged with BgPicturesSource and rewritten using
Grilo at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2014-02-13 14:01:16 +01:00
Debarshi Ray
4a403aa825 background: Use GLib API to convert absolute filename to URI
https://bugzilla.gnome.org/show_bug.cgi?id=709771
2014-02-13 12:38:01 +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
Ryan Lortie
f5063247e9 background: fix link of tester program
Libraries belong in _LDADD, not _LDFLAGS.

https://bugzilla.gnome.org/show_bug.cgi?id=724192
2014-02-11 18:40:43 -05:00
Piotr Drąg
bd4094d26e Fix grammar in a translators comment 2014-02-11 18:15:20 +01:00
Baptiste Mille-Mathias
c677c7e097 [po/fr] Correct the translation for "Lock Screen"
In the background capplet, the string for "lock screen" was translated
"Verrouiller l'écran"
(https://git.gnome.org/browse/gnome-control-center/tree/po/fr.po#n59) but lock
is not a verb in this case but a noon.
So the translation should rather be something like "Écran de verrouillage"
Comment added accordingly to builder file.

https://bugzilla.gnome.org/show_bug.cgi?id=723967
2014-02-09 21:14:43 +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
85a0016b7d background: The chooser should have exactly 3 columns
The correct way to specify the number of columns is to use
gtk_icon_view_set_columns.

https://bugzilla.gnome.org/show_bug.cgi?id=720652
2014-01-08 16:48:18 +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
Yosef Or Boczko
f5a2b6e2f7 background: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:24:44 +02: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
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05: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