Commit Graph

13894 Commits

Author SHA1 Message Date
Sébastien Wilmet
4f327d6379 GRegex: update documentation for partial matching
The restrictions on partial matching no longer apply with PCRE >= 8.00.

The pcrepartial manpage contains the "FORMERLY RESTRICTED PATTERNS"
section:

"For  releases  of PCRE prior to 8.00, because of the way certain
internal optimizations were implemented in the pcre_exec() function, the
PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be used
with all patterns. From release 8.00 onwards, the restrictions no
longer  apply,  and  partial  matching  with  can  be requested for any
pattern."

https://bugzilla.gnome.org/show_bug.cgi?id=704250
2013-07-20 11:07:46 +02:00
Sébastien Wilmet
b3968fb150 Improve documentation
- Mention G_SOURCE_CONTINUE and G_SOURCE_REMOVE in the GSourceFunc doc;
- Mention G_PARAM_READWRITE and G_PARAM_STATIC_STRINGS in the
  GParamFlags doc;
- Fix "Since:" version for G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE;
- Fix typo.

https://bugzilla.gnome.org/show_bug.cgi?id=704250
2013-07-20 11:07:46 +02:00
Matthias Clasen
8753df9d70 gsettings tool: report failure to write
If a key is locked down, we should report an error if we
fail to write it.

https://bugzilla.gnome.org/show_bug.cgi?id=704424
2013-07-19 19:43:48 -04:00
Igor Pashev
dc87c453fb tests/gvariant: Canonicalize to lower case to work on Illumos (OpenSolaris)
Solaris libc gives lowercase strings.

https://bugzilla.gnome.org/show_bug.cgi?id=704585
2013-07-19 18:23:29 -04:00
Colin Walters
31aee73285 gdbusnameowning: Don't spew an error if we're releasing a name due to closing
The default GNOME 3.10 login process right now has gdm spawn a session
for the login screen, retaining the X server, but closing the session
bus.  Right now in this scenario many GNOME components such as
gnome-settings-daemon attempt to "clean up" on shutdown by releasing
their owned names.

But they're shutting down because the session bus went away, so
releasing the name is pointless, and presently spews an error into the
journal.

This patch avoids that error spew, which helps system administrators
find *real* problems.

https://bugzilla.gnome.org/show_bug.cgi?id=704567
2013-07-19 17:49:47 -04:00
Giovanni Campagna
be2c7b83c4 glib-unix: fix handling of multiple signal source for the same signal
We can't reset the pending flag for a signal until we've traversed
the whole list, as the documentation clearly says that in case multiple
sources they all get invoked.
This is still racy if you get a signal after checking the flag
but before resetting it, but it was the same before. The correct
fix would be to use sigwait() or signalfd(), but that would mean
blocking all signals in all threads, which is not compatible
with existing applications.

https://bugzilla.gnome.org/show_bug.cgi?id=704322
2013-07-19 09:34:47 +02:00
Dan Winship
72a7e824d6 gsourceclosure: fix idle/timeout/signal closures, add child watch support
And add a test for all source types.

https://bugzilla.gnome.org/show_bug.cgi?id=704267
2013-07-17 21:41:45 -04:00
Chun-wei Fan
d06400cbaf Visual Studio Builds: Update property sheets
"Install" the newly-introduced gpropertyaction.h header file, which is
required for GIO.
2013-07-17 16:54:35 +08:00
Chun-wei Fan
95f7dc9491 Visual Studio Builds: "Install" gdbus-codegen 2013-07-17 16:45:50 +08:00
Matthias Clasen
371fb88362 gsettings tool: Improve documentation
Mention that gsettings needs a session bus to make changes.
2013-07-16 19:21:31 -04:00
Ryan Lortie
8ead9055b9 GApplication: reply to ActivateAction
Send a reply for org.freedesktop.Application.ActivateAction calls.  We
missed this before because nobody was waiting for it.
2013-07-14 19:48:01 -04:00
Matthias Clasen
06b968b6db Make a test desktop file a little less invalid
Add a missing Name entry, and add a terminal ; to the Actions
entry in org.gtk.test.dbusappinfo.desktop. desktop-file-validate
still contains about the DBusActivatable entry and about the
missing Exec entries. The former will go away when desktop-file-validate
gets updated for the latest spec revision.
2013-07-14 11:36:45 -04:00
Colin Walters
ff68fca9e9 tests/mainloop: Fix assertions to really avoid race conditions
As the comment says, we may be delayed an arbitrary amount of time on
non-idle systems; update the assertions to reflect this.

This should fix periodic failures in the gnome-ostree continuous
integration system.

https://bugzilla.gnome.org/700460
2013-07-14 14:46:43 +01:00
Christian Kirbach
405936632a Updated German translation 2013-07-14 12:24:07 +02:00
Dan Winship
8d0e0c6fcc gcancellable: update GCancellableSource, fix a race condition
Update GCancellableSource to call g_source_set_ready_time() when its
cancellable is cancelled, rather than manually checking the state of
the cancellable from prepare() and check().

This means that we now need to use g_cancellable_connect() rather than
g_signal_connect() at construction time, to avoid the connect/cancel
race condition. Likewise, use g_cancellable_disconnect() to avoid the
disconnect/cancel race condition when freeing the source. (In fact,
that was necessary in the earlier code as well, and might have
occasionally caused spurious criticals or worse.)

https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Dan Winship
8f80fbb2a7 Remove some unnecessary source prepare/check functions
GPollableSource and GSocket's "broken" source never trigger on their
own, so with the changes to GSources in the last cycle, their check
and prepare functions are unnecessary (and undesired).

https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Dan Winship
6d328a0d5d gio: port unix streams to GUnixFDSource
The unix input/output streams were using a gio-only source type that
was mostly identical to GUnixFDSource. Get rid of that source type
and just use GUnixFDSource instead.

https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Dan Winship
8a89926532 gsourceclosure: Add support for GUnixSignalWatchSource and GUnixFDSource
https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Dan Winship
1da47d5ede gsourceclosure: use g_cclosure_marshal_generic
For the glib-defined source types, and any source type that defines a
closure callback but not a closure marshal, use
g_cclosure_marshal_generic. And then remove all the other remaining
source closure marshals.

https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Ryan Lortie
cdff4a331e Fix g_return_if_fail vs. return_val_if_fail 2013-07-13 15:48:39 -04:00
Ryan Lortie
c04a063b78 GAction: add function for printing detailed names
A counterpart for parsing of detailed actions into (name, target) pairs,
this new function prints them back.

We also add a new function to check for validity of action names.  Only
valid action names are allowed when printing.  Parsing accepts _some_
invalid names for backwards compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=704157
2013-07-13 13:41:03 -04:00
Dan Winship
c08ef6c165 gnetworkmonitornetlink: handle default route via device
If the default route is via a device rather than a particular IP
address, then neither RTA_DST nor RTA_GATEWAY will be present in the
RTM_NEWROUTE message, and so GNetworkMonitorNetlink would ignore it,
and then think there was no default route. (This could happen with
certain kinds of VPNs, if they were set to route all traffic through
the VPN.)

Fix this by recognizing routes that specify RTA_OIF ("output
interface") instead of RTA_GATEWAY.

https://bugzilla.gnome.org/show_bug.cgi?id=701609
2013-07-12 11:59:50 -04:00
Ryan Lortie
973464781c Fix a typo in a filename in Makefile.am 2013-07-11 15:57:59 -04:00
Ryan Lortie
3b1b04433c Add a testcase for DBusActivatable=true
Add a fairly realistic testcase that ensures that GDesktopAppInfo with
DBusActivatable=true can successfully talk to GApplication for a variety
of purposes.

https://bugzilla.gnome.org/show_bug.cgi?id=699259
2013-07-11 15:49:28 -04:00
Piotr Drąg
2a4dbbc73a Updated POTFILES.in 2013-07-11 21:09:15 +02:00
Ryan Lortie
d07d96e135 Deal with new automake test stuff
Add *.trs and *.log to .gitignore along with test-driver

Add *.trs and *.log to CLEANFILES in glib.mk.
2013-07-11 13:54:47 -04:00
Ryan Lortie
985e95e831 Add missing file
This got removed during the OnlyShowIn shuffle.
2013-07-11 13:49:20 -04:00
Ryan Lortie
9ec8ab62b2 GDesktopAppInfo: remove note about OnlyShowIn
A previous version of the patch had OnlyShowIn support for desktop file
actions.  This was removed from the spec and the patch rewritten, but
this bit of documentation slipped through.  Remove it.
2013-07-11 13:04:23 -04:00
Ryan Lortie
6dc5c118e4 Implement the Desktop Action specification
For some time, the desktop file specification has supported "additional
application actions".  This is intended to allow for additional methods
of starting an app, such as a mail client having a "Compose New Message"
action that brings up the compose window instead of the folder list.

This patch adds support for this with a relatively minimal API.

In the case that the application is a GApplication and DBusActivatable,
desktop actions are translated into GActions that have been added to the
application with g_action_map_add_action().  This more or less closes
the loop on being able to activate an application with an action
invocation (instead of 'activate').

https://bugzilla.gnome.org/show_bug.cgi?id=664444
2013-07-11 12:48:08 -04:00
Ryan Lortie
f77e121650 add GPropertyAction
Add a new type of GAction that represents the value of a property on an
object.  As an example, this might be used on the "visible-child-name"
property of a GtkStack.

https://bugzilla.gnome.org/show_bug.cgi?id=703270
2013-07-11 12:35:45 -04:00
Ryan Lortie
662e3c4891 GVariant: fix two small/theoretical leaks
Fix some leaks that turned up while valgrinding the GVariant testcase.

These leaks are small and only occur when there is already an error in
the program: they are leaks of temp strings used when formatting a
critical message.

These show up as leaks again the testcase under the new "expect
messages" approach.  Previously, we fork()ed and these caused the
subprocess to abort, which is why this was not noticed before.
2013-07-11 12:26:33 -04:00
Ryan Lortie
1c586e44be Add g_variant_new_printf
Add a quick way to get a floating GVariant from printf formatting.
2013-07-11 12:16:44 -04:00
Matthias Clasen
542099b5ad bump version 2013-07-09 14:28:19 -04:00
Matthias Clasen
d5c5dcfab9 2.37.4 2013-07-09 13:31:04 -04:00
Matthias Clasen
89f9f227d6 Add G_TYPE_CHECKSUM to the docs 2013-07-09 13:31:04 -04:00
Matthias Clasen
e38ee2f468 Document g_simple_proxy_resolver_set_ignore_hosts 2013-07-09 13:28:23 -04:00
Matthias Clasen
1c1255772b Minor doc tweak 2013-07-09 13:23:22 -04:00
Gil Forcada
9675bcc5e7 [l10n] Update Catalan translation 2013-07-05 02:23:48 +02:00
Sebastian Dröge
dbdfcb69ce gthread: Use pthread_cond_timedwait_monotonic() if available
Otherwise we have to rely on pthread_cond_timedwait() actually using
the monotonic clock, which might be true or not. On Android at least
it is using the realtime clock, no pthread_condattr_setclock() is available
but instead pthread_cond_timedwait_monotonic() can be used.
2013-07-04 10:41:59 +02:00
Emmanuele Bassi
a4c352cd99 Ensure that MAX_ALLOWED keeps working with the type macros
When using the GLIB_VERSION_MAX_ALLOWED macro to define the upper bound
of allowed API the G_DEFINE_TYPE_EXTENDED starts warning about the newly
added g_type_class_adjust_private_offset() function; this effectively
introduces a run-time dependency on GLib 2.38 even if we don't use its
API explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=703191
2013-07-03 09:37:03 -04:00
Martin Ejdestig
4cd7bcaf00 Add missing G_BEGIN/END_DECLS to gsettingsschema.h.
Without this fix, using any of the enclosed functions when building with a
C++ compiler will result in undefined references.

https://bugzilla.gnome.org/show_bug.cgi?id=703478
2013-07-03 09:03:20 -04:00
Ryan Lortie
cb4469600c GDBusConnection: be more careful with async GetAll
It's possible to get a org.freedesktop.Properties.GetAll call even if we
have no readable properties in the introspection, in which case we
should return the empty list in the usual way.

We should certainly _not_ be dispatching to the method call handler of
an interface which has no properties (since it will not be expecting
this).

Add a check to make sure that there is at least one readable property
before assuming that a NULL get_property handler implies that we want to
handle properties asynchronously.

Add a testcase that was failing before the change and works after it.

https://bugzilla.gnome.org/show_bug.cgi?id=703437
2013-07-01 23:36:30 -04:00
Ryan Lortie
3cefb7248a Revert two errant commits to GMutex, etc.
This reverts commits dfbac178bd and
56348210f3.

These two commits introduce undesirable behaviour and were made with no
apparent approval from anybody at all, and without reference to a bug or
mailing list discussion.
2013-07-01 23:30:47 -04:00
Paul Barbieri
e55ccf7338 gspawn: Fix leak of internal pipe with G_SPAWN_LEAVE_DESCRIPTORS_OPEN
Even when the app author specifies G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
we should avoid leaking our internal pipe machinery into the
child.

Commit message written by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=703407
2013-07-01 21:10:28 +01:00
Bastien Nocera
1891eafd1d Fix typo in documentation
s/doucumentation/documentation
2013-07-01 08:40:40 +02:00
Jeffrey Stedfast
dfbac178bd Finish the previous fix for GMutex, GRecMutex, GRWLock and GCond 2013-06-30 14:02:38 -04:00
Jeffrey Stedfast
56348210f3 Fixed g_mutex_clear() to fully undo g_mutex_init()
In order to fully undo the effects of g_mutex_init(),
it is necessary to reset the internal mutex pointer
back to NULL so that a later call to g_mutex_init()
actually works as expected.
2013-06-30 13:46:28 -04:00
Sébastien Wilmet
b05bf77223 Doc: small fixes
This commit adds the GTestSubprocessFlags enum to the docs, and fixes
several minor typos in various places.

https://bugzilla.gnome.org/show_bug.cgi?id=703254
2013-06-30 10:32:18 +02:00
Dan Winship
b7b3838401 Make G_STRFUNC consistent across platforms
Recent versions of clang have changed __PRETTY_FUNCTION__ to always
include the function signature (rather than including the function
signature in C++ but not in C like gcc does). This causes G_STRFUNC to
give different results under clang and gcc, causing some tests with
g_test_expect_messages() to fail.

Fix this by only using __PRETTY_FUNCTION__ in C++, and using
__FUNCTION__ in C. (Under gcc this change has no effect.)

https://bugzilla.gnome.org/show_bug.cgi?id=702147
2013-06-29 23:23:36 -04:00
Matthias Clasen
a3182e3b9a Improve various section headings in the docs
We don't use # or other forms of links in the section headings.
We also capitalize them and don't put a final period.

This commit corrects several headings to follow these rules.
2013-06-29 22:51:31 -04:00