]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - download.cc
Add an option to set the GUI language
[cygwin-apps/setup.git] / download.cc
index 0cb335223c83e9092e667a039374bd7ed631f0b8..fd1253b98f3cbc996826059aae38274186f5187e 100644 (file)
@@ -45,8 +45,6 @@
 
 #include "Exception.h"
 
-using namespace std;
-
 extern ThreeBarProgressPage Progress;
 
 // Return true if selected checks pass, false if they don't and the
@@ -84,9 +82,16 @@ int
 check_for_cached (packagesource & pkgsource, HWND owner, bool mirror_mode,
                  bool check_hash)
 {
+  /* If the packagesource doesn't have a filename, it can't possibly be in the
+     cache */
+  if (!pkgsource.Canonical())
+    {
+      return 0;
+    }
+
   /* Note that the cache dir is represented by a mirror site of file://local_dir */
   std::string prefix = "file://" + local_dir + "/";
-  std::string fullname = prefix + (pkgsource.Canonical() ? pkgsource.Canonical() : "");
+  std::string fullname = prefix + pkgsource.Canonical();
 
   if (mirror_mode)
     {
@@ -273,7 +278,7 @@ do_download_thread (HINSTANCE h, HWND owner)
   total_download_bytes_sofar = 0;
   download_failures.clear ();
 
-  Progress.SetText1 ("Checking for packages to download...");
+  Progress.SetText1 (IDS_PROGRESS_CHECKING);
   Progress.SetText2 ("");
   Progress.SetText3 ("");
 
@@ -377,6 +382,8 @@ do_download_reflector (void *p)
   HANDLE *context;
   context = (HANDLE *) p;
 
+  SetThreadUILanguage(langid);
+
   try
   {
     int next_dialog =
This page took 0.026385 seconds and 5 git commands to generate.