Commit graph

308 commits

Author SHA1 Message Date
Robert Ancell
c11890667b background: Fix warning when XDG_PICTURES_DIR not defined
Make the code match the existing monitor to fall back to the home directory.

The error message was:
(gnome-control-center:22910): GLib-GIO-CRITICAL **: 16:42:17.915: g_file_new_for_path: assertion 'path != NULL' failed
2018-10-18 01:31:27 +00:00
Robert Ancell
9da8e1b68d background: Fix warning when opening background selection dialog
This was due to the callback occurring before all the widgets had been added to
the dialog.

Also remove the workaround for the handler occuring during/after dispose by
using g_signal_connect_object.

The warnings were:
(gnome-control-center:13048): Gtk-CRITICAL **: 09:42:17.841: gtk_bin_get_child: assertion 'GTK_IS_BIN (bin)' failed
(gnome-control-center:13048): Gtk-CRITICAL **: 09:42:17.841: gtk_icon_view_unselect_all: assertion 'GTK_IS_ICON_VIEW (icon_view)' failed
2018-10-10 22:57:43 +00: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
122f997493 background: Replace deprecated GSimpleAsyncResult with GTask 2018-06-03 06:46:16 +04:00
Robert Ancell
930aff4cc7 background: Fix compile warning about object type
[8/15] Compiling C object 'panels/background/panels@background@@background-chooser@sta/cc-background-xml.c.o'.
In file included from /usr/include/glib-2.0/gobject/gbinding.h:29:0,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from ../panels/background/cc-background-xml.c:22:
../panels/background/cc-background-xml.c: In function ‘cc_background_xml_load_xml_internal’:
/usr/include/glib-2.0/gobject/gobject.h:512:32: warning: passing argument 2 of ‘emit_added_in_idle’ from incompatible pointer type [-Wincompatible-pointer-types]
 #define g_object_ref(Obj)      ((__typeof__(Obj)) (g_object_ref) (Obj))
                                ^
../panels/background/cc-background-xml.c:310:34: note: in expansion of macro ‘g_object_ref’
         emit_added_in_idle (xml, g_object_ref (item));
                                  ^~~~~~~~~~~~
../panels/background/cc-background-xml.c:138:1: note: expected ‘GObject * {aka struct _GObject *}’ but argument is of type ‘CcBackgroundItem * {aka struct _CcBackgroundItem *}’
 emit_added_in_idle (CcBackgroundXml *xml,
 ^~~~~~~~~~~~~~~~~~
2018-06-01 14:29:28 +12:00
Robert Ancell
ba3797aafe background: Remove unused variables 2018-05-25 12:36:34 +12:00
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Robert Ancell
ed03e9c49f background: Remove GdkColor deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=788205
2018-02-01 09:11:00 +13: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
trey
bb3ff84929 background: Add black background color
https://bugzilla.gnome.org/show_bug.cgi?id=778648
2018-01-26 00:35:19 -02:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Piotr Drąg
b65e31323a panels: Remove soft hyphens from .desktop files
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).

https://bugzilla.gnome.org/show_bug.cgi?id=792629
2018-01-18 00:12:04 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Georges Basile Stavracas Neto
b23ef59926 shell-model: Remove old categories
Since we don't maintain two different shells anymore, there
is no need to maintain the two different sets of categories
in the desktop files.

This commit also drops the "#ifdef CC_ENABLE_ALT_CATEGORIES"
blocks, since the previous commit removed that define.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02: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
Georges Basile Stavracas Neto
f69c1e106b background: Improve background chooser dialog
The background chooser dialog behavior was modeled against
a fixed-size, unmaximizable window, and makes some assumptions
that doesn't work well on the new layout.

Fix that by always setting 3 columns, and adjusting the dialog
height according to the transient parent.
2017-08-16 17:28:01 -03:00
Georges Basile Stavracas Neto
b182402fa9 background: Properly align labels with buttons
When the window resizes, we still want to keep these
labels centralized against their parents.
2017-08-16 16:18:29 -03:00
Georges Basile Stavracas Neto
e465010faa background: Improve layout on the new shell
The current Background panel was designed and architectured
for a fixed size, non resizable window. As such, it has a
few quirks that does not scale well with the new shell.

Fix that by rearchitecturing the Background panel hierarchy,
removing the deprecated widgets and simplifying the overall
hierarchy of widgets.
2017-08-12 12:34:01 -03:00
Silvère Latchurié
5508226405 background: handle EXIF orientation in chooser
The chooser ignores EXIF orientations embedded in the pictures when the
thumbnails are generated.

Because the EXIF informations are available after the file has been
loaded, it has to be reloaded if the transformed dimensions don't
match the thumbnails constraints.

The transformations are directly applied for EXIF orientations 1, 2,
3 and 4. For EXIF orientations 5, 6, 7 and 8, the pictures are reloaded
with swapped dimensions before the transformations are applied.

https://bugzilla.gnome.org/show_bug.cgi?id=783200
2017-06-07 18:24:26 +02:00
Bastien Nocera
99acb323d2 background: Add more information to run-time warning
It was impossible to know which background XML had an error with the
original message.
2017-06-07 18:24:26 +02:00
Georges Basile Stavracas Neto
2777fd583d panels: use the new categories
Following the previous patch, this patch adds the new alternative
categories to the panels' Desktop files. These alternative categories
are only relevant for the alternative Shell, and do not break the
current Shell in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=767301
2016-06-14 12:16:43 -03:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Roddy Shuler
73dcc0fb7d background: Replace octal code with literal UTF-8 character
Apparently due to a recent upgrade to gettext, the octal code was not
being processed properly in generating the .pot file.

https://bugzilla.gnome.org/show_bug.cgi?id=764318
2016-04-05 10:16:33 -07:00
Cosimo Cecchi
a630474cc1 background: refactor code into separate function
Split out the creation of a file monitor in a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=764504
2016-04-04 21:49:40 -07:00
Debarshi Ray
628f34b259 background: Ensure that the chooser is tall enough with newer GTK+
We should be pairing gtk_window_get_size with
gtk_window_set_default_size to avoid inconsistencies between the size
reading and setting code. eg., in recent GTK+ versions,
gtk_window_get_size and gtk_widget_set_size_request differ in their
interpretation of the CSD chrome.

However, gtk_window_set_default_size didn't work with non-resizable
GtkWindows, until now.

https://bugzilla.gnome.org/show_bug.cgi?id=762548
2016-03-09 13:47:09 +01:00
Jiro Matsuzawa
9dc11e66bd background: Give mnemonic to labelled widgets
https://bugzilla.gnome.org/show_bug.cgi?id=736606
2016-01-18 15:50:20 +01:00
Bastien Nocera
5e8ca7dcb3 background: Port to new grilo 0.3.0 API
And fix the "fix" in commit 54d0cef51f
which would always fail to activate the Flickr plugin as it wasn't
loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=759585
2015-12-17 13:34:02 +01:00
Olav Vitters
54d0cef51f Build fix: Update grl_registry_load_plugin_by_id API change
Grilo 0.3.0 renamed grl_registry_load_plugin_by_id to
grl_registry_activate_plugin_by_id.
2015-12-16 23:21:18 +01:00
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
43d4ae4bd4 background: Replace deprecated grilo function use
grl_operation_options_set_flags() was replaced, and bump the required
grilo version to 0.2.12

https://bugzilla.gnome.org/show_bug.cgi?id=756393
2015-10-11 17:41:04 +02:00
Marek Chalupa
1cca6545dd background: Fix crash when choosing background due to missing icon
https://bugzilla.gnome.org/show_bug.cgi?id=742656
2015-01-19 14:01:47 +01:00
Rui Matos
6b9e4ec36f background: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Debarshi Ray
041671e485 background: Fix crash when adding the second color
https://bugzilla.gnome.org/show_bug.cgi?id=689351
2014-11-11 13:52:45 +01:00
Lapo Calamandrei
27138946cb background: Remove superflous frame from chooser dialog
https://bugzilla.gnome.org/show_bug.cgi?id=739821
2014-11-10 11:10:07 +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
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