On Mon, 2008-07-21 at 21:20 +0200, Israel Aguilar Hernández wrote: > I'm glad because I finally compiled my nautilus extension using Open > Terminal as a template, the problem is that I cannot determine the > line where the gnome-terminal is launched. So I will thank a lot if > you could help me, I was modifying and testing the extension but I > cannot launch another application. The extension resides on nautilus-open-terminal.c, the terminal is opened in open_terminal_callback. However, I guess, you need to know what are the entry points for nautilus. In the case of nautilus-open-terminal, it extends NautilusMenuProvider, which means it will be called through a menu, so the definition of the entry points are described in: static void nautilus_open_terminal_menu_provider_iface_init (NautilusMenuProviderIface *iface) { iface->get_background_items = nautilus_open_terminal_get_background_items; iface->get_file_items = nautilus_open_terminal_get_file_items; } get_background_items is called when the menu is invoked with the cursor in background (current directory) and get_file_items when at least one file/folder is selected. In the fist case, you will see an extra menu under 'File' and in the second case you will see an extra menu under 'Edit'. You would also like to override get_toolbar_items. But, in those methods you can define which menu must be shown. For every menu added there, you need to add its proper callback for the signal 'activate'. Also, you have other providers, such as: * NautilusColumnProvider (get_columns) * NautilusInfoProvider (update_file_info) * NautilusPagePropertyProvider (get_property_pages) * NautilusMenuProvider (get_background_items, get_file_items, get_toolbar_items) And whenever you need to deal with files, you can use NautilusFileInfo. Regards, -- Germán Póo-Caamaño Concepción - Chile http://www.gnome.org/~gpoo/
Attachment:
signature.asc
Description: This is a digitally signed message part