This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[setup] branch master, updated. release_2.873-2-ge0373ab




https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=e0373ab59e0826f4fda87818b238bbbb680c498c

commit e0373ab59e0826f4fda87818b238bbbb680c498c
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Oct 20 13:25:11 2015 +0100

    Don't stop on various warning message boxes in unattended mode.
    
    Change simple uses of MessageBox() to use the mbox() wrapper for MessageBox(),
    which knows what to do in unattended mode.
    
    There still remain the uses of MessageBox() which check the result, as these
    need more detailed study, to choose an appropriate default for unattended mode.
    
    	* dialog.cc (fatal): Use mbox rather than MessageBox.
    	* install.cc (installOne, check_for_old_cygwin): Ditto.
    	* main.cc (main_display, WinMain): Ditto.
    	* mount.cc (create_install_root): Ditto.
    	* nio-ie5.cc (NetIO_IE5): Ditto.
    	* root.cc (directory_contains_wrong_version): Ditto.
    	* site.cc (do_download_site_info_thread): Ditto.
    
    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>


Diff:
---
 ChangeLog  |   10 ++++++++++
 dialog.cc  |    2 +-
 install.cc |    8 ++++----
 main.cc    |    4 ++--
 mount.cc   |    2 +-
 nio-ie5.cc |    2 +-
 root.cc    |    2 +-
 site.cc    |    2 +-
 8 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9aa79d0..7236582 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-08-04  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* dialog.cc (fatal): Use mbox rather than MessageBox.
+	* install.cc (installOne, check_for_old_cygwin): Ditto.
+	* main.cc (main_display, WinMain): Ditto.
+	* mount.cc (create_install_root): Ditto.
+	* nio-ie5.cc (NetIO_IE5): Ditto.
+	* root.cc (directory_contains_wrong_version): Ditto.
+	* site.cc (do_download_site_info_thread): Ditto.
+
 2015-10-18  Achim Gratz  <Stromeko@NexGo.DE>
 
 	* ini.cc (check_ini_sig): Do not complain about a missing
diff --git a/dialog.cc b/dialog.cc
index ba1582d..03bacf0 100644
--- a/dialog.cc
+++ b/dialog.cc
@@ -108,7 +108,7 @@ fatal (const char *msg, DWORD err)
   char *buf;
   FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
 		 0, e, 0, (CHAR *) & buf, 0, 0);
-  MessageBox (0, buf, msg, 0);
+  mbox (0, buf, msg, MB_OK);
   Logger ().exit (1);
   // Keep gcc happy - some sort of bug!
   exit (1);
diff --git a/install.cc b/install.cc
index a5c4b10..e025485 100644
--- a/install.cc
+++ b/install.cc
@@ -627,8 +627,8 @@ Installer::installOne (packagemeta &pkgm, const packageversion &ver,
                     // and ignore all errors is mis-implemented at present
                     // to only apply to errors arising from a single archive,
                     // so we degenerate to the continue option.
-                    MessageBox (owner, msg, "File extraction error",
-                                MB_OK | MB_ICONWARNING | MB_TASKMODAL);
+                    mbox (owner, msg, "File extraction error",
+                          MB_OK | MB_ICONWARNING | MB_TASKMODAL);
                   }
 
                 // don't mark this package as successfully installed
@@ -686,8 +686,8 @@ check_for_old_cygwin (HWND owner)
 		   "Is the DLL in use by another application?\r\n"
 		   "You should delete the old version of cygwin1.dll\r\n"
 		   "at your earliest convenience.", buf);
-	  MessageBox (owner, buf, "Couldn't delete file",
-		      MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL);
+	  mbox (owner, buf, "Couldn't delete file",
+                MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL);
 	}
       break;
     default:
diff --git a/main.cc b/main.cc
index b0d78eb..43a5860 100644
--- a/main.cc
+++ b/main.cc
@@ -164,7 +164,7 @@ main_display ()
       sprintf (buf, "CoCreateInstance failed with error 0x%x.\n"
 		    "Setup will not be able to create Cygwin Icons\n"
 		    "in the Start Menu or on the Desktop.", (int) res);
-      MessageBox (NULL, buf, "Cygwin Setup", MB_OK);
+      mbox (NULL, buf, "Cygwin Setup", MB_OK);
     }
 
   // Init window class lib
@@ -256,7 +256,7 @@ WinMain (HINSTANCE h,
 	sprintf (buff, "Invalid option for --arch:  \"%s\"",
 		 ((string) Arch).c_str ());
 	fprintf (stderr, "*** %s\n", buff);
-	MessageBox (NULL, buff, "Invalid option", MB_ICONEXCLAMATION | MB_OK);
+	mbox (NULL, buff, "Invalid option", MB_ICONEXCLAMATION | MB_OK);
 	exit (1);
       }
 
diff --git a/mount.cc b/mount.cc
index bf198a5..303c138 100644
--- a/mount.cc
+++ b/mount.cc
@@ -136,7 +136,7 @@ create_install_root ()
       }
     while (rv == ERROR_ACCESS_DENIED);
   if (rv != ERROR_SUCCESS)
-    MessageBox (NULL, "Couldn't create registry key\n"
+    mbox (NULL, "Couldn't create registry key\n"
 		      "to store installation path",
 		"Cygwin Setup", MB_OK | MB_ICONWARNING);
   RegCloseKey (key);
diff --git a/nio-ie5.cc b/nio-ie5.cc
index 11134ee..db4666c 100644
--- a/nio-ie5.cc
+++ b/nio-ie5.cc
@@ -91,7 +91,7 @@ try_again:
 	  char buf[2000];
 	  DWORD e, l = sizeof (buf);
 	  InternetGetLastResponseInfo (&e, buf, &l);
-	  MessageBox (0, buf, "Internet Error", 0);
+	  mbox (0, buf, "Internet Error", MB_OK);
 	}
     }
 
diff --git a/root.cc b/root.cc
index 247926a..edf7a91 100644
--- a/root.cc
+++ b/root.cc
@@ -220,7 +220,7 @@ directory_contains_wrong_version (HWND h)
 	setup_ver, inst_ver,
 	is_64bit ? "x86" : "x86_64",
 	inst_ver, setup_ver);
-  MessageBox (h, text, "Target CPU mismatch", MB_OK);
+  mbox (h, text, "Target CPU mismatch", MB_OK);
   return 1;
 }
 
diff --git a/site.cc b/site.cc
index 46caef1..677672e 100644
--- a/site.cc
+++ b/site.cc
@@ -411,7 +411,7 @@ do_download_site_info_thread (void *p)
     {
       // Error: Couldn't download the site info.
       // Go back to the Net setup page.
-      MessageBox (h, TEXT ("Can't get list of download sites.\n")
+      mbox (h, TEXT ("Can't get list of download sites.\n")
           TEXT("Make sure your network settings are correct and try again."),
           NULL, MB_OK);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]