Commit Graph

4562 Commits

Author SHA1 Message Date
Ignacio Casal Quinteiro
259a61ed2d registrybackend: pass the event to the cache update
This way the registry cache has more control to specify what has
changed.
2016-02-03 19:19:50 +01:00
Rico Tzschichholz
e3189527dc gio/gobject: Various introspection fixes 2016-02-03 18:13:49 +01:00
Ignacio Casal Quinteiro
c7ea434e2c registrybackend: properly propagate the partial key name 2016-02-03 13:10:09 +01:00
Ignacio Casal Quinteiro
f1a5e394b0 registrybackend: rename touched flag to readable
This is a flag used to understand if a key exists on the registry
and if it is readable. It makes more sense to rename it as readable
since anyway a key that does not exists anymore is a key that is
not readable.
2016-02-02 14:48:22 +01:00
Ignacio Casal Quinteiro
5cc997f7c4 registrybackend: close the key only if successfully opened 2016-02-02 11:08:50 +01:00
Ignacio Casal Quinteiro
bf3f827ca1 registrybackend: use ptr_array_new_with_free_func 2016-02-02 11:08:42 +01:00
Ignacio Casal Quinteiro
9098a7f927 registrybackend: minor style cleanup 2016-02-02 11:04:56 +01:00
Rico Tzschichholz
d268d9f86a socket: Fix annotation of g_socket_receive_message
https://bugzilla.gnome.org/show_bug.cgi?id=761337
2016-02-02 10:15:04 +01:00
Rico Tzschichholz
ec173eb654 application: Fix annoation of g_application_add_option_group
https://bugzilla.gnome.org/show_bug.cgi?id=761337
2016-02-02 10:11:08 +01:00
Ignacio Casal Quinteiro
169cfb250f registrybackend: avoid signed/unsigned comparison warnings 2016-02-01 14:25:05 +01:00
Ignacio Casal Quinteiro
b0776ddd18 registrybackend: use G_DECLARE_FINAL_TYPE 2016-02-01 14:24:46 +01:00
Sébastien Wilmet
95dd373024 docs: better documentation for g_file_info_copy_into()
The documentation of g_file_info_copy_into() was misleading. The
attributes are not just copied, @dest_info is also cleared at the
beginning. So any previously set attributes in @dest_info are lost.

There was a bug in gedit about this function, where some metadata were
not saved. So it might make sense to change the implementation to not
clear @dest_info, and copy one by one the attributes from @src_info to
@dest_info.

https://bugzilla.gnome.org/show_bug.cgi?id=747927
2016-01-28 20:31:53 +01:00
Sébastien Wilmet
a4ed89bf75 docs: improve doc of g_file_info_list_attributes()
The name_space can be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=747927
2016-01-28 18:49:28 +01:00
Matthias Clasen
42699e37be gio: Include filename in error message
I'm tired of seeing 'No such file or directory' in the logs without
a hint as to what is actually wrong. Including the filename here
may help me tracking down a bug in the continuous infrastructure.
2016-01-27 21:05:31 -05:00
Chun-wei Fan
d20e88fd11 gwinhttpfile.c: Fix build on Visual Studio
Visual Studio, at least the older versions, cannot use L on macros which
are defined as a constant string, plus the L must be applied to all string
literals here.  This does not look nice, but this is life...
2016-01-26 23:23:42 +08:00
Ignacio Casal Quinteiro
56b0454ba5 registrybackend: fix warning 2016-01-26 15:41:08 +01:00
Ignacio Casal Quinteiro
b57eac68e5 registrybackend: fix double-free error 2016-01-26 15:22:48 +01:00
Ignacio Casal Quinteiro
df1ffe7e27 registrybackend: remove :( from messages 2016-01-26 14:35:31 +01:00
Ignacio Casal Quinteiro
0200e4036c registrybackend: simplify g_message_win32_error 2016-01-26 13:26:41 +01:00
Ignacio Casal Quinteiro
bc85dee6b3 registrybackend: do not accept 0 as a windows error
We might end up removing from the error stack the wrong error
and this might be missleading
2016-01-26 13:19:56 +01:00
Ignacio Casal Quinteiro
bad7e4a114 registrybackend: do not leak the watch data in case of failure 2016-01-26 13:15:51 +01:00
Ignacio Casal Quinteiro
31aab1bd42 registrybackend: do not leak key and event if it cannot add the watch 2016-01-26 12:53:56 +01:00
Ignacio Casal Quinteiro
a92d97ff1f registrybackend: more style fixes
This is the never ending story
2016-01-26 12:21:48 +01:00
Ignacio Casal Quinteiro
1b5b0eff9a registrybackend: fix possible crash if cache_node is NULL 2016-01-26 12:02:18 +01:00
Ignacio Casal Quinteiro
67f6ede3e5 registrybackend: remove space before ++ 2016-01-26 11:46:51 +01:00
Ignacio Casal Quinteiro
8f7aa273de registrybackend: fix possible mem leak
If the parameters do not validate we would leak the memory.
2016-01-26 11:42:33 +01:00
Ignacio Casal Quinteiro
305a9b12c9 winhttpfile: use glib format string macro
Like this we avoid some downstream patching for msys2
2016-01-26 10:13:02 +01:00
Ignacio Casal Quinteiro
a89629db1d registrybackend: use the glib format string macro 2016-01-26 10:10:39 +01:00
Ignacio Casal Quinteiro
a159bc939d registrybackend: more cleanups 2016-01-26 09:00:35 +01:00
Ignacio Casal Quinteiro
7256f2289a registrybackend: more cleanups 2016-01-25 16:12:59 +01:00
Ignacio Casal Quinteiro
a5e819c4c3 registrybackend: style fixes 2016-01-25 16:02:03 +01:00
Philip Withnall
8c263008bb build: Calculate ABS_GLIB_RUNTIME_LIBDIR at build time
Rather than calculating it at configure time. This means it can expand
$libdir properly, and use the Make $(realpath) function rather than
invoking the non-portable `readlink -f`.

This fixes problems where `readlink` would be called on an invalid path
(due to a variable not being expanded) and would evaluate to "", which
would then cause things to be installed in the wrong place.

https://bugzilla.gnome.org/show_bug.cgi?id=744772
2016-01-24 14:44:44 +00:00
Philip Withnall
3c0cddfe80 gdbusobjectmanagerserver: Clarify recommended ObjectManager paths
Otherwise people might try to export the object manager at ‘/’, which
doesn’t work. And I have no intention of making it work.

https://bugzilla.gnome.org/show_bug.cgi?id=760852
2016-01-19 17:10:40 +00:00
Philip Withnall
1725580f26 gdbusobjectmanagerserver: Convert a DocBook link to Markdown 2016-01-19 17:01:14 +00:00
Philip Withnall
c3d6934f18 gio: Add DTLS interfaces
Add a new GDtlsConnection interface, plus derived GDtlsClientConnection
and GDtlsServerConnection interfaces, for implementing Datagram TLS
support in glib-networking.

A GDtlsConnection is a GDatagramBased, so may be used as a normal
datagram socket, wrapping all datagrams from a base GDatagramBased in
DTLS segments.

Test cases are included in the implementation in glib-networking.

https://bugzilla.gnome.org/show_bug.cgi?id=752240
2016-01-18 14:25:06 +00:00
Allison Ryan Lortie
86c5d8978d GDBusMethodInvocation: document behaviour change
We changed the behaviour of this API to adapt to a change in the D-Bus
specification.  Document the new behaviour, along with the time of the
change.

https://bugzilla.gnome.org/show_bug.cgi?id=755421
2016-01-13 10:51:44 -05:00
Lars Uebernickel
dbea81b02d gdbus: don't send unexpected replies
gdbus sets NO_REPLY_EXPECTED when no callback is given to
g_dbus_connection_call(). It makes sense that it also handles the server
side correctly by discarding replies to clients that don't want one.

https://bugzilla.gnome.org/show_bug.cgi?id=755421
2016-01-13 10:44:49 -05:00
Philip Withnall
3add5e2837 gio: Document thread safety of the streams API
Specifically, GIOStream and the TLS connection streams.

Includes wording adapted from suggestions by Dan Winship
<danw@gnome.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=735754
2016-01-11 15:58:42 +00:00
Javier Jardón
4e78a0a9df Revert "Use upstream gettext instead the glib one"
This causes several problems:
- Compilation in FreeBSD with --enable-gtk-doc broke
- Modules that still use the AM_GLIB_GNU_GETTEXT macro
  doesnt compile anymore because /usr/share/glib-2.0/gettext
  is not filled with the correct files, as this was done in
  the glib custom po/Makefile.in.in

See https://bugzilla.gnome.org/show_bug.cgi?id=622991

This reverts commit e5c752371c.
2016-01-10 22:44:24 +00:00
Javier Jardón
e5c752371c Use upstream gettext instead the glib one
https://bugzilla.gnome.org/show_bug.cgi?id=622991
2016-01-09 18:49:22 +00:00
Matt Watson
c1e2a8d727 resource file: add cancel to dummy monitor
gfilemonitor has a cancel vfunc and will call into the in dispose.
If we don't stub it out we get a segfault.
2016-01-08 18:08:20 -08:00
Daiki Ueno
50645b724a gsettings: Install gettext ITS rules
Recent gettext has a feature to allow consumer projects to supply their
own string extraction rules for XML files, in ITS format.

Gettext still ships the rule for *.gschema.xml, but it would be better
maintained in the upstream project.

See the gettext documentation for details:
http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html

https://bugzilla.gnome.org/show_bug.cgi?id=760199
2016-01-08 12:31:18 +09:00
Christophe Fergeau
ea5ca11761 gio: Document that g_inet_address_new_* return value must be g_object_unref'ed 2016-01-07 15:21:08 +01:00
Steven Chamberlain
42b160b19f gio: drop obsoleted lock causing deadlocks on FreeBSD
I think it is a recursion from the GUnixMountMonitor constructor, to a
GLocalFileMonitor on /etc/fstab, and into GUnixMountMonitor again, now
with a mutex already held, so it deadlocks.
https://bugzilla.gnome.org/page.cgi?id=traceparser/trace.html&trace_id=235354

That mutex in glocalfile.c:g_local_file_find_enclosing_mount() doesn't
seem necessary any more IMHO.  Inside it, only 'mount' is modified, but
that's just a stack variable local to this function.  When
klass->get_mount_for_mount_path is called, it's given one const
parameter and the other is unused, so they're unchanged. 'klass'
doesn't seem it could be modified either inside that function.

It doesn't recurse infinitely, but seems to work correctly and pass the
testsuite after this change.

The FreeBSD project already applied my patch in their ports tree, and
their users seem happy with it.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712848#64
and https://bugzilla.gnome.org/show_bug.cgi?id=753378
2015-12-23 09:40:54 -05:00
Chun-wei Fan
bec6a9a300 g_application_run(): Fix on Windows When Using Bindings
As g_win32_get_command_line() calls CommandLineToArgvW() to acquire the
arguments passed into a GApplication program, it actually returns the
whole command line which is used to invoke the program, including the
script interpreter and its flags when a script using GNOME bindings
(e.g. PyGObject and so on) is being invoked.

The issue here is that g_application_run() would most probably have
trouble in the scripts scenario on Windows as it is likely unable to
"recognize" the script interpreter, causing such scripts to fail to run.

Largely based on the patch by Ray Donnelly <mingw.android@gmail.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=734095
2015-12-22 17:33:33 +08:00
Ignacio Casal Quinteiro
5f4b92202b win32: fix warnings avoid discarding const qualifier 2015-12-21 12:22:10 +01:00
Xavier Claessens
aa9a33b0da GApplication: Avoid getting the default context repeatidly
This avoids getting a global lock on every main loop iteration.

https://bugzilla.gnome.org/show_bug.cgi?id=759554
2015-12-16 11:44:43 -05:00
Jasper St. Pierre
a379a0ad59 gapplication: Acquire the main context before running
Otherwise, we'll acquire it on every loop iteration, which can leave us
vulnerable to racing another thread for the acquisition of the main
context.

This can break methods like g_main_context_invoke, which try to acquire
a context to figure out if it can invoke the method synchronously or
need to defer to an idle. In these cases, it isn't guaranteed that the
invocation function will be invoked in the default main context,
e.g. the one that GApplication is holding.

This also matches what GMainLoop is doing.

https://bugzilla.gnome.org/show_bug.cgi?id=752983
2015-12-16 09:15:43 -05:00
Руслан Ижбулатов
ce985f13f4 Enable contenttype test on W32, tweak it to pass (mostly)
* On W32 use a real directory (SYSTEMROOT) instead of '/etc/'
* Disable test_symbolic_icon() as it can't be passed (symbolic icons are not
  really supported)

* PowerPoint/Gettext test still fails, presumably because msvcrt qsort() moves
  the entires (both have the same priority)

https://bugzilla.gnome.org/show_bug.cgi?id=735696
2015-12-16 07:47:54 -05:00
Руслан Ижбулатов
b86e46e8e7 xdgmime: Finer handling for cases where mmap() is not available
Allocate an empty cache object, check cache objects for being empty
before using them.
Otherwise the code will re-read cache every 5 seconds, as NULL cache
does not trigger the code that stores mtime, which makes the cache
file appear modified/unloaded permanently.

https://bugzilla.gnome.org/show_bug.cgi?id=735696
2015-12-16 07:47:54 -05:00