sync from upstream up to 22:14a375563e2b
This includes the following commits: changeset: 22:14a375563e2b summary: chang "while" command to "type -P" in bash based configure changeset: 21:c4bf7c0f33d2 summary: updated codec paper for RS01 life cycle changeset: 20:dbcaad8128aa summary: replaced build count with mercurial changeset changeset: 19:fba258a6acfa summary: Added tag 0.79.10 for changeset 49950be5a2ef changeset: 18:49950be5a2ef summary: merged some debian patches changeset: 17:815be3929c41 summary: merged "easy" patches from Stéphane Lesimple's version changeset: 16:7d15f8a958cb summary: Made printf format strings 32/64bit safe as suggested by Stéphane; changeset: 15:1055a53b8d6d summary: reorganized code for --with-gui=[yes|no] option changeset: 14:fbe2ae12a32c summary: Added tag 0.79.9 for changeset f2fdd6d3a1f5 changeset: 13:f2fdd6d3a1f5 summary: updated TODO and CHANGELOG And other changes that were needed to resolve the (many) conflicts.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
* along with dvdisaster. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*** src type: some GUI code ***/
|
||||
|
||||
#include "dvdisaster.h"
|
||||
|
||||
#define DSM_VERSION "1.00"
|
||||
@@ -260,7 +262,7 @@ int CheckForMissingSectors(unsigned char *buf, guint64 sector,
|
||||
*** Dialogue for indicating problem with the missing sector
|
||||
***/
|
||||
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
#ifdef WITH_GUI_YES
|
||||
static void insert_buttons(GtkDialog *dialog)
|
||||
{
|
||||
gtk_dialog_add_buttons(dialog,
|
||||
@@ -270,13 +272,10 @@ static void insert_buttons(GtkDialog *dialog)
|
||||
#endif
|
||||
|
||||
void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int source_type, int *number)
|
||||
{
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
int answer;
|
||||
#endif
|
||||
guint64 recorded_number;
|
||||
{ guint64 recorded_number;
|
||||
char *vol_label, *label_msg;
|
||||
|
||||
int answer;
|
||||
|
||||
if(Closure->noMissingWarnings)
|
||||
return;
|
||||
|
||||
@@ -293,11 +292,7 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
|
||||
/* In CLI mode, only report the first unrecoverable sector unless verbose is given. */
|
||||
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode && !Closure->verbose && *number > 0)
|
||||
#else
|
||||
if(!Closure->verbose && *number > 0)
|
||||
#endif
|
||||
{ if(*number == 1)
|
||||
PrintLog(_("* ... more unrecoverable sectors found ...\n"
|
||||
"* further messages are suppressed unless the -v option is given.\n"));
|
||||
@@ -312,13 +307,9 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
|
||||
vol_label = get_volume_label(buf);
|
||||
if(vol_label)
|
||||
{
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(Closure->guiMode)
|
||||
{ if(Closure->guiMode)
|
||||
label_msg = g_strdup_printf(_("\n\nThe label of the original (defective) medium was:\n%s\n\n"), vol_label);
|
||||
else
|
||||
#endif
|
||||
label_msg = g_strdup_printf(_("\n* \n* The label of the original (defective) medium was:\n* \n* %s\n* "), vol_label);
|
||||
else label_msg = g_strdup_printf(_("\n* \n* The label of the original (defective) medium was:\n* \n* %s\n* "), vol_label);
|
||||
g_free(vol_label);
|
||||
}
|
||||
else label_msg = g_strdup("\n");
|
||||
@@ -339,18 +330,14 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"repaired by dvdisaster. Also it will not be possible to create\n"
|
||||
"error correction data for it. Sorry for the bad news.\n");
|
||||
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg,sector, recorded_number, label_msg);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector, recorded_number, label_msg);
|
||||
{ answer = GuiModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons,
|
||||
msg, sector, recorded_number, label_msg);
|
||||
|
||||
if(answer) Closure->noMissingWarnings = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -366,17 +353,13 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"repaired by dvdisaster. Also it will not be possible to create\n"
|
||||
"error correction data for it. Sorry for the bad news.\n");
|
||||
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg,sector, label_msg);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
PrintLogWithAsterisks(msg,sector, label_msg);
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector, label_msg);
|
||||
{ answer = GuiModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons,
|
||||
msg, sector, label_msg);
|
||||
if(answer) Closure->noMissingWarnings = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -395,18 +378,14 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"repaired by dvdisaster. Also it will not be possible to create\n"
|
||||
"error correction data for it. Sorry for the bad news.\n");
|
||||
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg, sector);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector);
|
||||
{ answer = GuiModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector);
|
||||
|
||||
if(answer) Closure->noMissingWarnings = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Error was found while reading an ecc file */
|
||||
@@ -419,18 +398,14 @@ void ExplainMissingSector(unsigned char *buf, guint64 sector, int error, int sou
|
||||
"in the ecc file are missing and its error correction\n"
|
||||
"capacity will be reduced.\n");
|
||||
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
if(!Closure->guiMode)
|
||||
#endif
|
||||
PrintLogWithAsterisks(msg, sector);
|
||||
#ifndef WITH_CLI_ONLY_YES
|
||||
else
|
||||
{ answer = ModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector);
|
||||
{ answer = GuiModalDialog(GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, insert_buttons, msg,
|
||||
sector);
|
||||
|
||||
if(answer) Closure->noMissingWarnings = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
g_free(label_msg);
|
||||
|
||||
Reference in New Issue
Block a user