Commit Graph

2185 Commits

Author SHA1 Message Date
Emmanuele Bassi
f2c4eb8cbb docs: Mention that generated code should not be kept
Code generated by gdbus-codegen should neither be checked in into
revision control, nor should be distributed.

https://bugzilla.gnome.org/show_bug.cgi?id=710133
2013-10-28 12:47:16 -04:00
Emmanuele Bassi
e547d14b70 gdbus-codegen maintains ABI for type structures
Make it explicit, to avoid changes that could potentially lead to
breakage in user code.

https://bugzilla.gnome.org/show_bug.cgi?id=710133
2013-10-28 12:47:16 -04:00
Stef Walter
65af7c47ff Add a request_certificate virtual method to GTlsInteraction
This allows GTlsConnection implementations to request a certificate
from the user.

Fix ups by Dan Winship <danw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=637257
2013-10-28 09:36:26 +01:00
Ryan Lortie
6f386341bd Add g_settings_schema_source_list_schemas()
g_settings_list_schemas() and g_settings_list_relocatable_schemas() are
now deprecated.

This will allow listing off schemas on non-default sources and is a
better fit with the new direction the API is going.

https://bugzilla.gnome.org/show_bug.cgi?id=680838
2013-10-27 17:12:57 -07:00
Ryan Lortie
96a053e025 Add g_settings_schema_key_get_summary/description
Add an API to read the summary and description from the .xml schema
files.

This will be used by dconf-editor and gnome-tweak-tool.

This API is a bit heavy -- it parses the XML and builds a table.  It
also loads gettext domains for translation.  It only does these things
if it is used, however, so it will not impact normal applications.

We store the summary/description in a pair of hash tables on the schema
source (which we have a backref to as of a few commits ago).  We can't
use a global table because people might want to request summary and
description from non-default sources.  We don't want to use per-schema
tables because we'd have to reparse the directory every time (since we
cannot guess which file a schema may have been in).

https://bugzilla.gnome.org/show_bug.cgi?id=668232
2013-10-27 10:42:55 -07:00
Ryan Lortie
84fa07aeb1 Make GSettingsSchemaKey public
Take this private API and make it public along with a boxed type and
ref/unref functions.

Future commits will add accessors with new functionality and some that
allow us to deprecate functions on GSettings itself (such as
g_settings_get_range).

https://bugzilla.gnome.org/show_bug.cgi?id=668232
2013-10-27 10:42:50 -07:00
Ryan Lortie
2880767702 Add g_hash_table_get_keys_as_array()
Returns a %NULL-terminated array of the keys of a hashtable.

In the case that the hash table has strings for keys, this is actually a
gchar**.

https://bugzilla.gnome.org/show_bug.cgi?id=710964
2013-10-27 09:26:53 -07:00
Ryan Lortie
e52ff01552 docs: dist manpage gapplication.xml 2013-10-24 15:31:45 -04:00
Ryan Lortie
fe7069749f file-info: Add a G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID attribute
This indicates whether the thumbnail (given by G_FILE_ATTRIBUTE_THUMBNAIL_PATH)
is valid — i.e. to represent the file in its current state. If
G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID is FALSE (for a normal _or_ failed
thumbnail) it means the file has changed since the thumbnail was generated, and
the thumbnail is out of date.

Part of checking thumbnail validity (by the spec) involves parsing
headers out of the thumbnail .png so we include some (small) code to do
that in a separate file.  We will likely want to copy this code to gvfs
to do the same for GVfsFile.

Heavily based on a patch from Philip Withnall <philip.withnall@collabora.co.uk>
who suggested the feature and designed the API.

https://bugzilla.gnome.org/show_bug.cgi?id=709898
2013-10-23 11:56:28 -04:00
Ryan Lortie
6957004007 GNotification: finish documentation
Add the missing documentation and add the section to the GIO reference
docs.  Fix up a few small documentation issues.

https://bugzilla.gnome.org/show_bug.cgi?id=688492
2013-10-21 14:30:30 -04:00
Ross Lagerwall
d55180c73b docs: Remove comment about calling g_type_init()
https://bugzilla.gnome.org/show_bug.cgi?id=709966
2013-10-18 10:32:18 -04:00
Matthias Clasen
fd90101f4a Include gapplication(1) in the tools section 2013-10-17 21:03:18 -04:00
Matthias Clasen
c848323948 Fix up subprocess docs
The GSubprocessLauncher docs had their own long description,
but were not properly set up as their own section.
2013-10-17 20:55:53 -04:00
Matthias Clasen
71534d9d62 Fix up gio-sections.txt 2013-10-17 20:45:32 -04:00
Matthias Clasen
ea52ce07d8 Generate introspected docs for GSimpleProxyResolver 2013-10-17 20:38:15 -04:00
Matthias Clasen
4cae0703f7 Add index for 2.40 api additions 2013-10-17 20:16:13 -04:00
Ryan Lortie
542ad4db03 Fixup GSubprocess documentation bits 2013-10-17 15:01:42 -04:00
Colin Walters
5b48dc40cc GSubprocess: New class for spawning child processes
There are a number of nice things this class brings:

0) Has a race-free termination API on all platforms (on UNIX, calls to
   kill() and waitpid() are coordinated as not to cause problems).
1) Operates in terms of G{Input,Output}Stream, not file descriptors
2) Standard GIO-style async API for wait() with cancellation
3) Makes some simple cases easy, like synchronously spawning a
   process with an argument list
4) Makes hard cases possible, like asynchronously running a process
   with stdout/stderr merged, output directly to a file path

Much rewriting and code review from Ryan Lortie <desrt@desrt.ca>

https://bugzilla.gnome.org/show_bug.cgi?id=672102
2013-10-17 14:32:44 -04:00
Ihar Hrachyshka
aaddd823bc Removed obsolete makefile rules
Removed test, test-report, full-report, perf-report.  They all come from
an old (now obsolete) approach toward glib testing[1]. Now the blessed
ways to test glib are 'make check' and installed tests.

[1]: https://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00000.html

https://bugzilla.gnome.org/show_bug.cgi?id=709995
2013-10-17 13:20:14 -04:00
Ryan Lortie
9defb6b1b1 New gapplication(1) tool
This is essentially a commandline implementation of the client-side of
the org.freedesktop.Application D-Bus interface.

It includes support for tab-completion based on desktop files and their
contents.

https://bugzilla.gnome.org/show_bug.cgi?id=704218
2013-10-17 10:12:27 -04:00
Ryan Lortie
38dfce5992 Add simple string "search" function
Add a pair of functions to make it easier to do simple string matching.

This will be useful for use with things like GtkSearchBar and will also
be the basis of the searching done by the (soon to appear)
g_desktop_app_info_search()

https://bugzilla.gnome.org/show_bug.cgi?id=709753
2013-10-14 16:48:42 -04:00
Ryan Lortie
4c510801cf Add g_str_is_ascii()
Add a function for checking if a string is pure ASCII.

https://bugzilla.gnome.org/show_bug.cgi?id=709753
2013-10-14 16:48:37 -04:00
Ryan Lortie
5d7a7df867 Add g_key_file_save_to_file()
To write a keyfile to disk.

https://bugzilla.gnome.org/show_bug.cgi?id=309224
2013-10-04 12:18:20 -04:00
Ryan Lortie
748c86e45f gio docs: add some missing functions 2013-09-23 17:07:33 -04:00
Ryan Lortie
6ec2bb17c3 GFile: add new g_file_measure_disk_usage() API
This is essentially the equivalent of 'du'.

This is currently only supported on local files.  gvfs will add support for the
interface later.

https://bugzilla.gnome.org/show_bug.cgi?id=704893
2013-09-06 13:16:17 -04:00
Sébastien Wilmet
6fbb146342 GRegex: add g_regex_get_max_lookbehind()
It is useful for multi-segment regex matching.

A unit test is included.

https://bugzilla.gnome.org/show_bug.cgi?id=689794
2013-07-23 15:43:22 +02: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
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
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
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
89f9f227d6 Add G_TYPE_CHECKSUM to the docs 2013-07-09 13:31:04 -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
Matthias Clasen
d30a2d92f3 docs: minor formatting fixes to the gresource man page
Make the SECTION argument appear the same way throughout.
2013-06-29 22:46:38 -04:00
Ryan Lortie
a61f718e5e small docs xml fixup 2013-06-24 11:19:25 -04:00
Emmanuele Bassi
54cc43630d Rename the generated private data getter function
As it turns out, we have examples of internal functions called
type_name_get_private() in the wild (especially among older libraries),
so we need to use a name for the per-instance private data getter
function that hopefully won't conflict with anything.
2013-06-24 15:43:04 +01:00
Emmanuele Bassi
1f6f7e1c4d docs: Clean up the GObject tutorial a bit
Started off by using the new instance private data macro, ended up
cleaning up the obscure, out of date, or simply broken concepts and
paragraphs.

https://bugzilla.gnome.org/show_bug.cgi?id=700035
2013-06-24 14:18:01 +01:00
Emmanuele Bassi
f870d5abdb docs: Include newly added functions and macros
The functions are private, and an implementation detail of the macros.

https://bugzilla.gnome.org/show_bug.cgi?id=700035
2013-06-24 14:18:01 +01:00
Emmanuele Bassi
270d73a1e0 docs: Fix g_binding_unbind() in the API reference 2013-06-12 11:24:55 +01:00
William Jon McCann
a681e11f92 Fix property example in gobject tutorial
https://bugzilla.gnome.org/show_bug.cgi?id=692848
2013-05-30 10:25:29 -04:00
Ryan Lortie
c7e965f4ee docs/: ignore gtester Makefile targets
Mark 'test', 'test-report', 'perf-report' and 'full-report' as PHONY in
docs/Makefile.am to prevent recursion of gtester into the documentation
subdirectories.  Stop including Makefile.decl from these directories
since it is no longer necessary.

This will clear up the warnings about EXTRA_DIST being defined once in
gtk-doc.make and again in Makefile.decl.
2013-05-29 21:36:50 -04:00
Ryan Lortie
575a9da718 gtest: Add more path building API
Add a pair of functions for returning strings that don't need to be
freed.  This is a bit of a hack but it will turn the 99% case of using
these functions from:

  gchar *tmp;
  tmp = g_test_build_filename (...);
  fd = open (tmp, ...);
  g_free (tmp);

to:

  fd = open (g_test_get_filename (...), ...);

which is a pretty substantial win.

https://bugzilla.gnome.org/show_bug.cgi?id=549783
2013-05-29 09:03:32 -04:00
Ryan Lortie
0c4806733c Add g_test_build_filename()
This function allows testcases to find data files in various situations
of srcdir == builddir, srcdir != builddir and for installed tests.

https://bugzilla.gnome.org/show_bug.cgi?id=549783
2013-05-29 09:03:31 -04:00
Jason L. Quinn
47d96381a2 spelling fixes of 'runtine' and 'adresses' in cross.xml and running.xml, respectively
https://bugzilla.gnome.org/show_bug.cgi?id=697849
2013-05-23 22:11:50 -04:00
Dan Winship
960f5500e2 gtestutils: add g_test_trap_subprocess()
g_test_trap_fork() doesn't work on Windows and is potentially flaky on
unix anyway given the fork-but-don't-exec. Replace it with
g_test_trap_subprocess(), which re-spawns the same program with
arguments telling it to run a specific (otherwise-ignored) test case.

Make the existing g_test_trap_fork() unit tests be unix-only (they
never passed on Windows anyway), and add a parallel set of
g_test_trap_subprocess() tests.

Also fix the logic of gtestutils's "-p" argument (which is used by the
subprocess tests); previously if you had tests "/foo/bar" and
"/foo/bar/baz", and ran the test program with "-p /foo/bar/baz", it
would run "/foo/bar" too. Fix that and add tests.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2013-05-13 12:10:52 -04:00
Matthias Clasen
6104230bce Document all gtester-report options
The --subunit option was missing from the man page.
2013-05-04 21:10:43 -04:00
Matthias Clasen
794401c0a2 Document all glib-mkenums placeholders
The @ENUMPREFIX@ placeholder was missing in the man page.
2013-05-04 21:08:18 -04:00
Matthias Clasen
f10dc91cee Document all glib-genmarshal options
The --stdinc option was missing from the man page.
2013-05-04 21:05:24 -04:00
Matthias Clasen
8d99b24a03 Fix a typo 2013-05-04 21:03:00 -04:00
Matthias Clasen
7b60a469b7 Document all gdbus-codegen options
The --help and --xml-files options were missing from the man page.
2013-05-04 21:01:35 -04:00
Emmanuele Bassi
a360b314aa binding: Add an explicit unbind()
Higher order languages with garbage collection can have issues releasing
a binding, as they do not control the last reference being dropped on
the binding, source, or target instances.

https://bugzilla.gnome.org/show_bug.cgi?id=698018
2013-05-02 15:50:21 -07:00
Matthias Clasen
20012ec9a9 Add 2.38 indexes to the docs 2013-05-01 00:16:25 -04:00
Cosimo Cecchi
03dd6cf1b5 docs: fix docs for g_icon_[de]serialize() 2013-04-24 11:58:47 -04:00
Ryan Lortie
c18462b580 GParamSpec: add g_param_spec_get_default_value()
The way of getting the default value out of a GParamSpec is to allocate
a GValue, initialise it, then call g_param_spec_set_default() to set the
default value into that GValue.

This is exactly how we handle setting the default value for all of the
construct properties that were not explicitly passed to g_object_new().

Instead of doing the alloc/init/store on all construct properties on
every call to g_object_new(), we can cache those GValues in the private
data of the GParamSpec itself and reuse them.

This patch does not actually make that change to g_object_new() yet, but
it adds the API to GParamSpec so that a future patch to GObject can make
the change.

https://bugzilla.gnome.org/show_bug.cgi?id=698056
2013-04-23 14:39:09 -04:00
Ryan Lortie
c30c0bb34d GType: add accessor for instance private offset
Since instance private data is now always at a constant offset to the
instance pointer, we can add an accessor for it that doesn't also
require an instance.

The idea is that classes can call this from their class_init and store
it in a file-scoped static variable and use that to find their private
data on instances very quickly, without a priv pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=698056
2013-04-23 14:39:09 -04:00
Ryan Lortie
c1c1b33f88 GMenu: add g_menu_item_set_icon() convenience
This function takes a GIcon, serialises it and sets the resulting
GVariant as the "icon" attribute on the menu item.  We will need to add
a patch to Gtk to actually consume this icon.

Also add G_MENU_ATTRIBUTE_ICON.

https://bugzilla.gnome.org/show_bug.cgi?id=688820
2013-04-22 16:12:42 -04:00
Ryan Lortie
9cc222c0bf Introduce GBytesIcon
GBytesIcon is an icon that has a GBytes inside of it where the GBytes
contains some sort of encoded image in a widely-recognised file format.
Ideally this will be a PNG.

It implements GLoadableIcon, so GTK will already understand how to use
it, but we will add another patch there to make things more efficient.

https://bugzilla.gnome.org/show_bug.cgi?id=688820
2013-04-21 16:25:15 -04:00
Ryan Lortie
dbb65b5465 GVariant: add new g_variant_new_take_string() API
Lots of people have variously asked for APIs like
g_variant_new_string_printf() in order to avoid having to use
g_strdup_printf(), create a GVariant using g_variant_new_string(), then
free the temporary string.

Instead of supporting that, plus a million other potential cases,
introduce g_variant_new_take_string() as a compromise.

It's not possible to write:

 v = g_variant_new_take_string (g_strdup_printf (....));

to get the desired result and avoid the extra copies.  In addition, it
works with many other functions.

https://bugzilla.gnome.org/show_bug.cgi?id=698455
2013-04-20 18:58:24 -04:00
Sébastien Wilmet
a2a44a9617 Add async version of g_file_make_directory()
https://bugzilla.gnome.org/show_bug.cgi?id=548353
2013-04-19 21:38:13 +02:00
Ryan Lortie
1de0625103 GMenu: add g_menu_remove_all() API
Removes all of the items from a GMenu.  The keyboard indicator wants to
do this as part of refreshing the layout list, as an example.

https://bugzilla.gnome.org/show_bug.cgi?id=697601
2013-04-19 14:52:51 -04:00
Jason Quinn
a12157b1f8 building.xml: Fix a typo of "fo" to "of"
https://bugzilla.gnome.org/show_bug.cgi?id=697771
2013-04-11 05:00:59 -04:00
Sébastien Wilmet
733bf96202 Add async version of g_file_trash()
https://bugzilla.gnome.org/show_bug.cgi?id=548353
2013-04-10 22:32:33 +02:00
Cosimo Cecchi
db325cd6a3 application: introduce methods to mark the application as busy
This feature is intended for clients that want to signal a desktop shell
their busy state, for instance because a long-running operation is
pending.
The API works in a similar way to g_application_hold and
g_application_release: applications can call g_application_mark_busy()
to increase a counter that will keep the application marked as busy
until the counter reaches zero again.

The busy state is exported read-only on the org.gtk.Application interface
for clients to use.

https://bugzilla.gnome.org/show_bug.cgi?id=672018
2013-04-04 13:13:53 -04:00
Ryan Lortie
8cddb54659 gaction: add parser for detailed action names
Expand and formalise the syntax for detailed action names, adding a
well-documented (and tested) public parser API for them.

Port the only GLib-based user of detailed action names to the new API:
g_menu_item_set_detailed_action().  The users in Gtk+ will also be
ported soon.

https://bugzilla.gnome.org/show_bug.cgi?id=688954
2013-04-01 16:53:54 -04:00
Tristan Van Berkom
dd0ea5dcc2 Added examples to GTestDBus documentation 2013-03-21 16:37:21 +09:00
Matthias Clasen
d59acb701e Small cleanup to tutorial headings
This makes all the subsection headers consistent.
https://bugzilla.gnome.org/show_bug.cgi?id=659428
2013-03-17 23:01:21 -04:00
Thomas Perl
e4695bd6f5 docs/reference/glib/cross.xml: Fix typo: yes/np -> yes/no
https://bugzilla.gnome.org/show_bug.cgi?id=693502
2013-02-15 10:12:36 -05:00
Dan Winship
ee17a54c28 GSimpleProxyResolver: new simple GProxyResolver class
Add GSimpleProxyResolver, for letting people do static proxy
resolution, and to use as a base class for other resolvers (such as
GProxyResolverGnome).

https://bugzilla.gnome.org/show_bug.cgi?id=691105
2013-02-14 10:24:14 -05:00
Dan Winship
7c49869eae GSocketClient: add proxy-resolver property
Add a proxy-resolver property to GSocketClient, to allow overriding
proxy resolution in situations where you need to force a particular
proxy rather than using the system defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=691105
2013-02-14 10:24:14 -05:00
Matthias Clasen
844527c037 Document GIO_USE_FILE_MONITOR 2013-02-03 14:08:02 -05:00
Matthias Clasen
c5ec4831fa Trivial doc comment formatting fix 2013-02-03 13:46:50 -05:00
Matthias Clasen
9c72b5776a add 2.36 index to gobject docs 2013-02-03 13:26:36 -05:00
Matthias Clasen
349e601864 Add 2.36 index to glib docs 2013-02-03 13:25:56 -05:00
Matthias Clasen
f302c65584 Add a 2.36 index to gio docs 2013-02-03 13:24:59 -05:00
Matthias Clasen
1e4b5a3267 Minor doc build cleanups 2013-02-03 13:22:28 -05:00
Matthias Clasen
79d7a138af Make GUnixFDSourceFunc show up in the docs 2013-02-03 13:17:59 -05:00
Matthias Clasen
ab328469f5 Silence automake
automake doesn't like INCLUDES anymore.
2013-02-02 22:54:15 -05:00
Colin Walters
f398bec5bc Add g_close(), use it
There are two benefits to this:

1) We can centralize any operating system specific knowledge of
   close-vs-EINTR handling.  For example, while on Linux we should never
   retry, if someone cared enough later about HP-UX, they could come by
   and change this one spot.
2) For places that do care about the return value and want to provide
   the caller with a GError, this function makes it convenient to do so.

Note that gspawn.c had an incorrect EINTR loop-retry around close().

https://bugzilla.gnome.org/show_bug.cgi?id=682819
2013-01-29 09:46:04 -05:00
Ryan Lortie
6d1a663609 Add a UNIX fd source
https://bugzilla.gnome.org/show_bug.cgi?id=658020
2013-01-15 14:08:02 -05:00
Ryan Lortie
cbf68cb22d gsource: Add support for file descriptors on UNIX
Adding file descriptors to a GSource provides similar functionality to
the old g_source_add_poll() API with two main differences.

First: the list of handles is managed internally and therefore users are
prevented from randomly modifying the ->events field.  This prepares us
for an epoll future where changing the event mask is a syscall.

Second: keeping the list internally allows us to check the ->revents for
events for ourselves, allowing the source to skip implementing
check/prepare.  This also prepares us for the future by allowing an
implementation that doesn't need to iterate over all of the sources
every time.

https://bugzilla.gnome.org/show_bug.cgi?id=686853
2013-01-15 14:08:02 -05:00
Ryan Lortie
768574635d GSource: new API g_source_set_ready_time()
Add an API to mark a GSource to automatically become ready at the
specified monotonic time.

https://bugzilla.gnome.org/show_bug.cgi?id=657729
2013-01-15 14:08:02 -05:00
Dieter Verfaillie
af27baaaef Fix build with --enable-gtk-doc
https://bugzilla.gnome.org/show_bug.cgi?id=691001
2013-01-02 13:10:31 +01:00
Matthias Clasen
3e5068c186 Add a --with-python option
The effect is the same as specifying PYTHON=python3, but a
configure option works better in jhbuild.
https://bugzilla.gnome.org/show_bug.cgi?id=684103
2013-01-01 15:49:06 -05:00
Jasper St. Pierre
5e62827efd gmarkup: Make GMarkupParseContext a boxed type
At the same time, add a refcount and public ref/unref methods.
This makes it usable from introspectable.

https://bugzilla.gnome.org/show_bug.cgi?id=690084
2013-01-01 11:03:19 -05:00
Matthias Clasen
157f80c244 Drop a broken link
The GSettings migration docs had a link to the no-longer existing
gsettings-tutorial branch of gnome-utils. Remove it.
https://bugzilla.gnome.org/show_bug.cgi?id=690043
2013-01-01 10:25:07 -05:00
Matthias Clasen
08dce819cc Revert "gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()"
This reverts commit e3a29184d5.
2012-12-19 15:20:45 -05:00
Simon McVittie
8f65536504 GCredentials: add getter/setter for the Unix process ID
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687920
2012-12-19 15:08:09 -05:00
Dan Winship
e3a29184d5 gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()
g_test_trap_fork() doesn't work on Windows and is potentially flaky on
unix anyway given the fork-but-don't-exec. Replace it with
g_test_trap_subprocess(), which re-spawns the same program with
arguments telling it to run a specific (otherwise-ignored) test case.

Make the existing g_test_trap_fork() unit tests be unix-only (they
never passed on Windows anyway), and add a parallel set of
g_test_trap_subprocess() tests.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:08 -05:00
Colin Walters
2149b29468 Add g_get_num_processors()
Based on a patch from John Cupitt <jcupitt@gmail.com>

Useful for thread pools which should scale to number of processors.

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

https://bugzilla.gnome.org/show_bug.cgi?id=614930
2012-12-18 13:13:15 -05:00
Jasper St. Pierre
3c87ab97ff gfileenumerator: Add a g_file_enumerator_get_child method
This is a new convenience method designed to simplify some use
cases of GFileEnumerator, by making it easy to get the next file
from a file enumerator.

https://bugzilla.gnome.org/show_bug.cgi?id=690083
2012-12-13 21:38:18 -05:00
Dan Winship
211ed1775d gsocket: add getsockopt/setsockopt wrappers
Add g_socket_get_option() and g_socket_set_option(), wrapping
getsockopt/setsockopt for the case of integer-valued options. Update
code to use these instead of the underlying calls.

https://bugzilla.gnome.org/show_bug.cgi?id=623187
2012-12-12 15:20:22 +01:00
Dan Winship
b377e69685 Add gnetworking.h
Install a public "gnetworking.h" header that can be used to include
the relevant OS-dependent networking headers. This does not really
abstract away unix-vs-windows however; error codes, in particular,
are incompatible.

gnetworkingprivate.h now contains just a few internal URI-related
functions

Also add a g_networking_init() function to gnetworking.h, which can be
used to explicitly initialize OS-level networking, rather than having
that happen as a side-effect of registering GInetAddress.

https://bugzilla.gnome.org/show_bug.cgi?id=623187
2012-12-12 15:20:22 +01:00
Alexander Larsson
e218b96a6b Add g_type_get_type_registration_serial()
This lets you cache type lookup information and then know when
the cache information is out of date. In particular, we want this
in order to be able to cache g_type_from_name() lookups in the Gtk+
theme machinery.

https://bugzilla.gnome.org/show_bug.cgi?id=689847
2012-12-10 12:55:28 +01:00
Dan Winship
e97a2f4195 win32: suppress fatal error dialog box when running tests
When running a test program (ie, if g_test_init() has been called),
don't pop up a dialog box when a fatal error occurs. Just print the
message to stderr and exit.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-05 11:15:19 -05:00
Matthias Clasen
2b6be7544c Add new api to the docs 2012-11-28 00:58:03 -05:00
Colin Walters
ed5c17e11f GMemoryOutputStream: Add new _resizable() constructor usable from bindings
Really, the memory output stream API is too warped around the model
where it's a fixed size buffer that you've already allocated.  Even in
C, I find myself always wanting to use it to just accumulate data into
an arbitrary-sized buffer it allocates.

Unfortunately, it's also not usable from bindings because it's not
common to bind g_free() and g_realloc(), but if you just pass NULL, you
get the default of a fixed size, which is useless as per above.

I am going to use this from a gjs test case, and the GSubprocess test
cases also will use it.

https://bugzilla.gnome.org/show_bug.cgi?id=688931
2012-11-27 20:45:21 -05:00
Ryan Lortie
3baf256a2c gio: New API for GFile from remote commandline arg
Add a pair of new APIs: one to GFile to create a new file from a
commandline arg relative to a given cwd and one to
GApplicationCommandLine to create a GFile from an arg, relative to the
cwd of the invoking commandline.

https://bugzilla.gnome.org/show_bug.cgi?id=689037
2012-11-27 10:10:37 -05:00
Matthias Clasen
419a1e4040 Add new API to the docs 2012-11-21 21:20:25 -05:00
Sebastian Dröge
46a92a760b Add boxed GType for GThread
https://bugzilla.gnome.org/show_bug.cgi?id=688704
2012-11-20 15:03:06 +01:00
Kalev Lember
11e306a759 Fix a broken link in GConf migration guide
gnome-utils git repo was moved to archive/ and this broke the link.
2012-11-16 17:33:14 +01:00
Dan Winship
03ef7ba5ab win32: re-fix the _utf8 compat function situation
The previous fix didn't work, because every place within glib that
used any of the functions also needed to be including win32compat.h.

So, move the prototypes back to their original headers (but at least
all in one place at the bottom).

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-16 08:22:06 -05:00
Dan Winship
08f4f92fed win32: add gwin32compat.h, for utf8-renaming compatibility defines
To avoid -Wmissing-prototype warnings, we need to prototype both the
original and the _utf8 versions of all of the functions that have had
_utf8-renaming on Windows. But duplicating all the prototypes is ugly,
so rather than doing them "in-place", move them all to a new header
file just for that.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:05 -05:00
Matthias Clasen
8caf39b59b Add an option to make glib-compile-resources use G_GNUC_INTERNAL
https://bugzilla.gnome.org/show_bug.cgi?id=687742
2012-11-09 22:14:39 -05:00
Martin Pitt
1af1b2b2bb Box GPollFD to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-11-05 14:41:31 +01:00
Martin Pitt
a5c5730085 Revert "Box GPollFD to make it introspectable"
This reverts commit 932f4250b8.

This got pushed accidentally and has not been accepted yet. It's also not clear
whether we want this in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-10-25 11:27:39 +02:00
Martin Pitt
932f4250b8 Box GPollFD to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-10-25 07:58:09 +02:00
Colin Walters
4fb2d737ac gvariant: Make g_variant_new_from_bytes() public
Now that GBytes has been made public, we should make
g_variant_new_from_bytes() public too.

Add g_variant_get_data_as_bytes() to match.

https://bugzilla.gnome.org/show_bug.cgi?id=677062
2012-10-23 16:25:49 +02:00
Ryan Lortie
7c42ab23b5 Convert g_type_init() to a ctor
Move the guts of g_type_init() into a ctor and turn g_type_init() itself
into a do-nothing function.

g_type_init_with_debug_flags() now ignores its arguments, but it has
always been possible to achieve the same effect via environment
variables.

https://bugzilla.gnome.org/show_bug.cgi?id=686161
2012-10-16 09:39:24 -04:00
Dan Winship
55e7ca6e1b gio: deprecate gioscheduler, soft deprecate GSimpleAsyncResult
Reimplement gioscheduler in terms of GTask, and deprecate the original
gioscheduler methods. Update docs to point people to GTask rather than
gioscheduler and GSimpleAsyncResult, but don't actually formally
deprecate GSimpleAsyncResult yet.

https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-10-10 10:29:36 -04:00
Dan Winship
4aeefa70a1 GTask: new GAsyncResult implementation / threaded task manager
GTask is a replacement for GSimpleAsyncResult and GIOScheduler, that
also allows for making cancellable wrappers around non-cancellable
functions (as in GThreadedResolver).

https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-10-10 10:29:36 -04:00
Dan Winship
eb2f5c1e0f Add GLIB_VERSION_2_36 and related 2012-10-03 16:36:38 -04:00
David Zeuthen
fa6a684630 gdbus-codegen: make members of an interface inherit the "Since" annotation
This is the expected (and sane) behavior - without this bug-fix you'd
have to add "Since" to every member of a newly added D-Bus interface.

Also show-case this in the codegen example.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-10-03 11:13:12 -04:00
Matthias Clasen
3ff9645a4d Typo fix 2012-09-23 19:55:40 -04:00
Matthias Clasen
580b58c3c0 Update GConf migration guide
Newer intltool makes this much easier. Yay
https://bugzilla.gnome.org/show_bug.cgi?id=674620
2012-09-23 11:23:29 -04:00
Matthias Clasen
80105f173a Fix the doc build 2012-09-14 19:40:24 -04:00
William Jon McCann
cc3238a9c9 Add api to get the generic icon name for a mime type
https://bugzilla.gnome.org/show_bug.cgi?id=683744
2012-09-13 12:50:02 -04:00
Matthias Clasen
47a3b76ac5 Move GIO-specific information to the GIO docs 2012-09-11 23:15:03 -04:00
Matthias Clasen
fc7dc33113 Add a section about writing GLib applications
For now, this includes some information about threads and security.
2012-09-11 22:41:18 -04:00
Matthias Clasen
6a50dc511b Drop GVFS_INOTIFY_DIAG debug feature
Just not a good idea to have this in production code.
2012-09-11 20:24:30 -04:00
Martin Pitt
02f143c2d9 Box GTimeZone to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=683167
2012-09-06 06:18:42 +02:00
Matthias Clasen
a30f6a6eb8 Add new api to symbol lists and docs
https://bugzilla.gnome.org/show_bug.cgi?id=682849
2012-09-02 15:10:20 -04:00
William Jon McCann
40b4fae42e Add ability to get symbolic icon for content type
https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
William Jon McCann
a15a071f35 Add symbolic icon support to gfileinfo
https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
William Jon McCann
a2dca48bf7 Add symbolic icon support to drive, volume, and mount
We need symbolic icon support for display in Nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
Matthias Clasen
702b448865 Add a G_DEFINE_QUARK macro
https://bugzilla.gnome.org/show_bug.cgi?id=627240
2012-08-28 00:08:07 -04:00
Dan Winship
0c0cdfd9c4 gtestutils: add g_test_add_data_func_full()
Like g_test_add_data_func(), but includes a GDestroyNotify for the
test data.

https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-08-27 07:31:13 -04:00
Colin Walters
ac7c050d37 docs: Ensure CLEANFILES is set before we use +=
We need to be defensive about this in the case where gtk-doc.make is
empty.
2012-08-25 17:13:43 -04:00
Ryan Lortie
59394b3e1e Revert the GMarkup attribute collect changes
We need to have some more discussion on this topic.

This reverts commits 86329ba44f and
8d40389d15.

https://bugzilla.gnome.org/show_bug.cgi?id=665634
2012-08-20 18:34:13 -04:00
Ryan Lortie
6798fcdd0f GMenuItem: add constructor to copy from model
Add g_menu_item_new_from_model() for constructing a GMenuItem that is a
copy of a menu item that's in a GMenuModel.
2012-08-20 16:26:25 -04:00
Ryan Lortie
99478dd893 GMenuItem: add getter APIs
GMenuItem has been write-only up to this point.  Add some APIs for
reading back values as well.
2012-08-20 16:26:25 -04:00
Ryan Lortie
34653169e5 GVariant: add g_variant_check_format_string()
For some time now people have been asking for a way to check for type
compatibility between GVariant instances and format strings.  There are
several APIs inside of GLib itself that would benefit from this.

This patch introduces a way to do that.
2012-08-20 16:26:25 -04:00
Dan Winship
25ac137c0a gtestutils: add g_text_expect_message()
Add g_test_expect_message() and g_test_assert_expected_messages(), to
allow tests of warnings, error messages, return-if-fails, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=679556
2012-08-20 13:54:52 -04:00
Colin Walters
056d39c9f7 GMappedFile: Add g_mapped_file_get_bytes()
This is yet another API that has a data/length/refcount combination
that one might often want to turn into a GBytes.

https://bugzilla.gnome.org/show_bug.cgi?id=677065
2012-08-17 00:48:40 -04:00
Matthias Clasen
8d40389d15 gmarkup: Add g_markup_collect_known_attributes()
Add a variant of g_markup_collect_attributes() which will
ignore unknown attributes (such as those from different XML
namespaces) when parsing markup, rather than returning
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE as g_markup_collect_attributes()
does.

Patch by Philip Withnall,
https://bugzilla.gnome.org/show_bug.cgi?id=665634
2012-08-16 23:40:08 -04:00
Matthias Clasen
2ccf64ba59 Improve glib-genmarshal man page
Expand the example in glib-genmarshal.1 to include the actual
commandline invocations, and update the generated function
names to match reality.
https://bugzilla.gnome.org/show_bug.cgi?id=637460
2012-08-16 18:46:17 -04:00
Colin Walters
aa50b8aec3 build: Fix the --disable-man case
The manpage listing needs to be inside the conditional.
2012-08-16 18:31:02 -04:00
Matthias Clasen
b60168a5f5 Remove man page placeholder generation
I don't see a good reason for this - if man page generation is
disabled, man pages are not produced, and things like 'make dist'
will fail. That is simpler and better.

https://bugzilla.gnome.org/show_bug.cgi?id=681336
2012-08-16 18:06:11 -04:00
Matthias Clasen
4cd5a63f12 Clean up man pages on 'clean'
Follow the automake heuristic that says "if 'make' created it,
'make clean' should remove it".

https://bugzilla.gnome.org/show_bug.cgi?id=681336
2012-08-16 18:06:08 -04:00
Matthias Clasen
ce531302cd Make --enable-man and --enable-gtk-doc independent
Previously, --enable-man --disable-gtk-doc would silently skip
man page generation, because we didn't even desdend into docs/reference.
Fix this by always going there.

https://bugzilla.gnome.org/show_bug.cgi?id=681336
2012-08-16 18:06:05 -04:00
Matthias Clasen
317d91d06b Fix an example
Pointed out by Chandni Verma in
https://bugzilla.gnome.org/show_bug.cgi?id=682025
2012-08-16 17:21:03 -04:00
Sebastian Geiger
6b201748b5 compiling.xml: Add note and fix gcc example
Because of the '--as-needed' default option
for the linker, the linking will fail, if the
file name appears after any of the options or
the pkg-config invocation.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681854
2012-08-15 02:34:50 +09:00
David Rothlisberger
be7095980e gobject docs: Remove confusing acronym
In the wikipedia disambiguation page[1] the only entry that even
remotely makes sense in this context is "and so on". Google searches
for "aso memory management" and "aso garbage collection" don't yield
anything relevant.

[1] http://en.wikipedia.org/wiki/ASO

https://bugzilla.gnome.org/show_bug.cgi?id=679996
2012-08-06 10:26:45 -04:00
David Rothlisberger
bcda26a504 gobject docs: Remove incorrect reference to signals docs
The chapter on signals comes after this chapter, not before (see
"tut_gobject.xml" in docs/reference/gobject/gobject-docs.xml).

https://bugzilla.gnome.org/show_bug.cgi?id=679996
2012-08-06 10:26:44 -04:00
Stef Walter
278fe0c67f gchecksum: Add g_compute_checksum_for_bytes()
* Add a GBytes based version of g_compute_checksum_for_data()
 * Add appropriate tests

https://bugzilla.gnome.org/show_bug.cgi?id=680912
2012-08-06 10:38:39 +02:00
Javier Jardón
0f6a092cc5 Make gtk-doc not a hard dependency of GLib
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674314
2012-08-05 22:29:28 +09:00
Matthias Clasen
08dd0f246a docs: Improve man page consistency
Make Options sections refsect1 instead of refsect2, and use
uppercase for argument names. Also add a product name, and
shorten some argument names.
2012-08-03 23:36:45 -04:00
Matthias Clasen
d241978412 docs: Improve man page generation
Use $(AM_V_GEN) for generating man pages, and set some parameters
for the XSL stylesheets. Among other things, don't generate AUTHORS
and COPYRIGHT sections.
2012-08-03 23:36:45 -04:00
Stef Walter
6ddf40f301 gtlscertificate: Add g_tls_certificate_is_same() function
* Certificate equality in PKIX in general is equality between
   the DER encoding of the certificates.

https://bugzilla.gnome.org/show_bug.cgi?id=681116
2012-08-03 18:58:30 +02:00
Colin Walters
14a1c20177 GFile: Add g_file_delete_async()
This looks like it was stubbed out but not implemented; the vtable
entry dates to commit 3781343738 which
is just alex's initial merge of gio into glib.

I was working on some code that wants an asynchronous rm -rf
equivalent, and so yeah, this is desirable.

https://bugzilla.gnome.org/show_bug.cgi?id=680760
2012-07-30 05:01:06 -04:00
Colin Walters
f7abd3ce13 Add g_spawn_check_exit_status()
Many (if not "almost all") programs that spawn other programs via
g_spawn_sync() or the like simply want to check whether or not the
child exited successfully, but doing so requires use of
platform-specific functionality and there's actually a fair amount of
boilerplate involved.

This new API will help drain a *lot* of mostly duplicated code in
GNOME, from gnome-session to gdm.  And we can see that some bits even
inside GLib were doing it wrong; for example checking the exit status
on Unix, but ignoring it on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=679691
2012-07-10 18:03:56 -04:00
Dan Winship
82d914d808 gio: add g_async_result_is_tagged()
Rather than doing a two step first-check-the-GAsyncResult-subtype-then-
check-the-tag, add a GAsyncResult-level method so that you can do them
both at once, simplifying the code for "short-circuit" async return
values where the vmethod never gets called.

https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-07-10 10:49:20 -04:00
Dan Winship
f8532a13e2 gio: Add g_async_result_legacy_propagate_error()
Finish deprecating the "handle GSimpleAsyncResult errors in the
wrapper function" idiom (and protect against future GSimpleAsyncResult
deprecation warnings) by adding a "legacy" GAsyncResult method
to do it in those classes/methods where it had been traditionally
done.

(This applies only to wrapper methods; in cases where an _async
vmethod explicitly uses GSimpleAsyncResult, its corresponding _finish
vmethod still uses g_simple_async_result_propagate_error.)

https://bugzilla.gnome.org/show_bug.cgi?id=667375
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-07-10 10:49:14 -04:00
Stef Walter
3b0f1cc432 Fix up GObject interface documentation
* Document how to override interfaces already implemented
   in a base class, and also call those base class implementations
   from a derived reimplementation.
 * Don't recomend people use base_init() style functions to
   initialize interface signals and properties, use default_init()
   aka class_init() instead (as G_DEFINE_INTERFACE() uses).
 * The above solves the interface init called multiple times
   problem, so remove some needless naysaying about that.
 * Document default_init() in the interface initialization discussion
 * Linkify more stuff.
 * Remove some crud and typos

https://bugzilla.gnome.org/show_bug.cgi?id=675504
2012-07-09 17:47:39 +02:00
Colin Walters
4ac0d78d5d GString: Tweak documentation, add g_string_free_to_bytes()
The docs for GString should really mention GByteArray, and what makes
it different.  Drop the comparison to Java which is dated and actually
inaccurate (because StringBuffer operates on Unicode).

While we're here, add g_string_free_to_bytes(), which further
complements the spread of GBytes-based API.  For example, one can
create a buffer using GString, then send it off via
g_output_stream_write_bytes().

https://bugzilla.gnome.org/show_bug.cgi?id=677064
2012-07-06 10:19:12 -04:00
Ryan Lortie
5d7fa1c783 GObject docs fixup 2012-07-03 15:40:44 -04:00
Christian Persch
69a12e3275 regex: Add accessor for PCRE_INFO_HASCRORLF
This flag is new in PCRE 7.3, and checks whether there is an explicit
CR or LF reference in the pattern.
2012-07-02 15:59:34 +02:00
Ryan Lortie
4780ee5d4a glib/: gtk-doc cleanup 2012-06-25 23:23:58 -04:00
Matthew Barnes
49e5075707 Add g_dbus_object_manager_server_is_exported()
Returns whether a GDBusObjectSkeleton is exported on a
GDBusObjectManagerServer.

https://bugzilla.gnome.org/show_bug.cgi?id=678539
2012-06-21 23:41:54 -04:00
Jonh Wendell
2fd6eb7e1c Adds g_list_copy_deep and g_slist_copy_deep
They make a full (deep) copy of a list.

In contrast with g_[s]list_copy(), these functions take a function as a argument
to make a copy of each list element, in addition to copying the list container itself.

The functions g_[s]list_copy() were reimplemented to just call the new functions
with NULL as the function argument, which will behave like current implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=675024
2012-06-21 17:21:30 -03:00
Dan Winship
a1da843cb4 docs: fix an example 2012-06-16 10:38:50 -04:00
Tomas Bzatek
032e8dabd1 gdbus: Implement g_dbus_connection_get_last_serial()
This patch brings an ability to retrieve serial number of the last
message sent within the current thread.

https://bugzilla.gnome.org/show_bug.cgi?id=676825
2012-06-06 19:44:39 +02:00
Dan Winship
800d6ff111 gio: add GBytes-based input/output stream methods
Using a caller-supplied buffer for g_input_stream_read() doesn't
translate well to the semantics of many other languages, and using a
non-refcounted buffer for read_async() and write_async() makes it
impossible to manage the memory correctly currently in
garbage-collected languages.

Fix both of these issues by adding a new set of methods that work with
GBytes objects rather than plain buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671139
2012-05-24 17:48:13 -04:00
Giovanni Campagna
0417ddab6f GAppInfo: add a mechanism to query supported content types
This essentially adds an accessor for the MimeType field in desktop files,
to retrieve the list of all mime types supported by an application.
The interface though is part of GAppInfo, so it could be implemented
in the future by other backends.

https://bugzilla.gnome.org/show_bug.cgi?id=674111
2012-05-16 12:42:12 +02:00
Dan Winship
e011d2c921 Add g_type_ensure() and use it rather than playing games with volatile
https://bugzilla.gnome.org/show_bug.cgi?id=605976
2012-05-15 13:46:38 -04:00
Ryan Lortie
eb5381b862 GApplication: add accessor for DBus information
Provide public access to the GDBusConnect and object path that
GApplication is using.  Prevents others from having to guess these
things for themselves based on the application ID.

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:43:06 -04:00
Xavier Claessens
00285b7517 Add g_clear_pointer()
Also reimplement g_clear_object() using g_clear_pointer()

https://bugzilla.gnome.org/show_bug.cgi?id=674634
2012-04-27 09:42:29 +02:00
Javier Jardón
d18a9caf03 docs: Use latest docbook dtd: 4.5 2012-04-23 02:46:18 +01:00
Javier Jardón
ee44211f1a docs: rename *-docs.sgml to *-docs.xml
We are using xml docbook nowadays
2012-04-23 02:31:32 +01:00
Javier Jardón
3ea31fc0f1 docs: Add index to new api added in 2.34 2012-04-23 02:23:31 +01:00
Dan Winship
bcaa0a3820 gio: Add more information to GProxyAddress
Add two new methods to GProxyAddress for recovering information about
the destination URI that the proxy was created for (and modify
GProxyAddressEnumerator to set that information when creating the
GProxyAddress).
2012-04-22 15:24:29 -04:00
Xavier Claessens
95bf3d1194 Add GTestDBus object
This is a helper to write unit tests using a private dbus-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=672985
2012-04-19 10:06:26 +02:00
David Zeuthen
a6f83d73e5 Revert "Add GTestDBus object"
This reverts commit 1b5f70b5b0.
2012-04-18 13:47:51 -04:00
Xavier Claessens
1b5f70b5b0 Add GTestDBus object
This is a helper to write unit tests using a private dbus-daemon.

session_bus_up/down() are now just wrappers around a GTestDBus singleton.

https://bugzilla.gnome.org/show_bug.cgi?id=672985
2012-04-18 11:19:13 -04:00
Dan Winship
111ba203c2 gpollableutils: utility functions for pollable stream implementations
Move g_pollable_source_new() here from gpollableinputstream.c, add
g_pollable_source_new_full(), and add some new methods to do either
blocking or nonblocking reads depending on a boolean argument.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
2012-04-17 12:33:12 -04:00
Stef Walter
666374c16f Add support for MX, TXT, NS and SOA records to GResolver
* Add resolver functions for looking up DNS records of
   various types. Currently implemented: MX, TXT, SOA, SRV, NS
 * Return records as GVariant tuples.
 * Make the GSrvTarget lookups a wrapper over this new
   functionality.
 * Rework the resolver test so that it has support for
   looking up MX, NS, SOA, TXT records, and uses GOptionContext

https://bugzilla.gnome.org/show_bug.cgi?id=672944
2012-04-16 15:51:39 +02:00
David Zeuthen
ce81bd87c5 GDBusAuthObserver: Add a way to control what authentication mechanisms to use
This is related to https://bugzilla.gnome.org/show_bug.cgi?id=673943
but also useful in a lot of other contexts.
2012-04-14 11:52:20 -04:00
Giovanni Campagna
bb7f3e0cbd GDesktopAppInfo: add an accessor for StartupWMClass
Components using GIO to do window to application matching can
use that field to retrieve potential candidates.

https://bugzilla.gnome.org/show_bug.cgi?id=673659
2012-04-14 02:44:25 +02:00
Matthias Clasen
d0b429af48 Revert "GDesktopAppInfo: add an accessor for StartupWMClass"
This reverts commit 3ccc4cf91d.
2012-04-06 19:15:53 -04:00
Giovanni Campagna
3ccc4cf91d GDesktopAppInfo: add an accessor for StartupWMClass
Components using GIO to do window to application matching can
use that field to retrieve potential candidates.

https://bugzilla.gnome.org/show_bug.cgi?id=673659
2012-04-07 00:22:02 +02:00
David King
548337b042 docs: Fix typo in glib-compile-schemas man page 2012-04-02 10:22:56 +01:00
Ryan Lortie
1b08ad61cd man pages: document the order of schema overrides
GSettings overrides are processed in such a way that
alphabetically-later files have precedence over earlier files (eg: 20_
will beat 10_).  Document that fact.
2012-03-17 12:41:36 -04:00
Ryan Lortie
4804094472 GSimpleAsyncResult: support reliable cancellation
Add a function g_simple_async_result_set_check_cancellable() to provide
a GCancellable that is checked for being cancelled during the call to
g_simple_async_result_propagate_error().

This gives asynchronous operation implementations an easy way to
provide reliable cancellation of those operations -- even in the case
that a positive result has occured and is pending dispatch at the time
the operation is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=672013
2012-03-14 08:36:11 -04:00
Matthias Clasen
17fe7fbd5a Update glib-genmarshal docs
A bunch of new commandline options sneaked in without docs...
2012-03-05 08:32:07 -05:00
Michael Biebl
f3bf532a3c build: include glib-compile-resources.xml in the dist tarball
https://bugzilla.gnome.org/show_bug.cgi?id=671281
2012-03-04 00:26:10 +01:00
David Zeuthen
10fbfcf090 Add G_VOLUME_IDENTIFIER_KIND_CLASS identifier
If an application (such as Nautilus) wants to show a sidebar with
devices group into different groups such as "Devices" and "Network",
it's currently up to the application itself to do the classification
(for example by looking at the URI scheme for the activation root,
e.g. smb://).

This patch adds a new identifier G_VOLUME_IDENTIFIER_KIND_CLASS that
can be set by volume monitors and used by applications.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-01 14:06:43 -05:00
Matthias Clasen
c67ad269f1 Fix doc build again
The way gtk-doc works, we need compiling.sgml in both
content_files (to make sure it ends up in the disted tarball)
and in expand_content_files (to have references expanded).
2012-02-27 07:16:11 -05:00
Rico Tzschichholz
fecdb4f8dc docs/glib: Moving back compiling.sgml to content_files to fix make dist 2012-02-27 12:50:18 +01:00
Matthias Clasen
76175ab9ed Improve documentation around deprecations 2012-02-27 00:18:47 -05:00
Emmanuele Bassi
34aeeb7d64 Add flexible API version boundaries
There are cases when it should be possible to define at compile time
what range of functions and types should be used, in order to get,
or restrict, the compiler warnings for deprecated or newly added
types or functions.

For instance, if GLib introduces a deprecation warning on a type in
version 2.32, application code can decide to specify the minimum and
maximum boundary of the used API to be 2.30; when compiling against
a new version of GLib, this would produce the following results:

  - all deprecations introduced prior to 2.32 would emit compiler
    warnings when used by the application code;
  - all deprecations introduced in 2.32 would not emit compiler
    warnings when used by the application code;
  - all new symbols introduced in 2.32 would emit a compiler warning.

Using this scheme it should be possible to have fairly complex
situations, like the following one:

  assuming that an application is compiled with:
    GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_2_30
    GLIB_VERSION_MAX_ALLOWED  = GLIB_VERSION_2_32

  and a GLib header containing:

    void function_A (void) GLIB_DEPRECATED_IN_2_26;
    void function_B (void) GLIB_DEPRECATED_IN_2_28;
    void function_C (void) GLIB_DEPRECATED_IN_2_30;
    void function_D (void) GLIB_AVAILABLE_IN_2_32;
    void function_E (void) GLIB_AVAILABLE_IN_2_34;

  any application code using the above functions will get the following
  compiler warnings:

    function_A: deprecated symbol warning
    function_B: deprecated symbol warning
    function_C: no warning
    function_D: no warning
    function_E: undefined symbol warning

This means that it should be possible to gradually port code towards
non-deprecated API gradually, on a per-release basis.

https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-26 23:58:41 -05:00
Ryan Lortie
ed51975899 GApplication: add g_application_quit()
A long requested feature; this quits the application immediately,
ignoring the hold count.

https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:20:39 +01:00
David King
1965206be8 docs: Ignore private network monitor headers 2012-02-21 01:10:54 +01:00
Dan Winship
726257ab97 gsocket: add g_socket_condition_timed_wait()
https://bugzilla.gnome.org/show_bug.cgi?id=667755
2012-02-20 18:29:51 -05:00
David King
b50863aafa docs: Add GIOModuleScope and GIOModuleScopeFlags
Fix some typos and add GIOModuleScope and GIOModuleScopeFlags to
gio-sections.txt.
2012-02-18 11:11:52 +00:00
Matthias Clasen
52f34311b9 Docs: fix reference to nonexisting function
The regex syntax docs referred to g_regex_fetch() when
g_match_info_fetch() was meant.

https://bugzilla.gnome.org/show_bug.cgi?id=669865
2012-02-16 13:33:44 -05:00
Dan Winship
ca05902a58 Add G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Add new macros to disable -Wdeprecated-declarations around a piece of
code, using the C99 (and GNU89) _Pragma() operator. Replace the
existing use of #pragma for this in gio, and suppress the warnings in
gvaluearray.c as well.

https://bugzilla.gnome.org/show_bug.cgi?id=669671
2012-02-15 09:54:38 -05:00
Dan Winship
dd553a2ba3 gasyncqueue: deprecate GTimeVal-based methods, add relative-delay ones
https://bugzilla.gnome.org/show_bug.cgi?id=669670
2012-02-13 09:09:08 -05:00
Matthias Clasen
967f3f83a7 Add a few more missing functions to the docs 2012-02-10 22:21:42 -05:00
Matthias Clasen
5278d1f6af Add g_settings_new_full to the docs 2012-02-10 22:08:47 -05:00
Matthias Clasen
cd3aebc96e Add g_test_undefined to the docs 2012-02-10 21:10:58 -05:00
Matthias Clasen
6293105593 Drop menu markup docs
This does not exist anymore.
2012-02-10 18:06:10 -05:00
Javier Jardón
7e657d1e5c docs: Fix some typos in gwin32inputstream 2012-02-10 20:09:20 +00:00
David King
db38923c94 docs: Fix gdbus-codegen example XML
Without the surrounding <node> tags, gdbus-codegen does not generate any
implementation for the interface described in the introspection XML.

https://bugzilla.gnome.org/show_bug.cgi?id=669544
2012-02-09 11:59:15 +00:00
Javier Jardón
808346c6ab docs: Add win32 gio specific api to the docs
Reported by Lethalman on IRC
2012-02-07 16:06:04 +01:00
Christian Persch
867f554ea5 docs: Fix typo 2012-02-06 22:33:19 +01:00
Alexander Larsson
47aa8c43e8 resources: Add to-pixdata preprocessing option 2012-01-31 16:07:09 +01:00
Matthias Clasen
49eeaa9bbd Assorted documentation fixes 2012-01-30 16:16:48 -05:00
Matthias Clasen
9902a5e064 Drop menu markup functions from API docs 2012-01-30 15:37:43 -05:00
David Zeuthen
bc40fe582d GDBusInterface: add dup_object() method
This is needed for thread-safety ... yes, it would have been better to
make get_object() return a full reference and have something like a
peek_object() method return a borrowed reference for C convenience
(only a single vfunc would have been needed). But such an ABI break is
too late now...

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-01-26 14:20:08 -05:00
Christian Persch
8998e77b8f docs: Fix formatting in glib-compile-resource man page
Fixup the formatting in the example rule for --generate-dependencies.
2012-01-26 15:23:16 +01:00
Christian Persch
9f870fc056 docs: Fix the glib-compile-resources docs
Add a tag missing from commit 45783c5927.
2012-01-26 14:35:30 +01:00
Christian Persch
f42a5fb53b resources: compiler: Add autoselected output format
This allows simplifying the make rules.

Bug #668539.
2012-01-25 14:47:48 +01:00
Christian Persch
55d10d6bfd resources: compiler: Add dependency generator
Bug #668532.
2012-01-25 14:47:37 +01:00
Christian Persch
45783c5927 resources: compiler: Allow stripping blanks from xml data
It's hardly useful to bloat the resource data with blanks intended only
for human readability, so add a preprocessing option that uses xmllint --noblanks
to strip these.

Bug #667929.
2012-01-25 14:47:37 +01:00
Ravi Sankar Guntur
e9725d1656 Macro to insert a new GNode "after" the given sibling.
https://bugzilla.gnome.org/show_bug.cgi?id=626258

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-01-24 23:41:23 -05:00
Emmanuele Bassi
c602a5f887 array: Add a clear function
Like GPtrArray has a "free function" that can be used to free memory
associated to each pointer in the array, GArray would benefit from
having a "clear function" that can be used to clear the content of
each element of the array when it's removed, or when the entire array
is freed.

https://bugzilla.gnome.org/show_bug.cgi?id=667243
2012-01-24 23:25:38 -05:00
Matthias Clasen
d994c38aba Add docs for gresource 2012-01-23 00:26:05 -05:00
Ryan Lortie
1d98d18f64 add a way to create a GAction from GSettings
g_settings_create_action() will create a GAction for the named key,
allowing it to be added to the action group of the application (so that
the setting can be directly manipulated from menus, for example).

https://bugzilla.gnome.org/show_bug.cgi?id=668279
2012-01-19 10:50:29 -05:00
Xavier Claessens
d077b66ee9 GUnixConnection: add async variant for send/receive_credentials()
https://bugzilla.gnome.org/show_bug.cgi?id=629503
2012-01-18 15:21:56 +01:00
Dan Winship
bf7408c30b GInetSocketAddress: add IPv6 flowinfo and scope_id fields
struct sin6_addr has two additional fields that struct sin_addr
doesn't. Add support for those to GInetSocketAddress, and make sure
they don't get lost when converting between glib and native types.

https://bugzilla.gnome.org/show_bug.cgi?id=635554
2012-01-16 13:37:02 -05:00
Ole André Vadla Ravnås
fbdb8128dc GSocket: Add function to get the currently available bytes for reading
https://bugzilla.gnome.org/show_bug.cgi?id=668009
2012-01-16 18:41:40 +01:00
Sebastian Dröge
ffb5f8b101 GSocket: Add function to set/get the broadcast setting on a socket
https://bugzilla.gnome.org/show_bug.cgi?id=623187
2012-01-16 18:41:40 +01:00
Sebastian Dröge
5560d9b880 GSocket: Add function for setting unicast TTL 2012-01-16 18:41:40 +01:00
Dan Winship
a62d1bb747 GSocket: Add multicast-related functions
Add APIs for sending and receiving multicast datagrams with GSocket.

Based on an earlier patch from Olivier Chalouhi.

https://bugzilla.gnome.org/show_bug.cgi?id=626589
2012-01-16 18:41:40 +01:00
Matthias Clasen
7e542e97a9 Trivial docs fix
I like GLib to be consistently capitalized in the docs.
2012-01-15 21:10:54 -05:00
Alexander Larsson
c7dfea30b3 Add documentation for GResource 2012-01-13 17:12:57 +01:00
Javier Jardón
9e732ab0ea docs/gobject/tutorial: Use g_object_class_install_properties 2012-01-12 14:13:07 +00:00
Matthias Clasen
00c00e2f3f Add G_FILE_ATTRIBUTE_FILESYSTEM_USED to get exact used space
This is implemented by with statfs_buffer.f_bavail (free blocks
for unprivileged users) as a default way to retrieve real free space.
Based on a patch by Marcus Carlson, bug 625751.
2012-01-09 21:49:08 -05:00
Ravi Sankar Guntur
fd7e443838 add g_queue_free_full to glib-sections.txt
Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=667331
2012-01-09 19:27:41 -05:00
Ryan Lortie
752f0cac15 GHashTable: new 'add' and 'contains' APIs
These are both convenience APIs that make it slightly nicer to use
GHashTable as a set (which is something we document as officially
supported).
2012-01-06 10:18:41 -05:00
Matthias Clasen
e6a5c2efb2 Add GWeakRef to the docs 2012-01-03 08:02:49 -05:00
Matthias Clasen
030bf82340 Some minor updates of building.sgml
https://bugzilla.gnome.org/show_bug.cgi?id=664830
2011-12-27 21:49:19 -05:00
Simon McVittie
993de34a77 Add undefined/no-undefined mode options to GTester
https://bugzilla.gnome.org/show_bug.cgi?id=666116
2011-12-27 17:51:11 -05:00
Dan Winship
3f3e141ec8 Add GSocketClient::event, for tracking socket client status
This can be used for debugging, or for progress UIs ("Connecting to
example.com..."), or to do low-level tweaking on the connection at
various points in the process.

https://bugzilla.gnome.org/show_bug.cgi?id=665805
2011-12-22 15:44:24 -05:00
Dan Winship
57f279988c Add g_socket_connection_connect(), etc
Previously it was more or less assumed that GSocketConnections were
always connected, although this was not enforced. Make it explicit
that they don't need to be, and add methods to connect them, and
simplify GSocketClient by using those methods.

https://bugzilla.gnome.org/show_bug.cgi?id=665805
2011-12-22 13:22:25 -05:00
Ryan Lortie
adbfa38c8e docs: remove duplicate GMenuModel from gio.types 2011-12-19 22:56:05 -05:00
Ryan Lortie
5e8a10daf1 gitignore 2011-12-19 13:38:09 -05:00
Ryan Lortie
0a22f63ebe Drop public menu APIs from GApplication
This is moving to Gtk, but we don't want to do it all right now.
2011-12-19 12:34:16 -05:00
Matthias Clasen
4041349037 Teach gtk-doc about G_GNUC_WARN_UNUSED_RESULT 2011-12-19 07:45:43 -05:00
Ryan Lortie
eefd08996f introduce GRemoteActionGroup
This interfaceifies the extra functions that were on GDBusActionGroup
for dealing with platform data.

The two main benefits of doing this:

  - no longer have to do a silly song and dance in GApplication to avoid
    calling GDBusActionGroup API from non-dbus-aware code

  - the interface can be reused by the action group exporter to avoid
    ugly and unbindable hook callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-17 12:54:02 -05:00
Ryan Lortie
f58df66d4d GDBusActionGroup: add _full variants of activation
This allows the platform_data to be explicitly specified.
2011-12-16 22:23:30 -05:00
Stef Walter
7e92997539 documentation fixes
Fixes for gtk-doc warnings.

http://bugzilla.gnome.org/show_bug.cgi?id=66469

https://bugzilla.gnome.org/show_bug.cgi?id=664699
2011-12-13 23:01:51 -05:00
Matthias Clasen
b0c3997fdd Improve GNetworkMonitor docs
Make sure we get signal and property docs, and mention
the extension point in the overview.
2011-12-13 13:21:55 -05:00
Matthias Clasen
d50f77b394 Add g_application_set/get_default to the docs 2011-12-10 21:42:49 -05:00
Ryan Lortie
829b4dfb43 Clean up GApplication docs
Clean up the docs for GApplication and related classes.

I'm no longer writing documentation for the structure type of classes
and interfaces.  See https://bugzilla.gnome.org/show_bug.cgi?id=665926
for discussin on the correct way forward on this point.

Also: stop putting gtk-doc comments in installed headers.
2011-12-10 17:23:28 -05:00
Thomas Hindoe Paaboel Andersen
721667399a GFile: add g_file_new_temp
A convenience function that creates a temporary file and returns
a GFile and GFileIOStream for it.

The file is created using g_file_open_tmp.

https://bugzilla.gnome.org/show_bug.cgi?id=657085
2011-12-09 08:58:05 -05:00
Ryan Lortie
a6366dc289 GDBusActionGroup: make API just like GDBusMenuModel
Have one simple _get() API that returns the group immediately, in an
empty state.  The group is initialised on the first attempt to interact
with it.

Leave a secret 'back door' for GApplication to do a blocking
initialisation.
2011-12-08 18:07:47 -05:00
Matthias Clasen
04aab0cd46 Fix up docs 2011-12-08 18:05:15 -05:00
Ryan Lortie
4f2c207745 menu/action exporter docs fixup 2011-12-08 18:05:14 -05:00
Ryan Lortie
3821627366 GApplication: make distinction about menus
Rename g_application_set_menu to g_application_set_app_menu and make a
couple of fixups.  Clarify the documentation about exactly what this
menu is meant to be.

Add g_application_set_menubar and document that as well.
2011-12-08 18:05:14 -05:00
Matthias Clasen
eb09099f65 Minor doc improvements 2011-12-08 18:05:14 -05:00