Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Oct 2004 15:46:42 +0200
From:      Franz Klammer <klammer@webonaut.com>
To:        gnome <freebsd-gnome@FreeBSD.org>
Subject:   gnomeapplet 2.8.0 the 2nd :: drivemout unable to eject cd-drives
Message-ID:  <415EB142.4080604@webonaut.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090900000906070908090908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

drivemout didn't eject cd-drives. i looked a litte bit into the
code and made some changes to use cdcontrol instead of eject.

don't know if this is correct or what happends the drive is
not a cd-drive...

attached a patch.

franz.


--------------090900000906070908090908
Content-Type: text/plain;
 name="patch-drivemount_drivemount.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-drivemount_drivemount.c"

--- drivemount/drivemount.c.orig	Sat Oct  2 17:24:52 2004
+++ drivemount/drivemount.c	Sat Oct  2 17:33:10 2004
@@ -254,7 +254,7 @@
 
 	component = panel_applet_get_popup_component (PANEL_APPLET (applet));
 
-	tmp_path = gnome_is_program_in_path ("eject");
+	tmp_path = gnome_is_program_in_path ("cdcontrol");
 	if (!tmp_path)
 		bonobo_ui_component_set_prop (component, "/commands/Eject",
 					      "hidden", "1", NULL);
@@ -966,20 +966,9 @@
 		return;
 	}
 
-	if (dd->mounted) {
-		command_line = g_strdup_printf ("eject -u '%s'", dn);
-		/* perhaps it doesn't like the -u option */
-		if (system (command_line) != 0) {
-			g_free (command_line);
-			command_line = g_strdup_printf ("eject '%s'", dn);
-			gnome_execute_shell (NULL, command_line);
-		}
-		g_free (command_line);
-	} else {
-		command_line = g_strdup_printf ("eject '%s'", dn);
-		gnome_execute_shell (NULL, command_line);
-		g_free (command_line);
-	}
+	command_line = g_strdup_printf ("cdcontrol -f %s Eject", dn);
+	gnome_execute_shell (NULL, command_line);
+	g_free (command_line);
 }
 
 static gboolean 

--------------090900000906070908090908--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?415EB142.4080604>