After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 521612 - Need new APIs in libnautilus-extension.
Need new APIs in libnautilus-extension.
Product: nautilus
Classification: Core
Component: [obsolete] GIO
Other Linux
: Normal normal
: 2.22.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 518700 (view as bug list)
Depends on:
Blocks: 501542
Reported: 2008-03-10 16:37 UTC by Christian Kellner
Modified: 2008-04-04 15:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22

patch (3.53 KB, patch)
2008-03-17 14:14 UTC, Cosimo Cecchi
none Details | Review
patch v2 (4.24 KB, patch)
2008-03-20 19:23 UTC, Cosimo Cecchi
committed Details | Review

Description Christian Kellner 2008-03-10 16:37:35 UTC
In order to properly do the file-roller nautilus extension we need to check if the parent is writeable or not. Since nautilus already has that information we shouldnt be doing any I/O inside the extionsion but nautilus should just provide a way to get to this, at the moment internal, information.

I'd suggest a:

NautilusFileInfo * nautilus_file_info_get_parent_file_info (NautilusFileInfo *file);

and a

gboolean nautilus_file_info_can_write (NautilusFileInfo *file);
Comment 1 Cosimo Cecchi 2008-03-10 19:57:24 UTC
-> GIO.

Comment 2 Cosimo Cecchi 2008-03-17 14:14:31 UTC
Created attachment 107451 [details] [review]

Proposed patch, this adds the requested API.
Comment 3 Alexander Larsson 2008-03-19 14:14:44 UTC
nautilus-cd-burner would also like nautilus_file_get_mount() exposed.
Comment 4 André Klapper 2008-03-19 14:19:21 UTC
getting this in would add new api. however bug 501542 depends on this and is a potential 2.22 blocker. maybe there should be a request to the release-team to add this also to the stable series to fix 501542 for 2.22.x.
Comment 5 Cosimo Cecchi 2008-03-20 19:23:25 UTC
Created attachment 107698 [details] [review]
patch v2

Also expose nautilus_file_info_get_mount (). This was requested also by Davidz for gnome-mount in another report, which I'll be marking as a dup of this.
Comment 6 Cosimo Cecchi 2008-03-20 19:25:20 UTC
*** Bug 518700 has been marked as a duplicate of this bug. ***
Comment 7 Christian Neumair 2008-04-04 15:32:00 UTC
> maybe there should be a request to the release-team to
add this also to the stable series to fix 501542 for 2.22.x.

According to

desktop modules are not affected by API/ABI freeze.

Cosimo: Marking attachment 107698 [details] [review] as accepted-commit_now. Please commit it to trunk and the GNOME 2.22 branch.
Comment 8 Cosimo Cecchi 2008-04-04 15:58:51 UTC
I committed this along with a comment saying why it's not safe to call get_parent_info () multiple time recursively.
Closing as FIXED.

2008-04-04  Cosimo Cecchi  <>

	* libnautilus-extension/nautilus-file-info.c:
	(nautilus_file_info_get_mount), (nautilus_file_info_can_write):
	* libnautilus-extension/nautilus-file-info.h:
	* libnautilus-private/nautilus-file.c:
	Add new APIs for extensions to NautilusFileInfo (can_write, get_mount
	and get_parent_info). (#521612).