I'm starting to follow the plan to move the MIME-handling functionality out of gnome-libs and into gnome-vfs. (The plan is in the attached document, if you need refreshing.) I'm on step 1 "Copy the gnome-mime code to gnome-vfs". I started with the gnome-libs branch that Nautilus is using -- gnome-libs-1-0. Then I realized I should check against HEAD to see if bug fixes and such have crept into the MIME-handling code in the meantime. I found that there are several new API calls relating to getting lists of mime types for individual files, such as gnome-mime-type-list () and gnome-mime-type-list-or-default (). I need to decide whether to move these new calls into gnome-vfs, but I can't decide without understanding their purpose. Does any code use them now? Are they intended for GMC (in which case gnome-vfs probably doesn't need them) or for some other code? Dan Hensley is listed as the author, but the cvs checkin comments don't give an email address for him. I can't find a ChangeLog entry for these API additions. I found Dan's email address using google.com; I hope it's still current. Remember that eventually the proposal includes obsoleting and removing the MIME functionality from gnome-libs, so it's important that we preserve in the new gnome-vfs MIME code all of the gnome-libs MIME code that's still needed. So, do we need this new API? And if so, why? John
Attachment:
Gnome MIME proposal
Description: application/applefile
From: John Sullivan <sullivan eazel com> To: gnome hackers <gnome-hackers nuclecu unam mx> Date: Monday, April 17, 2000 1:43 PM Subject: proposal to change Gnome MIME code & capplet Hello all, I'd like feedback on a proposal for MIME type handling in Nautilus. It involves moving mime-handling from gnome-libs to gnome-vfs, and having Nautilus replace the MIME type editor capplet with a new one that's more suited to Nautilus's needs. Darin Adler, Jonathan Blandford, Chris Lahey, and I worked up the outline of this proposal in chat. The justification for this proposal is that Nautilus needs some MIME-related information that's not supported by the existing framework. Please comment on anything that seems wrong here. I sent this out to a handful of people earlier and have gotten only positive feedback so far. ==== Steps: (1) Copy the gnome-mime code to gnome-vfs. Reasoning: gnome-vfs is a more appropriate place for this code anyway, and moving it there means Nautilus won't require an updated gnome-libs. The new namespace will be "gnome_vfs_mime". (2) Create a new "MIME editor" capplet, starting by cloning the initial one. Reasoning: We can't just modify the existing one because we want to be free to make backward-incompatible changes. Also, the development schedule of the new capplet will be tied to Nautilus, and we'll want to be able to make changes up to the last minute that we make Nautilus changes. So gmc will continue to require the old one, while Nautilus will require the new one. The new one will be part of gnome-vfs and will be installed along with gnome-vfs. (3) Make installing gnome-vfs also install the new capplet. I don't know how to do this, but Jonathan says it can be done, and I believe him. (4) Ship new control center release without old capplet when Nautilus ships. Reasoning: We don't want to baffle users with two MIME-editing capplets, so when the final, shipping Nautilus one is in place, we want to get rid of the old one. (5) If necessary, make gnome-vfs-mime use different data directory than gnome-mime. Reasoning: It's not clear yet whether Nautilus will require changing the file formats used by gnome-mime in such a way that gnome-mime can no longer use them. If so, we'll need to use a different data directory than gnome/share/mime-info. If not, we'll continue using this directory. (6) Switch Nautilus & gnome-vfs over to using the new gnome-vfs-mime. (7) Mark the old gnome-mime code obsolete and make sure gmc and the old capplet are the only clients. (8) (Future) Make file dialogs use gnome-vfs-mime. (9) (Future) Eliminate old gnome-mime and capplet entirely, after Nautilus is standard part of Gnome. Does anything here seem bad? Anything I left out? Any reason not to start on this immediately? John