summaryrefslogtreecommitdiff
path: root/libgnome-desktop
Commit message (Collapse)AuthorAgeFilesLines
* wall-clock: More debug in format functionBastien Nocera2019-01-301-0/+11
|
* thumbnail: Fix runtime warning getting a preview iconBastien Nocera2019-01-301-2/+4
| | | | | | | | If we tried to get a preview thumbnail for a file, but that preview icon did not exist, then we'd generate a warning trying to add a reference to that GIcon. Fixes: e629e46a5409589c0701dd00bc04e948ee22560a
* thumbnail: Fix slow thumbnailer due to missing font cacheBastien Nocera2019-01-302-0/+5
| | | | | | | | | On some distributions, the font cache doesn't live in /usr but in /var, which we don't allow access to when sandboxing the thumbnailers. Bind mount the fontconfig cache directory read-only if it lives outside /usr, to speed up thumbnailer startup. Closes: #90
* thumbnail: Remove unneeded debug outputBastien Nocera2018-12-161-2/+0
| | | | Fixes: 5e8eed22db9795bc7c8fe8fc9ad399b97614b051
* thumbnail: bind mount /etc/ld.so.cache to the sandboxMart Raudsepp2018-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is especially important for libstdc++ on distributions that don't have it directly in a libdir and the runtime linker doesn't look where needed without /etc/ld.so.cache (e.g. if libstdc++ is in a GCC per-version subdirectory handled via /etc/ld.so.conf.d/). If /etc/ld.so.cache is not available, the runtime linker will look only at a set of predetermined paths - as seen with LD_DEBUG=libs added to the bwrap call with "--setenv LD_DEBUG libs": find library=libstdc++.so.6 [0]; searching search cache=/etc/ld.so.cache search path=/lib64:/usr/lib64 (system search path) trying file=/lib64/libstdc++.so.6 trying file=/usr/lib64/libstdc++.so.6 followed by: /usr/bin/totem-video-thumbnailer: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory If /etc/ld.so.cache is available, it will use that for the paths: find library=libstdc++.so.6 [0]; searching search cache=/etc/ld.so.cache trying file=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libstdc++.so.6 By bind mounting just that file out of /etc, we get it to work on such a system. Closes: #81
* thumbnail: Fix use-after-free when getting a preview iconBastien Nocera2018-12-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g_file_info_get_attribute_object() is transfer none, so when getting a preview GIcon from a gvfs-backed file that supports it, we need to reference the preview otherwise we might crash. ==19044== Invalid read of size 8 ==19044== at 0x48607E7: get_preview_thumbnail (gnome-desktop-thumbnail.c:978) ==19044== by 0x48607E7: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) ==19044== by 0x401181: main (test-desktop-thumbnail.c:51) ==19044== Address 0x700f750 is 0 bytes inside a block of size 40 free'd ==19044== at 0x4839A0C: free (vg_replace_malloc.c:530) ==19044== by 0x48DFCD0: g_type_free_instance (gtype.c:1943) ==19044== by 0x4E7F7B5: _g_file_attribute_value_clear (gfileattribute.c:176) ==19044== by 0x4E83D46: g_file_info_finalize (gfileinfo.c:327) ==19044== by 0x48C1C61: g_object_unref (gobject.c:3346) ==19044== by 0x48607D5: get_preview_thumbnail (gnome-desktop-thumbnail.c:974) ==19044== by 0x48607D5: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) ==19044== by 0x401181: main (test-desktop-thumbnail.c:51) ==19044== Block was alloc'd at ==19044== at 0x483880B: malloc (vg_replace_malloc.c:299) ==19044== by 0x4B54F20: g_malloc (gmem.c:99) ==19044== by 0x4B6C3C2: g_slice_alloc (gslice.c:1024) ==19044== by 0x4B6C9F8: g_slice_alloc0 (gslice.c:1050) ==19044== by 0x48DFA33: g_type_create_instance (gtype.c:1846) ==19044== by 0x48C2397: g_object_new_internal (gobject.c:1805) ==19044== by 0x48C4113: g_object_new_valist (gobject.c:2128) ==19044== by 0x48C443B: g_object_new (gobject.c:1648) ==19044== by 0x7451CF7: g_vfs_icon_new (gvfsicon.c:178) ==19044== by 0x7451D47: g_vfs_icon_from_tokens (gvfsicon.c:268) ==19044== by 0x4E8BA45: g_icon_new_from_tokens (gicon.c:381) ==19044== by 0x4E8BA45: g_icon_new_for_string (gicon.c:462) ==19044== by 0x7450C5F: _g_dbus_get_file_attribute (gvfsdaemonprotocol.c:300) ==19044== by 0x7450D26: _g_dbus_get_file_info (gvfsdaemonprotocol.c:340) ==19044== by 0x867A74C: g_daemon_file_query_info (gdaemonfile.c:830) ==19044== by 0x486078D: get_preview_thumbnail (gnome-desktop-thumbnail.c:960) ==19044== by 0x486078D: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) ==19044== by 0x401181: main (test-desktop-thumbnail.c:51) ==19044== ==19044== Invalid read of size 8 ==19044== at 0x48607F0: get_preview_thumbnail (gnome-desktop-thumbnail.c:978) ==19044== by 0x48607F0: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) ==19044== by 0x401181: main (test-desktop-thumbnail.c:51) ==19044== Address 0xaaaaaaaaaaaaaaaa is not stack'd, malloc'd or (recently) free'd Root-caused by "Just Me" Closes: #87
* thumbnail: Handle non-usrmerged systems and non-existing directoriesIain Lane2018-12-101-4/+49
| | | | | | | | | | | | | | | On systems where /usr-merge hasn't been carried out, /bin (etc) won't point to /usr/bin. In that case we should --ro-bind the directory instead of --symlinking it. This implements the suggestion from Simon McVittie on https://bugzilla.gnome.org/show_bug.cgi?id=787072. It also handles source directories not existing, which for example /lib64 won't on 32-bit systems. Closes: #4 Closes: #89
* wall-clock: Use LC_TIME for strftime format string translationsFlorian Müllner2018-11-151-15/+51
| | | | | | | | | | | | | | | | | In order to handle the clock's various display setting correctly for different locales, we mark strftime format strings for translation. However those translations are looked up according to the locale defined by LC_MESSAGES, while the conversion characters themselves are resolved according to LC_TIME, with rather odd results when mixing locales. The correct solution would be to install translations for format strings in the LC_TIME catalogue and look them up with dcgettext(), but we don't have the infrastructure to do that easily. Work around this by adding a helper method that looks up a string in LC_MESSAGES using the locale defined by LC_TIME and use that to translate the format strings, which has the same result. https://bugzilla.gnome.org/show_bug.cgi?id=789205
* Fix the soname versioning for libgnome-desktopEmmanuele Bassi2018-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Meson, using the `soversion` argument of a library() target means setting the explicit soname, e.g.: soversion: 17.0.2 will be used to generate: libgnome-desktop-3.so.17.0.2 Unlike libtool, though, Meson will not generate the symbolic links for the first component of the soversion: libgnome-desktop-3.so.17 Which is what the dynamic linker will actually use to resolve the library dependency at link time. In order to get a symbolic link, we need to use the `version` field for the soname, and the `soversion` field for the first component: version: '17.0.2' soversion: '17' To avoid having to manually set two fields, we can generate the `soversion` value from the `version` one, so that they will always be in sync. This fixes the build of gnome-shell on Continuous, which has been failing since gnome-desktop has been moved to Meson with the error: ld: warning: libgnome-desktop-3.so.17, needed by /usr/lib/libmutter-3.so, not found (try using -rpath or -rpath-link) Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* build: Remove autotools supportFlorian Müllner2018-09-071-159/+0
| | | | | | It's meson all the way now ... https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/7
* build: Support the meson build systemFlorian Müllner2018-09-071-0/+141
| | | | | | Yay, one more module off the list! https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/7
* gnome-language: Fix docstring referring to wrong variable nameRobert Ancell2018-08-141-2/+2
|
* gnome-language: Use g_autofreeRobert Ancell2018-08-131-6/+4
| | | | | Replace some g_free calls with g_autofree. Most of the rest of the g_frees were removed in 389a3761
* gnome-languages: Add missing glib includeRobert Ancell2018-08-131-0/+2
| | | | | Include glib.h at the start of the language header, otherwise a program using this header will get errors if it hasn't already included it.
* gnome-language: Fix potential crash due to freeing unallocated memoryRobert Ancell2018-08-131-3/+3
| | | | | | | | g_autofree support was added in commit 389a3761c, but in this case if is_utf8 was NULL then this would free memory that wasn't allocated. Note that the current code always has is_utf8 non-NULL, but this could break future code.
* Fix locale data path after removing AM_GLIB_GNU_GETTEXTTing-Wei Lan2018-08-081-1/+1
| | | | | | | | Commit c7a1cf3c4ccd1a0155b00deb4153459394b8e20d removes the usage of AM_GLIB_GNU_GETTEXT, but a variable set by it, DATADIRNAME, is used in libgnome-desktop/Makefile.am to specify the path to locale data, which causes bindtextdomain to be called with a wrong path so all translations are ignored. To fix it, we simply set GNOMELOCALEDIR to localedir.
* wall-clock: Request no padding in day of monthFlorian Müllner2018-08-031-8/+8
| | | | | | | | After switching to whitespace to separate date and time, that separation becomes less clear when the date format itself injects an additional space through padding. Address this by explicitly opting out of padding. https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/8
* wall-clock: Fix missing "date separator"Florian Müllner2018-08-021-1/+1
| | | | | | We now expect date and time to be separated by underscore, which we replace by either en-space or double space. With so many format strings by now, one of them slipped through though ...
* replace em-space with en-spaceFlorian Müllner2018-08-011-9/+9
|
* wall-clock: Separate date and time by em-spaceFlorian Müllner2018-08-011-26/+44
| | | | | | | | | The designers consider it more elegant and balanced than a comma, so use that to separate date and time. Handle it the same way as colon vs. ratio is handled, and only use the UTF8 character when using a UTF8 locale. Otherwise fall back to a double space. https://gitlab.gnome.org/GNOME/gnome-desktop/issues/8
* wall-clock: Separate show-weekday and show-date settingsFlorian Müllner2018-08-011-8/+20
| | | | | | | | | Currently show-date implies date and week day, so the current settings allow showing either full date with day and time, day and time or just the time. Separate the two settings to make it possible to show the date without day as well. https://gitlab.gnome.org/GNOME/gnome-desktop/issues/8
* Merge branch 'gnome-rr-leak' into 'master'Jonas Ådahl2018-08-011-3/+17
|\ | | | | | | | | | | | | Fix GnomeRR memory leaks Closes #6 See merge request GNOME/gnome-desktop!1
| * Don't leak properties in output_initializeSam Morris2018-07-161-0/+2
| | | | | | | | https://gitlab.gnome.org/GNOME/gnome-desktop/issues/6
| * Free GVariants in the same scope that they are allocatedSam Morris2018-07-161-6/+9
| | | | | | | | https://gitlab.gnome.org/GNOME/gnome-desktop/issues/6
| * Don't leak info in {output,crtc,mode}_initializeSam Morris2018-07-161-0/+3
| | | | | | | | https://gitlab.gnome.org/GNOME/gnome-desktop/issues/6
| * Don't leak all_transforms in crtc_initializeSam Morris2018-07-161-0/+1
| | | | | | | | | | | | Thanks /u/LvS https://gitlab.gnome.org/GNOME/gnome-desktop/issues/6
| * Don't leak crts/outputs/modes in fill_out_screen_infoSam Morris2018-07-161-0/+5
| | | | | | | | https://gitlab.gnome.org/GNOME/gnome-desktop/issues/6
* | wall-clock: Immediately react to show-weekday changesFlorian Müllner2018-07-161-0/+1
|/ | | | | | | | It's currently missing from the list of keys that trigger a clock update, so changes will only take effect on the next regular clock update (i.e. the next second or minute, depending on settings). https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/2
* bg-slide-show: Plug a memory leakFlorian Müllner2018-04-171-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=793854
* idle-monitor: Guard against 0 msecs idle intervalsBastien Nocera2018-03-021-1/+3
| | | | | | | As mutter guards against 0 msec idle watches in meta_idle_monitor_add_idle_watch() https://bugzilla.gnome.org/show_bug.cgi?id=793999
* idle-monitor: Remove per-device monitor from testsBastien Nocera2018-02-271-102/+9
| | | | | | | It's not used anywhere in the stack now that mutter handles hiding the cursor when touchscreens are used, and doesn't work under Wayland. https://bugzilla.gnome.org/show_bug.cgi?id=793737
* idle-monitor: Per-device idle monitors aren't supported in WaylandBastien Nocera2018-02-271-1/+14
| | | | | | So return an error. https://bugzilla.gnome.org/show_bug.cgi?id=793737
* Fix incompatible function pointer castsErnestas Kulik2018-02-241-2/+1
| | | | I found this new nasal demon spray.
* rr-config: cast mode id to uint32_tErnestas Kulik2018-02-131-1/+1
| | | | | | In some places it’s used as an unsigned int, in other cases it’s signed, so this just casts the -1 in a ternary expression to uint32_t, which makes no difference.
* bg: add missing default cases to switchesErnestas Kulik2018-02-131-0/+3
|
* Add const-qualifier when assigning string literalsErnestas Kulik2018-02-121-3/+3
| | | | | | | This also requires some casting when using due to legacy requirements. The string is never modified, so it’s fine. https://bugzilla.gnome.org/show_bug.cgi?id=793195
* Silence warnings for increased pointer alignmentErnestas Kulik2018-02-121-4/+4
| | | | | | | Not much to do other than some clever casting, since Xlib insists on receiving char pointers. https://bugzilla.gnome.org/show_bug.cgi?id=793195
* Disable deprecation warnings explicitlyErnestas Kulik2018-02-121-2/+3
| | | | | | | | This additionally removes the ability to pass deprecation flags to configure.ac. Revert when GTK/GDK warnings are fixed, or just don’t define the magic macros. https://bugzilla.gnome.org/show_bug.cgi?id=793195
* Handle all cases when switching on an enumErnestas Kulik2018-02-125-8/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=793195
* Don’t shadow variablesErnestas Kulik2018-02-123-17/+8
| | | | | | Especially if the types don’t match. https://bugzilla.gnome.org/show_bug.cgi?id=793195
* Fix comparisons with differing signednessErnestas Kulik2018-02-126-17/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=793195
* Fix redundant const qualifiersErnestas Kulik2018-02-121-3/+3
| | | | | | | The pointers in DefaultInputSource don’t correctly express that they are const and not just point to const data. https://bugzilla.gnome.org/show_bug.cgi?id=793195
* thumbnail: Mention which functions are blocking in docsBastien Nocera2018-02-011-8/+9
| | | | So that we know which ones will need async versions in the long run.
* thumbnail: Remove _has_uri() helper functionBastien Nocera2018-02-012-25/+0
| | | | | | Nothing in Debian uses it, which is a pretty good indicator that it's not actually needed: https://codesearch.debian.net/search?q=gnome_desktop_thumbnail_has_uri&page=1&perpkg=1
* gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methodsRobert Ancell2018-01-312-61/+53
| | | | | | | This is an API/ABI break. The only expected consumer of this feature is gnome-control-center. https://bugzilla.gnome.org/show_bug.cgi?id=789840
* thumbnail: Print debug if there's no thumbnailerBastien Nocera2018-01-161-0/+5
| | | | | Makes it easier to see whether the problem comes from this particular problem or not.
* thumbnail: Pass on G_MESSAGES_* envvar to thumbnailerBastien Nocera2018-01-161-5/+12
| | | | Even if it is sandboxed.
* thumbnail: Print bwrap command-line in debugBastien Nocera2018-01-161-8/+17
| | | | Rather than hide this behind a compile-time condition.
* thumbnail: Fix a compile-time warningBastien Nocera2018-01-161-1/+1
| | | | | | | gnome-desktop/libgnome-desktop/gnome-desktop-thumbnail-script.c: In function ‘child_setup’: gnome-desktop/libgnome-desktop/gnome-desktop-thumbnail-script.c:650:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < fd_array->len; i++) ^
* thumbnail: Fix a shadowed variableBastien Nocera2018-01-161-1/+0
| | | | | | | gnome-desktop-thumbnail-script.c: In function ‘setup_seccomp’: gnome-desktop-thumbnail-script.c:416:24: warning: declaration of ‘i’ shadows a previous local [-Wshadow] unsigned i; ^