New upstream version 0.79.5
This commit is contained in:
472
preferences.c
472
preferences.c
@@ -1,27 +1,28 @@
|
||||
/* dvdisaster: Additional error correction for optical media.
|
||||
* Copyright (C) 2004-2012 Carsten Gnoerlich.
|
||||
* Project home page: http://www.dvdisaster.com
|
||||
* Email: carsten@dvdisaster.com -or- cgnoerlich@fsfe.org
|
||||
* Copyright (C) 2004-2015 Carsten Gnoerlich.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* Email: carsten@dvdisaster.org -or- cgnoerlich@fsfe.org
|
||||
* Project homepage: http://www.dvdisaster.org
|
||||
*
|
||||
* This file is part of dvdisaster.
|
||||
*
|
||||
* dvdisaster is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* dvdisaster is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
|
||||
* or direct your browser at http://www.gnu.org.
|
||||
* along with dvdisaster. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "dvdisaster.h"
|
||||
|
||||
extern int CurrentMediumSize(int); /* from scsi-layer.h */
|
||||
extern gint64 CurrentMediumSize(int); /* from scsi-layer.h */
|
||||
|
||||
/***
|
||||
*** debugging workaround
|
||||
@@ -94,11 +95,7 @@ typedef struct _prefs_context
|
||||
/* Widgets for changing preferences settings. The are two copies (A and B)
|
||||
of each; one for the standard dialog and one embedded in the online help. */
|
||||
|
||||
GtkWidget *radioDriveA, *radioDriveB;
|
||||
GtkWidget *radioISOA, *radioISOB;
|
||||
GtkWidget *radioECCA, *radioECCB;
|
||||
GtkWidget *suffixA, *suffixB;
|
||||
GtkWidget *splitA, *splitB;
|
||||
GtkWidget *radioLinearA, *radioLinearB;
|
||||
GtkWidget *radioAdaptiveA, *radioAdaptiveB;
|
||||
GtkWidget *minAttemptsScaleA, *minAttemptsScaleB;
|
||||
@@ -114,7 +111,10 @@ typedef struct _prefs_context
|
||||
GtkWidget *rawButtonA, *rawButtonB;
|
||||
GtkWidget *jumpScaleA, *jumpScaleB;
|
||||
GtkWidget *daoButtonA, *daoButtonB;
|
||||
GtkWidget *ignoreISOSizeA, *ignoreISOSizeB;
|
||||
GtkWidget *dsmButtonA, *dsmButtonB;
|
||||
GtkWidget *recogRS02A, *recogRS02B;
|
||||
GtkWidget *recogRS03A, *recogRS03B;
|
||||
GtkWidget *byteEntryA, *byteEntryB;
|
||||
GtkWidget *byteCheckA, *byteCheckB;
|
||||
GtkWidget *spinUpA, *spinUpB;
|
||||
@@ -127,6 +127,7 @@ typedef struct _prefs_context
|
||||
GtkWidget *ejectA, *ejectB;
|
||||
GtkWidget *readAndCreateButtonA, *readAndCreateButtonB;
|
||||
GtkWidget *unlinkImageButtonA, *unlinkImageButtonB;
|
||||
GtkWidget *confirmDeletionA, *confirmDeletionB;
|
||||
GtkWidget *mainNotebook;
|
||||
GtkWidget *methodChooserA,*methodChooserB;
|
||||
GtkWidget *methodNotebook;
|
||||
@@ -330,21 +331,24 @@ static void close_cb(GtkWidget *widget, gpointer data)
|
||||
*** Setting preferences from external functions
|
||||
***/
|
||||
|
||||
void UpdatePrefsQuerySize(void)
|
||||
void UpdatePrefsExhaustiveSearch(void)
|
||||
{ prefs_context *pc = (prefs_context*)Closure->prefsContext;
|
||||
|
||||
if(Closure->prefsContext)
|
||||
switch(Closure->querySize)
|
||||
{ case 0: activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioDriveA), TRUE);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioDriveB), TRUE);
|
||||
break;
|
||||
case 1: activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioISOA), TRUE);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioISOB), TRUE);
|
||||
break;
|
||||
case 2: activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioECCA), TRUE);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioECCB), TRUE);
|
||||
break;
|
||||
}
|
||||
{ activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS02A), Closure->examineRS02);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS02B), Closure->examineRS02);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS03A), Closure->examineRS03);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS03B), Closure->examineRS03);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdatePrefsConfirmDeletion(void)
|
||||
{ prefs_context *pc = (prefs_context*)Closure->prefsContext;
|
||||
|
||||
if(Closure->prefsContext)
|
||||
{ activate_toggle_button(GTK_TOGGLE_BUTTON(pc->confirmDeletionA), Closure->confirmDeletion);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->confirmDeletionB), Closure->confirmDeletion);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -365,9 +369,11 @@ enum
|
||||
{ TOGGLE_READ_CREATE,
|
||||
TOGGLE_UNLINK,
|
||||
TOGGLE_SUFFIX,
|
||||
TOGGLE_RECOG_RS02,
|
||||
TOGGLE_RECOG_RS03,
|
||||
TOGGLE_SIZEDRIVE,
|
||||
TOGGLE_DAO,
|
||||
TOGGLE_DSM,
|
||||
TOGGLE_2GB,
|
||||
TOGGLE_RANGE,
|
||||
TOGGLE_RAW,
|
||||
TOGGLE_RAW_20H,
|
||||
@@ -379,6 +385,7 @@ enum
|
||||
TOGGLE_EJECT,
|
||||
TOGGLE_VERBOSE,
|
||||
TOGGLE_LOGFILE,
|
||||
TOGGLE_CONFIRM_DELETION,
|
||||
|
||||
SPIN_DELAY,
|
||||
SPIN_INTERNAL_ATTEMPTS,
|
||||
@@ -453,6 +460,12 @@ static void toggle_cb(GtkWidget *widget, gpointer data)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->unlinkImageButtonB), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_CONFIRM_DELETION:
|
||||
Closure->confirmDeletion = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->confirmDeletionA), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->confirmDeletionB), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_SUFFIX:
|
||||
Closure->autoSuffix = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->suffixA), state);
|
||||
@@ -477,14 +490,32 @@ static void toggle_cb(GtkWidget *widget, gpointer data)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->cancelOKB), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_SIZEDRIVE:
|
||||
Closure->ignoreIsoSize = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->ignoreISOSizeA), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->ignoreISOSizeB), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_DAO:
|
||||
Closure->noTruncate = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->daoButtonA), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->daoButtonB), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_RECOG_RS02:
|
||||
Closure->examineRS02 = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS02A), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS02B), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_RECOG_RS03:
|
||||
Closure->examineRS03 = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS03A), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->recogRS03B), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_DSM:
|
||||
Closure->dsmVersion = state;
|
||||
Closure->dsmVersion = !state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->dsmButtonA), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->dsmButtonB), state);
|
||||
if(state)
|
||||
@@ -495,12 +526,6 @@ static void toggle_cb(GtkWidget *widget, gpointer data)
|
||||
}
|
||||
break;
|
||||
|
||||
case TOGGLE_2GB:
|
||||
Closure->splitFiles = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->splitA), state);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->splitB), state);
|
||||
break;
|
||||
|
||||
case TOGGLE_RAW:
|
||||
Closure->readRaw = state;
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->rawButtonA), state);
|
||||
@@ -996,44 +1021,6 @@ static GtkWidget* non_linear_scale(GtkWidget **hbox_out, non_linear_info *nli,
|
||||
return scale;
|
||||
}
|
||||
|
||||
/*
|
||||
* Image size query method selection
|
||||
*/
|
||||
|
||||
static void imgsize_cb(GtkWidget *widget, gpointer data)
|
||||
{ int state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
int selection = GPOINTER_TO_INT(data);
|
||||
prefs_context *pc = (prefs_context*)Closure->prefsContext;
|
||||
|
||||
if(!state) /* only track changes to activate state */
|
||||
return;
|
||||
|
||||
Closure->querySize = selection;
|
||||
|
||||
switch(selection)
|
||||
{ case 0:
|
||||
if(pc->radioDriveA)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioDriveA), TRUE);
|
||||
if(pc->radioDriveB)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioDriveB), TRUE);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if(pc->radioISOA)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioISOA), TRUE);
|
||||
if(pc->radioISOB)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioISOB), TRUE);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if(pc->radioECCA)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioECCA), TRUE);
|
||||
if(pc->radioECCB)
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(pc->radioECCB), TRUE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Read strategy selection
|
||||
*/
|
||||
@@ -1397,7 +1384,8 @@ void UpdateMethodPreferences(void)
|
||||
for(i=0; i<Closure->methodList->len; i++)
|
||||
{ Method *method = g_ptr_array_index(Closure->methodList, i);
|
||||
|
||||
method->resetPrefsPage(method);
|
||||
if(method->resetPrefsPage)
|
||||
method->resetPrefsPage(method);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1448,80 +1436,6 @@ void CreatePreferencesWindow(void)
|
||||
|
||||
vbox = create_page(notebook, _utf("Image"));
|
||||
|
||||
/** Image size */
|
||||
|
||||
frame = gtk_frame_new(_utf("Image size"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new(FALSE, 15);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox2), 10);
|
||||
gtk_container_add(GTK_CONTAINER(frame), vbox2);
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Image size determination"), _("Get Image size from: "));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
{ GtkWidget *hbox = gtk_hbox_new(FALSE, 4);
|
||||
GtkWidget *radio1, *radio2, *radio3;
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
|
||||
|
||||
radio1 = gtk_radio_button_new(NULL);
|
||||
g_signal_connect(G_OBJECT(radio1), "toggled", G_CALLBACK(imgsize_cb), (gpointer)0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), radio1, FALSE, FALSE, 0);
|
||||
lab = gtk_label_new(_utf("Drive"));
|
||||
gtk_container_add(GTK_CONTAINER(radio1), lab);
|
||||
|
||||
radio2 = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio1));
|
||||
g_signal_connect(G_OBJECT(radio2), "toggled", G_CALLBACK(imgsize_cb), (gpointer)1);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), radio2, FALSE, FALSE, 0);
|
||||
lab = gtk_label_new(_utf("ISO/UDF"));
|
||||
gtk_container_add(GTK_CONTAINER(radio2), lab);
|
||||
|
||||
radio3 = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio2));
|
||||
g_signal_connect(G_OBJECT(radio3), "toggled", G_CALLBACK(imgsize_cb), (gpointer)2);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), radio3, FALSE, FALSE, 0);
|
||||
lab = gtk_label_new(_utf("ECC/RS02"));
|
||||
gtk_container_add(GTK_CONTAINER(radio3), lab);
|
||||
|
||||
switch(Closure->querySize)
|
||||
{ case 0: activate_toggle_button(GTK_TOGGLE_BUTTON(radio1), TRUE); break;
|
||||
case 1: activate_toggle_button(GTK_TOGGLE_BUTTON(radio2), TRUE); break;
|
||||
case 2: activate_toggle_button(GTK_TOGGLE_BUTTON(radio3), TRUE); break;
|
||||
}
|
||||
|
||||
if(!i)
|
||||
{ pc->radioDriveA = radio1;
|
||||
pc->radioISOA = radio2;
|
||||
pc->radioECCA = radio3;
|
||||
gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
}
|
||||
else
|
||||
{ pc->radioDriveB = radio1;
|
||||
pc->radioISOB = radio2;
|
||||
pc->radioECCB = radio3;
|
||||
AddHelpWidget(lwoh, hbox);
|
||||
}
|
||||
}
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Image size determination</b>\n\n"
|
||||
"Use <i>ECC/RS02</i> for reading images augmented with error correction data; "
|
||||
"else pick <i>ISO/UDF</i>.\n\n"
|
||||
|
||||
"<b>ECC/RS02:</b> The Image size is determined from the error correction data. "
|
||||
"Reading RS02 augmented images requires this option; otherwise the images "
|
||||
"may be incomplete. However if the medium does not contain error correction "
|
||||
"data, the start of the reading operation may be delayed significantly.\n\n"
|
||||
|
||||
"<b>ISO/UDF:</b> The image size is determined from the ISO/UDF file system.\n"
|
||||
"Caution: This is only suitable for working with error correction files. "
|
||||
"Images containing RS02 error correction information may be truncated.\n\n"
|
||||
|
||||
"<b>Drive:</b> The image size reported by the drive will be used. "
|
||||
"As this information is typically wrong for DVD-RW/+RW/-RAM media this option "
|
||||
"is only present for backwards compatibility with older dvdisaster versions."));
|
||||
|
||||
/** Reading preferences */
|
||||
|
||||
frame = gtk_frame_new(_utf("Image creation"));
|
||||
@@ -1627,9 +1541,96 @@ void CreatePreferencesWindow(void)
|
||||
"The values include the borders: 0-100 will read 101 sectors.\n\n"
|
||||
|
||||
"<b>Note:</b> Limiting the reading range is not recommended for <i>adaptive reading</i> since it might "
|
||||
"prevent sectors from being read which are required for a succesful error correction.\n\n"
|
||||
"prevent sectors from being read which are required for a successful error correction.\n\n"
|
||||
"These settings are only effective for the current session and will not be saved."));
|
||||
|
||||
/*** Image recognization */
|
||||
|
||||
frame = gtk_frame_new(_utf("Error correction data recognization"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new(FALSE, 15);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox2), 10);
|
||||
gtk_container_add(GTK_CONTAINER(frame), vbox2);
|
||||
|
||||
/* RS02 */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Exhaustive RS02 header search"), _("Perform exhaustive search for RS02 headers"));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
{ GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
|
||||
GtkWidget *button = gtk_check_button_new();
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
|
||||
|
||||
if(!i) pc->recogRS02A = button;
|
||||
else pc->recogRS02B = button;
|
||||
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), Closure->examineRS02);
|
||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_RECOG_RS02));
|
||||
if(!i) gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
else AddHelpWidget(lwoh, hbox);
|
||||
}
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Exhaustive RS02 header search</b>\n\n"
|
||||
"When this setting is off only a quick check "
|
||||
"for RS02 data is performed. If the medium or "
|
||||
"image is damaged, the quick test may not suffice "
|
||||
"to identify the image as being augmented with RS02.\n\n"
|
||||
"Therefore you should turn this option <b>on</b> "
|
||||
"if a medium/image contains RS02 data, but is not "
|
||||
"being recognized as such. Searching for the RS02 "
|
||||
"information may cause a significant delay at the "
|
||||
"start of reading and scanning processes.\n\n"
|
||||
"Leave this option <b>off</b> when you are "
|
||||
"processing media or images which are not augmented "
|
||||
"with RS02 data. Otherwise you will waste a lot of "
|
||||
"time searching for the RS02 signatures and increase "
|
||||
"wear on the drive."
|
||||
));
|
||||
|
||||
/* RS03 */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Recover RS03 signatures"), _("Find and recover RS03 signatures"));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
{ GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
|
||||
GtkWidget *button = gtk_check_button_new();
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
|
||||
|
||||
if(!i) pc->recogRS03A = button;
|
||||
else pc->recogRS03B = button;
|
||||
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), Closure->examineRS03);
|
||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_RECOG_RS03));
|
||||
if(!i) gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
else AddHelpWidget(lwoh, hbox);
|
||||
}
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Exhaustive RS03 header search</b>\n\n"
|
||||
"When this setting is off only a quick check "
|
||||
"for RS03 data is performed. If the medium or "
|
||||
"image is damaged, the quick test may not suffice "
|
||||
"to identify the image as being augmented with RS03.\n\n"
|
||||
"Therefore you should turn this option <b>on</b> "
|
||||
"if a medium/image contains RS03 data, but is not "
|
||||
"being recognized as such. Searching for the RS03 "
|
||||
"information may cause a significant delay at the "
|
||||
"start of reading and scanning processes.\n\n"
|
||||
"Leave this option <b>off</b> when you are "
|
||||
"processing media or images which are not augmented "
|
||||
"with RS03 data. Otherwise you will waste a lot of "
|
||||
"time searching for the RS03 signatures and increase "
|
||||
"wear on the drive."
|
||||
));
|
||||
|
||||
/** Image properties */
|
||||
|
||||
frame = gtk_frame_new(_utf("Image properties"));
|
||||
@@ -1639,6 +1640,45 @@ void CreatePreferencesWindow(void)
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox2), 10);
|
||||
gtk_container_add(GTK_CONTAINER(frame), vbox2);
|
||||
|
||||
/* Query size from drive */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Ignore ISO/UDF meta data"), _("Ignore image size recorded in ISO/UDF file system"));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
{ GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
|
||||
GtkWidget *button = gtk_check_button_new();
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
|
||||
|
||||
if(!i) pc->ignoreISOSizeA = button;
|
||||
else pc->ignoreISOSizeB = button;
|
||||
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), Closure->ignoreIsoSize);
|
||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_SIZEDRIVE));
|
||||
if(!i) gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
else AddHelpWidget(lwoh, hbox);
|
||||
}
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Ignore image size recorded in ISO/UDF filesystem</b>\n\n"
|
||||
"When reading or scanning optical discs, the overall size of the medium "
|
||||
"needs to be determined. dvdisaster will always use the image size "
|
||||
"recorded in the error correction data if such data is present. "
|
||||
"Otherwise, image size is queried in the following order:\n\n"
|
||||
"1. Image size recorded in the ISO/UDF file system\n"
|
||||
"2. Image size reported by the optical drive.\n\n"
|
||||
"Using this order makes sense as image sizes reported by most drives "
|
||||
"are unreliable in many cases. However in some rare cases "
|
||||
"the image size recorded in the ISO/UDF filesystem is wrong. Some "
|
||||
"GNU/Linux live CDs may have this problem. If you read back the ISO "
|
||||
"image from such CDs and its md5sum does not match the advertised one, "
|
||||
"try re-reading the image with this option turned on.\n"
|
||||
"Do <b>not blindly turn this option on</b> as it will most likely "
|
||||
"create sub optimal or corrupted ISO images, especially if you "
|
||||
"plan to use the image for error correction data generation."));
|
||||
|
||||
/* DAO button */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("DAO mode"), _("Assume image to be written in DAO mode (don't truncate)"));
|
||||
@@ -1674,9 +1714,8 @@ void CreatePreferencesWindow(void)
|
||||
"(sometimes also called \"SAO / Session at once\") mode for writing single "
|
||||
"session media."));
|
||||
|
||||
/** Image format */
|
||||
if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
{ /* because of severe compatibility issues */
|
||||
/*** Image format */
|
||||
|
||||
frame = gtk_frame_new(_utf("Image format"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
@@ -1686,7 +1725,7 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
|
||||
/* new style missing sector marker */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Missing sector tags"), _("Use new style missing sector tags (Warning: compatibility issues!)"));
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Missing sector tags"), _("Use old style missing sector tags (not recommended)"));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
@@ -1699,7 +1738,7 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
if(!i) pc->dsmButtonA = button;
|
||||
else pc->dsmButtonB = button;
|
||||
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), Closure->dsmVersion);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), !Closure->dsmVersion);
|
||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_DSM));
|
||||
if(!i) gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
else AddHelpWidget(lwoh, hbox);
|
||||
@@ -1708,20 +1747,21 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Missing sector tagging</b>\n\n"
|
||||
"Missing sectors are tagged with a special code sequence "
|
||||
"in the image. If this value is activated, an improved "
|
||||
"in the image. By default, an improved "
|
||||
"code is used which can detect some wilfully damaged "
|
||||
"content. This includes media which have been created "
|
||||
"from partially recovered images, and images containing "
|
||||
"files from such partial media.\n"
|
||||
"However only dvdisaster 0.72 and up will recognize "
|
||||
"the new tags. You must NOT process the resulting "
|
||||
"images with older dvdisaster versions as they would "
|
||||
"not see any missing sectors in the resulting images.\n"
|
||||
"the improved tags. Activate this switch to force using the "
|
||||
"older format when this image will be processed with older "
|
||||
"dvdisaster versions. Otherwise the older dvdisaster versions "
|
||||
"will not see any missing sectors in the resulting images.\n"
|
||||
"N.b.: dvdisaster >= 0.72 will automatically recognize "
|
||||
"both tag formats when reading images; setting this value "
|
||||
"only affects the creation of new images."));
|
||||
}
|
||||
/* byte filling */
|
||||
|
||||
/** byte filling */
|
||||
|
||||
if(Closure->debugMode)
|
||||
{
|
||||
@@ -1871,7 +1911,7 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
else pc->radioRawModeOtherB = radio3;
|
||||
g_signal_connect(G_OBJECT(radio3), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_RAW_OTHER));
|
||||
gtk_box_pack_start(GTK_BOX(hbox), radio3, FALSE, FALSE, 0);
|
||||
lab = gtk_label_new(_("other:"));
|
||||
lab = gtk_label_new(_utf("other:"));
|
||||
gtk_container_add(GTK_CONTAINER(radio3), lab);
|
||||
|
||||
entry = gtk_entry_new();
|
||||
@@ -1911,7 +1951,7 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
"<b>0x20</b> This is the <i>recommended</i> mode. "
|
||||
"The drive tries to apply "
|
||||
"the built-in error correction to the best possible extent "
|
||||
"before transfering a defective sector.\n\n"
|
||||
"before transferring a defective sector.\n\n"
|
||||
"<b>0x21</b> In this mode the drive skips the last stage "
|
||||
"of its internal error correction and returns the "
|
||||
"uncorrected sector instead. This may result in sectors "
|
||||
@@ -2185,7 +2225,7 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
|
||||
"The decision to do more attempts depends on the quality of "
|
||||
"data gathered so far, which in turn is influenced by the "
|
||||
"capabilities of your CD/DVD drive and the operating system. "
|
||||
"capabilities of your optical drive and the operating system. "
|
||||
"So depending on your configuration, you may or "
|
||||
"may not see dvdisaster using the maximum value."
|
||||
));
|
||||
@@ -2398,8 +2438,8 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Raw sector file prefix</b>\n\n"
|
||||
"Use a different prefix for each disk you are trying "
|
||||
"to recover, e.g. \"disk1-\" and so on."));
|
||||
"Use a different prefix for each disc you are trying "
|
||||
"to recover, e.g. \"disc1-\" and so on."));
|
||||
|
||||
/*** "Error correction" page */
|
||||
|
||||
@@ -2424,8 +2464,11 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
|
||||
for(j=0; j<Closure->methodList->len; j++)
|
||||
{ Method *method = g_ptr_array_index(Closure->methodList, j);
|
||||
char *utf;
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(chooser), method->menuEntry);
|
||||
utf = g_locale_to_utf8(method->menuEntry, -1, NULL, NULL, NULL);
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(chooser), utf);
|
||||
g_free(utf);
|
||||
|
||||
if(!strncmp(Closure->methodName, method->name, 4))
|
||||
method_idx = j;
|
||||
@@ -2447,24 +2490,22 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
AddHelpParagraph(lwoh, _("<b>Error correction method</b>\n\n"
|
||||
"dvdisaster creates error correction data which is used to recover "
|
||||
"unreadable sectors if the disc becomes damaged later on. There are "
|
||||
"two different ways available for storing the error correction "
|
||||
"different codecs and ways available for storing the error correction "
|
||||
"information:\n"));
|
||||
|
||||
AddHelpListItem(lwoh, _("Error correction files (RS01 method)\n"
|
||||
"Error correction files are the only way of protecting existing media "
|
||||
"as they can be stored somewhere else. They are kept on a separate "
|
||||
"medium which must also be protected by dvdisaster, as data loss in "
|
||||
"an error correction file will render it unusable.\n"));
|
||||
AddHelpListItem(lwoh, _("The RS01 codec\n"
|
||||
"RS01 is the recommended codec for storing error correction data in separate files.\n"));
|
||||
|
||||
AddHelpListItem(lwoh, _("The RS02 codec\n"
|
||||
"RS02 is the currently recommended codec for "
|
||||
"augmenting images with error correction data.\n"));
|
||||
|
||||
AddHelpListItem(lwoh, _("Augmented images (RS02 method)\n"
|
||||
"The error correction data will be stored along with the user data on the "
|
||||
"same CD/DVD. This requires the creation of an image file prior to writing the "
|
||||
"medium. The error correction data will be appended to that image. "
|
||||
"Damaged sectors in the error correction "
|
||||
"information reduce the data recovery capacity, but do not make recovery "
|
||||
"impossible - a second medium for keeping or protecting the error correction "
|
||||
"information is not required."));
|
||||
AddHelpListItem(lwoh, _("The RS03 codec (Warning: experimental)\n"
|
||||
"RS03 can either store error correction data in a separate file "
|
||||
"or augment the image with it. It provides multithreading "
|
||||
"to scale with multicore processors and contains some subtle improvements "
|
||||
"over RS01 and RS02. However it should not be used for productive work "
|
||||
"unless a stable version is released with dvdisaster V0.80."));
|
||||
|
||||
|
||||
/* sub pages for individual method configuration */
|
||||
@@ -2501,7 +2542,7 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
|
||||
/* file extension */
|
||||
|
||||
frame = gtk_frame_new(_utf("Local files (on hard disc)"));
|
||||
frame = gtk_frame_new(_utf("Local files (on hard disk)"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new(FALSE, 15);
|
||||
@@ -2536,38 +2577,6 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
"When this switch is set, files will be automatically appended with \".iso\" "
|
||||
"or \".ecc\" suffixes if no other file name extension is already present."));
|
||||
|
||||
/* 2GB button */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("File splitting"), _("Split files into segments <= 2GB"));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
{ GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
|
||||
GtkWidget *button = gtk_check_button_new();
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), Closure->splitFiles);
|
||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_2GB));
|
||||
|
||||
if(!i)
|
||||
{ pc->splitA = button;
|
||||
gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
}
|
||||
else
|
||||
{ pc->splitB = button;
|
||||
AddHelpWidget(lwoh, hbox);
|
||||
}
|
||||
}
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>File splitting</b>\n\n"
|
||||
"Allows working with file systems which are limited to 2GB per file, e.g. "
|
||||
"FAT from Windows. Created files are spread over upto 100 segments "
|
||||
"called \"medium00.iso\", \"medium01.iso\" etc. at the cost of a small "
|
||||
"performance hit."));
|
||||
|
||||
|
||||
/*** Automatic file creation and deletion */
|
||||
|
||||
frame = gtk_frame_new(_utf("Automatic file creation and deletion"));
|
||||
@@ -2636,6 +2645,45 @@ if(Closure->debugMode) /* hidden until version 0.80 */
|
||||
"If this switch is set the image file will be deleted following the successful "
|
||||
"generation of the respective error correction file."));
|
||||
|
||||
/*** Deletion confirmation */
|
||||
|
||||
frame = gtk_frame_new(_utf("Confirm file overwriting"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new(FALSE, 15);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox2), 10);
|
||||
gtk_container_add(GTK_CONTAINER(frame), vbox2);
|
||||
|
||||
/* automatic creation */
|
||||
|
||||
lwoh = CreateLabelWithOnlineHelp(_("Confirm file overwriting"), _("Ask before overwriting image and ecc files"));
|
||||
RegisterPreferencesHelpWindow(lwoh);
|
||||
|
||||
for(i=0; i<2; i++)
|
||||
{ GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
|
||||
GtkWidget *button = gtk_check_button_new();
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
|
||||
activate_toggle_button(GTK_TOGGLE_BUTTON(button), Closure->confirmDeletion);
|
||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(toggle_cb), GINT_TO_POINTER(TOGGLE_CONFIRM_DELETION));
|
||||
|
||||
if(!i)
|
||||
{ pc->confirmDeletionA = button;
|
||||
gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
||||
}
|
||||
else
|
||||
{ pc->confirmDeletionB = button;
|
||||
AddHelpWidget(lwoh, hbox);
|
||||
}
|
||||
}
|
||||
|
||||
AddHelpParagraph(lwoh,
|
||||
_("<b>Ask before overwriting image and ecc files</b>\n\n"
|
||||
"dvdisaster will ask you for confirmation "
|
||||
"when it is going to overwrite an existing image "
|
||||
"or error correction file if this option is checked."));
|
||||
|
||||
/*** GUI page */
|
||||
|
||||
vbox = create_page(notebook, _utf("Appearance"));
|
||||
|
||||
Reference in New Issue
Block a user