Commit Graph

2294 Commits

Author SHA1 Message Date
Iñigo Martínez
e59bce3c74 gdbus-codegen: Move from optparse to argparse
The optparse module is deprecated since version 2.7 and the
development continues with the argparse.

The code has been moved from optparse to argparse when parsing
command-line options. This has also led to the deprecation of the
`--xml-files`, and positional arguments should be used instead.

https://bugzilla.gnome.org/show_bug.cgi?id=791015
2018-01-15 16:03:39 +01:00
Florian Müllner
a55bfeee41 gdesktopappinfo: Add g_desktop_app_info_get_locale_string()
Custom desktop file fields may be translated, but there is currently
no non-hacky way to look up the localized value; fill get gap with
a small wrapper around g_key_file_get_locale_string().

https://bugzilla.gnome.org/show_bug.cgi?id=779413
2018-01-08 16:28:34 +01:00
Philip Withnall
e42ff0105d docs: Mention that we build with strict-aliasing disabled
Hopefully discouraging people from overriding that and building with it
enabled.

Pro-tip: GLib will break.

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

https://bugzilla.gnome.org/show_bug.cgi?id=791622
2018-01-08 12:00:39 +00:00
Arnaud Bonatti
6d009bc56a Add ‘gsettings list-schemas --print-paths’ option
Prints next to the name of non-relocatable schemas their paths.

https://bugzilla.gnome.org/show_bug.cgi?id=792064
2018-01-05 13:01:03 +00:00
howetuft
0e22d19a11 Bug-790839 GApplication command line --help enhancements
In order to enrich information displayed by GApplication command line
handling when --help is invoked, 3 new methods are proposed:
. g_application_set_option_context_parameter_string
. g_application_set_option_context_summary
. g_application_set_option_context_description
Those methods interact with the GApplication's internal GOptionContext
which is created for command line parsing in g_application_parse_command_line.
(please refer to the GOptionContext class for more information about option
context, parameter string, summary and description.)

To illustrate the 3 methods, an example is provided:
. gapplication-example-cmdline4.c
2018-01-03 11:08:37 +00:00
Emmanuele Bassi
8ade1af707 docs: Update the "building GLib" section
The content has slowly gone out of sync with the implementation, and
some of it is also showing its age.
2018-01-01 13:48:46 +00:00
Emmanuele Bassi
b1c7d2433f docs: Remove mention of disable-regex
The `--disable-regex` configuration option was removed with commit
d7063452 from 2012.
2018-01-01 13:16:24 +00:00
Alexander Larsson
f49a93b207 Add support for g_auto[s]list(Type)
This lets you do g_autoptr style cleanup of GList that does deep freeing.

https://bugzilla.gnome.org/show_bug.cgi?id=791342
2017-12-21 16:12:55 +01:00
Martin Blanchard
156d32cb80 gobject: new g_set_weak_pointer() & g_clear_weak_pointer() helpers
Weak-pointers are currently lacking g_set_object() & g_clear_object()
helpers equivalent. New functions (and macros, both are provided) are
convenient in many case, especially for the property's notify-on-set
pattern:

  if (g_set_weak_pointer (...))
    g_object_notify (...)

Inspired by Christian Hergert's original implementation for
gnome-builder.

https://bugzilla.gnome.org/show_bug.cgi?id=749527
2017-12-21 09:59:30 +00:00
Xavier Claessens
62c4768423 Meson: Add missing options and conform to naming guidelines
https://bugzilla.gnome.org/show_bug.cgi?id=790837
2017-12-19 14:56:11 -05:00
Philip Withnall
12fa92dcfa docs: Split GSocketConnectable/GProxyAddressEnumerator documentation
Putting them in the same section causes gtk-doc to mix their properties
together in a single listing, which is confusing.

Since having them in a single section doesn’t really add anything, split
them out to one class per section.

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

https://bugzilla.gnome.org/show_bug.cgi?id=791334
2017-12-12 11:42:45 +00:00
Xavier Claessens
fa8d42de2e Meson: Fix build of gtkdoc
This requires change added in Meson 0.44.0

https://bugzilla.gnome.org/show_bug.cgi?id=786796
2017-12-11 10:25:21 -05:00
Emmanuele Bassi
7d3e6738c5 Remove outdated/obsolete README
The README for the API reference top-level is completely obsolete, so we
should just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=790896
2017-11-27 12:55:34 +00:00
Ivar Trygve Jarlsby
f5dba7d43c docs: Correct inconsistency in GObject tutorial
The example code defines an interface with three methods. The preceding text
reads 'This interface defines two methods'. This appears to be because the
example code was changed without updating the surrounding text.

https://bugzilla.gnome.org/show_bug.cgi?id=790830
2017-11-26 21:21:34 +00:00
Emmanuele Bassi
bc277bfcef docs: Fix typo in the GObject tutorial
The description of the instance construction does not match the example.
2017-11-25 10:24:07 +00:00
Christian Hergert
2227918dfd file: add g_file_load_bytes()
This adds g_file_load_bytes() to make it more convenient to
load the contents of a GFile as GBytes.

It includes a special casing for gresources to increase the
chances that the GBytes directly references the embedded data
instead of copying to the heap.

https://bugzilla.gnome.org/show_bug.cgi?id=790272
2017-11-15 03:52:41 -08:00
Cosimo Cecchi
5ebd8f6e88 gmain: add g_clear_handle_id API
It's a very common pattern to see code that looks like this in
dispose() or finalize() implementations:

if (priv->source_id > 0)
  {
    g_source_remove (priv->source_id);
    priv->source_id = 0;
  }

This API allows to accomplish the same goal with a single line:

g_clear_handle_id (&priv->source_id, (GClearHandleFunc) g_source_remove);

Thanks to Emmanuele Bassi <ebassi@gnome.org> for making the patch
generic.

https://bugzilla.gnome.org/show_bug.cgi?id=788489
2017-11-07 08:28:45 -08:00
Cosimo Cecchi
44d6052584 gfile: add g_file_new_build_filename()
This is a convenience C API that combines g_build_filename() with
g_file_new_for_path().

https://bugzilla.gnome.org/show_bug.cgi?id=788488
2017-11-07 08:25:28 -08:00
Cosimo Cecchi
374ade1b68 glib: add g_build_filename_valist()
A new public API convenience to build a filename from a va_list.

https://bugzilla.gnome.org/show_bug.cgi?id=788488
2017-11-07 08:25:28 -08:00
Philip Withnall
a12fbd227f docs: Add version and deprecation decorators to gtk-doc ignore list
This allows gtk-doc to recognise a whole lot more API than it could
before. Maintaining the lists between 6 build files is going to be a bit
of a pain, but they only need to be modified once a cycle.

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=790015
2017-11-07 14:50:23 +00:00
Philip Withnall
f33ca578b1 docs: Add 2.56 to the API version reference in glib-docs.xml
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790015
2017-11-07 14:50:23 +00:00
Philip Withnall
6546d87e4a docs: Add recent version check macros to glib-sections.txt
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790015
2017-11-07 14:50:23 +00: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
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
Julien Isorce
ea725a6414 gio: add g_socket_join_multicast_group_ssm (IGMPv3 SSM)
It adds support for source-specific multicast IGMPv3.

Allow receiving data only from a specified source when joining
a multicast group.

g_socket_join_multicast_group_ssm can be called multiple times
to allow receiving data from more than one source.

Support IPv4 and IPv6.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740791
2017-10-16 11:14:57 +01:00
Kouhei Sutou
4bdb012aae docs: Fix XML syntax error
Introduced by the following commit:

    commit cd97f93bf7
    Author: Emmanuele Bassi <ebassi@gnome.org>
    Date:   Fri Oct 13 16:05:07 2017 +0100

        docs: Update glib-mkenums man page

        We should show how to properly use glib-mkenums with Autotools, in
        the hope that fewer people will be caught cargo-culting rules written
        in the late '90s.

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

https://bugzilla.gnome.org/show_bug.cgi?id=788978
2017-10-14 09:15:59 +01:00
Emmanuele Bassi
cd97f93bf7 docs: Update glib-mkenums man page
We should show how to properly use glib-mkenums with Autotools, in
the hope that fewer people will be caught cargo-culting rules written
in the late '90s.

https://bugzilla.gnome.org/show_bug.cgi?id=788948
2017-10-13 18:14:57 +01:00
Emmanuele Bassi
bf4f825e84 docs: Update glib-genmarshal man page
We should show how to properly use glib-genmarshal with Autotools, in
the hope that fewer people will be caught cargo-culting rules written
in the late '90s.

https://bugzilla.gnome.org/show_bug.cgi?id=788948
2017-10-13 18:14:56 +01:00
Andrew Potter
5564ddef12 gdate: add g_date_copy()
This will allow passing invalid GDates through GValues.

https://bugzilla.gnome.org/show_bug.cgi?id=760109
2017-10-11 12:13:20 +01:00
Philip Withnall
121b1e5215 docs: Fix incorrect macro name in GType tutorial
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=770459
2017-10-05 15:40:14 +01:00
Colomban Wendling
b090a079f7 Fix documentation about stopping signal emission from inside a hook
Stopping signal emission from an emission hook is, and always has been,
actually forbidden.  Update the documentation not to lie to the reader.

https://bugzilla.gnome.org/show_bug.cgi?id=773355
2017-10-05 15:26:08 +01:00
Philip Withnall
1a5cebec39 docs: Discourage use of gstdio.h and clarify its header requirements
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=781598
2017-09-12 12:20:18 +01:00
Robert Ancell
491f835c17 GDateTime: Support parsing ISO 8601 strings
This supports a subset of ISO 8601 since that is a commonly used standard for
storing date and time information. We support only ISO 8601 strings that contain
full date and time information as this would otherwise not map to GDateTime.
This subset includes all of RFC 3339 which is commonly used on the Internet and
the week and ordinal day formats as these are supported in the GDateTime APIs.

(Minor modification by Philip Withnall to change API versions from 2.54
to 2.56.)

https://bugzilla.gnome.org/show_bug.cgi?id=753459
2017-09-11 19:29:34 +01:00
Carlo Caione
6503352be1 gvariant: Add g_variant_get() example for dicts
In the Dictionary section of the gvariant-format-strings documentation
only how to construct a dictionary is shown.

Add a small example showing how to extract data from a nested dictionary
and specifically from a GVariant of type "(oa{sa{sv})". Move also the
Dictionary section after the GVariant * section for the sake of clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=786737
2017-09-11 09:46:21 +01:00
Daniel Boles
830744b0f4 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:21:58 +01:00
Patrick Welche
6fcdf90300 gresource: fix documentation typo 2017-08-22 08:58:56 +01:00
Tim-Philipp Müller
24ea260b4c meson: docs: make gtk-doc find the gobject.types file
Should really use files('gobject.types') instead, but that
seems to get expanded to the build path for some reason:
https://github.com/mesonbuild/meson/issues/1875
2017-07-13 19:03:39 -04:00
Nirbheek Chauhan
88e437873a meson: Detect with-docs and with-man automatically
By default, only build man pages and gtk-doc if the build-deps were
found. To force-enable, pass -Dwith-docs=yes and -Dwith-man=yes.

Also use a foreach loop for man pages instead of listing them all
manually
2017-07-13 19:03:39 -04:00
Nirbheek Chauhan
e2da3cb599 meson: Port to latest master (2.51.0)
Also remove headers from some gio sources. Headers do not need to be
added to the list of sources.

+ various smaller self-explanatory fixes.
2017-07-13 19:03:39 -04:00
Patrick Griffis
bc2bb5639b meson: Match upstream gtkdoc changes 2017-07-13 19:03:39 -04:00
Patrick Griffis
0df9aab053 meson: Build all docs 2017-07-13 19:03:39 -04:00
Daniel Boles
522ba7303e docs: tut_gsignal: Fix mismatched argument names
The names differed between the argument declaration and its description.
2017-07-11 12:52:23 +01:00
Emmanuele Bassi
93f16a45ab Rewrite glib-genmarshal in Python
We're in the process or rewriting other tools in Python to reduce the
number of dependencies of GLib.

Additionally, making glib-genmarshal a Python script reduces the
complexity when cross-compiling, as we don't need a native build to
generate the marshallers.

https://bugzilla.gnome.org/show_bug.cgi?id=784528
2017-07-10 16:47:47 +01:00
Sébastien Wilmet
cc8b3d6ee2 docs: LGPL: Library -> Lesser
https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-05-29 19:53:35 +02:00
Emmanuele Bassi
0776e02be2 Remove unused ignore file
We're keeping the tmpl directory alive even if we don't need it.
2017-05-14 20:36:20 +01:00
Krzesimir Nowak
ce7e02193b docs: Add index for 2.54 api 2017-05-10 12:04:04 +02:00
Krzesimir Nowak
4fe89b0437 gstrfuncs: Add replacement for string-to-number functions
Very often when we want to convert a string to number, we assume that
the string contains only a number. We have g_ascii_strto* family of
functions to do the conversion but they are awkward to use - one has
to check if errno is zero, end_ptr is not NULL and *end_ptr points to
the terminating nul and then do the bounds checking. Many projects
need this kind of functionality, so it gets reimplemented all the
time.

This commit adds some replacement functions that convert a string to a
signed or unsigned number that also follows the usual way of error
reporting - returning FALSE on failure and filling an error output
parameter.
2017-05-10 12:04:03 +02:00
Philip Withnall
f6f6b3d83c garray: Add g_ptr_array_find[_with_equal_func]()
Partially based on telepathy-glib’s tp_g_ptr_array_contains(), and a
patch by Xavier Claessens <xavier.claessens@collabora.co.uk>.

Test cases included.

https://bugzilla.gnome.org/show_bug.cgi?id=698064
2017-05-02 16:54:41 +01:00
Emmanuele Bassi
f952fdf3fc Drop trailing semi-colon from G_DEFINE_ macro
It's unnecessary, and only adds visual noise; we have been fairly
inconsistent in the past, but the semi-colon-less version clearly
dominates in the code base.

https://bugzilla.gnome.org/show_bug.cgi?id=669355
2017-04-10 10:38:31 +01:00
Philip Withnall
4c91b7f935 docs: Add GParameter replacement API to gobject-sections.txt
This slipped through the review cracks.

https://bugzilla.gnome.org/show_bug.cgi?id=709865
2017-03-31 11:10:26 +01:00
Garrett Regier
6c95cd22e9 gobject: Add to_string() functions for Enum and Flags types
These are useful for debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=447907
2017-03-30 09:52:28 +01:00
Christoph Reiter
625936343d Make GUnixMountEntry and GUnixMountPoint boxed types
And unskip some functions using them.

https://bugzilla.gnome.org/show_bug.cgi?id=668962
2017-03-28 18:03:08 +02:00
Philip Withnall
7890573f6e gdbus-tool: Add a command to wait for a well-known name on the bus
This is effectively the mc-wait-for-name tool from
telepathy-mission-control; moving it in to gdbus-tool will make it more
widely useful without making people depend on telepathy-mission-control
for no other reason. The code here is reimplemented from scratch to use
GDBus.

It blocks until the specified well-known name is owned by some process
on the bus (which can be the session, system, or any other bus). By
passing --activate, the same (or a different) name can be auto-started
on the bus first.

A timeout can be specified to ensure the process doesn’t block forever.

https://bugzilla.gnome.org/show_bug.cgi?id=745971
2017-03-28 11:23:27 +01:00
Matthias Clasen
626e9e6b6e Add g_content_type_is_mime_type to the docs 2017-03-09 20:35:04 -05:00
Patrick Griffis
ee09bb704f gdbus-codegen: Add --output-directory flag
This is useful with Meson where files are generated in subdirs

https://bugzilla.gnome.org/show_bug.cgi?id=778801
2017-02-27 06:37:44 -05:00
Ondrej Holy
7dbc072c0e doc: Unify order of file attributes
Order of file attributes in docs is different than in source
codes. I don't really think it is intended. Let's unify it.

https://bugzilla.gnome.org/show_bug.cgi?id=777507
2017-02-13 08:12:48 -05:00
Ondrej Holy
006a7d082b fileinfo: Add G_FILE_ATTRIBUTE_RECENT_MODIFIED attribute
Add filesystem attribute to propagate time, when the metadata for the file
in "recent:///" was last changed. This attribute is needed for sorting
recent backend files in client applications.

https://bugzilla.gnome.org/show_bug.cgi?id=777507
2017-02-13 08:12:48 -05:00
Bastien Nocera
215c9b7951 guuid: Add UUID helper functions to GLib
Many UUID users will just need a random string, which can be generated
simply by calling the function g_uuid_string_random().

Based on original patch by
Marc-André Lureau <marcandre.lureau@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=639078
2017-02-06 14:40:38 +01:00
Rico Tzschichholz
cb26c677e6 docs: Add index for 2.52 api 2017-02-05 12:56:48 +01:00
Patrick Griffis
7a8cbc60a5 glib-compile-resources: Add --generate-phony-targets flag
This includes phony targets for each dependency in the the generated
dependency file which allows building with `ninja` which doesn't like
the phony targets[1] but also allows silencing `make` errors similar to
gcc's -MP option.

[1] - https://github.com/ninja-build/ninja/issues/1184

https://bugzilla.gnome.org/show_bug.cgi?id=774368
2016-11-20 13:33:21 -05:00
Patrick Griffis
d1763d899c Revert "glib-compile-resources: Output depfile in same directory as target"
This reverts commit 9006940de6.
2016-11-05 22:15:53 -04:00
Patrick Griffis
9006940de6 glib-compile-resources: Output depfile in same directory as target
https://bugzilla.gnome.org/show_bug.cgi?id=773437
2016-11-02 17:44:23 -04:00
Simon McVittie
c46dbd4752 Make g_utf8_make_valid public
Based on a patch by Simon van der Linden and rebased onto current GLib,
with improved documentation loosely based on Telepathy's
tp_utf8_make_valid().

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=591603
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=610969
Reviewed-by: Colin Walters <walters@verbum.org>
2016-10-13 21:52:42 +01:00
Matthias Clasen
540374c80e Document --output option of glib-mkenums 2016-10-12 18:01:37 -04:00
Matthias Clasen
c382da4819 Document new option of glib-genmarshal 2016-10-12 15:56:49 -04:00
Sam Thursfield
6338cde7ca glib-compile-schemas: Add a --version option
https://bugzilla.gnome.org/show_bug.cgi?id=772269
2016-10-06 21:08:25 +01:00
Sam Thursfield
bce8b6db8d glib-compile-resources: Add a --version option
There have been some improvements to the tool recently, but it's hard to
know if those are available on a given system unless the tool provides a
--version commandline option.

https://bugzilla.gnome.org/show_bug.cgi?id=772269
2016-10-06 21:08:25 +01:00
Jonh Wendell
e7bdd5d189 Add g_log_variant(): structured log that accepts a GVariant
This makes the structured logging available to other
languages via introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=770971
2016-09-09 09:07:50 -03:00
Jeremy Whiting
8fd72838ce Added describe command to gsettings command-line tool.
describe command shows description of given gsettings key.
Added documentation of describe command to gsettings man page.
2016-08-25 12:40:27 -06:00
Matthias Clasen
87d76a5a9c glib-compile-resources: generate .d-file style dependency
Add --dependency-file=foo.d option to generate a gcc -M -MF style
dependency file for other build tools. The current output of
--generate-dependencies is only useful for use directly in Makefile
rules, but can't be used in other build systems like that.

The generated dependency file looks like this:
$ glib-compile-resources --sourcedir= test.gresource.xml --dependency-file=-
test.gresource.xml: test1.txt test2.txt test2.txt

test1.txt:

test2.txt:

test2.txt:

Unlike --generate-dependencies, the --dependency-file option can be
used together with other --generate options to create dependencies
as side-effect of generating sources.

Based on a patch by Tim-Philipp Müller in
https://bugzilla.gnome.org/show_bug.cgi?id=745754

The changes in this patch, compared to his are to always return
the hash table with file information from parse_resource_file, so
we can use it for dependency output, regardless if generate_dependencies
was TRUE or not.
2016-08-20 16:49:24 -04:00
Emmanuele Bassi
9afff5f05d Revert "glib-compile-resources: generate .d-file style dependency output for build tools"
This reverts commit e8c8395f0e.

Tim said that the patch isn't ready, yet, and the commit is breaking the
build in Continuous.
2016-08-20 17:16:31 +01:00
Tim-Philipp Müller
e8c8395f0e glib-compile-resources: generate .d-file style dependency output for build tools
Add --dependency-file=foo.d option to generate a gcc -M -MF style
dependency file for other build tools. The current output of
--generate-dependencies is only useful for use directly in Makefile
rules, but can't be used in other build systems like that.

The generated dependency file looks like this:
$ glib-compile-resources --sourcedir= test.gresource.xml --dependency-file=-
test.gresource.xml: test1.txt test2.txt test2.txt

test1.txt:

test2.txt:

test2.txt:

Unlike --generate-dependencies, the --dependency-file option can be
used together with other --generate options to create dependencies
as side-effect of generating sources.

Based on a patch by Tim-Philipp Müller.

https://bugzilla.gnome.org/show_bug.cgi?id=745754
2016-08-20 10:52:46 -04:00
Matthias Clasen
c1e8f705dd Add async variant of g_app_info_launch_default_for_uri
This is useful in the portalized case, when the portal may
present an app chooser dialog to the user.

https://bugzilla.gnome.org/show_bug.cgi?id=768752
2016-07-26 16:05:29 -04:00
Matthias Clasen
4643cadc17 Add structured logging to the docs 2016-07-20 20:42:09 -04:00
Emilio Pozuelo Monfort
5cede43df6 Ship gio.xml in tarballs
Fixes the documentation build.

https://bugzilla.gnome.org/show_bug.cgi?id=768936
2016-07-20 10:54:52 +02:00
Krzesimir Nowak
e1c640f819 GVariant: Add a G_VARIANT_BUILDER_INIT macro
The macro could be used at initialization time to avoid having an
unitialized builder, especially with g_auto variables.

The macro tries to be a bit more type-safe by making sure that the
variant_type parameter is actually "const GVariantType
*". Unfortunately I have no idea how to make it possible to also pass
a "const gchar *" parameter without warning.

https://bugzilla.gnome.org/show_bug.cgi?id=766370
2016-07-16 21:41:16 -04:00
Giovanni Campagna
183ed8a3f8 Add g_compute_hmac_for_bytes()
As an introspection-friendly GBytes variant of g_compute_hmac_for_data()

https://bugzilla.gnome.org/show_bug.cgi?id=765338
2016-07-16 20:48:41 -04:00
suhail
69a2c70174 docs: trivial typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=767949
2016-07-16 20:32:16 -04:00
Matthias Clasen
27fad7a6b1 Document the gio tool
Add a man page, and integrate it in the reference docs.
2016-07-01 16:01:34 -04:00
Matthias Clasen
669a0f72a1 Trivial: documentation wording fix
There was a stray 'of' here.
2016-06-30 08:58:41 -04:00
Philip Withnall
7ea4949cda gmain: Add G_PID_FORMAT
This will be useful for printing out GPids in printf()-style functions.

https://bugzilla.gnome.org/show_bug.cgi?id=767765
2016-06-29 15:16:52 +01:00
Philip Withnall
c4695f192c build: Rename SystemTap scripts to include the LT version
In a vague attempt at ensuring the .stp scripts can be closely
associated with the .so files which they hard-code references to, rename
the scripts so they include the LT version — so that they are the .so
file name plus .stp.

This does not fix the fact that our .stp scripts will not work on
multiarch systems, as they are installed in an architecture-independent
directory (/usr/share/systemtap/tapset). At the moment, it is
recommended that any distribution who package the .stp files should
install them in the architecture-specific subdirectories of this (for
example, /usr/share/systemtap/tapset/x86-64).

A better long-term solution for this is under discussion upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=20264

https://bugzilla.gnome.org/show_bug.cgi?id=662802
2016-06-29 14:43:52 +01:00
Ondrej Holy
e57355b055 fileinfo: Add G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute
Add filesystem attribute to detect remote filesystems in order to
replace hardcoded filesystem types in GtkFileSystem. Set this attribute
also for GLocalFile appropriately.

Bump version to 2.49.3, so that early adopters of new API have a version
number to target.
2016-06-28 10:28:51 +02:00
Cosimo Cecchi
375b4ca65c vfs: add g_vfs_register_uri_scheme()
Add a new API to allow clients to register a custom GFile implementation
handling a particular URI scheme.
This can be useful for tests, but also for cases where a different URI
scheme is desired to be used with another custom GFile backend.

As an additional cleanup, we can use this to register the "resource" URI
scheme too.

Based on a patch by Jasper St. Pierre <jstpierre@mecheye.net>.

https://bugzilla.gnome.org/show_bug.cgi?id=767887
2016-06-25 06:58:19 +08:00
Cosimo Cecchi
d07e166432 gkeyfile: add g_key_file_load_from_bytes() API
This makes it easier to use GKeyFile from language bindings, and makes
the API more consistent and modern with the new data type available in
GLib.

https://bugzilla.gnome.org/show_bug.cgi?id=767880
2016-06-20 17:53:00 -07:00
Philip Withnall
195a0cb6bb gio: Add SystemTap and DTrace probes for GTask
This adds a basic tapset for GIO, covering various interesting parts of
GTask.

https://bugzilla.gnome.org/show_bug.cgi?id=759813
2016-06-15 16:15:12 -04:00
Colin Walters
424b3b9c6c docs: Move GIO_USE_VFS to "okay for production" section
Lots of projects like NetworkManager, ostree, udisks, soon polkit,
etc.  do this or *should* do this.  And we need to support that
forever.

https://bugzilla.gnome.org/show_bug.cgi?id=767172
2016-06-02 14:11:17 -04:00
Ondrej Holy
7b3f6da307 gio: Add g_drive_is_removable() support
Nautilus wants to show entries in the sidebar only for removable devices.
It uses currently sort of conditions to determine which devices should be
shown. Those condition fails in some cases unfortunatelly. Lets provide
g_drive_is_removable() which uses udisks Removable property to determine
which devices should be shown. It should return true for all drives with
removable media, or flash media, or drives on usb and firewire buses.

https://bugzilla.gnome.org/show_bug.cgi?id=765900
2016-05-20 10:31:22 +02:00
Philip Withnall
098f19bced docs: Replace references to GVFS hal modules with udisks2
Since hal is dead and buried, and has been superseded by the udisks2
modules in GVFS.
2016-05-19 10:06:36 +01:00
Rico Tzschichholz
19689af091 docs: Add index for 2.50 api 2016-05-18 13:30:32 +02:00
Matthias Clasen
98f86beed6 gdbus-codegen: Only generate autocleanup when instructed to
This adds a new --c-generate-autocleanup option to gdbus-codegen
which can be used to instruct gdbus-codegen about what autocleanup
definitions to emit.

Doing this unconditionally was found to interfere with existing
code out in the wild.

The new option takes an argument that can be
none, objects or all; to indicate whether to generate no
autocleanup functions, only do it for object types, or do it
for interface types as well. The default is 'objects', which
matches the unconditional behavior of gdbus-codegen on the 2.48
branch.

https://bugzilla.gnome.org/show_bug.cgi?id=763379
2016-05-05 06:13:16 -04:00
Marc-Antoine Perennou
5cea1c861d gsettings: add get/set_{,u}int64
https://bugzilla.gnome.org/show_bug.cgi?id=755898

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-04-28 17:28:44 +02:00
Руслан Ижбулатов
e4aaae4ed6 glib: Add 2.50 availibity macros
https://bugzilla.gnome.org/show_bug.cgi?id=665446
2016-04-27 13:17:27 +00:00
Thomas Perl
59ec2912e4 Documentation fix: g_variant_get() returns void
https://bugzilla.gnome.org/show_bug.cgi?id=747107
2016-04-11 23:29:53 -04:00
Hashem Nasarat
c5931d1a16 docs: fix grammar in Writing GLib Applications/Threads 2016-01-31 12:54:28 -05: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
Christian Hergert
3272267b99 macros: add G_GNUC_CHECK_VERSION() for compiler checks.
https://bugzilla.gnome.org/show_bug.cgi?id=728099
2015-12-16 07:47:53 -05:00
Allison Ryan Lortie
398c048c66 docs: remove GDBusObjectManager example
This example has been causing on-and-off build breaks for quite some
time.  In this case, the code for copying the generated content into the
main docs of GIO is causing problems with srcdir != destdir builds (due
to the files also being copied from the read-only srcdir during
distchecks).

We could probably work around this problem yet again, but since there is
no real benefit to having this content included, so let's remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-24 18:44:02 +00:00
Xavier Claessens
6f1b574cea Doc: Fix missing glibconfig.h when builddir!=srcdir
Currently the doc is incomplete when builddir!=srcdir
(e.g. debian package) because glibconfig.h is generared from
configure.ac and is thus missing from srcdir. This leads to
missing doc for symbols like G_GINT64_FORMAT.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-02 10:02:43 -05:00
Xavier Claessens
86a7c864b3 Doc: copy included example files
This fix missing files when src_dir != build_dir.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-02 09:26:58 -05:00