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 159103 - Cannot get NautilusFileInfo when external event received in a nautilus extension
Cannot get NautilusFileInfo when external event received in a nautilus extension
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Extension Library
2.17.x
Other All
: High enhancement
: 2.18.x
Assigned To: Christian Neumair
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-22 19:27 UTC by Boyd Timothy
Modified: 2010-04-28 14:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Proposed patch (3.84 KB, patch)
2005-12-20 19:52 UTC, Christian Neumair
none Details | Review
Proposed patch (1.55 KB, patch)
2007-09-29 15:59 UTC, Christian Neumair
none Details | Review
Proposed patch (1.55 KB, patch)
2007-09-29 16:00 UTC, Christian Neumair
none Details | Review

Description Boyd Timothy 2004-11-22 19:27:12 UTC
If someone is writing a nautilus extension that adds emblems to a folder/file
there's no way to make a call to Nautilus to get a NautilusFileInfo * which
could be used to invalidate the extension information so an emblem is
added/removed based on the external state of some other process.

An example of this is when the iFolder Client (Mono/Gtk) converts a folder to an
iFolder or reverts an iFolder to a normal folder.  Other than saving a weak
reference to every NautilusFileInfo * seen by the extension, there's no way to
invalidate the information when there's an external update by the iFolder Client.

Exposing the following functions to Nautilus extensions would solve this problem
(per a discussion with dcamp in #nautilus):

nautilus_file_info_get()
nautilus_file_info_get_existing()
Comment 1 Christian Neumair 2005-12-20 19:36:49 UTC
Thanks for your bug reports!

Milestoning to 2.14, because this significantly impacts extension design.

Would the function prototypes look like:

 NautilusFileInfo *nautilus_file_info_get (NautilusFileInfo *file, const char *uri);

so that we can invoke the NautilusFile wrapper?
Comment 2 Christian Neumair 2005-12-20 19:52:12 UTC
Created attachment 56222 [details] [review]
Proposed patch

Does this one satisfy your needs? :)
Comment 3 Christian Neumair 2006-02-25 21:18:33 UTC
Missed 2.14 feature freeze. Remilestoning to 2.16.
Byod: Without feedback we won't be able to provide you guys with something useful.
Comment 4 Boyd Timothy 2006-02-27 03:56:52 UTC
Chris, I was thinking more on the lines of:

NautilusFileInfo *nautilus_file_info_get(const char *uri);
Comment 5 Christian Neumair 2007-01-03 12:52:32 UTC
Missed 2.16 freeze, updating.
Comment 6 Alexander Larsson 2007-01-11 11:04:48 UTC
It shouldn't be part of the NautilusFileInfo interface, that makes no sense. It should be separate global functions.
Comment 7 Christian Neumair 2007-01-11 19:54:14 UTC
Alex: I agree, but where should we declare them? Also in nautilus-file-info.h?
Comment 8 Christian Neumair 2007-09-29 15:59:16 UTC
Created attachment 96376 [details] [review]
Proposed patch

Another patch proposal, that will proxy nautilus_file_info_get() to nautilus_file_get(). It will add run-time symbol dependency on libnautilus-private to libnautilus-extension. This won't be a problem IMO since they can always be resolved (libnautilus-private is of course always linked into the nautilus binary).
Comment 9 Christian Neumair 2007-09-29 16:00:42 UTC
Created attachment 96377 [details] [review]
Proposed patch
Comment 10 Cosimo Cecchi 2010-04-28 14:52:42 UTC
This has been implemented during the 2.30 cycle, closing as OBSOLETE.