Commit Graph

1253 Commits

Author SHA1 Message Date
Christian Persch
d8dca11733 Fix thinko
When replacing strcmp() with g_variant_is_of_type(), remove the "== 0"
part! Found by Colin Walters.
2010-06-08 19:43:30 +02:00
Colin Walters
0ed183b572 [GDBusConnection] Use Gio's default async implementation again
The fix was committed in git.

https://bugzilla.gnome.org/show_bug.cgi?id=620990
2010-06-08 13:44:19 -04:00
Christian Persch
06e74ca969 g_dbus_method_invocation_return_value consumes the floating variant
Bug #620953.
2010-06-08 17:41:47 +02:00
Christian Persch
2ab9a07ec7 Simplify variant builder
Build the full return value with one builder, and don't unref the
unowned return value!

Bug #620954.
2010-06-08 17:41:47 +02:00
Christian Persch
d3b091f63a Use g_variant_is_of_type()
... instead of strcmp()'ing the type strings.

Bug #620954.
2010-06-08 17:41:46 +02:00
Christian Persch
b75e7eb95d Plug a mem leak
Bug #620954.
2010-06-08 17:41:46 +02:00
Javier Jardón
471c4e413c [docs] Fix typos in some g_file_* functions
Reported by Alexander Saprykin in bug
https://bugzilla.gnome.org/show_bug.cgi?id=620947
2010-06-08 16:27:45 +02:00
Matthias Clasen
795ddeb421 Add missing marshaler 2010-06-07 23:41:06 -04:00
Matthias Clasen
e300c7e622 Fix a missing parameter in a doc comment
Pointed out by David Zeuthen.
2010-06-07 23:28:30 -04:00
Matthias Clasen
a89b10c1dc Fix a signal signature
GApplication::action was erroneously declaring the timestamp parameter
as int instead of uint.
2010-06-07 23:27:21 -04:00
Matthias Clasen
063470ea0d Fix a misspelt doc comment 2010-06-07 22:34:07 -04:00
Matthias Clasen
32b7fbb890 Rename GApplication::appid to GApplication::application-id 2010-06-07 22:21:47 -04:00
Matthias Clasen
c59cc94318 Fix !srcdir checks 2010-06-07 22:10:27 -04:00
Matthias Clasen
fdc99873ee Document signals 2010-06-07 21:23:42 -04:00
Javier Jardón
d68100afcc [docs] GApplication is available since Gio 2.26 2010-06-08 00:00:39 +02:00
Matthias Clasen
c2a539eff0 Use g types for consistency 2010-06-07 17:48:09 -04:00
Matthias Clasen
6427e93757 Merge the wip/gapplication branch
This adds a GApplication object to GIO, which is the core of
an application support class, supporting
- uniqueness
- exporting actions (simple scripting)
- standard actions (quit, activate)

The implementation for Linux uses D-Bus, takes a name on the
session bus, and exports a org.gtk.Application interface.

Implementations for Win32 and OS X are still missing.
2010-06-07 13:48:42 -04:00
Matthias Clasen
486c46b945 Include the right header 2010-06-07 06:24:28 -04:00
Ryan Lortie
71c5e3f899 Bug 620496 - schema compiler: reject invalid paths
The GSettings schema compiler was accepting any string as a path.  It is
probably quite a common mistake to suspect that '/apps/foo' is a valid
path name when this will cause all sorts of trouble later.  Check for
this case and report the error.
2010-06-07 10:18:43 +02:00
Christian Persch
87ee5f3641 Don't do an extra strlen when g_variant_get_string() returns it already 2010-06-06 16:32:04 -04:00
Matthias Clasen
2aca3b506a Add single-include guards to new headers
As pointed out by Christian Persch in bug 620173, all the new
gdbus and gsettings headers were missing these.
2010-06-06 16:20:21 -04:00
Matthias Clasen
9371ca0cc2 Sort gio.h includes alphabetically 2010-06-06 16:15:44 -04:00
Michael Natterer
3944a63fed gio: fix the build 2010-06-06 21:15:42 +02:00
Matthias Clasen
92fab48387 Some cleanups
Always include config.h, make property strings for translation,
add since tags.
2010-06-06 14:24:14 -04:00
Ryan Lortie
61f3f45cb9 add get_permission API to GSettingsBackend
implement it in the various in-tree backends

also, lots of whitespace changes to realign the vtable members
2010-06-05 00:10:05 +02:00
Ryan Lortie
95c564cabe gsettingsbackend.h: pretend to be gio.h
Since #include <gsettingsbackend.h> is a perfectly valid thing for
applications to do, and since we want to include gio headers from
gsettingsbackend.h, we need to effectively disable the #error we would
get from those headers (because we're not coming via gio.h).

We don't want to #include <gio/gio.h> here because this would cause
needless rebuilding of GSettingsBackend, GSettings,
GDelayedSettingsBackend, etc... every time someone changed anything in
any public header.
2010-06-04 23:02:44 +02:00
Ryan Lortie
4733488178 Bug 620582 - a simple GPermission implementation
add GSimplePermission, a trivial const implementation of GPermission

can-request and can-release are always false for this implementation and
the value of 'allowed' is decided at construction.
2010-06-04 22:35:14 +02:00
Ryan Lortie
7a4860d69a Bug 620519 - GPermission
Add an abstract interface representing the permission to perform an
action.
2010-06-04 19:03:38 +02:00
Murray Cumming
07b5cee2a8 Gio: gioenums.h: Remove trailing commas to avoid C++ warnings. 2010-06-04 17:07:05 +02:00
Javier Jardón
af3f4cbe77 gdbusaddress: Fix typo 2010-06-04 01:35:23 +02:00
Matthias Clasen
e608b1f067 Don't spew a g_warning if inotify setup fails
We use is_supported when we are trying to find a local file monitor
implementation that works, and having the g_warning in there trips
the test suite.
2010-06-03 11:42:59 -04:00
Milan Bouchet-Valat
3682666140 Annotate GVariant and GSettings _strv() functions
Add GObject introspection annotations so that the length parameter is
correctly detected for g_variant_new_strv(), g_variant_get_strv() and
g_variant_dup_strv(). Also specify that it can be a NULL pointer in
g_variant_get_strv() and g_variant_dup_strv().

For g_settings_set_strv(), detect that a NULL value is allowed, meaning
empty array.

Closes bug #620384.

Signed-off-by: Ryan Lortie <desrt@desrt.ca>
2010-06-02 19:37:30 +02:00
Ryan Lortie
b5c8496b4c Support NULL value for g_settings_set_strv()
Allow easy setting of the empty array that we lost with the last patch.
2010-06-02 04:00:58 +02:00
Milan Bouchet-Valat
bf9edb5cd5 Remove length parameter for g_settings_[gs]et_strv
Length of the array is redundant since it's NULL-terminated. This is not
consistent with many GLib and GTK+ functions, and adds complexity with
no real gain, while these convenience functions should be kept simple.

Closes bug #620312
2010-06-02 03:54:23 +02:00
Lin Ma
c874a76a8b After talk with FEN dev, we dicide simply disable monitor function if
the current filesystem doesn't suport FEN.
2010-05-28 16:58:56 +08:00
Lin Ma
866e3dda60 Remove unused code. 2010-05-27 10:24:58 +08:00
Lin Ma
798eed43a2 bugster#6955199, on hsfs portfs will fail, and FEN backend will fail
to run lstat and port_associate on root node.
2010-05-26 14:32:37 +08:00
David Zeuthen
eec66b2f94 GDBus: Big-endian fixes
Tested this on my Powerbook G4 12", 867MHz PowerPC G4 running Fedora
11ish.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-25 12:03:27 -04:00
Matthias Clasen
9e25ec592b Document that vtable is not copied 2010-05-25 10:44:19 -04:00
Ryan Lortie
84a0605342 change GSettingsBackend.list() API 2010-05-24 22:20:47 -04:00
Matthias Clasen
1b7f645492 Improve the g_file_make_symbolic_link docs
Following a proposal by Neil Williams in bug 619527.
2010-05-24 21:09:55 -04:00
Ryan Lortie
77b9a46461 GIO: Add g_d{,c}gettext to PLT check exceptions 2010-05-24 17:03:26 -04:00
Ryan Lortie
3160bcad6a GDBusConnection.call(): add 'reply_type' argument
This allows the caller to specify the reply type that they are expecting
for this call.  If the reply comes back with the wrong type, GDBus will
generate an appropriate error internally.

  - add a GVariantType * argument to g_dbus_connection_call() and
    _call_sync().

  - move the internal API for computing message types from introspection
    data to be based on GVariantType instead of strings.  Update users
    of this code.

  - have GDBusProxy pass this calculated GVariantType into
    g_dbus_connection_call().  Remove the checks done in GDBusProxy.

  - Update other users of the code (test cases, gdbus-tool, GSettings
    tool, etc).  In some cases, remove redundant checks; in some other
    cases, we are fixing bugs because no checking was done where it
    should have been.

Closes bug #619391.
2010-05-24 17:00:04 -04:00
Tor Lillqvist
a83a9a43ed Most of the gdbus test programs build only on Unix 2010-05-24 11:22:41 +03:00
David Zeuthen
bf24dff88e Return an error for calls into unknown interfaces or unknown objects
Ryan pointed out on IRC that we didn't do anything here. Looking at
the code, it's painfully obvious that we should be returning an error
here since a comment already says that we've exhausted all possible
options.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-21 12:11:04 -04:00
Christian Persch
c7f0f2c437 Use stack-allocated GVariantBuilders
This saves a few allocations.
Also simplify the code a bit in gdbusconnection.

Bug #618616.
2010-05-20 21:17:14 +02:00
Christian Persch
41b3f6885d Add g_dc[p]gettext, and use it in gsettings
Avoid using LC_MESSAGES, and just call g_d[c]gettext directly.

Bug #617004.
2010-05-20 21:16:29 +02:00
David Zeuthen
366b3ffcde Bug 619142 – Build fixes
- Fix various #include issues

 - Change #error to #warning for the EXTERNAL authentication mechanism.
   It is not clear if this should work on Win32 at all.

 - Call close() before unlink() for the SHA1 keyring

 - Change #error to #warning so we don't forget to do
   permission checking of the .dbus-keyrings directory

 - Use Win32 SID for the SHA1 auth mech

 - Apparently we can't use word 'interface' as an identifier

 - Implement a _g_dbus_win32_get_user_sid() function. For now it's
   private. Don't know if it should be public somewhere. Maybe in
   a future GCredentials support for Win32? I don't know.

 - GFileDescriptorBased is not available on Win32. So avoid using
   it in GLocalFile stuff. Now, Win32 still uses GLocalFile + friends
   (which works with file descriptors) so expose a private function
   to get the fd for an OutputStream so things still work.

 - Fixup gio.symbols

 - Fixup tests/gdbus-peer.c so it builds

With this, at least things compile and the gdbus-peer.exe test case
passes. Which is a great start. I've tested this by cross-compiling on
a x86_64 Fedora 13 host using mingw32 and running the code on a 32-bit
Windows 7 box.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-20 10:53:08 -04:00
Ryan Lortie
caae8ac57a Add --uninstall option to glib-compile-schemas
If --uninstall is given then don't give an error if the schema directory
is empty.  Instead, erase the gschemas.compiled file, if it exists.
This is the right thing to do in the 'make uninstall' rule, where the
schema directory could very well be left empty as a result.

Modify gsettings.m4 to use this option.
2010-05-19 16:02:05 -04:00
Javier Jardón
257c519ba2 Fix trivial typo in GCredentials code
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=618839
2010-05-18 23:45:54 +02:00