Commit Graph

959 Commits

Author SHA1 Message Date
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