Commit Graph

15828 Commits

Author SHA1 Message Date
Janusz Lewandowski
5d014a802a Add a g_dbus_connection_register_object_with_closures function
This is a binding-friendly version of g_dbus_connection_register_object.
Based on a patch by Martin Pitt and the code of g_bus_watch_name_with_closures.

https://bugzilla.gnome.org/show_bug.cgi?id=656325
2015-08-18 16:41:12 -04:00
Alexandre Franke
61254347b1 Updated French translation 2015-08-15 11:36:48 +00:00
Kjartan Maraas
23d8cc5763 Updated Norwegian bokmål translation. 2015-08-11 19:41:08 +02:00
Jordi Mas
66116fc272 Update Catalan translation 2015-08-11 08:05:34 +02:00
Felix Riemann
34277d6996 gio: g_menu_item_set_icon should not fail if icon is NULL
It allows passing a NULL icon to unset the icon and thus should not
log a critical warning if used like that.

https://bugzilla.gnome.org/show_bug.cgi?id=753285
2015-08-10 19:00:24 +02:00
Muhammet Kara
0993cf6dc0 Updated Turkish translation 2015-08-09 15:46:12 +00:00
Dan Winship
a8eedd00a7 gio: fix a leftover GSimpleAsyncResult usage
And remove remaining unnecessary gsimpleasyncresult.h includes
2015-08-07 09:50:16 -04:00
Dan Winship
e02fa68068 gsettings-tool: fix deprecated call 2015-08-07 09:50:13 -04:00
Dan Winship
ff3dee4bf6 gdbus: fix gdbus-exit-on-close for gdbusconnection change 2015-08-07 09:49:57 -04:00
Dan Winship
a366053253 glib: remove deprecated g_mem_is_system_malloc() check in gprintf.c 2015-08-07 09:49:50 -04:00
Dan Winship
ebaa1de304 glib: drop array-test test for bug 568760
The test relied on g_mem_set_vtable(), so it fails now. But no one
ever touches that code so it's not like we're going to break it again
anyway.
2015-08-07 09:49:35 -04:00
Aurimas Černius
a0e74f6033 Updated Lithuanian translation 2015-08-06 22:53:12 +03:00
Colin Walters
66bc9660c4 gdbusconnection: Don't g_printerr() when exiting
exit-on-close for a DBus connection is a completely normal thing.  On
a regular GNOME login, gdm retains the X server, but terminates the
session login bus and associated helpers like gnome-settings-dameon,
the a11y tools, etc.

I've seen several downstream reports of confusion as to what these
apparent error messages mean in the system log.  It doesn't help
that they're so obtuse.

We're also printing them to stderr, when this is not an error.

The reason this was introduced is presumably some people were confused
as to why their process exited when the system bus did.  But the
solution for that I believe is documentation, not printing stuff to
everyone's system log in normal operation.

https://bugzilla.gnome.org/show_bug.cgi?id=742386
2015-08-06 08:51:02 -04:00
Matthias Clasen
905e916573 Don't leak an error
The previous commit introduced a possible memory leak in cases
where we get a G_IO_ERROR_CLOSED error. Make sure to always
free an error, if we got one.

https://bugzilla.gnome.org/show_bug.cgi?id=753278
2015-08-05 17:18:48 -04:00
Stef Walter
b3fcb1442e gdbus: Don't use g_assert_no_error() GDBusObjectManagerServer
There are real world cases where emitting signals can fail, such
as if the DBus connection closes. Asserting and aborting the process
in these cases is just plain lazy.

Ignore the errors when the connection is closed, and turn the
others into warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=753278
2015-08-05 13:43:08 +02:00
Andika Triwidada
46cf19c447 Updated Indonesian translation 2015-08-03 11:28:22 +00:00
Benjamin Otte
a2a3587036 gmain: Document return value of GSourceFuncs.dispatch 2015-08-02 17:37:12 +02:00
Philip Withnall
6b652b1a2e gio: Fix application of GNetworkMonitor:network-metered patch
The wrong patch from https://bugzilla.gnome.org/show_bug.cgi?id=750282
was applied, causing test failures due to not implementing the property
on GNetworkMonitorBase (plus some other omissions).

Fix that by reverting commit a80e7db1a8
and re-applying the correct patch over the top.

https://bugzilla.gnome.org/show_bug.cgi?id=750282
2015-07-29 11:58:02 +01:00
Philip Withnall
7f195ac956 gresource: Clarify error docs for g_resource_enumerate_children()
Document that it returns G_RESOURCE_ERROR_NOT_FOUND if the path doesn’t
exist.
2015-07-28 10:14:17 +01:00
Akom Chotiphantawanon
6e4e1c168c Updated Thai translation 2015-07-28 15:55:05 +07:00
Matthias Clasen
b173244b7d Remove malloc tests
These tests were about the no longer supported
vtable functionality, so just remove them.
2015-07-28 00:04:35 -04:00
Alexander Larsson
3be6ed60aa Deprecate and drop support for memory vtables
The memory vtables no longer work, because glib contructors are called
before main(), so there is no way to set it them before use. This stops using
the vtable at all, and deprecates and stubs out the related functions.

https://bugzilla.gnome.org/show_bug.cgi?id=751592
2015-07-27 23:30:20 -04:00
Matthias Clasen
08a3f3f3d2 GOptionContext: Don't crash without main group
This was introduced in 126c685f4a and caused e.g. gdbus
to crash when called without arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=752210
2015-07-27 07:53:40 -04:00
Matthias Clasen
17871e6881 Add a note to the g_str_hash docs
Point out some shortcomings of the djb hash, as found in

https://bugzilla.gnome.org/show_bug.cgi?id=751610
2015-07-27 06:51:17 -04:00
Richard Hughes
a80e7db1a8 gio: Add network metered information to GNetworkMonitor
Add a property to GNetworkMonitor indicating if the network
is metered, e.g. subject to limitations set by service providers.

The default value is FALSE

https://bugzilla.gnome.org/show_bug.cgi?id=750282
2015-07-27 06:44:52 -04:00
Matthias Clasen
9c4887027d Remove some questionable documentation
A function that takes a lock can certainly block in the sense
that it has to wait if the lock is taken.

https://bugzilla.gnome.org/show_bug.cgi?id=751751
2015-07-27 06:42:46 -04:00
Matthias Clasen
c885d42751 Add tests for GApplication::handle-local-options 2015-07-26 21:41:08 -04:00
Christophe Fergeau
243d740c04 gapplication: Stop handle-local-options emission on errors
A signal accumulator can return TRUE to continue signal emission, and
FALSE to stop signal emission. handle-local-options callbacks can return
« return a non-negative option if you have handled your options and
want to exit the process ».

Currently, g_application_handle_local_options_accumulator (the
accumulator for the handle-local-options signal) returns TRUE on
non-negative return value (ie continue signal emission), and returns
FALSE on negative return values (ie when the default option processing
should continue).
This return value seems backward as on >= 0 values, subsequent
handle-local-options callbacks could overwrite the 'exit request' from
the handler, while on < 0 values, the handle-local-options processing
could end up early if several callbacks are listening for this signal.
In particular, the default handler for this signal
(g_application_real_handle_local_options) always returns -1 and will
overwrite >= 0 return values from other handlers.

This commit inverts the check so that signal emission stops early when
one of the handle-local-options callbacks indicates it wants processing
to stop and the process to exit.

https://bugzilla.gnome.org/show_bug.cgi?id=751598
2015-07-26 21:41:08 -04:00
Christophe Fergeau
2551685cf6 gapplication: Fix typos in handle-local-options API doc
The @options parameter was missing an 's', and the name of
g_application_command_line_get_options_dict() was not correct.

https://bugzilla.gnome.org/show_bug.cgi?id=751598
2015-07-26 21:41:08 -04:00
Marek Černocký
c7e49a3241 Updated Czech translation 2015-07-25 03:27:32 +02:00
Peter Meerwald
0441ae1ccf ghash: Fix typo in g_hash_table_replace() documentation
https://bugzilla.gnome.org/show_bug.cgi?id=752767
2015-07-24 12:41:01 -04:00
Philip Withnall
8520ae3ffa gsocket: Factor out blocking parameter from g_socket_send_messages()
This will make future API additions easier. The factored version is
internal for the time being.

https://bugzilla.gnome.org/show_bug.cgi?id=751924
2015-07-23 11:37:18 +01:00
TingPing
b65287fea5 win32: Fix leak in g_win32_get_command_line()
https://bugzilla.gnome.org/show_bug.cgi?id=741822
2015-07-23 04:22:59 -04:00
TingPing
3cc349b04e win32: Replace usage of __wgetmainargs()
It was an internal function that has been removed with VS 2015

Use g_win32_get_command_line() or CommandLineToArgvW() directly.

https://bugzilla.gnome.org/show_bug.cgi?id=741822
2015-07-23 04:22:59 -04:00
Arun Raghavan
be7de8a7fd gdbusconnection: Fix signal subscription documentation
https://bugzilla.gnome.org/show_bug.cgi?id=752656
2015-07-21 15:20:23 -04:00
Chun-wei Fan
53d487e31b config.h.win32.in: Clean Up and Update
Merge the parts that has things to do with stdint.h and inttypes.h with
the !_MSC_VER portions, and add initial support for Visual Studio 2015,
which added support for C99 snprintf() and vsnprintf().

Not too sure about the !_MSC_VER for C99 snprintf() and vsnprintf(), but
since this file is mainly for Visual Studio builds, anyways...
2015-07-21 11:26:29 +08:00
Matthias Clasen
ab3805ab04 2.45.4 2015-07-20 17:45:43 -04:00
Dan Winship
de1bd45fe9 gio/tests/task: fix for change to cancellation behavior
Multiple tasks cancelled at the same time now complete in the opposite
order from how they used to. Fix the test to not assume any particular
order.
2015-07-20 17:35:43 -04:00
Piotr Drąg
717ebba9d7 Updated POTFILES.in 2015-07-20 21:39:49 +02:00
Paolo Borelli
45e99833e3 Move a unit test to the right file
Move a test for threaded socket service to socket-service.c.
2015-07-20 00:00:42 +02:00
Paolo Borelli
e1d44799c0 socketservice: add an "active" property
We already have start, stop and is_active methods, but turning it
into a real property is useful for a few reasons:
 - it allows us to bind the property to an UI or a setting
 - it allows us to get notified when the state changes
 - it allows us to instantiate objects directly in the stopped state

https://bugzilla.gnome.org/show_bug.cgi?id=752089
2015-07-20 00:00:02 +02:00
Paolo Borelli
a223796d0b networkaddress: use free_full
https://bugzilla.gnome.org/show_bug.cgi?id=752293
2015-07-19 23:53:35 +02:00
Yosef Or Boczko
6a392a55ec Updated Hebrew translation 2015-07-19 12:39:15 +03:00
Matthias Clasen
0c12177514 notification: Add an assertion to clarify
Coverity doesn't see that g_enum_get_value will never return
NULL here since we always pass it a valid enum value. Help
it along with an assertion.
2015-07-17 16:46:26 -04:00
Daniel Macks
dab2097587 Use GRegexMatchFlags not GRegexCompileFlags for TEST_MATCH _match_opts
Fix the enums used in some test cases to use the correct enum type in
some test cases.

https://bugzilla.gnome.org/show_bug.cgi?id=751798
2015-07-13 19:44:45 +01:00
Ilya Konstantinov
27fae83909 gbacktrace: fix G_BREAKPOINT on Darwin (OSX, iOS)
Using __builtin_trap() according to Apple's own documentation:
https://developer.apple.com/library/mac/technotes/tn2124/_index.html#//apple_ref/doc/uid/DTS10003391-CH1-SECCONTROLLEDCRASH

https://bugzilla.gnome.org/show_bug.cgi?id=750807
2015-07-09 10:39:42 -04:00
Xavier Claessens
dafc454e70 GAsyncInitable: Fix leaked object when using _newv_async 2015-07-08 14:38:16 -04:00
Ryan Lortie
7ed76a4eca file monitors: report MOVED only with both sides
Make sure we know the destination file before reporting a MOVED event.
Otherwise, we should just fall back to reporting it as a DELETED.

https://bugzilla.gnome.org/show_bug.cgi?id=751731
2015-07-06 10:22:36 -04:00
Dimitris Spingos
c5221f8aea Updated Greek translation 2015-07-06 01:50:10 +03:00
Руслан Ижбулатов
e337fe3163 W32: Add back the dummy g_app_info_reset_type_associations() 2015-07-02 11:06:17 +00:00