Re: can't eject data CD's



Desmond Rivet <rivet@ecf.utoronto.ca> writes:

> Hi all,
> 
> I realize that I must be becoming a pest, but does anyone else have a
> problem ejecting data cd's when the cd player applet is located in a
> panel?
> 
> This is truly bizarre. I can't even use the command line eject command, so
> long as the cd applet is in my panel. As soon as i remove it, eject works
> fine. I've sent a bug report off to where ever I'm supposed to send it
> (somewhere on the GNOME website).
> 
> Does anyone know a quick fix to this that *doesn't* involve looking at
> source code?
> 
> Failing that, does anyone know of a quick fix that *does* involve looking
> at source code?
> 
> I'm using GNOME 1.2 that I got from helix-gnome. The installation went
> rather smoothly...maybe not as smoothly as I thought?

Here's a patch from the Red Hat RPMS that fixes this. I'm afraid it
never made it into the official tarballs, mostly through my laziness.

I don't know how close it is to applying to gnome-applets these days.

Regards,
                                        Owen

--- gnome-core-1.0.10pre/applets/cdplayer/cdplayer.c.closecd	Mon Sep 20 23:36:45 1999
+++ gnome-core-1.0.10pre/applets/cdplayer/cdplayer.c	Tue Sep 21 00:00:56 1999
@@ -55,32 +55,35 @@
 	cdrom_device_status_t stat;
 	int retval;
 
-	if (cd_try_open(cd) &&
-	    cdrom_get_status(cd->cdrom_device, &stat) == DISC_NO_ERROR) {
-		switch (stat.audio_status) {
-		case DISC_PLAY:
-			led_time(cd->panel.time,
-				 stat.relative_address.minute,
-				 stat.relative_address.second,
-				 cd->panel.track,
-				 stat.track);
-			break;
-		case DISC_PAUSED:
-			led_paused(cd->panel.time,
-				   stat.relative_address.minute,
-				   stat.relative_address.second,
-				   cd->panel.track,
-				   stat.track);
-			break;
-		case DISC_COMPLETED:
-			/* check for looping or ? */
-			break;
-		case DISC_STOP:
-		case DISC_ERROR:
-			led_stop(cd->panel.time, cd->panel.track);
-		default:
-
+	if (cd_try_open(cd)) {
+	        if (cdrom_get_status(cd->cdrom_device, &stat) == DISC_NO_ERROR) {
+			switch (stat.audio_status) {
+			case DISC_PLAY:
+				led_time(cd->panel.time,
+					 stat.relative_address.minute,
+					 stat.relative_address.second,
+					 cd->panel.track,
+					 stat.track);
+				break;
+			case DISC_PAUSED:
+				led_paused(cd->panel.time,
+					   stat.relative_address.minute,
+					   stat.relative_address.second,
+					   cd->panel.track,
+					   stat.track);
+				break;
+			case DISC_COMPLETED:
+				/* check for looping or ? */
+				break;
+			case DISC_STOP:
+			case DISC_ERROR:
+				led_stop(cd->panel.time, cd->panel.track);
+			default:
+				
+			}
 		}
+		cdrom_close(cd->cdrom_device);
+		cd->cdrom_device = NULL;
 	} else
 		led_nodisc(cd->panel.time, cd->panel.track);
 }




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