Commit Graph

8450 Commits

Author SHA1 Message Date
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
Ryan Lortie
719e2dcb3b Bug 619031 - method-calls-in-thread test failing
The test was assuming that g_timeout_add() waited for at least the amount of
time given to it before running the function.  This is not the case -- the
function can be run as much as 1ms early.  Make the lower time bound asserted
in the test more permissive to account for this.
2010-05-18 17:25:43 -04:00
Ryan Lortie
6067f9f794 Bug 618839 - Typo at translation message
Fix trivial typo in GCredentials code
2010-05-18 16:43:36 -04:00
Ryan Lortie
12a8c0f50d Add sync method to GSettingsBackend, and pad 2010-05-18 16:14:50 -04:00
Ryan Lortie
7fcf353325 whitespace fix 2010-05-18 16:14:50 -04:00
Robert Ancell
587bdf3f0a Add missing gunixfdlist.h include in gdbus-example-server.c 2010-05-18 12:01:25 +10:00
David Zeuthen
a977f03235 GDBus: Fix obvious crasher when looking up annotations
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-17 19:52:09 -04:00
David Zeuthen
a621e0ed10 gdbus(1): Don't fetch props if introspection data indicates none are available
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-17 11:08:53 -04:00
David Zeuthen
98e4f7f6fb GDBus: Fix introspection of objects registered at /
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-17 11:08:40 -04:00
Ryan Lortie
799e0242ae improve thread safety in GDelayedSettingsBackend
- hold a lock while accessing the tree of delayed values
  - use weak reference counts with the owner object to avoid doing
    g_object_notify on a dead object
  - dispatch the "has-unapplied" notify to the proper main context
2010-05-17 07:16:37 -04:00
Ryan Lortie
61219e2640 GSettingsBackend: make signal dispatch threadsafe
This commit fixes up a few race conditions in the GSettingsBackend, mostly with
respect to change notifications occuring at the same time as the last reference
count on a GSettings is dropped.  With GDBus feeding us our incoming signals in
a separate thread, this is something that could easily happen.
2010-05-17 07:16:37 -04:00
Ryan Lortie
4967b6d2ab gitignore additions for gdbus, new test cases 2010-05-17 07:16:37 -04:00
Ryan Lortie
984258c662 GSettings: support emitting signals in threads
The thread-default context that was in effect at the time that the
GSettings was created will be used for emitting signals on that
GSettings.
2010-05-17 07:16:37 -04:00
Ryan Lortie
849684e540 GSettings tool: work-around GDBus issue
There is currently no way (near as I can tell) to ensure that a message
has been sent when using GDBus.  If we exit() before we are sure, then
it is very possible that the message isn't sent at all.  This behaviour
was observed when using the GSettings commandline tool with dconf.

A quick and dirty workaround for now.
2010-05-17 07:16:37 -04:00
Ryan Lortie
8e060adb2c intern a key name instead of using strdup() 2010-05-17 07:16:37 -04:00
Lin Ma
e5440f865d Reworked Solaris file event notification for GIO. See
https://defect.opensolaris.org/bz/show_bug.cgi?id=10194

Updated copyright.
2010-05-17 14:42:52 +08:00
Sebastian Dröge
5d379f1c37 Fix gio tests linking with binutils gold linker 2010-05-16 10:22:10 +02:00
Sebastian Dröge
e6c08a458c Fix build of gdbus tool with binutils gold linker 2010-05-16 10:22:10 +02:00
Matthias Clasen
2ad4b2d716 Fix build on !linux
Don't define __USE_GNU, thats a glibc-internal macro, and
don't use SOL_SOCKET when not including sys/socket.h.
Maybe this file should be called glinuxcredentialsmessage.c...

Bug #618730
2010-05-15 18:16:51 -04:00
Matthias Clasen
2ed13de153 Fix issues with GSETTINGS_CHECK_RULE
Rename the --schema-files option to --schema-file, since it only
accepts one file at a time. Change the GSETTINGS_CHECK_RULE to
use it that way, too. And also make it work better with !srcdir
builds.

Bugs #616731 and #616864
2010-05-14 21:58:08 -04:00
David Zeuthen
763c1dab1f GDBus: Use specific variant type in GetAll()
Without this fix, we segfault if the exported object returned an error
on all get_property() calls (in reality, this never happens).

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-14 21:08:01 -04:00
David Zeuthen
4baf104f0a GDBus: Fix a double free
Fix an unintentional double free introduced in commit
4ad4c306c3.

This bug manifested itself when trying to complete this

 $ gdbus introspect --system --dest <tab>
2010-05-14 20:52:15 -04:00
Christian Persch
661e5ea69f Plug mem leaks in gdbus tests & examples
Use "&s" instead of "s", and free the variant iters after use.

Bug #618663.
2010-05-15 00:12:18 +02:00
Christian Persch
60c53fef47 Plug a mem leak in gdbusauth
From valgrind running gdbus-peer test:

==20513== 32 bytes in 1 blocks are definitely lost in loss record 1 of 15
==20513==    at 0x4024E4C: realloc (vg_replace_malloc.c:429)
==20513==    by 0x4079BB1: g_realloc (gmem.c:174)
==20513==    by 0x4099472: g_string_maybe_expand (gstring.c:396)
==20513==    by 0x409A42A: g_string_insert_c (gstring.c:1050)
==20513==    by 0x42169AC: g_string_append_c_inline (gstring.h:153)
==20513==    by 0x421682C: _my_g_input_stream_read_line_safe (gdbusauth.c:336)
==20513==    by 0x421843E: _g_dbus_auth_run_server (gdbusauth.c:1265)
==20513==    by 0x4222B94: initable_init (gdbusconnection.c:1783)
==20513==    by 0x41CF8D5: g_initable_init (ginitable.c:106)
==20513==    by 0x41CFA8D: g_initable_new_valist (ginitable.c:219)
==20513==    by 0x41CF920: g_initable_new (ginitable.c:139)
==20513==    by 0x4223479: g_dbus_connection_new_sync (gdbusconnection.c:2046)

Bug #618650.
2010-05-15 00:12:18 +02:00
Christian Persch
5bc9d43288 Plug mem leak in g_dbus_address_get_stream_sync
==6279== 21,615 (4,708 direct, 16,907 indirect) bytes in 169 blocks are
definitely lost in loss record 12 of 13
==6279==    at 0x4024D2E: malloc (vg_replace_malloc.c:207)
==6279==    by 0x4079A90: g_malloc (gmem.c:135)
==6279==    by 0x4079DC8: g_malloc_n (gmem.c:252)
==6279==    by 0x4097E66: g_strsplit (gstrfuncs.c:2434)
==6279==    by 0x42169A2: g_dbus_address_get_stream_sync
(gdbusaddress.c:875)

Bug #618622.
2010-05-15 00:12:17 +02:00
Christian Persch
dc39825aa3 Plug a mem leak in get_uninitialized_connection
Free the bus address after creating the singleton.

==26308== 39,736 (10,517 direct, 29,219 indirect) bytes in 388 blocks
are definitely lost in loss record 14 of 15
==26308==    at 0x4024D2E: malloc (vg_replace_malloc.c:207)
==26308==    by 0x4079A90: g_malloc (gmem.c:135)
==26308==    by 0x4079DC8: g_malloc_n (gmem.c:252)
==26308==    by 0x4095607: g_strdup (gstrfuncs.c:102)
==26308==    by 0x4216B9A: g_dbus_address_get_for_bus_sync
(gdbusaddress.c:961)
==26308==    by 0x422A7AE: get_uninitialized_connection
(gdbusconnection.c:5241)

Bug #618622.
2010-05-15 00:12:17 +02:00
Christian Persch
5b2c7f10bd Plug mem leaks in parse_value_from_blob
The result of read_string() was leaked.

Bug #618615.
2010-05-15 00:12:17 +02:00
Christian Persch
0a7c0ac74b Plug a mem leak
This code leaked the return value of g_variant_get_child_value();
use g_variant_get() instead and free the iter when done.
2010-05-14 18:08:29 -04:00
David Zeuthen
ddc94bd0a6 GDBus: Remove cached value if a property is invalidated
Also add a test case to catch this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-14 12:56:09 -04:00
David Zeuthen
bb6530eb34 GDBus: Fix serialization of empty arrays
It turns out that we didn't observe padding (neither when reading nor
writing) for empty arrays which (apparently) is needed according to
the D-Bus spec and reference implementation. A simple test case to
provoke this behavior is as follows (notice the lack of 4 bytes worth
of padding at position 0x0064):

 Error calling dbus_message_demarshal() on this blob: org.freedesktop.DBus.Error.InvalidArgs: Message is corrupted (Alignment padding not null)
 0000: 6c 01 00 01  2e 00 00 00  41 00 00 00  37 00 00 00    l.......A...7...
 0010: 08 01 67 00  08 73 61 7b  73 76 7d 61  73 00 00 00    ..g..sa{sv}as...
 0020: 01 01 6f 00  08 00 00 00  2f 66 6f 6f  2f 62 61 72    ..o...../foo/bar
 0030: 00 00 00 00  00 00 00 00  03 01 73 00  06 00 00 00    ..........s.....
 0040: 4d 65 6d 62  65 72 00 00  11 00 00 00  30 31 32 33    Member......0123
 0050: 34 35 36 37  38 39 30 31  32 33 34 35  36 00 00 00    4567890123456...
 0060: 00 00 00 00  0e 00 00 00  09 00 00 00  53 6f 6d 65    ............Some
 0070: 74 68 69 6e  67 00                                    thing.

 The blob was generated from the following GVariant value:
 ('01234567890123456', @a{sv} {}, ['Something'])

 If the blob was encoded using DBusMessageIter, the payload would have been:

 0000: 6c 01 00 01  32 00 00 00  41 00 00 00  36 00 00 00    l...2...A...6...
 0010: 01 01 6f 00  08 00 00 00  2f 66 6f 6f  2f 62 61 72    ..o...../foo/bar
 0020: 00 00 00 00  00 00 00 00  03 01 73 00  06 00 00 00    ..........s.....
 0030: 4d 65 6d 62  65 72 00 00  08 01 67 00  08 73 61 7b    Member....g..sa{
 0040: 73 76 7d 61  73 00 00 00  11 00 00 00  30 31 32 33    sv}as.......0123
 0050: 34 35 36 37  38 39 30 31  32 33 34 35  36 00 00 00    4567890123456...
 0060: 00 00 00 00  00 00 00 00  0e 00 00 00  09 00 00 00    ................
 0070: 53 6f 6d 65  74 68 69 6e  67 00                       Something.
 ** ERROR:gdbus-serialization.c:547:check_serialization: code should not be reached
 Aborted

and this is now in the libdbus-1-using serialization test case.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-14 12:56:09 -04:00
Matthias Clasen
ee9b16242c another !srcdir build fix 2010-05-14 10:49:03 -04:00
Matthias Clasen
159f533abf More !srcdir build fixes 2010-05-14 10:25:31 -04:00
Ryan Lortie
d8d1a02c55 include gunixcredentialsmessage from unixsocket
fixes a build issue
2010-05-14 15:31:14 +02:00
Matthias Clasen
1d22b64843 Cleanups
Sort #includes a bit better, and don't include platform-specific
headers in gio.h.
2010-05-14 08:38:07 -04:00
Matthias Clasen
0540798991 Fix !srcdir build
Thankfully we already had a SRCDIR define.
2010-05-14 01:36:25 -04:00
Matthias Clasen
4e7764fb2d Documentation cleanups 2010-05-14 00:21:39 -04:00
Matthias Clasen
6223341cac Merge branch 'gdbus-merge'
Conflicts:
	docs/reference/gio/gio-docs.xml
	docs/reference/gio/gio-sections.txt
	gio/tests/Makefile.am
2010-05-13 23:08:34 -04:00
Matthias Clasen
6e8637e478 The default timeout is 25s 2010-05-13 22:15:47 -04:00
Matthias Clasen
bdc29f82d3 Document more floating variant details. 2010-05-13 21:53:51 -04:00
Matthias Clasen
e72f7f52de Add some more details to the long description 2010-05-13 21:45:18 -04:00
Matthias Clasen
8f89b63930 Clean up platform-specific includes
The problem was pointed out in bug 618029. To solve it, we moved
the GUnixFDList typedef to giotypes.h.
2010-05-13 20:29:04 -04:00
Ryan Lortie
e1fb92551f check for working gettext() before running tests 2010-05-14 01:01:40 +02:00
David Zeuthen
68078ed648 GDBus: Nuke G_BUS_TYPE_NONE 2010-05-13 18:04:48 -04:00
David Zeuthen
1fd55b8bbf GDBus: Remove g_dbus_is_activated()
It's generally hard to get this right so don't attempt to do so.
2010-05-13 17:44:42 -04:00
David Zeuthen
51446baa52 GDBus: subscribe to PropertiesChanged() before calling GetAll()
Otherwise there's a slight chance of a race.
2010-05-13 17:20:39 -04:00
David Zeuthen
0e2c708bb2 GDBus: Don't take a GError for g_dbus_proxy_get_cached_property_names()
We stopped doing this for get_cached_property() so no reason to do it
here.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 17:10:15 -04:00
David Zeuthen
3ca28ef718 GDBus: Update docs for GDBusProxy::g-properties-changed signal
Also update the example. See

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

for more details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 16:57:29 -04:00
Christian Persch
e3f5d3c005 Make GVariant handling in PropertiesChanged more efficient
There's no need to re-build the a{sv} array, just get it right out of
the parameters. Also avoid some string copies.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 16:46:18 -04:00
Christian Persch
4ad4c306c3 Plug some mem leaks
g_variant_get (v, "s", &str) returns a string copy; use "&s" instead.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 16:43:41 -04:00
David Zeuthen
60e7ae26af GDBus: Add GDBusAuthObserver param in g_dbus_connection_new_for_address()
This is to match g_dbus_connection_new(). This extension allows us to
extend GDBusAuthObserver to also be used in client-side authentication
in the future (right now it's only used on the server-side).
2010-05-13 16:32:11 -04:00
David Zeuthen
cb753dfd49 GDBus: Rename ::deny-authentication-peer to ::authorize-authenticated-peer 2010-05-13 16:20:31 -04:00
Matthias Clasen
9e90b381f5 Remove the credentials argument from g_unix_connect_send_credentials()
Instead, make it always send the current credentials.
2010-05-13 14:29:39 -04:00
David Zeuthen
33952347ff GDBus: Make message serialization routines take capabilities param
This is needed to e.g. allow encoding maybe types (once we add
G_DBUS_CAPABILITY_FLAGS_MAYBE_TYPES) if, and only if, that capability
has been negotiated with the peer (via authentication).
2010-05-13 14:03:58 -04:00
Matthias Clasen
107b4d4bae remove the redundant interface_name parameter 2010-05-13 13:09:58 -04:00
David Zeuthen
82158afdad GDBus: Catch up with new PropertiesChanged signal
After a long discussion, this has finally been standardized in the
D-Bus spec. See

 http://lists.freedesktop.org/archives/dbus/2010-May/012667.html
 http://lists.freedesktop.org/archives/dbus/2010-May/012712.html

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 11:56:15 -04:00
Matthias Clasen
2d75583fb2 Fill out the export section of the migration guide 2010-05-13 01:04:29 -04:00
Matthias Clasen
9a065edf6f Add an example of exporting a GObject
This is more manual work than dbus-glib.
2010-05-13 00:40:41 -04:00
David Zeuthen
ea1e0496b0 GDBus: add 'monitor' verb to gdbus(1)
This uncovered a bug in name watching if the name wasn't activatable.

Also provoked the need for on_connection variants of g_bus_watch_name
(added g_bus_watch_proxy's variant as well).
2010-05-12 23:12:14 -04:00
David Zeuthen
9695c23d4c GDBus: Make gdbus(1) print annotations when introspecting data
Also make the gdbus-example-server include some example
annotations. The output looks like this:

$ gdbus introspect --session --dest org.gtk.GDBus.TestServer --object-path /org/gtk/GDBus/TestObject
node /org/gtk/GDBus/TestObject {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties);
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
  };
  @org.gtk.GDBus.Annotation("OnInterface")
  @org.gtk.GDBus.Annotation("AlsoOnInterface")
  interface org.gtk.GDBus.TestInterface {
    methods:
      @org.gtk.GDBus.Annotation("OnMethod")
      HelloWorld(in  s greeting,
                 out s response);
      EmitSignal(@org.gtk.GDBus.Annotation.("OnArg")
                 in  d speed_in_mph);
      GimmeStdout();
    signals:
      @org.gtk.GDBus.Annotation("Onsignal")
      VelocityChanged(d speed_in_mph,
                      @org.gtk.GDBus.Annotation.("OnArg_NonFirst")
                      s speed_as_string);
    properties:
      @org.gtk.GDBus.Annotation("OnProperty")
        @org.gtk.GDBus.Annotation("OnAnnotation_YesThisIsCrazy")
      readonly s FluxCapicitorName = 'DeLorean';
      readwrite s Title = 'Back To C!';
      readonly s ReadingAlwaysThrowsError;
      readwrite s WritingAlwaysThrowsError = "There's no home like home";
      writeonly s OnlyWritable;
      readonly s Foo = 'Tick';
      readonly s Bar = 'Tock';
  };
};
2010-05-12 22:11:18 -04:00
Matthias Clasen
cce08f1973 Add a note about implemented standard interfaces 2010-05-12 21:55:09 -04:00
David Zeuthen
f909cb5b27 GDBusProxy: Remove error in get_cached_property() and add set_cached_property()
This makes it possible to use the cached properties mechanism even if
constructing the proxy with the DO_NOT_LOAD_PROPERTIES flag.

This is useful for cases where you obtain the and track object
properties out-of-band. For example, in udisks, the plan is to have
something like this

 Manager.GetObjects    (out ao paths, out aa{sa{sv}} all_properties);
 Manager.ObjectAdded   (o path, a{sa{sv}} all_properties);
 Manager.ObjectChanged (o path, a{sa{sv}} all_properties);
 Manager.ObjectRemoved (o path, a{sa{sv}} all_properties);

E.g. the first GetObjects() call will return *all* data about *all*
exported objects. Further, this way a client will only need to listen
these three signals (three AddMatch) on the Manager object and it will
never need to do GetAll() etc (e.g. can use DO_NOT_LOAD_PROPERTIES).

(Of course this only works if the client is interested in all
objects... while this is true for udisks it is generally not true for
other D-Bus services).

Also use expected_interface to check for programming errors.
2010-05-12 20:51:06 -04:00
David Zeuthen
d40767fc62 GDBus: Add an example of a GDBusProxy subclass 2010-05-12 15:52:08 -04:00
Matthias Clasen
7c0196f026 Update an example to the latest auth observer api 2010-05-12 13:01:40 -04:00
Jesse van den Kieboom
246db9bfdb Added test cases for g_output_stream_close_async
https://bugzilla.gnome.org/show_bug.cgi?id=617937
2010-05-12 09:21:12 +02:00
Jesse van den Kieboom
adc5162b74 Flush when closing output stream async
https://bugzilla.gnome.org/show_bug.cgi?id=617937
2010-05-12 09:21:06 +02:00
Matthias Clasen
e2b9d07765 Update TODO list 2010-05-11 23:26:51 -04:00
Matthias Clasen
a63d3bb868 mention inline use of floating variants 2010-05-11 23:18:48 -04:00
Matthias Clasen
ab2ff1a307 Remove properties from GDBusMethodInvocation class 2010-05-11 22:51:14 -04:00
Matthias Clasen
c4cf88c22f Document remove_filter 2010-05-11 22:50:40 -04:00
Matthias Clasen
d7095dd470 Document DBUS address env vars 2010-05-11 22:35:59 -04:00
Matthias Clasen
26f65d83c5 Don't refer to nonexisting API. 2010-05-11 21:59:42 -04:00
Matthias Clasen
e4b1e48fca Match up parameter names
and similar cleanups to make gtk-doc happy.
2010-05-11 20:57:44 -04:00
Matthias Clasen
1d43e4140b Line up prototypes 2010-05-11 20:03:44 -04:00
Matthias Clasen
54a57bb894 Strip copyright headers from examples
These are included wholesale in the docs, and the copyright
headers make them even more overwhelming. Plus, we don't have
copyright headers on examples anywhere else.
2010-05-11 15:50:19 -04:00
David Zeuthen
8c523c069b GDBus: Update TODO list 2010-05-11 12:04:37 -04:00
Sebastian Dröge
6d5ac8163b gio: Fix gsettings build with binutils gold linker 2010-05-11 06:17:25 +02:00
Sebastian Dröge
936ff022f2 Don't include __bss_start, _edata and _end symbols in the abichecks
They are added by the binutils gold linker.
2010-05-11 06:17:25 +02:00
David Zeuthen
2d208c9d36 GDBus: In gdbus(1), try Get() if GetAll() fails
This fixes a problem with services that doesn't implement GetAll() for
one reason or another.

$ gdbus introspect --session --dest org.freedesktop.ReserveDevice1.Audio0 --object-path /org/freedesktop/ReserveDevice1/Audio0
node /org/freedesktop/ReserveDevice1/Audio0 {
  interface org.freedesktop.ReserveDevice1 {
    methods:
      RequestRelease(in  i priority,
                     out b result);
    properties:
      readonly i Priority = 0;
      readonly s ApplicationName = 'PulseAudio Sound Server';
      readonly s ApplicationDeviceName = 'Internal Audio Analog Stereo';
  };
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface,
          in  s property,
          out v value);
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s data);
  };
};
2010-05-10 16:20:59 -04:00
David Zeuthen
6e23b0b785 GDBus: Add TODO item about a need to validate data / messages 2010-05-10 14:43:08 -04:00
David Zeuthen
adf50912dd GDBus Add TODO items about finding and launching bus instances 2010-05-10 14:07:13 -04:00
David Zeuthen
7e8b07ae3b GDBus: Use GVariant instead of GHashTable for GDBusProxy::g-properties-changed 2010-05-10 13:31:54 -04:00
David Zeuthen
869b4c6833 GDBus: Use call() instead of invoke_method()
Lots of people been suggesting this. We still use MethodInvocation /
method_invocation for handling incoming method calls so use call()
instead of invoke_method() helps to separate the client and server
facilities. Which is a good thing(tm).
2010-05-10 11:47:08 -04:00
Matthias Clasen
728c4e38e7 More copyright year updates 2010-05-10 08:07:28 -04:00
Matthias Clasen
5d1135618e Trivia 2010-05-10 08:07:07 -04:00
Matthias Clasen
25a8aa5d88 Cosmetic fixes
Use P_() for properties, fix up indentation, etc.
2010-05-09 22:13:18 -04:00
Matthias Clasen
0cf467c2ca Update copyright years to include 2010 2010-05-09 13:14:55 -04:00
Matthias Clasen
e82eea6fda Microoptimize string reallocations 2010-05-09 13:09:54 -04:00
Matthias Clasen
b87dd96a8a Move some platform sources around
gunixcredentialsmessage.h ought to live with other UNIX headers,
and the credentials are moved from dbus-specific to just GIO sources.
Also move gfiledescriptorbased.c to the UNIX sources.
2010-05-09 12:41:02 -04:00
David Zeuthen
c148cafdd1 GDBus: Rework GCredentials type
These changes are is related to

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

and IRC discussions with danw.
2010-05-09 10:03:56 -04:00
Matthias Clasen
bb7106c5df Add some conceptual changes 2010-05-09 02:27:09 -04:00
Matthias Clasen
8315eb77d5 Some documentation tweaks
Add links to the D-Bus docs in some places, and various
other additions.
2010-05-09 01:44:11 -04:00
Matthias Clasen
7ca2e00054 Doc improvements
Make sure all unix-specific apis are marked as such.
2010-05-08 23:28:17 -04:00
Matthias Clasen
e8bc8c6cbf Document length parameter of g_settings_get/set_strv
This parameter was not mentioned in the doc comment, as pointed
out in bug 617767.
2010-05-08 20:14:41 -04:00
Matthias Clasen
9164fd02c9 Document length parameter of g_settings_get/set_strv
This parameter was not mentioned in the doc comment, as pointed
out in bug 617767.
2010-05-08 20:10:57 -04:00
Dan Winship
af263a3a10 remove broken useless initialization in socket-client/socket-server
https://bugzilla.gnome.org/show_bug.cgi?id=618051
2010-05-07 19:08:13 -04:00
David Zeuthen
f1855c2f77 GDBus: add TODO item about maybe having to rework ::g-properties-changed 2010-05-07 15:02:37 -04:00
David Zeuthen
85c85ae63a GDBus: add TODO item about the need to rewrite private GDBusAuth* classes 2010-05-07 14:57:20 -04:00
David Zeuthen
5bd876bef0 Add TODO item about wanting G_DBUS_NONCE_TCP_TMPDIR 2010-05-07 14:56:01 -04:00
David Zeuthen
44fd23b649 GDBus: Add more symbols to pltcheck.sh's SKIP variable
In particular, add these symbols

 g_memdup
 g_print
 g_random_int
 g_propagate_prefixed_e
 g_thread_create_full
 g_int_hash
 g_file_open_tmp
 g_thread_self
 g_usleep
2010-05-06 17:41:31 -04:00
David Zeuthen
46ce134d51 GDBus: Add new symbols to gio.symbols 2010-05-06 17:31:51 -04:00
David Zeuthen
fb1b4599a0 GDBus: Fix up i18n 2010-05-06 16:34:23 -04:00
David Zeuthen
0fd6498cd8 Add "Since: 2.26" to all new GDBus API 2010-05-06 16:02:08 -04:00
David Zeuthen
c490c14f4e Set up gtk-doc for GDBus
Also move send_credentials() and receive_credentials() to
GUnixConnection. This code might change, discussion is still ongoing
in

 https://bugzilla.gnome.org/show_bug.cgi?id=617483.
2010-05-06 15:31:45 -04:00
David Zeuthen
d0a14469d0 Initial GDBus code-drop from GDBus-standalone repo
Things compile and the test-suite passes. Still need to hook up
gio.symbols and docs. There are still a bunch of TODOs left in the
sources that needs to be addressed.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-06 14:21:32 -04:00
Vincent Untz
5b4189fc42 Fix binding between writability of key and sensitivity of a widget
We were not setting the key correctly, result in usage of invalid keys.

Bug 617788.
2010-05-06 11:15:24 -05:00
Javier Jardón
434a4e1d25 Do not include "glib.h" in gio files 2010-05-06 17:42:09 +02:00
Torsten Schönfeld
f39a49b036 gio: Add a boxed type for GFileAttributeMatcher
https://bugzilla.gnome.org/show_bug.cgi?id=616892
2010-05-03 20:13:35 +02:00
Tor Lillqvist
4487b326d7 Fix list of sources in the gio Visual Studio project
List the additional sources needed in gio/Makefile.am, not in
gio.vcprojin. Fix broken usage of sort. Filter out Unix-only source
files.
2010-05-03 19:56:46 +03:00
Tor Lillqvist
0f795345d6 Fix misspelled identifier in the Win32 code 2010-05-03 19:24:35 +03:00
Dan Winship
622916b731 g_cancellable_release_fd: allow NULL cancellable
Almost all GCancellable methods silently do nothing if passed NULL for
the cancellable. Make g_cancellable_release_fd() do that as well.
2010-05-03 12:08:14 -04:00
Ryan Lortie
644dfbd704 GSettings: fix mixed use of a pointer
- used in some places as a move-along-as-we-go pointer
  - used in other places as a pointer to the fixed base of an array

Switch all users to the first style to avoid a crasher.
2010-05-02 14:15:33 -05:00
Ryan Lortie
8dddf6499e GSettingsBackend API/ABI change
- add list() virtual method
  - add 'default_value' flag to read() call
2010-04-28 14:41:42 -05:00
Dan Winship
9ba690b386 .gitignore updates for gsettings stuff 2010-04-27 17:04:57 -04:00
Dan Winship
5046dfc85d GSocket: fix garbled error messages on windows
socket_strerror() was assuming all "strerror" messages are shorter
than 128 bytes, which is certainly true on Linux, but apparently not
on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=615494
2010-04-27 09:02:20 -04:00
David Zeuthen
3ceddd74bb Bug 616877 – Several issues with g_socket_receive_message
The messages array was not reallocated correctly because it was using
malloc instead of realloc. Also, if the user requested messages but
none were received we would segfault. Rewrite the code to fix this
and, for better readability, use GPtrArray instead of rolling our own.

Also make the docs mention that the user need to free the returned
GSocketControlMessage objects using g_object_unref().

Clarify that *messages may be set to %NULL if there are no messages
(this will save pointless allocs of arrays).

Finally, the Win32 version didn't set messages to the expected value.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-04-26 19:19:17 -04:00
Christian Persch
6f7fb3744b Add testcases for <range> and <choices>
Bug #616102.
2010-04-25 20:07:26 -05:00
Ryan Lortie
22ce6ed82d Add range restriction to gschema-compiler
Patch from Christian Persch, with minor modifications.

Bug #616102
2010-04-25 20:06:13 -05:00
Ryan Lortie
5e6e7cbadf GVariant: add bind map for strings to byte arrays 2010-04-25 19:12:14 -05:00
Tor Lillqvist
da306296cf Can't use stderr as a field name 2010-04-25 17:26:41 +03:00
Matthias Clasen
daa405c191 Rename in more places 2010-04-23 20:05:27 -04:00
Matthias Clasen
ec664445a9 Rename gschema-compile to glib-compile-schemas
And clean up the autofoo a bit: use an uppercase variable,
check for pkg-config, check for presence of glib-compile-schemas.
2010-04-23 17:27:26 -04:00
Ryan Lortie
172c229c8f add missing #endif from last patch 2010-04-23 13:54:02 -04:00
Dan Winship
1504a77655 GSocket: define CMSG_LEN and CMSG_SPACE if the system doesn't
https://bugzilla.gnome.org/show_bug.cgi?id=589989
2010-04-23 12:38:33 -04:00
Dan Winship
29f3e3f766 GSocket: add support for timeouts
Also add options for testing timeouts to socket test programs

https://bugzilla.gnome.org/show_bug.cgi?id=587898
2010-04-23 12:31:31 -04:00
Dan Winship
2c4a79c810 GSocket: Merge the unix and windows socket sources together
And remove the bits that were added to gasynchelper.c to support the
previous unix socket source.

part of https://bugzilla.gnome.org/show_bug.cgi?id=587898
2010-04-23 12:25:56 -04:00
Dan Winship
5b329c506a gio/tests/socket-client, socket-server: fix for win32
The addition of unix socket support broke these on win32
2010-04-23 12:24:30 -04:00
Matthias Clasen
25725345fb Fix up distcheck 2010-04-22 22:01:19 -04:00
Dan Winship
19d8cc3375 GUnixSocketAddress: handle abstract sockets with non-0-padded names
There are apparently two incompatible ways of naming abstract sockets:
pad the sockaddr with 0s and use the entire thing as the name, or else
don't, and just pass a shorter length value to the relevant functions.
We previously only supported the former method. Add support for the
latter.

Also correctly handle "anonymous" unix sockaddrs (eg, the client side
of a connection, or a socketpair() socket), and add unix domain socket
support to the socket-client and socket-server test programs to make
sure this all works.

https://bugzilla.gnome.org/show_bug.cgi?id=615960
2010-04-22 11:54:41 -04:00
Matthias Clasen
f3e04973e7 Rename gsettings-tool to gsettings
And make it verb-based.
2010-04-22 01:17:02 -04:00
Javier Jardón
bf0f8ad8ee [gsettings] Add g_return_*_if_fail() guards in GSettingsBackend 2010-04-22 03:20:17 +02:00
Javier Jardón
0fa791b29d [gsettings] Add g_return_*_if_fail() guards
Reported by Christian Persch here:
https://bugzilla.gnome.org/show_bug.cgi?id=616405
2010-04-22 03:10:42 +02:00
Matthias Clasen
78ed401a51 Add a test for g_settings_get_child 2010-04-21 21:03:53 -04:00
Matthias Clasen
88ff21ee92 Be more careful about memory management
This was leading to crashes, e.g. bug 616432.
2010-04-21 18:08:05 -04:00
Matthias Clasen
89b718f7d3 Pedantic terminology fix
Elements are not function calls and attributes are not arguments...
2010-04-21 17:45:29 -04:00
Matthias Clasen
585a37f374 Handle NULL string properties in bindings
Admittely, we just handle them by failing the conversion...
2010-04-21 14:49:05 -04:00
Dan Winship
3814868b7a gio.symbols: add two missing G_GNUC_CONSTs 2010-04-21 13:42:15 -04:00
Matthias Clasen
ccf9361490 Handle non-readable/-writable properties when binding
And document readability/writability requirements for binding flags.
2010-04-21 12:33:55 -04:00
Matthias Clasen
8a988e8e88 Test binding non-readable/writable properties 2010-04-21 12:31:10 -04:00
Bastien Nocera
e63a1a3d6e Fix gschema-compile tests for --schema-files changes 2010-04-21 15:04:28 +01:00
Matthias Clasen
1c2aea7854 Add tests for --allow-any-name 2010-04-21 09:50:42 -04:00
Bastien Nocera
0b61a87c29 Allow passing multiple schemas to gschema-compile
To make test suites easier to implement

https://bugzilla.gnome.org/show_bug.cgi?id=616312
2010-04-21 14:38:08 +01:00
Matthias Clasen
9708431788 Remove leftover test data 2010-04-21 09:34:57 -04:00
Matthias Clasen
64cc81f769 Add an --allow-any-name option
This will make it easier for people to keep their GConf key names
in the transition period.

Conflicts:

	gio/gschema-compile.c
2010-04-21 09:33:57 -04:00
Matthias Clasen
c83a976245 Add some more schema compiler tests 2010-04-21 00:43:55 -04:00
Matthias Clasen
564714bc95 Fix type mapping for float in gsettings-schema-convert
Bug 616331.
2010-04-20 23:40:22 -04:00
Matthias Clasen
afff087785 Simplify gschema-compile test suite
Add --one-schema-file option to gschema-compile to allow easier test
setup. Simplify the test setup.

Bug #616276.
2010-04-20 23:28:49 -04:00
Matthias Clasen
463203ee0a Add gettext-domain when required, and allow to specify it on the cmdline
Bug 616309
2010-04-20 22:55:15 -04:00
Matthias Clasen
bedf4c3259 Add documentation and translation for gsettings-tool 2010-04-20 22:55:15 -04:00
Matthias Clasen
1dbe06c30a Add a minimal commandline utility to poke GSettings 2010-04-20 22:55:15 -04:00
Javier Jardón
3569de342e [gio] Use G_DEFINE_INTERFACE macro
Use this macro in gasyncinitable, gconverter, ginitable and
gsocketconnectable

https://bugzilla.gnome.org/show_bug.cgi?id=616245
2010-04-21 02:32:43 +02:00
Tor Lillqvist
3585e64be8 Tweak the generation of the file list in gio.vcproj
Visual Studio doesn't like slash as directory separator, so use
backslash. While at it, sort the list of files put in the project file
just for clarity.
2010-04-21 03:22:59 +03:00
Ryan Lortie
8b6d2c1fc1 remove empty initialisers { } for MSVC's sake 2010-04-20 20:14:50 -04:00
Ryan Lortie
a4e3878675 Merge remote branch 'gvdb/master' 2010-04-20 20:13:56 -04:00
Christian Persch
9488d18a87 Fix gsettings mapping for uint64
Bug #616295.
2010-04-20 19:40:26 -04:00
Matthias Clasen
1b61680abb Flesh out the porting guide some more 2010-04-20 19:40:26 -04:00
Matthias Clasen
3277b77769 Document g_settings_bind_writable 2010-04-20 19:40:26 -04:00
Richard Hughes
9717833e82 Don't crash gsettings-schema-convert for GConf schemas that contain empty elements
This can be observed in gnome-power-manager with one of the entries that
contains <long></long>
2010-04-20 22:30:01 +01:00
Ryan Lortie
f82839b8fe gschema-compile: output to srcdir by default
If the target directory is not explicitly set then output to the source
directory.  Closes bug #616311 reported by Bastien Nocera.
2010-04-20 17:27:17 -04:00
Ryan Lortie
f5990c1aef GSettings: bind to writablity of a key 2010-04-20 12:30:40 -04:00
Richard Hughes
890a842b26 Fix up the gtk-doc comment for the GSettings::changed signal 2010-04-20 16:14:11 +01:00
Ryan Lortie
3c54cc074d gschema-compile: return quickly on parse error
Suggested by Christian Persch in #616102
2010-04-20 10:37:33 -04:00
Matthias Clasen
3b9de5f10a Don't forget to install and distribute gsettings-schema-convert 2010-04-19 19:09:15 -04:00
Matthias Clasen
7d330078e7 Don't forget to install and distribute gsettings-schema-convert 2010-04-19 18:26:41 -04:00
Matthias Clasen
cd9b8b563f 2.25.0 2010-04-19 17:30:42 -04:00
Christian Persch
27d2dbacd4 Use g_set_error_literal where appropriate 2010-04-19 14:18:59 -04:00
Matthias Clasen
40869e9544 Install a dtd in /usr/share/glib-2.0/schemas/gschema.dtd 2010-04-19 14:04:42 -04:00
Matthias Clasen
2d38da0746 Remove misnamed files 2010-04-19 13:28:00 -04:00
Matthias Clasen
0e48b0638d Some tests for gschema-compile
Mostly making sure that we produce reasonable error messages for
typical mistakes.
2010-04-19 13:28:00 -04:00
Javier Jardón
a64625a134 Little fix in gio/test/Makefile.am
This was introduced in
commit 4a605693fc
2010-04-19 17:59:23 +02:00
Matthias Clasen
32477d4fbf Another shadowed variable fix
See bug 616154.
2010-04-19 11:49:12 -04:00
Matthias Clasen
4a605693fc Don't segfault when <default> is missing
Also add a framework for schema compiler tests.

Fixes bug 616086.
2010-04-19 11:49:12 -04:00
David Zeuthen
ccbafd0f14 Bug 615111 – GAsyncInitable's default implementation is broken
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-04-19 10:43:48 -04:00
Ryan Lortie
40fdc929f8 Don't write out zero-byte sections in builder
This and the previous issue caught by Christian Persch in bug #616156
2010-04-19 10:39:54 -04:00
Ryan Lortie
646dc7de87 Whitespace fixups 2010-04-19 10:39:54 -04:00
Ryan Lortie
33104067d4 Fix logic error for missing options in reader 2010-04-19 10:39:54 -04:00
Matthias Clasen
3f354af402 Handle int64 and double types correctly 2010-04-19 10:34:42 -04:00
Matthias Clasen
a072c1fc29 Fix up some typos in the new tests 2010-04-19 10:34:22 -04:00
Christian Persch
230038f684 Add testcase for g_settings_bind with [u]int64 properties
And use different values for the doubles test.

All of these fail currently since g_settings_bind default mapping
truncate to glong (eek!).

Bug #616119
2010-04-19 10:00:03 -04:00
Christian Persch
dd98785e85 Rename shadowed variables
Bug #616154.
2010-04-19 09:46:32 -04:00
Matthias Clasen
69bd033e11 Call setlocale initially
That seems to be required to make bindtextdomain work in the
l10n tests. See bug 616152.
2010-04-19 09:31:31 -04:00
Tor Lillqvist
4523b2b9cd Bypass l10n tests for now on Windows 2010-04-19 16:14:45 +03:00
Tor Lillqvist
a96360ad68 Avoid non-portable <glob.h> API
And thus we can build gschema-compile on all platforms, and run it in
tests.
2010-04-19 15:48:30 +03:00
Matthias Clasen
c279b5b999 Add a schema convertion script 2010-04-19 08:04:57 -04:00
Tor Lillqvist
df8800e59a Portability improvements
Gschema-compile uses glob which is available on Unix only. Thus can't
run the gschema-compile test except on Unix either.

To avoid an Automake error, comment out the SOURCES and LDADD of
unix-streams which for some reason has been commented out from
TEST_PROGS.

Can't use a Makefile.am target called foo_PROGRAMS for random files
that aren't actually programs, as Automake assumes EXEEXT should be
appended to the file names.
2010-04-19 12:28:44 +03:00
Tor Lillqvist
9af8b83211 Add GWin32InputStream and GWin32OutputStream classes
Correspond to GUnixInputStream and GUnixOutputStream. No true async
support though. But that is how the Win32 API is, for files not
explicitly opened for so-called overlapped IO.

The API to create these streams takes Win32 HANDLEs. Not file
descriptors, because file descriptors are specific to the C library
used. The user code and GLib might be using different C libraries.

Also add a test program for the new classes, and a gio-windows-2.0.pc
file.
2010-04-19 11:54:56 +03:00
Matthias Clasen
32de7d6905 Fix up docs for backend setup functions 2010-04-18 15:57:11 -04:00
Matthias Clasen
fd8cdb83e1 Refer to gio-querymodules in the extension point docs 2010-04-18 15:55:14 -04:00
Matthias Clasen
e0850b56e2 Correct filename extension in help output. 2010-04-18 15:37:55 -04:00
Matthias Clasen
626d8ac9e1 More distcheck fixes 2010-04-17 21:31:30 -04:00
Matthias Clasen
187883dc58 add a keyfile test 2010-04-17 21:20:33 -04:00
Matthias Clasen
f07613997c More distcheck fix attempts 2010-04-17 20:54:53 -04:00
Matthias Clasen
3db0f554e4 Some build fixes 2010-04-17 16:57:28 -04:00
Matthias Clasen
137cee425f Correct the sense of an assertion 2010-04-17 16:48:10 -04:00
Matthias Clasen
d2b837df5d Document the tests
Add a short note for each test that explains what it tries to test.
2010-04-17 16:13:22 -04:00
Ryan Lortie
118ae129bc GDelayedSettingsBackend: another mandatory fixup
- emit the "has-unapplied" property notify if dropping the last key
    from the changeset due to a mandatory key
2010-04-17 11:58:52 -04:00
Ryan Lortie
e06e441ac2 GSettings delayed: fix handling of mandatory keys
- if a key becomes mandatory, drop it from the changeset

  - if we still get failing writes (ie: because of a race) then drop the
    entire changeset and signal that it happened
2010-04-17 11:49:22 -04:00
Ryan Lortie
eaaa4d14aa add backend setup APIs 2010-04-17 10:26:51 -04:00
Matthias Clasen
c8a7bb6ccd Merge GSettings tests 2010-04-17 01:48:05 -04:00
Ryan Lortie
265ca3db9d let binding functions return a floating GVariant 2010-04-17 01:27:00 -04:00
Ryan Lortie
c8e264b6d0 add GMemorySettingsBackend 2010-04-17 01:26:34 -04:00
Ryan Lortie
77ab3c28b9 add pltcheck.sh exception for GChecksum 2010-04-17 01:02:05 -04:00
Ryan Lortie
79bc511d95 XML schemas are now *.gschema.xml 2010-04-17 00:40:09 -04:00
Matthias Clasen
16637a1687 Document G_SETTINGS_BIND_GET_NO_CHANGES 2010-04-17 00:16:01 -04:00
Matthias Clasen
a2716ad020 Merge the keyfile settings backend. 2010-04-16 23:57:26 -04:00
Ryan Lortie
a187634b29 merge GSettings 2010-04-16 23:23:40 -04:00
Ryan Lortie
43a72ce1be GSettingsSchema: add call to get list of keys 2010-04-16 23:21:08 -04:00
Matthias Clasen
a922596e54 Some doc tweaks 2010-04-16 19:30:58 -04:00
Ryan Lortie
d4a4a4ccdb GSettings: import delayed backend to master 2010-04-16 12:02:44 -04:00
Ryan Lortie
04c1eadfff GSettings: more PLT/visibility fixups 2010-04-16 12:02:29 -04:00
Ryan Lortie
149224664f gio.symbols: remove pointless whitespace 2010-04-16 12:01:56 -04:00
Ryan Lortie
2474ebf15e GSettingsBackend: fix type in g_return_val_if_fail 2010-04-16 12:01:56 -04:00
Ryan Lortie
69801f8dc8 Merge remote branch 'gvdb/master' 2010-04-16 11:05:22 -04:00
Ryan Lortie
897bd9f384 GSettings: merge the schema compiler 2010-04-15 23:35:49 -04:00
Ryan Lortie
2bc8157735 merge GSettingsSchema 2010-04-15 22:30:11 -04:00
Ryan Lortie
45a1c41e8c Merge remote branch 'gvdb/master' 2010-04-15 22:14:39 -04:00
Ryan Lortie
defd75fbc5 GSettingsBackend: fix NULL vs "" context issues 2010-04-15 18:30:06 -04:00
Ryan Lortie
3e36ee3426 add 'null' GSettings backend 2010-04-15 18:22:14 -04:00
Ryan Lortie
c2675af4d7 GSettings: Modify backend API 2010-04-15 18:22:04 -04:00
Ryan Lortie
18ba085d0a merge GSettingsBackend 2010-04-15 14:59:41 -04:00
Tor Lillqvist
1229281d95 Define a public documented type for the struct stat used by g_stat()
Define GStatBuf as the type used by g_stat() and g_lstat(). Replaces
the non-public struct tag _g_stat_struct. Mostly relevant for Windows
where there are several variants of stat-style structs. On POSIX, is
just another name for struct stat.

Actually, also on many POSIX systems there are in fact several
variants of struct stat and corresponding stat() and lstat()
functions, but as g_stat and g_lstat are normally on POSIX just macros
that expand to stat and lstat, this should not cause a problem. It's
only when it's the actual g_stat() or g_lstat() implementation inside
GLib that gets called that one needs to be sure the passed struct is
the same as what GLib expects.)
2010-03-30 19:22:39 +03:00
Benjamin Otte
e7763678b5 Fix race in g_cancellable_cancel()
We need to check priv->cancelled after taking the lock. Previously we
only checked it just before taking the lock, which left a small chance
for a race.
2010-03-29 12:57:35 -05:00
Benjamin Otte
5527a2ac2c Remove unneccessary variable from g_cancellable_cancel()
The variable makes a complicated function even more complicated.
2010-03-29 12:57:35 -05:00
Matthias Clasen
7c8a108165 Fix a typo 2010-03-26 11:05:02 -04:00
Matthias Clasen
78b764f325 More doc fixups 2010-03-26 10:19:57 -04:00
Matthias Clasen
c4ea7d58f7 Small doc addition 2010-03-26 09:30:25 -04:00
Matthias Clasen
6e77ee0971 Correct the error handling in splice_stream_with_progress
We need to get out of both loops, so a simple 'break' doesn't cut it.
Bugs 613748 and 613923
2010-03-26 09:03:22 -04:00
Ryan Lortie
fd448dd7ce Add doc note about read_until() inconsistency.
See bug 584284 for more information.
2010-03-23 10:01:53 -05:00
Ryan Lortie
ace9a25fb3 Bug 613601 - buglet in dup_close_on_exec_fd()
Fix copy/paste error and 'or' FD_CLOEXEC into the existing flags instead
of just setting it outright.
2010-03-22 12:03:24 -05:00
Tor Lillqvist
226cc663e4 Avoid much of duplication in lists of source files
Don't keep the lists of source files for libglib, libgobject and
libgio in the VS project files in addition to the canonical location,
the corresponding Makefile.am files.

Instead, generate the corresponding .vcproj files at make dist time
using the C preprocessor, from template files called .vcprojin. We
still list explicitly in the .vcprojin files some of the
Windows-specific source files, and the sources files of gnulib and
pcre.
2010-03-21 16:15:02 +02:00
Tor Lillqvist
504b8b8f01 Avoid struct stat issues with MSVC 2010-03-21 14:50:45 +02:00
Colin Walters
f552689058 [GDesktopAppInfo] New function g_desktop_app_info_get_filename
This allows access to the full file path, where possible.

https://bugzilla.gnome.org/show_bug.cgi?id=612832
2010-03-14 15:45:46 -04:00
Thomas Kristensen
1be8ad3514 Close the socket event in finalizer instead of in close method
There might be a GSource attached to a GMainContext, about to be removed by a
pending cancellation. Deleting the handle too early will trigger a g_warning in
the "select()" call in GMainContext. Attached patch fixes this by deferring
destruction of WSAEVENT object until GSocket's finalize().

Patch from bug #612702.

Signed-off-by: Tor Lillqvist <tml@iki.fi>
2010-03-14 11:51:24 +02:00
Tor Lillqvist
a57522deae The SO_KEEPALIVE value seems to actually be a char on Windows
Do still use a BOOL variable, but initialize it to FALSE before the
getsockopt(), and drop the assertion on Windows. Should fix bug
2010-03-12 10:45:52 +02:00
Alexander Larsson
8cd5c94f42 Add pregenerated ids for TRASH_ORIG_PATH and TRASH_DELETION_DATE
This fixes the build for me
2010-03-08 12:03:40 +01:00
Matthias Clasen
826abbefce Add defines for trash::orig-path and trash::deletion-date
See bug 612107.
2010-03-08 00:36:00 -05:00
Matthias Clasen
0a51b58e07 Minor doc clarification
Mention g_realloc() as a possible function to use with
g_memory_output_stream_new(). Bug 612041.
2010-03-08 00:12:33 -05:00
Matthias Clasen
9dd6c60fbf Plug a memleak in g_io_modules_scan_all_in_directory
...and at the same time, fix a malloc<>g_free mismatch.
Patch by Caolan McNamara, bug 611897
2010-03-07 17:44:23 -05:00
Jonh Wendell
7504095de0 Mark a string for translation 2010-03-04 17:03:13 -03:00
Christian Dywan
c423c3a9c9 Add licence headers to gnativevolumemonitor.c/h
Fixes bug #609531
2010-03-04 11:02:31 +01:00
Felix Riemann
373f3d8b52 Fix API docs for GZlibCompressor and GZlibDecompressor
Corrects the general descriptions and makes the signals and implemented
interfaces appear.
2010-03-03 17:44:28 +01:00
Dan Winship
9a886135c8 GResolver: fix Windows 2000 workaround
Move the <wspiapi.h> include from gwin32resolver.c to
gnetworkingprivate.h, since gthreadedresolver.c needs it too.

https://bugzilla.gnome.org/show_bug.cgi?id=611696
2010-03-03 08:35:32 -05:00
Paolo Borelli
277b9717da Remove utf8inputstream leftovers in a few other places 2010-03-01 10:24:43 +01:00
Alexander Larsson
2bfddf162e Remove GUtf8InputStream for now
It turns out that the way this worked did not work out for the current
main usecase (gedit) due to issues with how this is best integrated
with GtkTextView. So, in order to not have to support an unused non-ideal
API forever we remove this before its been in a stable release.

The basic feature seems to have some utility though, so we hope for it
to eventually return in a better form.
2010-03-01 09:56:02 +01:00
Saleem Abdulrasool
a495a2122d include gio.h, not giotypes.h
Including giotypes.h in gfiledescriptor.h causes a compilation failure for users
of the header as giotypes.h may not be included directly.
2010-02-23 16:23:07 -08:00
Emilio Pozuelo Monfort
a7cc500d38 Test for unexisting files in $TMP and not in $HOME
Some buildd environments have an unwritable $HOME, which makes the
test that looks for an unexisting file there fail. Use $TMP instead,
which should be more reliable.

https://bugzilla.gnome.org/show_bug.cgi?id=610860
2010-02-23 18:37:39 +01:00
Emilio Pozuelo Monfort
202d7d37d6 Don't fail a couple of tests when running as root
root can access and write to a directory when it doesn't have
exec and write permissions respectively. So expect the tests that
check that to succeed rather than to fail when running as root.

https://bugzilla.gnome.org/show_bug.cgi?id=552912
2010-02-22 19:54:38 +01:00
Alexander Larsson
4535683b3f Keep metadata when files are renamed and trashed
This fixes https://bugzilla.gnome.org/show_bug.cgi?id=609813
2010-02-22 12:37:16 +01:00
Matthias Clasen
3983418c25 Fix up GFileDescriptorBased docs 2010-02-21 19:55:02 -05:00
Matthias Clasen
2de84d6594 Fix up make check 2010-02-21 19:42:37 -05:00
Matthias Clasen
21080a33e1 Add missign single include guards
Reported in bug 609530. patch by Christian Dywan.
2010-02-21 16:12:35 -05:00
Matthias Clasen
6c1a914d51 Fix build on Solaris 8
System header fun. See bug 610131.
2010-02-21 15:55:10 -05:00
Christian Kellner
48f74cab39 Move event support in the inotify backend
This adds support for G_FILE_MONITOR_SEND_MOVED events when requested by
the user to the inotify backend. Last part to fix bug #547890.
Based heavily on a patch by Martyn Russel <martyn@lanedo.com>.
2010-02-18 15:50:26 +01:00
Christian Kellner
239af97712 GLocalFileMonitor: Support for GFileMonitorFlags
Evaluate and remember GFileMonitorFlags. This is a part of move 
event support for fs-monitoring (bug #547890).
2010-02-18 15:50:26 +01:00
Christian Kellner
41956b2376 Move event support for fs-monitoring: Event & flag
Add a G_FILE_MONITOR_SEND_MOVED flag indicating the API user
wants to receive the new G_FILE_MOINOTR_EVENT_MOVED event 
instead of single CREATED/DELETED events.
First part of bug #547890.
2010-02-18 15:50:26 +01:00
Christian Kellner
bb4f63d639 GFile: Support for splice(2) in copy_fallback
The (linux specific) system call splice can be
used to transfer data between file descriptors
whitout copying them into user space.
See bug #604086 for additional details.
2010-02-15 13:25:50 +01:00
Christian Kellner
28f90db1ed GLocalFileOutputStream: Implement GFileDescriptorBased
Also convert GLocalFileIOStream to use the new interface to obtain
the file descriptor.
2010-02-15 13:25:50 +01:00
Christian Kellner
670f6210ce GLocalFileInputStream: Implement GFileDescriptorBased 2010-02-15 13:25:50 +01:00
Christian Kellner
4536a4adbc GFileDescriptorBased: New interface
New interface for file descriptor based io object. The interface
is only exported on unix based systems. See bug 604086.
2010-02-15 13:25:50 +01:00
Alexander Larsson
b37da7134b Set result_uncertain in win32 g_content_type_guess implementation
Fixes bug #609143
2010-02-15 10:13:10 +01:00
Tim-Philipp Müller
813d0d17a6 Don't leak filename in g_io_modules_scan_all_in_directory
https://bugzilla.gnome.org/show_bug.cgi?id=608159
2010-02-06 13:37:04 +01:00
Tor Lillqvist
021643cda4 Clarify use of struct stat on Windows 2010-02-04 19:59:05 +02:00
Tor Lillqvist
3f3c163aa2 Put a version info resource also in the gio DLL
Also, distribute gio/gio.rc(.in).
2010-02-04 00:37:13 +02:00
River Tarnell
2b121c02ef properly guard the includes
Fixes: Bug 604967 -  2.22.3 libasyncns build fails on HP-UX 11.11

* gio/libasyncns/asyncns.c: properly guard the includes of sys/select.h
  and sys/time.h
2010-02-03 17:31:02 +01:00
Ryan Lortie
f411e23043 GIO: Remove trailing "." from Since: tags in docs
Typing "Since: 2.22." results in the creation of an api-index-2.22..xml
file (ie: the last '.' is taken to be part of the version number).
2010-01-30 14:06:12 -05:00
Christian Dywan
7d6af08777 Add gtk-doc comments with Since tags to GMemoryOutputStream properties 2010-01-26 20:46:53 +01:00
Matthias Clasen
bc4f3904f2 Another few failing tests disabled 2010-01-25 12:43:10 -05:00
Matthias Clasen
d819c8e486 Typo fixes 2010-01-24 20:50:51 -05:00
Ryan Lortie
e71dcb204e gio: .gitignore gio-querymodules 2010-01-23 01:07:46 -05:00
Javier Jardón
a6ab4b7872 Upgrade to version 0.8 of libasyncns
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=602240
2010-01-13 12:02:39 -05:00
Alexander Larsson
94b8613b5f Use unconditional thread calls in gio and gobject
If threads are available we always enable threads in gobject, which
means all gio/gobject code can enable the unconditional thread calls.

This is a minor optimization since we avoid a bunch of unnecessary
is-threads-enabled checks.

https://bugzilla.gnome.org/show_bug.cgi?id=606775
2010-01-12 21:37:50 +01:00
Alexander Larsson
74ad124cfb Implement lazy loading of fam plugin 2010-01-12 16:34:23 +01:00
Alexander Larsson
57b771235e Add gio-querymodule program
This can be used to update the giomodule.cache file in directories with
giomodules in order to support lazy module loading.
2010-01-12 16:34:18 +01:00
Alexander Larsson
682b3da99b Use the new lazy loading of modules for gio modules 2010-01-12 16:31:29 +01:00
Alexander Larsson
488bede191 Add support for lazy loading of giomodules
Adds an optional query method to giomodules which should return all
possible extension points the module may implement.

Then we add a new call g_io_modules_scan_all_in_directory() similar to
g_io_modules_load_all_in_directory() that doesn't return all loaded
modules, thus allowing lazy loading.

In g_io_modules_scan_all_in_directory we look for an optional
giomodule.cache file and use the information in that to avoid
loading modules until they are needed for an extension point.
2010-01-12 16:31:29 +01:00
Ignacio Casal Quinteiro
6aa1aef556 Flush gcharsetconverter when needed.
This patch fixes bug #605686.
2010-01-12 12:56:54 +01:00
Matthias Clasen
759fbac7b7 Add properties to GMemoryOutputStream
This helps bindings. Patch by Krzysztof Kosiński. See bug 605733.
2010-01-06 17:37:11 -05:00
Matthias Clasen
f2d8f6287d Fix the filename roundtrip check
The check was always failing because the code was comparing
the wrong strings. Reported in bug 605977.
2010-01-06 13:27:19 -05:00
Ryan Lortie
baf20e0984 GUnixFDMessage: fix a small typo in an extra check
In the deserialise function, GUnixFDMessage was comparing 'level' to
both SOL_SOCKET and SCM_RIGHTS.  It is correct to compare 'type' to
SCM_RIGHTS.  The code passed tests only because:

1) it's a "should always be OK" double-check

2) SOL_SOCKET and SCM_RIGHTS, by chance, both have the value '1' on
   Linux systems.
2010-01-05 18:52:33 -05:00
Matthias Clasen
b00c6d7fb5 Fix a memleak
An early exit in expand_application_parameters forgot to free
a GString. Reported by Steve Grubb.
2010-01-05 18:18:55 -05:00
Matthias Clasen
6cee86a3ef Fix an off-by-one error
Reported by Steve Grubb.
2010-01-05 18:16:37 -05:00
Matthias Clasen
a91514ba19 Document that various functions ref GSimpleAsyncResult
Patch by Will Thompson, see bug 602417.
2010-01-02 19:53:02 -05:00
Matthias Clasen
f58fa69343 Document that _finish() must be called at most once.
The patch was provided by Will Thompson in bug 602417.
2010-01-02 19:53:02 -05:00
Matthias Clasen
74af99b860 Fix a typo
...and some whitespace fixes. Pointed out by Will Thompson in
bug 602417.
2010-01-02 19:53:02 -05:00
Matthias Clasen
ab799115de Don't return anything from a void function
Sun C doesn't like it. Reported in bug 604824.
2010-01-02 19:17:37 -05:00
Paolo Borelli
32f79f55ef Bug 604457 - gutf8inputstream.c: increasing unknown size pointer 2009-12-31 12:42:41 +01:00
Dan Winship
f74c0e257f update .gitignores 2009-12-18 12:27:36 +01:00
Dan Winship
28d91b5bb6 Fix UnixWare build by not using "sa_len" as a variable name
https://bugzilla.gnome.org/show_bug.cgi?id=604875
2009-12-18 10:26:09 +01:00
Gian Mario Tagliaretti
3f41e31bf9 Remove wrong file imports, only gio/gio.h should be included 2009-12-16 23:18:17 +01:00
Tor Lillqvist
8dc200db04 Check for <wspiapi.h> and use it if present
Should help bug #603527 if glib is built in an environment that has
<wspiapi.h>.
2009-12-14 03:09:46 +02:00
Paolo Borelli
cdf00a6a9b Add unit tests for some more methods 2009-12-08 17:05:09 +01:00
Alexander Larsson
4fbbe190b7 Remove default implementation of async filter steam ops
Not only is the default implementation broken (it causes infinite recursion
as seen in bug #603982), but its also worthless. If we just fall back on the
default stream operations we automatically get async version based on
the sync filter stream operations, which is what we want.
2009-12-07 22:14:10 +01:00
Paolo Borelli
8a6d5e203e Fix makefile typo 2009-12-06 15:45:37 +01:00
Paolo Borelli
568cd48365 Add GUtf8InputStream - Bug #603270
Add a filter input stream that performs utf8 validation.
2009-12-06 15:23:33 +01:00
Jeroen Nijhof
3d8035f799 [gio] Remove some commas at end of enumerator list
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603476
2009-12-01 19:48:04 +01:00
Dan Winship
39cd766e8e Use G_DEFINE_INTERFACE in gio
Note: Since we export types with Iface in the name rather than
Interface we have to use some typedefs to make this work. New
interfaces should probably use Interface as the public name.
2009-12-01 10:44:42 +01:00
Matthias Clasen
8907bfee86 Fix up GIO docs 2009-11-29 22:54:16 -05:00
Matthias Clasen
06c71ba399 Fix 'make check' in gio 2009-11-29 20:55:25 -05:00
Matthias Clasen
a4a69df105 Remove filter-cat from TEST_PROGS
Since it is not intended to be run as part of make check.
2009-11-29 20:48:52 -05:00
Paolo Borelli
e7992b7b06 Fix return type of g_converter_[in|out]put_stream.
Fixes bug #603265
2009-11-29 15:14:10 +01:00
Ryan Lortie
8586b636c7 Bug 589631 - enclose literals with double quotes
Improve strings for purpose of translation.

Based on a patch from Leonardo Ferreira Fontenelle.
2009-11-26 12:15:04 -05:00
Christian Kellner
09b1b6414b Add "default location" support to GMount
The "default location" of the given mount is a path that reflects
the main entry point for the user (e.g. the home directory, or the
root of the volume).

https://bugzilla.gnome.org/show_bug.cgi?id=561998
2009-11-26 16:12:18 +01:00
Alexander Larsson
2b2195bf68 Pass in the right device to vfs->local_file_add_info for symlinks
We used to pass the path for the symlink, but the device of the target
which is wrong and breaks metadata access.

https://bugzilla.gnome.org/show_bug.cgi?id=593809
2009-11-26 16:05:07 +01:00
Mures Andone
96f41b6283 Fixed bug 91 (GIO monitoring not working due to bad assert)
https://bugzilla.gnome.org/show_bug.cgi?id=593856
2009-11-26 15:40:01 +01:00
Will Thompson
97db31fa14 Apply English pedantry to GAsyncInitable's docs
• "asynchronous" was misspelled as "asyncronous" in various places;
• punctuation was missing;
• g_async_initable_new_async() had a stray "and";
• references to g_async_initable_new_finish() were missing a "the".

https://bugzilla.gnome.org/show_bug.cgi?id=602417
2009-11-26 15:14:46 +01:00
Alexander Larsson
08d33b81ee Remove unused variable 2009-11-26 13:15:11 +01:00
Ryan Lortie
3d7edc137e Bug 601637 - add GUnixFDList
change GUnixFDMessage to contain a GUnixFDList.

add test case for GUnixFDMessage and GUnixFDList.

update docs.
2009-11-24 17:55:57 -05:00
Alexander Larsson
e5a98502be Update gio.symbols with new functions 2009-11-24 13:31:33 +01:00
Alexander Larsson
b7c4aa6152 Export g_charset_converter_get_num_fallbacks in header 2009-11-24 13:31:10 +01:00
Alexander Larsson
2af69f4135 Fix GZlibCompressorFormat names
What used to be called RAW is really the zlib header format.
There is a real "raw" format, so rename the default and add a RAW type.
2009-11-24 13:02:05 +01:00
Ryan Lortie
85501f5ffa Bug 591214 - Warnings building gcancellable.o
- check for EINTR on read() and write() calls
- remove unused 'priv' variable
2009-11-23 13:53:39 -05:00
Ryan Lortie
48e2a57043 Bug 598712 - can't detect text file with backspace
looks_like_text(): Allow '\b' to appear in text files.
2009-11-23 13:47:16 -05:00
Alexander Larsson
230745a350 Add filter-cat test for GConverter streams 2009-11-23 16:22:53 +01:00
Alexander Larsson
92b9218cbf Add GZlibCompressor 2009-11-23 16:22:53 +01:00
Alexander Larsson
38c3eb14e4 Add GZlibDecompressor for zlib decompression 2009-11-23 16:22:53 +01:00
Alexander Larsson
8cb1252d92 Add zlib dependency to gio
Will be used by compression APIs
2009-11-23 16:22:52 +01:00
Alexander Larsson
fce2873641 Add test for converter streams 2009-11-23 16:22:52 +01:00
Alexander Larsson
7f8991596b Add GConverterOutputStream
This allows for conversion when saving
2009-11-23 16:22:52 +01:00
Alexander Larsson
afe3324fca Add g_output_stream_is_closing
Need this to check how we're flushing when closing a converter
output stream.
2009-11-23 16:22:52 +01:00
Alexander Larsson
848e0bf760 Add GConverterInputStream
Read and convert data from an input stream
2009-11-23 16:22:52 +01:00
Alexander Larsson
134e9bd84f Add fallback mode to GCharsetConverter 2009-11-23 16:22:52 +01:00
Alexander Larsson
4b8382823e Add GCharsetConverter 2009-11-23 16:22:52 +01:00
Alexander Larsson
0d86b25f91 Add GConverter interface
This is an interface for stateful conversions of data. Its a generic
interface suitable for things like IConv, compression, decompression,
and regexp replacement.
2009-11-23 16:22:52 +01:00
Alexander Larsson
110133135d Add G_IO_ERROR_PARTIAL_INPUT and G_IO_ERROR_INVALID_DATA errors
These are needed for GConverter
2009-11-23 16:22:52 +01:00
Ryan Lortie
56eee6759b Remove #include "glocalfile.h" from GFile
It might give somebody the wrong idea. =)
2009-11-20 14:42:38 -06:00
Juan A. Suarez Romero
ba2b2bbca2 priv variable should only be used in win32 code 2009-11-20 16:49:47 +01:00
Ryan Lortie
8e2fa44953 g_socket_listener_add_any_inet_port is Since 2.24
accidentally committed an old patch without updating.
2009-11-19 10:19:01 -06:00
Ryan Lortie
c005878ae7 Bug 585566 - GSocketListener API issues
Add a new function, g_socket_listener_add_any_inet_port(), to deal with
the desired use case.
2009-11-19 10:04:27 -06:00
Christian Dywan
77baa70eda Bug 600550 - (...) doesn't treat arguments properly
Add some additional checking to g_app_info_create_from_commandline to
make it handle strange inputs more elegantly.
2009-11-19 10:00:38 -06:00
Vincent Untz
3257e8ebe4 Bug 600620 - Add g_app_info_get_display_name()
This new API can make use of X-GNOME-FullName in .desktop files, to have
the full name of applications.
2009-11-19 09:47:46 -06:00
Ryan Lortie
9681d7e75f Bug 595138 - GFile not robust with invalid input
Improve handling of g_file_query_default_handler() when called on an
invalid GFile (ie: one created with an invalid URI).
2009-11-19 09:45:53 -06:00
Ryan Lortie
983a717fa6 Bug 535159 - g_file_has_parent
- add a g_file_has_parent() function as a wrapper around
   g_file_get_parent()
2009-11-17 20:27:38 -06:00
Javier Jardón
ba0a6e1911 Fix compilation warning: Initialize the variable 2009-11-17 20:44:16 +01:00
Javier Jardón
c6243026ed Fix compilation warning: Remove unused function 2009-11-17 20:44:10 +01:00
Javier Jardón
00a331f970 Fix compilation warning: cast to (GCompareFunc) 2009-11-17 20:44:01 +01:00
Ryan Lortie
6b7b7a7602 Bug 587300 - g_cancellable_disconnect deadlock
add documentation to clarify that a deadlock is the expected case for
calling this function from a signal handler
2009-11-11 23:54:18 -05:00
Ryan Lortie
3d09b8e09c Bug 591216 - Warning building resolver.o
check result of write system call to quiet compiler warning
2009-11-11 23:21:48 -05:00
Ryan Lortie
78e8b39b49 GSocket.receive_message: fix bogus allocation math 2009-11-11 22:22:41 -05:00
Stéphane Démurget
ef6117f78d Bug 324930 - Nicer message for EPERM on symlink
Introduced a more precise error message for EPERM when symlinking to
a local filesystem.

EPERM on symlink means symlinking is not supported by the underlying
fs so it is not the general meaning of EPERM which roughly translates
to 'Operation not permitted'.
2009-11-05 14:31:14 +01:00
Matthias Clasen
f3fbf37dd8 Avoid a warning 2009-10-25 02:56:13 -04:00
Matthias Clasen
e63262d49d Don't give up too early when collecting mime types
Since returning exactly one match has special significance, don't
give up matching before we've found at least 2 types. Also, make
sure that we don't return the same mime type more than once.
Bug 541236.
2009-10-25 02:55:46 -04:00
Tor Lillqvist
d105f431b0 Fix GWin32DirectoryMonitor
GWin32DirectoryMonitor was quite broken, but nobody had apparently
noticed, or at least not filed any bug. Only now with a bleeding edge
GTK+ file chooser does the code get exercised in common programs like
gtk-demo or GIMP, apparently. Bug #598899.
2009-10-23 00:46:50 +03:00
Tomas Bzatek
e95a3b0576 Documentation fixes 2009-10-13 16:21:42 +02:00
Tor Lillqvist
443674faaa Construct the gio module directory pathname at run-time on Windows 2009-10-12 00:20:28 +03:00
Alexander Larsson
2a3710872f xdgmime: sort glob hits with larger weight first
Higher weight is more important, so return these first meaning
they will be used as the default.
2009-10-08 12:02:52 +02:00
Alexander Larsson
07ad638adf remove xdgmime test
This is getting diverged from the xdgmime copy and we don't need it here.
2009-10-02 12:55:54 +02:00
Alexander Larsson
c7c0bcef89 xdgmime - Correct the range checks for magic matching 2009-10-02 12:55:54 +02:00
Alexander Larsson
2624e7d6c6 Remove unnecessary includes 2009-10-02 12:55:54 +02:00
Alexander Larsson
e1643fd76d xdgmime - support the new case sensitive flag 2009-10-02 12:55:54 +02:00
Alexander Larsson
7c27df1fee xdgmime - support cache files with minor version 2 2009-10-02 12:55:54 +02:00
Alexander Larsson
ce239a010e Read the new glob2 format with case sensitive flags 2009-10-02 12:55:54 +02:00
Matthias Clasen
e9fe53980b Fix --runtime-libdir option
For stable releases, it needs to take LT_REVISION into account, not
hardcode 0.
2009-09-29 23:08:03 -04:00
Matthias Clasen
6555e0171d Fix mime_info_cache_dir_add_desktop_entries
This function tried to avoid adding duplicate entries, but failed
due to using the wrong search function. See bug 595972.
2009-09-29 20:52:26 -04:00
Matthias Clasen
5fdb169b72 Clarify docs of g_async_result_get_source_object
It returns a new reference. Reported in bug 596748
2009-09-29 20:33:39 -04:00
Alexander Larsson
90e1308809 Avoid critical error in thread check if source is destroyed
The source can be destroyed by the time we complete the result, and
then the g_source_get_context(current_source) call will cause
a critical error. We check for the source being destroyed and avoid
the check in that case.

This means we miss the right-thread check in this case, but thats
merely a helper, so this is not critical.
2009-09-29 11:27:15 +02:00
Alexander Larsson
6f1ce483eb Always report metadata on the path, not symlink target
Metadata are really part of the pathname, not the target file
(as they are stored by pathname, and for many metadata like icon position
etc make not sense using the target data). So, even if nofollow
is not specified we should not follow links for metadata.

Ideally this should be implemented in the metadata extension in gvfs,
but the extension API does not allow this, so we do it in gio.

See https://bugzilla.gnome.org/show_bug.cgi?id=593809
2009-09-28 15:55:44 +02:00
Josselin Mouette
cc4970cf94 Fall back to inotify_init if inotify_init1 does not work
This fixes monitoring failing to work when glib is built on a 2.6.27+
kernel but run on an older one.

http://bugs.debian.org/544354
https://bugzilla.gnome.org/show_bug.cgi?id=593775
2009-09-23 18:39:45 +02:00
Mart Raudsepp
c755a7fd11 gio: Fix some typos in G*AppInfo documentation 2009-09-22 11:22:44 +03:00
Mart Raudsepp
6c061da2a2 gio: Fix a Since tag to actually show up in new API of 2.20 indeces
Typo made in e05426062
2009-09-22 11:22:44 +03:00
Paolo Borelli
80f66b1141 Fix build with srcdir != builddir, bug #594597 2009-09-19 10:22:33 +02:00
Matthias Clasen
53fc10d269 Fix a lot of clang complaints
Mostly dead assignments.
2009-09-18 19:20:06 -04:00
Sjoerd Simons
8667317766 Fix GNetworkAddress skipping addresses when enumerating
g_network_address_address_enumerator_next_finish takes the first item of the
address list and moves the pointer to the next one, so we shouldn't do the same
in g_network_address_address_enumerator_next_async function

Fixes bug #593941
2009-09-11 15:25:34 +01:00
Richard Hughes
cdd04f36ca Make the error const for g_simple_async_result_set_from_error 2009-09-11 15:20:34 +01:00
James Hunt
11477609d1 g_socket_send_message() fails due to invalid sendmsg(2) params.
g_socket_send_message() and g_socket_send_to() fail with ENOBUFS or
EFAULT due to the fact that if no "address" argument is specified to
g_socket_send_message, when g_socket_send_message() calls sendmsg(2),
the 2nd parameter to sendmsg ("const struct msghdr *msg") contains
uninitialized values. The fix is simple - initialize msg.msg_name to
NULL and msg.msg_msg_namelen to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=594759
2009-09-11 08:52:14 -04:00
Alexander Larsson
8af494d987 Avoid reading uninitialized memory
If the statfs call fails, don't look at the result.
2009-09-07 12:50:58 +02:00
Alexander Larsson
06de24f430 Remove warning in g_simple_async_result_complete
This warning hits code that uses GSimpleAsyncResult outside of a
mainloop as a helper object. For instance EggDBus does this.
Since the bugs this warning would fix are pretty easy to spot
and since EggDBus is deployed already we just remove the
"called from outside main loop" warning.

However, we need to keep the "called from wrong context" warning
as that is very helpful when debugging misuse of the new multiple
main context code.
2009-09-07 10:25:14 +02:00
Matthias Clasen
034d516160 Another dead assignment 2009-09-07 03:28:35 -04:00
Matthias Clasen
6cda9bfb02 Remove a dead initialization 2009-09-07 03:14:15 -04:00
Matthias Clasen
30645bd0a5 Remove a dead increment 2009-09-07 03:12:06 -04:00
Matthias Clasen
0d1ffbf361 Remove another dead assignment 2009-09-07 03:10:01 -04:00
Matthias Clasen
f2c8572d84 Remmove a dead assignment.
Spotted by clang.
2009-09-07 03:07:22 -04:00
Matthias Clasen
1ec32c403b Move a assignment to the relevant #ifdef branch
Dead code spotted by clang.
2009-09-07 03:02:58 -04:00
Matthias Clasen
e67c3cf2b0 Remove dead code 2009-09-07 03:01:02 -04:00
Matthias Clasen
80fd5ed402 Don't evaluate an uninitialized value
Bug found by clang.
2009-09-07 02:50:51 -04:00
Benjamin Otte
4114f1214c Bug 594034 - Use g_mkstemp_full() when creating the replacement file
Previous code used g_mkstemp(). But when using
G_FILE_CREATE_REPLACE_DESTINATION, no attempt was made to ensure proper
mode and flags of the created temporary file. The visible issue was that
the file was always created with mode 0600 as opposed to using 0666.
(The invisible issue was that O_RDWR was used instead of O_WRONLY.)
2009-09-04 22:45:57 +02:00
Benjamin Otte
3826963e65 Use lchmod instead of stat + chown if available
Fallout of the NOFLOOW_SYMLINKS fix from bug 593406
2009-09-01 21:53:35 +02:00
Benjamin Otte
48e0af0157 Bug 593406 - Permissions set to 777 after copying via Nautilus
Only fail to set the permissions when the actual file is a symlink.
The previous fix failed for every file when NOFOLLOW_SYMLINKS was set.
2009-09-01 21:33:11 +02:00
Benjamin Otte
bb7852e34b Only do the chmod NOFOLLOW_SYMLINK checks with HAVE_SYMLINK 2009-09-01 21:29:43 +02:00
Benjamin Otte
fc44bf40a4 Fix gtk-doc syntax 2009-09-01 12:48:55 +02:00
Benjamin Otte
e695c0932f Bug 593406 - Permissions set to 777 after copying via Nautilus
When doing a g_file_copy() with nofollow-symlinks (to copy a link for
example), the later copying of the file attributes copies the source
links 777 attributes to the target's attributes. As chmod affects the
symlink target, this would cause such copies to always set the target to
777 mode.

This patch makes setting the mode with nofollow-symlinks fail with
NOT_SUPPORTED.

The aforementioned g_file_copy() will still succeed, because it ignores
errors of the attribute copy.
2009-09-01 12:15:31 +02:00
Matthias Clasen
c47dca4cfe Re-commit 30b8774f7f
Turns out Alex had agreed to this.
2009-08-27 23:40:16 -04:00
Matthias Clasen
2889f1b8a3 Use the saved errno value
Bug 591995
2009-08-27 23:02:08 -04:00
Matthias Clasen
3a47f48311 Revert "add a "gsettings-backend" extension point to GIO"
This reverts commit 30b8774f7f.
2009-08-27 22:51:53 -04:00
Ryan Lortie
30b8774f7f add a "gsettings-backend" extension point to GIO 2009-08-27 13:45:48 -04:00
Matthias Clasen
eadef0325a Documentation fixes 2009-08-24 13:34:38 -04:00
Dan Winship
cd5bd15987 Use MSG_NOSIGNAL in GSocket if it's available
Even though we ignore SIGPIPE, gdb will still stop when the process
receives one, which sometimes confuses people into thinking the app
has crashed (eg, bug 578984, bug 590420), and is annoying anyway. So
use MSG_NOSIGNAL if it's there.

http://bugzilla.gnome.org/show_bug.cgi?id=591378
2009-08-19 12:12:15 -04:00
Dan Winship
021dd960cf Re-run res_init() when resolv.conf changes
libc caches the contents of resolv.conf, so if it changes (eg, because
the network state changed), we need re-run res_init().

http://bugzilla.gnome.org/show_bug.cgi?id=584246
2009-08-19 12:08:15 -04:00
Benjamin Otte
6db03d73a4 When creating a pipe for a cancelled cancellable, write to it
Includes (untested) fix for win32 that calls SetEvent() in that case.
2009-08-19 11:02:06 +02:00
Benjamin Otte
faae032ad0 Use g_cancellable_release_fd()
Part of: Bug 591388 - number of GCancellables available is too limited
2009-08-19 11:02:06 +02:00
Benjamin Otte
e2c97292c2 Implement g_cancellable_release_fd()
Part of: Bug 591388 - number of GCancellables available is too limited
2009-08-19 11:02:06 +02:00
Benjamin Otte
63426886ff Add g_cancellable_release_fd()
This patch only adds the function. The function is a NOP.
See the API documentation for a rationale.

Part of: Bug 591388 - number of GCancellables available is too limited
2009-08-19 11:02:05 +02:00
Benjamin Otte
bb8e4f06ab Bug 591714 – Figure out failure handling for g_cancellable_make_pollfd()
Make g_cancellable_make_pollfd() return a gboolean that indicates its error
status. Update the code that calls this function accordingly.
2009-08-19 11:02:05 +02:00
Benjamin Otte
a6ac4e90d5 Fix multiple returns in gtk-doc comment 2009-08-18 11:34:20 +02:00
Dan Winship
8f6d26e964 g_inet_socket_address_to_native: properly zero out sockaddr_in6 2009-08-17 13:20:49 -04:00
Shixin Zeng
406c3aa019 [Win32] Avoid superfluous '/' from g_file_resolve_relative_path()
Patch from bug #591532.
2009-08-14 23:23:28 +03:00
Dan Winship
882e36106d Fix a bad void return. #588901 2009-07-30 11:18:35 -04:00
Dan Winship
f34b1f024f Conditionalize portability #includes in g-asyncns.h
http://bugzilla.gnome.org/show_bug.cgi?id=589988
2009-07-29 22:35:07 -04:00
Dan Winship
45067ab9e9 Fix leaks in GSocketClient and GThreadedResolver
Also update gio/tests/send-data.c to test async connection, and free
more stuff in several tests to make leaks easier to see.
2009-07-23 16:27:01 -04:00
Lin Ma
4654a7d593 Fixed a missing head which will cause crashes for 64bit applications
Without that head, the returned pointer will be truncated to 32bit, then
causes crashes for 64bit applications.
2009-07-21 10:45:25 +08:00
Benjamin Otte
dfda26d1a9 Propagate the right error 2009-07-20 14:29:51 +02:00
Tor Lillqvist
474ba7dbc3 Make it compile on Windows.
Surround a symlink-related code snippet with ifdef S_ISLNK.
2009-07-07 14:39:10 +03:00
Matthias Clasen
3d1e812778 Document support_thread_contexts 2009-07-06 00:00:42 -04:00
Matthias Clasen
563c55bb71 Fix a segfault in g_cancellable_cancel 2009-07-05 23:38:09 -04:00
Matthias Clasen
5694ab7642 Revert "Move gio tests from gio/tests/ to tests/gio/"
This reverts commit 2262d76b33.

Move GIO tests back to where they belong.
2009-07-05 22:49:24 -04:00
Matthias Clasen
8de4be69a9 Move comment to the right place 2009-07-05 22:35:55 -04:00
Matthias Clasen
aa065346d3 Register ids for new file attributes 2009-07-05 22:26:11 -04:00
David Zeuthen
99a1c47343 Allow interaction when unmounting mounts
For details, see bug 587482. The new api:

 - Provide new _with_operation() variants of all unmount and eject methods

 - Add GMountOperation::show-processes signal
   - this can be used to show processes blocking an unmount operation

 - Deprecate all unmount and eject methods

 - Add g_drive_can_start_degraded() method
   - this is to avoid auto-starting degraded drives

 - Make g_drive_stop() resp. g_file_stop_mountable() take a GMountOperation
   - these ops were recently added and not yet public API so it's fine
     to change how they work

 - Provide a way to poll mountable files, e.g. g_file_poll_mountable()

 - Add some missing file attributes for mountable files
  - G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
    - needed for the GDU Nautilus extensions to format a volume
  - G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
    - mimics g_drive_can_start_degraded()
  - G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
    - mimics g_drive_can_poll_for_media()
  - G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC
    - mimics g_drive_is_media_check_automatic()
2009-07-05 21:59:38 -04:00
Benjamin Otte
c85ff0c750 [gio] minor improvements to g_cancellable_cancel()
- make this function not crash when cancellable is NULL
- avoid locking when the cancellable has already been cancelled
2009-07-05 21:36:03 +02:00
Dan Winship
29e6525b1e Two "make check" fixes for late changes to the thread-context patch
g_simple_async_result_complete() now checks that it's being run from
the correct main loop, so tests/gio/simple-async-result was failing,
because it called it from outside any main loop. (And gio's pltcheck
was failing because I hadn't added g_main_current_source() to it.)
2009-07-01 13:52:49 -04:00
Benjamin Otte
2262d76b33 Move gio tests from gio/tests/ to tests/gio/
This avoids getting tests built every time when working on libgio and
running make in the gio/ directory.
2009-07-01 19:03:19 +02:00
Dan Winship
65cc5d895a Support g_main_context_push_thread_default() in gio
GFile allows for the possibility that external implementations may not
support thread-default contexts yet, via
g_file_supports_thread_contexts(). GVolumeMonitor is not yet
thread-default-context aware.

Add a test program to verify that basic gio async ops work correctly
in non-default contexts.

http://bugzilla.gnome.org/show_bug.cgi?id=579984
2009-07-01 09:02:46 -04:00
Dan Winship
90381ecdbd Use low-level GSource methods in a few more places
(in preparation for thread-default context support)
2009-07-01 09:01:48 -04:00
Dan Winship
28a39fab5a Remove some unused code 2009-06-30 19:05:44 -04:00
Dan Winship
70e8eed6ac Fix GResolver for g_simple_async_result_set_op_res_gpointer change
Previously, re-setting the pointer value would cause the old
GDestroyNotify to be lost; now it causes it to be run.

http://bugzilla.gnome.org/show_bug.cgi?id=587415
2009-06-30 18:48:36 -04:00
Benjamin Otte
d589da7e86 Bug 587434 – regression tests fail
make this test not only compile, but also run successfully with mad
CFLAGS.
2009-06-30 20:42:14 +02:00
Benjamin Otte
80561f9718 Bug 587434 – regression tests fail
I missed one s/tmpfile/tmp_file/ which caused crashes.
2009-06-30 20:40:52 +02:00
Dan Winship
53beca955e Add GCancellables to GSocket ops
Currently, to implement cancellability correctly, all synchronous
calls to GSocket must be preceded by a g_socket_condition_wait() call,
(even though GSocket does this internally as well) and all
asynchronous calls must do occasional manual
g_cancellable_is_cancelled() checks. Since it's trivial to do these
checks inside GSocket instead, and we don't particularly want to
encourage people to use the APIs non-cancellably, move the
cancellation support into GSocket and simplify the existing callers.

http://bugzilla.gnome.org/show_bug.cgi?id=586797
2009-06-30 11:42:17 -04:00
Benjamin Otte
fc2b3ee560 remove unused label
complained about by -Wall
2009-06-29 18:32:09 +02:00
Benjamin Otte
afd63c3281 fix warnings from gcc compilation with my mad CFLAGS 2009-06-29 18:25:02 +02:00
Benjamin Otte
4b8ad50fc4 add g_file_attribute_set_*_by_id() and use them
This patch and the previous ones fixes the performance issues noted in
Bug 587089 – lookup_attribute() takes too much CPU
It increases performance for querying attributes by ~15% in my tests.
2009-06-29 18:25:02 +02:00
Benjamin Otte
bd198e5e45 export and use _g_file_attribute_matcher_matches_id() 2009-06-29 18:25:02 +02:00
Benjamin Otte
ceba40c27d add private header with attribute ids
attribute ids are generated when the attribute hash is initialized. This
way we can guarantee that the ids match every time.
2009-06-29 18:25:02 +02:00
Benjamin Otte
2620c23577 split lookup_attribute() into two functions 2009-06-29 18:25:02 +02:00
Benjamin Otte
66cebd7292 split attribute hash initialization into its own function 2009-06-29 18:25:01 +02:00
Tom Parker
e7a258692c Add NULL to end of g_filename_complete_get_completions() return value
g_filename_complete_get_completions() return value is meant to be a
g_strfreev-compatible array i.e. NULL-terminated. However, pointer arrays
aren't automagically NULL-terminated. This fixes bug 586868
2009-06-26 22:43:31 -04:00
Alexander Larsson
d884e509db Allow setting G_FILE_ATTRIBUTE_TYPE_INVALID attributes in GFileInfo
This is used to unset an attribute in g_file_set_attributes_from_info.
2009-06-25 09:18:01 +02:00
Richard Hughes
b0dc7afd2a Allow GCancellable to be subclassed by adding a private structure 2009-06-24 10:33:24 +02:00
David Zeuthen
0ccd18bc83 Bug 586675 – Runtime library location
Introduce an option to specify the runtime location for libraries via
a relative path to libdir.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-06-23 12:58:35 -04:00
Alexander Larsson
7662c86611 Add extension point for adding metadata for local files
This adds a local_file_add_info vfunc to GVfs that vfs implementations
can override to add metadata for local files.
2009-06-23 16:35:42 +02:00
Alexander Larsson
9a6146f54c Add g_file_info_set_attribute_status
Required for gvfs implementation for set_attribures_from_info.
2009-06-23 16:35:41 +02:00
Alexander Larsson
becf4186e6 Add g_file_info_has_namespace
Need this to quickly see if we should set attributes from
this GFileInfo in metadata extension.
2009-06-23 16:35:41 +02:00
Alexander Larsson
0ed9201ad2 Add string vector attribute type to GFileInfo
This is needed for the new metadata backend since nautilus has a
string-list metadata type, and we want to use this for nautilus.
2009-06-23 16:35:41 +02:00
Alexander Larsson
c1ab6454fe Copy namespaces correctly in g_file_copy_attributes
File attribute namespaces are delimited with "::", but
build_attribute_list_for_copy only used ":", so we didn't copy
any writable namespaces.
2009-06-23 16:35:41 +02:00
Matthias Clasen
854a43a3cd Fix build on mingw
Mingw does not have sys/uio.h. This was reported in bug 585937.

Author:    Matthias Clasen <mclasen@redhat.com>
2009-06-19 23:25:18 -04:00
Alexander Larsson
8cb481fd5f Use io_prio as mainloop prio for async-emulation (#579449)
I'm not sure why we used the elaborate formula to convert the io-priority
to the priority of the mainloop idle when emulating async i/o with idles.
However, it causes the default io priority to be less than the normal
idle prio, so the i/o won't be scheduled if there is an idle outstanding.

There is really no great mapping to use here, doing blocking i/o in an
idle of any prio is generally bad and apps doing a lot of async i/o should
initialize threads. However, if we use the io-priority directly we at least
avoid the starvation problem above and make things easier to understand.
2009-06-18 19:43:46 +02:00
Benjamin Otte
9fba812884 Revert "clarify documentation"
This reverts commit d218cf0f67.
This has been fixed in the code, so no need to keep the updated docs.
2009-06-18 15:29:41 +02:00
Benjamin Otte
835c03a5c1 syntax fix in documentation 2009-06-18 15:27:42 +02:00
Benjamin Otte
cf95d07691 fix typo in documentation 2009-06-18 15:27:42 +02:00
Benjamin Otte
d218cf0f67 clarify documentation 2009-06-18 15:27:41 +02:00
Matthias Clasen
0fbeab4520 Add g_setenv 2009-06-15 12:57:21 -04:00
David Zeuthen
fae755e056 Bug 585591 – Starting/stopping drives
Add API for starting/stopping drives. This new API will enable
GVolumeMonitor and GVfs implementations to add support for the
following features

 1. Powering down external hard disk enclosures / drives

 2. Starting/stopping multi-disk devices (such as RAID/btrfs/ZFS)

 3. Connecting/disconnecting iSCSI devices

 4. Reacting to the user pressing e.g. the "remove drive" button on
    a IBM/Lenovo Ultrabay: http://www.thinkwiki.org/wiki/Ultrabay

See the bug for the corresponding GVfs and Nautilus changes.
2009-06-15 10:59:43 -04:00
Ondrej Jirman
bb4f7c48f9 Fix incorrect freeing of thread pool in GThreadedSocketService (#584255) 2009-06-15 15:56:45 +02:00
Alexander Larsson
31cb0bdcb0 Emit changed in g_socket_listener_add_socket, not in add_address
This way we emit this signal when add_socket is called from another
place than add_address too.
2009-06-15 15:43:39 +02:00
Alexander Larsson
a640695f16 Ref the passed in socket in g_socket_listener_add_socket (#585599) 2009-06-15 15:42:38 +02:00
Alexander Larsson
67de6cba50 Add bound address out-argument to g_socket_listener_add_address (#585566)
This is very useful when binding to "any" port.
2009-06-15 14:23:57 +02:00
Alexander Larsson
740ae3aa29 Avoid unnecessary work if mount watching not specified (#585360)
If G_FILE_MONITOR_WATCH_MOUNTS isn't specified, don't do all the work
when the mtab changes.
2009-06-15 12:26:57 +02:00
Matthias Clasen
129eb07482 Support special icons for xdg user dirs
The icon names are folder-documents, folder-download, folder-music,
folder-pictures, folder-publicshare, folder-templates, folder-videos.
See bug 541276.
2009-06-15 01:45:34 -04:00
Matthias Clasen
50a7f53055 Don't use deprecated GLib api
Fixes bug 585673.
2009-06-15 01:12:50 -04:00
Matthias Clasen
642e9c7540 Fix the icon property implementation
Turns out both the setter and the getter were broken...
Fixes bug 585676.
2009-06-15 00:45:55 -04:00
Matthias Clasen
b533a944ff Trivial formatting fixes 2009-06-15 00:38:34 -04:00
Matthias Clasen
ce4aa6253e Include sys/uio.h for struct iovec
This fixes the build on OS X, bug 585280.
2009-06-14 23:55:12 -04:00
Matthias Clasen
8a3a3d797e Use inotify_init1 when available
To avoid leaking the inotify fd. Fixes bug 585478.
2009-06-14 22:29:17 -04:00
Ryan Lortie
4dbc2074bc Add GNIO test cases to .gitignore 2009-06-14 13:58:35 -04:00
Ryan Lortie
cb1a609240 Bug 585575 – g_socket_listener_add_inet_port()
Change the logic in g_socket_listener_add_inet_port() as per the
reasoning in the bug report.

  - If the OS supports neither IPv6 or IPv4, fail.
  - If the OS supports only IPv6, do that.
  - If the OS supports only IPv4, do that.
  - If the OS supports IPv6 and IPv6 "speaks" IPv4 then bind it
    and be done.
  - If the OS supports IPv6 and IPv6 doesn't "speak" IPv4 then
    create an additional socket for IPv4.
  - If binding any socket fails then fail the entire call.

Also, remove the ability to call this function with port == 0.  This
is a useless thing to do anyway since you have no way to know what
port number was actually allocated.  We should have a separate
function to deal with this.
2009-06-12 13:01:04 -04:00
Ryan Lortie
f7d756f5b6 add g_socket_speaks_ipv4()
Partial fix for Bug 585575.
2009-06-12 12:21:07 -04:00
Benjamin Otte
fd22781b18 make all APIs that take inet port arguments take a guint16 2009-06-12 15:57:51 +02:00
Benjamin Otte
3e3e3c2946 don't make strings const when they are not
gets rid of compiler warnings
2009-06-12 15:57:12 +02:00
Matthias Clasen
a402875de1 Fix an oversight in the previous commit
We don't want to unset DISPLAY etc, if none is specified in the
app launch context.
2009-06-11 12:41:16 -04:00
Matthias Clasen
9e43937d03 Include sys/types.h in gunixfdmessage.c
As recommended in 'man socket'. Fixes bug 585281.
2009-06-10 23:28:32 -04:00
Matthias Clasen
d3d81f74c5 Make setting DISPLAY work
And remove a bunch of grotty code to manipulate an environment
array at the same time. Instead, simply call setenv in the child_setup
function.
2009-06-10 16:20:51 -04:00
Dan Winship
74a3c71dcf Revert part of fix for old OS X that broke the compile on current OS X
http://bugzilla.gnome.org/show_bug.cgi?id=584574
2009-06-09 09:32:43 -04:00
Benjamin Otte
ced88fd0de Bug 585189 – g_cancellable_reset() must be called in same thread ...
... as g_cancellable_cancel()
Rework a g_critical() that would (rarely) trigger when _reset() was
called in a thread different from _cancel() by making _reset() wait for
the cancel function to be finished the same way
g_cancellable_disconnect() uses.
2009-06-09 12:19:24 +02:00
Benjamin Otte
74fd3e734f typo in documentation 2009-06-08 15:30:28 +02:00
Benjamin Otte
29a4a0a44d only query file info in g_file_copy() when we need it
The default implementation of g_file_copy() checked the size of the file
to copy to give useful progress updates unconditionally. This can cause
long delays on 1-connection FTP servers while it tries to open a second
connection before it returns EBUSY. This patch makes this query only
happen when we actually send progress updates.
2009-06-08 15:30:28 +02:00
Alexander Larsson
0bb5739f32 Reformat g_themed_icon_get_names return type to make gtk-doc work
Seems the gtk-doc scanner needs "const gchar* const *" to work, so switching
to that.
2009-06-01 22:10:41 +02:00
Dan Winship
ce6fbd6231 Fix multiple bugs in g_srv_target_list_sort()
In particular, targets with weight 0 should be very UNlikely to be
selected, not very likely, as they were before. However, even ignoring
that bug in the logic, there was an additional bug (swapping list
items would cause the 0-weight items to get re-ordered incorrectly
anyway), and the code contained several fencepost errors.

This patch also adds gio/tests/srvtarget.c, which confirms that for a
sample list of targets, we now generate all possible correct random
sortings and no incorrect sortings, and the correct sortings occur in
roughly the expected proportions (though if the current code is
still wrong, those proportions may be wrong as well).

http://bugzilla.gnome.org/show_bug.cgi?id=583398
2009-06-01 14:31:48 -04:00
Dan Winship
1ca91a2125 Clarify some GSocket docs 2009-06-01 14:24:44 -04:00
Dan Winship
5b3d62a7a6 Misc networking build fixes
http://bugzilla.gnome.org/show_bug.cgi?id=580301
http://bugzilla.gnome.org/show_bug.cgi?id=584176
2009-06-01 14:21:05 -04:00
Tor Lillqvist
85816117e3 Bump _WIN32_WINNT to 0x0501
Needed to get prototypes for getaddrinfo() and friends on mingw.
2009-06-01 14:04:49 +03:00
Hans Breuer
75ef018248 Updated msvc build files 2009-05-30 15:29:23 +02:00
Hans Breuer
780185449f Version resource template for gio 2009-05-30 15:24:06 +02:00
Hans Breuer
73dbe591fb Handle EAI_NODATA==EAI_NONAME in win32 SDK 2009-05-30 15:18:02 +02:00
Hans Breuer
cbca0ac5d9 Include io.h for write() on win32 2009-05-30 15:14:01 +02:00
Hans Breuer
f4e89ab877 Replace FIXME with proper SDK version define 2009-05-30 15:02:14 +02:00
Matthias Clasen
62abf79be2 Another pedantic docs fix 2009-05-28 14:40:18 -04:00
Alexander Larsson
d32226da6d Ref the right type in g_socket_control_message_deserialize
We were not looking at the right type at all due to a typo.
2009-05-28 15:34:57 +02:00
Alexander Larsson
390549f6c4 Document g_socket_control_message_deserialize 2009-05-28 15:34:57 +02:00
Shixin Zeng
dbe7408a5c Fix string length bugs in GWinHttpFile (#580347) 2009-05-28 12:55:11 +03:00
Matthias Clasen
a859f883cf Fix make check 2009-05-28 00:30:21 -04:00
Matthias Clasen
576839adbe Fix references to nonexisting functions 2009-05-27 22:44:31 -04:00
Matthias Clasen
06144900ec Documentation and coding style fixups
Lots of pedanic changes.
2009-05-27 18:20:08 -04:00
Hans Breuer
209a662c2f Correct reference and implement close_fn (#578769)
Do proper referencing and unreferencing of
GWinHttpFileInputStream::file and
GWinHttpFileInputStream::file::vfs. Implement
GWinHttpFileInputStream::close_fn.
2009-05-27 15:12:31 +03:00
Alexander Larsson
f99be75ff9 Remove mention of non-existing calls from docs
The docs mentions a separate seekable API for the various file streams
which don't actually exists. Change this to refer to the generic
GSeekable calls.
2009-05-25 15:46:35 +02:00
Alexander Larsson
3c0feca7f1 Don't end enum with comma (#583663)
This is valid C but breaks C++, so don't put it in headers.
2009-05-25 12:47:12 +02:00
Alexander Larsson
c93c98732a Don't return something from a void function (#583408) 2009-05-25 12:46:03 +02:00
Alexander Larsson
ce171195d9 Add g_inet_address_get_native_size (#583205)
This can be used to get the size of g_inet_address_to_bytes().
2009-05-25 11:33:56 +02:00
Christian Persch
54b43229f4 Use g_error_new_valist instead of a private copy of it 2009-05-23 17:53:01 +02:00
Alexander Larsson
14d53dcfa8 Fix connect on win32
We should not wait before calling connect for non-blocking connect.
Also, use the right error code for the nonblocking pending case on win32.
2009-05-20 16:40:55 +02:00
Alexander Larsson
bb66fdcce3 Fix build on win32 2009-05-20 16:40:54 +02:00
Alexander Larsson
c897cca601 Don't add unix specific APIs on win32 2009-05-20 16:40:54 +02:00
Alexander Larsson
5a46e4d140 Clarify g_cancellable_push_current docs wrt cancellable being NULL (#575013) 2009-05-20 14:55:14 +02:00
Alexander Larsson
ab29e09dac Don't dereference identifier_type if it is NULL (#579558) 2009-05-20 14:46:51 +02:00
Robert Bragg
d0d10e847f Take a reference on the gio file monitors while signaling pending file changes
It was possible for a signal handler to remove the last reference and
dispose the monitor.  If there were remaining pending_file_changes they
tried to dereference the disposed monitor.

This patch simply calls g_object_{ref,unref} around the loop that signals
the changes.
2009-05-20 14:23:53 +02:00
Alexander Larsson
6a9df8256a Use G_GSSIZE_FORMAT where needed (#577884) 2009-05-20 14:17:27 +02:00
Sjoerd Simons
7498049a16 Propagate errors from g_network_service_address_enumerator_next_async in its _finish function 2009-05-20 13:59:50 +02:00
Jonathon Jongsma
2be66c0458 Typedef GResolverClass in the standard way
It's a bit lame, but some of our C++ wrapping scripts expect objects to be
typedefed like:
    typedef struct _FooClass FooClass;
    struct {} _FooClass;

Rather than:
    typedef struct {} FooClass;

Functionally they're the same, but the former makes our lives easier in the
short term
2009-05-20 13:58:13 +02:00
Alexander Larsson
cb7a300e31 Don't return something from void function (#583229)
g_async_initable_init_async is void, don't return something from it.
2009-05-20 13:49:47 +02:00
Christian Persch
1cbdd2495d Preserve errno when using g_set_error with _() and g_strerror() 2009-05-20 13:47:55 +02:00
Christian Persch
80cfd099f3 Use g_set_error_literal
Bug #583206.
2009-05-20 13:46:39 +02:00
Alexander Larsson
c20b8d4d53 Check that close_fn is not %NULL before calling (#578499)
Some streams have no close function, so this caused a crash.
2009-05-20 13:41:25 +02:00
Sjoerd Simons
9033b37589 Add helper functions for connecting to service (#583061) 2009-05-20 12:41:50 +02:00
Dan Winship
25800ed4a3 Ignore SIGPIPE when using GSocket
http://bugzilla.gnome.org/show_bug.cgi?id=583001
2009-05-20 12:32:58 +02:00
Alexander Larsson
2ea22d8f46 Remove non-existing parameter from docs
g_unix_socket_address_abstract_names_supported has no address argument
2009-05-20 12:14:55 +02:00
Alexander Larsson
9d36c86f8a Add missing symbols to gio.symbols 2009-05-20 12:14:55 +02:00
Alexander Larsson
5cd86fbda6 Remove protocol names, instead use an enum with common protocols
The whole protocol name thing is pretty weird. The getprotobyname functions
seem to only specify one mapping for name <-> ids, so all families/types
must use the same values. Plus the values used for the protocols are
standardized by IANA, so are always the same.

So, we drop using names for protocols, intead introducing an enum with
a few commonly availible and used protocols.
2009-05-20 12:14:50 +02:00
Alexander Larsson
6d01593b06 Clarify "current condition" in g_socket_create_source docs 2009-05-20 11:30:43 +02:00
Alexander Larsson
8088182644 Actually implement max_threads for GThreadedSocketService 2009-05-20 11:28:27 +02:00
Alexander Larsson
053f9e72b1 Add support for graceful disconnect to GTcpConnection 2009-05-20 11:19:47 +02:00
Alexander Larsson
f061765e54 Call sync close function directly in async implementation
The g_io_stream_wrapper fails since there is already an outstanding
operation (the async close).
2009-05-20 11:18:34 +02:00
Alexander Larsson
fdfdec36d0 Add send-data, a g_socket_client test case 2009-05-19 13:44:11 +02:00
Alexander Larsson
18373cfbe8 Set the listen backlog before calling listen.
If we set it after it won't be used.
2009-05-19 12:06:29 +02:00
Alexander Larsson
64383fa3d9 Fix g_unix_socket_address_abstract_names_supported docs
The previous description was a cut-n-paste from another function.
2009-05-19 11:53:42 +02:00
Alexander Larsson
0ffe722193 Add g_socket_shutdown 2009-05-19 11:52:33 +02:00
Alexander Larsson
03441e724a Document GOutputVector and GInputVector 2009-05-19 11:27:07 +02:00
Alexander Larsson
e1a4389cbc Rename g_socket_check_pending_error to g_socket_check_connect_result
This is only used for connect anyway, and this describes the operation
better.
2009-05-19 10:57:58 +02:00
Alexander Larsson
bcba61c951 Update docs on listen backlog
Mention g_socket_set_listen_backlog in g_socket_listen.
Explain that listen backlock needs to be set before calling
listen. Also verify this with a g_return_if_fail.
2009-05-19 10:47:55 +02:00
Alexander Larsson
69130db81a Read socket state in g_socket_get_local/remote_address
Previously we saved the location in various places which is unnecessary
and sometimes even wrong. For instance, we saved the address we bound to
which may not have the final port set.
2009-05-19 10:40:27 +02:00
Alexander Larsson
f8cd1c5304 Clean up refereces to @protocol_id in g_socket_new docs
This was not fully updated from the protocol to protocol_id change.
2009-05-19 10:16:32 +02:00
Alexander Larsson
3756ddb0ee Ignore error when setting SO_REUSEADDR
The main error would be "not supported" which could happen for e.g.
unix domain sockets, we don't really care, as this is mainly something
for TCP to help out a bit.
2009-05-18 23:24:13 +02:00
Alexander Larsson
f24c7fa9cb Add support for abstract unix socket addresses 2009-05-18 21:31:28 +02:00
Alexander Larsson
d8bdc3e567 Add GError to g_socket_address_to_native
This is nice for some callers so they can report an error.
It is also required to support opional address types like
abstract paths for unix domain sockets.
2009-05-18 21:31:28 +02:00
Alexander Larsson
6ea86cc57f Update the docs for the new network APIs
This imports the network APIs into the gio reference docs, and cleans
up a bunch of gtk-doc warnings and documentation issues.
2009-05-18 13:07:43 +02:00
Alexander Larsson
e1afc6e79b Remove gtk-doc warnings
Some code was using gtk-doc comment blocks for non-gtk-doc contents, just
turn it into ordinary comments.
2009-05-18 13:07:39 +02:00
Alexander Larsson
c3f4e01627 Make all non-static functions start with underscore
We don't want to export a lot of non-namespaced internal symbols.
2009-05-18 11:27:49 +02:00
Alexander Larsson
66d49b8bde Remove g_socket_set/get_reuse_address from header
These functions have been removed.
2009-05-18 09:28:26 +02:00
Alexander Larsson
13cb011762 Add max_threads argument to g_threaded_socket_service_new 2009-05-18 08:47:49 +02:00
Paul Pogonyshev
5b683af237 Fix error message in set_mtime_atime()
Bug #578786.
2009-05-17 15:17:57 +03:00
Alexander Larsson
34e74378c9 Add test apps for highlevel socket classes
echo-server - simple echo server
httpd - simple http server
2009-05-15 21:34:14 +02:00
Alexander Larsson
67df7d43e9 Add references to highlevel classes in GSocket docs 2009-05-15 21:27:54 +02:00
Alexander Larsson
ce8361217c Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
Alexander Larsson
2597e3adc3 Remove unused variable 2009-05-15 20:58:27 +02:00
Alexander Larsson
4ade78fc3d Include stdlib.h to avoid warning
Fixes a "implicit declaration of function ‘strtol’" warning
2009-05-15 20:43:02 +02:00
Alexander Larsson
d3a2c457cb Forgot to return the allocated data in async_op_wrapper_new 2009-05-15 20:42:04 +02:00
Alexander Larsson
a48fc53251 Make cancellable pipe fds close-on-exec
GCancellable is purely an in-process thing, so ensure that no cancellable
fds accidentally leak to child processes.
2009-05-15 10:42:28 +02:00
Alexander Larsson
23424e7bcb Add padding to new classes 2009-05-15 10:28:30 +02:00
Alexander Larsson
8f67f47e05 Add test apps for GSocket API 2009-05-15 10:08:18 +02:00
Alexander Larsson
a258ec3b5b Fix deadlock in threaded resolver
When you're using the threaded resolver and using a sync call
without a cancellable the resolve_sync forgot to unlock the
initial req->mutex lock, leading to a deadlock when unrefing
the request.
2009-05-15 10:05:55 +02:00
Alexander Larsson
f662e7e86b Store protocol by id, add lookup function for name
We want to use the protocol id for lookup in the GSocketConnection
code, so we expose it. We also make GSocket store the protocol
as an int for less memory use and to allow platform specific protocols
to be specified.

Also added g_socket_protocol_id_lookup_by_name() to allow the higher
level code to specify the name by string, and g_socket_get_protocol_name()
to get it.
2009-05-15 09:10:23 +02:00
Alexander Larsson
bd87df9e73 Make GSocketSourceFunc return the GSocket
This is very useful when you have multiple sockets with sources.
2009-05-14 18:12:40 +02:00
Alexander Larsson
7ffdc91f51 Set optlen before calling getsockopt
We were sometimes failing in g_socket_check_pending_error because
we were not setting optlen on input and it was sometimes randomly
less than sizeof(int).
2009-05-14 16:19:07 +02:00
Alexander Larsson
145cec3c93 Import GInitable, GSocket and dependencies from gnio
This adds:
GInitable - failable object constructor interface
GAsyncInitable - async failable object constructor interface
GSocket - Platform independent lowlevel berkely socket style object
GSocketControlMessage - For passing control messages over GSocket
GUnixFDMessage - unix fd passing socket control message

Some changes were done during the import from gnio to make things
work in glib. For instance, types were moved to other headers, header
file boiler plate were updated to glib style and gio.symbols stuff
was added.
2009-05-14 15:44:36 +02:00
Alexander Larsson
33c00e5c33 Add g_network_address_parse
This is useful if you want to allow users to specify
the hostname and optionally a port.
2009-05-14 15:34:12 +02:00
Alexander Larsson
80a484ad2c Add the new GFile ops to gio.symbols
This adds all the symbols related to GFile GIOStream support that was
recently added.
2009-05-14 15:34:12 +02:00
Alexander Larsson
ed08218565 Add tests for local GIOStream GFile ops 2009-05-13 14:42:57 +02:00
Alexander Larsson
14d58d51a3 Local file implementation of GFileIOStream and ops
This implements all the GIOStream file ops for local files.
We use the "fallback to output stream" for all GFileIOStream ops.
Some helpers stuff was added to the local input and output streams
so they could be reused.
2009-05-13 14:42:57 +02:00
Alexander Larsson
7a2d4889b5 Add GIOStream operations to GFile
g_file_open_readwrite, g_file_create_readwrite, g_file_replace_readwrite
and async variants, with default implementations using threads.
2009-05-13 14:42:51 +02:00
Alexander Larsson
bd0b8c60c2 Add GFileIOStream class
This is similar to GFileInputStream and GFileOutputStream for GIOStreams.
The default implementations chain to the Output stream.
2009-05-13 14:42:46 +02:00
Alexander Larsson
6d0bebb7df Add comment about lifecycle issues for GIOStreams 2009-05-13 14:42:45 +02:00
Alexander Larsson
05f544c591 Import GIOStream from gnio
Based on gnio rev 84516a5f544d8d5f3da368a83844e84eca8ef771
2009-05-13 14:42:38 +02:00
Alexander Larsson
1ecfae6a71 Remove close in finalize, we do it in dispose
This is not needed, and in fact it may be a bad idea to call
it from finalize anyway since the object isn't fully alive then.
2009-05-13 13:18:28 +02:00
Alexander Larsson
2bbb85633f Remove not actually used member "cancelled" 2009-05-12 13:58:18 +02:00
Alexander Larsson
b3e4b761f4 Fix gcancellable.c build on non-win32
I forgot to add #ifdef G_OS_WIN32 in one place, sorry.
2009-05-06 13:26:17 +02:00
Alexander Larsson
e10edefff1 Simplify GCancellable support on win32
There is no need to have a GIOChannel in the GPollFD in
g_cancellable_create_pollfd. All we need is an Event object that
we signal when cancelling and reset when resetting.

Also, supporting g_cancellable_get_fd on Windows using _pipe is useless
as it doesn't work with any corresponding poll() function, so just don't
support that on win32.

I tested this with the cancellation support in GSocket from gnio.
2009-05-06 13:14:04 +02:00
Paul Pogonyshev
2fff3026ef Don't try to ref NULL pointer in g_desktop_app_info_dup()
Fixes bug #573246.
2009-05-05 22:16:59 +03:00
Carlos Garnacho
d89cc0d7cb Add a GMount::pre-unmount signal
This is the per-mount analogon to GVolumeMonitor::mount-pre-unmount.
2009-05-05 14:45:18 -04:00
Matthias Clasen
a28215fa90 Release 2.21.0 2009-05-03 18:08:49 -04:00
Paul Pogonyshev
4e694faa33 Fix g_input_stream_skip_async() documentation
Remove mention of inexisting argument.  Spotted in relation to bug
581229.
2009-05-04 00:55:35 +03:00
Matthias Clasen
3f06ddd8cd Match up parameter names to help gtk-doc 2009-05-02 23:17:29 -04:00
Matthias Clasen
2e4b51aeb3 Plug a memory leak in g_simple_async_result_set_op_res_gpointer
Fixes bug 579272.
2009-05-02 22:59:02 -04:00
Dan Winship
92ac8d165e Misc warning fixes
glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.

glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts

gio/xdgmime/xdgmimeglob.c: remove unused variable

gio/tests/live-g-file.c: fix printf args on x86_64

tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
2009-05-01 10:37:45 -04:00
Alexander Larsson
d8029ca9bc Ensure g_inet_address_get_type() call is not optimized away
Yet another place where the get_type call can be optimized away due
to the G_GNUC_CONST attribute. Use a volatile variable to ensure
its not.
2009-04-30 10:46:37 +02:00
David King
97fe421518 Fix ginetaddress.c compile on Linux
The GType type definition belongs outside the G_OS_WIN32 typedef.
2009-04-29 14:23:17 -04:00
Alexander Larsson
d80e12104f Ensure we're actually initializing the winsock library
It turns out that just calling g_inet_address_get_type() isn't
enough, since its marked G_GNUC_CONST, so the call is optimized
away. If we assign the return value to a volatile location we ensure
it is called.
2009-04-29 12:19:57 +02:00
Dan Winship
7c9caecfeb Fix the networking stuff on (current) OS X
OS X's headers split up the current and old (BIND 4) nameserver stuff
slightly differently than Linux does, but explicitly including
arpa/nameser_compat.h does the right thing on both. Part of #580301
2009-04-26 13:21:53 -04:00
Dan Winship
9a15da50e4 Fix ginetaddress.c compile on Solaris
In glibc, IN6_IS_ADDR_UNSPECIFIED() et al. cast their argument to a
uint32_t*, so it doesn't matter whether you pass them the in6_addr
itself (which is what you're supposed to do) or one of its union
members (which is what we were actually doing). Solaris's macro
accesses the in6_addr fields directly though, and so only works if you
pass the actual in6_addr. #580194.
2009-04-26 13:18:17 -04:00
Johan Bilien
491a036d84 Fix translation from GIO's file attr to xattr attributes
Bug 579862 – requesting xattr::foo ends up calling getxattr(...,
user.:foo,...)

The patch makes sure we escape xattr::, not xattr:, before adding user.
and calling getxattr.
2009-04-22 19:09:34 +01:00
Christian Persch
a9c33dbd7a Use P_ for translatable param spec strings
Translatable param spec strings should be annotated with P_() instead of
plain _(). Bug #579830.
2009-04-22 16:11:38 +02:00
Dan Winship
9a3d18d2a6 GResolver wrappers: GNetworkAddress, GNetworkService, GSocketConnectable
Higher-level wrappers around GResolver. GSocketConnectable provides an
interface for synchronously or asynchronously iterating multiple
socket addresses, with GNetworkAddress and GNetworkService providing
interfaces based on hostname and SRV record resolution.
Part of #548466.
2009-04-22 08:36:38 -04:00
Dan Winship
c94d3f9288 Add GResolver, a glib-ish interface to DNS
GResolver provides asynchronous (and synchronous-but-cancellable) APIs
for resolving hostnames, reverse-resolving IP addresses back to
hostnames, and resolving SRV records. Part of #548466.
2009-04-22 08:36:32 -04:00
Dan Winship
68fc055627 Add network address and socket types
Types and methods for dealing with IPv4 and IPv6 addresses (and UNIX
domain socket addresses under UNIX). This does not include code for
actual socket I/O.

Originally from "gnio". Much of the code was written by Christian
Kellner, Samuel Cormier-Iijima, and Ryan Lortie.

Part of #548466.
2009-04-22 08:36:10 -04:00
Alexander Larsson
0f48f804b6 Use g_cancellable_connect/disconnect
Use the new cancellable helper functions to avoid races. (#572844)
2009-04-20 13:17:10 +02:00
Alexander Larsson
0001014c37 Add helpers for connecting/disconnecting to cancelled signal
There are race conditions when connecting and disconnecting from the
"cancelled" signal on GCancellable which you need to do when
implementing cancellable operations. This adds helper functions that
avoid these races and mentions these races in the docs. (#572844)
2009-04-20 13:17:03 +02:00
Matthias Clasen
2c1dc529e8 Add a note about handling non-hal backends 2009-04-09 21:34:49 -04:00
Gian Mario Tagliaretti
856632c496 Fix a typo in GFile docs
Fixed function name in GFile docs from g_set_display_name to
g_file_set_display_name so that gtk-doc can link correctly.  (#578002)
2009-04-09 14:35:57 -04:00
Alexander Larsson
d0cf7b3878 Only mark regular files as backup files
Apps don't generally create backup directories, etc. So, if the file
ends with ~ but is not a regular file shouldn't be considered a backup
file. (#573673)
2009-04-08 09:12:02 +02:00
Matthias Clasen
e6e82c51a6 Move hex_digits to rodata
Turn a string into a constant array.
2009-04-03 00:35:43 -04:00
Matthias Clasen
25ff8ee748 Don't lie about ext4 filesystems
When returning a filesystem type id, say "ext3/ext4" instead of "ext3",
since both use the same superblock magic, so we can't discriminate
them without more work.
2009-04-03 00:23:54 -04:00
Alexander Larsson
1ce74b0dd3 On trash, if rename fails with EXDEV, return G_IO_ERROR_NOT_SUPPORTED
Sometimes it seems like the trash dir and the file are on the same
filesystem but the rename fails with EXDEV anyway (can happen
e.g. with bind mounts or multiple mounts of the same device). In this
case we want to return the right error so that apps can fallback to
regular delete.
2009-04-02 19:01:56 +02:00
Matthias Clasen
785bed2e18 Update README files to refer to git
Update various README files to refer to git instead of svn.
Add a README.commits that is pretty much a copy of the same file
in GTK+. Also discontinue ChangeLog files.
2009-03-31 19:39:16 -04:00
Carlos Garnacho
dabbea65c6 Bug 575270 – GVolumeMonitor::mount-pre-unmount not being emitted
2009-03-26  Carlos Garnacho  <carlosg@gnome.org>

        Bug 575270 – GVolumeMonitor::mount-pre-unmount not being emitted

        * gunixmount.c (eject_unmount_cb) (eject_unmount_do_cb)
        (eject_unmount_do): Emit ::mount-pre-unmount and wait 500msec before
        actually trying to unmount.


svn path=/trunk/; revision=8020
2009-03-26 13:59:02 +00:00
Colin Walters
1d1fba442f Bug 575708 - runaway inotify madness ...
2009-03-17  Colin Walters  <walters@redhat.com>

	Bug 575708 - runaway inotify madness ...

	* gfilemonitor.c: Queue up events in a local list and
	fire one idle, instead of queuing lots of individual
	idles which has bad performance behavior.


svn path=/trunk/; revision=8010
2009-03-17 21:59:18 +00:00
Alexander Larsson
a3fe428081 fix attributes argument of query_info methods to be "const char *".
2009-03-17  Alexander Larsson  <alexl@redhat.com>

        * glocalfileinputstream.c:
        * glocalfileoutputstream.c:
	fix attributes argument of query_info methods to
	be "const char *".


svn path=/trunk/; revision=8000
2009-03-17 11:21:37 +00:00
Alexander Larsson
6cff88ba18 Bug 575555 – Use fsync() when replacing files to avoid data loss on
2009-03-16  Alexander Larsson  <alexl@redhat.com>

	Bug 575555 – Use fsync() when replacing files to avoid data loss on crash

        * configure.in:
	Look for fsync().

        * glib/gfileutils.c:
        (write_to_temp_file):
	fsync temp file if destination file exists

2009-03-16  Alexander Larsson  <alexl@redhat.com>

	Bug 575555 – Use fsync() when replacing files to avoid data loss on crash

        * glocalfileoutputstream.c:
        (g_local_file_output_stream_close):
        (_g_local_file_output_stream_replace):
	fsync temp file before closing if replacing target file

	

svn path=/trunk/; revision=7991
2009-03-16 16:03:13 +00:00
Matthias Clasen
5a8a224ff0 2.20.0
svn path=/trunk/; revision=7976
2009-03-13 05:44:11 +00:00
Alexander Larsson
70a276eca3 Bug 573843 – g_get_current_dir returns non-absolute path
2009-03-04  Alexander Larsson  <alexl@redhat.com>

	Bug 573843 – g_get_current_dir returns non-absolute path

	* glocalfile.c (canonicalize_filename):
	Handle the case where g_get_current_dir() returns a non-absolute path.


svn path=/trunk/; revision=7958
2009-03-04 13:47:53 +00:00
Alexander Larsson
73477419e8 Bug 573970 – crash in gunixvolumemonitor:update_mounts when unmounting
2009-03-04  Alexander Larsson  <alexl@redhat.com>

	Bug 573970 – crash in gunixvolumemonitor:update_mounts when unmounting

        * gunionvolumemonitor.c:
        (g_union_volume_monitor_dispose):
	Run dispose on child monitors when disposing.

        * gunixvolumemonitor.c:
	Remove all volumes and mount on dispose to avoid circular
	dependencies not freeing the monitor



svn path=/trunk/; revision=7957
2009-03-04 10:45:10 +00:00
Alexander Larsson
896c3d1b2c Bug 561172 – gnome-open fails on local URIs with anchors
2009-03-03  Alexander Larsson  <alexl@redhat.com>

	Bug 561172 – gnome-open fails on local URIs with anchors

        * gdesktopappinfo.c:
	Don't force uris to filenames if the uri has an anchor, because
	that would strip the anchor.

        * glocalvfs.c:
	Strip anchor from file:// uris when creating GFile, since
	g_filename_from_uri doesn't handle them.



svn path=/trunk/; revision=7953
2009-03-03 19:02:16 +00:00
Alexander Larsson
f891d4e04e Bug 562613 – Missing const modifier in string parameters
2009-03-03  Alexander Larsson  <alexl@redhat.com>

	Bug 562613 – Missing const modifier in string parameters

        * gfileinputstream.[ch]:
        * gfileoutputstream.[ch]:
        * glocalfileinfo.[ch]:
	Make string arguments const if used as such.



svn path=/trunk/; revision=7952
2009-03-03 15:50:13 +00:00
Alexander Larsson
0b9f24c1e1 Handle filesystems no supporting reporting how much is free. This fixes
2009-03-03  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c (g_local_file_query_filesystem_info):
	Handle filesystems no supporting reporting how much is free.
	This fixes bug 573454 where the filesystem not supporting this
	is the gvfs smb backend over the fuse filesystem.



svn path=/trunk/; revision=7951
2009-03-03 14:40:44 +00:00
Matthias Clasen
a902f5257c 2.19.10
svn path=/trunk/; revision=7942
2009-03-02 06:36:08 +00:00
Matthias Clasen
3f07ef2119 2.19.9
svn path=/trunk/; revision=7939
2009-03-02 05:49:44 +00:00
Matthias Clasen
fea99b4b1a Add a Since: tag
svn path=/trunk/; revision=7937
2009-03-02 05:07:21 +00:00
Matthias Clasen
0712b73358 Use a separate lock for extension point registration to avoid deadlock.
* giomodule.c: Use a separate lock for extension point registration
        to avoid deadlock. Discovered by Torsten Schoenfeld


svn path=/trunk/; revision=7935
2009-03-02 03:50:09 +00:00
Matthias Clasen
74882fb655 Fix docs
svn path=/trunk/; revision=7934
2009-03-01 17:12:58 +00:00
Matthias Clasen
474db07f6a Clarify docs
svn path=/trunk/; revision=7923
2009-02-27 21:02:19 +00:00
David Zeuthen
120300e659 Fix up bug reference in previous commit
svn path=/trunk/; revision=7921
2009-02-27 18:21:14 +00:00
David Zeuthen
e38e6aafe0 Bug 540461 – GEmblemedIcon leak
2009-02-27  David Zeuthen  <davidz@redhat.com>

        Bug 540461 – GEmblemedIcon leak

        * gemblemedicon.c (g_emblemed_icon_finalize):
        Avoid leaking a GList.


svn path=/trunk/; revision=7920
2009-02-27 18:19:05 +00:00
Alexander Larsson
b3cb7caf7d Split out the extension point registration code to its own function.
2009-02-27  Alexander Larsson  <alexl@redhat.com>

        * giomodule-priv.h:
        * giomodule.c:
	Split out the extension point registration code to its
	own function.

        * glocalvfs.c:
	Ensure extension points are registered before extending it.
	It might not have happened yet if g_vfs_get_local() is called.



svn path=/trunk/; revision=7919
2009-02-27 15:22:11 +00:00
Alexander Larsson
b89e432e8d Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as
2009-02-26  Alexander Larsson  <alexl@redhat.com>

	Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as document
        * gmemoryoutputstream.c:
	Track actual valid size, even if we later seek back.

        * tests/memory-output-stream.c:
	Add testcase



svn path=/trunk/; revision=7916
2009-02-26 15:41:29 +00:00
Alexander Larsson
1ab68f9ee9 Bug 543183 – Clarify docs for g_file_has_prefix
2009-02-26  Alexander Larsson  <alexl@redhat.com>

	Bug 543183 – Clarify docs for g_file_has_prefix

	* gfile.c: (g_file_has_prefix):
	Clarify how the prefix matching works.


svn path=/trunk/; revision=7915
2009-02-26 15:03:11 +00:00
Alexander Larsson
fa558d00c3 Support desktop file key X-GIO-NoFuse which disables use of fuse pathnames
2009-02-26  Alexander Larsson  <alexl@redhat.com>

	* gdesktopappinfo.c:
	Support desktop file key X-GIO-NoFuse which disables
	use of fuse pathnames for %u and %U arguments.



svn path=/trunk/; revision=7914
2009-02-26 14:59:16 +00:00
Alexander Larsson
8c6e7c103f Bug 570073 – Add support for reading filesystems on Interix
2009-02-25  Alexander Larsson  <alexl@redhat.com>

	Bug 570073 – Add support for reading filesystems on Interix

	* gunixmounts.c (_g_get_unix_mounts):
	Support Interix. Patch from  Fabian Groffen 


svn path=/trunk/; revision=7911
2009-02-25 16:37:35 +00:00
Paolo Borelli
ddfe508c04 Bug 570069 – wrong preprocessor directive in gio/glocalfileinfo.c
2009-02-25  Paolo Borelli  <pborelli@katamail.com>

	Bug 570069 – wrong preprocessor directive in gio/glocalfileinfo.c

	* glocalfileinfo.c: fix preprocessor condition. Patch by Markus Duft.

svn path=/trunk/; revision=7910
2009-02-25 13:30:49 +00:00
Alexander Larsson
319d60e444 Remove accidentally commited spew
2009-02-23  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c:
	Remove accidentally commited spew



svn path=/trunk/; revision=7903
2009-02-23 15:12:39 +00:00
Matthias Clasen
f548330275 Fix "it's" vs "its" confusion throughout the source. Patch by Will
* Fix "it's" vs "its" confusion throughout the source. Patch
        by Will Thompson.


svn path=/trunk/; revision=7897
2009-02-23 04:30:06 +00:00
Alexander Larsson
9fdf70ba5f Don't ever sniff desktop files when the filename is known. In other words,
2009-02-20  Alexander Larsson  <alexl@redhat.com>

        * gcontenttype.c:
        (g_content_type_guess):
	Don't ever sniff desktop files when the filename is known.
	In other words, only allow desktop files with the .desktop extension
	and when the filename isn't known.
	This is a security precaution since desktop files can execute
	arbitrary code when launched and we don't want to allow them to
	try and hide as another type. There is no legit reason to not
	have the .desktop extension anyway.



svn path=/trunk/; revision=7892
2009-02-20 07:46:57 +00:00
Ryan Lortie
1ee6cc4882 update gitignore
svn path=/trunk/; revision=7887
2009-02-19 17:26:29 +00:00
Ryan Lortie
4dcba4adf7 8 spaces -> tab in ChangeLog
svn path=/trunk/; revision=7886
2009-02-19 17:25:54 +00:00
Alexander Larsson
0ee2b46405 Bug 549298 – impossible to copy files with p (pipe) flag
2009-02-19  Alexander Larsson  <alexl@redhat.com>

        Bug 549298 – impossible to copy files with p (pipe) flag

        * gfile.c:
        (file_copy_fallback):
	Error out if the source file is a special file


svn path=/trunk/; revision=7885
2009-02-19 15:26:32 +00:00
Alexander Larsson
0fd66d7e22 Bug 560564 – Replacing a symlink with its linked file truncates the
2009-02-18  Alexander Larsson  <alexl@redhat.com>

	Bug 560564 – Replacing a symlink with its linked file truncates the original file

        * gioenums.h:
	Add G_FILE_CREATE_REPLACE_DESTINATION

        * glocalfileoutputstream.c:
        (handle_overwrite_open):
        (_g_local_file_output_stream_replace):
	Handle G_FILE_CREATE_REPLACE_DESTINATION when overwriting files.

        * gfile.c:
        (file_copy_fallback):
	Pass G_FILE_CREATE_REPLACE_DESTINATION to g_file_replace when copying
	with overwrite.


svn path=/trunk/; revision=7880
2009-02-18 14:49:25 +00:00
Ryan Lortie
3fd881b5bb unref the destination's attribute matcher before overwriting it.
2009-02-17  Ryan Lortie  <desrt@desrt.ca>

        * gfileinfo.c: unref the destination's attribute matcher before
        overwriting it.


svn path=/trunk/; revision=7879
2009-02-17 23:36:13 +00:00
Matthias Clasen
4611dadadd 2.19.8
svn path=/trunk/; revision=7876
2009-02-17 18:36:36 +00:00
Ryan Lortie
5f15c71a14 fix changelog date
svn path=/trunk/; revision=7873
2009-02-17 10:13:52 +00:00
Matthias Clasen
e05426062b Add missing exports
svn path=/trunk/; revision=7872
2009-02-17 06:32:44 +00:00
Matthias Clasen
7b106d2066 2.19.7
svn path=/trunk/; revision=7868
2009-02-17 02:49:52 +00:00
Matthias Clasen
49cb04caf0 Add an "aborted" signal to abort a mount operation from the backend side.
* gmountoperation.[hc]: Add an "aborted" signal to abort a
        mount operation from the backend side.

        * gvolume.h: Add docs regarding the "aborted" signal.


svn path=/trunk/; revision=7866
2009-02-17 00:02:06 +00:00
Ryan Lortie
e8c635841a Bug 505042 – add file attribute for actually used file size in bytes
2009-02-13  Ryan Lortie  <desrt@desrt.ca>

	Bug 505042 – add file attribute for actually used file size in bytes

	* gfileinfo.h: add G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE define to
	"standard::allocated-size"
	* gfileattribute.c: document
	* glocalfileinfo.c: set the allocated size from st_blocks * 512


svn path=/trunk/; revision=7865
2009-02-16 14:22:43 +00:00
Ryan Lortie
2bd1d5d737 Bug 571598 – GAsyncResult with NULL gobject
2009-02-16  Ryan Lortie  <desrt@desrt.ca>

        Bug 571598 – GAsyncResult with NULL gobject

        * gsimpleasyncresult.c: remove various assertions and add some checks
        to allow for a NULL source_object in GSimpleAsyncResult.


svn path=/trunk/; revision=7864
2009-02-16 09:33:39 +00:00
Matthias Clasen
bbf0530f24 Cope with EEXIST == ENOTEMPTY. Reported by Nicolas Joseph
* gioerror.c (g_io_error_from_errno): Cope with EEXIST == ENOTEMPTY.
        Reported by Nicolas Joseph


svn path=/trunk/; revision=7859
2009-02-12 01:52:17 +00:00
Murray Cumming
a431c976af Correct the grammar in some property documentation.
2009-02-06  Murray Cumming  <murrayc@murrayc.com>

* gio/gfilterinputstream.c:
* gio/gfilteroutputstream.c: Correct the grammar in some property 
documentation.
* gio/gdatainputstream.c:
* glib/gregex.c: Correct the spelling of 
occurrence in documentation.

svn path=/trunk/; revision=7856
2009-02-06 14:08:19 +00:00
Alexander Larsson
cefebf7ff2 Bug 566747 - URIs opened with firefox %u load as local files
2009-02-04  Alexander Larsson  <alexl@redhat.com>

	Bug 566747 - URIs opened with firefox %u load as local files

	* gdummyfile.c (g_dummy_file_get_path):
	Dummy files are never used for local paths, so always return NULL
	in get_path(). 


svn path=/trunk/; revision=7849
2009-02-04 08:01:42 +00:00
Matthias Clasen
afa157a73d 2.19.6
svn path=/trunk/; revision=7845
2009-02-02 20:09:08 +00:00
Paolo Borelli
49719cca38 plug a tiny mem leak.
2009-01-31  Paolo Borelli  <pborelli@katamail.com>

	* glocalfileinfo.c: plug a tiny mem leak.


svn path=/trunk/; revision=7841
2009-01-31 20:06:02 +00:00
Ryan Lortie
83e88655c0 handle all possible cases of EAGAIN and EWOULDBLOCK being (un)defined and
2009-01-29  Ryan Lortie  <desrt@desrt.ca>

        * gioerror.c (g_io_error_from_errno): handle all possible cases of
        EAGAIN and EWOULDBLOCK being (un)defined and (un)equal.


svn path=/trunk/; revision=7836
2009-01-29 15:55:11 +00:00
Ryan Lortie
129e86cf2c Bug 568575 – _async functions for GDataInputStream
2009-01-28  Ryan Lortie  <desrt@desrt.ca>

        Bug 568575 – _async functions for GDataInputStream

        * gdatainputstream.h:
        * gdatainputstream.c: add _async versions of read_line and read_until.
        * gio.symbols:
        * ../docs/reference/gio/gio-sections.txt: add new functions
        * tests/sleepy-stream.c: new test case for async read line
        * tests/Makefile.am: add new test


svn path=/trunk/; revision=7835
2009-01-28 16:39:39 +00:00
Ryan Lortie
fc10cb46ad Bug 568723 – g_buffered_input_stream_fill_async doesn't take count == -1
2009-01-22  Ryan Lortie  <desrt@desrt.ca>

        Bug 568723 – g_buffered_input_stream_fill_async doesn't take count == -1

        * gbufferedinputstream.c (g_buffered_input_stream_fill_async,
        g_buffered_input_stream_fill): check for count < -1 instead of count <
        0 and copy modified check to non-async version for consistency.
        document the "count = -1" API.


svn path=/trunk/; revision=7828
2009-01-22 19:18:26 +00:00
Ryan Lortie
fb50c2ae1a Bug 568741 – g_buffered_input_stream_fill_async doesn't work
2009-01-22  Ryan Lortie  <desrt@desrt.ca>

        Bug 568741 – g_buffered_input_stream_fill_async doesn't work

        * gbufferedinputstream.c (fill_async_callback): grow the buffer tail
        after we have successfully read data from the base stream


svn path=/trunk/; revision=7827
2009-01-22 19:00:05 +00:00
Ryan Lortie
a9c978a354 Bug 568394 – dropping the last reference to a stream filter closes the
2009-01-20  Ryan Lortie  <desrt@desrt.ca>

        Bug 568394 – dropping the last reference to a stream filter closes the
        base stream

        * gfilterinputstream.h:
        * gfilterinputstream.c: add "close-base-stream" property and only
        close the base stream if it is true.  issue async close callbacks from
        correct source object.
        * gfilteroutputstream.h:
        * gfilteroutputstream.c: add a "close-base-stream" property and only
        close the base stream if it is true.  issue async close callbacks from
        correct source object.
        * gbufferedoutputstream: check g_filter_output_stream_get_close_base()
        before closing the base stream.  fix invalid source tag comparison in
        close_async (was comparing to flush_async).
        * ../docs/reference/gio/gio-sections.txt:
        * gio.symbols: add
        g_filter_{in,out}put_stream_{g,s}et_close_base_stream
        * tests/filter-streams.c: new test cases
        * tests/Makefile.am: add new test
        * tests/.gitignore: add new test


svn path=/trunk/; revision=7825
2009-01-21 14:09:56 +00:00
Matthias Clasen
ce9729b2fb Expand docs
svn path=/trunk/; revision=7822
2009-01-19 22:58:38 +00:00
Matthias Clasen
af6a048743 2.19.5
svn path=/trunk/; revision=7820
2009-01-19 07:46:43 +00:00
Matthias Clasen
4a6a9dae2c Doc addition
svn path=/trunk/; revision=7819
2009-01-19 07:05:07 +00:00
Matthias Clasen
b77a6eeac9 Some cleanups
svn path=/trunk/; revision=7817
2009-01-19 06:09:11 +00:00
Matthias Clasen
f8cfff0686 Don't assume filenames are UTF-8.
* xdgmime/xdgmimecache.c:
        * xdgmime/xdgmimeglob.c: Don't assume filenames are UTF-8.

svn path=/trunk/; revision=7784
2009-01-09 05:19:17 +00:00
Matthias Clasen
a6b965efa1 Make tests work with current shared-mime-info
svn path=/trunk/; revision=7783
2009-01-09 04:53:14 +00:00
Matthias Clasen
2479abee27 Add a G_IO_ERROR_TOO_MANY_OPEN_FILES error code. Requested by Olivier
* gioenums.h: Add a G_IO_ERROR_TOO_MANY_OPEN_FILES error code.
        Requested by Olivier Sessink.

        * gioerror.c: Translate EMFILE to G_IO_ERROR_TOO_MANY_OPEN_FILES.

        * glocalfileenumerator.c: Translate G_FILE_ERROR_MFILE to
        G_IO_ERROR_TOO_MANY_OPEN_FILES.


svn path=/trunk/; revision=7782
2009-01-08 01:32:15 +00:00
Matthias Clasen
85fa6de695 2.19.4
svn path=/trunk/; revision=7777
2009-01-05 18:06:05 +00:00
Dan Winship
7943f976d4 cast a "char **" to "const char **" to avoid a warning.
* gdesktopappinfo.c (update_mimeapps_list): cast a "char **" to
	"const char **" to avoid a warning.

	* gemblem.c (g_emblem_from_tokens):
	* gemblemedicon.c (g_emblemed_icon_from_tokens):
	* xdgmime/xdgmime.c (xdg_mime_get_icon): remove unused
	variables

svn path=/trunk/; revision=7775
2009-01-05 16:57:55 +00:00
Matthias Clasen
a836486e24 Try using O_NOATIME when sniffing for mime types. Based on a patch by A.
* glocalfileinfo.c (get_content_type): Try using O_NOATIME when
        sniffing for mime types. Based on a patch by A. Walton


svn path=/trunk/; revision=7773
2009-01-05 16:20:40 +00:00
Ryan Lortie
481559a031 improve add new simple-async-result test new file to test
2009-01-05  Ryan Lortie  <desrt@desrt.ca>

        * tests/.gitignore: improve
        * tests/Makefile.am: add new simple-async-result test
        * tests/simple-async-result.c: new file to test GSimpleAsyncResult


svn path=/trunk/; revision=7767
2009-01-05 06:58:22 +00:00
Ryan Lortie
876f03f807 Add g_simple_async_result_is_valid(). Implementation by Dan Winship.
2009-01-05  Ryan Lortie  <desrt@desrt.ca>

        * gio.symbols:
        * ../docs/reference/gio/gio-sections.txt:
        * gsimpleasyncresult.h:
        * gsimpleasyncresult.c: Add g_simple_async_result_is_valid().
        Implementation by Dan Winship.  Closes #566170.


svn path=/trunk/; revision=7766
2009-01-05 06:57:16 +00:00
Matthias Clasen
782fe440ef Add notes about being UNIX-specific
svn path=/trunk/; revision=7756
2008-12-31 07:47:19 +00:00
Ryan Lortie
caa5ed0d22 move some changelog entries that i put in the wrong spot
svn path=/trunk/; revision=7754
2008-12-20 19:41:07 +00:00
Matthias Clasen
649c25f216 2.19.3
svn path=/trunk/; revision=7746
2008-12-15 20:01:49 +00:00
Matthias Clasen
be914f6841 Make these work on x86_64
svn path=/trunk/; revision=7744
2008-12-13 23:56:05 +00:00
Ryan Lortie
b941139254 free the tokens when done with them
2008-12-12  Ryan Lortie  <desrt@desrt.ca>

        * gio/gicon.c (g_icon_to_string_tokenized): free the tokens when done
        with them


svn path=/trunk/; revision=7743
2008-12-12 20:59:54 +00:00
Ryan Lortie
a28d87bfc9 fix leak that occurs when multiple mount entries match the requested path
2008-12-12  Ryan Lortie  <desrt@desrt.ca>

        * gio/gunixmounts.c (g_unix_mount_at): fix leak that occurs when
        multiple mount entries match the requested path


svn path=/trunk/; revision=7742
2008-12-12 20:03:36 +00:00
Alexander Larsson
3b4ad625b9 Bug 562452 - Ensure we return G_IO_ERROR_CANCELLED if cancelling
2008-12-10  Alexander Larsson  <alexl@redhat.com>

	Bug 562452 - Ensure we return G_IO_ERROR_CANCELLED if cancelling
	g_simple_async_result_run_in_thread
	
        * gsimpleasyncresult.c:
	Make g_simple_async_result_run_in_thread check cancellation before
	calling out to the user in the callback. This means we guarantee
	reporting cancels of async operations from the main threads, which
	is probably more in line with what users expect.
	
	Note that there are still no such guarantees for cancelling sync
	operations or cancelling async operation from outside the main
	thread. Furthermore, the exact behaviour of async implementations
	not using run_in_thread may differ.



svn path=/trunk/; revision=7740
2008-12-10 13:25:59 +00:00
Alexander Larsson
39b3b41484 Bug 515777 - incorrect date&time on copy
2008-12-09  Alexander Larsson  <alexl@redhat.com>

	Bug 515777 - incorrect date&time on copy
	
        * glocalfile.c:
        (g_local_file_class_init):
	Copy mtime by default
	
        * gfile.c:
	Change docs about G_FILE_COPY_ALL_METADATA to not mention
	mtime as an example.



svn path=/trunk/; revision=7738
2008-12-09 11:15:36 +00:00
Matthias Clasen
c7d37fca34 Hide ecryptfs mounts, so that the desktop does not show both the mount and
* gunixmounts.c: (guess_system_internal): Hide ecryptfs mounts,
        so that the desktop does not show both the mount and the target
        directory. Patch by Martin Pitt


svn path=/trunk/; revision=7736
2008-12-08 05:47:26 +00:00
Matthias Clasen
b047087ac3 Add "fd" and "close-fd" properties including getters and setters. Patch by
* gio.symbols:
        * gunixinputstream.[hc]:
        * gunixoutputstream.[hc]: Add "fd" and "close-fd" properties
        including getters and setters. Patch by Maciej Piechotka


svn path=/trunk/; revision=7735
2008-12-08 05:41:43 +00:00
Matthias Clasen
b2f0d44acb Support compilers that don't understand ISO C varargs macros. Patch by
* tests/live-g-file.c: Support compilers that don't understand
        ISO C varargs macros. Patch by Eric Lamarque



svn path=/trunk/; revision=7734
2008-12-08 04:38:54 +00:00
Matthias Clasen
08b1ec389b Use g_access() to check accessibility of local devices. Patch by Martin
* gunixmounts.c: Use g_access() to check accessibility of local devices.
        Patch by Martin Pitt


svn path=/trunk/; revision=7733
2008-12-08 04:33:41 +00:00
Matthias Clasen
cce2159983 2.19.2
svn path=/trunk/; revision=7721
2008-12-01 20:01:16 +00:00
Matthias Clasen
e959473234 Revert behaviour change in g_data_input_stream_read_line
svn path=/trunk/; revision=7720
2008-12-01 19:02:58 +00:00
Matthias Clasen
ec48fa8fc2 2.19.1
svn path=/trunk/; revision=7717
2008-12-01 14:44:26 +00:00
Alexander Larsson
a95b7a3fab Add and document g_mount_is_shadowed plus calls to set/unset a mount as
2008-12-01  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
        * gmount.[ch]:
        * gunionvolumemonitor.c:
        * gvolume.c:
	Add and document g_mount_is_shadowed plus calls
	to set/unset a mount as shadowed
	


svn path=/trunk/; revision=7716
2008-12-01 13:46:11 +00:00
Matthias Clasen
8b39fa1e6a Comment out two failing tests
svn path=/trunk/; revision=7714
2008-12-01 06:47:04 +00:00
Matthias Clasen
a44f5f6aaa Add g_app_info_get_commandline. Requested by Hans Petter Jansson.
* gio.symbols:
        * gappinfo.[hc]: Add g_app_info_get_commandline. Requested
        by Hans Petter Jansson.

        * gdesktopappinfo.c: And implement it here.


svn path=/trunk/; revision=7706
2008-11-28 23:16:45 +00:00
Christian Dywan
b5321fe34c Fix a typo, s/detext/detect. Patch by Enrico Tröger.
2008-11-28  Christian Dywan  <christian@imendio.com>

	* gappinfo.c: Fix a typo, s/detext/detect. Patch by Enrico Tröger.

svn path=/trunk/; revision=7700
2008-11-28 09:43:10 +00:00
Matthias Clasen
5e6aea1b2f Bug 559633 – gtk_image_new_from_gicon does not always work for .desktop
2008-11-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 559633 – gtk_image_new_from_gicon does not always work for
        .desktop files

        * gdesktopappinfo.c (g_desktop_app_info_new_from_keyfile): Ignore
        extensions on icon names.  Proposed by Axel von Bertoldi.


svn path=/trunk/; revision=7698
2008-11-28 08:28:39 +00:00
Matthias Clasen
d4d876846e Bug 548163 – Nautilus displays wrong error message for too long file
names

        * glocalfile.c (g_local_file_set_display_name): Correctly set
        error conditions if the new name is e.g. too long. Reported
        by Leonardo Ferreira Fontenelle.


svn path=/trunk/; revision=7696
2008-11-28 08:05:49 +00:00
Matthias Clasen
e449a91b98 Bug 547481 – g_data_input_stream_read_line behaves not as stated in the
2008-11-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 547481 – g_data_input_stream_read_line behaves not as stated in
        the docs

        * gdatainputstream.c (g_data_input_stream_read_line): Behave as
        documented and include the line end in the returned string.
        Pointed out by Paul Pogonyshev.

        * tests/data-input-stream.c: Fix the read_line test to test the
        documented behaviour.



svn path=/trunk/; revision=7694
2008-11-28 07:42:48 +00:00
Matthias Clasen
688b2e0ed2 Only allow deleting files that have been created by
* gdesktopappinfo.c (g_app_info_can_delete): Only allow deleting
        files that have been created by g_app_info_create_from_commandline.


svn path=/trunk/; revision=7693
2008-11-28 07:27:13 +00:00
Matthias Clasen
77a8c5cc15 Better fix
svn path=/trunk/; revision=7691
2008-11-28 07:04:43 +00:00
Matthias Clasen
c5938128ec Avoid unused variables
svn path=/trunk/; revision=7690
2008-11-28 07:02:57 +00:00
Matthias Clasen
0b715510de Bug 562393 – g_buffered_input_stream_read_byte broken if data available
2008-11-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 562393 – g_buffered_input_stream_read_byte broken if data
        available

        * gio/gbufferedinputstream.c (g_buffered_input_stream_read_byte): Fix
        handling of buffered content.  Patch by Philip Withnall

        * gio/tests/buffered-input-stream.c: Add a testcase for this bug.
        * gio/tests/Makefile.am: And build it



svn path=/trunk/; revision=7686
2008-11-28 05:57:07 +00:00
Matthias Clasen
6a0f0c2bfb Bug 561807 – inotify_sub.c :: dup_dirname() fails to remove trailing '/'
2008-11-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 561807 – inotify_sub.c :: dup_dirname() fails to remove trailing
        '/'

        * inotify/inotify-sub.c (dup_dirname): Actually strip the trailing
        '/' away. Spotted by Dan Williams.

`

svn path=/trunk/; revision=7682
2008-11-28 05:09:21 +00:00
Christophe Fergeau
ff4a7678e6 Bug 561212 – GFileReadMoreCallback API doc refers to non-existant function
* gio/giotypes.h: fix name of function referred to in
GFileReadMoreCallback API documentation

svn path=/trunk/; revision=7666
2008-11-21 10:30:43 +00:00
Cosimo Cecchi
d20bf1076b Bug 561375 – Leaks mountpoint description
2008-11-21  Cosimo Cecchi  <cosimoc@gnome.org>

	Bug 561375 – Leaks mountpoint description

	* glocalfile.c: (get_mount_info): don't leak the mountpoint description
	string.

svn path=/trunk/; revision=7662
2008-11-21 00:01:22 +00:00
Cosimo Cecchi
8dc9c875ff Bug 561352 – Leak of icon description
2008-11-21  Cosimo Cecchi  <cosimoc@gnome.org>

	Bug 561352 – Leak of icon description

	* gcontenttype.c: (g_content_type_get_icon): don't leak the XDG mimetype
	generic icon string.

svn path=/trunk/; revision=7660
2008-11-20 23:58:39 +00:00
Matthias Clasen
ce008aebe6 Add G_FILE_ATTRIBUTE_PREVIEW_ICON to doc table
svn path=/trunk/; revision=7654
2008-11-15 00:03:25 +00:00
Tor Lillqvist
2f575b95ac Bug 556415 - Crash on Windows 2000 in g_winhttp_vfs_init()
2008-11-12  Tor Lillqvist  <tml@novell.com>

	Bug 556415 - Crash on Windows 2000 in g_winhttp_vfs_init()

	* win32/gwinhttpvfs.h: Move the set of function pointers to
	winhttp.dll into a separate struct GWinHttpDllFuncs. Just have a
	pointer to that in the GWinHttpVfsClass.
	
	* win32/gwinhttpvfs.c: Move the lookup of functions from
	winhttp.dll into a function of its own, that stores the pointers
	in a separate GWinHttpDllFuncs variable. Add two bookeeping
	booleans lookup_done and funcs_found.

	Don't call g_io_extension_point_implement() to register the
	winhttp extension unless winhttp.dll has been successfully loaded
	and the required functions found in it.

	* win32/gwinhttp*.c: Adjust calls of the functions looked up from
	winhttp.dll correspondingly.


svn path=/trunk/; revision=7648
2008-11-12 17:52:39 +00:00
Grahame Bowland
df719f749c Bug 558185 – 'parent' variable in
2008-10-31  Grahame Bowland  <grahame@angrygoats.net>

	Bug 558185 – 'parent' variable in g_local_file_get_child_for_display_name() 
	hits g_object_unref(NULL) assertion

	* gio/glocalfile.c: 
	- remove unused variable. Patch by Matt Johnston <matt@ucc.asn.au>

svn path=/trunk/; revision=7636
2008-10-31 02:23:55 +00:00
Cosimo Cecchi
e8bb63a7db reviewed by: Alexander Larsson <alexl@redhat.com>
2008-10-28  Cosimo Cecchi  <cosimoc@gnome.org>

	reviewed by: Alexander Larsson <alexl@redhat.com>

	* gdatainputstream.c: Make the docs of g_dada_input_stream_read_line ()
	clearer about the behavior when there's no more content to read.

svn path=/trunk/; revision=7632
2008-10-28 14:51:56 +00:00
Federico Mena Quintero
7b46b2a43b Fix leak inside g_local_file_get_parse_name()
Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=7629
2008-10-27 20:42:32 +00:00
Tor Lillqvist
6b2d7a5344 Bug 557592 - Missing include in gwinhttpfile.c
2008-10-27  Tor Lillqvist  <tml@novell.com>

	Bug 557592 - Missing include in gwinhttpfile.c

	* win32/gwinhttpfile.c: Include <wchar.h> to make it compile with
	MSVC2008.


svn path=/trunk/; revision=7628
2008-10-27 08:30:08 +00:00
Matthias Clasen
b616e892ca Bug 556910 – [fam-helper.c:223]: Memory leak: sub
2008-10-24  Matthias Clasen  <mclasen@redhat.com>

        Bug 556910 – [fam-helper.c:223]: Memory leak: sub

        * fam/fam-helper.c: Fix a memory leak and formatting issues.
        Reported by Daniel Marjamäki


svn path=/trunk/; revision=7624
2008-10-24 04:04:42 +00:00
Matthias Clasen
da2ee0c57f Fix docs
svn path=/trunk/; revision=7622
2008-10-24 03:52:02 +00:00
Alexander Larsson
8286387779 Bug 528320 - Incorrect icons displayed for files with custom mimetype
2008-10-23  Alexander Larsson  <alexl@redhat.com>

	Bug 528320 - Incorrect icons displayed for files with custom mimetype icons
	
        * glocalfileinfo.c:
        (_g_local_file_info_get):
	Don't return the fallback icon (text-x-generic) for all files.
	This is causing problems with theme icon lookup and custom mime
	icons, as the generic fallback overrides custom mime icons in
	inherited themes.

	This is a slight change as applications might not get an icon wher
	they previously did. But there is no guarantee to get on neither before
	or after this change, so it should not break applications. Changes
	to nautilus and gtk+ will be done to manually use the generic fallback
	icon if no icon is found, but this is only required for rare cases.


svn path=/trunk/; revision=7620
2008-10-23 09:10:01 +00:00
Alexander Larsson
17c1241103 Add G_FILE_ATTRIBUTE_PREVIEW_ICON (#557182)
2008-10-21  Alexander Larsson  <alexl@redhat.com>

        * gfileinfo.h:
	Add G_FILE_ATTRIBUTE_PREVIEW_ICON (#557182)


svn path=/trunk/; revision=7619
2008-10-21 13:02:05 +00:00
Alexander Larsson
4f0b18d203 Bug 555740 - gicon serialization Based on patch from David Zeuthen
2008-10-21  Alexander Larsson  <alexl@redhat.com>

	Bug 555740 - gicon serialization
	Based on patch from David Zeuthen
	
        * gicon.[ch]:
        * gio.symbols:
	Add g_icon_to_string() and g_icon_new_for_string().
	
        * gemblem.c:
        * gemblemedicon.c:
        * gfileicon.c:
        * gthemedicon.c:
	Implement icon serialization for built-in icon types
	
        * tests/Makefile.am:
        * tests/g-icon.c:
	Added GIcon serialization test



svn path=/trunk/; revision=7618
2008-10-21 11:51:48 +00:00
Christian Persch
cef6abff8e Bug 557087 – mem leak in g_content_types_get_registered
svn path=/trunk/; revision=7616
2008-10-20 16:49:16 +00:00
Matthias Clasen
82c68c6a14 2.19.0
svn path=/trunk/; revision=7611
2008-10-16 23:59:50 +00:00
Matthias Clasen
61aa1f7db0 Bug 556422 – g_file_enumerator_next_file: unclear whether return value
2008-10-16  Matthias Clasen  <mclasen@redhat.com>

        Bug 556422 – g_file_enumerator_next_file: unclear whether return
        value needs to be freed

        * gfileenumerator.c (g_file_enumerate_next_file): Clarify
        the return value docs. Pointed out by Armin Burgmeier

svn path=/trunk/; revision=7603
2008-10-16 04:19:53 +00:00
Matthias Clasen
154bbc462a Bug 556334 – Warning when building without selinux support
2008-10-14  Matthias Clasen  <mclasen@redhat.com>

        Bug 556334 – Warning when building without selinux support

        * glocalfileinfo.c: Avoid compiler warnings when selinux is
        disabled. Patch by Pascal Terjan


svn path=/trunk/; revision=7601
2008-10-15 03:37:56 +00:00
Matthias Clasen
8caab42314 Fix make check
svn path=/trunk/; revision=7600
2008-10-15 01:32:01 +00:00
Christian Persch
630f89fb1a Bug 555311 – format not a string literal and no format arguments
svn path=/trunk/; revision=7597
2008-10-13 12:43:37 +00:00
Alexander Larsson
6eb38fb4db When adding an application as handling a mime type (but not as the
2008-10-13  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
	When adding an application as handling a mime type (but
	not as the default), copy the full list of desktop ids handling
	that type in before adding the new one on the end of the list.
	This means we're not accidentally changing the default by overriding
	the info from the later directories in the search path.
	
	Also, fixes small leak of removed_entries.



svn path=/trunk/; revision=7595
2008-10-13 10:02:30 +00:00
David Zeuthen
5a10b403c7 Deprecate g_volume_monitor_adopt_orphan_mount() (#555331).
2008-10-12  David Zeuthen  <davidz@redhat.com>

        * gio.symbols:
        * gunionvolumemonitor.c:
        * gvolumemonitor.h:
        Deprecate g_volume_monitor_adopt_orphan_mount() (#555331).


svn path=/trunk/; revision=7594
2008-10-12 17:05:17 +00:00
Alexander Larsson
84eabd3d59 Upper half of byte is >> 4, not >> 8. Found by Kjartan Maraas via sparse
2008-10-10  Alexander Larsson  <alexl@redhat.com>

	* gfileattribute.c (escape_byte_string):
	Upper half of byte is >> 4, not >> 8.
	Found by Kjartan Maraas via sparse


svn path=/trunk/; revision=7590
2008-10-10 11:35:39 +00:00
Matthias Clasen
a8c88cae76 Bug 555711 – Wrong fallback order of mimetype icons
* gcontenttype.c: Don't prefer generic icons over
        default mimetype icons.

        * xdgmime/xdgmimecache.c (xdg_mime_cache_get_icon):
        * xdgmime/xdgmime.c (xdg_mime_get_icon): Don't fall back
        to generic icons.
        Patch by Krysztof Kosiński


svn path=/trunk/; revision=7587
2008-10-10 05:07:56 +00:00
Matthias Clasen
b8f103901f Bug 555121 – Improved build-time handling of gio module-dir
2008-10-10  Matthias Clasen  <mclasen@redhat.com>

        Bug 555121 – Improved build-time handling of gio module-dir

        * fam/Makefile.am: Use GIO_MODULE_DIR consistently.
        * Makefile.am: Create the module dir.


svn path=/trunk/; revision=7586
2008-10-10 05:00:17 +00:00
Matthias Clasen
6310f898b8 Fix gcc warnings
svn path=/trunk/; revision=7585
2008-10-10 04:54:51 +00:00
Alexander Larsson
585135279f Actually return -1 in case of cancelled, not old res value.
2008-10-09  Alexander Larsson  <alexl@redhat.com>

	* gunixinputstream.c (g_unix_input_stream_read):
	Actually return -1 in case of cancelled, not old res value.



svn path=/trunk/; revision=7583
2008-10-09 10:03:12 +00:00
Christian Persch
5d31f41df4 Bug 555313 – GFileAttribute boxed type get_type function should use
usual get_type pattern

svn path=/trunk/; revision=7580
2008-10-08 20:54:39 +00:00
Colin Walters
b383c8f08f Bug 554745 - GFileAttributeInfoList should be boxed
2008-10-06  Colin Walters  <walters@verbum.org>

	Bug 554745 - GFileAttributeInfoList should be boxed

	* gio/gfileattribute.c: Define a boxed type for GFileAttributeList
	for convenience of bindings.
	* gio/gfileattribute.h: Prototype it.


svn path=/trunk/; revision=7573
2008-10-06 21:59:29 +00:00
Pascal Terjan
d8b489853c Bug 554970 – segfault when update-desktop-database is not available
2008-10-05  Pascal Terjan  <pterjan@linuxfr.org>

	Bug 554970 – segfault when update-desktop-database is not available
	on the system

	* gdesktopappinfo.c (run_update_command): Have the error set before 
	using it.


svn path=/trunk/; revision=7570
2008-10-05 00:33:43 +00:00
David Zeuthen
04f0742818 If possible, always pass FUSE file:// URIs (such as
2008-10-01  David Zeuthen  <davidz@redhat.com>

	* gdesktopappinfo.c (expand_macro): If possible, always pass FUSE
	file:// URIs (such as '/home/davidz/.gvfs/sftp on foo/file.avi')
	instead of the gio URI (such as sftp://foo/file.avi) when using
	g_app_info_launch() and friends. With a sufficiently recent gvfs,
	apps using gio+gvfs will map the FUSE file:// URI back to the gio
	URI (and thus bypass the fuse daemon) thanks the patch from bug
	#530654.  Since Nautilus is an user of g_app_info_launch() it
	means that non-gio POSIX apps, such as mplayer, will Just Work(tm)
	when launced via the file manager. Win. Fixes bug #528670.

	* gappinfo.c: Add some notes about the FUSE POSIX URI <-> GIO URI
	mapping to the description of GAppInfo.

2008-10-01  David Zeuthen  <davidz@redhat.com>

	* README.in: Add "Notes about glib 2.20" section detailing the
	ramifications of the patch from bug #528670.


svn path=/trunk/; revision=7566
2008-10-01 17:46:57 +00:00
Tor Lillqvist
402d950ec7 Build desktop-app-info only on Unix.
2008-09-30  Tor Lillqvist  <tml@novell.com>

	* tests/Makefile.am: Build desktop-app-info only on Unix.


svn path=/trunk/; revision=7562
2008-09-30 11:08:38 +00:00
Tor Lillqvist
801da1dfc1 Avoid a g_critical(). Pass a large enough result buffer to
2008-09-30  Tor Lillqvist  <tml@novell.com>

	* glocalfile.c (get_volume_for_path) [Win32]: Avoid a
	g_critical(). Pass a large enough result buffer to
	GetVolumePathNameW(). Just use MAX_PATH.


svn path=/trunk/; revision=7561
2008-09-30 10:47:06 +00:00
David Zeuthen
8070d3b02f Clarify semantics of g_volume_mount_finish() (#552168)
2008-09-29  David Zeuthen  <davidz@redhat.com>

        * gvolume.c: Clarify semantics of g_volume_mount_finish() (#552168)


svn path=/trunk/; revision=7559
2008-09-29 17:42:01 +00:00
Dan Winship
29ddd48ff2 Use g_assert_error() and g_assert_no_error()
* tests/data-input-stream.c:
	* tests/data-output-stream.c:
	* tests/live-g-file.c:
	* tests/memory-input-stream.c:
	* tests/memory-output-stream.c: Use g_assert_error() and
	g_assert_no_error()

svn path=/trunk/; revision=7556
2008-09-27 01:43:43 +00:00
Matthias Clasen
764e187fd9 Bug 545350 – GAppInfo deletion Bug 545351 – Reset associations for
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 545350 – GAppInfo deletion
        Bug 545351 – Reset associations for content type

        * gio.symbols:
        * gappinfo.[hc]: New functions g_app_info_can_delete,
        g_app_info_delete and g_app_info_reset_type_associations.

        * gdesktopappinfo.c:
        * gwin32appinfo.c: Implementations of these.

        * tests/Makefile.am:
        * tests/desktop-app-info.c: Tests for GAppInfo functionality.


svn path=/trunk/; revision=7554
2008-09-26 19:57:36 +00:00
Dan Winship
7f4864e58d Bug 505361 - gunixinputstream.c assumes poll() available
Bug 509446 - portable blocking gio cancellation

	* gcancellable.c (g_cancellable_make_pollfd): New method to make a
	GPollFD for a cancellable (which is slightly more complicated on
	Windows than Unix).

	* gunixinputstream.c (g_unix_input_stream_read):
	* gunixoutputstream.c (g_unix_output_stream_write): Use
	g_cancellable_make_pollfd() and g_poll() rather than using poll()
	directly.

	* tests/unix-streams.c: test of GUnixInputStream,
	GUnixOutputStream, and GCancellable.

svn path=/trunk/; revision=7553
2008-09-26 16:19:35 +00:00
Dan Winship
5360907e9e add a cast to stop a gcc warning
* gdesktopappinfo.c (get_all_desktop_entries_for_mime_type): add a
	cast to stop a gcc warning

	* gfile.c (g_file_copy_attributes): add parens to stop a gcc
	warning

svn path=/trunk/; revision=7550
2008-09-26 16:00:17 +00:00
Dan Winship
efce76ce67 Bug 553426 - cancellable clarifications
* gcancellable.c (g_cancellable_class_init): Add a note to the
	"cancelled" signal docs warning about thread-safety issues
	(g_cancellable_cancel): Note that cancelling an asynchronous
	operation takes effect asynchronously, not immediately.

svn path=/trunk/; revision=7541
2008-09-25 12:04:52 +00:00
Michael Natterer
0275c4141e Move ChangeLog entry to right ChangeLog.
svn path=/trunk/; revision=7538
2008-09-23 18:57:16 +00:00
Nelson Benítez León
811fcbcd95 Add new GFileCopyFlag
svn path=/trunk/; revision=7526
2008-09-21 23:53:40 +00:00
Matthias Clasen
130d8f010f Plug a memory leak
svn path=/trunk/; revision=7520
2008-09-21 00:00:18 +00:00
Matthias Clasen
ac516ab07e 2.18.1
svn path=/trunk/; revision=7505
2008-09-17 23:56:04 +00:00
Michael Natterer
2623f6fc0f can't assign the return value of g_strdupv() to an array. Fill the array
2008-09-16  Michael Natterer  <mitch@imendio.com>

	* gcontenttype.c (g_content_type_guess): can't assign the return
	value of g_strdupv() to an array. Fill the array manually with
	const strings instead (it is never freed anyway). Fixes the
	build. Also fixed indentation.


svn path=/trunk/; revision=7501
2008-09-16 11:36:52 +00:00
Wouter Bolsterlee
1d627b703f Fix trivial typo to unbreak the build (there was a colon instead of a
2008-09-16  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gdesktopappinfo.c (g_desktop_app_info_new_from_keyfile):
	Fix trivial typo to unbreak the build (there was a colon
	instead of a semicolon at the end of a statement).


svn path=/trunk/; revision=7500
2008-09-16 09:13:19 +00:00
Matthias Clasen
cdded60e29 Ignore an empty Path value
svn path=/trunk/; revision=7492
2008-09-15 16:26:38 +00:00
Matthias Clasen
f634171ec5 Bug 551681 – g_content_type_guess() too naive with filenames
* gcontenttype.c (g_content_type_guess): Check whether there's a '/'
        at the end of the filename, and declare it a directory.
        Patch by Bastien Nocera


svn path=/trunk/; revision=7491
2008-09-15 16:06:05 +00:00
Cosimo Cecchi
6e3f927901 Bug 551887 – Docs for g_desktop_app_info_new_from_filename () aren't
2008-09-14  Cosimo Cecchi  <cosimoc@gnome.org>

	Bug 551887 – Docs for g_desktop_app_info_new_from_filename ()
	aren't clear.

	* gdesktopappinfo.c: add a note in the docs clarifying what the
	"filename" parameter really is.

svn path=/trunk/; revision=7481
2008-09-13 23:47:41 +00:00
Tor Lillqvist
654822b9be Don't call FormatMessage() etc here. Call g_win32_error_message() instead
2008-09-12  Tor Lillqvist  <tml@novell.com>

	* gwin32appinfo.c (g_win32_app_info_launch): Don't call
	FormatMessage() etc here. Call g_win32_error_message() instead
	which already does all that. Besides, the code was broken as it
	called the default "A" version of FormatMessage() but still
	thought it produced a wide string.


svn path=/trunk/; revision=7472
2008-09-12 00:54:14 +00:00
Michael Natterer
b6d834a588 remove dangling 's' in the documentation.
2008-09-12  Michael Natterer  <mitch@imendio.com>

	* gfileinfo.c (g_file_info_get_content_type): remove dangling 's'
	in the documentation.


svn path=/trunk/; revision=7471
2008-09-11 22:05:09 +00:00
Christian Neumair
b9c69790a8 (gio)
2008-09-08  Christian Neumair  <cneumair@gnome.org>

	* gunixmount.c (eject_unmount_read_error), (eject_unmount_do):
	* gunixvolume.c (eject_mount_read_error), (eject_mount_do):
	Use non-blocking pipe for mount helper I/O. Fixes #550647.

svn path=/trunk/; revision=7444
2008-09-08 12:44:07 +00:00
Matthias Clasen
80e11e1d4f Bug 551149 – xdgmime mem leak
2008-09-06  Matthias Clasen  <mclasen@redhat.com>

        Bug 551149 – xdgmime mem leak

        * xdgmime/xdgmime.c (xdg_mime_init_from_directory): Plug
        a memory leak. Patch by Christian Persch


svn path=/trunk/; revision=7441
2008-09-07 03:28:56 +00:00
Tor Lillqvist
f709eda798 Don't unref icon if NULL.
2008-09-04  Tor Lillqvist  <tml@novell.com>

	* gwin32mount.c (g_win32_mount_finalize): Don't unref icon if
	NULL.


svn path=/trunk/; revision=7439
2008-09-04 20:41:50 +00:00
Matthias Clasen
e43de8e0e6 2.18.0
svn path=/trunk/; revision=7434
2008-09-02 20:09:55 +00:00
Michael Natterer
f2a2d6c9ac big header formatting cleanup: indentation, vtable formatting, consistent
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* *.h: big header formatting cleanup: indentation, vtable
	formatting, consistent spacing in (* vfunc), trailing whitespace
	removal. Formatting should be pretty consistent in all GIO headers
	now.


svn path=/trunk/; revision=7433
2008-09-02 19:05:58 +00:00
Ryan Lortie
920f3bffb3 Bug 549771 – improved .gitignore for glib
2007-09-02  Ryan Lortie  <desrt@desrt.ca>

        Bug 549771 – improved .gitignore for glib

        * docs/reference/.gitignore:
        * docs/reference/gio/.gitignore:
        * docs/reference/gobject/tmpl/.gitignore:
        * gio/.gitignore:
        * gio/tests/.gitignore:
        * glib/.gitignore:
        * glib/libcharset/.gitignore:
        * glib/tests/.gitignore:
        * gmodule/.gitignore:
        * gobject/.gitignore:
        * gobject/tests/.gitignore:
        * po/.gitignore:
        * tests/.gitignore: new files
        * .gitignore: remove 'build' (since it's part of glib now), add more
        useful things.


svn path=/trunk/; revision=7432
2008-09-02 18:40:39 +00:00
Matthias Clasen
4f1e575f30 Document guess_content_type_sync
svn path=/trunk/; revision=7428
2008-09-02 17:37:51 +00:00
Michael Natterer
4c2ca6d3f4 fix parent_class member to be GFilterOutputStreamClass (not
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* gbufferedoutputstream.h (struct _GBufferedOutputStreamClass):
	fix parent_class member to be GFilterOutputStreamClass (not
	GOutputStreamClass). Drop three pointers of padding, which is
	exactly what GFilterOutputStreamClass adds to GOutputStreamClass,
	so the class struct size stays the same.


svn path=/trunk/; revision=7427
2008-09-02 17:30:02 +00:00
Matthias Clasen
291eb30803 Fix docs
svn path=/trunk/; revision=7425
2008-09-02 16:57:59 +00:00
Tor Lillqvist
a6fe58233d Clarification.
svn path=/trunk/; revision=7389
2008-08-23 01:10:03 +00:00
Tor Lillqvist
02d9af3562 Bug 548988 - g_file_replace fails on Windows when the target file exists
2008-08-23  Tor Lillqvist  <tml@novell.com>

	Bug 548988 - g_file_replace fails on Windows when the target file
	exists already

	* glocalfileoutputstream.c (g_local_file_output_stream_close): On
	Windows, close the file before renaming it (in case we have been
	writing to a file with a temporary name).

	(g_local_file_output_stream_close, handle_overwrite_open): Use
	GLocalFileStat instead of plain struct stat, for passing to
	_g_local_file_info_create_etag(). Thus also use _fstati64()
	instead of plain fstat() on Windows.


svn path=/trunk/; revision=7388
2008-08-23 01:09:08 +00:00
Matthias Clasen
e17c805ce4 2.17.7
svn path=/trunk/; revision=7367
2008-08-18 13:17:39 +00:00
Padraig O'Briain
4cafadc955 Add zfs to ignore_fs array in guess_system_internal: Fix for #542156.
2008-08-15  Padraig O'Briain  <padraig.obriain@sun.com>

	* gunixmounts.c: Add zfs to ignore_fs array in guess_system_internal:
	Fix for #542156.


svn path=/trunk/; revision=7357
2008-08-15 08:27:55 +00:00
Tor Lillqvist
d5863830ad win32/gwinhttpvfs.c win32/gwinhttpvfs.h win32/gwinhttpfile.c
2008-08-13  Tor Lillqvist  <tml@novell.com>

	* win32/gwinhttpvfs.c
	* win32/gwinhttpvfs.h
	* win32/gwinhttpfile.c
	* win32/gwinhttpfileinputstream.c
	* win32/gwinhttpfileoutputstream.c: Refactor some common code
	snippets into helper functions. Check HTTP response status
	codes. Implement g_winhttp_file_query_info(), looking at
	Content-Length, Content-Type and Last-Modified.

	* win32/winhttp.h: Add some symbolic constants that are not
	publicly documented. Just a handful, so it should be OK to use
	information from the Windows SDK's headers.


svn path=/trunk/; revision=7350
2008-08-13 19:39:49 +00:00
Tor Lillqvist
7ffb2b3366 Bug 546582 - Callbacks from GFileMonitor present a GFile in the wrong
2008-08-13  Tor Lillqvist  <tml@novell.com>

	Bug 546582 - Callbacks from GFileMonitor present a GFile in the
	wrong folder

	* win32/gwin32directorymonitor.c
	(g_win32_directory_monitor_callback): Patch by Erik van Pienbroek.


svn path=/trunk/; revision=7347
2008-08-13 06:56:31 +00:00
Matthias Clasen
cec561c2cd Add docs
svn path=/trunk/; revision=7346
2008-08-13 05:35:10 +00:00
Tor Lillqvist
af8ebc9e55 Don't write the Content-Length header ourselves, WinHttpSendRequest()
2008-08-13  Tor Lillqvist  <tml@novell.com>

	* win32/gwinhttpfileoutputstream.c
	(g_winhttp_file_output_stream_write): Don't write the
	Content-Length header ourselves, WinHttpSendRequest() takes care
	of that when the dwTotalLength parameter is non-zero. Increment
	offset by the number of actual bytes sent, although I wonder if
	such a scenario is possible where less than requested would be
	sent and accepted by the server without errors.


svn path=/trunk/; revision=7345
2008-08-12 23:40:39 +00:00
Tor Lillqvist
7261372b45 win32/gwinhttpvfs.c win32/gwinhttpvfs.h win32/gwinhttpfile.c
2008-08-13  Tor Lillqvist  <tml@novell.com>

	* win32/gwinhttpvfs.c
	* win32/gwinhttpvfs.h
	* win32/gwinhttpfile.c
	* win32/gwinhttpfile.h
	* win32/gwinhttpfileinputstream.c
	* win32/gwinhttpfileinputstream.h
	* win32/gwinhttpfileoutputstream.c
	* win32/gwinhttpfileoutputstream.h: New files implementing
	GWinHttpVfs and related classes, a GVfs for HTTP and HTTPS URIs on
	Windows. The implementation uses the WinHttp API. Both reading and
	writing are supported, i.e. GET and PUT requests. When writing,
	each write call is done using a separate PUT request with a
	Content-Range header. Requests for file URIs and plain pathnames
	are forwarded to GLocalVfs.

	* win32/winhttp.h: Reverse engineered <winhttp.h>, borrowed from
	WINE. Used as there is no <winhttp.h> bundled with mingw, and
	requiring people to download the Windows SDK just for this one
	header is not reasonable.

	* win32/Makefile.am: Add above files.

	* giomodule.c: Call _g_winhttp_vfs_get_type() on Windows to set up
	the plumbing for the above.


svn path=/trunk/; revision=7344
2008-08-12 23:09:04 +00:00
Sven Neumann
8d37a7964d gfilenamecompleter.c glocaldirectorymonitor.c gmountoperation.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gfilenamecompleter.c
	* glocaldirectorymonitor.c
	* gmountoperation.c
	* gunionvolumemonitor.c
	* gunixmount.c
	* gunixmounts.c
	* gunixvolume.c
	* gunixvolumemonitor.c
	* gvolumemonitor.c
	* gwin32mount.c
	* gwin32volumemonitor.c: use canonical signal names.


svn path=/trunk/; revision=7339
2008-08-11 19:45:08 +00:00
Tor Lillqvist
3c9cfe7fb5 Put a list of the platform-dependent .la files in the subdirectories in
2008-08-11  Tor Lillqvist  <tml@novell.com>

	* Makefile.am: Put a list of the platform-dependent .la files in
	the subdirectories in the platform_deps Make variable, and make
	libgio-2.0.la depend on that, so that it gets relinked if one of
	the dependent libraries has changed.


svn path=/trunk/; revision=7336
2008-08-11 12:35:09 +00:00
Tor Lillqvist
c7ba2969d1 Remove -lwininet which had been added by mistake. We will probably
2008-08-11  Tor Lillqvist  <tml@novell.com>

	* Makefile.am (platform_libadd): Remove -lwininet which had been
	added by mistake. We will probably eventually be using WinHTTP,
	not the older WinInet anyway. (Actually I am working on it.)


svn path=/trunk/; revision=7335
2008-08-10 22:01:36 +00:00
Felix Riemann
26f2a3b93c Bug 547080 – g_file_copy leaks expected errors
2008-08-10  Felix Riemann  <friemann@svn.gnome.org>

	Bug 547080 – g_file_copy leaks expected errors

	* gfile.c: (g_file_copy): Clear G_IO_ERROR_NOT_SUPPORTED errors
	before trying the next fallback routine.

svn path=/trunk/; revision=7331
2008-08-10 10:55:57 +00:00
Loïc Minier
15f92bfc3d Bug 535124 – umask 002 not being applied for new directories, new files
2008-08-09  Loïc Minier  <lool@dooz.org>

	Bug 535124 – umask 002 not being applied for new directories, new
	files get the correct umask

	* gfile.c (g_file_make_directory)
	(g_file_make_directory_with_parents): Document ownership and
	permissions of newly created directories as being the default
	ones of the process.

svn path=/trunk/; revision=7330
2008-08-09 08:41:43 +00:00
Loïc Minier
83e4fb4f9b Bug 535124 – umask 002 not being applied for new directories, new files
2008-08-08  Loïc Minier  <lool@dooz.org>

	Bug 535124 – umask 002 not being applied for new directories, new
	files get the correct umask

	* glocalfile.c: (g_local_file_make_directory): Use 0777 instead of
	0755 as umask

svn path=/trunk/; revision=7323
2008-08-08 09:26:51 +00:00
Tor Lillqvist
d4fd1ea15d Remove unused code. Whitespace cleanup.
2008-08-08  Tor Lillqvist  <tml@novell.com>

	* gwin32mount.c: Remove unused code. Whitespace cleanup.


svn path=/trunk/; revision=7322
2008-08-08 06:38:05 +00:00
Tor Lillqvist
671ac311d5 Put questionable code that didn't actually do anything inside #if 0, and
2008-08-08  Tor Lillqvist  <tml@novell.com>

	* gwin32volumemonitor.c (get_connected_drives): Put questionable
	code that didn't actually do anything inside #if 0, and add a
	comment wondering what the code was supposed to do. This also gets
	rid of a leftover debugging printout.


svn path=/trunk/; revision=7321
2008-08-08 05:36:56 +00:00
Paul Pogonyshev
3512e4f63d New functions. (g_file_icon_class_init): Hook them up. Install
2008-08-07  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gfileicon.c (g_file_icon_get_property)
	(g_file_icon_set_property): New functions.
	(g_file_icon_class_init): Hook them up.  Install `GFileIcon:file'
	property.
	(g_file_icon_new): Use the property (bug #546132).

svn path=/trunk/; revision=7318
2008-08-07 19:44:53 +00:00
Paul Pogonyshev
4bd7cc6ad7 Also handle `PROP_USE_DEFAULT_FALLBACKS'. (g_themed_icon_class_init): Make
2008-08-06  Paul Pogonyshev  <pogonyshev@gmx.net>

	* gthemedicon.c (g_themed_icon_get_property): Also handle
	`PROP_USE_DEFAULT_FALLBACKS'.
	(g_themed_icon_class_init): Make
	`GThemedIcon:use-default-fallbacks' read-write (bug #546483).

svn path=/trunk/; revision=7316
2008-08-06 19:43:31 +00:00
Behdad Esfahbod
f50f67addf Bug 546371 – Improve docs re g_file_monitor
2008-08-05  Behdad Esfahbod  <behdad@gnome.org>

        Bug 546371 – Improve docs re g_file_monitor

        * gfilemonitor.c: Mention g_file_monitor() in the docs.


svn path=/trunk/; revision=7314
2008-08-05 17:51:13 +00:00
Matthias Clasen
26c1be0d51 2.13.6
svn path=/trunk/; revision=7301
2008-08-04 17:58:13 +00:00
Matthias Clasen
001bb527b6 Forgotten commit
svn path=/trunk/; revision=7300
2008-08-04 17:19:30 +00:00
Matthias Clasen
ab0f863606 2.17.5
svn path=/trunk/; revision=7297
2008-08-04 17:01:23 +00:00
Matthias Clasen
8fbbb4d9cb Bug 546017 – Don't copy attributes when copying a symlink
2008-08-04  Matthias Clasen  <mclasen@redhat.com>

        Bug 546017 – Don't copy attributes when copying a symlink

        * gfile.c (g_file_copy_attributes): Specify
        G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in the call to
        g_file_set_attributes_from_info. Patch by Christian Kellner


svn path=/trunk/; revision=7294
2008-08-04 15:58:25 +00:00
Carlos Garcia Campos
f5edeb8c0f Bug 546079 – leak in xdgmime
2008-08-03  Carlos Garcia Campos  <carlosgc@gnome.org>

	Bug 546079 – leak in xdgmime
	
	* xdgmime/xdgmime.c (xdg_mime_shutdown): Fix memory leak.


svn path=/trunk/; revision=7292
2008-08-03 18:49:12 +00:00
Tor Lillqvist
506eed4ebd win32/gwin32directorymonitor.h Whitespace cleanup to match GLib style.
2008-08-03  Tor Lillqvist  <tml@novell.com>

	* win32/gwin32directorymonitor.h
	* win32/gwin32directorymonitor.c: Whitespace cleanup to match GLib
	style.


svn path=/trunk/; revision=7291
2008-08-03 00:17:39 +00:00
Tor Lillqvist
3bf84fb1cc Make prototype match LPOVERLAPPED_COMPLETION_ROUTINE to avoid warning.
2008-08-03  Tor Lillqvist  <tml@novell.com>

	* win32/gwin32directorymonitor.c
	(g_win32_directory_monitor_callback): Make prototype match
	LPOVERLAPPED_COMPLETION_ROUTINE to avoid warning. Cast
	LPOVERLAPPED parameter to local GWin32DirectoryMonitorPrivate
	pointer.

	(g_win32_directory_monitor_constructor):
	GLocalDirectoryMonitor::dirname is in UTF-8 like all other file
	names in the GLib API on Windows, so convert to UTF-16 and open
	with CreateFileW().


svn path=/trunk/; revision=7290
2008-08-03 00:06:39 +00:00
Tor Lillqvist
8258d6863b Bug 541036 - Gnumeric crashes when trying to open Desktop or user's folder
2008-08-03  Tor Lillqvist  <tml@novell.com>

	Bug 541036 - Gnumeric crashes when trying to open Desktop or
	user's folder under Windows

	* win32/gwin32directorymonitor.c
	(g_win32_directory_monitor_constructor): Ignore error from
	CreateFile() when opening directory. Instead of asserting, just
	store INVALID_HANDLE_VALUE then in
	GWin32DirectoryMonitorPrivate::hDirectory. Also ignore error from
	ReadDirectoryChangesW().
	(g_win32_directory_monitor_cancel): Don't attempt to close
	directory handle if it is INVALID_HANDLE_VALUE.


svn path=/trunk/; revision=7289
2008-08-02 23:51:51 +00:00
Matthias Clasen
3d5a13121d Remove debug spew
svn path=/trunk/; revision=7282
2008-08-01 21:18:02 +00:00
Hans Breuer
792bc0c61f add gemblembedicon
2008-08-01  Hans Breuer  <hans@breuer.org>

	* makefile.msc : add gemblembedicon

svn path=/trunk/; revision=7276
2008-08-01 14:15:02 +00:00
Matthias Clasen
4d23d2647a Bug 545457 – gdmsetup crashed with SIGSEGV in
2008-07-30  Matthias Clasen  <mclasen@redhat.com>

        Bug 545457 – gdmsetup crashed with SIGSEGV in
        g_unix_mount_guess_should_display()

        * gunixvolumemonitor.c (get_mount_for_mount_path): Don't
        crash if no mount is found.


svn path=/trunk/; revision=7274
2008-07-30 16:45:46 +00:00
Matthias Clasen
855a4c1cca Bug 545203 – gfile.c: argument is different type.
2008-07-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 545203 – gfile.c: argument is different type.

        * gfile.c (open_read_async_thread): Pass a GError **
        to g_file_set_error_literal.
        Reported by Kazuki Iwamoto


svn path=/trunk/; revision=7269
2008-07-28 19:12:19 +00:00
Matthias Clasen
b51d77011c Bug 545157 – wrong/no list of "open with" applications for .cc and .cpp
2008-07-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 545157 – wrong/no list of "open with" applications for .cc and
        .cpp files

        * gdesktopappinfo.c (get_all_desktop_entries_for_mime_type):
        Collect all ancestors, not just direct parents. Pointed
        out by Bastien Nocera


svn path=/trunk/; revision=7268
2008-07-28 18:58:34 +00:00
Matthias Clasen
0e33683e64 Install gemblemedicon.h
svn path=/trunk/; revision=7266
2008-07-28 18:25:49 +00:00
Matthias Clasen
01832faf20 Forgotten entry
svn path=/trunk/; revision=7264
2008-07-28 15:53:43 +00:00
Matthias Clasen
a2b61b1e46 Add a GIcon implementation that can add an emblem to another icon.
2008-07-28  Matthias Clasen  <mclasen@redhat.com>

        * gemblemedicon.[hc]: Add a GIcon implementation that can
        add an emblem to another icon.

        * gio.h:
        * Makefile.am:
        * gio.symbols: Glue

        * gloadableicon.c:
        * gfileicon.c: Small documenatation additions.


svn path=/trunk/; revision=7263
2008-07-28 15:35:07 +00:00
Tor Lillqvist
4437940fe1 Correct return type.
2008-07-28  Tor Lillqvist  <tml@novell.com>

	* gwin32appinfo.c (g_win32_app_info_get_icon): Correct return
	type.


svn path=/trunk/; revision=7261
2008-07-28 00:26:09 +00:00
Tor Lillqvist
a076a30457 Set LIB_EXE_MACHINE_FLAG to either X86 or X64 on Windows. AC_SUBST it.
2008-07-27  Tor Lillqvist  <tml@novell.com>

	* configure.in: Set LIB_EXE_MACHINE_FLAG to either X86 or X64 on
	Windows. AC_SUBST it.

	* */Makefile.am: Correspondingly, pass appropriate -machine
	flag to lib.exe when producing the import library for the MS
	toolchain.


svn path=/trunk/; revision=7255
2008-07-27 15:54:15 +00:00
David Zeuthen
64c1eba197 Also export a g_mount_guess_content_type_sync() function.
2008-07-24  David Zeuthen  <davidz@redhat.com>

        * gmount.[ch]:
        * gio.symbols:
        Also export a g_mount_guess_content_type_sync() function.


svn path=/trunk/; revision=7252
2008-07-24 21:21:22 +00:00
Matthias Clasen
ed86835786 Support setting selinux attributes
svn path=/trunk/; revision=7241
2008-07-23 04:11:02 +00:00
Priit Laes
f656ca06de Bug 544140 - fam-helper 64-bit issue?
2008-07-22  Priit Laes <plaes@plaes.org>

	Bug 544140 - fam-helper 64-bit issue?

	* fam/fam-helper.c: Added missing include so compiler doesn't complain.

svn path=/trunk/; revision=7239
2008-07-22 14:56:31 +00:00
Matthias Clasen
282805b1d4 2.17.4
svn path=/trunk/; revision=7234
2008-07-21 17:56:17 +00:00
Matthias Clasen
c723669198 doc fixes
svn path=/trunk/; revision=7226
2008-07-21 02:53:30 +00:00
Matthias Clasen
d420020715 More doc fixes
svn path=/trunk/; revision=7225
2008-07-21 02:46:54 +00:00
Matthias Clasen
c0aacc7c4c More doc fixes
svn path=/trunk/; revision=7224
2008-07-21 02:32:14 +00:00
Matthias Clasen
3bdbb2b329 Doc fixes
svn path=/trunk/; revision=7223
2008-07-21 02:19:56 +00:00
Matthias Clasen
acb7f6449a 543504 – crash in Epiphany Web Browser: Opening local file
2008-07-19  Matthias Clasen  <mclasen@redhat.com>

        543504 – crash in Epiphany Web Browser: Opening local file

        * gappinfo.c:
        * gasyncresult.c:
        * gdesktopappinfo.c:
        * gdrive.c:
        * gfile.c:
        * gicon.c:
        * gloadableicon.c:
        * gmount.c:
        * gseekable.c:
        * gvolume.c: Register types thread-safely.
        Patch by Christian Persch


svn path=/trunk/; revision=7208
2008-07-20 00:34:58 +00:00
Matthias Clasen
48867a895c Remove debug spew
svn path=/trunk/; revision=7206
2008-07-19 01:15:12 +00:00
Matthias Clasen
f27ab8977b Remove a warning
svn path=/trunk/; revision=7203
2008-07-18 18:22:48 +00:00
Matthias Clasen
3cb92eb95e Fix a segfault
svn path=/trunk/; revision=7200
2008-07-18 17:48:30 +00:00
Matthias Clasen
38d4e3fd48 Add g_content_type_guess_for_tree
svn path=/trunk/; revision=7199
2008-07-18 15:33:22 +00:00
Matthias Clasen
981f9ed840 Avoid a filename conflict
svn path=/trunk/; revision=7192
2008-07-16 06:30:12 +00:00
Matthias Clasen
6dba7df4b1 Plug a leak
svn path=/trunk/; revision=7191
2008-07-16 06:13:41 +00:00
Matthias Clasen
d17b52cbdb More documentation fixes
svn path=/trunk/; revision=7190
2008-07-16 05:49:16 +00:00
Matthias Clasen
9f3f5f0905 Small documentation fixes
svn path=/trunk/; revision=7187
2008-07-16 04:21:50 +00:00
Matthias Clasen
20174898b5 Use g_strcmp0 instead of rolling our own
svn path=/trunk/; revision=7183
2008-07-15 05:42:11 +00:00
Matthias Clasen
0a20d4cbe4 Doc improvement
svn path=/trunk/; revision=7173
2008-07-09 04:26:47 +00:00
Matthias Clasen
07d4c14f8d Documentation improvements.
svn path=/trunk/; revision=7172
2008-07-09 04:18:45 +00:00
Matthias Clasen
d6e4fe5ae9 Add g_mount_guess_content_type
svn path=/trunk/; revision=7171
2008-07-08 16:02:08 +00:00
Matthias Clasen
c8c5188fd5 Minor doc edits
svn path=/trunk/; revision=7170
2008-07-08 06:01:04 +00:00
David Zeuthen
2b714b5f20 Add new method g_volume_get_activation_root(). This is needed for easily
2008-07-06  David Zeuthen  <davidz@redhat.com>

	* gio.symbols:
	* gvolume.[ch]: Add new method g_volume_get_activation_root(). This
	is needed for easily handling adoption of foreign volumes by
	out-of-process volume monitors (#541793)


svn path=/trunk/; revision=7169
2008-07-07 15:38:38 +00:00
David Zeuthen
7a5a2be92b Export the eject-button signal on the volume monitor class (#541794).
2008-07-06  David Zeuthen  <davidz@redhat.com>

        * gvolumemonitor.[ch]:
        * gunionvolumemonitor.c: Export the eject-button signal on the
        volume monitor class (#541794).


svn path=/trunk/; revision=7168
2008-07-07 02:23:52 +00:00
Matthias Clasen
532e476d62 More doc tweaks
svn path=/trunk/; revision=7167
2008-07-06 22:11:58 +00:00
Matthias Clasen
c7a067e211 Clarify some docs
svn path=/trunk/; revision=7162
2008-07-06 00:07:50 +00:00
Matthias Clasen
548b2bd02b Fix a stupid crash
svn path=/trunk/; revision=7155
2008-07-03 22:57:55 +00:00
Matthias Clasen
7a5b6f0057 2.17.3
svn path=/trunk/; revision=7152
2008-07-03 00:28:00 +00:00
Matthias Clasen
0227089563 Fix the build
svn path=/trunk/; revision=7151
2008-07-02 22:05:32 +00:00
Colin Walters
eb4ce9620a Use UNLOCK to unlock, not LOCK.
2008-07-02  Colin Walters  <walters@redhat.com>

	* gio/gcontenttype.c: Use UNLOCK to unlock, not LOCK.


svn path=/trunk/; revision=7146
2008-07-02 19:06:08 +00:00
Matthias Clasen
d19e08a40c Add g_file_monitor
svn path=/trunk/; revision=7145
2008-07-02 17:19:16 +00:00
Matthias Clasen
563eb12748 Use a configure check for structfs.f_bavail.
* glocalfile.c: Use a configure check for structfs.f_bavail.


svn path=/trunk/; revision=7144
2008-07-02 16:49:04 +00:00
Matthias Clasen
9d82224015 Add a function to create a GDesktopAppInfo from a GKeyFile. Proposed by
* gio.symbols:
        * gdesktopappinfo.[hc]: Add a function to create a
        GDesktopAppInfo from a GKeyFile. Proposed by Josselin Mouette.


svn path=/trunk/; revision=7143
2008-07-02 16:23:23 +00:00
Wouter Bolsterlee
952923ca11 Fix ulink in doc to make gtk-doc happy.
2008-07-02  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gappinfo.c: Fix ulink in doc to make gtk-doc happy.


svn path=/trunk/; revision=7138
2008-07-02 13:17:23 +00:00
Matthias Clasen
ee96535cec Fix a doc typo
svn path=/trunk/; revision=7136
2008-07-02 03:41:58 +00:00
Cody Russell
a6a4779108 Fixed some more includes
svn path=/trunk/; revision=7131
2008-07-02 01:54:16 +00:00
Cody Russell
43d6efbb46 Fixed some include problems.
2008-07-01  Cody Russell  <bratsche@gnome.org>

        * gio/gwin32appinfo.c:
        * gio/gwin32mount.c: Fixed some include problems.


svn path=/trunk/; revision=7130
2008-07-02 01:52:37 +00:00
Cody Russell
868d0cef12 Move my ChangeLog entry to the right place
svn path=/trunk/; revision=7129
2008-07-01 15:18:14 +00:00
Cody Russell
3d93bf6968 Moved all relevant typedefs into these files.
2008-07-01  Cody Russell  <bratsche@gnome.org>

        * gio/gioenums.h:
        * gio/giotypes.h:
	Moved all relevant typedefs into these	files.

        * gio/*.[ch]:
	Updated wrt added files.

        Split types into separate file	for easier maintainership. (#538564)


svn path=/trunk/; revision=7127
2008-07-01 06:32:35 +00:00
Matthias Clasen
64770f4b0e Clarify docs. Patch by Jared Moore
* gfile.c (g_file_append_to): Clarify docs.
        Patch by Jared Moore

svn path=/trunk/; revision=7110
2008-06-30 05:02:06 +00:00
Matthias Clasen
9b89825af0 Unalias. Patch by Markus Bergman
* gcontentype.c (g_content_type_from_mime_type): Unalias.
        Patch by Markus Bergman


svn path=/trunk/; revision=7109
2008-06-30 04:59:40 +00:00
Matthias Clasen
9df3b94a0d Allow g_atomic_pointer_get
svn path=/trunk/; revision=7108
2008-06-30 04:55:27 +00:00
Matthias Clasen
e3313b2651 Add some tests for GMemoryOutputStream.
2008-06-29  Matthias Clasen  <mclasen@redhat.com>

        * tests/Makefile.am:
        * tests/memory-output-stream.c: Add some tests for
        GMemoryOutputStream.

2008-06-29  Matthias Clasen  <mclasen@redhat.com>

        Bug 540423 – unrecoverable error after g_seekable_truncate(seekable,
        0, ...)

        * gmemoryoutputstream.c (array_resize): Handle truncation to
        zero correctly. Reported by Akira Tagoh



svn path=/trunk/; revision=7106
2008-06-30 03:47:27 +00:00
Matthias Clasen
19bf6826f0 Trivial doc fixes
svn path=/trunk/; revision=7104
2008-06-30 02:55:39 +00:00
Matthias Clasen
0741dea88f Don't g_list_prepend one list to another. Pointed out by Jan Arne Petersen
* giomodule.c (_g_io_modules_ensure_loaded): Don't g_list_prepend
        one list to another. Pointed out by Jan Arne Petersen


svn path=/trunk/; revision=7103
2008-06-30 02:44:52 +00:00
Michael Natterer
9dc8ea91a2 remove semicolons from G_IMPLEMENT_INTERFACE().
2008-06-28  Michael Natterer  <mitch@imendio.com>

	* gfileicon.c: remove semicolons from G_IMPLEMENT_INTERFACE().


svn path=/trunk/; revision=7101
2008-06-28 20:53:02 +00:00
Kristian Rietveld
1289b6d165 introduce an ENUMPREFIX substitution.
2008-06-23  Kristian Rietveld  <kris@imendio.com>

	* gobject/glib-mkenums.in: introduce an ENUMPREFIX substitution.

	* gio/gioenumtypes.h.template: use @ENUMPREFIX@ instead of
	hard coding "G" as prefix.


svn path=/trunk/; revision=7096
2008-06-23 12:06:39 +00:00
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch


svn path=/trunk/; revision=7092
2008-06-22 15:10:51 +00:00
Matthias Clasen
f6da8a493c Don't do fallback for user-home and user-desktop to avoid problems with
* glocalfileinfo.c: Don't do fallback for user-home and user-desktop
        to avoid problems with partial icon themes.



svn path=/trunk/; revision=7056
2008-06-19 03:30:17 +00:00
Hans Breuer
b696a978ea bits and pieces from gtk-2-12 and gunix*.[hc] to make the file chooser
2008-06-17  Hans Breuer  <hans@breuer.org>

        * gwin32mount.[ch] gwin32volumemonitor.[ch] : bits and pieces from 
        gtk-2-12 and gunix*.[hc] to make the file chooser show drive letter
	access again on win32, see bug #538127
        * giomodule.c : ensure GWin32VolumeMonitor is registered
        * glocaldireoctorymonitor.c : initial state on win32 is_mounted=TRUE
        * Makefile.am makefile.msc : updated

svn path=/trunk/; revision=7055
2008-06-17 21:40:04 +00:00
Hans Breuer
203ac61027 fixed the date
svn path=/trunk/; revision=7053
2008-06-16 20:35:48 +00:00
Hans Breuer
890d13b40e declaration and initialization in one step avoids c99ism
2008-05-19  Hans Breuer  <hans@breuer.org>

	* glocalfileenumerator.c(_g_local_file_enumerator_new) : declaration 
	and initialization in one step avoids c99ism

svn path=/trunk/; revision=7052
2008-06-16 20:34:42 +00:00
Christian Persch
9c17697b56 Use g_set_error_literal where appropriate. Patch from bug #535947.
svn path=/trunk/; revision=7051
2008-06-16 16:53:58 +00:00
Tor Lillqvist
cc8adfaeb8 Bug 538362 - Get Win32 icons back in the file chooser
2008-06-16  Tor Lillqvist  <tml@novell.com>

	Bug 538362 - Get Win32 icons back in the file chooser

	* gcontenttype.c (g_content_type_get_icon): Look up the icon
	corresponding to a file extension in the Registry. Patch by Hans
	Breuer.
	(get_registry_classes_key): Handle also REG_EXPAND_SZ type values.
	
2008-06-16  Tor Lillqvist  <tml@novell.com>

	Patches by Hans Breuer:

	* glocalfile.c (is_xp_or_later): Handle compiling against older
	SDK headers with missing VerifyVersionInfo().  Conditioned on
	_MSC_VER, but should probably use some better test.
	* glocalfile.c (g_local_file_query_filesystem_info): Don't test
	uninitialised statfs_result variable on Win32.



svn path=/trunk/; revision=7049
2008-06-16 13:23:14 +00:00
Michael Natterer
a4427bfff5 chain up unconditionally in finalize() and dispose(). Also don't
2008-06-16  Michael Natterer  <mitch@imendio.com>

	* *.c: chain up unconditionally in finalize() and dispose(). Also
	don't dereference these function pointers when calling them since
	that has no meaning at all.


svn path=/trunk/; revision=7048
2008-06-16 09:54:04 +00:00
Ross Burton
b207146976 Put my changelog entries in the right changelog, whoops
svn path=/trunk/; revision=7047
2008-06-16 09:31:20 +00:00
Ross Burton
17ac5f4dfb Remove check for dispose implementation as it annoys Emmanuele.
2008-06-16  Ross Burton  <ross@burtonini.com>

	* gio/gfileenumerator.c:
	Remove check for dispose implementation as it annoys Emmanuele.

svn path=/trunk/; revision=7045
2008-06-16 09:16:25 +00:00
Ross Burton
3480685d4e Bug 536252 – GFileEnumerator should allow access to the containing GFile
2008-06-16  Ross Burton  <ross@burtonini.com>

	Bug 536252 – GFileEnumerator should allow access to the containing
	GFile
	
	* gio/gfileenumerator.c:
	* gio/gfileenumerator.h:
	* gio/gfile.h:
	Add g_file_enumerator_get_container() and a container writeable
	construct-only property.  Also shuffle around typedefs to make it
	compile.
	
	* gio/glocalfileenumerator.c:
	* gio/glocalfileenumerator.h:
	* gio/glocalfile.c:
	Instead of a string filename take a GFile in the constructor and
	use it to set the container property.
	
	* gio/gio.symbols:
	* docs/reference/gio/gio-sections.txt:
	Update with new API.

svn path=/trunk/; revision=7044
2008-06-16 08:49:08 +00:00
Matthias Clasen
dd24f9957c Make includes more uniform
svn path=/trunk/; revision=7043
2008-06-16 04:36:03 +00:00
Hans Breuer
43eeb244ac to get the default translation target on win32 use g_win32_get_locale()
2008-06-13  Hans Breuer  <hans@breuer.org>

	* glib/gstrfuncs.c : to get the default translation target on
	win32 use g_win32_get_locale() instead of setlocale(LS_MESSAGES,NULL)
	Fixes bug #538044

	* glib/makefile.msc.in gio/makefile.msc : updated

svn path=/trunk/; revision=7036
2008-06-13 08:05:33 +00:00
Yevgen Muntyan
e5347891fe Use less fancy unicode filenames, so the test doesn't fail on Mac OS X
2008-06-12  Yevgen Muntyan  <muntyan@tamu.edu>

	* tests/live-g-file.c (sample_struct):
        Use less fancy unicode filenames, so the test doesn't fail
        on Mac OS X (#531476).


svn path=/trunk/; revision=7035
2008-06-13 03:56:26 +00:00
Matthias Clasen
135bb794fd 2.17.2
svn path=/trunk/; revision=7032
2008-06-12 18:37:44 +00:00
Matthias Clasen
6427d30d1f 2.17.1
svn path=/trunk/; revision=7029
2008-06-12 17:21:49 +00:00
A. Walton
52a03b97c6 Fix broken test case.
2008-06-11  A. Walton  <awalton@gnome.org>

	* tests/g-file.c (test_g_file_new_null):
	Fix broken test case.


svn path=/trunk/; revision=7016
2008-06-11 20:02:31 +00:00
Matthias Clasen
4f2c99af79 Allow PLT entry for g_clear_error
svn path=/trunk/; revision=7013
2008-06-11 18:50:17 +00:00
Ross Burton
7653f50019 Bug 511367 - add g_file_make_directory_with_parents.
2008-06-11  Ross Burton  <ross@burtonini.com>

	Bug 511367 - add g_file_make_directory_with_parents.
	
	* gio/gfile.c:
	* gio/gfile.h:
	* gio/gio.symbols: Add g_file_make_directory_with_parents.

svn path=/trunk/; revision=7001
2008-06-11 15:48:06 +00:00
Matthias Clasen
bb5bfd3546 revert unintended change
svn path=/trunk/; revision=6998
2008-06-11 14:25:18 +00:00
Matthias Clasen
9aad44c339 Don't unref before last use
svn path=/trunk/; revision=6997
2008-06-11 14:05:45 +00:00
Matthias Clasen
0e51f02ccb Bug 537546 – 'desktop' shortcut in file chooser looks like a generic
folder

        * glocalfileinfo.c (_g_local_file_info_get): Return user-desktop
        as icon for the desktop directory, also make user-home and
        user-desktop the preferred icons.


svn path=/trunk/; revision=6992
2008-06-10 16:56:25 +00:00
Matthias Clasen
0f370f9a04 Add g_themed_icon_prepend_name
svn path=/trunk/; revision=6991
2008-06-10 16:45:54 +00:00
Matthias Clasen
e12152159f Bug 537392 – Additional colon in xattr name
* glocalfileinfo.c (set_xattr): Skip the second colon of the prefix,
        too. Reported by  Alessandro Morandi


svn path=/trunk/; revision=6990
2008-06-10 15:55:31 +00:00
Matthias Clasen
972a981f30 Fix attribution
svn path=/trunk/; revision=6989
2008-06-10 15:38:42 +00:00
Matthias Clasen
a0c45852e1 Bug 536641 – Filesystem querying in gio does not list AFS and autofs
file systems

        * glocalfile.c (get_fs_type): Add afs and autofs.
        Patch by Danny Baumann.


svn path=/trunk/; revision=6988
2008-06-10 15:37:41 +00:00
Matthias Clasen
946b78006b Bug 528600 – g_dummy_file_get_parent("scheme://example.com/")
* gdummyfile.c (g_dummy_file_get_parent): Return NULL if there
        is no parent.  (Owen Taylor, patch by Christian Persch)


svn path=/trunk/; revision=6987
2008-06-10 15:27:39 +00:00
Paolo Borelli
9944e93fda do not leak the output stream.
2008-06-10  Paolo Borelli  <pborelli@katamail.com>

	* gfile.c (g_file_replace_contents): do not leak the output stream.


svn path=/trunk/; revision=6984
2008-06-10 11:40:45 +00:00
Michael Natterer
b15a223a8a fix SEGV by not using uninitialized memory as array index.
2008-06-10  Michael Natterer  <mitch@imendio.com>

	* gcontenttype.c (g_content_type_get_icon): fix SEGV by not using
	uninitialized memory as array index.


svn path=/trunk/; revision=6981
2008-06-10 10:51:29 +00:00
Tor Lillqvist
8b5ad297da Add TODO comments.
2008-06-10  Tor Lillqvist  <tml@novell.com>

	* gcontenttype.c (g_content_type_get_icon) [Win32]:
	Add TODO comments.


svn path=/trunk/; revision=6980
2008-06-10 10:35:20 +00:00
Tor Lillqvist
c7b21acd7b Add TODO comment.
2008-06-10  Tor Lillqvist  <tml@novell.com>

	* gcontenttype.c (g_content_type_can_be_executable) [Win32]: Add
	TODO comment.


svn path=/trunk/; revision=6979
2008-06-10 10:34:02 +00:00
Matthias Clasen
9331b3f1ce Fix the build
svn path=/trunk/; revision=6977
2008-06-09 21:38:35 +00:00
Matthias Clasen
c82988e262 Use icons from the shared mime database, if available.
svn path=/trunk/; revision=6976
2008-06-09 17:33:43 +00:00
Matthias Clasen
2bd31c9e6c Sync with upstream
svn path=/trunk/; revision=6975
2008-06-09 16:45:19 +00:00
Michael Natterer
03a5797a62 don't define G_DISABLE_SINGLE_INCLUDES, it's in the global CPPFLAGS now.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* Makefile.am: don't define G_DISABLE_SINGLE_INCLUDES, it's in
	the global CPPFLAGS now.

	* tests/data-input-stream.c
	* tests/data-output-stream.c
	* tests/g-file-info.c
	* tests/g-file.c
	* tests/live-g-file.c
	* tests/memory-input-stream.c: don't include <glib/gtestutils.h>


svn path=/trunk/; revision=6954
2008-05-28 16:17:45 +00:00
Matthias Clasen
e14f918de9 2.17.0
svn path=/trunk/; revision=6948
2008-05-27 21:22:45 +00:00
Matthias Clasen
689a9e4b1a Revert the patch for bug 527214 and related changes. GTimer
is supposed to work without threads.


svn path=/trunk/; revision=6943
2008-05-27 16:00:51 +00:00
simon.zheng
58e4b46343 Fix #533369. Check whether memeber statvfs.f_basetype available or not.
2008-05-27  simon.zheng  <simon.zheng@sun.com>

	* configure.in: Fix #533369. Check whether memeber statvfs.f_basetype 
        available or not.
	* gio/glocalfile.c: (g_local_file_query_filesystem_info):
        Fix #533369. Make G_FILE_ATTRIBUTE_FILESYSTEM_TYPE work on Solaris.


svn path=/trunk/; revision=6939
2008-05-27 07:51:13 +00:00
Michael Natterer
c9db84f9f2 declare g_memory_output_stream_get_data_size().
2008-05-26  Michael Natterer  <mitch@imendio.com>

	* gmemoryoutputstream.h: declare
	g_memory_output_stream_get_data_size().


svn path=/trunk/; revision=6936
2008-05-26 11:52:24 +00:00
Matthias Clasen
cdc2910103 Make tests work
svn path=/trunk/; revision=6935
2008-05-26 05:57:09 +00:00
Matthias Clasen
eb5889df59 Add a new symbol
svn path=/trunk/; revision=6934
2008-05-26 05:56:08 +00:00
Ross Burton
8b6fdb362f Fix typo in error message (#534764).
2008-05-25  Ross Burton  <ross@burtonini.com>

	* glocalfile.c:
	Fix typo in error message (#534764).

svn path=/trunk/; revision=6928
2008-05-25 18:31:42 +00:00
Ross Burton
75a558f900 Fix circular dependency loop for gioenumtypes.h (#534759).
2008-05-25  Ross Burton  <ross@burtonini.com>

	* Makefile.am:
	Fix circular dependency loop for gioenumtypes.h (#534759).

svn path=/trunk/; revision=6927
2008-05-25 15:49:27 +00:00
Hans Breuer
fd86d833b3 EXTRA_DIST += makefile.msc
2008-05-19  Hans Breuer  <hans@breuer.org>

	* Makefile.am : EXTRA_DIST += makefile.msc


svn path=/trunk/; revision=6912
2008-05-19 05:18:10 +00:00
Matthias Clasen
4f21fe18cb New function to create a content type from a mime type. (#527175, Milan
2008-05-17  Matthias Clasen  <mclasen@redhat.com>

        * gcontenttype.h:
        * gcontenttype.c: (g_content_type_from_mime_type):
        New function to create a content type from a mime type. (#527175,
        Milan Crha)


svn path=/trunk/; revision=6906
2008-05-18 02:50:48 +00:00
Matthias Clasen
a30f8df3c8 fix free space information for ncpfs
svn path=/trunk/; revision=6902
2008-05-17 06:08:08 +00:00
Matthias Clasen
67b2f9a99b Bug 530196 – _g_local_file_has_trash_dir() doesn't handle st_dev == 0
* glocalfile.c (_g_local_file_has_trash_dir): Handle the case that
        st_dev might be zero.



svn path=/trunk/; revision=6901
2008-05-17 06:01:43 +00:00
Tor Lillqvist
a6cd26d656 #define _WIN32_WINNT 0x0400 to get declaration of ReadDirectoryChangesW()
2008-05-16  Tor Lillqvist  <tml@novell.com>

	* win32/gwin32directorymonitor.c: #define _WIN32_WINNT 0x0400 to
	get declaration of ReadDirectoryChangesW() from Platform SDK headers.


svn path=/trunk/; revision=6893
2008-05-16 17:16:37 +00:00
Bastien Nocera
a495d32f36 A URI scheme must start with a letter, even if later more characters are
2008-05-13  Bastien Nocera  <hadess@hadess.net>

	* gfile.c (has_valid_scheme): A URI scheme must start with a
	letter, even if later more characters are allowed (#532852)


svn path=/trunk/; revision=6887
2008-05-13 12:42:40 +00:00
Michael Natterer
d922bf632a Makefile.am. build with G_DISABLE_SINGLE_INCLUDES to prevent code from
2008-05-05  Michael Natterer  <mitch@imendio.com>

	* Makefile.am. build with G_DISABLE_SINGLE_INCLUDES to prevent
	code from being checked in that breaks the build of applications
	which use G_DISABLE_SINGLE_INCLUDES.

	* makegioalias.pl: make the alias file include "glib.h" instead of
	"glibconfig.h".

	* gio.symbols: whitespace change to force regeneration of the
	alias file after above script change.

	* gfileinfo.h: remove inlcusion of <glib/gfileutils.h>.

	* gfilenamecompleter.c: remove inclusion of "gurifuncs.h".

	* gioerror.h: #include <glib.h> instead of <glib/gerror.h>.

	* glocalfileinfo.c: remove inclusion of <glib/gchecksum>.


svn path=/trunk/; revision=6879
2008-05-05 15:12:13 +00:00
David Zeuthen
27dba4c28b Avoid displaying mounts in a subdirectory not accessible to the user
2008-04-28  David Zeuthen  <davidz@redhat.com>

        * gunixmounts.c (g_unix_mount_guess_should_display): Avoid
        displaying mounts in a subdirectory not accessible to the
        user (#526320).


svn path=/trunk/; revision=6872
2008-04-28 22:38:49 +00:00
Michael Natterer
13567ad757 fix library versioning (it was 0.0.0).
2008-04-22  Michael Natterer  <mitch@imendio.com>

	* Makefile.am: fix library versioning (it was 0.0.0).


svn path=/trunk/; revision=6870
2008-04-22 13:51:37 +00:00
Tor Lillqvist
336cc8436b configure.in More work on enabling static building on Windows. When
2008-04-21  Tor Lillqvist  <tml@novell.com>

	* configure.in
	* */Makefile.am: More work on enabling static building on
	Windows. When building statically: Also define
	GOBJECT_STATIC_COMPILATION in glibconfig.h so that also the
	variables in gparamspecs.h get declared without any
	dllimport/dllexport decorations. Don't install .def files which
	obviously have no meaning for static libraries. Don't create MS
	import libraries. Don't do any resource object files.


svn path=/trunk/; revision=6866
2008-04-21 08:38:36 +00:00
Lin Ma
6965703ad2 Default disable all loggings. Fixed two macro nits.
2008-04-21  Lin Ma  <Lin.Ma@Sun.COM>

	* fen/fen-data.c, fen/fen-helper.c, fen/fen-missing.c, fen/fen-node.c:
	Default disable all loggings.
	* fen/fen-kernel.c: (printevent), (port_add_kevent),
	(port_fetch_event_cb): Fixed two macro nits.


svn path=/trunk/; revision=6865
2008-04-21 02:40:40 +00:00
Matthias Clasen
9fd295d285 Rework the timestamp checking code to protect against duplicate
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        * xdgmime/xdgmime.c: Rework the timestamp checking code
        to protect against duplicate directories in XDG_DATA_DIRS.
        Fixes fd.o bug 12513, reported by Joe Shaw.



svn path=/trunk/; revision=6859
2008-04-16 21:55:32 +00:00
Matthias Clasen
07ad3555ed Partically revert the last commit after realizing that
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Partically revert the last commit after realizing that
        xdg_mime_media_type_equal doesn't have to init at all.

        * xdgmime/xdgmime.h:
        * xdgmime/xdgmime.c: Get rid of _xdg_mime_media_type_equal

        * xdgmime/xdgmimecache.c: Use xdg_mime_media_type_equal

svn path=/trunk/; revision=6857
2008-04-16 17:13:19 +00:00
Matthias Clasen
101521f6e4 Avoid possible memory corruption in xdgmime, fd.o bug 12512, reported by
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Avoid possible memory corruption in xdgmime, fd.o bug 12512,
        reported by Joe Shaw and Federico Mena Quintero.

        * xdgmime/xdgmime.c(_xdg_mime_media_type_equal): Implement.
        (xdg_mime_media_type_equal): Turn into a wrapper around the
        _-prefixed version.

        * xdgmime/xdgmimecache.c: Use the _-prefixed versions of comparison
        functions throughout.


svn path=/trunk/; revision=6854
2008-04-16 16:54:44 +00:00
Michael Meeks
8e964bf99a tolerate an empty TryExec= line without failing; nautilus used to create
2008-04-16  Michael Meeks  <michael.meeks@novell.com>

        * gdesktopappinfo.c (g_desktop_app_info_new_from_filename): 
        tolerate an empty TryExec= line without failing; nautilus used
        to create launchers with these in previous versions. Fixes #528433


svn path=/trunk/; revision=6853
2008-04-16 16:48:23 +00:00
Mukund Sivaraman
414075c64c Fixed typos in gtk-doc comments.
2008-04-15  Mukund Sivaraman  <muks@mukund.org>

        * gio/gfile.c: Fixed typos in gtk-doc comments.


svn path=/trunk/; revision=6850
2008-04-15 14:32:58 +00:00
Padraig O'Briain
105dc15a03 In g_app_info_create_from_commandline set comment after name. Fixes
2008-04-09  Padraig O'Briain  <padraig.obriain@sun.com>

	* gdesktopappinfo.c: In g_app_info_create_from_commandline set comment
	after name. Fixes #527132.


svn path=/trunk/; revision=6844
2008-04-09 14:53:05 +00:00
Tomas Bzatek
4bf8977b89 Doc update
2008-04-08  Tomas Bzatek  <tbzatek@redhat.com> 

        * gfile.c: (g_file_replace):
        Doc update


svn path=/trunk/; revision=6841
2008-04-08 15:56:42 +00:00
Matthias Clasen
f0ba12f19f Bug 526796 – Wrong order of arguments in g_file_copy's fallback
* gfile.c (file_copy_fallback): Fix the argument order. Patch
        by Christian Kellner.

svn path=/trunk/; revision=6830
2008-04-08 01:59:47 +00:00
Sebastien Bacher
087bf32df3 Don't list the user directory as a mount, fix potential issue when other
2008-04-04  Sebastien Bacher  <seb128@ubuntu.com>

	* gunixmounts.c: (g_unix_mount_guess_should_display):
	Don't list the user directory as a mount, fix potential issue
	when other users have a similar naming and don't special case the
	gvfs mounts there since that's not required (#525866)


svn path=/trunk/; revision=6825
2008-04-04 07:37:34 +00:00
Alexander Larsson
fe68fc7496 Don't leak parent.
2008-03-31  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c (get_parent):
	Don't leak parent.
	


svn path=/trunk/; revision=6801
2008-03-31 20:04:24 +00:00
A. Walton
5d17169953 Always return a GFileType enum value (#520715).
2008-03-31  A. Walton  <awalton@svn.gnome.org>

	* gfile.c (g_file_query_file_type):
	Always return a GFileType enum value (#520715).


svn path=/trunk/; revision=6799
2008-03-31 19:32:58 +00:00
Alexander Larsson
a2609fc3f1 Fix typo in changelog
svn path=/trunk/; revision=6797
2008-03-31 19:21:19 +00:00
Alexander Larsson
f90af78bd6 Read readdir() info chunks (of 1000) and sort the chunks by inode before
2008-03-31  Alexander Larsson  <alexl@redhat.com>

        * glocalfileenumerator.c:
	Read readdir() info chunks (of 1000) and sort
	the chunks by inode before stat:ing.
	This is a 20% performance increase in testing
	gvfs-ls on /usr/bin with cold cache.


svn path=/trunk/; revision=6796
2008-03-31 19:18:46 +00:00
Alexander Larsson
befae6688e Clarify docs for g_memory_output_stream_get_size. Add
2008-03-31  Alexander Larsson  <alexl@redhat.com>

        * gmemoryoutputstream.c:
	Clarify docs for g_memory_output_stream_get_size.
	Add g_memory_output_stream_get_data_size.



svn path=/trunk/; revision=6792
2008-03-31 13:49:46 +00:00
Matthias Clasen
a07b747200 Add g_file_query_file_type convenience function to query the type of a
2008-03-30  Matthias Clasen  <mclasen@redhat.com>

        * gio.symbols:
        * gfile.c:
        * gfile.h: Add g_file_query_file_type convenience function
        to query the type of a file.  (#520715, Mikkel Kamstrup Erlandsen)



svn path=/trunk/; revision=6784
2008-03-31 04:46:22 +00:00
Matthias Clasen
a4a5f33f47 Fix some documentation typos. (#524950, Rob Bradford)
2008-03-30  Matthias Clasen  <mclasen@redhat.com>

        * gfileenumerator.c:
        * gfile.c: Fix some documentation typos.  (#524950, Rob Bradford)



svn path=/trunk/; revision=6773
2008-03-31 03:30:48 +00:00
A. Walton
096201834d Adds GIO_EXTRA_MODULES environment variable support, closing bug #523039.
2008-03-28  A. Walton  <awalton@svn.gnome.org>

	* giomodule.c (_g_io_modules_ensure_loaded):
	Adds GIO_EXTRA_MODULES environment variable support, closing bug 
	#523039.


svn path=/trunk/; revision=6768
2008-03-28 14:31:09 +00:00
Alexander Larsson
4824b7dbb0 Fix up last commit.
2008-03-28  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
        (copy_stream_with_progress):
	Fix up last commit.
	


svn path=/trunk/; revision=6766
2008-03-28 13:57:29 +00:00
Alexander Larsson
baa973e54c Fix ChangeLog entry
svn path=/trunk/; revision=6765
2008-03-28 12:44:37 +00:00
Alexander Larsson
941513cdca Fallback to g_file_query_info for source size if
2008-03-28  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
        (copy_stream_with_progress):
        (file_copy_fallback):
	Fallback to g_file_query_info for source size
	if g_file_input_stream_query_info fails. (#524579)


svn path=/trunk/; revision=6763
2008-03-28 12:43:11 +00:00
Alexander Larsson
b4e4bbd594 Reuse old string instead of adding new one.
2008-03-28  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c (g_local_file_move):
	Reuse old string instead of adding new one.



svn path=/trunk/; revision=6762
2008-03-28 11:44:04 +00:00
Lin Ma
778488d993 still copyright issue. I hate copyright.
2008-03-28  Lin Ma  <Lin.Ma@Sun.COM>

	* fen/*.[hc]: still copyright issue. I hate copyright.



svn path=/trunk/; revision=6760
2008-03-28 09:30:52 +00:00
Alexander Larsson
9dfce3a26a Return G_IO_ERROR_IS_DIRECTORY, not G_IO_ERROR_WOULD_MERGE when moving
2008-03-27  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c (g_local_file_move):
	Return G_IO_ERROR_IS_DIRECTORY, not G_IO_ERROR_WOULD_MERGE when moving
	file over directory. This is according to the docs and what the move via
	copy+remove fallback does.



svn path=/trunk/; revision=6758
2008-03-27 20:13:00 +00:00
Lin Ma
d7d4211cb0 Updated copyright.
2008-03-27  Lin Ma  <Lin.Ma@Sun.COM>

	* fen/*.[hc]: Updated copyright.


svn path=/trunk/; revision=6757
2008-03-27 09:14:54 +00:00
Lin Ma
6aae6cc13e Removed a bad formatted msg.
2008-03-20  Lin Ma  <Lin.Ma@Sun.COM>

	* fen/fen-data.c: (fdata_adjust_changed): Removed a bad formatted msg.


svn path=/trunk/; revision=6744
2008-03-20 09:49:41 +00:00
Lin Ma
50556ee0a5 Fixed FEN does not emit attribute changed events when optimizing changed
2008-03-20  Lin Ma  <Lin.Ma@Sun.COM>

        * fen/fen-data.c: (process_events), (fdata_add_event): Fixed FEN does
        not emit attribute changed events when optimizing changed events.
        * fen/fen-helper.c, fen/fen-kernel.c: Added ifdef to default disable
	warning messages.


svn path=/trunk/; revision=6743
2008-03-20 09:40:28 +00:00
Matthias Clasen
43db4fb1dd Doc additions
svn path=/trunk/; revision=6740
2008-03-19 20:54:49 +00:00
Sebastien Bacher
864b0d690e consider nfs4 mounts as G_UNIX_MOUNT_TYPE_NFS (Closes: #523338)
2008-03-19  Sebastien Bacher  <seb128@ubuntu.com>

	* gunixmounts.c: (guess_mount_type): 
	consider nfs4 mounts as G_UNIX_MOUNT_TYPE_NFS (Closes: #523338)

svn path=/trunk/; revision=6737
2008-03-19 14:07:00 +00:00
Alexander Larsson
53f36510be Bump block side for copy to 64k to minimize overhead for low latency
2008-03-19  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
        (copy_stream_with_progress):
	Bump block side for copy to 64k to minimize
	overhead for low latency links. (#523015)



svn path=/trunk/; revision=6735
2008-03-19 12:16:20 +00:00
Tor Lillqvist
ff69c53da9 Make libgio-2.0.la depend on gio.def on Windows.
2008-03-16  Tor Lillqvist  <tml@novell.com>

	* Makefile.am (libgio_2_0_la_DEPENDENCIES): Make libgio-2.0.la
	depend on gio.def on Windows.


svn path=/trunk/; revision=6721
2008-03-16 09:30:21 +00:00
David Zeuthen
51d7fc9e96 Add g_unix_mount_monitor_set_rate_limit() function (#521946)
2008-03-12  David Zeuthen  <davidz@redhat.com>

	* gio.symbols:
	* gunixmounts.[ch]:
	Add g_unix_mount_monitor_set_rate_limit() function (#521946)



svn path=/trunk/; revision=6711
2008-03-14 11:18:59 +00:00
Alexander Larsson
240ba02786 Avoid redudant tests (#521851) Patch from Josselin Mouette
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
        (guess_mount_type):
	Avoid redudant tests (#521851)
	Patch from Josselin Mouette


svn path=/trunk/; revision=6710
2008-03-14 11:15:49 +00:00
Alexander Larsson
6088f22d26 Fix C89 issue (#521672) Patch from Jens Granseuer
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * gfilemonitor.c:
        (g_file_monitor_is_cancelled):
	Fix C89 issue (#521672)
	Patch from Jens Granseuer


svn path=/trunk/; revision=6708
2008-03-14 11:06:01 +00:00
Alexander Larsson
6fc66109a0 Shut down fam (including removing fam GSource) when module is unloaded
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * fam/fam-helper.[ch]:
        * fam/fam-module.c:
	Shut down fam (including removing fam GSource) when
	module is unloaded (#521513)
	Patch from Joe Marcus Clarke   


svn path=/trunk/; revision=6706
2008-03-14 11:02:42 +00:00
Alexander Larsson
9555a3a2ca Fix up FEN ifdefs
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * giomodule.c:
        (_g_io_modules_ensure_loaded):
	Fix up FEN ifdefs


svn path=/trunk/; revision=6705
2008-03-14 09:45:44 +00:00
Alexander Larsson
7437486b36 Use right define name for f_fstypename member check
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        (g_local_file_query_filesystem_info):
	Use right define name for f_fstypename member check

2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * configure.in:
	Add required includes for f_fstypename member check.
	

svn path=/trunk/; revision=6703
2008-03-14 09:19:09 +00:00
Alexander Larsson
7dc75d707c Added. Added. Added. Added. Added. Added. Added. Added. Added. Added.
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * fen/Makefile.am: Added.
        * fen/fen-data.[ch]: Added.
        * fen/fen-dump.[ch]: Added.
        * fen/fen-helper.[ch]: Added.
        * fen/fen-kernel.[ch]: Added.
        * fen/fen-missing.[ch]: Added.
        * fen/fen-node.[ch]: Added.
        * fen/fen-sub.[ch]: Added.
        * fen/gfendirectorymonitor.[ch]: Added.
        * fen/gfenfilemonitor.[ch]: Added.
        * giomodule.c:
	Added Solaris FEN file notification backend.
	Patch from Lin Ma <Lin.Ma@Sun.COM>


svn path=/trunk/; revision=6702
2008-03-14 08:58:24 +00:00
Tor Lillqvist
b6c74b8739 Actually use the gio.def file when linking the library on Windows. Produce
2008-03-13  Tor Lillqvist  <tml@novell.com>

	* Makefile.am: Actually use the gio.def file when linking the
	library on Windows. Produce .lib library for Microsoft's toolchain
	when possible. Install the .lib and .def file like for the other
	libraries of GLib.


svn path=/trunk/; revision=6700
2008-03-13 17:10:04 +00:00
Tomas Bzatek
15e21178c6 Include live-g-file in standard set of tests, making a temporary directory
2008-03-13  Tomas Bzatek  <tbzatek@redhat.com>

        * tests/live-g-file.c:
        Include live-g-file in standard set of tests, making a temporary
        directory in source structure.

        Clean target directory before the tests (write mode only)


svn path=/trunk/; revision=6699
2008-03-13 16:32:31 +00:00
Tor Lillqvist
367d77233b Expand gio/win32/Makefile.
2008-03-12  Tor Lillqvist  <tml@novell.com>

	* configure.in: Expand gio/win32/Makefile.

2008-03-12  Tor Lillqvist  <tml@novell.com>

	Bug 517419 - gio win32 directory monitor
	Implementation by Vlad Grecescu.
	
	* win32/Makefile.am
	* win32/gwin32directorymonitor.h
	* win32/gwin32directorymonitor.c: New files.

	* giomodule.c: Set up the GWin32DirectoryMonitor plumbing.

	* Makefile.am: Add the win32 subdirectory.


svn path=/trunk/; revision=6698
2008-03-12 19:09:11 +00:00
Tor Lillqvist
1c6676396d Introduce a macro GLocalFileStat that is the normal struct stat on Unix
2008-03-12  Tor Lillqvist  <tml@novell.com>

	* glocalfileinfo.h: Introduce a macro GLocalFileStat that is the
	normal struct stat on Unix but struct _stati64 on Windows to have
	access to 64-bit file size information. Use that instead of struct
	stat in the functions declared here in this private header.

	* glocalfileinfo.c: Corresponding changes. Move some G_OS_WIN32,
	S_ISLNK and HAVE_UTIMES ifdefs and add some more to avoid compiler
	warnings about unused functions and variables. Don't set
	meaningless attributes like inode numbers on Windows.


svn path=/trunk/; revision=6697
2008-03-12 18:33:59 +00:00
Benjamin Otte
f2e20e5b2c trim whitespace so gtk-doc groks the function name
2008-03-12  Benjamin Otte  <otte@gnome.org>

	* gvfs.h:
	trim whitespace so gtk-doc groks the function name


svn path=/trunk/; revision=6695
2008-03-12 16:45:43 +00:00
Tor Lillqvist
5fe2e21960 Implement as empty, returning FALSE, on Win32.
2008-03-12  Tor Lillqvist  <tml@novell.com>

	* glocalfile.c (_g_local_file_has_trash_dir): Implement as empty,
	returning FALSE, on Win32.


svn path=/trunk/; revision=6689
2008-03-12 13:16:54 +00:00
Alexander Larsson
c5a10d2650 Correctly implement can_trash by actually looking for a trash dir, not
2008-03-11  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        * glocalfileinfo.[ch]:
	Correctly implement can_trash by actually
	looking for a trash dir, not just assuming
	one exists.


svn path=/trunk/; revision=6679
2008-03-11 14:48:28 +00:00
Matthias Clasen
7cff233d6e 2.16.1
svn path=/trunk/; revision=6671
2008-03-11 02:18:18 +00:00
Alexander Larsson
fd2e57c644 Fix crashes in new constructor and properties code
2008-03-11  Alexander Larsson  <alexl@redhat.com>

        * gthemedicon.c:
	Fix crashes in new constructor and properties code


svn path=/trunk/; revision=6666
2008-03-11 00:14:11 +00:00
Murray Cumming
1d77c0c7dd Minor spelling correction in documentation: existance -> existence.
2008-03-10  Murray Cumming  <murrayc@murrayc.com>

* gfile.c: Minor spelling correction in documentation:
existance -> existence.

svn path=/trunk/; revision=6663
2008-03-10 19:38:42 +00:00
Matthias Clasen
e2a4ed3287 2.16.0
svn path=/trunk/; revision=6661
2008-03-10 18:09:06 +00:00
Matthias Clasen
497387c5f3 Fix symbol list
svn path=/trunk/; revision=6659
2008-03-10 17:10:37 +00:00
Matthias Clasen
83ba7b5fba Add properties to make bindings happy. (#517676, Samuel Cormier-Iijima)
2008-03-10  Matthias Clasen <mclasen@redhat.com>

        * gthemedicon.c: Add properties to make bindings happy.  (#517676,
        Samuel Cormier-Iijima)


svn path=/trunk/; revision=6655
2008-03-10 16:08:41 +00:00
Tor Lillqvist
93bd705e78 Define FILE_READ_ONLY_VOLUME if it is missing from winnt.h. (#521145)
2008-03-08  Tor Lillqvist  <tml@novell.com>

	* glocalfile.c: Define FILE_READ_ONLY_VOLUME if it is missing from
	winnt.h. (#521145)


svn path=/trunk/; revision=6643
2008-03-08 16:06:00 +00:00
Alexander Larsson
3cacbe8178 Use struct statfs.f_fstypename if availible (e.g. on OpenBSD) Patch from
2008-03-07  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        (g_local_file_query_filesystem_info):
	Use struct statfs.f_fstypename if availible (e.g. on OpenBSD)
	Patch from Jasper Lievisse Adriaanse


svn path=/trunk/; revision=6638
2008-03-07 14:36:15 +00:00
Tor Lillqvist
7332eed6ff Correct milliseconds to microseconds in the doc comments for the *_USEC
2008-03-06  Tor Lillqvist  <tml@novell.com>

	* gfileinfo.h: Correct milliseconds to microseconds in the doc
	comments for the *_USEC attributes.


svn path=/trunk/; revision=6634
2008-03-06 13:10:06 +00:00
Alexander Larsson
79ad411eb5 Add g_return_val_if_fail check (#520700)
2008-03-06  Alexander Larsson  <alexl@redhat.com>

	* gfile.c (g_file_query_exists):
	Add g_return_val_if_fail check (#520700)


svn path=/trunk/; revision=6633
2008-03-06 10:04:24 +00:00
Alexander Larsson
5241d96b21 Fix sparse warnings (#519489)
2008-03-06  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
        * gfilemonitor.c:
        * gthemedicon.c:
        * gunionvolumemonitor.c:
        * gunixmounts.c:
        * tests/g-file.c:
        * tests/live-g-file.c:
        * xdgmime/xdgmimecache.c:
	Fix sparse warnings (#519489)


svn path=/trunk/; revision=6632
2008-03-06 09:53:35 +00:00
Alexander Larsson
602295158f Make cancellation threadsafe (i.e. guarantee its only done once, and
2008-03-05  Alexander Larsson  <alexl@redhat.com>

        * gfilemonitor.c:
	Make cancellation threadsafe (i.e.
	guarantee its only done once, and always
	done)
	
        * glocaldirectorymonitor.c:
	Make sure we the monitor lives while the
	mounts_changed callback is being called (#520484)


svn path=/trunk/; revision=6630
2008-03-05 11:50:27 +00:00
Wouter Bolsterlee
1d1ffab20d Fix typo in parameter documentation.
2008-03-04  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gio/gbufferedinputstream.c: Fix typo in parameter
	documentation.

svn path=/trunk/; revision=6622
2008-03-04 15:21:31 +00:00
Alexander Larsson
cb3a49ca15 Remove deprecated symbols we kept for one release.
2008-03-04  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
	Remove deprecated symbols we kept for one release.

2008-03-04  Alexander Larsson  <alexl@redhat.com>

        * glib/gurifuncs.c:
	Remove deprecated symbols we kept for one release.
	

svn path=/trunk/; revision=6621
2008-03-04 14:51:34 +00:00
Murray Cumming
d9c036f06a Tiny documentation corrections.
2008-03-04  Murray Cumming  <murrayc@murrayc.com>

* ginputstream.c:
* goutputstream.c: Tiny documentation corrections.

svn path=/trunk/; revision=6620
2008-03-04 13:15:57 +00:00
Alexander Larsson
0cb86e3b8f Fix the adopt_orphan_mount vfunc to take a volume_monitor reference in an
2008-03-03  Alexander Larsson  <alexl@redhat.com>

        * gunionvolumemonitor.c:
        * gvolumemonitor.h:
	Fix the adopt_orphan_mount vfunc to take a
	volume_monitor reference in an ABI compat way.
	This change is not API compat, but the added
	arg is not used in the only user of this vfunc, so
	all we get is a harmless warning in gvfs (#520169)


svn path=/trunk/; revision=6618
2008-03-03 21:38:30 +00:00
Benjamin Otte
892a4d5b14 clarify docs for g_file_delete().
2008-03-01  Benjamin Otte  <otte@gnome.org>

	* gfile.c:
	clarify docs for g_file_delete().


svn path=/trunk/; revision=6608
2008-03-01 14:52:03 +00:00
Alexander Larsson
08c743202a Make sure empty files get text/plain type (#518720)
2008-02-29  Alexander Larsson  <alexl@redhat.com>

        * glocalfileinfo.c:
        (get_content_type):
	Make sure empty files get text/plain type (#518720)


svn path=/trunk/; revision=6605
2008-02-29 09:49:08 +00:00
Alexander Larsson
82046b6c97 Fix type warnings
2008-02-27  Alexander Larsson  <alexl@redhat.com>

        * gcontenttype.c:
	Fix type warnings
	
        * gunixvolume.c:
        (g_unix_volume_mount):
	Add missing GMountMountFlags argument


svn path=/trunk/; revision=6599
2008-02-27 11:23:35 +00:00
Alexander Larsson
f0e54fd328 Handle filesystems (like ntfs-3g) that return EEXIST instead of ENOTEMPTY
2008-02-26  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        (g_local_file_delete):
	Handle filesystems (like ntfs-3g) that return EEXIST instead
	of ENOTEMPTY (#518816)


svn path=/trunk/; revision=6598
2008-02-27 11:16:58 +00:00
Matthias Clasen
36de18e662 2.15.6
svn path=/trunk/; revision=6593
2008-02-25 19:32:42 +00:00
Wouter Bolsterlee
8b294f1f9d Fixup translator comments (#518578).
2008-02-25  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gfile.c (g_file_find_enclosing_mount):
	* ginputstream.c (g_input_stream_set_pending):
	* glocalfile.c (g_local_file_find_enclosing_mount):
	* gmount.c (g_mount_unmount), (g_mount_eject), (g_mount_remount):
	* goutputstream.c (g_output_stream_set_pending):

	Fixup translator comments (#518578).

svn path=/trunk/; revision=6591
2008-02-25 14:31:19 +00:00
Wouter Bolsterlee
a9a0498007 Fix a few typos in translator comments and documentation.
2008-02-25  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gfile.c (g_file_find_enclosing_mount):
	* giomodule.c:
	* glocalfile.c (g_local_file_find_enclosing_mount):
	* goutputstream.c:

	Fix a few typos in translator comments and documentation.

svn path=/trunk/; revision=6590
2008-02-25 14:04:38 +00:00
Alexander Larsson
9edb46455c Add translator comments (#518578)
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
        * ginputstream.c:
        * glocalfile.c:
        * gmount.c:
        * goutputstream.c:
	Add translator comments (#518578)


svn path=/trunk/; revision=6589
2008-02-25 13:47:00 +00:00
Alexander Larsson
d8cd546812 Reintroduce g_file_contains_file, keep around for one unstable release
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:	
        Reintroduce g_file_contains_file, keep around for one
	unstable release cycle to avoid crashing to many apps.
	Make sure to delete after release.


svn path=/trunk/; revision=6586
2008-02-25 13:24:56 +00:00
Alexander Larsson
5d1de3eed1 Remove deprecated g_file_contains_file.
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
	Remove deprecated g_file_contains_file.


svn path=/trunk/; revision=6585
2008-02-25 13:19:58 +00:00
Alexander Larsson
ea678ee94c Emit actual change signals in an idle handler. This avoids reentrance and
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gfilemonitor.c:
	Emit actual change signals in an idle handler.
	This avoids reentrance and locking problems in
	the file notification backends.


svn path=/trunk/; revision=6584
2008-02-25 12:34:30 +00:00
Alexander Larsson
4a1cf45793 Remove type guessing, instead just display mounts in /media and in ~/.
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
        (g_unix_mount_guess_should_display):
	Remove type guessing, instead just display
	mounts in /media and in ~/.


svn path=/trunk/; revision=6582
2008-02-25 11:15:06 +00:00
Alexander Larsson
493cbfa607 Make new strings reuse old ones.
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
	Make new strings reuse old ones.


svn path=/trunk/; revision=6581
2008-02-25 09:11:09 +00:00
Alexander Larsson
1d568f35d1 Implement trashing and filesystem::readonly for win32 (#517235) Patch from
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
	Implement trashing and filesystem::readonly for win32 (#517235)
	Patch from Yevgen Muntyan


svn path=/trunk/; revision=6578
2008-02-25 08:15:35 +00:00
Matthias Clasen
cd2bfb722e Add new symbols
svn path=/trunk/; revision=6565
2008-02-23 06:34:41 +00:00
Matthias Clasen
f8336c3fa8 Small doc fix
svn path=/trunk/; revision=6560
2008-02-23 05:05:39 +00:00
Alexander Larsson
5f6ccf9a3f Look at old-style gnome mime icon names too, as many have not moved to the
2008-02-22  Alexander Larsson  <alexl@redhat.com>

	* gcontenttype.c (g_content_type_get_icon):
	Look at old-style gnome mime icon names too, as many
	have not moved to the new style.


svn path=/trunk/; revision=6557
2008-02-22 14:56:50 +00:00
Matthias Clasen
f3144c7efe Doc fixes
svn path=/trunk/; revision=6554
2008-02-21 18:20:17 +00:00
David Zeuthen
bfda430eff Implement this function by moving bits from glocalfileinfo.c
2008-02-21  David Zeuthen  <davidz@redhat.com>

	* glocalfileinfo.c: (_g_local_file_info_get):
	* gcontenttype.c:
	(g_content_type_get_icon): Implement this function by
	moving bits from glocalfileinfo.c
	(g_content_type_get_description): Unalias before getting
	description (#517687)

	* gfile.c: (g_file_class_init),
	(g_file_query_filesystem_info_async),
	(g_file_query_filesystem_info_finish),
	(query_filesystem_info_data_free),
	(query_filesystem_info_async_thread),
	(g_file_real_query_filesystem_info_async),
	(g_file_real_query_filesystem_info_finish):
	* gfile.h: Implement async version of
	g_file_query_filesystem_info()

	* gfileinfo.h: Add new attributes for filesystem::use-preview

	* gio.symbols: Update

	* gthemedicon.c: (g_themed_icon_append_name):
	* gthemedicon.h: Add new new convenience function.

	* gunionvolumemonitor.c: (g_union_volume_monitor_dispose),
	(get_mounts), (get_volumes), (get_connected_drives),
	(get_volume_for_uuid), (get_mount_for_uuid),
	(g_union_volume_monitor_init), (populate_union_monitor),
	(g_volume_monitor_get), (_g_mount_get_for_mount_path),
	(g_volume_monitor_adopt_orphan_mount):
	* gvolumemonitor.c:
	* gvolumemonitor.h: Use recursive locks so it's safe for volume
	monitor implementations to call into the main volume monitor. Also
	separate object initialization and volume monitor initialization
	such that non-native volume monitors can properly adopt their
	mounts away.


svn path=/trunk/; revision=6550
2008-02-21 12:35:05 +00:00
Alexander Larsson
bed0b36546 Fix doc typo
2008-02-21  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
	Fix doc typo


svn path=/trunk/; revision=6549
2008-02-21 11:44:48 +00:00
Alexander Larsson
db2615807c Fix doc typo
2008-02-21  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
	Fix doc typo


svn path=/trunk/; revision=6548
2008-02-21 11:43:55 +00:00
Alexander Larsson
4fb597e5f9 Add more documentation about how GFiles work (from #517086)
2008-02-21  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
	Add more documentation about how GFiles work (from #517086)


svn path=/trunk/; revision=6547
2008-02-21 10:21:11 +00:00
Alexander Larsson
6dc9b7ee00 Add new g_file_has_prefix that does the same as g_file_contains_file.
2008-02-21  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gio.symbols:
	Add new g_file_has_prefix that does the same as g_file_contains_file.
	Deprecate g_file_contains_file and add a macro that converts
	it to g_file_has_prefix.
	The reason for this change is that the contains_file() name seems to
	imply that this does more work than what it does, but its really only
	a name match (from #517086)
	
        * gdummyfile.c:
        * glocalfile.c:
        * tests/g-file.c:
	Update to match the above change.


svn path=/trunk/; revision=6546
2008-02-21 09:09:59 +00:00
Benjamin Otte
03c51e95a7 even more cases of not returning in error path
2008-02-20  Benjamin Otte  <otte@gnome.org>

	* gfile.c: (g_file_mount_mountable), (g_file_unmount_mountable),
	(g_file_eject_mountable):
	even more cases of not returning in error path


svn path=/trunk/; revision=6545
2008-02-20 18:52:10 +00:00
Benjamin Otte
ea6cf346d6 return from function in error path.
2008-02-20  Benjamin Otte  <otte@gnome.org>

        * gfile.c: (g_file_mount_mountable):
	return from function in error path.

svn path=/trunk/; revision=6544
2008-02-20 18:45:18 +00:00
Sylvain Pasche
add0a2f496 Remove trailing coma in GMountMountFlags struct
2008-02-18  Sylvain Pasche <sylvain.pasche@gmail.com>

        * gfile.h:
	 Remove trailing coma in GMountMountFlags struct


svn path=/trunk/; revision=6536
2008-02-19 08:49:16 +00:00
Alexander Larsson
3b1b6a9722 Use g_unlink/g_rename instead of unlink/rename; do not pass raw filenames
2008-02-18  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        * glocalfileinfo.c:
        * glocalfileoutputstream.c:
	Use g_unlink/g_rename instead of unlink/rename;
	do not pass raw filenames to g_set_error. (#517239)
	Patch from Yevgen Muntyan.


svn path=/trunk/; revision=6533
2008-02-18 15:35:16 +00:00
Alexander Larsson
b221d1b36d Open files with O_BINARY on windows. (#517140)
2008-02-18  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        * glocalfileoutputstream.c:
	Open files with O_BINARY on windows. (#517140)


svn path=/trunk/; revision=6531
2008-02-18 10:10:58 +00:00
Alexander Larsson
66ca14e807 Correctly check for HAVE_FCHMOD and HAVE_FCHOWN
2008-02-14  Alexander Larsson  <alexl@redhat.com>

        * glocalfileoutputstream.c:
	Correctly check for HAVE_FCHMOD and HAVE_FCHOWN



svn path=/trunk/; revision=6518
2008-02-14 16:47:56 +00:00
Alexander Larsson
8a9c5b6d3c Copy permissions with file on copy (#514084) This is what cp does and
2008-02-14  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
	Copy permissions with file on copy (#514084)
	This is what cp does and makes sure e.g. the
	exec permissions are kept.
	Its kinda weird in that it keeps the permission bits
	the same while the uid and gid are different. However
	the new uid is the user so its not a security issue,
	and I've heard no complaints about cp on this issue.



svn path=/trunk/; revision=6514
2008-02-14 11:00:09 +00:00
Ryan Lortie
8cb3db68f0 add G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
2008-02-13  Ryan Lortie  <desrt@desrt.ca>

        * docs/reference/gio/gio-sections.txt: add
        G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT

2008-02-13  Ryan Lortie  <desrt@desrt.ca>

        * gfileinfo.h: add G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT


svn path=/trunk/; revision=6511
2008-02-13 20:27:18 +00:00
Alexander Larsson
ab7e80d366 Define IN_ONLYDIR if not in header (#515346)
2008-02-13  Alexander Larsson  <alexl@redhat.com>

	* inotify/inotify-path.c:
	Define IN_ONLYDIR if not in header (#515346)



svn path=/trunk/; revision=6510
2008-02-13 13:33:57 +00:00
Alexander Larsson
767e18bf82 C89 fixes (#515892)
2008-02-12  Alexander Larsson  <alexl@redhat.com>

        * tests/live-g-file.c:
	C89 fixes (#515892)



svn path=/trunk/; revision=6506
2008-02-12 10:06:01 +00:00
Matthias Clasen
69cb5eda41 2.15.5
svn path=/trunk/; revision=6503
2008-02-11 22:30:35 +00:00
Matthias Clasen
ee263a1ba6 Add g_mount_mount_flags_get_type
svn path=/trunk/; revision=6501
2008-02-11 18:31:43 +00:00
Alexander Larsson
be85960df7 Correctly handle NULL GAttributeMatcher meaning matches nothing. (Fixes
2008-02-11  Alexander Larsson  <alexl@redhat.com>

        * gfileinfo.c:
        (g_file_info_set_attribute_mask):
        (g_file_attribute_matcher_matches_id):
	Correctly handle NULL GAttributeMatcher meaning
	matches nothing. (Fixes #513492)


svn path=/trunk/; revision=6498
2008-02-11 12:21:49 +00:00
Alexander Larsson
e3fdcd1fa7 Added GMountMountFlags enum and added a flags argument to all mount calls.
2008-02-11  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gmount.[ch]:
        * gvolume.[ch]:
	Added GMountMountFlags enum and added a flags
	argument to all mount calls.
	
	This is an API/ABI change for future extensibility,
	as I think we will need at least an
	inhibit-autorun flag (the panel needs this).
	There are no flags defined yet though.


svn path=/trunk/; revision=6497
2008-02-11 11:12:36 +00:00
Alexander Larsson
52e49aee35 Added new standard::description attribute. Requested by Vincent, and
2008-02-11  Alexander Larsson  <alexl@redhat.com>

	* gfileinfo.h:
	Added new standard::description attribute.
	Requested by Vincent, and useful for both
	panel and nautilus


svn path=/trunk/; revision=6496
2008-02-11 10:41:00 +00:00
Alexander Larsson
d07d500f0a Minor docs cleanup
2008-02-11  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
	Minor docs cleanup


svn path=/trunk/; revision=6495
2008-02-11 08:47:17 +00:00
Matthias Clasen
c8f43a1bb6 Add more docs
svn path=/trunk/; revision=6493
2008-02-11 07:17:48 +00:00
Matthias Clasen
826d8c5b41 Documentation additions
svn path=/trunk/; revision=6492
2008-02-11 07:12:56 +00:00
Matthias Clasen
0766a1ec39 Consistently use getmntent_r() and fall back to getmntent(). (#515492)
2008-02-09  Matthias Clasen <mclasen@redhat.com>

        * gunixmounts.c: Consistently use getmntent_r() and fall
        back to getmntent().  (#515492)



svn path=/trunk/; revision=6490
2008-02-10 05:20:00 +00:00
Matthias Clasen
8ad07dcf1c Fix a mismerge
svn path=/trunk/; revision=6489
2008-02-10 04:54:25 +00:00
Matthias Clasen
da0e7e81c1 /bin/ksh can't handle a for-loop with no arguments, so add a "." for when
2008-02-09  Matthias Clasen <mclasen@redhat.com>

        * Makefile.decl: /bin/ksh can't handle a for-loop with no
        arguments, so add a "." for when $(SUBDIRS) is empty.

        * glib/tests/option-context.c:
        * glib/tests/testing.c:
        * gthread/gthread-posix.c:
        * tets/testingbase64.c:
        * glib/gtester.c:
        * glib/gsequence.c: Portability fixes.  (#515154)



svn path=/trunk/; revision=6487
2008-02-10 04:41:25 +00:00
Alexander Larsson
61411a5fc2 Add g_volume_should_automount. Docs needed.
2008-02-08  Alexander Larsson  <alexl@redhat.com>

	* gio.symbols: 
        * gunixvolume.c:
        * gvolume.[ch]:
        Add g_volume_should_automount.
	Docs needed.


svn path=/trunk/; revision=6484
2008-02-08 16:12:55 +00:00
Tor Lillqvist
7077781cc3 live-g-file won't build on Windows, too Unix-specific.
2008-02-07  Tor Lillqvist  <tml@novell.com>

	* tests/Makefile.am (TEST_PROGS): live-g-file won't build on
	Windows, too Unix-specific.


svn path=/trunk/; revision=6478
2008-02-07 09:56:25 +00:00
Behdad Esfahbod
1096caf5ef Skip g_bit_*(). Inline functions may end up with a local plt if the
2008-02-06  Behdad Esfahbod  <behdad@gnome.org>

        * pltcheck.sh: Skip g_bit_*().  Inline functions may end up with
        a local plt if the compiler doesn't support what we want.  Bug #514702


svn path=/trunk/; revision=6469
2008-02-06 17:36:06 +00:00
Murray Cumming
0d7b605f06 Fixed some minor typos in documentation.
2008-02-06  Murray Cumming  <murrayc@murrayc.com>

* glib/gconvert.c:
* glib/pcre/pcre_internal.h: Fixed some minor typos in documentation.

svn path=/trunk/; revision=6467
2008-02-06 16:02:20 +00:00
Christian Persch
37ac644bd1 Save errno before calling other funcs that potentially alter it. Bug
* gio/gdesktopappinfo.c: (ensure_dir):
	* gio/glocalfile.c: (g_local_file_query_filesystem_info),
	(g_local_file_read), (g_local_file_delete), (g_local_file_trash),
	(g_local_file_move):
	* gio/glocalfileinfo.c: (set_xattr), (_g_local_file_info_get),
	(_g_local_file_info_get_from_fd), (set_unix_mode),
	(set_unix_uid_gid), (set_symlink), (set_mtime_atime):
	* gio/glocalfileinputstream.c: (g_local_file_input_stream_read),
	(g_local_file_input_stream_skip),
	(g_local_file_input_stream_close),
	(g_local_file_input_stream_seek):
	* gio/glocalfileoutputstream.c:
	(g_local_file_output_stream_write),
	(g_local_file_output_stream_close),
	(g_local_file_output_stream_seek),
	(g_local_file_output_stream_truncate), (copy_file_data),
	(handle_overwrite_open):
	* gio/gunixinputstream.c: (g_unix_input_stream_read),
	(g_unix_input_stream_close), (read_async_cb), (close_async_cb):
	* gio/gunixoutputstream.c: (g_unix_output_stream_write),
	(g_unix_output_stream_close), (write_async_cb), (close_async_cb):
	Save
	errno before calling other funcs that potentially alter it. Bug
	#514766.

svn path=/trunk/; revision=6466
2008-02-06 15:10:08 +00:00
Tomas Bzatek
d87c1c0af4 New GIO testing module working over real data
2008-02-06  Tomas Bzatek  <tbzatek@redhat.com> 

        * tests/Makefile.am:
        * tests/live-g-file.c: 
        * tests/live-g-file.txt:
        New GIO testing module working over real data


svn path=/trunk/; revision=6465
2008-02-06 13:52:07 +00:00
Tomas Bzatek
c907c2832e Fallback to rename() if link() is not available (when no support on target
2008-02-06  Tomas Bzatek  <tbzatek@redhat.com> 

        * glocalfileoutputstream.c (g_local_file_output_stream_close):
        Fallback to rename() if link() is not available
        (when no support on target filesystem)


svn path=/trunk/; revision=6464
2008-02-06 13:45:26 +00:00
Michael Natterer
2b02891ef7 replace "icon && G_IS_ICON (icon)" by simply "G_IS_ICON (icon)".
2008-02-06  Michael Natterer  <mitch@imendio.com>

	* gfileinfo.c (g_file_info_get_icon): replace
	"icon && G_IS_ICON (icon)" by simply "G_IS_ICON (icon)".


svn path=/trunk/; revision=6463
2008-02-06 13:22:57 +00:00
Tomas Bzatek
4e9a5de905 Documentation update of error codes
2008-02-06  Tomas Bzatek  <tbzatek@redhat.com>

        * gfile.c (g_file_create):
        Documentation update of error codes


svn path=/trunk/; revision=6462
2008-02-06 12:59:49 +00:00
Alexander Larsson
b4a7d48aad Update to use both mimeapps.list and defaults.list as discussed on xdg
2008-02-06  Alexander Larsson  <alexl@redhat.com>

	* gdesktopappinfo.c:
	Update to use both mimeapps.list and
	defaults.list as discussed on xdg list.



svn path=/trunk/; revision=6461
2008-02-06 10:57:27 +00:00
Benjamin Otte
f428a1b44a Fix some typos in the documentation.
2008-02-06  Benjamin Otte  <otte@gnome.org>

        * gasyncresult.c:
	* gfilenamecompleter.c:
	Fix some typos in the documentation.

svn path=/trunk/; revision=6460
2008-02-06 10:26:53 +00:00
Alexander Larsson
2185733235 Don't succeed with trash if newly created trash dir has the wrong owner.
2008-02-06  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c (g_local_file_trash):
	Don't succeed with trash if newly created
	trash dir has the wrong owner. (#514696)


svn path=/trunk/; revision=6459
2008-02-06 10:06:54 +00:00
Alexander Larsson
c6af0efb11 Don't spew warnings when destination is not a GLocalFile.
2008-02-05  Alexander Larsson  <alexl@redhat.com>

	* glocalfile.c (g_local_file_move):
	Don't spew warnings when destination is not
	a GLocalFile.


svn path=/trunk/; revision=6451
2008-02-05 10:11:12 +00:00
Jonathon Jongsma
2be52dd9c3 modify the new_sized() constructor to take a gsize param instead of guint
2008-02-02  Jonathon Jongsma  <jjongsma@gnome.org>

	* gio/gbufferedoutputstream.c:
	* gio/gbufferedoutputstream.h: modify the new_sized() constructor to take a
	gsize param instead of guint to match the GBufferedInputStream constructor.



svn path=/trunk/; revision=6448
2008-02-04 10:04:40 +00:00
Hans Breuer
01072d0c45 update
2008-02-03  Hans Breuer  <hans@breuer.org>

	* makefile.msc : update


svn path=/trunk/; revision=6444
2008-02-03 22:40:29 +00:00
Michael Natterer
573a73f391 assign the return value of xdg_mime_list_mime_parents() to a variable of
2008-02-01  Michael Natterer  <mitch@imendio.com>

	* gcontenttype.c (_g_unix_content_type_get_parents): assign the
	return value of xdg_mime_list_mime_parents() to a variable of the
	correct type.


svn path=/trunk/; revision=6441
2008-02-01 13:17:04 +00:00
Alexander Larsson
a7749bab36 Actually call the launch_uris method, not launch.
2008-02-01  Alexander Larsson  <alexl@redhat.com>

	* gappinfo.c (g_app_info_launch_uris):
	Actually call the launch_uris method, not
	launch.

2008-02-01  Alexander Larsson  <alexl@redhat.com>

	* gdesktopappinfo.c (g_desktop_app_info_equal):
	Ensure appinfos with no id but same pointer value
	compare equal



svn path=/trunk/; revision=6440
2008-02-01 12:02:52 +00:00
Alexander Larsson
d9b8be3b5c Don't leak appinfo.
2008-02-01  Alexander Larsson  <alexl@redhat.com>

	* gappinfo.c (g_app_info_launch_default_for_uri): 
	Don't leak appinfo.


svn path=/trunk/; revision=6439
2008-02-01 11:42:25 +00:00
Alexander Larsson
feb28ce3a7 Oops, fix last commit.
svn path=/trunk/; revision=6438
2008-02-01 11:30:37 +00:00
Alexander Larsson
a00c11f08a Add g_app_info_launch_default_for_uri utility function. (#513256)
2008-02-01  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.[ch]:
        * gio.symbols:
        Add g_app_info_launch_default_for_uri utility
	function. (#513256)


svn path=/trunk/; revision=6437
2008-02-01 11:21:37 +00:00
Cosimo Cecchi
cebfe57343 Doc fix for g_app_info_get_default_for_uri_scheme () Bug #513483.
2008-02-01  Cosimo Cecchi  <cosimoc@svn.gnome.org>

	* gdesktopappinfo.c:
	Doc fix for g_app_info_get_default_for_uri_scheme ()
	Bug #513483.

svn path=/trunk/; revision=6436
2008-02-01 11:21:01 +00:00
Alexander Larsson
692e9086b4 Add doc comment about uris vs GFiles to g_app_info_launch()
2008-01-30  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.c:
	Add doc comment about uris vs GFiles to
	g_app_info_launch()
	
        * gdesktopappinfo.c:
	Ensure uris passed to g_app_info_launch_uris()
	are not roundtriped through GFile (as that
	may be slightly destructive for e.g. mailto: links)



svn path=/trunk/; revision=6424
2008-01-30 11:27:02 +00:00
Alexander Larsson
fc93e63edd C89 fixes from Jens Granseuer (#512849)
2008-01-30  Alexander Larsson  <alexl@redhat.com>

        * tests/data-input-stream.c:
        * tests/data-output-stream.c:
	C89 fixes from Jens Granseuer (#512849)



svn path=/trunk/; revision=6423
2008-01-30 09:28:10 +00:00
Alexander Larsson
0234965965 Fix gamin/fam difference build issue. (#509419)
2008-01-30  Alexander Larsson  <alexl@redhat.com>

	* fam/fam-helper.c:
	Fix gamin/fam difference build issue. (#509419)


svn path=/trunk/; revision=6422
2008-01-30 09:14:58 +00:00
Alexander Larsson
6ff29c1dea Add G_APP_INFO_CREATE_SUPPORTS_URIS flag
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.h:
        * gdesktopappinfo.c:
	Add G_APP_INFO_CREATE_SUPPORTS_URIS flag


svn path=/trunk/; revision=6418
2008-01-29 15:47:27 +00:00
Alexander Larsson
e61e022333 giomodule-priv.h include moved to .c file.
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
        * gdesktopappinfo.h:
	giomodule-priv.h include moved to .c file.



svn path=/trunk/; revision=6416
2008-01-29 15:11:54 +00:00
Alexander Larsson
a0283fa682 Remove unused prio/name fields.
2008-01-29  Alexander Larsson  <alexl@redhat.com>

	* gnativevolumemonitor.h (struct _GNativeVolumeMonitorClass):
	Remove unused prio/name fields.


svn path=/trunk/; revision=6415
2008-01-29 15:04:50 +00:00
Alexander Larsson
1efe9d9cd1 Don't treat whitespace as control chars.
2008-01-29  Alexander Larsson  <alexl@redhat.com>

	* gcontenttype.c (looks_like_text):
	Don't treat whitespace as control chars.


svn path=/trunk/; revision=6414
2008-01-29 14:19:46 +00:00
Alexander Larsson
3b78d8000b Lazily create the desktop files for appinfos created by
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
	Lazily create the desktop files for appinfos created
	by g_app_info_create_from_commandline() when needed
	for mime associations. This allows run-time use
	of GAppInfo object without creating unnecessary
	files on disk.


svn path=/trunk/; revision=6412
2008-01-29 14:07:07 +00:00
Alexander Larsson
07d7c59931 Added new symbols to gio.symbols
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
	Added new symbols to gio.symbols



svn path=/trunk/; revision=6411
2008-01-29 12:27:45 +00:00
Alexander Larsson
75d6d024cd Add docs
svn path=/trunk/; revision=6410
2008-01-29 12:23:24 +00:00
Alexander Larsson
431fef8617 Add g_file_query_default_handler utility to easily look up the GAppInfo
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        Add g_file_query_default_handler utility to easily look up
	the GAppInfo that handles a file.
	
        * gdesktopappinfo.[ch]:
        * giomodule.c:
	Set up an extension point for g_app_info_get_default_for_uri_scheme()
	
        * gvfs.c:
	Remove unused function



svn path=/trunk/; revision=6409
2008-01-29 12:18:48 +00:00
Alexander Larsson
1b0fce2dca Mention need to free returned value in g_file_enumerator_next_files_finish
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gfileenumerator.c:
        Mention need to free returned value in
	g_file_enumerator_next_files_finish docs.
	Fix leak if g_file_enumerator_next_files_finish()
	not called.



svn path=/trunk/; revision=6408
2008-01-29 10:35:38 +00:00
Alexander Larsson
e064f28435 Use list_parents, not get_parents from xdgmime, because the later doesn't
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gcontenttype.c:
        (_g_unix_content_type_get_parents):
	Use list_parents, not get_parents from xdgmime, because
	the later doesn't use the cache.
	
        * xdgmime/xdgmimecache.c:
        (_xdg_mime_cache_list_mime_parents):
	Don't list the same type as parent multiple times.


svn path=/trunk/; revision=6407
2008-01-29 10:20:49 +00:00
Matthias Clasen
fb5ddf6ecf 2.15.4
svn path=/trunk/; revision=6402
2008-01-29 00:00:31 +00:00
Alexander Larsson
7b432e9497 Register local vfs with prio 0.
2008-01-28  Alexander Larsson  <alexl@redhat.com>

        * glocalvfs.c:
	Register local vfs with prio 0.
	
        * gvfs.h:
	Remove old name and prio class members


svn path=/trunk/; revision=6401
2008-01-28 21:06:10 +00:00
Matthias Clasen
8cb30318e5 Disable some tests
svn path=/trunk/; revision=6400
2008-01-28 19:46:18 +00:00
Alexander Larsson
bff9ecedbb Add registration hooks for extension points. Register the gio extension
2008-01-28  Alexander Larsson  <alexl@redhat.com>

        * giomodule.[ch]:
        * gio.symbols:
	Add registration hooks for extension points.
	Register the gio extension points.
	
        * fam/gfamdirectorymonitor.c:
        * fam/gfamfilemonitor.c:
        * glocaldirectorymonitor.[ch]:
        * glocalfilemonitor.[ch]:
        * gnativevolumemonitor.h:
        * gunionvolumemonitor.c:
        * gunixvolumemonitor.c:
        * gvfs.[ch]:
        * gvolumemonitor.h:
        * inotify/ginotifydirectorymonitor.c:
        * inotify/ginotifyfilemonitor.c:
	Use the extension points registration instead
	of g_type_children().


svn path=/trunk/; revision=6399
2008-01-28 19:43:10 +00:00
Matthias Clasen
fce0485e2b Document new api
svn path=/trunk/; revision=6398
2008-01-28 17:26:45 +00:00
Matthias Clasen
e2ba37ceb3 Document new api
svn path=/trunk/; revision=6397
2008-01-28 17:21:34 +00:00
Matthias Clasen
76b565e8bd Fix docs
svn path=/trunk/; revision=6396
2008-01-28 17:09:26 +00:00
Matthias Clasen
7bfc60de2e Deprecate G_GNUC_(PRETTY)_FUNCTION.
2008-01-27  Matthias Clasen  <mclasen@redhat.com>

        * glib/gmacros.h: Deprecate G_GNUC_(PRETTY)_FUNCTION.



svn path=/trunk/; revision=6389
2008-01-27 23:42:33 +00:00
Matthias Clasen
c923700b3d Avoid trivial differences in translatable strings
svn path=/trunk/; revision=6386
2008-01-27 21:58:53 +00:00
Murray Cumming
7b4933fe02 Document that the new_etags output gchar* should be freed.
2008-01-27  Murray Cumming  <murrayc@murrayc.com>

* gio/gfile.c: (g_file_replace_contents),
(g_file_replace_contents_finish): Document that the new_etags output 
gchar* should be freed.

svn path=/trunk/; revision=6383
2008-01-27 07:25:29 +00:00
Matthias Clasen
d7a1dddbc7 Make this build with gcc 3.4 (#509419)
2008-01-25  Matthias Clasen  <mclasen@redhat.com>

        * fam/fam-helper.c (fam_event_to_file_monitor_event): Make this
        build with gcc 3.4  (#509419)



svn path=/trunk/; revision=6378
2008-01-25 17:50:49 +00:00
Matthias Clasen
1f331ffde8 Doc updates
svn path=/trunk/; revision=6376
2008-01-25 17:38:04 +00:00
Matthias Clasen
8228f7f94b Make GIOSchedulerJobFunc return boolean Keep calling io jobs until they
2008-01-25  Matthias Clasen  <mclasen@redhat.com>

        * gioscheduler.h: Make GIOSchedulerJobFunc return boolean
        * gioscheduler.c: Keep calling io jobs until they return FALSE;
        this allows big jobs to be executed in chunks, instead of blocking
        the main loop for a long time.

        * gsimpleasyncresult.c:
        * giofile.c: Adapt callers.

svn path=/trunk/; revision=6375
2008-01-25 14:40:54 +00:00
Alexander Larsson
06d957d95d Implement changes discussed on xdg list. Now we can add supported
2008-01-25  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
	Implement changes discussed on xdg list.
	Now we can add supported mimetypes by just using defaults.list
	We can also remove associations in defaults.list.


svn path=/trunk/; revision=6374
2008-01-25 12:06:14 +00:00
Alexander Larsson
331d373e9a Don't make local copy of desktop file for mimetype changes if the file
2008-01-25  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
	Don't make local copy of desktop file
	for mimetype changes if the file already
	supports the new mimetype.


svn path=/trunk/; revision=6372
2008-01-25 09:46:31 +00:00
Matthias Clasen
af7645a498 String fixes
svn path=/trunk/; revision=6370
2008-01-25 06:10:29 +00:00
Matthias Clasen
12a26c75a9 Expand docs
svn path=/trunk/; revision=6366
2008-01-25 01:44:08 +00:00
Alexander Larsson
753428dcf8 Add g_drive_get_identifier and g_drive_enumerate_identifiers
2008-01-24  Alexander Larsson  <alexl@redhat.com>

        * gdrive.[ch]:
	Add g_drive_get_identifier and
        g_drive_enumerate_identifiers

        * gvolume.[ch]:
        Add g_volume_get_identifier and
        g_volume_enumerate_identifiers
	
        * gio.symbols:
	Add symbols
	
        * gunixvolume.c:
	Implement identifiers for unix backend


svn path=/trunk/; revision=6364
2008-01-24 16:06:33 +00:00
Alexander Larsson
270df8d3c8 Add g_file_copy_async() (#511580) Based on patch from Carlos Garcia Campos
2008-01-24  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gfile.h:
        * gio.symbols:
	Add g_file_copy_async() (#511580)
	Based on patch from Carlos Garcia Campos


svn path=/trunk/; revision=6363
2008-01-24 11:04:05 +00:00
Matthias Clasen
3bb0a17bd5 Some doc additions
svn path=/trunk/; revision=6358
2008-01-23 05:46:43 +00:00
Alexander Larsson
61014f7e13 Don't leak basename.
2008-01-22  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
	(g_desktop_app_info_new):
	Don't leak basename.


svn path=/trunk/; revision=6356
2008-01-22 16:16:32 +00:00
Alexander Larsson
aa88b00475 Don't leak GKeyFile
2008-01-22  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
        (g_desktop_app_info_new_from_filename):
	Don't leak GKeyFile



svn path=/trunk/; revision=6355
2008-01-22 14:15:51 +00:00
Alexander Larsson
10cd55875a Fix leak of uri
2008-01-22  Alexander Larsson  <alexl@redhat.com>

	* glocalfileinfo.c (get_thumbnail_attributes):
	Fix leak of uri


svn path=/trunk/; revision=6354
2008-01-22 13:24:48 +00:00
Alexander Larsson
2544ae3cd6 Canonicalize paths that start with more than two slashes.
2008-01-22  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        (canonicalize_filename):
	Canonicalize paths that start with more than
	two slashes.
	
        * tests/g-file.c:
        (compare_two_files):
        (test_g_file_new_for_path):
	Test the above



svn path=/trunk/; revision=6353
2008-01-22 09:38:37 +00:00
Alexander Larsson
db5224fa85 Fix c++ comment
svn path=/trunk/; revision=6352
2008-01-22 09:19:58 +00:00
Alexander Larsson
b784923e9c Allow UTF-8 in file:// parse names.
2008-01-22  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
	Allow UTF-8 in file:// parse names.
	
        * tests/Makefile.am:
        * tests/data-input-stream.c:
        * tests/data-output-stream.c:
        * tests/g-file-info.c:
        * tests/g-file.c:
	Added a bunch of tests from Tomas Bzatek


svn path=/trunk/; revision=6351
2008-01-22 09:13:28 +00:00
Matthias Clasen
1b8bad5973 2.15.3
svn path=/trunk/; revision=6347
2008-01-21 18:07:13 +00:00
Alexander Larsson
eb4a1640a2 Remove duplicated GSeekable functions. (#509990) Just use the
2008-01-21  Alexander Larsson  <alexl@redhat.com>

        * gfileinputstream.[ch]:
        * gfileoutputstream.[ch]:
        * gio.symbols:
	Remove duplicated GSeekable functions. (#509990)
	Just use the g_seekable_xxx() calls instead.



svn path=/trunk/; revision=6342
2008-01-21 15:11:56 +00:00
Matthias Clasen
54300dde6d Whitespace cleanups.
2008-01-21  Matthias Clasen  <mclasen@redhat.com>

        * glocal*.c:
        * gvolumemanager.c: Whitespace cleanups.

        * glocalfileoutputsteam.c (_g_local_file_output_stream_create):
        Use the right mode when creating the file.



svn path=/trunk/; revision=6341
2008-01-21 14:02:19 +00:00
Murray Cumming
6aaab07e0f Documentation: Fixed minor typos and added more mentions of specific
2008-01-21  Murray Cumming,,,  <murrayc@murrayc.com>

* gfileenumerator.c:
* gfileinputstream.c:
* ginputstream.c:
* goutputstream.c: Documentation: Fixed minor typos 
and added more mentions of specific _finish() functions.

svn path=/trunk/; revision=6339
2008-01-21 13:08:23 +00:00
Alexander Larsson
d8473705b0 Removed. Removed. Removed the included copies of the inotify headers. We
2008-01-21  Alexander Larsson  <alexl@redhat.com>

        * inotify/Makefile.am:
        * inotify/inotify-helper.c:
        * inotify/inotify-kernel.c:
        * inotify/inotify-path.c:
        * inotify/local_inotify.h: Removed.
        * inotify/local_inotify_syscalls.h: Removed.
	Removed the included copies of the inotify
	headers. We now only use the <sys/inotify.h>
	header which exists on modern systems.
	This fixes problems on ARM and SH5 (#510448)
	but is also generally much cleaner and future
	safe. For instance, if other OSes add support
	for inotify it should "just work".



svn path=/trunk/; revision=6338
2008-01-21 10:35:44 +00:00
Matthias Clasen
a043325ec1 Coding style fixes
svn path=/trunk/; revision=6337
2008-01-21 05:12:16 +00:00
Matthias Clasen
d16037e0e7 Documentation updates
svn path=/trunk/; revision=6336
2008-01-21 03:49:20 +00:00
Murray Cumming
88266aae90 documentation: Fixed more minor typos.
2008-01-20  Murray Cumming  <murrayc@murrayc.com>

* gfile.c: documentation: Fixed more minor 
typos.

svn path=/trunk/; revision=6335
2008-01-20 17:42:35 +00:00
Murray Cumming
225501c71a documentation: Mention g_mount_remount_finish() instead of
2008-01-18  Murray Cumming  <murrayc@murrayc.com>

* gmount.c: (g_mount_remount): documentation: 
Mention g_mount_remount_finish() instead of 
g_mount_unmount_finish().

svn path=/trunk/; revision=6334
2008-01-18 18:16:28 +00:00
Murray Cumming
0108d39d02 Fixed some minor typos in the documentation.
2008-01-18  Murray Cumming  <murrayc@murrayc.com>

* gappinfo.c:
* gcancellable.c:
* gfile.c: Fixed some minor typos in the 
documentation. 

svn path=/trunk/; revision=6331
2008-01-18 09:41:09 +00:00
Murray Cumming
acf029139d Documentation: Clarify the ownership of the regurn GLists.
2008-01-18  Murray Cumming  <murrayc@murrayc.com>

* gio/gvolumemonitor.c: 
(g_volume_monitor_get_connected_drives): 
(g_volume_monitor_get_volumes): 
(g_volume_monitor_get_mounts): Documentation: 
Clarify the ownership of the regurn GLists.

svn path=/trunk/; revision=6330
2008-01-17 23:43:31 +00:00
Alexander Larsson
359339fe25 Add the async find_enclosing_mount version to the header file too.
2008-01-17  Alexander Larsson  <alexl@redhat.com>

        * gfile.h:
	Add the async find_enclosing_mount version
	to the header file too.



svn path=/trunk/; revision=6326
2008-01-17 14:30:07 +00:00
Alexander Larsson
35cf559e3d Add async version of find_enclosing_mount with default implementation.
2008-01-17  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
	Add async version of find_enclosing_mount
	with default implementation.



svn path=/trunk/; revision=6325
2008-01-17 14:22:13 +00:00
Alexander Larsson
0026537f37 Allow calls to implementation of copy and write even if the type of the
2008-01-17  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
        (g_file_copy):
        (g_file_move):
	Allow calls to implementation of copy and write
	even if the type of the file implementations is
	different. This can be used to implement native
	upload and download calls in a vfs.
	
        * glocalfile.c:
        (g_local_file_move):
	Protect against the case where move is called
	with one file not being local.
	
	Make sure we call the progress callback once
	in the native move operation so that the caller
	knows how many bytes were copied.


svn path=/trunk/; revision=6324
2008-01-17 10:57:48 +00:00
Murray Cumming
f0749cc896 Corrected some typos in the documentation: occured -> occurred. its ->
2008-01-16  Murray Cumming  <murrayc@murrayc.com>

* gappinfo.c:
* gdatainputstream.c:
* gfile.c:
* gfileoutputstream.c:
* ginputstream.c:
* gmount.c:
* goutputstream.c:
* gseekable.c:
* gunixmounts.c: Corrected some typos in the documentation:
occured -> occurred.
its -> it's (where appropriate).

svn path=/trunk/; revision=6322
2008-01-16 20:00:23 +00:00
Alexander Larsson
87cd883e8d Add g_file_query_exists (#508771)
2008-01-16  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gio.symbols:
        Add g_file_query_exists (#508771)


svn path=/trunk/; revision=6319
2008-01-16 10:11:26 +00:00
Murray Cumming
218827445d For async functions that have no non-async version, document that the
2008-01-15  Murray Cumming  <murrayc@murrayc.com>

* gdrive.c:
* gfile.c:
* gmount.c:
* gvolume.c: For async functions that have no non-async 
version, document that the GAsyncReadyCallback may be NULL.
Bug #509626.

svn path=/trunk/; revision=6318
2008-01-15 14:08:41 +00:00
Alexander Larsson
a1996e6518 Don't do pointer arithmetic on void * (#508602) Patch from Kazuki IWAMOTO
2008-01-15  Alexander Larsson  <alexl@redhat.com>

        * gmemoryinputstream.c:
        * gmemoryoutputstream.c:
	Don't do pointer arithmetic on void * (#508602)
	Patch from Kazuki IWAMOTO


svn path=/trunk/; revision=6316
2008-01-15 11:47:04 +00:00
Matthias Clasen
da7494c1e9 2.15.2
svn path=/trunk/; revision=6310
2008-01-14 16:43:59 +00:00
Alexander Larsson
fd6e388736 Don't set error here, since we fallback to polling monitor.
2008-01-14  Alexander Larsson  <alexl@redhat.com>

	* gfile.c (g_file_monitor_file):
	Don't set error here, since we fallback to polling monitor.


svn path=/trunk/; revision=6307
2008-01-14 15:04:25 +00:00
Alexander Larsson
3690cb75a6 Add GError to file monitor calls
2008-01-14  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        (g_file_monitor_directory):
        (g_file_monitor_file):
	Add GError to file monitor calls
	
        * glocaldirectorymonitor.c:
        * glocaldirectorymonitor.h:
        * glocalfile.c:
        * glocalfilemonitor.c:
        * glocalfilemonitor.h:
        * gunixmounts.c:
	Update for above change


svn path=/trunk/; revision=6306
2008-01-14 15:00:31 +00:00
Alexander Larsson
a80b1120f1 Handle root correctly in g_file_get_relative_path (#508719)
2008-01-14  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        (match_prefix):
	Handle root correctly in g_file_get_relative_path (#508719)


svn path=/trunk/; revision=6305
2008-01-14 14:55:27 +00:00
Alexander Larsson
2a5748310b Clean up docs and example for GAsyncResult (#508074)
2008-01-14  Alexander Larsson  <alexl@redhat.com>

        * gasyncresult.c:
	Clean up docs and example for GAsyncResult (#508074)



svn path=/trunk/; revision=6303
2008-01-14 14:12:48 +00:00
Murray Cumming
85fc6345db Clarify the sentence about GAsyncReadyCallback, and correct some spelling
2008-01-11  Murray Cumming  <murrayc@murrayc.com>

* gfile.c: Clarify the sentence about GAsyncReadyCallback, 
and correct some spelling mistakes. Bug #508108.

svn path=/trunk/; revision=6295
2008-01-11 16:23:30 +00:00
Matthias Clasen
ef613614c9 Add a comment
svn path=/trunk/; revision=6294
2008-01-11 14:36:31 +00:00
Murray Cumming
30d6124e8a GFileInfo description: Mention how to actually set attributes in a GFile
2008-01-10  Murray Cumming  <murrayc@murrayc.com>

        * gfileinfo.c: GFileInfo description: Mention 
        how to actually set attributes in a GFile and how to discover 
        which attributes are settable. Bug #508378.

svn path=/trunk/; revision=6293
2008-01-11 14:15:07 +00:00
A. Walton
d43b188954 Check for NULL content types.
2008-01-10  A. Walton  <awalton@svn.gnome.org>

	* gdesktopappinfo.c: (g_app_info_get_all_for_type),
	(g_app_info_get_default_for_type):
	Check for NULL content types.

svn path=/trunk/; revision=6290
2008-01-10 13:25:41 +00:00
Frederic Crozat
7fe31089ff add rpc_pipefs to systemfs list (#508309).
2008-01-10  Frederic Crozat  <fcrozat@mandriva.com>

        * gunixmounts.c: add rpc_pipefs to systemfs list (#508309).


svn path=/trunk/; revision=6289
2008-01-10 09:55:35 +00:00
Murray Cumming
1a45f5167d *_async() functions: Several small corrections to the documentation,
2008-01-09  Murray Cumming  <murrayc@murrayc.com>

* gfile.c: *_async() functions: Several small corrections 
to the documentation, mostly correcting copy/paste errors 
and improving some sentences.

svn path=/trunk/; revision=6287
2008-01-09 17:04:06 +00:00
Dan Winship
e4d018f1dd x86_64 fix
* glocalfile.c (get_unique_filename): x86_64 fix

svn path=/trunk/; revision=6286
2008-01-09 16:39:42 +00:00
Alexander Larsson
896ebed1a5 Add g_unix_mount_guess_should_display and use for unix volume monitor
2008-01-09  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
        * gunixmount.c:
        * gunixmounts.[ch]:
	Add g_unix_mount_guess_should_display and use
	for unix volume monitor backend.
	This means we more or less show what the
	gnome-vfs backend did.
	Based on patch from Padraig O'Briain


svn path=/trunk/; revision=6285
2008-01-09 15:45:56 +00:00
Alexander Larsson
47b8809e17 Add g_themed_icon_new_with_default_fallbacks
2008-01-09  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
        * gthemedicon.[ch]:
        Add g_themed_icon_new_with_default_fallbacks
	
        * gunixmounts.c:
	Use default fallbacks for icons



svn path=/trunk/; revision=6284
2008-01-09 15:20:49 +00:00
Alexander Larsson
e6ca690694 Change the API a bit so that unhandled methods get reported via the reply,
2008-01-09  Alexander Larsson  <alexl@redhat.com>

        * gio-marshal.list:
        * gmountoperation.[ch]:
	Change the API a bit so that unhandled methods
	get reported via the reply, rather than by
	the signal emission return value. This is because
	some handlers can't know this immediately without
	doing I/O, and this is an async operation that
	should not block.


svn path=/trunk/; revision=6282
2008-01-09 14:43:41 +00:00
Alexander Larsson
91d7fdc186 Fix double free crash (#508224) Patch from Joe Marcus Clarke
2008-01-09  Alexander Larsson  <alexl@redhat.com>

        * fam/fam-helper.c:
        * fam/gfamdirectorymonitor.c:
        * fam/gfamfilemonitor.c:
	Fix double free crash (#508224)
	Patch from Joe Marcus Clarke


svn path=/trunk/; revision=6281
2008-01-09 08:08:43 +00:00
Matthias Clasen
60c8bdfe8f 2.15.1
svn path=/trunk/; revision=6267
2008-01-07 16:47:36 +00:00
Alexander Larsson
6a3cdb7eb4 Fix warning (#507835)
2008-01-07  Alexander Larsson  <alexl@redhat.com>

	* gunixinputstream.c (g_unix_input_stream_skip_finish):
	Fix warning (#507835)


svn path=/trunk/; revision=6264
2008-01-07 13:58:37 +00:00
Alexander Larsson
361e0e9b1c Pass --internal to glib-genmarshal
2008-01-07  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
	Pass --internal to glib-genmarshal
	
        * gfilemonitor.c:
        * gmountoperation.c:
        * gio-marshal.list:
	Use better types for signal arguments (#507822)


svn path=/trunk/; revision=6263
2008-01-07 13:56:10 +00:00
Alexander Larsson
e23140cbb4 Build test subdir after . Remove gdirectorymonitor.[ch]
2008-01-07  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
	Build test subdir after .
	Remove gdirectorymonitor.[ch]
	
        * gdirectorymonitor.[ch]:
        * gfilemonitor.c:
        * gfile.[ch]:
        * gio.h:
	Remove GDirectoryMonitor and make
	GFileMonitor the baseclass for both file and
	directory monitors. Lift the more generic
	rate limiting code from GDirectoryMonitor
	into GFileMonitor.
	
        * fam/fam-helper.c:
        * fam/gfamdirectorymonitor.[ch]:
        * inotify/ginotifydirectorymonitor.[ch]:
        * inotify/inotify-helper.c:
        * glocaldirectorymonitor.[ch]:
        * glocalfile.c:
        * gvolumemonitor.c:
	Update for the removed GDirectoryMonitor.
	
        * gmemoryoutputstream.c:
	Remove ununsed variable


svn path=/trunk/; revision=6262
2008-01-07 13:42:08 +00:00
Alexander Larsson
3fe87f016a Translate error strings
2008-01-07  Alexander Larsson  <alexl@redhat.com>

        * gmemoryinputstream.c:
	Translate error strings
	
        * gio.symbols:
        * gmemoryoutputstream.[ch]:
	New implementation that avoids using GByteArray
	in implementation and API. (#506377)


svn path=/trunk/; revision=6260
2008-01-07 10:11:57 +00:00
Matthias Clasen
3cbcbee7a6 Add some tests
svn path=/trunk/; revision=6257
2008-01-07 06:14:40 +00:00
Matthias Clasen
3905f14528 Mark strings for translation.
svn path=/trunk/; revision=6256
2008-01-07 05:18:17 +00:00
Matthias Clasen
614f47792a Small doc addition
svn path=/trunk/; revision=6249
2008-01-06 08:06:52 +00:00
Matthias Clasen
ff068af417 Documentation additions
svn path=/trunk/; revision=6247
2008-01-06 08:04:39 +00:00
Alexander Larsson
b481ba7ced Use the right type (uint) for the ask_password signal.
2008-01-04  Alexander Larsson  <alexl@redhat.com>

        * gio-marshal.list:
        * gmountoperation.c:
	Use the right type (uint) for the ask_password signal.


svn path=/trunk/; revision=6244
2008-01-04 15:19:36 +00:00
Alexander Larsson
8af463f939 Add g_app_info_supports_files() Remove desktop arg from
2008-01-04  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.[ch]:
        * gwin32appinfo.c:
        * gio.symbols:
	Add g_app_info_supports_files() 
        Remove desktop arg from g_app_info_should_show().
	
        * gdesktopappinfo.[ch]:
	Implement g_app_info_supports_files() and new should_show()
	Add g_desktop_app_info_set_desktop_env() to set the desktop
	for should_show(). (This will be set by gtk+ later)


svn path=/trunk/; revision=6242
2008-01-04 10:51:56 +00:00
Alexander Larsson
ce50248037 Improve API so that you can use multile chunks of memory and custom
2008-01-04  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
        * gmemoryinputstream.[ch]:
	Improve API so that you can use multile chunks
	of memory and custom destroy functions. (#506374)



svn path=/trunk/; revision=6241
2008-01-04 10:17:57 +00:00
Alexander Larsson
491cccf63a Handle NULL attribute matchers safely, as we return this for empty
2008-01-03  Alexander Larsson  <alexl@redhat.com>

        * gfileinfo.c:
	Handle NULL attribute matchers safely, as we return this
	for empty attribute matcher strings.



svn path=/trunk/; revision=6238
2008-01-03 14:58:53 +00:00
Alexander Larsson
246e2e71a9 Add /usr/local to list of internal mountpoints
2008-01-03  Alexander Larsson  <alexl@redhat.com>

	* gunixmounts.c (g_unix_is_mount_path_system_internal):
	Add /usr/local to list of internal mountpoints


svn path=/trunk/; revision=6237
2008-01-03 10:29:29 +00:00
Alexander Larsson
e3fa723f99 Check for HAVE_LCHOWN (#505887)
2008-01-03  Alexander Larsson  <alexl@redhat.com>

        * glocalfileinfo.c:
	Check for HAVE_LCHOWN (#505887)


svn path=/trunk/; revision=6236
2008-01-03 09:13:39 +00:00
Alexander Larsson
7e6f37d00c Add define for selinux context attribute. Fix missing : -> :: namespace
2008-01-03  Alexander Larsson  <alexl@redhat.com>

        * gfileinfo.h:
        * glocalfileinfo.c:
	Add define for selinux context attribute.
	Fix missing : -> :: namespace separator change
	Fix missing _ -> - name change for xattr-sys.
	(#505058)


svn path=/trunk/; revision=6235
2008-01-03 09:01:00 +00:00
Alexander Larsson
a59fb762e6 Link to libglib and libgobject directly (#504879) Patch from Sebastien
2008-01-03  Alexander Larsson  <alexl@redhat.com>

        * fam/Makefile.am:
	Link to libglib and libgobject directly (#504879)
	Patch from Sebastien Bacher


svn path=/trunk/; revision=6234
2008-01-03 08:56:51 +00:00
Alvaro Lopez Ortega
f06829352b These void functions were trying to return a value. It was causing the
2008-01-02  Alvaro Lopez Ortega  <alvaro@sun.com>

        * gio/gunixmount.c (g_unix_mount_unmount, g_unix_mount_eject):
        These void functions were trying to return a value. It was causing
        the compilation to fail.


svn path=/trunk/; revision=6232
2008-01-02 16:22:25 +00:00
Wouter Bolsterlee
69b861ec5c Expanded the g_file_new_for_commandline_arg description a bit, based on
2008-01-01  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gfile.c: Expanded the g_file_new_for_commandline_arg
	description a bit, based on the code and the docs of the
	other g_file_new_for_* functions.

svn path=/trunk/; revision=6229
2008-01-01 14:39:51 +00:00
Wouter Bolsterlee
123116a30c Fixed typo in docs.
2007-12-31  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* gfilemonitor.h: Fixed typo in docs.

svn path=/trunk/; revision=6225
2007-12-31 12:11:13 +00:00
Mathias Hasselmann
9002395011 Updates to GIO documentation. (#506395, Mikael Hermansson)
* gcontenttype.c: Describe memory management for return value of
g_content_types_get_registered(). Missing piece from #505815.
* gdrive.c, gmount.c, gvolumemonitor.c: Add more description to
GVolume, GDrive, GMounts, which hopefully gives the user less
confusions when using this API. Following explainations from
Alexander Larsson on gtk-devel-list.

svn path=/trunk/; revision=6222
2007-12-31 10:00:52 +00:00
Matthias Clasen
227ef243b1 Doc additions
svn path=/trunk/; revision=6220
2007-12-31 04:45:19 +00:00
Matthias Clasen
a2cea97a8d Fix build with --disable-visibility
svn path=/trunk/; revision=6219
2007-12-31 02:30:33 +00:00
Matthias Clasen
4ea56399b6 Don't include NULLs in the list of returned app infos.
2007-12-30  Matthias Clasen  <mclasen@redhat.com> 

        * gdesktopfileinfo.c (g_app_info_get_all): Don't include NULLs
        in the list of returned app infos.


svn path=/trunk/; revision=6218
2007-12-31 01:47:59 +00:00
Matthias Clasen
c009b04f42 Fix a cross-reference
svn path=/trunk/; revision=6217
2007-12-30 06:15:12 +00:00
Matthias Clasen
a3b0996156 More docs
svn path=/trunk/; revision=6216
2007-12-30 06:13:12 +00:00
Matthias Clasen
c7eee2ff00 Doc updates
svn path=/trunk/; revision=6215
2007-12-30 05:55:23 +00:00
Matthias Clasen
c014e5f8de More doc updates
svn path=/trunk/; revision=6213
2007-12-30 05:30:42 +00:00
Matthias Clasen
b0f4fcc272 More doc updates
svn path=/trunk/; revision=6212
2007-12-30 05:22:33 +00:00
Matthias Clasen
d285f28401 Documentation updates
svn path=/trunk/; revision=6211
2007-12-30 05:21:05 +00:00
Matthias Clasen
08ed5bc3aa Documentation updates
svn path=/trunk/; revision=6210
2007-12-30 05:12:15 +00:00
Matthias Clasen
38fa4bacd3 Documentation updates
svn path=/trunk/; revision=6209
2007-12-30 05:10:23 +00:00
Matthias Clasen
5f1c3a491a Include crt_externs.h. (#505730, Tommi Komulainen)
2007-12-26  Matthias Clasen  <mclasen@redhat.com> 

        * gdesktopappinfo.c: Include crt_externs.h.  (#505730,
        Tommi Komulainen)



svn path=/trunk/; revision=6206
2007-12-27 04:23:57 +00:00
Matthias Clasen
a06dd20aef Don't return freed memory (#505815, Mikael Hermansson)
2007-12-26  Matthias Clasen  <mclasen@redhat.com> 

        * gcontenttype.c (g_content_types_get_registered): Don't return
        freed memory (#505815, Mikael Hermansson)



svn path=/trunk/; revision=6205
2007-12-27 04:14:47 +00:00
Paolo Borelli
255c62b695 fix typo in the ifdef used to detect statbuf->st_blocks. (#505042)
2007-12-25  Paolo Borelli  <pborelli@katamail.com>

	* glocalfileinfo.c (set_info_from_stat): fix typo in the ifdef
	used to detect statbuf->st_blocks. (#505042)


svn path=/trunk/; revision=6202
2007-12-25 21:21:32 +00:00
Matthias Clasen
c58f339401 Fix the environment handling. (#504829, Cosimo Cecchi)
2007-12-24  Matthias Clasen  <mclasen@redhat.com>

        * gdesktopappinfo.c (g_desktop_app_info_launch): Fix the
        environment handling.  (#504829, Cosimo Cecchi)



svn path=/trunk/; revision=6200
2007-12-25 02:07:48 +00:00
Matthias Clasen
1daa618e05 Doc improvements
2007-12-22  Matthias Clasen  <mclasen@redhat.com>

        * gio/gappinfo.c: Doc improvements

        * gio/gdesktopappinfo.c (g_app_info_get_all): Return app infos,
        not ids.


svn path=/trunk/; revision=6188
2007-12-22 18:15:57 +00:00
Matthias Clasen
48ba9ea756 2.15.0
svn path=/trunk/; revision=6180
2007-12-21 00:37:41 +00:00
Hans Breuer
b64e1dfd47 don't build gdesktopappinfo.obj, it collides with symbols
2007-12-20  Hans Breuer  <hans@breuer.org>

	* makefile.msc : don't build gdesktopappinfo.obj, it collides 
	with symbols gwin32appinfo.obj, added gmount.obj
	* gio.symbols : mark g_desktop_app_* as G_OS_UNIX


svn path=/trunk/; revision=6178
2007-12-20 19:13:18 +00:00
Alexander Larsson
71768c8426 File attribute renames: std:: -> standard:: fs:: -> filesystem:: id::fs ->
2007-12-20  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
        * gfileattribute.c:
        * gfileinfo.c:
        * gfileinfo.h:
        * gfilenamecompleter.c:
        * glocalfile.c:
        * glocalfileinfo.c:
        * gpollfilemonitor.c:
	File attribute renames:
	std:: -> standard::
	fs:: -> filesystem::
	id::fs -> id::filesystem


svn path=/trunk/; revision=6170
2007-12-20 13:30:47 +00:00
Alexander Larsson
33c055feb1 Add GMountUnmountFlags to all unmount and eject calls. Add
2007-12-20  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gdrive.[ch]:
        * gmount.[ch]:
        * gvolume.[ch]:
        * gunixmount.c:
        * gunixvolume.c:
        * gio.symbols:
	Add GMountUnmountFlags to all unmount and
	eject calls.
	Add g_mount_remount() call.



svn path=/trunk/; revision=6169
2007-12-20 11:48:14 +00:00
Alexander Larsson
ba464215e7 Fix unused variable warning
2007-12-20  Alexander Larsson  <alexl@redhat.com>

	* gvfs.c (get_default_vfs):
	Fix unused variable warning


svn path=/trunk/; revision=6168
2007-12-20 10:57:45 +00:00
Matthias Clasen
10378099cd Updates
svn path=/trunk/; revision=6167
2007-12-20 03:16:02 +00:00
Matthias Clasen
aef5a4b0ab Remove C99 comments
svn path=/trunk/; revision=6166
2007-12-20 03:12:24 +00:00
Matthias Clasen
864200c753 Additions
svn path=/trunk/; revision=6165
2007-12-20 03:11:11 +00:00
Alexander Larsson
28d1c8e0ad Make g_io_modules_load_all_in_directory not unuse loaded modules so that
2007-12-19  Alexander Larsson  <alexl@redhat.com>

        * giomodule.c:
	Make g_io_modules_load_all_in_directory not unuse
	loaded modules so that users of it can do stuff
	before unloading.
	Init internal "module" types.
	Initialize static prio and name for types so that
	we don't have to load modules to get it.
	
        * gnativevolumemonitor.h:
	* gvolumemonitor.h:
	Move is_supported to parent class so that
	non-native monitors can avoid being initialized
	too. (For instance GDaemonVolumeMonitor if we're
	not using GDaemonVfs.)
	
        * glocaldirectorymonitor.[ch]:
        * glocalfilemonitor.[ch]:
	* gunionvolumemonitor.c:
        * gunixvolumemonitor.c:
        * gvfs.c:
	Find plugins using the static prio+name to
	avoid unnecessarily loading the modules.


svn path=/trunk/; revision=6159
2007-12-19 16:08:55 +00:00
Alexander Larsson
13f33931fc Remove warnings
2007-12-19  Alexander Larsson  <alexl@redhat.com>

        * giomodule.c:
	Remove warnings


svn path=/trunk/; revision=6157
2007-12-19 13:18:34 +00:00
Alexander Larsson
1fbd06d85b Store the native type as GType, not class so that we can unload it. But
2007-12-19  Alexander Larsson  <alexl@redhat.com>

        * gunionvolumemonitor.c:
	Store the native type as GType, not class so that
	we can unload it. But still avoid unnecessarily
	unload modules.


svn path=/trunk/; revision=6156
2007-12-19 13:10:22 +00:00
David Zeuthen
88679aba98 Introduce g_volume_monitor_adopt_orphan_mount() function. Also add signals
2007-12-19  David Zeuthen  <davidz@redhat.com>

	Introduce g_volume_monitor_adopt_orphan_mount() function. Also
	add signals 'disconnected' and 'eject-button' on GDrive. Add
	signal 'removed' on GVolume and 'unmounted' on GMount.

	* gdrive.c: (g_drive_base_init):
	* gdrive.h:
	* gfile.c: (g_file_mount_mountable),
	(g_file_mount_enclosing_volume):
	* gio.symbols:
	* gioerror.h:
	* gmount.c: (g_mount_base_init):
	* gmount.h:
	* gunionvolumemonitor.c: (g_volume_monitor_adopt_orphan_mount):
	* gunixvolumemonitor.c: (update_volumes), (update_mounts):
	* gvolume.c: (g_volume_base_init), (g_volume_mount):
	* gvolume.h:
	* gvolumemonitor.h:


svn path=/trunk/; revision=6153
2007-12-19 09:39:50 +00:00
Matthias Clasen
0debd52858 Fix up includes in section docs
svn path=/trunk/; revision=6149
2007-12-18 02:52:11 +00:00
Alexander Larsson
c4e3cfbf40 Add is_supported() to GNativeVolumeMonitorClass so that we can avoid
2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * gnativevolumemonitor.h:
        * gunionvolumemonitor.c:
        * gunixvolumemonitor.c:
	Add is_supported() to GNativeVolumeMonitorClass so
	that we can avoid having to create an object to see
	if the backend is supported at runtime.
	Also add name member and an env var to pick a specific
	volume monitor backend.
	
        * gmountprivate.h:
        * glocalfile.c:
	Add cancellable to _g_mount_get_for_mount_path()
	
        * glocaldirectorymonitor.c:
        * glocalfilemonitor.c:
	Avoid loading and unloading modules while sorting.



svn path=/trunk/; revision=6144
2007-12-17 16:00:33 +00:00
Matthias Clasen
feb5258cf9 Namespace waste reduction, move some g_get_unix_mount functions to the
2007-12-17  Matthias Clasen  <mclasen@redhat.com>

        * gio.symbols:
        * gunixmounts.[hc]: Namespace waste reduction, move some
        g_get_unix_mount functions to the g_unix_mount namespace.

        * gunixmounts.c:
        * gunixvolumemonitor.c:
        * glocalfile.c:
        * glocaldirectorymonitor.c: Update all callers.

        * gunixmounts.h: Remove leftover g_unix_get_canonical_device_path


svn path=/trunk/; revision=6143
2007-12-17 14:59:23 +00:00
Alexander Larsson
19e895d818 Add doc comments about what GFile operations are guaranteed to not block.
2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * gfile.c:
	Add doc comments about what GFile operations are
	guaranteed to not block.


svn path=/trunk/; revision=6142
2007-12-17 11:26:34 +00:00
Alexander Larsson
6ad96b3677 Add missing #ifdef fixing OSX build. (#503334, patch from Richard Hult)
2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
	Add missing #ifdef fixing OSX build.
	(#503334, patch from Richard Hult)



svn path=/trunk/; revision=6141
2007-12-17 10:53:53 +00:00
David Zeuthen
f4add8f0fa Provide eject() on both GMount and GVolume and utility functions to guess
2007-12-14  David Zeuthen  <davidz@redhat.com>

	* Makefile.am:
	* gio.symbols:
	* gmount.c: (g_mount_get_uuid), (g_mount_can_eject),
	(g_mount_eject), (g_mount_eject_finish):
	* gmount.h:
	* gunionvolumemonitor.c: (g_union_volume_monitor_finalize),
	(get_volume_for_uuid), (get_mount_for_uuid),
	(g_union_volume_monitor_class_init),
	(get_default_native_type_with_exclude), (get_default_native_type),
	(get_native_type), (update_native_type),
	(g_union_volume_monitor_init), (_g_mount_get_for_mount_path):
	* gunixmount.c: (_g_unix_mount_new), (g_unix_mount_get_uuid),
	(g_unix_mount_can_eject), (eject_unmount_cb),
	(eject_unmount_read_error), (eject_unmount_do),
	(g_unix_mount_unmount), (g_unix_mount_eject),
	(g_unix_mount_eject_finish), (g_unix_mount_mount_iface_init):
	* gunixmounts.c: (g_unix_mount_guess_can_eject),
	(g_unix_mount_point_guess_can_eject):
	* gunixmounts.h:
	* gunixvolume.c: (_g_unix_volume_new), (g_unix_volume_get_uuid),
	(g_unix_volume_can_eject), (g_unix_volume_get_drive),
	(eject_mount_cb), (eject_mount_read_error), (eject_mount_do),
	(g_unix_volume_mount), (g_unix_volume_eject),
	(g_unix_volume_eject_finish), (g_unix_volume_volume_iface_init):
	* gunixvolumemonitor.c: (get_volume_for_uuid),
	(get_mount_for_uuid), (g_unix_volume_monitor_class_init),
	(update_mounts):
	* gvolume.c: (g_volume_get_uuid), (g_volume_can_eject),
	(g_volume_eject), (g_volume_eject_finish):
	* gvolume.h:
	* gvolumemonitor.c: (g_volume_monitor_get_volume_for_uuid),
	(g_volume_monitor_get_mount_for_uuid):
	* gvolumemonitor.h:

	Provide eject() on both GMount and GVolume and utility functions
	to guess whether a GUnixMountPoint or GUnixMountEntry should be
	ejected. Introduce the concept of UUID's and wire it into GVolume
	and GMount and provide API on GVolumeMonitor to find such
	instances. Also handle the case where an external
	GNativeVolumeMonitor fails to initialize. Lock around the
	_g_get_mount_for_mount_path() function such that volume monitor
	implementations won't have to do locking themselves.



svn path=/trunk/; revision=6140
2007-12-17 09:31:08 +00:00
Matthias Clasen
2e3f48993d Documentation updates
svn path=/trunk/; revision=6138
2007-12-17 07:04:51 +00:00
Matthias Clasen
53c5a8122b More doc fixups
svn path=/trunk/; revision=6134
2007-12-15 06:05:40 +00:00
Matthias Clasen
f5d2feddf6 Fix up docs
svn path=/trunk/; revision=6133
2007-12-15 06:03:35 +00:00
Matthias Clasen
2f3aef1617 Use hash iterators
svn path=/trunk/; revision=6132
2007-12-15 04:39:26 +00:00
Alexander Larsson
f506365079 Move GFileAttributeValue to a private header, as its sort of ugly.
2007-12-14  Alexander Larsson  <alexl@redhat.com>

	* Makefile.am:
        * gfileattribute.[ch]:
        * gfileattribute-priv.h:
	Move GFileAttributeValue to a private header, as
	its sort of ugly.
	
        * gfile.[ch]:
	Make set_attribute take a type + a pointer instead
	of a GFileAttributeValue.
	
        * gfileinfo.[ch]:
	Fix up for above changes.
	Add g_file_info_get_attribute_data to get
	all info in one call, g_file_info_get_attribute_status
	to get the status and g_file_info_get_attribute_as_string.
	
        * gio.symbols:
        * glocalfile.c:
        * glocalfileinfo.[ch]:
	Update for changes
	
        * gunixmounts.c:
	Make _guess_type static.


svn path=/trunk/; revision=6129
2007-12-14 15:56:56 +00:00
Yevgen Muntyan
2ceae92eeb Say Makefile.am instead of gio/Makefile.am in changelog
svn path=/trunk/; revision=6128
2007-12-14 14:36:08 +00:00
Yevgen Muntyan
887e45888d Moved the ChangeLog entry to gio/ChangeLog
svn path=/trunk/; revision=6127
2007-12-14 14:34:11 +00:00
Yevgen Muntyan
ee5aacbc61 Fixed build when srcdir != builddir, made mkenums and friends use
2007-12-14  Yevgen Muntyan  <muntyan@tamu.edu>

	* gio/Makefile.am:
	* gio/inotify/Makefile.am: Fixed build when srcdir != builddir,
	made mkenums and friends use temporary files to avoid leaving
	empty generated files on failure (#503470).


svn path=/trunk/; revision=6126
2007-12-14 14:28:35 +00:00
Alexander Larsson
3abace8118 Fix AKS -> ASK typo
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * gmountoperation.h:
	Fix AKS -> ASK typo


svn path=/trunk/; revision=6120
2007-12-14 11:17:44 +00:00
Alexander Larsson
4cb6eab803 Clean up all flags enums to not have _FLAGS in them Make the names of some
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.h:
        * gfile.[ch]:
        * gfileattribute.[ch]:
        * gio.symbols:
        * glocalfile.c:
        * glocalfileoutputstream.c:
        * gmountoperation.[ch]:
        * goutputstream.[ch]:
	Clean up all flags enums to not have _FLAGS in them
	Make the names of some of the enums better.

        * glocalfileinfo.c:
	Fix warning


svn path=/trunk/; revision=6119
2007-12-14 11:07:31 +00:00
Michael Natterer
0f8f543230 fix g_io_scheduler symbol names.
2007-12-14  Michael Natterer  <mitch@imendio.com>

	* gio.symbols: fix g_io_scheduler symbol names.


svn path=/trunk/; revision=6118
2007-12-14 10:59:10 +00:00
Alexander Larsson
ced2927726 Only allow including <gio/gio.h> from apps
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * fam/Makefile.am:
        * gappinfo.h:
        * gasyncresult.h:
        * gbufferedinputstream.h:
        * gbufferedoutputstream.h:
        * gcancellable.h:
        * gcontenttype.h:
        * gdatainputstream.h:
        * gdataoutputstream.h:
        * gdesktopappinfo.h:
        * gdirectorymonitor.h:
        * gdrive.h:
        * gfile.h:
        * gfileattribute.h:
        * gfileenumerator.h:
        * gfileicon.h:
        * gfileinfo.h:
        * gfileinputstream.h:
        * gfilemonitor.h:
        * gfilenamecompleter.h:
        * gfileoutputstream.h:
        * gfilterinputstream.h:
        * gfilteroutputstream.h:
        * gicon.h:
        * ginputstream.h:
        * gio.h:
        * gioerror.h:
        * giomodule.h:
        * gioscheduler.h:
        * gloadableicon.h:
        * gmemoryinputstream.h:
        * gmemoryoutputstream.h:
        * gmount.h:
        * gmountoperation.h:
        * goutputstream.h:
        * gseekable.h:
        * gsimpleasyncresult.h:
        * gthemedicon.h:
        * gunixinputstream.h:
        * gunixmounts.h:
        * gunixoutputstream.h:
        * gvfs.h:
        * gvolume.h:
        * gvolumemonitor.h:
        * inotify/Makefile.am:
	Only allow including <gio/gio.h> from apps


svn path=/trunk/; revision=6117
2007-12-14 10:35:24 +00:00
Alexander Larsson
3db93c01b7 Rename gioscheduler calls so they all use the g_io_schedule_ prefix. Split
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * gioscheduler.[ch]:
        * gsimpleasyncresult.c:
	Rename gioscheduler calls so they all use the g_io_schedule_ prefix.
	Split out the send_to_mainloop call into two versions instead
	of having the block argument.


svn path=/trunk/; revision=6116
2007-12-14 09:42:59 +00:00
Alexander Larsson
2ae689e31f g_push/pop_current_cancellable -> g_cancellable_push/pop_current
2007-12-13  Alexander Larsson  <alexl@redhat.com>

        * gcancellable.[ch]:
        * gio.symbols:
        * gbufferedinputstream.c:
        * gfileenumerator.c:
        * gfileinputstream.c:
        * gfileoutputstream.c:
        * ginputstream.c:
        * gioscheduler.c:
        * goutputstream.c:
	g_push/pop_current_cancellable ->
	g_cancellable_push/pop_current


svn path=/trunk/; revision=6115
2007-12-13 16:48:06 +00:00
Alexander Larsson
f6b9b4f45e Rename g_mount_for_location to g_file_mount_enclosing_volume.
2007-12-13  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gio.symbols:
	Rename g_mount_for_location to g_file_mount_enclosing_volume.


svn path=/trunk/; revision=6114
2007-12-13 16:22:43 +00:00
Alexander Larsson
77162a7c7c G_PASSWORD_FLAGS_ANON_SUPPORTED -> G_PASSWORD_FLAGS_ANONYMOUS_SUPPORTED
2007-12-13  Alexander Larsson  <alexl@redhat.com>

        * gmountoperation.h:
	G_PASSWORD_FLAGS_ANON_SUPPORTED -> G_PASSWORD_FLAGS_ANONYMOUS_SUPPORTED


svn path=/trunk/; revision=6106
2007-12-13 13:35:25 +00:00
Alexander Larsson
afc16811d8 Fix race condition when freeing proxy in g_io_job_send_to_mainloop().
2007-12-12  Alexander Larsson  <alexl@redhat.com>

        * gioscheduler.c:
	Fix race condition when freeing proxy in
	g_io_job_send_to_mainloop().



svn path=/trunk/; revision=6105
2007-12-12 19:34:19 +00:00
Alexander Larsson
1c57670f19 Make attribute namespace separator "::" instead of ":". Use - instead of _
2007-12-12  Alexander Larsson  <alexl@redhat.com>

        * gfileattribute.c:
        * gfileinfo.[ch]:
        * glocalfile.c:
        * glocalfileinfo.c:
	Make attribute namespace separator "::" instead of ":".
	Use - instead of _ as separator in attribute names.


svn path=/trunk/; revision=6104
2007-12-12 15:50:45 +00:00
Alexander Larsson
ab7ff4c6a0 s/parent/parent_instance/ in GObjects
2007-12-12  Alexander Larsson  <alexl@redhat.com>

        * gbufferedinputstream.h:
        * gbufferedoutputstream.h:
        * gdatainputstream.h:
        * gdataoutputstream.h:
        * gdirectorymonitor.h:
        * gfileenumerator.h:
        * gfileinputstream.h:
        * gfilemonitor.h:
        * gfileoutputstream.h:
        * gfilterinputstream.h:
        * gfilteroutputstream.h:
        * ginputstream.h:
        * glocalfileinputstream.h:
        * glocalfileoutputstream.h:
        * gmemoryinputstream.h:
        * gmemoryoutputstream.h:
        * gnativevolumemonitor.h:
        * goutputstream.h:
        * gunixinputstream.h:
        * gunixoutputstream.h:
        * gvfs.h:
        * gvolumemonitor.h:
	s/parent/parent_instance/ in GObjects


svn path=/trunk/; revision=6102
2007-12-12 14:33:20 +00:00
Alexander Larsson
01e1ab6e68 No need for padding for interfaces
2007-12-12  Alexander Larsson  <alexl@redhat.com>

        * gdrive.h:
        * gmount.h:
        * gvolume.h:
	No need for padding for interfaces


svn path=/trunk/; revision=6101
2007-12-12 14:03:36 +00:00
Alexander Larsson
41d1650c9b Fix up a bunch of details in the docs.
2007-12-12  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.[ch]:
        * gasyncresult.c:
        * gbufferedinputstream.c:
        * gbufferedoutputstream.c:
        * gcancellable.c:
        * gcontenttype.c:
        * gdatainputstream.[ch]:
        * gdesktopappinfo.c:
        * gdirectorymonitor.c:
        * gfile.[ch]:
        * gfileattribute.[ch]:
        * gfileicon.[ch]:
        * gfileinfo.h:
        * gfileinputstream.h:
        * gfilemonitor.[ch]:
        * gfileoutputstream.[ch]:
        * gfilterinputstream.h:
        * gfilteroutputstream.h:
        * gicon.h:
        * gioscheduler.c:
        * gloadableicon.[ch]:
        * gmemoryinputstream.c:
        * gmountoperation.c:
        * gthemedicon.c:
	Fix up a bunch of details in the docs.

        * glocalfileinfo.c:
	CR/LF -> LF fixups


svn path=/trunk/; revision=6100
2007-12-12 12:19:02 +00:00
David Zeuthen
3ca9fd4dbb Rework how volumes, drives and volume monitoring is done. Previosly the
2007-12-11  David Zeuthen  <davidz@redhat.com>

	Rework how volumes, drives and volume monitoring is
	done. Previosly the model was

	 GDrive <1-1> GVolume

	where a GDrive instance represented a mount point and a GVolume
	instance represented a mounted file system. This patch changes it
	the model to

		GDrive <1-N> GVolume <1-1> GMount

	where GMount now serves the purpose of the old GVolume and the new
	GVolume serves the purpose of the old GDrive. In addition the new
	GDrive interface is used to represent a collection of GVolume
	instances (typically partitions) and also contains utility to query
	the state of the physical drive the GDrive object represents (such
	as checking for media, polling the drive, ejecting the media etc.).

	Also implement mounting and unmounting in the Unix volume monitor
	backend. A subquent patch will introduce GDrive support for ejection
	of media.

	* Makefile.am:
	* gdrive.c: (g_drive_is_media_check_automatic),
	(g_drive_is_media_removable), (g_drive_has_media),
	(g_drive_can_poll_for_media), (g_drive_eject),
	(g_drive_eject_finish), (g_drive_poll_for_media),
	(g_drive_poll_for_media_finish):
	* gdrive.h:
	* gfile.c: (g_file_find_enclosing_mount):
	* gfile.h:
	* gio.symbols:
	* glocaldirectorymonitor.c:
	(g_local_directory_monitor_constructor), (mounts_changed):
	* glocalfile.c: (get_mount_info),
	(g_local_file_find_enclosing_mount),
	(g_local_file_file_iface_init):
	* gnativevolumemonitor.h:
	* gunionvolumemonitor.c: (get_mounts), (get_volumes),
	(get_connected_drives), (g_union_volume_monitor_class_init),
	(child_volume_added), (child_volume_removed),
	(child_volume_changed), (child_mount_added), (child_mount_removed),
	(child_mount_pre_unmount), (child_mount_changed),
	(child_drive_changed), (g_union_volume_monitor_add_monitor),
	(g_union_volume_monitor_remove_monitor),
	(_g_mount_get_for_mount_path):
	* gunixmounts.c: (g_unix_is_mount_path_system_internal),
	(guess_system_internal), (_g_get_unix_mounts),
	(_g_get_unix_mount_points), (g_get_unix_mount_at),
	(g_unix_mount_free), (g_unix_mount_compare),
	(g_unix_mount_get_mount_path), (g_unix_mount_get_device_path),
	(g_unix_mount_get_fs_type), (g_unix_mount_is_readonly),
	(g_unix_mount_is_system_internal), (g_unix_mount_guess_type),
	(type_to_icon), (g_unix_mount_guess_name),
	(g_unix_mount_guess_icon), (g_unix_mount_point_guess_name),
	(g_unix_mount_point_guess_icon), (_canonicalize_filename),
	(_resolve_symlink), (_resolve_dev_root):
	* gunixmounts.h:
	* gunixvolume.c: (g_unix_volume_finalize), (_g_unix_volume_new),
	(_g_unix_volume_disconnected), (_g_unix_volume_set_mount),
	(_g_unix_volume_unset_mount), (g_unix_volume_get_icon),
	(g_unix_volume_get_name), (g_unix_volume_can_mount),
	(g_unix_volume_get_drive), (g_unix_volume_get_mount),
	(_g_unix_volume_has_mount_path), (mount_cb), (mount_read_error),
	(g_unix_volume_mount), (g_unix_volume_mount_finish),
	(g_unix_volume_volume_iface_init):
	* gunixvolume.h:
	* gunixvolumemonitor.c: (g_unix_volume_monitor_finalize),
	(get_mounts), (get_volumes), (get_connected_drives),
	(get_mount_for_mount_path), (g_unix_volume_monitor_class_init),
	(mountpoints_changed), (mounts_changed),
	(g_unix_volume_monitor_init),
	(_g_unix_volume_monitor_lookup_volume_for_mount_path),
	(find_mount_by_mountpath), (update_volumes), (update_mounts):
	* gunixvolumemonitor.h:
	* gvolume.c: (g_volume_get_mount), (g_volume_can_mount),
	(g_volume_mount), (g_volume_mount_finish):
	* gvolume.h:
	* gvolumemonitor.c: (g_volume_monitor_class_init),
	(g_volume_monitor_get_connected_drives),
	(g_volume_monitor_get_volumes), (g_volume_monitor_get_mounts):
	* gvolumemonitor.h:


svn path=/trunk/; revision=6095
2007-12-11 21:23:55 +00:00
Matthias Clasen
a26502d794 Close the gap
svn path=/trunk/; revision=6091
2007-12-10 18:54:24 +00:00
Matthias Clasen
355d85b171 Install gdesktopappinfo as unix-specific api
svn path=/trunk/; revision=6090
2007-12-10 18:51:21 +00:00
Tor Lillqvist
83445755b3 Add some more G_OS_WIN32 conditionals to silence gcc warnings.
2007-12-10  Tor Lillqvist  <tml@novell.com>

	* glocalfile.c: Add some more G_OS_WIN32 conditionals to silence
	gcc warnings.


svn path=/trunk/; revision=6088
2007-12-10 15:24:53 +00:00
15:08:59 Tim Janik
cc3de68e21 http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html
2007-12-10 15:08:59  Tim Janik  <timj@imendio.com>

        * let g_warn_if_fail replace g_assert as discussed here:
          http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html

        * fix bug #502498: Test framework assertion failures should follow
        gcc error format.

        * gmessages.h, gmessages.c: deprecated g_assert_warning() which is
        unused now. removed g_assert*() definitions whcih are provided by 
        gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail()  
        which are recommended as g_assert/g_assert_not_reached replacements
        for non-test programs.
        added g_warn_message() to implement g_warn_*() macros.
        use emacs-next-error friendly formatting for file:line: for warnings.

        * gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting.
        implement g_assert_not_reached() with g_assertion_message() and
        g_assert() in terms of g_assertion_message_expr() so we'll be able to
        provide assertion messages in test logs.

        * gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail()
        or g_return_if_fail() where suitable.

        * gio/: changed g_assert to g_warn_if_fail.



svn path=/trunk/; revision=6086
2007-12-10 14:07:42 +00:00
Alexander Larsson
51eb9d19bd Don't hardcode '/' (#502727)
2007-12-10  Alexander Larsson  <alexl@redhat.com>

	* gfile.c (g_file_set_display_name):
	Don't hardcode '/' (#502727)


svn path=/trunk/; revision=6084
2007-12-10 11:19:41 +00:00
Hans Breuer
d527cd5d9b follow lib naming convention working implementation for user and group
2007-12-09  Hans Breuer  <hans@breuer.org>

	* makefile.msc : follow lib naming convention
	* glocalfileinfo.c(win32_get_file_user_info) : working implementation
	for user and group name, tested with ../tests/gio-ls


svn path=/trunk/; revision=6080
2007-12-09 22:10:40 +00:00
A. Walton
ab69ee2945 More documentation cleanup and filling in missing information, bringing
2007-12-09  A. Walton  <awalton@svn.gnome.org>

	* gdesktopappinfo.c:
	* gdrive.c:
	* gdrive.h:
	* gfile.c:
	* gfile.h:
	* gfileattribute.c:
	* gfileenumerator.c:
	* gioerror.c:
	* gioscheduler.c:
	* gioscheduler.h:
	* gloadableicon.c:
	* gmemoryinputstream.c:
	* gmemoryoutputstream.c:
	* goutputstream.h:
	* gsimpleasyncresult.c:
	More documentation cleanup and filling in missing information, 
bringing
	GIO to 99% symbol coverage.

svn path=/trunk/; revision=6077
2007-12-09 15:51:12 +00:00
Hans Breuer
b877c83cdc removed -GD to compile with msvc9 (vs2008) with less complains
2007-12-09  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
	with msvc9 (vs2008) with less complains
	
	* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
	msv8 (vs2005) and above
	
	* glib/gfileutils.c : s/stricmp/_stricmp/
	* msvc_recommended_pragmas.h : work around Microsoft's premature 
	attempt to deprecate the C-Library

	* tests/makefile.msc.in : added checksum-test


svn path=/trunk/; revision=6076
2007-12-09 14:38:26 +00:00
Christian Persch
3c3d3e25ff Add forgotten #ifdef G_OS_WIN32 to fix the build on linux.
2007-12-08  Christian Persch  <chpe@gnome.org>

	* gio/glocalfileinfo.c: (get_thumbnail_attributes): Add forgotten
	#ifdef G_OS_WIN32 to fix the build on linux.

svn path=/trunk/; revision=6074
2007-12-08 14:29:37 +00:00
Hans Breuer
a33f8a7564 [gio compiles and links on win32, not sure how much already works] ifdefed
2007-12-08  Hans Breuer  <hans@breuer.org>

	[gio compiles and links on win32, not sure how much already works]
	* glocaldirectorymonitor.c : ifdefed out inotify emulation for win32
	* glocalfile.c : use HAVE_UNISTD_H; implement file system size info 
	base on win32 API; prefer g_lstat() over lstat(); instead of 
	localtime_r() use an all GLib implementation on win32;
	get_mount_info() still needs a win32 specifc implementation
	* glocalfileinfo.c : use HAVE_*_H; start of implementation of 
	win32_get_file_user_info to get owner/group info without uid/gid
	* glocalfileinputstream.c : include <io.h> on win32
	* glocalfileoutputstream.c : include <io.h> on win32 and some S_IS*
	definition, use g_win32_ftruncate() for G_OS_WIN32
	* gwin32appinfo.c : optionalize a bunch on #ifdef AssocQueryString
	it is available with mingw/w32api but a mess with the M$ Platform SDKs
	see: http://mail.gnome.org/archives/gtk-devel-list/2007-December/msg00014.html
	* makefile.msc : updated


svn path=/trunk/; revision=6070
2007-12-08 12:01:06 +00:00
Alexander Larsson
14d96a3061 Avoid warning spew if error == NULL
2007-12-07  Alexander Larsson  <alexl@redhat.com>

	* glocalfileenumerator.c (_g_local_file_enumerator_new):
	Avoid warning spew if error == NULL


svn path=/trunk/; revision=6065
2007-12-07 11:47:31 +00:00
Alexander Larsson
59cf55a08f Update docs wrt etags
2007-12-07  Alexander Larsson  <alexl@redhat.com>

	* gfile.c:
	Update docs wrt etags


svn path=/trunk/; revision=6064
2007-12-07 09:16:32 +00:00
Alexander Larsson
6356a9dd98 Include sys/types.h for dev_t (#501919)
2007-12-06  Alexander Larsson  <alexl@redhat.com>

	* glocalfileinfo.h:
	Include sys/types.h for dev_t (#501919)



svn path=/trunk/; revision=6057
2007-12-06 09:33:59 +00:00
Behdad Esfahbod
66f1845caa Make abicheck and pltcheck pass.
2007-12-06  Behdad Esfahbod  <behdad@gnome.org>

        * gio.symbols:
        * pltcheck.sh:
        Make abicheck and pltcheck pass.


svn path=/trunk/; revision=6054
2007-12-06 05:39:18 +00:00
Alexander Larsson
3869c33a73 Added.
2007-12-05  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * giomodule-priv.h: Added.
        * glocaldirectorymonitor.c:
        * glocalfilemonitor.c:
        * gunionvolumemonitor.c:
        * gvfs.c:
	Actually add the declaration of _g_io_modules_ensure_loaded


svn path=/trunk/; revision=6051
2007-12-05 11:10:21 +00:00
Alexander Larsson
4f039bd490 Fix warnings
2007-12-05  Alexander Larsson  <alexl@redhat.com>

        * gdatainputstream.c:
	Fix warnings
	
        * gio.symbols:
        * giomodule.[ch]
        * glocaldirectorymonitor.c:
        * glocalfilemonitor.c:
        * gunionvolumemonitor.c:
        * gvfs.c:
	Make g_io_modules_ensure_loaded a private function and
	don't pass in the dirname. This means we can do magic
	directory finding in the win32 version.
	Export the actual load-modules-in-directory code so that
	gvfs can reuse that.


svn path=/trunk/; revision=6050
2007-12-05 11:05:49 +00:00
Alexander Larsson
2c362b7f9e Rename all struct members named: read, write, close, truncate, or mount to
2007-12-05  Alexander Larsson  <alexl@redhat.com>

        * gbufferedinputstream.c:
        * gbufferedoutputstream.c:
        * gdrive.[ch]:
        * gfile.[ch]:
        * gfileenumerator.[ch]:
        * gfileinputstream.c:
        * gfileoutputstream.[ch]:
        * gfilterinputstream.c:
        * gfilteroutputstream.c:
        * ginputstream.[ch]:
        * glocalfile.c:
        * glocalfileenumerator.c:
        * glocalfileinputstream.c:
        * glocalfileoutputstream.c:
        * gmemoryinputstream.c:
        * gmemoryoutputstream.c:
        * goutputstream.[ch]:
        * gseekable.[ch]:
        * gunixdrive.c:
        * gunixinputstream.c:
        * gunixoutputstream.c:
	Rename all struct members named:
	read, write, close, truncate, or mount
	to foo_fn, as these are reserved names
	and could be defined as macros in libc.
	(#501645)


svn path=/trunk/; revision=6048
2007-12-05 10:38:03 +00:00
Emmanuele Bassi
d013d46b98 Replace the copy-and-paste MD5 digest generation with GChecksum.
2007-12-04  Emmanuele Bassi  <ebassi@gnome.org>

	* gio/glocalfileinfo.c: Replace the copy-and-paste MD5 digest
	generation with GChecksum.

svn path=/trunk/; revision=6043
2007-12-04 16:33:24 +00:00
Alexander Larsson
74e95b90d2 Only call flush if non-null.
2007-12-04  Alexander Larsson  <alexl@redhat.com>

        * goutputstream.c:
        (g_output_stream_close):
	Only call flush if non-null.


svn path=/trunk/; revision=6040
2007-12-04 10:44:49 +00:00
Dan Winship
117de38f04 Make this take a GError and return a gboolean, and do the "outstanding
2007-11-30  Dan Winship  <danw@gnome.org>

	* ginputstream.c (g_input_stream_set_pending): Make this take a
	GError and return a gboolean, and do the "outstanding operation"
	check (and the "stream is already closed" check) itself.
	(g_input_stream_clear_pending): Formerly set_pending(FALSE).

	* goutputstream.c (g_output_stream_set_pending)
	(g_output_stream_clear_pending): Likewise

	* gbufferedinputstream.c: 
	* gfileinputstream.c: 
	* gfileoutputstream.c: Update for that

	* gsimpleasyncresult.c (g_simple_async_report_gerror_in_idle):
	Like g_simple_async_report_error_in_idle, but takes a GError
	rather than building one.


svn path=/trunk/; revision=6039
2007-12-04 08:57:04 +00:00
Dan Winship
b22aa6dde6 Don't cheat and unset the "pending" flag around inner calls. Instead, call
2007-11-30  Dan Winship  <danw@gnome.org>

	* goutputstream.c: Don't cheat and unset the "pending" flag around
	inner calls. Instead, call the class method directly rather than
	the wrapper function that checks "pending"


svn path=/trunk/; revision=6038
2007-12-04 08:55:51 +00:00
Behdad Esfahbod
a38a770636 Fix EXTRA_DIST automake warnings. (#501107)
2007-12-03  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gnulib/Makefile.am: Fix EXTRA_DIST automake warnings. (#501107)


svn path=/trunk/; revision=6029
2007-12-04 00:35:42 +00:00
Hans Breuer
43ae389211 [start of port to win32/msvc] HAVE_UNIST_H and _pipe() only include
2007-12-03  Hans Breuer  <hans@breuer.org>

	[start of port to win32/msvc]
	* gcancellable.c : HAVE_UNIST_H and _pipe()
	* gcontenttype.c : only include <dirent.h> in the UNIX branch
	* gdatainputstream.c : pointer arithmetic on void* is a gcc extension
	* gdummyfile.c glocalfileinputstream.c gsimpleasyncresult.c : use 
	HAVE_UNIST_H
	* glocalfileoutputstream.c : use HAVE_UNIST_H and s/ssize_t/gssize/
	* glocalvfs.c : use HAVE_PWD_H
	* gio.symbols : ifdef unix specific functions with G_OS_UNIX
	* makefile.msc : new file (maybe later converted to makefile.msc.in)
	* Makefile.am : added to EXTRA_DIST

svn path=/trunk/; revision=6027
2007-12-03 22:37:44 +00:00
Matthias Clasen
e6588b7a23 Improve docs
svn path=/trunk/; revision=6020
2007-12-03 18:25:24 +00:00
Alexander Larsson
7561ec5765 Add xattr checks for OSX style API (#500506) 2007-12-03 Alexander Larsson
2007-12-03  Alexander Larsson  <alexl@redhat.com>

        * configure.in:
	Add xattr checks for OSX style API (#500506)
2007-12-03  Alexander Larsson  <alexl@redhat.com>

        * glocalfileinfo.c:
	Handle OSX style xattrs API (#500506)



svn path=/trunk/; revision=6017
2007-12-03 10:23:03 +00:00
Alexander Larsson
6394ae6fdb Add G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag
2007-12-03  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * glocalfile.c:
	Add G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag



svn path=/trunk/; revision=6015
2007-12-03 09:11:48 +00:00
A. Walton
6f605509fd Documentation accuracy fixes.
2007-12-02  A. Walton  <awalton@svn.gnome.org>

	* gfile.c:
	* gfileattribute.c:
	Documentation accuracy fixes.


svn path=/trunk/; revision=6014
2007-12-02 12:32:27 +00:00
Behdad Esfahbod
be869457d4 Fix typo.
2007-12-01  Behdad Esfahbod  <behdad@gnome.org>

        * gioenumtypes.c.template: Fix typo.


svn path=/trunk/; revision=6013
2007-12-01 23:49:34 +00:00
Matthias Clasen
264aa4cd8a Make threadsafe get_type() functions.
2007-12-01  Matthias Clasen <mclasen@redhat.com>

        * gioenumtypes.c.template: Make threadsafe get_type() functions.



svn path=/trunk/; revision=6011
2007-12-01 17:40:19 +00:00
Matthias Clasen
2e67aabed7 Some more property work
svn path=/trunk/; revision=6008
2007-12-01 06:12:45 +00:00
Matthias Clasen
e919f0198b Don't mark buffer-size property as construct-only
svn path=/trunk/; revision=6007
2007-12-01 05:28:46 +00:00
Matthias Clasen
d8266ffb8f Add properties
svn path=/trunk/; revision=6006
2007-12-01 05:25:40 +00:00
Matthias Clasen
650c65e892 Doc improvements
svn path=/trunk/; revision=6005
2007-12-01 04:38:29 +00:00
Matthias Clasen
af5372bfe2 Add properties
svn path=/trunk/; revision=6004
2007-12-01 04:29:14 +00:00
Matthias Clasen
651efa855c Add properties
svn path=/trunk/; revision=6003
2007-12-01 02:53:34 +00:00
Matthias Clasen
ff0acf0af6 Templates for enum registration
2007-11-30  Matthias Clasen <mclasen@redhat.com>

        * gioenumtypes.[hc].template: Templates for enum registration

        * Makefile.am: Generate gioenumtypes.[hc]

        * gio.h: Include gioenumtypes.h
        * gappinfo.h:
        * gfile.h: Add some explicit nicks.

        * gio.symbols: Add new symbols

        * pltcheck.sh: Adjust



svn path=/trunk/; revision=6002
2007-12-01 01:53:00 +00:00
Matthias Clasen
c524cabff2 Add docs for etags
svn path=/trunk/; revision=6001
2007-11-30 18:11:03 +00:00
Matthias Clasen
3d8579f93a Explain I/O priorieties
svn path=/trunk/; revision=6000
2007-11-30 05:51:10 +00:00
Matthias Clasen
a2ca589703 More coding style fixes
svn path=/trunk/; revision=5999
2007-11-30 05:11:25 +00:00
Matthias Clasen
d80f09239e More doc improvements
svn path=/trunk/; revision=5997
2007-11-29 20:35:23 +00:00
Andrew Walton
2ae7c09063 Quick Changelog fix.
svn path=/trunk/; revision=5995
2007-11-29 10:24:48 +00:00
Andrew Walton
0c867d3444 Fixes unknown meaning in GAppLaunchContext docs. Clarify asynchronous ops.
* gappinfo.c:
	  Fixes unknown meaning in GAppLaunchContext docs.
	* gfile.c:
	  Clarify asynchronous ops.
	* gfileattribute.c:
	  Fix entity tag docs.
	* gicon.c:
	* gthemedicon.c:
	  Provides missing gtk-doc section, fixes API docs slighly.
	* gsimpleasyncresult.c:
	  Fill in missing info in docs.
	* gunixinputstream.c:
	* gunixoutputstream.c:
	  Be more expressive in short description.
	* gunixvolume.c:
	  Remove gtk-doc stubs for non-public API.


svn path=/trunk/; revision=5994
2007-11-29 10:18:55 +00:00
Matthias Clasen
09471fec46 Coding style fixups
svn path=/trunk/; revision=5993
2007-11-29 07:17:59 +00:00
Matthias Clasen
7c0e098f4e Don't export the inotify lock
svn path=/trunk/; revision=5992
2007-11-29 03:39:01 +00:00
Matthias Clasen
af101f1c9f Fix copy-and-paste leftovers
svn path=/trunk/; revision=5981
2007-11-28 18:45:08 +00:00
Matthias Clasen
07526e709a Improve consistency of enumerations
svn path=/trunk/; revision=5979
2007-11-28 18:38:53 +00:00
Alexander Larsson
d9594f5709 Removed unnecessary file
2007-11-28  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * gdriveprivate.h:
	Removed unnecessary file
	
        * gdesktopappinfo.[ch]:
        * gdummyfile.[ch]:
        * gfile.c:
        * glocaldirectorymonitor.[ch]:
        * glocalfile.[ch]:
        * glocalfileenumerator.[ch]:
        * glocalfileinputstream.[ch]:
        * glocalfilemonitor.[ch]:
        * glocalfileoutputstream.[ch]:
        * glocalvfs.[ch]:
        * gnativevolumemonitor.c:
        * gpollfilemonitor.[ch]:
        * gunionvolumemonitor.[ch]:
        * gunixdrive.[ch]:
        * gunixvolume.[ch]:
        * gunixvolumemonitor.[ch]:
        * gvfs.c:
        * gvolumeprivate.h:
        * inotify/ginotifydirectorymonitor.[ch]:
        * inotify/ginotifyfilemonitor.[ch]:
        * inotify/inotify-helper.c:
	Append _ to all internal functions
	
        * gio.symbols:
	Add missing symbols
	Export symbols needed for modules


svn path=/trunk/; revision=5977
2007-11-28 16:01:59 +00:00
Emmanuele Bassi
6ce14033c7 Remove makegioalias.pl from the marshal files and avoid it being cleaned
2007-11-28  Emmanuele Bassi  <ebassi@gnome.org>

	* gio/Makefile.am: Remove makegioalias.pl from the marshal files
	and avoid it being cleaned up when running make clean.

svn path=/trunk/; revision=5974
2007-11-28 14:42:29 +00:00
Alexander Larsson
7f3280230b Added. Added. Added. Added.
2007-11-28  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * abicheck.sh: Added.
        * makegioalias.pl: Added.
        * pltcheck.sh: Added.
        * gio.symbols: Added.
	* *.c:
        * inotify/*.c
	Initial work on adding symbol handling.

	* gvfs.h:
	Correct ifdef guard name

        * fam/Makefile.am:
        * inotify/Makefile.am:
        * xdgmime/Makefile.am:
	Include toplevel Makefile.decl


svn path=/trunk/; revision=5972
2007-11-28 12:39:07 +00:00
Matthias Clasen
61582bd91c Another round of trivial doc fixes
svn path=/trunk/; revision=5970
2007-11-28 06:43:33 +00:00
Matthias Clasen
54e52e099e More trivial doc fixes
svn path=/trunk/; revision=5968
2007-11-28 06:01:13 +00:00
Matthias Clasen
442e8df1b8 Clean up some docs
svn path=/trunk/; revision=5966
2007-11-28 04:29:02 +00:00
Andre Klapper
98c89274e1 Fix a typo.
2007-11-28  Andre Klapper  <a9016009@gmx.de>

	* gdesktopappinfo.c: Fix a typo.


svn path=/trunk/; revision=5962
2007-11-27 23:59:38 +00:00
Andre Klapper
1b4453a12f Fix a typo.
2007-11-27  Andre Klapper  <a9016009@gmx.de>

	* glocalfileoutputstream.c: Fix a typo.


svn path=/trunk/; revision=5959
2007-11-27 16:29:54 +00:00
Alexander Larsson
575c279d1c Don't include removed headers
2007-11-27  Alexander Larsson  <alexl@redhat.com>

	* gio.h:
	Don't include removed headers


svn path=/trunk/; revision=5957
2007-11-27 15:21:50 +00:00
Alexander Larsson
77657981f0 Removed. Removed. Added. Added. Renamed GSocket*Stream to GUnix*Stream and
2007-11-27  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * gsocketinputstream.[ch]: Removed.
        * gsocketoutputstream.[ch]: Removed.
        * gunixinputstream.[ch]: Added.
        * gunixoutputstream.[ch]: Added.
	Renamed GSocket*Stream to GUnix*Stream and made
	it unix-only, since its not really only for sockets
	and it only works on unix (but is highly useful there).



svn path=/trunk/; revision=5956
2007-11-27 15:08:03 +00:00
Alexander Larsson
e3607fcdf3 Moved gurifuncs from gio to glib
2007-11-27  Alexander Larsson  <alexl@redhat.com>

        * gio/Makefile.am:
        * gio/gurifuncs.[ch]:
        * glib/Makefile.am:
        * glib/gstring.[ch]:
        * glib/gurifuncs.[ch]:
	Moved gurifuncs from gio to glib


svn path=/trunk/; revision=5955
2007-11-27 14:57:45 +00:00
Alexander Larsson
68c74ba68f Move g_format_file_size_for_display from gio to glib
2007-11-27  Alexander Larsson  <alexl@redhat.com>

        * gio/gfileinfo.[ch]:
        * glib/gfileutils.[ch]:
        Move g_format_file_size_for_display from gio to glib


svn path=/trunk/; revision=5954
2007-11-27 14:30:31 +00:00
Andrew Walton
5247f12f36 Bumps documentation to 93% symbol coverage, touching most
of the public files. Fixes broken function documentation prototypes. 
	Fixes GCancellable inaccuracies. Removes unnecessary incomplete 
	gtk-doc headers in private files.

svn path=/trunk/; revision=5953
2007-11-27 14:00:13 +00:00
Juerg Billeter
6d071b4ab6 New functions for efficient access to buffer and simple single byte reads.
2007-11-27  Juerg Billeter  <j@bitron.ch>

	* gbufferedinputstream.c: (g_buffered_input_stream_peek_buffer),
	(g_buffered_input_stream_read_byte):
	* gbufferedinputstream.h:
	New functions for efficient access to buffer and simple single byte
	reads.

	* gdatainputstream.c: (scan_for_newline), (scan_for_chars),
	(g_data_input_stream_read_until):
	* gdatainputstream.h:
	Use peek_buffer to avoid memcpy in scan_for_newline, implement
	read_until with multiple stop chars.

svn path=/trunk/; revision=5952
2007-11-27 13:44:48 +00:00
Alexander Larsson
2490a699be Allow configuration of gio-module-dir
2007-11-27  Alexander Larsson  <alexl@redhat.com>

        * configure.in:
	Allow configuration of gio-module-dir
	
        * gio-2.0.pc.in:
	Export giomodules location as giomodule variable

2007-11-27  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * fam/Makefile.am:
        * inotify/Makefile.am:
	Use the user-specified giomoduledir


svn path=/trunk/; revision=5951
2007-11-27 12:39:14 +00:00
Alexander Larsson
9bd5e0d8e2 Makefile.am Add catch-all gio.h header Don't install gdummyfile.h
2007-11-27  Alexander Larsson  <alexl@redhat.com>

	* Makefile.am
	* gio.h:
	Add catch-all gio.h header
	Don't install gdummyfile.h


svn path=/trunk/; revision=5950
2007-11-27 10:46:45 +00:00
Matthias Clasen
13195ef836 Fix up a doc comment
svn path=/trunk/; revision=5943
2007-11-26 20:42:17 +00:00
Alexander Larsson
a78c4e833f Remove trailing whitespace
2007-11-26  Alexander Larsson  <alexl@redhat.com>

	* Makefile.am (gioinclude_HEADERS):
	Remove trailing whitespace
	


svn path=/trunk/; revision=5942
2007-11-26 16:36:52 +00:00
Alexander Larsson
3781343738 gio/ docs/reference/gio Merged gio-standalone into glib.
2007-11-26  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * configure.in:
        * gio-2.0-uninstalled.pc.in:
        * gio-2.0.pc.in: 
        * gio-unix-2.0-uninstalled.pc.in:
        * gio-unix-2.0.pc.in:
	* gio/
	* docs/reference/gio
	Merged gio-standalone into glib.
	
        * glib/glibintl.h:
        * glib/gutils.c:
	Export glib_gettext so that gio can use it
	Add P_ (using same domain for now)
	Add I_ as g_intern_static_string


svn path=/trunk/; revision=5941
2007-11-26 16:13:05 +00:00