Magellan Linux

Contents of /trunk/k3b/patches/k3b-1.0.4-eject.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 595 - (show annotations) (download)
Mon May 19 18:26:18 2008 UTC (15 years, 11 months ago) by niro
File size: 3382 byte(s)
-fixed ejects and disk reloads

1 diff -ur k3b-1.0.4/ChangeLog k3b-1.0.4-verification-always-reload/ChangeLog
2 --- k3b-1.0.4/ChangeLog 2007-11-02 10:55:57.000000000 +0100
3 +++ k3b-1.0.4-verification-always-reload/ChangeLog 2007-12-07 19:33:18.000000000 +0100
4 @@ -4,9 +4,6 @@
5 * Unmount medium before DVD formatting
6 * Silently (without introducing new strings for translation) allow the burning of files
7 bigger than 4 GB with appropriate versions of genisoimage or mkisofs.
8 - * Do only reload the medium before verification if necessary, i.e. if the newly written
9 - track cannot be read otherwise (many old drives depend on this). Hopefully this will
10 - at least work around the aweful "DMA disabled" bug for many users.
11
12 1.0.3
13 =====
14 diff -ur k3b-1.0.4/libk3b/jobs/k3bverificationjob.cpp k3b-1.0.4-verification-always-reload/libk3b/jobs/k3bverificationjob.cpp
15 --- k3b-1.0.4/libk3b/jobs/k3bverificationjob.cpp 2007-11-02 10:55:53.000000000 +0100
16 +++ k3b-1.0.4-verification-always-reload/libk3b/jobs/k3bverificationjob.cpp 2007-07-21 21:53:53.000000000 +0200
17 @@ -84,8 +84,6 @@
18 K3bPipe pipe;
19
20 bool readSuccessful;
21 -
22 - bool mediumHasBeenReloaded;
23 };
24
25
26 @@ -151,13 +149,11 @@
27 d->currentTrackIndex = 0;
28 d->alreadyReadSectors = 0;
29
30 - emit newTask( i18n("Checking medium") );
31 + // first we need to reload and mount the device
32 + emit newTask( i18n("Reloading the medium") );
33
34 - d->mediumHasBeenReloaded = false;
35 - connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::DISKINFO, d->device ),
36 - SIGNAL(finished(K3bDevice::DeviceHandler*)),
37 - this,
38 - SLOT(slotDiskInfoReady(K3bDevice::DeviceHandler*)) );
39 + connect( K3bDevice::reload( d->device ), SIGNAL(finished(bool)),
40 + this, SLOT(slotMediaReloaded(bool)) );
41 }
42
43
44 @@ -169,8 +165,6 @@
45 K3bDevice::MEDIA_WRITABLE,
46 i18n("Unable to Close the Tray") );
47
48 - d->mediumHasBeenReloaded = true;
49 -
50 emit newTask( i18n("Checking medium") );
51
52 connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::DISKINFO, d->device ),
53 @@ -191,6 +185,12 @@
54 d->toc = dh->toc();
55 d->totalSectors = 0;
56
57 + if ( d->toc.isEmpty() ) {
58 + emit infoMessage( i18n( "No tracks to verify found." ), ERROR );
59 + jobFinished( false );
60 + return;
61 + }
62 +
63 // just to be sure check if we actually have all the tracks
64 int i = 0;
65 for( QValueList<K3bVerificationJobTrackEntry>::iterator it = d->tracks.begin();
66 @@ -201,21 +201,9 @@
67 (*it).trackNumber = d->toc.count();
68
69 if( (int)d->toc.count() < (*it).trackNumber ) {
70 - if ( d->mediumHasBeenReloaded ) {
71 - emit infoMessage( i18n("Internal Error: Verification job improperly initialized (%1)")
72 - .arg( "Specified track number not found on medium" ), ERROR );
73 - jobFinished( false );
74 - return;
75 - }
76 - else {
77 - // many drives need to reload the medium to return to a proper state
78 - emit newTask( i18n("Reloading the medium") );
79 - connect( K3bDevice::reload( d->device ),
80 - SIGNAL(finished(bool)),
81 - this,
82 - SLOT(slotMediaReloaded(bool)) );
83 - return;
84 - }
85 + emit infoMessage( i18n("Internal Error: Verification job improperly initialized"), ERROR );
86 + jobFinished( false );
87 + return;
88 }
89
90 d->totalSectors += trackLength( i );