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
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-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 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-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-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 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-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-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-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-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-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
* gio.symbols:
* gdesktopappinfo.[hc]: Add a function to create a
GDesktopAppInfo from a GKeyFile. Proposed by Josselin Mouette.
svn path=/trunk/; revision=7143
* 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-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-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 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 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-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
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 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-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-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-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-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-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-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 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 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 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-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-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-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-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-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