Re: [Nautilus-list] Another question: nautilus and XALF



I got the trick !

The icon activation code is in fm-directory-view.c:activate_callback.
Xalf is not launched because the eel_gnome_shell_execute is called instead of nautilus_launch_application_from_command (the first does not handle xalf, the former does). This code uses fork/exec to launch appl. nautilus_launch_application_from_command uses system.
I don't know why fork/exec had to be used. Does it matter ?

Nevertheless here are workaround patches (for NAUTILUS_1_0_6 branch, HEAD is almost the same)... the fix would be to go through the NautilusDesktopFile methods (nautilus_desktop_file_launch) but they are private.

What do you think ?


--
                                                         -o)
                  Remi Cohen-Scali                       /\\
<Remi Cohen-Scali com>          <rcoscali rcsnet net>    _\_v
                                                        ----


diff -u nautilus-orig/ChangeLog nautilus/ChangeLog
--- nautilus-orig/ChangeLog	2001/11/08 05:37:33
+++ nautilus/ChangeLog	2002/01/26 11:33:13
@@ -1,3 +1,10 @@
+2002-01-26  Remi Cohen-Scali  <remi cohen-scali com>
+
+	* src/file-manager/fm-directory-view.c (activate_callback): Changed
+	desktop icon activation code in order to use the application launching
+	code of nautilus (handle xalf stuff. A better way would be to use the
+	NautilusDesktopFile methods, but badly they are private...
+
 2001-11-07  Darin Adler  <darin bentspoon com>
 
 	* configure.in: Update version to 1.0.6.

diff -u nautilus-orig/src/file-manager/fm-directory-view.c nautilus/src/file-manager/fm-directory-view.c
--- nautilus-orig/src/file-manager/fm-directory-view.c	2001/10/26 01:06:47
+++ nautilus/src/file-manager/fm-directory-view.c	2002/01/26 11:24:47
@@ -4633,7 +4633,9 @@
 			 * fork/execlp instead of system.
 			 */
 			command = uri + strlen (NAUTILUS_COMMAND_SPECIFIER);
-			eel_gnome_shell_execute (command);
+			name = nautilus_file_get_name(file); 
+			nautilus_launch_application_from_command (name, command, NULL, FALSE);
+			g_free (name); 
 			action = ACTIVATION_ACTION_DO_NOTHING;
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]