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
2008-02-11 Alexander Larsson <alexl@redhat.com>
* gfileinfo.h:
Added new standard::description attribute.
Requested by Vincent, and useful for both
panel and nautilus
svn path=/trunk/; revision=6496
2008-02-09 Matthias Clasen <mclasen@redhat.com>
* gunixmounts.c: Consistently use getmntent_r() and fall
back to getmntent(). (#515492)
svn path=/trunk/; revision=6490
2008-02-06 Behdad Esfahbod <behdad@gnome.org>
* pltcheck.sh: Skip g_bit_*(). Inline functions may end up with
a local plt if the compiler doesn't support what we want. Bug #514702
svn path=/trunk/; revision=6469
2008-02-06 Tomas Bzatek <tbzatek@redhat.com>
* tests/Makefile.am:
* tests/live-g-file.c:
* tests/live-g-file.txt:
New GIO testing module working over real data
svn path=/trunk/; revision=6465
2008-02-06 Tomas Bzatek <tbzatek@redhat.com>
* glocalfileoutputstream.c (g_local_file_output_stream_close):
Fallback to rename() if link() is not available
(when no support on target filesystem)
svn path=/trunk/; revision=6464
2008-02-06 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
Update to use both mimeapps.list and
defaults.list as discussed on xdg list.
svn path=/trunk/; revision=6461
2008-02-06 Benjamin Otte <otte@gnome.org>
* gasyncresult.c:
* gfilenamecompleter.c:
Fix some typos in the documentation.
svn path=/trunk/; revision=6460
2008-02-06 Alexander Larsson <alexl@redhat.com>
* glocalfile.c (g_local_file_trash):
Don't succeed with trash if newly created
trash dir has the wrong owner. (#514696)
svn path=/trunk/; revision=6459
2008-02-05 Alexander Larsson <alexl@redhat.com>
* glocalfile.c (g_local_file_move):
Don't spew warnings when destination is not
a GLocalFile.
svn path=/trunk/; revision=6451
2008-02-02 Jonathon Jongsma <jjongsma@gnome.org>
* gio/gbufferedoutputstream.c:
* gio/gbufferedoutputstream.h: modify the new_sized() constructor to take a
gsize param instead of guint to match the GBufferedInputStream constructor.
svn path=/trunk/; revision=6448
2008-02-01 Michael Natterer <mitch@imendio.com>
* gcontenttype.c (_g_unix_content_type_get_parents): assign the
return value of xdg_mime_list_mime_parents() to a variable of the
correct type.
svn path=/trunk/; revision=6441
2008-02-01 Alexander Larsson <alexl@redhat.com>
* gappinfo.c (g_app_info_launch_uris):
Actually call the launch_uris method, not
launch.
2008-02-01 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c (g_desktop_app_info_equal):
Ensure appinfos with no id but same pointer value
compare equal
svn path=/trunk/; revision=6440
2008-01-30 Alexander Larsson <alexl@redhat.com>
* gappinfo.c:
Add doc comment about uris vs GFiles to
g_app_info_launch()
* gdesktopappinfo.c:
Ensure uris passed to g_app_info_launch_uris()
are not roundtriped through GFile (as that
may be slightly destructive for e.g. mailto: links)
svn path=/trunk/; revision=6424
2008-01-29 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
* gdesktopappinfo.h:
giomodule-priv.h include moved to .c file.
svn path=/trunk/; revision=6416
2008-01-29 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
Lazily create the desktop files for appinfos created
by g_app_info_create_from_commandline() when needed
for mime associations. This allows run-time use
of GAppInfo object without creating unnecessary
files on disk.
svn path=/trunk/; revision=6412
2008-01-29 Alexander Larsson <alexl@redhat.com>
* gfile.[ch]:
Add g_file_query_default_handler utility to easily look up
the GAppInfo that handles a file.
* gdesktopappinfo.[ch]:
* giomodule.c:
Set up an extension point for g_app_info_get_default_for_uri_scheme()
* gvfs.c:
Remove unused function
svn path=/trunk/; revision=6409
2008-01-29 Alexander Larsson <alexl@redhat.com>
* gfileenumerator.c:
Mention need to free returned value in
g_file_enumerator_next_files_finish docs.
Fix leak if g_file_enumerator_next_files_finish()
not called.
svn path=/trunk/; revision=6408
2008-01-29 Alexander Larsson <alexl@redhat.com>
* gcontenttype.c:
(_g_unix_content_type_get_parents):
Use list_parents, not get_parents from xdgmime, because
the later doesn't use the cache.
* xdgmime/xdgmimecache.c:
(_xdg_mime_cache_list_mime_parents):
Don't list the same type as parent multiple times.
svn path=/trunk/; revision=6407
2008-01-28 Alexander Larsson <alexl@redhat.com>
* glocalvfs.c:
Register local vfs with prio 0.
* gvfs.h:
Remove old name and prio class members
svn path=/trunk/; revision=6401
2008-01-27 Murray Cumming <murrayc@murrayc.com>
* gio/gfile.c: (g_file_replace_contents),
(g_file_replace_contents_finish): Document that the new_etags output
gchar* should be freed.
svn path=/trunk/; revision=6383
2008-01-25 Matthias Clasen <mclasen@redhat.com>
* gioscheduler.h: Make GIOSchedulerJobFunc return boolean
* gioscheduler.c: Keep calling io jobs until they return FALSE;
this allows big jobs to be executed in chunks, instead of blocking
the main loop for a long time.
* gsimpleasyncresult.c:
* giofile.c: Adapt callers.
svn path=/trunk/; revision=6375
2008-01-25 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
Implement changes discussed on xdg list.
Now we can add supported mimetypes by just using defaults.list
We can also remove associations in defaults.list.
svn path=/trunk/; revision=6374
2008-01-25 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
Don't make local copy of desktop file
for mimetype changes if the file already
supports the new mimetype.
svn path=/trunk/; revision=6372
2008-01-24 Alexander Larsson <alexl@redhat.com>
* gfile.[ch]:
* gfile.h:
* gio.symbols:
Add g_file_copy_async() (#511580)
Based on patch from Carlos Garcia Campos
svn path=/trunk/; revision=6363
2008-01-22 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
(canonicalize_filename):
Canonicalize paths that start with more than
two slashes.
* tests/g-file.c:
(compare_two_files):
(test_g_file_new_for_path):
Test the above
svn path=/trunk/; revision=6353
2008-01-21 Matthias Clasen <mclasen@redhat.com>
* glocal*.c:
* gvolumemanager.c: Whitespace cleanups.
* glocalfileoutputsteam.c (_g_local_file_output_stream_create):
Use the right mode when creating the file.
svn path=/trunk/; revision=6341
2008-01-21 Alexander Larsson <alexl@redhat.com>
* inotify/Makefile.am:
* inotify/inotify-helper.c:
* inotify/inotify-kernel.c:
* inotify/inotify-path.c:
* inotify/local_inotify.h: Removed.
* inotify/local_inotify_syscalls.h: Removed.
Removed the included copies of the inotify
headers. We now only use the <sys/inotify.h>
header which exists on modern systems.
This fixes problems on ARM and SH5 (#510448)
but is also generally much cleaner and future
safe. For instance, if other OSes add support
for inotify it should "just work".
svn path=/trunk/; revision=6338
2008-01-18 Murray Cumming <murrayc@murrayc.com>
* gappinfo.c:
* gcancellable.c:
* gfile.c: Fixed some minor typos in the
documentation.
svn path=/trunk/; revision=6331
2008-01-17 Alexander Larsson <alexl@redhat.com>
* gfile.h:
Add the async find_enclosing_mount version
to the header file too.
svn path=/trunk/; revision=6326
2008-01-17 Alexander Larsson <alexl@redhat.com>
* gfile.c:
Add async version of find_enclosing_mount
with default implementation.
svn path=/trunk/; revision=6325
2008-01-17 Alexander Larsson <alexl@redhat.com>
* gfile.c:
(g_file_copy):
(g_file_move):
Allow calls to implementation of copy and write
even if the type of the file implementations is
different. This can be used to implement native
upload and download calls in a vfs.
* glocalfile.c:
(g_local_file_move):
Protect against the case where move is called
with one file not being local.
Make sure we call the progress callback once
in the native move operation so that the caller
knows how many bytes were copied.
svn path=/trunk/; revision=6324
2008-01-15 Murray Cumming <murrayc@murrayc.com>
* gdrive.c:
* gfile.c:
* gmount.c:
* gvolume.c: For async functions that have no non-async
version, document that the GAsyncReadyCallback may be NULL.
Bug #509626.
svn path=/trunk/; revision=6318
2008-01-14 Alexander Larsson <alexl@redhat.com>
* gfile.c (g_file_monitor_file):
Don't set error here, since we fallback to polling monitor.
svn path=/trunk/; revision=6307
2008-01-10 Murray Cumming <murrayc@murrayc.com>
* gfileinfo.c: GFileInfo description: Mention
how to actually set attributes in a GFile and how to discover
which attributes are settable. Bug #508378.
svn path=/trunk/; revision=6293
2008-01-09 Murray Cumming <murrayc@murrayc.com>
* gfile.c: *_async() functions: Several small corrections
to the documentation, mostly correcting copy/paste errors
and improving some sentences.
svn path=/trunk/; revision=6287
2008-01-09 Alexander Larsson <alexl@redhat.com>
* gio.symbols:
* gunixmount.c:
* gunixmounts.[ch]:
Add g_unix_mount_guess_should_display and use
for unix volume monitor backend.
This means we more or less show what the
gnome-vfs backend did.
Based on patch from Padraig O'Briain
svn path=/trunk/; revision=6285
2008-01-09 Alexander Larsson <alexl@redhat.com>
* gio-marshal.list:
* gmountoperation.[ch]:
Change the API a bit so that unhandled methods
get reported via the reply, rather than by
the signal emission return value. This is because
some handlers can't know this immediately without
doing I/O, and this is an async operation that
should not block.
svn path=/trunk/; revision=6282
2008-01-07 Alexander Larsson <alexl@redhat.com>
* Makefile.am:
Build test subdir after .
Remove gdirectorymonitor.[ch]
* gdirectorymonitor.[ch]:
* gfilemonitor.c:
* gfile.[ch]:
* gio.h:
Remove GDirectoryMonitor and make
GFileMonitor the baseclass for both file and
directory monitors. Lift the more generic
rate limiting code from GDirectoryMonitor
into GFileMonitor.
* fam/fam-helper.c:
* fam/gfamdirectorymonitor.[ch]:
* inotify/ginotifydirectorymonitor.[ch]:
* inotify/inotify-helper.c:
* glocaldirectorymonitor.[ch]:
* glocalfile.c:
* gvolumemonitor.c:
Update for the removed GDirectoryMonitor.
* gmemoryoutputstream.c:
Remove ununsed variable
svn path=/trunk/; revision=6262
2008-01-07 Alexander Larsson <alexl@redhat.com>
* gmemoryinputstream.c:
Translate error strings
* gio.symbols:
* gmemoryoutputstream.[ch]:
New implementation that avoids using GByteArray
in implementation and API. (#506377)
svn path=/trunk/; revision=6260
2008-01-04 Alexander Larsson <alexl@redhat.com>
* gio-marshal.list:
* gmountoperation.c:
Use the right type (uint) for the ask_password signal.
svn path=/trunk/; revision=6244
2008-01-04 Alexander Larsson <alexl@redhat.com>
* gappinfo.[ch]:
* gwin32appinfo.c:
* gio.symbols:
Add g_app_info_supports_files()
Remove desktop arg from g_app_info_should_show().
* gdesktopappinfo.[ch]:
Implement g_app_info_supports_files() and new should_show()
Add g_desktop_app_info_set_desktop_env() to set the desktop
for should_show(). (This will be set by gtk+ later)
svn path=/trunk/; revision=6242
2008-01-04 Alexander Larsson <alexl@redhat.com>
* gio.symbols:
* gmemoryinputstream.[ch]:
Improve API so that you can use multile chunks
of memory and custom destroy functions. (#506374)
svn path=/trunk/; revision=6241
2008-01-03 Alexander Larsson <alexl@redhat.com>
* gfileinfo.c:
Handle NULL attribute matchers safely, as we return this
for empty attribute matcher strings.
svn path=/trunk/; revision=6238
2008-01-03 Alexander Larsson <alexl@redhat.com>
* gunixmounts.c (g_unix_is_mount_path_system_internal):
Add /usr/local to list of internal mountpoints
svn path=/trunk/; revision=6237
2008-01-03 Alexander Larsson <alexl@redhat.com>
* fam/Makefile.am:
Link to libglib and libgobject directly (#504879)
Patch from Sebastien Bacher
svn path=/trunk/; revision=6234
2008-01-02 Alvaro Lopez Ortega <alvaro@sun.com>
* gio/gunixmount.c (g_unix_mount_unmount, g_unix_mount_eject):
These void functions were trying to return a value. It was causing
the compilation to fail.
svn path=/trunk/; revision=6232
2008-01-01 Wouter Bolsterlee <wbolster@svn.gnome.org>
* gfile.c: Expanded the g_file_new_for_commandline_arg
description a bit, based on the code and the docs of the
other g_file_new_for_* functions.
svn path=/trunk/; revision=6229
* gcontenttype.c: Describe memory management for return value of
g_content_types_get_registered(). Missing piece from #505815.
* gdrive.c, gmount.c, gvolumemonitor.c: Add more description to
GVolume, GDrive, GMounts, which hopefully gives the user less
confusions when using this API. Following explainations from
Alexander Larsson on gtk-devel-list.
svn path=/trunk/; revision=6222
2007-12-30 Matthias Clasen <mclasen@redhat.com>
* gdesktopfileinfo.c (g_app_info_get_all): Don't include NULLs
in the list of returned app infos.
svn path=/trunk/; revision=6218
2007-12-25 Paolo Borelli <pborelli@katamail.com>
* glocalfileinfo.c (set_info_from_stat): fix typo in the ifdef
used to detect statbuf->st_blocks. (#505042)
svn path=/trunk/; revision=6202
2007-12-19 Alexander Larsson <alexl@redhat.com>
* giomodule.c:
Make g_io_modules_load_all_in_directory not unuse
loaded modules so that users of it can do stuff
before unloading.
Init internal "module" types.
Initialize static prio and name for types so that
we don't have to load modules to get it.
* gnativevolumemonitor.h:
* gvolumemonitor.h:
Move is_supported to parent class so that
non-native monitors can avoid being initialized
too. (For instance GDaemonVolumeMonitor if we're
not using GDaemonVfs.)
* glocaldirectorymonitor.[ch]:
* glocalfilemonitor.[ch]:
* gunionvolumemonitor.c:
* gunixvolumemonitor.c:
* gvfs.c:
Find plugins using the static prio+name to
avoid unnecessarily loading the modules.
svn path=/trunk/; revision=6159
2007-12-19 Alexander Larsson <alexl@redhat.com>
* gunionvolumemonitor.c:
Store the native type as GType, not class so that
we can unload it. But still avoid unnecessarily
unload modules.
svn path=/trunk/; revision=6156
2007-12-17 Alexander Larsson <alexl@redhat.com>
* gnativevolumemonitor.h:
* gunionvolumemonitor.c:
* gunixvolumemonitor.c:
Add is_supported() to GNativeVolumeMonitorClass so
that we can avoid having to create an object to see
if the backend is supported at runtime.
Also add name member and an env var to pick a specific
volume monitor backend.
* gmountprivate.h:
* glocalfile.c:
Add cancellable to _g_mount_get_for_mount_path()
* glocaldirectorymonitor.c:
* glocalfilemonitor.c:
Avoid loading and unloading modules while sorting.
svn path=/trunk/; revision=6144
2007-12-17 Alexander Larsson <alexl@redhat.com>
* gfile.c:
Add doc comments about what GFile operations are
guaranteed to not block.
svn path=/trunk/; revision=6142
2007-12-14 David Zeuthen <davidz@redhat.com>
* Makefile.am:
* gio.symbols:
* gmount.c: (g_mount_get_uuid), (g_mount_can_eject),
(g_mount_eject), (g_mount_eject_finish):
* gmount.h:
* gunionvolumemonitor.c: (g_union_volume_monitor_finalize),
(get_volume_for_uuid), (get_mount_for_uuid),
(g_union_volume_monitor_class_init),
(get_default_native_type_with_exclude), (get_default_native_type),
(get_native_type), (update_native_type),
(g_union_volume_monitor_init), (_g_mount_get_for_mount_path):
* gunixmount.c: (_g_unix_mount_new), (g_unix_mount_get_uuid),
(g_unix_mount_can_eject), (eject_unmount_cb),
(eject_unmount_read_error), (eject_unmount_do),
(g_unix_mount_unmount), (g_unix_mount_eject),
(g_unix_mount_eject_finish), (g_unix_mount_mount_iface_init):
* gunixmounts.c: (g_unix_mount_guess_can_eject),
(g_unix_mount_point_guess_can_eject):
* gunixmounts.h:
* gunixvolume.c: (_g_unix_volume_new), (g_unix_volume_get_uuid),
(g_unix_volume_can_eject), (g_unix_volume_get_drive),
(eject_mount_cb), (eject_mount_read_error), (eject_mount_do),
(g_unix_volume_mount), (g_unix_volume_eject),
(g_unix_volume_eject_finish), (g_unix_volume_volume_iface_init):
* gunixvolumemonitor.c: (get_volume_for_uuid),
(get_mount_for_uuid), (g_unix_volume_monitor_class_init),
(update_mounts):
* gvolume.c: (g_volume_get_uuid), (g_volume_can_eject),
(g_volume_eject), (g_volume_eject_finish):
* gvolume.h:
* gvolumemonitor.c: (g_volume_monitor_get_volume_for_uuid),
(g_volume_monitor_get_mount_for_uuid):
* gvolumemonitor.h:
Provide eject() on both GMount and GVolume and utility functions
to guess whether a GUnixMountPoint or GUnixMountEntry should be
ejected. Introduce the concept of UUID's and wire it into GVolume
and GMount and provide API on GVolumeMonitor to find such
instances. Also handle the case where an external
GNativeVolumeMonitor fails to initialize. Lock around the
_g_get_mount_for_mount_path() function such that volume monitor
implementations won't have to do locking themselves.
svn path=/trunk/; revision=6140
2007-12-14 Alexander Larsson <alexl@redhat.com>
* Makefile.am:
* gfileattribute.[ch]:
* gfileattribute-priv.h:
Move GFileAttributeValue to a private header, as
its sort of ugly.
* gfile.[ch]:
Make set_attribute take a type + a pointer instead
of a GFileAttributeValue.
* gfileinfo.[ch]:
Fix up for above changes.
Add g_file_info_get_attribute_data to get
all info in one call, g_file_info_get_attribute_status
to get the status and g_file_info_get_attribute_as_string.
* gio.symbols:
* glocalfile.c:
* glocalfileinfo.[ch]:
Update for changes
* gunixmounts.c:
Make _guess_type static.
svn path=/trunk/; revision=6129
2007-12-14 Alexander Larsson <alexl@redhat.com>
* gappinfo.h:
* gfile.[ch]:
* gfileattribute.[ch]:
* gio.symbols:
* glocalfile.c:
* glocalfileoutputstream.c:
* gmountoperation.[ch]:
* goutputstream.[ch]:
Clean up all flags enums to not have _FLAGS in them
Make the names of some of the enums better.
* glocalfileinfo.c:
Fix warning
svn path=/trunk/; revision=6119
2007-12-14 Alexander Larsson <alexl@redhat.com>
* gioscheduler.[ch]:
* gsimpleasyncresult.c:
Rename gioscheduler calls so they all use the g_io_schedule_ prefix.
Split out the send_to_mainloop call into two versions instead
of having the block argument.
svn path=/trunk/; revision=6116
2007-12-12 Alexander Larsson <alexl@redhat.com>
* gfileattribute.c:
* gfileinfo.[ch]:
* glocalfile.c:
* glocalfileinfo.c:
Make attribute namespace separator "::" instead of ":".
Use - instead of _ as separator in attribute names.
svn path=/trunk/; revision=6104
2007-12-12 Alexander Larsson <alexl@redhat.com>
* gdrive.h:
* gmount.h:
* gvolume.h:
No need for padding for interfaces
svn path=/trunk/; revision=6101
2007-12-11 David Zeuthen <davidz@redhat.com>
Rework how volumes, drives and volume monitoring is
done. Previosly the model was
GDrive <1-1> GVolume
where a GDrive instance represented a mount point and a GVolume
instance represented a mounted file system. This patch changes it
the model to
GDrive <1-N> GVolume <1-1> GMount
where GMount now serves the purpose of the old GVolume and the new
GVolume serves the purpose of the old GDrive. In addition the new
GDrive interface is used to represent a collection of GVolume
instances (typically partitions) and also contains utility to query
the state of the physical drive the GDrive object represents (such
as checking for media, polling the drive, ejecting the media etc.).
Also implement mounting and unmounting in the Unix volume monitor
backend. A subquent patch will introduce GDrive support for ejection
of media.
* Makefile.am:
* gdrive.c: (g_drive_is_media_check_automatic),
(g_drive_is_media_removable), (g_drive_has_media),
(g_drive_can_poll_for_media), (g_drive_eject),
(g_drive_eject_finish), (g_drive_poll_for_media),
(g_drive_poll_for_media_finish):
* gdrive.h:
* gfile.c: (g_file_find_enclosing_mount):
* gfile.h:
* gio.symbols:
* glocaldirectorymonitor.c:
(g_local_directory_monitor_constructor), (mounts_changed):
* glocalfile.c: (get_mount_info),
(g_local_file_find_enclosing_mount),
(g_local_file_file_iface_init):
* gnativevolumemonitor.h:
* gunionvolumemonitor.c: (get_mounts), (get_volumes),
(get_connected_drives), (g_union_volume_monitor_class_init),
(child_volume_added), (child_volume_removed),
(child_volume_changed), (child_mount_added), (child_mount_removed),
(child_mount_pre_unmount), (child_mount_changed),
(child_drive_changed), (g_union_volume_monitor_add_monitor),
(g_union_volume_monitor_remove_monitor),
(_g_mount_get_for_mount_path):
* gunixmounts.c: (g_unix_is_mount_path_system_internal),
(guess_system_internal), (_g_get_unix_mounts),
(_g_get_unix_mount_points), (g_get_unix_mount_at),
(g_unix_mount_free), (g_unix_mount_compare),
(g_unix_mount_get_mount_path), (g_unix_mount_get_device_path),
(g_unix_mount_get_fs_type), (g_unix_mount_is_readonly),
(g_unix_mount_is_system_internal), (g_unix_mount_guess_type),
(type_to_icon), (g_unix_mount_guess_name),
(g_unix_mount_guess_icon), (g_unix_mount_point_guess_name),
(g_unix_mount_point_guess_icon), (_canonicalize_filename),
(_resolve_symlink), (_resolve_dev_root):
* gunixmounts.h:
* gunixvolume.c: (g_unix_volume_finalize), (_g_unix_volume_new),
(_g_unix_volume_disconnected), (_g_unix_volume_set_mount),
(_g_unix_volume_unset_mount), (g_unix_volume_get_icon),
(g_unix_volume_get_name), (g_unix_volume_can_mount),
(g_unix_volume_get_drive), (g_unix_volume_get_mount),
(_g_unix_volume_has_mount_path), (mount_cb), (mount_read_error),
(g_unix_volume_mount), (g_unix_volume_mount_finish),
(g_unix_volume_volume_iface_init):
* gunixvolume.h:
* gunixvolumemonitor.c: (g_unix_volume_monitor_finalize),
(get_mounts), (get_volumes), (get_connected_drives),
(get_mount_for_mount_path), (g_unix_volume_monitor_class_init),
(mountpoints_changed), (mounts_changed),
(g_unix_volume_monitor_init),
(_g_unix_volume_monitor_lookup_volume_for_mount_path),
(find_mount_by_mountpath), (update_volumes), (update_mounts):
* gunixvolumemonitor.h:
* gvolume.c: (g_volume_get_mount), (g_volume_can_mount),
(g_volume_mount), (g_volume_mount_finish):
* gvolume.h:
* gvolumemonitor.c: (g_volume_monitor_class_init),
(g_volume_monitor_get_connected_drives),
(g_volume_monitor_get_volumes), (g_volume_monitor_get_mounts):
* gvolumemonitor.h:
svn path=/trunk/; revision=6095
2007-12-10 Tor Lillqvist <tml@novell.com>
* glocalfile.c: Add some more G_OS_WIN32 conditionals to silence
gcc warnings.
svn path=/trunk/; revision=6088
2007-12-10 15:08:59 Tim Janik <timj@imendio.com>
* let g_warn_if_fail replace g_assert as discussed here:
http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html
* fix bug #502498: Test framework assertion failures should follow
gcc error format.
* gmessages.h, gmessages.c: deprecated g_assert_warning() which is
unused now. removed g_assert*() definitions whcih are provided by
gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail()
which are recommended as g_assert/g_assert_not_reached replacements
for non-test programs.
added g_warn_message() to implement g_warn_*() macros.
use emacs-next-error friendly formatting for file:line: for warnings.
* gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting.
implement g_assert_not_reached() with g_assertion_message() and
g_assert() in terms of g_assertion_message_expr() so we'll be able to
provide assertion messages in test logs.
* gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail()
or g_return_if_fail() where suitable.
* gio/: changed g_assert to g_warn_if_fail.
svn path=/trunk/; revision=6086
2007-12-09 Hans Breuer <hans@breuer.org>
* makefile.msc : follow lib naming convention
* glocalfileinfo.c(win32_get_file_user_info) : working implementation
for user and group name, tested with ../tests/gio-ls
svn path=/trunk/; revision=6080
2007-12-09 Hans Breuer <hans@breuer.org>
* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
with msvc9 (vs2008) with less complains
* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
msv8 (vs2005) and above
* glib/gfileutils.c : s/stricmp/_stricmp/
* msvc_recommended_pragmas.h : work around Microsoft's premature
attempt to deprecate the C-Library
* tests/makefile.msc.in : added checksum-test
svn path=/trunk/; revision=6076
2007-12-08 Christian Persch <chpe@gnome.org>
* gio/glocalfileinfo.c: (get_thumbnail_attributes): Add forgotten
#ifdef G_OS_WIN32 to fix the build on linux.
svn path=/trunk/; revision=6074
2007-12-08 Hans Breuer <hans@breuer.org>
[gio compiles and links on win32, not sure how much already works]
* glocaldirectorymonitor.c : ifdefed out inotify emulation for win32
* glocalfile.c : use HAVE_UNISTD_H; implement file system size info
base on win32 API; prefer g_lstat() over lstat(); instead of
localtime_r() use an all GLib implementation on win32;
get_mount_info() still needs a win32 specifc implementation
* glocalfileinfo.c : use HAVE_*_H; start of implementation of
win32_get_file_user_info to get owner/group info without uid/gid
* glocalfileinputstream.c : include <io.h> on win32
* glocalfileoutputstream.c : include <io.h> on win32 and some S_IS*
definition, use g_win32_ftruncate() for G_OS_WIN32
* gwin32appinfo.c : optionalize a bunch on #ifdef AssocQueryString
it is available with mingw/w32api but a mess with the M$ Platform SDKs
see: http://mail.gnome.org/archives/gtk-devel-list/2007-December/msg00014.html
* makefile.msc : updated
svn path=/trunk/; revision=6070
2007-12-05 Alexander Larsson <alexl@redhat.com>
* gdatainputstream.c:
Fix warnings
* gio.symbols:
* giomodule.[ch]
* glocaldirectorymonitor.c:
* glocalfilemonitor.c:
* gunionvolumemonitor.c:
* gvfs.c:
Make g_io_modules_ensure_loaded a private function and
don't pass in the dirname. This means we can do magic
directory finding in the win32 version.
Export the actual load-modules-in-directory code so that
gvfs can reuse that.
svn path=/trunk/; revision=6050
2007-12-04 Alexander Larsson <alexl@redhat.com>
* goutputstream.c:
(g_output_stream_close):
Only call flush if non-null.
svn path=/trunk/; revision=6040
2007-11-30 Dan Winship <danw@gnome.org>
* ginputstream.c (g_input_stream_set_pending): Make this take a
GError and return a gboolean, and do the "outstanding operation"
check (and the "stream is already closed" check) itself.
(g_input_stream_clear_pending): Formerly set_pending(FALSE).
* goutputstream.c (g_output_stream_set_pending)
(g_output_stream_clear_pending): Likewise
* gbufferedinputstream.c:
* gfileinputstream.c:
* gfileoutputstream.c: Update for that
* gsimpleasyncresult.c (g_simple_async_report_gerror_in_idle):
Like g_simple_async_report_error_in_idle, but takes a GError
rather than building one.
svn path=/trunk/; revision=6039
2007-11-30 Dan Winship <danw@gnome.org>
* goutputstream.c: Don't cheat and unset the "pending" flag around
inner calls. Instead, call the class method directly rather than
the wrapper function that checks "pending"
svn path=/trunk/; revision=6038
2007-12-03 Hans Breuer <hans@breuer.org>
[start of port to win32/msvc]
* gcancellable.c : HAVE_UNIST_H and _pipe()
* gcontenttype.c : only include <dirent.h> in the UNIX branch
* gdatainputstream.c : pointer arithmetic on void* is a gcc extension
* gdummyfile.c glocalfileinputstream.c gsimpleasyncresult.c : use
HAVE_UNIST_H
* glocalfileoutputstream.c : use HAVE_UNIST_H and s/ssize_t/gssize/
* glocalvfs.c : use HAVE_PWD_H
* gio.symbols : ifdef unix specific functions with G_OS_UNIX
* makefile.msc : new file (maybe later converted to makefile.msc.in)
* Makefile.am : added to EXTRA_DIST
svn path=/trunk/; revision=6027
* gappinfo.c:
Fixes unknown meaning in GAppLaunchContext docs.
* gfile.c:
Clarify asynchronous ops.
* gfileattribute.c:
Fix entity tag docs.
* gicon.c:
* gthemedicon.c:
Provides missing gtk-doc section, fixes API docs slighly.
* gsimpleasyncresult.c:
Fill in missing info in docs.
* gunixinputstream.c:
* gunixoutputstream.c:
Be more expressive in short description.
* gunixvolume.c:
Remove gtk-doc stubs for non-public API.
svn path=/trunk/; revision=5994
2007-11-28 Emmanuele Bassi <ebassi@gnome.org>
* gio/Makefile.am: Remove makegioalias.pl from the marshal files
and avoid it being cleaned up when running make clean.
svn path=/trunk/; revision=5974
2007-11-27 Alexander Larsson <alexl@redhat.com>
* Makefile.am:
* gsocketinputstream.[ch]: Removed.
* gsocketoutputstream.[ch]: Removed.
* gunixinputstream.[ch]: Added.
* gunixoutputstream.[ch]: Added.
Renamed GSocket*Stream to GUnix*Stream and made
it unix-only, since its not really only for sockets
and it only works on unix (but is highly useful there).
svn path=/trunk/; revision=5956
of the public files. Fixes broken function documentation prototypes.
Fixes GCancellable inaccuracies. Removes unnecessary incomplete
gtk-doc headers in private files.
svn path=/trunk/; revision=5953
2007-11-27 Juerg Billeter <j@bitron.ch>
* gbufferedinputstream.c: (g_buffered_input_stream_peek_buffer),
(g_buffered_input_stream_read_byte):
* gbufferedinputstream.h:
New functions for efficient access to buffer and simple single byte
reads.
* gdatainputstream.c: (scan_for_newline), (scan_for_chars),
(g_data_input_stream_read_until):
* gdatainputstream.h:
Use peek_buffer to avoid memcpy in scan_for_newline, implement
read_until with multiple stop chars.
svn path=/trunk/; revision=5952
2007-11-26 Alexander Larsson <alexl@redhat.com>
* Makefile.am:
* configure.in:
* gio-2.0-uninstalled.pc.in:
* gio-2.0.pc.in:
* gio-unix-2.0-uninstalled.pc.in:
* gio-unix-2.0.pc.in:
* gio/
* docs/reference/gio
Merged gio-standalone into glib.
* glib/glibintl.h:
* glib/gutils.c:
Export glib_gettext so that gio can use it
Add P_ (using same domain for now)
Add I_ as g_intern_static_string
svn path=/trunk/; revision=5941