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
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-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-14 Alexander Larsson <alexl@redhat.com>
* fam/fam-helper.[ch]:
* fam/fam-module.c:
Shut down fam (including removing fam GSource) when
module is unloaded (#521513)
Patch from Joe Marcus Clarke
svn path=/trunk/; revision=6706
2008-03-14 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
(g_local_file_query_filesystem_info):
Use right define name for f_fstypename member check
2008-03-14 Alexander Larsson <alexl@redhat.com>
* configure.in:
Add required includes for f_fstypename member check.
svn path=/trunk/; revision=6703
2008-03-13 Tor Lillqvist <tml@novell.com>
* Makefile.am: Actually use the gio.def file when linking the
library on Windows. Produce .lib library for Microsoft's toolchain
when possible. Install the .lib and .def file like for the other
libraries of GLib.
svn path=/trunk/; revision=6700
2008-03-13 Tomas Bzatek <tbzatek@redhat.com>
* tests/live-g-file.c:
Include live-g-file in standard set of tests, making a temporary
directory in source structure.
Clean target directory before the tests (write mode only)
svn path=/trunk/; revision=6699
2008-03-12 Tor Lillqvist <tml@novell.com>
* glocalfileinfo.h: Introduce a macro GLocalFileStat that is the
normal struct stat on Unix but struct _stati64 on Windows to have
access to 64-bit file size information. Use that instead of struct
stat in the functions declared here in this private header.
* glocalfileinfo.c: Corresponding changes. Move some G_OS_WIN32,
S_ISLNK and HAVE_UTIMES ifdefs and add some more to avoid compiler
warnings about unused functions and variables. Don't set
meaningless attributes like inode numbers on Windows.
svn path=/trunk/; revision=6697
2008-03-11 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
* glocalfileinfo.[ch]:
Correctly implement can_trash by actually
looking for a trash dir, not just assuming
one exists.
svn path=/trunk/; revision=6679
2008-03-08 Tor Lillqvist <tml@novell.com>
* glocalfile.c: Define FILE_READ_ONLY_VOLUME if it is missing from
winnt.h. (#521145)
svn path=/trunk/; revision=6643
2008-03-07 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
(g_local_file_query_filesystem_info):
Use struct statfs.f_fstypename if availible (e.g. on OpenBSD)
Patch from Jasper Lievisse Adriaanse
svn path=/trunk/; revision=6638
2008-03-06 Tor Lillqvist <tml@novell.com>
* gfileinfo.h: Correct milliseconds to microseconds in the doc
comments for the *_USEC attributes.
svn path=/trunk/; revision=6634
2008-03-05 Alexander Larsson <alexl@redhat.com>
* gfilemonitor.c:
Make cancellation threadsafe (i.e.
guarantee its only done once, and always
done)
* glocaldirectorymonitor.c:
Make sure we the monitor lives while the
mounts_changed callback is being called (#520484)
svn path=/trunk/; revision=6630
2008-03-04 Alexander Larsson <alexl@redhat.com>
* gfile.c:
Remove deprecated symbols we kept for one release.
2008-03-04 Alexander Larsson <alexl@redhat.com>
* glib/gurifuncs.c:
Remove deprecated symbols we kept for one release.
svn path=/trunk/; revision=6621
2008-03-03 Alexander Larsson <alexl@redhat.com>
* gunionvolumemonitor.c:
* gvolumemonitor.h:
Fix the adopt_orphan_mount vfunc to take a
volume_monitor reference in an ABI compat way.
This change is not API compat, but the added
arg is not used in the only user of this vfunc, so
all we get is a harmless warning in gvfs (#520169)
svn path=/trunk/; revision=6618
2008-02-29 Alexander Larsson <alexl@redhat.com>
* glocalfileinfo.c:
(get_content_type):
Make sure empty files get text/plain type (#518720)
svn path=/trunk/; revision=6605
2008-02-25 Alexander Larsson <alexl@redhat.com>
* gfile.c:
Reintroduce g_file_contains_file, keep around for one
unstable release cycle to avoid crashing to many apps.
Make sure to delete after release.
svn path=/trunk/; revision=6586
2008-02-25 Alexander Larsson <alexl@redhat.com>
* gfilemonitor.c:
Emit actual change signals in an idle handler.
This avoids reentrance and locking problems in
the file notification backends.
svn path=/trunk/; revision=6584
2008-02-25 Alexander Larsson <alexl@redhat.com>
* gunixmounts.c:
(g_unix_mount_guess_should_display):
Remove type guessing, instead just display
mounts in /media and in ~/.
svn path=/trunk/; revision=6582
2008-02-25 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
Implement trashing and filesystem::readonly for win32 (#517235)
Patch from Yevgen Muntyan
svn path=/trunk/; revision=6578
2008-02-22 Alexander Larsson <alexl@redhat.com>
* gcontenttype.c (g_content_type_get_icon):
Look at old-style gnome mime icon names too, as many
have not moved to the new style.
svn path=/trunk/; revision=6557
2008-02-21 David Zeuthen <davidz@redhat.com>
* glocalfileinfo.c: (_g_local_file_info_get):
* gcontenttype.c:
(g_content_type_get_icon): Implement this function by
moving bits from glocalfileinfo.c
(g_content_type_get_description): Unalias before getting
description (#517687)
* gfile.c: (g_file_class_init),
(g_file_query_filesystem_info_async),
(g_file_query_filesystem_info_finish),
(query_filesystem_info_data_free),
(query_filesystem_info_async_thread),
(g_file_real_query_filesystem_info_async),
(g_file_real_query_filesystem_info_finish):
* gfile.h: Implement async version of
g_file_query_filesystem_info()
* gfileinfo.h: Add new attributes for filesystem::use-preview
* gio.symbols: Update
* gthemedicon.c: (g_themed_icon_append_name):
* gthemedicon.h: Add new new convenience function.
* gunionvolumemonitor.c: (g_union_volume_monitor_dispose),
(get_mounts), (get_volumes), (get_connected_drives),
(get_volume_for_uuid), (get_mount_for_uuid),
(g_union_volume_monitor_init), (populate_union_monitor),
(g_volume_monitor_get), (_g_mount_get_for_mount_path),
(g_volume_monitor_adopt_orphan_mount):
* gvolumemonitor.c:
* gvolumemonitor.h: Use recursive locks so it's safe for volume
monitor implementations to call into the main volume monitor. Also
separate object initialization and volume monitor initialization
such that non-native volume monitors can properly adopt their
mounts away.
svn path=/trunk/; revision=6550
2008-02-21 Alexander Larsson <alexl@redhat.com>
* gfile.[ch]:
* gio.symbols:
Add new g_file_has_prefix that does the same as g_file_contains_file.
Deprecate g_file_contains_file and add a macro that converts
it to g_file_has_prefix.
The reason for this change is that the contains_file() name seems to
imply that this does more work than what it does, but its really only
a name match (from #517086)
* gdummyfile.c:
* glocalfile.c:
* tests/g-file.c:
Update to match the above change.
svn path=/trunk/; revision=6546
2008-02-20 Benjamin Otte <otte@gnome.org>
* gfile.c: (g_file_mount_mountable), (g_file_unmount_mountable),
(g_file_eject_mountable):
even more cases of not returning in error path
svn path=/trunk/; revision=6545
2008-02-18 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
* glocalfileinfo.c:
* glocalfileoutputstream.c:
Use g_unlink/g_rename instead of unlink/rename;
do not pass raw filenames to g_set_error. (#517239)
Patch from Yevgen Muntyan.
svn path=/trunk/; revision=6533
2008-02-18 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
* glocalfileoutputstream.c:
Open files with O_BINARY on windows. (#517140)
svn path=/trunk/; revision=6531
2008-02-14 Alexander Larsson <alexl@redhat.com>
* glocalfileoutputstream.c:
Correctly check for HAVE_FCHMOD and HAVE_FCHOWN
svn path=/trunk/; revision=6518
2008-02-14 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
Copy permissions with file on copy (#514084)
This is what cp does and makes sure e.g. the
exec permissions are kept.
Its kinda weird in that it keeps the permission bits
the same while the uid and gid are different. However
the new uid is the user so its not a security issue,
and I've heard no complaints about cp on this issue.
svn path=/trunk/; revision=6514
2008-02-11 Alexander Larsson <alexl@redhat.com>
* gfile.[ch]:
* gmount.[ch]:
* gvolume.[ch]:
Added GMountMountFlags enum and added a flags
argument to all mount calls.
This is an API/ABI change for future extensibility,
as I think we will need at least an
inhibit-autorun flag (the panel needs this).
There are no flags defined yet though.
svn path=/trunk/; revision=6497