Bug 236294 installer exits before user sees CRC Failed dialog

patch by ajschult@mindspring.com r=dveditz sr=dveditz
This commit is contained in:
timeless%mozdev.org 2004-04-27 05:03:06 +00:00
Родитель 74c4b33d5f
Коммит e5bdb6575e
4 изменённых файлов: 2 добавлений и 53 удалений

Просмотреть файл

@ -45,7 +45,6 @@ DS_REQD=Disk Space Required = %ld KB
NO_DISK_SPACE=Please select a directory on a disk with enough space to install or free some disk space on the selected disk.
CXN_DROPPED=A network connection failure occured. Please check your network connection and press the 'Resume' button. Alternatively, press the 'Cancel' button to quit the installer.
CRC_CHECK=Some files failed to download correctly. Retrying.
CRC_FAILED=Installation has failed due to multiple CRC failures.
DOWNLOADING=Downloading:
FROM=From:
TO=To:
@ -85,7 +84,7 @@ UNKNOWN=Unknown
-625=A previous installation exists.
-626=Insufficient permission
-627=Insufficient disk space
-628=Multiple CRC Failure
-628=Installation has failed due to multiple CRC failures.
-629=Usage message shown
-630=Destination directory must be empty or contain a previous installation.

Просмотреть файл

@ -599,7 +599,7 @@ nsInstallDlg::PerformInstall()
}
else if (err == E_CRC_FAILED)
{
ShowCRCFailedDlg();
ErrorHandler(err);
goto BAIL;
}
else if (err == E_DL_PAUSE || err == E_DL_CANCEL)
@ -1200,46 +1200,6 @@ nsInstallDlg::ShowCRCDlg()
XI_GTK_UPDATE_UI();
}
int
nsInstallDlg::ShowCRCFailedDlg()
{
GtkWidget *crcFailedDlg, *label, *okButton, *packer;
// throw up dialog informing user to press resume
// or to cancel out
if (gCtx->opt->mMode == nsXIOptions::MODE_SILENT) {
ErrorHandler(E_CRC_FAILED);
return OK;
}
crcFailedDlg = gtk_dialog_new();
label = gtk_label_new(gCtx->Res("CRC_FAILED"));
okButton = gtk_button_new_with_label(gCtx->Res("OK_LABEL"));
packer = gtk_packer_new();
if (crcFailedDlg && label && okButton && packer)
{
gtk_packer_set_default_border_width(GTK_PACKER(packer), 20);
gtk_packer_add_defaults(GTK_PACKER(packer), label, GTK_SIDE_BOTTOM,
GTK_ANCHOR_CENTER, GTK_FILL_X);
gtk_window_set_modal(GTK_WINDOW(crcFailedDlg), TRUE);
gtk_window_set_title(GTK_WINDOW(crcFailedDlg), gCtx->opt->mTitle);
gtk_window_set_position(GTK_WINDOW(crcFailedDlg), GTK_WIN_POS_CENTER);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(crcFailedDlg)->vbox),
packer);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(crcFailedDlg)->action_area),
okButton);
gtk_signal_connect(GTK_OBJECT(okButton), "clicked",
GTK_SIGNAL_FUNC(CRCFailedOK), crcFailedDlg);
GTK_WIDGET_SET_FLAGS(okButton, GTK_CAN_DEFAULT);
gtk_widget_grab_default(okButton);
gtk_widget_show_all(crcFailedDlg);
}
XI_GTK_UPDATE_UI();
return OK;
}
int
nsInstallDlg::ShowCxnDroppedDlg()
{
@ -1281,13 +1241,6 @@ nsInstallDlg::ShowCxnDroppedDlg()
return OK;
}
void
nsInstallDlg::CRCFailedOK(GtkWidget *aWidget, gpointer aData)
{
gtk_main_quit();
return;
}
void
nsInstallDlg::DestroyCRCDlg()
{

Просмотреть файл

@ -111,9 +111,7 @@ private:
static void DLPause(GtkWidget *aWidget, gpointer aData);
static void DLResume(GtkWidget *aWidget, gpointer aData);
static void DLCancel(GtkWidget *aWidget, gpointer aData);
static int ShowCRCFailedDlg();
static int ShowCxnDroppedDlg();
static void CRCFailedOK(GtkWidget *aWidget, gpointer aData);
static void CxnDroppedOK(GtkWidget *aWidget, gpointer aData);
static void CRCOKCb(GtkWidget *aWidget, gpointer aData);
static void HideNavButtons();

Просмотреть файл

@ -202,7 +202,6 @@ nsXIContext::LoadResources()
"TO",
"STATUS",
"DL_STATUS_STR",
"CRC_FAILED",
"CRC_CHECK",
"USAGE_MSG",
"UNKNOWN",