Commit graph

115 commits

Author SHA1 Message Date
Alexander Mikhaylenko
c932168462 background: Trigger screen transition when changing style
See https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2070
2022-02-11 22:12:49 +00:00
Alexander Mikhaylenko
c5792cfb00 background: Support dark wallpapers 2022-02-07 10:50:10 +00:00
Alexander Mikhaylenko
ecd6124b91 background: Add a light/dark style switcher 2021-12-20 19:51:46 +00:00
Alexander Mikhaylenko
0aaa6f296d background: Redo the layout to match the new mockups 2021-12-20 19:51:46 +00:00
Debarshi Ray
f85750274c background: Drop the unused build dependency on Grilo
The code that uses Grilo to fetch the user's Flickr photos isn't
actually used by the Background panel, to the extent that the final
binary doesn't even link against Grilo. Getting rid of this unused code
will ensure that distributors aren't needlessly pulling in this
dependency.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1345
2021-04-20 23:04:10 +02:00
Robert Ancell
3eb0aaec28 background: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:49 +13:00
Robert Ancell
7e0a66226b background: Use GTK widget types 2020-03-30 02:05:38 +00:00
Robert Ancell
2f57847381 background: Remove unused variables 2020-03-30 02:05:38 +00:00
Robert Ancell
4b0d47eaa4 background: Connect signals in swapped form 2020-03-30 02:05:38 +00:00
Florian Müllner
33c23eaef6 background: Remove lock-screen preview
Without different lock-screen settings, there's little reason to
keep showing a lock-screen preview. So rather than updating the
preview to a blurred version of the regular background, just remove
it altogether.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/864
2020-02-19 09:37:26 +00:00
Florian Müllner
7c436727a3 background: Simplify background-chosen signal
Now that there's only a single background to set, there's no use for
a flag parameter to specify the background(s).

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/864
2020-02-19 09:37:26 +00:00
Julian Sparber
159c9afe93 background: Remove the popover
In 3.36, we will use a heavily blurred wallpaper on the lock screen.

As that wallpaper will be unrecognizable, there is no good reason to
pick a different one from the regular session. The shell will therefore
stop using the separate lock-screen settings.
The popover isn't needed anymore because it would only have one option:
to set the wallpaper. And an additional option for the recent section to
remove the wallpaper for the list, which can be done via a overlay
button.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/864
2020-02-19 09:37:26 +00:00
Florian Müllner
4838ce4228 background: Remove some dead code
update_preview() is never called with a non-NULL item.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/864
2020-02-19 09:37:26 +00:00
Robert Ancell
0aad22079f background: Remove unused GCancellable 2020-02-03 09:35:15 +13:00
Georges Basile Stavracas Neto
6df2b0bb4a
background: Remove dead code
We do not download pictures anymore; the BgRecentSource
always copies the wallpapers before actually adding them,
and the BgWallpapersSource handles system-wide wallpapers,
which typically do not change.

Remove this dead code, and the unecessary widgets that were
kept to keep this code working -- essentially, a few boxes
around the previewers.
2019-05-30 20:09:53 -03:00
Georges Basile Stavracas Neto
728d3b4fca
background: Add "Open Picture…" header button
This makes the new Background panel feature-complete; we can
add and remove custom wallpapers now.
2019-05-30 20:09:53 -03:00
Georges Basile Stavracas Neto
5b214404a1
background: Move preview to CcBackgroundPreview
This is a dedicate class to generate the preview. Not only
it renders the pixbuf of the wallpaper, but it also adds
lock screen or desktop frames on top of it. It also monitors
the time to keep the lock screen preview label always updated.
2019-05-30 20:01:48 -03:00
Georges Basile Stavracas Neto
205bfb9446
background: Use the cairo_t provided by GTK
Instead of creating our own one using a deprecated function.
2019-05-30 20:01:48 -03:00
Georges Basile Stavracas Neto
214f03750b
background: Remove CcBackgroundChooserDialog
It's functionality moved to CcBackgroundChooser.
2019-05-30 20:01:48 -03:00
Georges Basile Stavracas Neto
ee37d0194c
background: Cache thumbnails in CcBackgroundItem
We don't actually need to use custom qdata in GObjects to do
that; instead, cache the thumbnail directly in the item.
2019-05-30 20:01:12 -03:00
Georges Basile Stavracas Neto
2f032f224a
background: Introduce CcBackgroundChooser
It will become essentially what CcBackgroundChooserDialog,
but without a dialog and organized differently. Right now,
it is as minimal as it could be and only shows wallpapers.
As we grow it, it may cover pictures and even colors.
2019-05-30 20:01:12 -03:00
Georges Basile Stavracas Neto
ad740deeea
background: Turn into a template class 2019-05-30 20:01:11 -03:00
Georges Basile Stavracas Neto
c290dadf0c
background: Rename ui file to cc-background-panel.ui 2019-05-30 20:01:11 -03:00
Robert Ancell
d2d8a501cd background: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
0baacee873 background: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788155
2018-01-26 16:22:23 +13:00
Robert Ancell
6723ff4d2b background: Drop dead background screenshot code
The screenshot was only trying to capture gnome-shell's top bar to
overlay on the background preview but now on 3.26 the top bar might be
transparent which obviously wouldn't work at all for previewing a
different wallpaper.

https://bugzilla.gnome.org/show_bug.cgi?id=788206
2017-11-01 16:09:22 +01:00
Robert Ancell
378e837a06 background: Use G_DEFINE_TYPE 2017-09-25 14:16:09 -04:00
Volodymyr Buell
daec536e25 background: Reduce the number of pixbuf creation by caching
https://bugzilla.gnome.org/show_bug.cgi?id=765887
2017-09-22 15:25:04 +02: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
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
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
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
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +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
Bastien Nocera
e7433f1629 background: Fix leak of the preview picture
https://bugzilla.gnome.org/show_bug.cgi?id=709243
2013-10-02 18:21:18 +02:00
Jasper St. Pierre
a8b83d706b background: Fix crasher when entering/leaving the background panel
g_application_get_dbus_connection() does not return a ref, so we
shouldn't try to free it.
2013-09-12 15:53:41 -04:00
Bastien Nocera
015d29604a background: Fix debug message
We're never capturing the whole screen, only a single monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=706578
2013-09-10 16:15:34 +02:00
Bastien Nocera
fd4cf7b881 background: Fix top bar location on dual-head
For testing:
xrandr --addmode VGA1 1024x768
xrandr --output VGA1 --mode 1024x768 --left-of eDP1

https://bugzilla.gnome.org/show_bug.cgi?id=706578
2013-09-10 16:15:31 +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
Debarshi Ray
cc17b9d471 background: Don't access possibly invalid object
The previous value of CURRENT_BG may not be valid after a call to
update_preview.

https://bugzilla.gnome.org/show_bug.cgi?id=707569
2013-09-09 15:12:55 +02:00
Bastien Nocera
074f55e344 background: Add support for lock screen background
https://bugzilla.gnome.org/show_bug.cgi?id=696166
2013-08-20 00:35:30 +02:00
Bastien Nocera
1097d4ca75 background: Fix memory corruption when creating preview
When using a single screen, the captured area was too small, and
we were copying data from out-of-bounds of the pixbuf area.

https://bugzilla.gnome.org/show_bug.cgi?id=696166
2013-08-20 00:35:30 +02:00
Joshua Lock
9bad43e484 background: ensure background chooser is closed if panel changed
If the background chooser is open and the user triggers a switch to a
different panel (i.e. from one of the gnome-shell indicators) the chooser
is still the topmost window and modal for g-c-c, however if the chooser is
interacted with in any way other than clicking the cancel button g-c-c
crashes.

Ensure that the chooser is destroyed if the panel is changed.

https://bugzilla.gnome.org/show_bug.cgi?id=700860
2013-06-04 11:53:26 +01:00
Bastien Nocera
f959d3072b background: Avoid accessing the panel if cancelled
If the background panel was closed, we shouldn't try to access
panel's internals as it's already been freed.

https://bugzilla.redhat.com/show_bug.cgi?id=880859
2013-01-30 19:18:07 +01:00
Bastien Nocera
681aed6f9c background: Fix error checking in on_screenshot_finished()
This could create crashers when no errors were detected, but
either the D-Bus call or loading the pixbuf return NULL.

Conflicts:
	panels/background/cc-background-panel.c
2013-01-30 19:18:07 +01:00
Bastien Nocera
8d99d1c7c5 background: Update for gnome-shell Screenshot API changes
https://bugzilla.gnome.org/show_bug.cgi?id=692849
2013-01-30 18:05:40 +01:00
Bastien Nocera
39d7842ebe background: Don't access the panel object in _finish()
We shouldn't access the panel object as we don't know whether
the memory is still valid or the panel has gone away and was
freed.
2013-01-15 08:27:11 +01:00
Cosimo Cecchi
e30613e355 background: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:05 +01:00
Bastien Nocera
3686cf7eb8 shell: Make all control-center plugins static
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.

By the same token, it will stop external panels from being
created, and loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=690036
2012-12-11 17:07:39 +01:00
Bastien Nocera
0d9fd1005f background: Fix crash when exiting panel too quickly
The background capture would still be on-going, and we would
crash poking at the now gone panel.

https://bugzilla.redhat.com/show_bug.cgi?id=866973
2012-10-17 09:40:24 +02:00