Commit Graph

17011 Commits

Author SHA1 Message Date
Boyuan Yang
1666d7513d Update Chinese (China) translation 2022-01-31 03:21:12 +00:00
Christian Hergert
1244e2308b gbookmarkfile: check length before dereferencing groups
There is no requirement that groups is NULL terminated, so we should check
that the bounds are within the specified length before checking for a
NULL terminating value.

https://bugzilla.gnome.org/show_bug.cgi?id=792351
2018-01-09 15:30:41 -08:00
Matej Urbančič
827ce94722 Updated Slovenian translation 2017-09-29 08:41:03 +02:00
Matej Urbančič
aa51e8f207 Updated Slovenian translation 2017-09-20 14:10:56 +02:00
Daniel Boles
5feccd928d GApplication: Fix required # of elements in docs
The reality, as shown by our tests, is that only 2 elements are needed.
2017-09-06 21:45:39 +01:00
Patrick Welche
bebe25e35e gresource: fix documentation typo 2017-08-23 12:40:36 +01:00
Daniel Boles
3395a556de docs/running: Remove outdated refs, fix name caps
Drop references to old versions of Fedora pointed out by Mohammed Sadiq.

While here, fix the capitalisation of various names to official styles.
2017-08-23 12:23:09 +01:00
Daniel Boles
510b290e2f GSList: Note that using ->next directly is OK
as for GList
2017-08-07 20:39:20 +01:00
Daniel Boles
7a19588464 GList: Fix typo of member ->prev in documentation
It said list->previous, which is not a thing that exists.
2017-08-07 20:34:44 +01:00
Daniel Boles
3ba874d152 gspawn: Don’t mention removed gdk_spawn functions
Mention alternatives that actually still exist instead.

https://bugzilla.gnome.org/show_bug.cgi?id=785520
2017-08-03 14:40:29 +01:00
Daniel Boles
7cb96bd9da glib-compile-schemax: Fix typo in error message 2017-08-03 11:32:17 +01:00
Ondrej Holy
bc2bf55d88 gunixmounts: Prevent "mounts-changed" race if /etc/mtab is used
The /etc/mtab file is still used by some distributions (e.g. Slackware),
so it has to be monitored instead of /proc/self/mountinfo in order to
avoid races between g_unix_mounts_get and "mounts-changed" signal. The
util-linux is built with --enable-libmount-support-mtab in that case and
mnt_has_regular_mtab is used for checks. Let's use mnt_has_regular_mtab
also to determine which file to monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=779607
2017-08-03 10:25:13 +02:00
Руслан Ижбулатов
1d4e36a04b W32 - don't use gettext & gcov during gettext init
Non-representable characters during UTF16->locale conversion
will cause gcov code to return an error, for which it will try
to use gettext, so that the error message is localized.

If such call is made while gettext is being initialized
(there's a g_once_init_enter up the stack), the thread will hang forever.

To solve this, use W32 API to do the UTF16->locale conversion
and don't use gettext when it returns an error.

Also optimize g_win32_locale_filename_from_utf8() a bit,
as we need more UTF16 and less UTF8 now.

https://bugzilla.gnome.org/show_bug.cgi?id=784579
2017-07-13 10:24:00 +00:00
Aleksandr Slobodeniuk
8430939b5e docs: fixing lost character
https://bugzilla.gnome.org/show_bug.cgi?id=784792
2017-07-11 14:23:08 +01:00
Daniel Boles
e6acb07426 docs: tut_gsignal: Fix mismatched argument names
The names differed between the argument declaration and its description.
2017-07-11 12:53:33 +01:00
Matthias Clasen
d0f51e8d10 gsettings: Try harder to describe keys
If a key has no description, show the summary,
rather than "(null)". Since thats not helpful at all.
2017-07-10 08:58:55 -04:00
Matthias Clasen
72f5d59c3f Avoid a race with the openuri portal
Same as the previous commit; use the new predictable request
object path to connect to the Response signal early.
2017-07-07 12:18:12 -04:00
Matthias Clasen
2f4d79a6da Disambiguate source names
This makes debugging more pleasant.
2017-06-28 15:49:40 -04:00
Matthias Clasen
90bb8778f2 2.52.3 2.52.3 2017-06-22 09:15:23 -04:00
Matthias Clasen
373fda6809 appinfo: Fix the build on windows
The previous commit forgot to protect some unix-only
calls by an ifdef.

Pointed out by John Emmas.
2017-06-22 08:55:45 -04:00
Matthias Clasen
098f9c6088 OpenFile support: Handle open failing
This can happen, report it as an error when it does.
2017-06-22 08:55:34 -04:00
Matthias Clasen
7cb7967cf5 Use OpenFile for local files
The OpenURI portal has a separate method to handle local
files now. Use it.

At the same time, split out the openuri helpers into separate
files, and generate code for the OpenURI portal.

https://bugzilla.gnome.org/show_bug.cgi?id=783193
2017-06-22 08:55:26 -04:00
Florian Müllner
2026cb7498 gdbus-codegen: Apply --output-directory to generated docs as well
In addition to code, gdbus-codegen can also generate docbook
documentation for DBus interfaces. There's no good reason why
the newly added --output-directory option shouldn't apply to
those generated files as well.

https://bugzilla.gnome.org/show_bug.cgi?id=783201
2017-06-22 08:53:50 -04:00
Matthias Clasen
169c7f1d57 Make dbus activation sandbox-aware
When we call org.freedesktop.Application.Open to activate
an application and pass file uris, the application may not
be able to see the files due to a flatpak sandbox.

Flatpak puts the flatpak app-id in the  X-Flatpak key in
desktop files that it exports, so we can easily recognize
applications that may be affected by this.

In this case, call the document portal to export the files
and pass the resulting uri's instead of the original ones.

https://bugzilla.gnome.org/show_bug.cgi?id=783130
2017-06-22 08:53:44 -04:00
Matthias Clasen
05cc4048bb Add a wrapper for the AddFull document portal api
This is a wrapper which takes a list of uris and rewrites
them by calling AddFull with the file:// uris.

https://bugzilla.gnome.org/show_bug.cgi?id=783130
2017-06-22 08:53:36 -04:00
Matthias Clasen
ba984abddc Update flatpak document portal interface
This api has been changed upstream, recently.

A new AddFull method has been added in this commit:
6ce8521b64

https://bugzilla.gnome.org/show_bug.cgi?id=783130
2017-06-22 08:53:30 -04:00
Chun-wei Fan
87c928f39c Visual Studio builds: Visual Studio 2013 and later has va_copy()
Update config.h.win32.in and glib/glibconfig.h.win32.in to indicate so.
2017-06-14 11:50:04 +08:00
Руслан Ижбулатов
3245eba169 GetTickCount64 is a __stdcall function
https://bugzilla.gnome.org/show_bug.cgi?id=781301
2017-06-01 11:07:19 +00:00
John Lindgren
8e517df7d4 NtNotifyChangeMultipleKeys is a __stdcall function.
https://bugzilla.gnome.org/show_bug.cgi?id=781301
2017-06-01 11:07:19 +00:00
Chun-wei Fan
958902ed9a Visual Studio builds: Redo utility script generation
Use the new gen_util_scripts.py script to generate the glib-mkenums and
gdbus-codegen scripts with the proper info in them so that they can be
used properly by other build systems such as Meson, during "install".
2017-05-24 15:47:36 +08:00
Chun-wei Fan
b095df4565 Visual Studio builds: Add script to generate utility scripts
This will allow the utility scripts glib-mkenums and gdbus-codegen be
generated with the proper info in them, as build systems such as Meson
might look for shebang lines to determine the commands that need to be
called to invoke the scripts (which is necessary for calling these
scripts on standard Windows cmd.exe)
2017-05-24 13:22:58 +08:00
Ignacio Casal Quinteiro
bae70d7482 Revert "GSocket: Fix race conditions on Win32 if multiple threads are waiting on conditions for the same socket"
This reverts commit 799f8dcd46.
This patch seems to break applications that use GTask specific
operations with GSocket. We will need to investigate a bit more
on this issue but for now we revert it and leave it for the
next major release.
2017-05-11 18:01:39 +02:00
Philip Withnall
c589084003 gmain: Allow GSource methods to be called from a finalize() callback
Temporarily increase the ref count of a GSource to 1 while calling its
finalize() callback, so that the finalize() implementation can call
GSource methods (like g_source_set_ready_time()) without causing
critical warnings. It’s safe to call those methods at this point, as the
source has been destroyed, but nothing has been freed.

This is an indirect way of fixing a race between GCancellable and
GCancellableSource, whereby the GCancellable::cancelled callback for the
GCancellableSource is not disconnected until the GCancellableSource’s
finalize() function is called. Previously, this meant there was a window
in which the GCancellableSource’s ref count was 0, but the ::cancelled
callback was still connected, and could legitimately be called as a
result of another thread calling g_cancellable_cancel() on the
GCancellable. The callback calls g_source_set_ready_time() on the
GSource, and there’s no thread-safe way of checking whether the GSource
has been destroyed. Instead, we have to change GSource so its ref count
is only decremented to 0 inside the locked section in
g_source_unref_internal() *after* the finalize() function has been
called, and hence after the GCancellable::cancelled callback has been
disconnected. The use of g_cancellable_disconnect() ensures that the
callback disconnection is thread safe.

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

https://bugzilla.gnome.org/show_bug.cgi?id=781601
2017-05-11 08:56:45 +01:00
Paolo Bonzini
5d74233476 gmain: only signal GWakeup right before or during a blocking poll
Since commit e4ee307 ("Do not wake up main loop if change is from same
thread", bug 761102), GMainContext uses context->owner to decide if the
event loop is being run in the current thread.  However, what really
matters is the phase in the prepare/query/poll/check/dispatch sequence.
Wakeups are only needed between the end of prepare and the end of poll,
and then only if prepare found that no sources were ready.

There is no need to take threads into account, because prepare, check
and all callers of conditional_wakeup all look at the new need_wakeup
flag inside LOCK_CONTEXT/UNLOCK_CONTEXT.

With this change, g_main_context_is_owner and g_main_context_wait are
the only functions for which acquire/release matters, just like before
commit e4ee307.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
2017-05-11 08:55:37 +01:00
Chun-wei Fan
21be268a30 win32/replace.py: Fix replacing items in files with UTF-8 content
Some files that this script will process might have UTF-8 items in
there, which can cause problems on Python 3.x as it is more strict and
careful on unicode issues.  Fix this by:

-Doing what we did before on Python 2.x
-Open the file with encoding='utf-8' on Python 3.x
2017-05-09 18:21:45 -07:00
Ondrej Holy
b8bd46bc86 gunixmounts: Prevent unwanted automount requests
mnt_table_is_fs_mounted causes unwanted automount requests due to
canonicalization of source and target. It might be replaced by
mnt_table_find_source as per the documentation in order to prevent
the automounts, but it is redundant. All mtab entries should be already
mounted and thus mnt_table_is_fs_mounted result is always true (it
basically checks that the fs from mtab is in mtab). Let's remove
the check at all.

https://bugzilla.gnome.org/show_bug.cgi?id=781867
2017-05-09 14:34:30 +02:00
Matthias Clasen
bbe2286be3 2.52.2 2.52.2 2017-05-08 11:28:22 -04:00
Matthias Clasen
3a6811a460 portal support: Raise the priority for network monitor
When we are inside a sandbox, we want to use the portal
implementation, since it is the only one that has a chance
of working.

This is safe to do, since the portal implementation will
just fail initialization when loaded outside a sandbox.
2017-05-02 07:29:25 -04:00
Daniel Macks
ab333f42b6 Implement g_content_type_is_mime_type() (clone of win32's)
Add missing function, copying from gcontenttype-win32.c per Patrick
Griffis (Comment #55 of bug report)

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-04-28 06:42:12 -04:00
Rafal Luzynski
bd555b9ba0 gosxappinfo: fix typo in g_osx_app_info_launch_internal
Correct error domain is G_IO_ERROR.

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-04-28 06:42:02 -04:00
Patrick Griffis
917f3068c3 gosxappinfo: Special case x-scheme-handler
This is the only way they are exposed on Unix so we need to handle it

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-04-28 06:41:50 -04:00
Patrick Griffis
eb0fbe633c gosxappinfo: Fix get_default_for_type() on 10.10+
https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-04-28 06:41:29 -04:00
Patrick Griffis
d99af84a36 build: Don't build dbus-appinfo on OSX
https://bugzilla.gnome.org/show_bug.cgi?id=780309
2017-04-27 21:53:56 -04:00
Patrick Griffis
4246b1ef8c gosxappinfo: Fix typo in ifdef
https://bugzilla.gnome.org/show_bug.cgi?id=780300
2017-04-27 21:53:39 -04:00
John Lindgren
2eddcef1e7 Do not mix declarations with code.
https://bugzilla.gnome.org/show_bug.cgi?id=781298
2017-04-18 14:30:13 +08:00
Kukuh Syafaat
bed861bcf8 Update Indonesian translation 2017-04-16 03:36:18 +00:00
Paolo Bonzini
2b47c8360c gmain: Signal wakeups if context has never been acquired as well
Should address backwards compatibility with how qemu is using
`GMainContext`.

See https://bugzilla.gnome.org/show_bug.cgi?id=761102#c14

Input-into-keyboard-by: Colin Walters <walters@verbum.org>
2017-04-11 11:56:11 -04:00
Colin Walters
1d38e6cf6f main: Create a helper function for "owner wakeup" optimization
The original patch really should have introduced a helper - among
other things it deserves a code comment.  We're likely to make
further changes too, so it's obviously better to only do it in one
place.

See: https://bugzilla.gnome.org/show_bug.cgi?id=761102
2017-04-11 11:56:07 -04:00
Matthias Clasen
8ef5eae694 2.52.1 2.52.1 2017-04-08 01:55:00 -04:00
Philip Withnall
35060eb9ae gfileutils: Add precondition checks to g_file_test()
Otherwise g_file_test(NULL, …) causes a call to access(NULL, …) on
Linux, which is disallowed and valgrind complains about it.

https://bugzilla.gnome.org/show_bug.cgi?id=755046
2017-04-08 01:47:34 -04:00