Commit graph

86 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
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
Bastien Nocera
e06657e7da background: Handle copy cancellation correctly
Make sure to avoid poking at the panel when the file copy
is cancelled.
2012-10-17 09:40:23 +02:00
Bastien Nocera
0e037561c3 background: Optimise preview for the usual shell layout
The area of screen to capture would be a ribbon at the top, so just
capture that instead of the whole screen, just to clear it afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=684993
2012-10-10 18:56:58 +02:00
Bastien Nocera
5b6385067d background: Fix clearing too much from the background 2012-09-30 05:43:06 +02:00
Bastien Nocera
97af01b56f background: Fix preview when primary is not the leftmost
https://bugzilla.gnome.org/show_bug.cgi?id=684985
2012-09-28 01:31:02 +02:00
Bastien Nocera
f4a8e0a73c background: Add debug to get_screenshot_async()
https://bugzilla.gnome.org/show_bug.cgi?id=684985
2012-09-27 20:37:01 +02:00
Bastien Nocera
112edc7cf7 background: Capture the primary monitor
Not monitor 0.

https://bugzilla.gnome.org/show_bug.cgi?id=684985
2012-09-27 20:36:35 +02:00
Rico Tzschichholz
ddf8c56caf background: Add missing include
bg_pictures_source_get_*_path is defined in bg-pictures-source.h
2012-08-22 12:52:29 +02:00
Ray Strode
b0e7a5efa8 panels: add register macro
Bastien says he doesn't like the blank class_finalize
functions in every panel and he would like a wrapper
macro to hide them.

This commit does that.
2012-08-21 14:32:33 -04:00
William Jon McCann
4ee558bdc8 background: Update the preview when the settings change
They may be change from outside (eg. Nautilus).

https://bugzilla.gnome.org/show_bug.cgi?id=676539
2012-08-17 17:57:54 -04:00
William Jon McCann
18b3486a06 background: Remove sheen overlay
The metaphor was valid when we used a monitor to display the preview
but now it doesn't work. There is no glass to reflect light. It
distracts from the preview and may look like a defect.

https://bugzilla.gnome.org/show_bug.cgi?id=676539
2012-08-17 17:57:46 -04: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
Jon McCann
46186a5f02 background: Escape wallpaper filename before display
https://bugzilla.gnome.org/show_bug.cgi?id=673015
2012-06-14 18:07:56 +01:00
Florian Müllner
f8637475ba background: Add get_help_uri() implementation
https://bugzilla.gnome.org/show_bug.cgi?id=675471
2012-05-18 18:48:37 +02: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
Ming Han Teh
cdfe63a3b2 background: Added D'n'D support for adding wallpapers.
https://bugzilla.gnome.org/show_bug.cgi?id=655375
2011-10-06 09:47:09 +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
Bastien Nocera
dd1b9d8336 background: Add "swap" button for gradients
https://bugzilla.gnome.org/show_bug.cgi?id=34498
2011-07-14 16:38:22 +01:00
Bastien Nocera
58e4fab6be background: Allow adding multiple images
https://bugzilla.gnome.org/show_bug.cgi?id=647053
2011-04-08 13:41:47 +01:00
Cosimo Cecchi
7cef6dc582 background: don't use the GnomeBG thumbnails for the preview area
Instead, use gnome_bg_draw(), which renders the preview directly at the
desired size.

https://bugzilla.gnome.org/show_bug.cgi?id=646180
2011-03-30 10:40:27 -04:00
Bastien Nocera
470f0dd13a background: Make icon list smaller on netbooks
The default treeview is quite tall by default, and with the addition
of the shell's toolbar, the titlebar and the GNOME shell panel,
the background panel would be too tall for netbook computers.

This works around the issue by setting a smaller height request
for the icon list when the screen on which the panel will be shown
are no taller than 768 pixels.

https://bugzilla.gnome.org/show_bug.cgi?id=645649
2011-03-26 16:36:59 -04:00
Bastien Nocera
73f9bffb3c background: Use new picture-uri GSettings key
https://bugzilla.gnome.org/show_bug.cgi?id=633983
2011-03-09 14:07:33 +00: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
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