Commit Graph

1975 Commits

Author SHA1 Message Date
Matthias Clasen
654ab34e3a Don't warn in GApplication if class handlers have been overridden
https://bugzilla.gnome.org/show_bug.cgi?id=640042
2011-01-21 10:52:48 -05:00
Ray Strode
dc8b03027d gsettings: Update documentation on schema naming convention
The existing docs are a bit inconsistent in that they say to follow
the dbus convention, but then give an example that doesn't.

This commit changes things to be how Ryan says they should be.
2011-01-17 17:31:14 -05:00
Christian Persch
8728949e0d Don't leak variants in the null settings backend
Even though the write fails, the variant still needs to be consumed.

Bug #638872.
2011-01-14 20:19:24 +01:00
Daiki Ueno
c0208940c5 Make g_unix_connection_send_fd() work as expected.
https://bugzilla.gnome.org/show_bug.cgi?id=637696
2011-01-12 16:01:32 -05:00
Chun-wei Fan
19c73918ec Added symbols for GIO/Win32
There are now fallback functions in the Win32 portion of
g_app_info that were previously only available under UNIX,
so add them here so that they can be exported as well.

The symbols are as follows:
g_app_info_get_fallback_for_type
g_app_info_get_recommended_for_type
2011-01-12 11:08:54 +08:00
Matthias Clasen
eec2cb1af8 Avoid a segfault in g_application_register()
Patch by Mikkel Kamstrup Erlandsen
https://bugzilla.gnome.org/show_bug.cgi?id=639177
2011-01-10 20:29:29 -05:00
Matthias Clasen
a57c4c9066 GSettings: Fix a copy-paste error
https://bugzilla.gnome.org/show_bug.cgi?id=639084
2011-01-09 16:43:28 -05:00
Christian Persch
b0b37bcb06 Update gschema.dtd
Bug #639064.
2011-01-09 21:45:20 +01:00
Pavel Holejsovsky
f6b52322a2 Fix and update GI annotations for 'Volumes and Drives'
Volumes and Drives GIO category contains: GVolumeMonitor, GVolume,
GMount, GDrive, Unix Mounts.
2011-01-07 15:06:07 +01:00
Pavel Holejsovsky
f85909fb65 Add and update GI annotations in 'Settings'
'Settings' GIO group contains GSettings and GSettingsBackend.
2011-01-07 15:05:55 +01:00
Colin Walters
e738a8dd8c gdesktopappinfo: Don't crash if we don't have a desktop filename
If code creates a GDesktopAppInfo via g_desktop_app_info_new_from_keyfile(),
we'd try to send a NULL pointer down into GVariant.

Since in this case we don't have a filename, just send the empty
string.  In the future we should either:

1) Change panel to use g_desktop_app_info_new_from_filename(), and
   take the hit of parsing the file twice.
2) Add a g_key_file_get_origin_filename()
3) Add g_desktop_app_info_new_from_keyfile_and_name()

https://bugzilla.gnome.org/show_bug.cgi?id=638838
2011-01-06 13:32:56 -05:00
Serkan Kaba
26b65a3abd gio: Recognize reiser4 in g_file_query_filesystem_info()
Signed-off-by: Serkan Kaba <serkan@gentoo.org>
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
2011-01-06 14:08:02 +01:00
Matthias Clasen
31db1f9688 Add new symbol 2011-01-05 19:07:01 -05:00
Matthias Clasen
f4773faa9f Drop annotation that break the documentation build 2011-01-05 17:46:28 -05:00
Pavel Holejsovsky
b497220e48 Fix GI annotation for g_desktop_app_info_launch_uris_as_manager 2011-01-05 20:35:50 +01:00
Christian Persch
8d74c96b76 Make the memory and null settings backends public
Bug #636806.
2011-01-05 20:31:50 +01:00
Colin Walters
0b59cf6566 g_desktop_app_info_launch_uris_as_manager: Fix parameter naming
This makes introspection happier.
2011-01-05 13:49:20 -05:00
Colin Walters
9be6da9448 Add missing indirection from previous commit
This follows the rest of GLib style, and fixes g-i scanning the
headers.
2011-01-05 13:02:28 -05:00
Nicolas Dufresne
a36cb498d9 [GDummyTLS] Add missing properties and namespace
Add missing properties in the GDummyTlsConnection class. Also add
namespaces to property enumerations to avoid conflicts between classes.

Reviewed-by: Dan Winship <danw@gnome.org>
2011-01-05 12:41:51 -05:00
Stef Walter
4e33967a00 Change GTlsClientConnection::accepted-cas to contain DER DNs
This property is now a GList of GByteArray values. Each
GByteArray contains the raw DER DN of the certificate authority.
This is far more useful for looking up a certificate (with the
relevant issuer) than a string encoded DN.

https://bugzilla.gnome.org/show_bug.cgi?id=637262
2011-01-05 09:35:06 -08:00
Colin Walters
e6546debd6 gdesktopappinfo: Add g_desktop_app_info_launch_uris_as_manager()
A new GDesktopAppInfo specific function which provides more control
over launched processes.  Intended basically only for use in GNOME
Shell, where we want:

*) To directly know the GPid for each launched program, without
   having to listen to a DBus signal emitted in our own process
*) Possibly control over the process environment; for example,
   we may want to call setsid() or redirect file descriptors.

And in the future:
*) To avoid recursively calling ourself via DBus, when a later
   patch causes g_app_info_launch() to indirect via the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=606960
2011-01-05 11:58:07 -05:00
Colin Walters
bb6c44b9d3 gdesktopappinfo: Send out a session bus signal when launching .desktop file
This signal contains the full path of the .desktop file, along with
the process id, which allows multiple interested components (like
GNOME Shell) to better know the state of the system (which processes
correspond to which .desktop files).

https://bugzilla.gnome.org/show_bug.cgi?id=606960
2011-01-05 11:58:03 -05:00
Thomas Kristensen
1e5f11875b revents may have been cleared by GMain before dispatch().
See bug #587898.
2011-01-03 15:20:12 +02:00
Pavel Holejsovsky
929e8db9f4 Add GI annotation: skip g_cancellable_source_new().
It is not bindable, because GSource is not boxed and thus cannot be
returned as caller-owned.
2010-12-29 16:21:22 +01:00
Pavel Holejsovsky
53364788e9 Add GI annotations to Gio DNS resolution classes 2010-12-29 16:02:35 +01:00
Pavel Holejsovsky
add8cf9c09 Add GI annotations to Gio highlevel network functionality 2010-12-29 16:02:26 +01:00
Pavel Holejsovsky
975b0d4487 Add GI annotations to Gio lowlevel network support classes 2010-12-29 16:02:23 +01:00
Pavel Holejsovsky
571104bcc3 Add GI annotations to GPollable{Input|Output}Stream 2010-12-29 16:02:12 +01:00
Pavel Holejsovsky
79fd5ff80d Add missing GI annotation to g_content_type_guess_for_tree 2010-12-29 16:02:04 +01:00
Cosimo Cecchi
408a9fcbcc gaction: update property flags to match needs of GSimpleAction
Commit 068d53358b uncovered this mismatch
between properties on the interface and those on the implementation.
Update them so they match.
2010-12-28 12:24:39 +01:00
Cosimo Cecchi
f248ab1b60 tests: unbreak desktop-app-info test for jhbuild
If we have a jhbuilt version of gedit installed, this will fail, as it
will succeed in deleting its desktop file.
2010-12-28 12:18:51 +01:00
Pavel Holejsovsky
ed5790913e Add GI annotations to GMemory{Input|Output}Stream 2010-12-27 16:47:26 +01:00
Pavel Holejsovsky
53fee54b4f Add GI annotations to GConverter 2010-12-27 16:29:20 +01:00
Pavel Holejsovsky
c8fd3e31ca Add GI annotations to GSeekable 2010-12-27 16:24:21 +01:00
Pavel Holejsovsky
5a8d012d29 Add GI annotations to GIcon and related classes and interfaces 2010-12-27 16:08:46 +01:00
Pavel Holejsovsky
7a1fbcd959 Add GI annotations to GFileEnumerator 2010-12-27 15:48:31 +01:00
Pavel Holejsovsky
1f84c5b72f Add GI annotations to GAppInfo and GDesktopAppInfo 2010-12-27 15:40:07 +01:00
Brian Cameron
37ef8cbba5 Fix for bug #637720. void functions should not return a value. 2010-12-22 01:37:21 -06:00
Pavel Holejsovsky
86b250019a Add GI annotations to GBufferedInputStream 2010-12-21 18:21:33 +01:00
Pavel Holejsovsky
5ea4fa75bd Add GI annotations to GData{Input|Output}Stream 2010-12-21 18:21:33 +01:00
Pavel Holejsovsky
e78c27256a Add GI annotations to GSimpleAsyncResult 2010-12-21 18:21:33 +01:00
Nguyễn Thái Ngọc Duy
12cf4af5bb gio: typo fix 2010-12-21 19:53:00 +07:00
Xavier Claessens
30587a3a60 Add io-stream in gitignore 2010-12-20 18:52:44 +01:00
Cosimo Cecchi
6a10591573 appinfo: avoid overriding the system defaults when adding support
We want to be compatible with the following situation:
- there's no explicit default set in mimeapps.list
- we add support for a content type to a specific application, and that
  list is empty
- the default should be picked from the system list, not overridden by
  the user-added application.

So we make the default explicit in this case, by adding it to the
relevant section in mimeapps.list.

https://bugzilla.gnome.org/show_bug.cgi?id=637675
2010-12-20 18:19:13 +01:00
Christian Dywan
1f9e34cab7 Allow null object in g_simple_async_report_gerror_in_idle
Follow-up on bug 636673.
2010-12-20 17:22:19 +01:00
Cosimo Cecchi
678bcad92c appinfo: add g_app_info_set_as_last_used_for_type()
This commit also changes (maintaining compatibility) the way
user-specified default applications are stored (as in, those for which
g_app_info_set_as_default_for_type() has been called.

We now store the default application for a content type in a new group
in the mimeapps.list keyfile, and "Added Associations" tracks only the
applications that have been added by the user, following a
most-recently-used first order.

This is useful in GtkAppChooser-like widgets to pre-select the last used
application when constructing a widget.

https://bugzilla.gnome.org/show_bug.cgi?id=636311
2010-12-20 15:43:58 +01:00
Cosimo Cecchi
01ba7bd8e8 emblemedicon: make GEmblemedIcon subclassable
Hiding the object/class structs in the source file makes this class not
subclassable.

Move them to the public header, and add a property for the icon, so that
subclasses can just use

  g_object_new (DERIVED_TYPE,
                "gicon", icon,
                NULL);

to create an emblemed icon.

https://bugzilla.gnome.org/show_bug.cgi?id=636892
2010-12-20 15:39:00 +01:00
Matthias Clasen
bc4e1fc622 Add a delay-apply property to GSettings
Bug 637147, patch by Matt Barnes.
2010-12-20 09:16:05 -05:00
Christian Dywan
ddc126cf2c g_simple_async_report_error_in_idle with no object
Document and allow passing of NULL for the object consistently to
_take_error and _report_error functions.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=636673
2010-12-17 17:38:04 +01:00
Pavel Holejsovsky
89b558077f [gi] Add annotations for GFile, G[File]{Input|Output|IO}Stream.
Also make parameter names in virtual function declarations consistent
to silent g-ir-scanner.
2010-12-17 16:29:05 +01:00
Matthias Clasen
101dcecb1f Update symbols list for recent changes 2010-12-17 08:37:21 -05:00
Pavel Holejsovsky
f33ccd4b41 [gi] Fix GObject.Object annotations. 2010-12-16 21:06:51 +01:00
John (J5) Palmieri
6f215e477d [gi] add annotations for methods which take a gpointer which are really GObjects
* bindings need to know how to marshal the pointer otherwise they send in
  the raw wrapped pointer causing crashes
2010-12-16 13:48:31 -05:00
Murray Cumming
2b6c801d10 gioenums.h: Remove a trailing comma. 2010-12-16 10:57:39 +01:00
Cosimo Cecchi
274ef35fd4 tests: remove a bogus assumption 2010-12-15 18:03:13 +01:00
Matthias Clasen
683a5632c8 Remove GPeriodic for now
The necessary review and integration work has not happened, and
we don't want to enshrine it in this unproven state.
It will be back when the world is ready for it.
2010-12-15 11:56:44 -05:00
Cosimo Cecchi
9411d0c108 docs: fix a typo 2010-12-15 12:50:59 +01:00
Cosimo Cecchi
bfee021cfb emblemedicon: add docs for _clear_emblems() 2010-12-15 12:49:22 +01:00
Cosimo Cecchi
f53d518a3d emblemedicon: add g_emblemed_icon_clear_emblems()
https://bugzilla.gnome.org/show_bug.cgi?id=637171
2010-12-15 11:45:20 +01:00
Cosimo Cecchi
056a5d753d gapplication: plug a memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=637237
2010-12-15 11:43:14 +01:00
Pavel Holejsovsky
8c742aea72 Add missing annotations to GApplication and GApplicationCommandLine. 2010-12-15 11:26:59 +01:00
Ted Gould
09ce9dc542 Bug 635626 – GDBus message idle can execute while flushes are pending
https://bugzilla.gnome.org/show_bug.cgi?id=635626

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-12-13 13:33:15 -05:00
Peng Huang
735fcf918e Bug 632544 – Cannot send a locked message with PRESERVE_SERIAL flag
https://bugzilla.gnome.org/show_bug.cgi?id=632544

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-12-13 13:09:38 -05:00
Xavier Claessens
e4f25c0fed Add Since 2.28 in g_io_stream_splice doc 2010-12-13 17:42:11 +01:00
Xavier Claessens
0a2d47b626 Add g_io_stream_splice_async/finish()
That function splice the output stream of both GIOStreams to the input stream
of the other GIOStream.
2010-12-13 17:36:12 +01:00
Christian Persch
ce50df7e0e Better error reporting for g_variant_parse()
Add error codes, and use them when setting the GError.

Bug #634583.
2010-12-12 13:25:34 +01:00
Dan Winship
ad56426bc7 Add missing property to GDummyTlsCertificate 2010-12-10 10:01:22 +01:00
Benjamin Otte
ca38bddd6e gio: Add a count to the resolver test for number of enumerators
This adds the nice stress-test feature of having 5 enumerators running
at the same time. Yay!
2010-12-07 19:39:24 +01:00
Benjamin Otte
bd227f5219 gio: Make enumerating a GNetworkAddress work more than once
Previously, the code only initialized the enumerator if the address
hadn't had cached addresses. But creating an enumerator cached the
addresses, so the second one failed to work.
2010-12-07 19:39:24 +01:00
Benjamin Otte
07fd29c323 tls: Make g_tls_{client|server}_connection_new() return a GIOStream
The main use case for these objects is as an IO stream, so it makes
sense to return them that way from the start.
2010-12-07 19:39:24 +01:00
Benjamin Otte
c59ba60fbe tls: Clarify docs for g_tls_client_connection_set_validation_flags()
And fix a typo in there.
2010-12-07 19:39:23 +01:00
Emilio Pozuelo Monfort
85adbc99bf Fix error in GSimpleAsyncResult example 2010-12-07 17:46:21 +01:00
Dan Winship
f5c3e0d3d5 Change the handling of the peer certificate in GTlsConnection
Make the certificate and peer-certificate properties virtual, and add
peer-certificate-errors as well. Change the documentation on
peer-certificate to say that it's not set until after the handshake
succeeds (which means notify::peer-certificate can be used to tell
when a handshake has completed).
2010-12-07 14:58:42 +01:00
Dan Winship
b5a707ec90 Clarify that g_socket_client_connect_to_uri() doesn't know about TLS 2010-12-07 10:41:06 +01:00
Dan Winship
4f6efb681d Change the semantics of GTlsConnection:require-close-notify
We were combining "allow un-notified closes" and "close without
notifying" into a single property, which meant that it was impossible
to "be liberal in what you accept and conservative in what you send".
Change require-close-notify to only be about the peer behavior, and
make our connections always close-notify properly when closing (while
noting that you can just close the base-io-stream directly if you want
to do an unclean close).
2010-12-07 10:41:06 +01:00
Dan Winship
68a3d6b27f add G_TLS_ERROR_UNAVAILABLE 2010-12-07 10:41:06 +01:00
Dan Winship
95cba18349 Remove GTlsConnection::need-certificate
Trying to do this as a signal won't work well with either
GTlsCertificateDB (in which case looking up a certificate in the db is
a blocking/asynchronous act) or session resumption support (in which
case the certificate or lack thereof is part of the session definition
and so needs to be known immediately). Make the caller use
g_tls_connection_set_certificate() ahead of time (or when retrying)
instead.
2010-12-07 10:41:05 +01:00
Dan Winship
d6e94070dd Add GTlsConnection:use-system-certdb
This can be set FALSE if you don't want to validate certificates
against the system database.
2010-12-07 10:41:05 +01:00
Dan Winship
73d6bd8a45 Add g_tls_certificate_verify()
Add a method to verify a certificate against a CA; this can be used
for apps that need to test against non-default CAs.

Also make the GTlsCertificate::issuer property virtual
2010-12-07 10:41:05 +01:00
Matthias Clasen
4b28e6a008 Add missing Since: tag
g_simple_async_result_is_valid was added in 2.20.

Bug 636351
2010-12-03 14:49:07 -05:00
Colin Walters
d11f413345 introspection: Remove spurious trailing :
This isn't valid syntax.
2010-12-03 14:26:28 -05:00
Christian Dywan
426f90e3cf Resolve warnings about istream and ostream in socket test 2010-12-03 16:33:24 +01:00
Benjamin Otte
b9a98a81da gio: Comment out a whole test
... instead of just commenting out the registration and leaving "unused
function" warnings for gcc.
2010-12-02 20:11:28 +01:00
Benjamin Otte
b92e2cd8f8 gio: Remove unused variables from test 2010-12-02 20:11:28 +01:00
Matthew Barnes
9fe7fd9120 Bug 636100 - Can't read GSettings:backend property
The PROP_BACKEND case was missing from the switch statement in
g_settings_get_property().
2010-11-30 18:21:10 -06:00
Dan Winship
50a8b039a4 tiny fix to g_io_modules_scan_all_in_directory() docs 2010-11-29 09:37:41 -05:00
Xan Lopez
78103b2f1f gsettingsschema: plug leak 2010-11-29 15:29:56 +01:00
Aleksander Morgado
98bfc8afda Fixes GB#635187: Always unbox GVariant parameter received via dbus for an action 2010-11-29 08:06:31 -05:00
Matthias Clasen
eed36d38d1 Various doc tweaks 2010-11-28 23:55:43 -05:00
Matt Rajca
577ddbf30b Fixed typo in public string in gsocks (630559) 2010-11-28 18:29:50 -05:00
Aleksander Morgado
51894b7dd0 Fixes GB#530786: GFileMonitor 'changed' signal underdocumented 2010-11-28 18:20:59 -05:00
Christian Persch
b4632e1c98 Fix the wrong-category schema test
It's supposed to test a <default l10n="..."> with a non-existent
category, so make it actually check this!

Bug #635882.
2010-11-28 17:26:30 -05:00
Matthias Clasen
bfbd7169a2 GFileMonitor: Don't accept negative values for rate-limit
Patch by Alksander Morgado,
https://bugzilla.gnome.org/show_bug.cgi?id=635768
2010-11-28 17:14:49 -05:00
Christian Persch
57143e311d Inherit gettext-domain from <schemalist>
When the <schema> doesn't have a 'gettext-domain' attribute, but
the <schemalist> does, use that one.

Bug #635640.
2010-11-28 19:01:21 +01:00
Dan Winship
69129e8065 Make gio/tests/g-icon pass again
It got broken in two different ways by the g_str_hash() change
(354d655b)
2010-11-27 16:56:44 -05:00
Christian Persch
1797970720 Typo fix 2010-11-27 13:10:48 +01:00
Dan Winship
59d62726de Add initial TLS (SSL) support to gio
This adds an extension point for TLS connections to gio, with a
gnutls-based implementation in glib-networking.

Full TLS support is still a work in progress; the current API is
missing some features, and parts of it may still be changed before
2.28.

https://bugzilla.gnome.org/show_bug.cgi?id=588189
2010-11-26 15:57:11 -05:00
Dan Winship
a1690339c7 make GProxyConnection public, as GTcpWrapperConnection
GProxyConnection is a class that was added for proxy support;
g_socket_client_connect() returns a GSocketConnection, but in some
cases (eg, encrypted SOCKS), GProxy might return a GIOStream that is
not a GSocketConnection. In that case, GSocketClient would wrap the
stream up in a GProxyConnection, which is a subclass of
GSocketConnection but uses the input/output streams of the wrapped
connection.

GTlsConnection is not a GSocketConnection, so it has the same problem,
so it will need the same treatment. Rename the class to
GTcpWrapperStream, and make it public, so people can extract the base
stream from it when necessary.

(This is not ideal and GSocketClient will need to be revisited as an
API at some point...)

https://bugzilla.gnome.org/show_bug.cgi?id=588189
2010-11-26 15:08:31 -05:00
Dan Winship
c20c2c0abd Add pollable input/output streams
When interfacing with APIs that expect unix-style async I/O, it is
useful to be able to tell in advance whether a read/write is going to
block. This adds new interfaces GPollableInputStream and
GPollableOutputStream that can be implemented by a GInputStream or
GOutputStream to add _is_readable/_is_writable, _create_source, and
_read_nonblocking/_write_nonblocking methods.

Also, implement for GUnixInput/OutputStream and
GSocketInput/OutputStream

https://bugzilla.gnome.org/show_bug.cgi?id=634241
2010-11-26 15:08:08 -05:00
Dan Winship
6181c7de36 GCancellable: add g_cancellable_create_source()
g_cancellable_create_source() returns a GSource that triggers when its
corresponding GCancellable is cancelled. This can be used with
g_source_add_child_source() to add cancellability to a source.

Port gasynchelper's FDSource to use this rather than doing its own
cancellable handling, and also fix up its callback argument order to
be more normal.

https://bugzilla.gnome.org/show_bug.cgi?id=634239
2010-11-26 15:07:28 -05:00