Commit Graph

17880 Commits

Author SHA1 Message Date
Daniel Macks
d88d90c3c8 Exec=true (seach via PATH) instead of hardcoding /bin/true
...otherwise this .desktop is omitted on platforms that have it
elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=731705
2017-11-03 20:16:52 +00:00
Martin
029cfa9109 build: Ensure .py files are generated at build time not install time
Otherwise installing with `sudo make install` fails.

https://bugzilla.gnome.org/show_bug.cgi?id=706667
2017-11-03 20:11:56 +00:00
Uwe Helm
5448ef5326 gio: Add FS magic number for FUSE
https://bugzilla.gnome.org/show_bug.cgi?id=740826
2017-11-03 19:50:19 +00:00
Philip Withnall
fc817eb38a gthread: Emit a critical if g_rw_lock_reader_lock() fails
It can only fail if there’s been a leak or programmer error, so this is
really unlikely to happen. At least make it obvious something has gone
wrong, though, rather than silently carrying on and returning as if the
reader lock has been acquired.

Do the same for g_rw_lock_writer_lock().

It should be safe to use g_critical() for reporting the problems, since
GRWLock is not used in gmessages.c, and printing a critical seems better
than aborting, just in case we do hit the ‘maximum number of reader
locks’ error code.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=756430
2017-11-03 18:17:14 +00:00
Krzesimir Nowak
f5e229c76d convert: Fix tautological comparisons in tests
https://bugzilla.gnome.org/show_bug.cgi?id=767239
2017-11-03 16:43:23 +00:00
Tomas Kotal
ea2901abf8 gio: GPollFileMonitor is not cleaning up correctly
https://bugzilla.gnome.org/show_bug.cgi?id=789820
2017-11-03 14:07:57 +00:00
Philip Withnall
a6fc4daeb9 gmessages: Add timestamp to g_log_writer_format_fields()
Since journald adds a timestamp, it would be useful to add one to the
stdout/stderr output too — we do not want it to miss out on the
timestamping fun.

Make it blue, because we can.

https://bugzilla.gnome.org/show_bug.cgi?id=769846
2017-11-03 13:01:19 +00:00
Daniel Mustieles
df957fa81a Update Spanish translation 2017-11-03 12:56:09 +00:00
Jiří Techet
9bcd7800a1 gio: Eliminate warnings in cstring conversion on OS X
create_cstr_from_cfstring_with_fallback() is allowed to be called when str == NULL
but create_cstr_from_cfstring() isn't which leads to warnings in the console.
Fix this by adding NULL checks into create_cstr_from_cfstring_with_fallback().

https://bugzilla.gnome.org/show_bug.cgi?id=788936
2017-11-03 12:04:33 +00:00
Jiří Techet
6acaca8831 gio: Show icons based on file's mime type on OS X
The patch basically just grabs the implementation of g_content_type_get_icon_internal()
from gcontenttype.c - the only difference is that it first converts UTI to MIME using
g_content_type_get_mime_type() and at the end frees this temporary MIME type.

https://bugzilla.gnome.org/show_bug.cgi?id=788936
2017-11-03 12:04:33 +00:00
Marek Cernocky
fc031daa33 Updated Czech translation 2017-11-03 12:39:23 +01:00
Mario Blättermann
6b9636469d Update German translation 2017-11-02 19:15:11 +00:00
Tom Schoonjans
719edde63b GModule win32: disable error dialog popup
When loading a module on win32, a blocking error dialog pops up whenever
the module could not be loaded. This is particularly annoying when
module loading failure is a harmless and expected event...

This patch temporarily disables these error dialogs from popping up.

https://bugzilla.gnome.org/show_bug.cgi?id=777308
2017-11-02 15:34:14 +00:00
Benoît Dejean
54f6c56235 utils: Add new G_FORMAT_SIZE_BITS flag for g_format_size_full()
It will return sizes in bits, rather than bytes.

https://bugzilla.gnome.org/show_bug.cgi?id=789170
2017-11-02 13:39:19 +00:00
Colin Walters
6036d40073 build: Work with automake 1.13.3
In https://git.gnome.org/browse/glib/commit/?id=5c13bf9bcf0 we jumped all the
way from `1.11` to `1.14`, but `1.13.3` is what's in RHEL7.4 today, and the build
seems to work fine for me with it.
2017-11-02 08:50:35 -04:00
Nirbheek Chauhan
953a51d97b meson: Fix installation of gdb autoload scripts v2
`install:` is not a valid keyword argument for configure_file()
2017-11-02 10:22:39 +05:30
Nirbheek Chauhan
625bfa0b36 meson: Fix comment explaining gdb hacks
https://bugzilla.gnome.org/show_bug.cgi?id=788772
2017-11-02 10:03:22 +05:30
Jan Alexander Steffens (heftig)
430e2dd3f5 meson: Fix GDB scripts install_dir for *nix
Disable installation on Windows for now as this would use a colon in the
directory name.

https://bugzilla.gnome.org/show_bug.cgi?id=788772
2017-11-02 09:58:17 +05:30
Colin Walters
96ebcee8c4 Build with old libmount too
Downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1508056

This is an easy change, and lets us build with RHEL7's libmount.

See also cee57a0268
2017-11-01 14:22:18 -04:00
Tom Schoonjans
d011223085 g_get_host_name: ensure hostname has UTF8 encoding on Windows
Ensures that the hostname returned by g_get_host_name is always UTF8 encoded.
Previously, on Windows, the returned string would be encoded in the
current codepage, if it contained non-ASCII characters.

The unit test for g_get_host_name was updated with a check to ensure
that the hostname is indeed at UTF-8 string.

https://bugzilla.gnome.org/show_bug.cgi?id=789755
2017-11-01 15:46:07 +00:00
Will Thompson
41112ef00d GSeekable: improve g_seekable_[can_]truncate docs
I was not born next to a PDP-11, either, but I think this is marginally more informative!

https://bugzilla.gnome.org/show_bug.cgi?id=573251
2017-11-01 15:29:22 +00:00
Tom Schoonjans
663a5cc95f gio/gasynchelper.c: fix cast from pointer to smaller int type on win64
https://bugzilla.gnome.org/show_bug.cgi?id=777310
2017-11-01 12:54:14 +00:00
Руслан Ижбулатов
53bd6a359f W32: Add a stat() implementation for private use
This commit adds new W32-only functions to gstdio.c,
and a new header file, gstdioprivate.h.
These functions are:
g_win32_stat_utf8()
g_win32_lstat_utf8()
g_win32_fstat()
and they fill a private structure, GWin32PrivateStat,
which has all the fields that normal stat has, as well as some
extras.

These functions are then used throughout glib and gio to get better
data about the system. Specifically:
* Full, 64-bit size, guaranteed (g_stat() is forced to use 32-bit st_size)
* Full, 64-bit file identifier (st_ino is 0 when normal stat() is used, and still is)
* W32 File attributes (which stat() doesn't report); in particular, this allows
  symlinks to be correctly identified
* Full, 64-bit time, guaranteed (g_stat() uses 32-bit st_*time on 32-bit Windows)
* Allocated file size (as a W32 replacement for the missing st_blocks)

st_mode remains unchanged (thus, no S_ISLNK), so when these are given back to
glib users (via g_stat(), for example, which is now implemented by calling g_win32_stat_utf8),
this field does not contain anything unexpected.

g_lstat() now calls g_win32_lstat_utf8(), which works on symlinks the way it's supposed to.

Also adds the g_win32_readlink_utf8() function, which behaves like readlink()
(including its inability to return 0-terminated strings and inability to say how large
the output buffer should be; these limitations are purely for compatibility with
existing glib code).

Thus, symlink support should now be much better, although far from being complete.

A new W32-only test in gio/tests/file.c highlights the following features:
* allocated size
* 64-bit time
* unique file IDs

https://bugzilla.gnome.org/show_bug.cgi?id=788180
2017-11-01 12:46:38 +00:00
Philip Withnall
c74ab4a1db gobject: Fix typo in documentation for g_param_spec_get_default_value()
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-01 11:13:27 +00:00
Jan Alexander Steffens (heftig)
69b2b5f262 meson: Fix libmount support
The define was still missing.

https://bugzilla.gnome.org/show_bug.cgi?id=789681
2017-10-31 15:24:04 +00:00
Sam Spilsbury
34148fc9b9 mkenums: Don't raise when unlinking a file that does not exist
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=789637
2017-10-31 15:23:16 +00:00
Marek Cernocky
d31a7516a9 Updated Czech translation 2017-10-30 22:13:11 +01:00
Peter Mráz
868ea19699 Update Slovak translation
(cherry picked from commit cfff6d22a7)
2017-10-27 16:50:55 +00:00
Benoît Dejean
7ccbd86537 utils: refactor g_format_size_full
Refactor g_format_size_full to avoid duplicate code and make it easier to
add more units.

https://bugzilla.gnome.org/show_bug.cgi?id=789170
2017-10-27 12:18:53 +01:00
Stefan Sauer
5163805ec2 docs: fix bogus override for GIConv
GIConv is a typedef'ed pointer, don't claim it is a struct.
https://bugzilla.gnome.org/show_bug.cgi?id=779501
2017-10-27 12:06:41 +01:00
Mario Blättermann
74a0e0f60d Update German translation 2017-10-27 10:05:03 +00:00
Christoph Reiter
fed574a0c8 introspection: Add more filename type annotations for strings which can contain filenames
This continues the changes done in https://bugzilla.gnome.org/show_bug.cgi?id=767245

This makes it possible to pass Python path types as process arguments and env vars
in PyGObject and and makes it clear that the values are not strictly utf-8 and need
to be validated/converted first.

https://bugzilla.gnome.org/show_bug.cgi?id=788863
2017-10-26 18:51:51 +02:00
Philip Withnall
3d35379382 docs: Fix typo in documentation for G_PRIVATE_INIT
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-26 13:55:46 +01:00
Debarshi Ray
7339a09376 docs: Mention the idiomatic way of invoking a GAsyncReadyCallback
The GAsyncResult documentation didn't specify the context in which the
GAsyncReadyCallback is expected to be invoked. Since asynchronous
operations can be implemented in various ways involving GSources,
threads and coroutines, it is useful to mention what the standard
expections are.

Unfortunately, since this was left undefined for so long, we can only
phrase it as a suggestion, and not as a hard requirement.

https://bugzilla.gnome.org/show_bug.cgi?id=783825
2017-10-26 14:08:42 +02:00
Debarshi Ray
09d936c528 docs: Explain how GAsyncReadyCallbacks are, and should be, invoked
https://bugzilla.gnome.org/show_bug.cgi?id=783825
2017-10-26 14:08:42 +02:00
Philip Withnall
a71251dc40 gkeyfile: Add some examples to the documentation
Add some examples of loading and saving key files.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=330458
2017-10-26 12:58:59 +01:00
Debarshi Ray
61ea1e7ca4 docs: Don't be vague about where GTask dispatches the result
https://bugzilla.gnome.org/show_bug.cgi?id=783825
2017-10-26 13:48:39 +02:00
Debarshi Ray
3c5b59ddca docs: Clarify the thread-default GMainContext where the result is sent
https://bugzilla.gnome.org/show_bug.cgi?id=783825
2017-10-26 13:48:39 +02:00
Philip Withnall
3eacec1587 Use hash tables as sets in various places
Where we were already treating GHashTables as sets, modify them to use
the set-specific APIs g_hash_table_add() and g_hash_table_contains(), to
make that usage more obvious and less prone to being broken.

Heavily based on patches by Garrett Regier <garrettregier@gmail.com>.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=749371
2017-10-26 12:27:17 +01:00
Philip Withnall
e130d2e511 build: Add #serial lines to m4 files
This helps prevent outdated copies of the m4 files being used if
multiple copies are available in the search path.

See https://www.gnu.org/software/automake/manual/html_node/Serials.html

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=765552
2017-10-26 12:26:14 +01:00
Philip Withnall
3a3af3d2d3 build: Fix -Wstrict-prototypes warning in glib-2.0.m4
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705331
2017-10-26 12:25:22 +01:00
Stef Walter
7641aedd5b Clarify documentation of GValueTransform
Note in documentation of GValueTransform that dest_value
is already initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=632953
2017-10-26 12:11:01 +01:00
Stef Walter
0f82ff12ea gdbus-proxy: Fix erroneous timeout during following tests
Modified by Philip Withnall to amend a second instance in the same
file.

https://bugzilla.gnome.org/show_bug.cgi?id=711809
2017-10-26 12:01:05 +01:00
Philip Withnall
767296db9c gio: Add autoptr declarations for GUnixMountEntry and GUnixMountPoint
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=788927
2017-10-26 00:19:23 +01:00
Philip Withnall
1e4221a3f7 gio: Add API for identifying system FS types and device paths
This is needed by gnome-control-center and gnome-settings-daemon; it
makes existing checks from gunixmounts.c public.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=788927
2017-10-26 00:19:23 +01:00
Philip Withnall
f43babfea3 Revert "utils: refactor g_format_size_full"
This reverts commit 51f9c95cf2.

It’s changed the set of translatable strings generated in the POT file.
Reverting until a fix can be found for that.

https://bugzilla.gnome.org/show_bug.cgi?id=789170
2017-10-26 00:01:21 +01:00
Benoît Dejean
51f9c95cf2 utils: refactor g_format_size_full
Refactor g_format_size_full to avoid duplicate code and make it easier to
add more units.

https://bugzilla.gnome.org/show_bug.cgi?id=789170
2017-10-25 16:09:58 +01:00
Michael Catanzaro
4b07869462 socket: actually remove fd from poll when socket is closed
In my previous patch, I failed to call g_source_remove_unix_fd() in
order to actually stop polling the fd of the closed socket.

The test did not catch this, because the test only checks that the right
source callback is dispatched properly. I don't know how to test this.

https://bugzilla.gnome.org/show_bug.cgi?id=723655
2017-10-25 09:36:07 -05:00
Philip Withnall
9a319a126e glib-genmarshal/glib-mkenums: Add comment clarifying licensing
Clarify the licensing of the code generated by the two scripts in a
comment in the header of each generated file. The intention is that the
license of GLib does *not* apply to the generated files; but that they
are subject to the linking restrictions of the LGPL, since they link to
GLib and GLib is licensed under the LGPL. The generated files themselves
are under the license of whatever project they’re generated for.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=788990
2017-10-25 12:39:23 +01:00
Ole André Vadla Ravnås
b829b762fd gutf8: Fix length handling in g_utf8_make_valid()
We cannot blindly append the remainder when a length was provided
because the string isn't nul-terminated.

https://bugzilla.gnome.org/show_bug.cgi?id=789444
2017-10-25 10:33:48 +01:00