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-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-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-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-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-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-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
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
* 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
* 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-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 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
* 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-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-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-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 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-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-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 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 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-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-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 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