Imported Upstream version 0.72.3

This commit is contained in:
TANIGUCHI Takaki
2012-03-06 11:08:15 +09:00
parent 205701b3de
commit 30255c97b3
713 changed files with 13953 additions and 28840 deletions

View File

@@ -1,5 +1,5 @@
/* dvdisaster: Additional error correction for optical media.
* Copyright (C) 2004-2010 Carsten Gnoerlich.
* Copyright (C) 2004-2011 Carsten Gnoerlich.
* Project home page: http://www.dvdisaster.com
* Email: carsten@dvdisaster.com -or- cgnoerlich@fsfe.org
*
@@ -39,6 +39,19 @@ static gboolean delete_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
*** The right-side action buttons
***/
static void remove_the_00s(char *filename)
{ char *dot = strrchr(filename, '.');
if(dot)
{ int pos = dot-filename;
if(pos>2 && filename[pos-2] == '0'
&& filename[pos-1] == '0')
memmove(filename+pos-2, filename+pos,
strlen(filename)-pos+1);
}
}
/*
* Callback for the action buttons
*/
@@ -54,7 +67,7 @@ static void action_cb(GtkWidget *widget, gpointer data)
if(action != ACTION_CREATE_CONT)
{ g_mutex_lock(Closure->logLock);
g_string_truncate(Closure->logString, 0);
g_string_printf(Closure->logString, _("dvdisaster-%s log\n"), Closure->cookedVersion);
g_string_printf(Closure->logString, _("dvdisaster-%s log\n"),VERSION);
g_mutex_unlock(Closure->logLock);
Closure->logFileStamped = FALSE;
}
@@ -78,29 +91,11 @@ static void action_cb(GtkWidget *widget, gpointer data)
gtk_entry_set_text(GTK_ENTRY(Closure->eccEntry), Closure->eccName);
}
/* The ecc file may not be labeled as an .iso image */
/* Transform foo00.[iso|ecc] into foo.[iso|ecc] when in filesplit mode */
if(Closure->eccName)
{ int len = strlen(Closure->eccName);
if(!strcmp(Closure->eccName, Closure->imageName))
{ CreateMessage(_("The .iso image and error correction file\n"
"must not be the same file!\n\n"
"If you intended to create or use an .iso image\n"
"which is augmented with error correction data,\n"
"please leave the error correction file name blank."),
GTK_MESSAGE_ERROR);
return;
}
if(!strcmp(Closure->eccName+len-4, ".iso"))
{ CreateMessage(_("The error correction file type must not be \".iso\".\n\n"
"If you intended to create or use an .iso image\n"
"which is augmented with error correction data,\n"
"please leave the error correction file name blank."),
GTK_MESSAGE_ERROR);
return;
}
if(Closure->splitFiles)
{ remove_the_00s(Closure->imageName);
remove_the_00s(Closure->eccName);
}
/* Reset warnings which may be temporarily disabled during an action */
@@ -155,7 +150,7 @@ static void action_cb(GtkWidget *widget, gpointer data)
case ACTION_FIX:
ClearCrcCache();
if(!(method = EccMethod(TRUE)))
if(!(method = EccFileMethod(TRUE)))
break;
gtk_notebook_set_current_page(GTK_NOTEBOOK(Closure->notebook), method->tabWindowIndex+1);
@@ -177,7 +172,7 @@ static void action_cb(GtkWidget *widget, gpointer data)
/* If something is wrong with the .iso or .ecc files
we fall back to the RS01 method for verifying since it is robust
against missing files. */
if(!(method = EccMethod(FALSE)))
if(!(method = EccFileMethod(FALSE)))
if(!(method = FindMethod("RS01")))
break;