gnomeapplet 2.8.0 the 2nd :: drivemout unable to eject cd-drives
Franz Klammer
klammer at webonaut.com
Sat Oct 2 06:46:47 PDT 2004
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.
-------------- next part --------------
--- 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
More information about the freebsd-gnome
mailing list