[Nautilus-list] esthetic patch to fix a previous patch



Please could you commit this patch on head.
It updates a previous patch I made about xalf handling
(hard to find the good one in the high number of patches I posted :-).

Thanks

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

diff -u -p -r1.4970 ChangeLog
--- nautilus/ChangeLog	2002/02/01 21:11:14	1.4970
+++ nautilus/ChangeLog	2002/02/04 02:52:26
@@ -1,3 +1,10 @@
+2002-02-04  Remi Cohen-Scali  <remi cohen-scali com>
+
+	* src/file-manager/fm-directory-view.c (activate_callback): 
+	Fixes a previous patch for xalf handling.
+	Removed unusefull tests for null df. Moved df & command free
+	statements out of if block (esthetic change).
+
 2002-02-01  Dave Camp  <dave ximian com>
 
 	* configure.in: Increased GNOME_UI_REQUIRED to 1.110.1

diff -u -p -r1.497 fm-directory-view.c
--- nautilus/src/file-manager/fm-directory-view.c	2002/01/29 19:21:50	1.497
+++ nautilus/src/file-manager/fm-directory-view.c	2002/02/04 02:33:58
@@ -4652,22 +4652,15 @@ activate_callback (NautilusFile *file, g
 			/* As desktop file loader only test gnome vfs result, we have
 			 * to also test for a valid desktop file by querying the hash
 			 */
-			if (df &&
-			    nautilus_desktop_file_load (name, &df) == GNOME_VFS_OK &&
-			    nautilus_desktop_file_get_string (df, NULL, "Exec", &command)) 
+			if (nautilus_desktop_file_load (name, &df) == GNOME_VFS_OK &&
+			    nautilus_desktop_file_get_string (df, NULL, "Exec", &command)) 
 			{
-				g_free (name); 
 				g_free (command); 
 				nautilus_desktop_file_launch (df);
-				nautilus_desktop_file_free (df);
 			}
 			else 
 			{
-				/* desktop file alloc failed or not a desktop file */
-				if (df) 
-				{
-					nautilus_desktop_file_free (df);
-				}
+				/* not a desktop file */
 				
 				/* As an additional precaution, only execute
 				 * commands without any parameters, which is
@@ -4676,12 +4669,13 @@ activate_callback (NautilusFile *file, g
 				 * cf.: nautilus-program-choosing.c
 				 */
 				command = uri + strlen (NAUTILUS_COMMAND_SPECIFIER);
-				nautilus_launch_application_from_command ("",
-									  command,
-									  NULL, /* param */
-									  FALSE);
-				g_free (name); 
+				nautilus_launch_application_from_command("",
+									 command,
+									 NULL, /* param */
+									 FALSE);
 			}
+			g_free (name); 
+			nautilus_desktop_file_free (df);
 			action = ACTIVATION_ACTION_DO_NOTHING;
 		}
 	}



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