Commit Graph

6847 Commits

Author SHA1 Message Date
Benjamin Otte
bd198e5e45 export and use _g_file_attribute_matcher_matches_id() 2009-06-29 18:25:02 +02:00
Benjamin Otte
ceba40c27d add private header with attribute ids
attribute ids are generated when the attribute hash is initialized. This
way we can guarantee that the ids match every time.
2009-06-29 18:25:02 +02:00
Benjamin Otte
2620c23577 split lookup_attribute() into two functions 2009-06-29 18:25:02 +02:00
Benjamin Otte
66cebd7292 split attribute hash initialization into its own function 2009-06-29 18:25:01 +02:00
Christian Dywan
49172a71aa Display '-h' in --help output and accept '-h' and -?'
'-h' is the preferred short version of '--help' now and displayed
in '--help' but for backwards compatibility '-?' is still supported.

If existing code uses '-h' for something else, GOptionContext will
not override it.

Fixes bug 556706.
2009-06-28 02:45:50 +02:00
Jani Monoses
09c3f6dd4b Fix C++ warnings in g_error() code
Put space before ending semicolon in for(;;) ; to avoid C++ build warnings.
Closes bug 586928.
2009-06-27 11:03:47 +03:00
Matthias Clasen
160c39a9af Move some uri functions to a better place 2009-06-26 23:18:17 -04:00
Matthias Clasen
35911ae00f Fix a typo 2009-06-26 23:09:35 -04:00
Tom Parker
e7a258692c Add NULL to end of g_filename_complete_get_completions() return value
g_filename_complete_get_completions() return value is meant to be a
g_strfreev-compatible array i.e. NULL-terminated. However, pointer arrays
aren't automagically NULL-terminated. This fixes bug 586868
2009-06-26 22:43:31 -04:00
Ivar Smolin
657d0ad918 Updating Estonian translation 2009-06-26 10:39:25 +03:00
Alexander Larsson
d884e509db Allow setting G_FILE_ATTRIBUTE_TYPE_INVALID attributes in GFileInfo
This is used to unset an attribute in g_file_set_attributes_from_info.
2009-06-25 09:18:01 +02:00
Matthias Clasen
019e8c808f Add a note about g_simple_async_result_set_op_res_pointer change 2009-06-24 23:07:15 -04:00
Richard Hughes
b0dc7afd2a Allow GCancellable to be subclassed by adding a private structure 2009-06-24 10:33:24 +02:00
David Zeuthen
0ccd18bc83 Bug 586675 – Runtime library location
Introduce an option to specify the runtime location for libraries via
a relative path to libdir.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-06-23 12:58:35 -04:00
Alexander Larsson
7662c86611 Add extension point for adding metadata for local files
This adds a local_file_add_info vfunc to GVfs that vfs implementations
can override to add metadata for local files.
2009-06-23 16:35:42 +02:00
Alexander Larsson
9a6146f54c Add g_file_info_set_attribute_status
Required for gvfs implementation for set_attribures_from_info.
2009-06-23 16:35:41 +02:00
Alexander Larsson
becf4186e6 Add g_file_info_has_namespace
Need this to quickly see if we should set attributes from
this GFileInfo in metadata extension.
2009-06-23 16:35:41 +02:00
Alexander Larsson
0ed9201ad2 Add string vector attribute type to GFileInfo
This is needed for the new metadata backend since nautilus has a
string-list metadata type, and we want to use this for nautilus.
2009-06-23 16:35:41 +02:00
Alexander Larsson
c1ab6454fe Copy namespaces correctly in g_file_copy_attributes
File attribute namespaces are delimited with "::", but
build_attribute_list_for_copy only used ":", so we didn't copy
any writable namespaces.
2009-06-23 16:35:41 +02:00
Jorge Gonzalez
e9b4f7a3bc Updated Spanish translation 2009-06-21 11:13:20 +02:00
Matthias Clasen
440bf5bee5 Use pipe2 when available
This avoids a small window for races between pipe and fdset.
Reported in bug 579933 by Thiago Macieira.
2009-06-19 23:44:29 -04:00
Matthias Clasen
854a43a3cd Fix build on mingw
Mingw does not have sys/uio.h. This was reported in bug 585937.

Author:    Matthias Clasen <mclasen@redhat.com>
2009-06-19 23:25:18 -04:00
Ryan Lortie
4c791f49e5 GMappedFile: add refcounting, switch to GSlice
- add g_mapped_file_ref() and g_mapped_file_unref().
  - deprecate g_mapped_file_free().
  - move to GSlice for allocating the GMappedFile struct.
2009-06-18 15:01:18 -04:00
Alexander Larsson
8cb481fd5f Use io_prio as mainloop prio for async-emulation (#579449)
I'm not sure why we used the elaborate formula to convert the io-priority
to the priority of the mainloop idle when emulating async i/o with idles.
However, it causes the default io priority to be less than the normal
idle prio, so the i/o won't be scheduled if there is an idle outstanding.

There is really no great mapping to use here, doing blocking i/o in an
idle of any prio is generally bad and apps doing a lot of async i/o should
initialize threads. However, if we use the io-priority directly we at least
avoid the starvation problem above and make things easier to understand.
2009-06-18 19:43:46 +02:00
Benjamin Otte
9fba812884 Revert "clarify documentation"
This reverts commit d218cf0f67.
This has been fixed in the code, so no need to keep the updated docs.
2009-06-18 15:29:41 +02:00
Benjamin Otte
835c03a5c1 syntax fix in documentation 2009-06-18 15:27:42 +02:00
Benjamin Otte
cf95d07691 fix typo in documentation 2009-06-18 15:27:42 +02:00
Benjamin Otte
d218cf0f67 clarify documentation 2009-06-18 15:27:41 +02:00
Matthias Clasen
f4a64cb068 Bump version to 2.21.3 2009-06-15 13:27:40 -04:00
Matthias Clasen
785787fd6c 2.21.2 2009-06-15 13:25:43 -04:00
Matthias Clasen
0fbeab4520 Add g_setenv 2009-06-15 12:57:21 -04:00
Matthias Clasen
90229908a1 Update for 2.21.2 2009-06-15 12:26:41 -04:00
David Zeuthen
fae755e056 Bug 585591 – Starting/stopping drives
Add API for starting/stopping drives. This new API will enable
GVolumeMonitor and GVfs implementations to add support for the
following features

 1. Powering down external hard disk enclosures / drives

 2. Starting/stopping multi-disk devices (such as RAID/btrfs/ZFS)

 3. Connecting/disconnecting iSCSI devices

 4. Reacting to the user pressing e.g. the "remove drive" button on
    a IBM/Lenovo Ultrabay: http://www.thinkwiki.org/wiki/Ultrabay

See the bug for the corresponding GVfs and Nautilus changes.
2009-06-15 10:59:43 -04:00
Ondrej Jirman
bb4f7c48f9 Fix incorrect freeing of thread pool in GThreadedSocketService (#584255) 2009-06-15 15:56:45 +02:00
Alexander Larsson
31cb0bdcb0 Emit changed in g_socket_listener_add_socket, not in add_address
This way we emit this signal when add_socket is called from another
place than add_address too.
2009-06-15 15:43:39 +02:00
Alexander Larsson
a640695f16 Ref the passed in socket in g_socket_listener_add_socket (#585599) 2009-06-15 15:42:38 +02:00
Alexander Larsson
67de6cba50 Add bound address out-argument to g_socket_listener_add_address (#585566)
This is very useful when binding to "any" port.
2009-06-15 14:23:57 +02:00
Alexander Larsson
91bdccff75 Add g_reload_user_special_dirs_cache (#541276)
This is useful for nautilus that changes the xdg-user-dirs files.
2009-06-15 13:18:22 +02:00
Alexander Larsson
740ae3aa29 Avoid unnecessary work if mount watching not specified (#585360)
If G_FILE_MONITOR_WATCH_MOUNTS isn't specified, don't do all the work
when the mtab changes.
2009-06-15 12:26:57 +02:00
Matthias Clasen
129eb07482 Support special icons for xdg user dirs
The icon names are folder-documents, folder-download, folder-music,
folder-pictures, folder-publicshare, folder-templates, folder-videos.
See bug 541276.
2009-06-15 01:45:34 -04:00
Matthias Clasen
50a7f53055 Don't use deprecated GLib api
Fixes bug 585673.
2009-06-15 01:12:50 -04:00
Matthias Clasen
2553df615d Refer to the correct gcc deprecation options
This oversight was pointed out in bug 585520.
2009-06-15 01:09:25 -04:00
Matthias Clasen
2c5ac901d9 Fix some typos in list documentation
This fixes bug 585726.
2009-06-15 01:03:54 -04:00
Matthias Clasen
b0bba8520a Extract strings from g_dngettext too
There is one occurrence of this in glib, which we currently miss.
See bug 585717.
2009-06-15 00:52:43 -04:00
Matthias Clasen
642e9c7540 Fix the icon property implementation
Turns out both the setter and the getter were broken...
Fixes bug 585676.
2009-06-15 00:45:55 -04:00
Matthias Clasen
b533a944ff Trivial formatting fixes 2009-06-15 00:38:34 -04:00
Matthias Clasen
ce4aa6253e Include sys/uio.h for struct iovec
This fixes the build on OS X, bug 585280.
2009-06-14 23:55:12 -04:00
Matthias Clasen
8a3a3d797e Use inotify_init1 when available
To avoid leaking the inotify fd. Fixes bug 585478.
2009-06-14 22:29:17 -04:00
Ryan Lortie
4dbc2074bc Add GNIO test cases to .gitignore 2009-06-14 13:58:35 -04:00
Ryan Lortie
cb1a609240 Bug 585575 – g_socket_listener_add_inet_port()
Change the logic in g_socket_listener_add_inet_port() as per the
reasoning in the bug report.

  - If the OS supports neither IPv6 or IPv4, fail.
  - If the OS supports only IPv6, do that.
  - If the OS supports only IPv4, do that.
  - If the OS supports IPv6 and IPv6 "speaks" IPv4 then bind it
    and be done.
  - If the OS supports IPv6 and IPv6 doesn't "speak" IPv4 then
    create an additional socket for IPv4.
  - If binding any socket fails then fail the entire call.

Also, remove the ability to call this function with port == 0.  This
is a useless thing to do anyway since you have no way to know what
port number was actually allocated.  We should have a separate
function to deal with this.
2009-06-12 13:01:04 -04:00