Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / install / acquire / ui-line.c
index 788fb86..fdd3f9a 100644 (file)
@@ -75,6 +75,7 @@ static gboolean ui_line_progress(GnomeVFSURI *uri)
 {
 fd_set readfds;
 struct timeval timeval;
+static int stdin_isatty=-1;
 
        /* 'uri' may be NULL */
 
@@ -90,7 +91,9 @@ struct timeval timeval;
                abort_msg_printed=TRUE;
                }
 
-       if (isatty(0)) {
+       if (stdin_isatty==-1)
+               stdin_isatty=isatty(0);
+       if (stdin_isatty>0) {
                FD_ZERO(&readfds);
                FD_SET(0,&readfds);
                timeval.tv_sec=0;
@@ -159,15 +162,15 @@ static void print_modules_available_foreach
        g_return_if_fail(type!=NULL);
        g_return_if_fail(module_available!=NULL);
        g_return_if_fail(module_available->module!=NULL);
-       g_return_if_fail(!strcmp(type,module_available->module->type));
+       g_return_if_fail(!strcmp((const char *)type,(const char *)module_available->module->type));
        g_return_if_fail(param!=NULL);
 
        if (param->do_print)
                print_ui_line_module_available(module_available);
 
-       /**/ if (!strcmp(type,"ntoskrnl.exe"))
+       /**/ if (!strcmp((const char *)type,"ntoskrnl.exe"))
                param->ntoskrnl_exe_found=TRUE;
-       else if (!strcmp(type,"ntfs.sys"))
+       else if (!strcmp((const char *)type,"ntfs.sys"))
                param->ntfs_sys_found=TRUE;
 }
 
@@ -245,7 +248,11 @@ static void ui_line_interactive(void)
        while (!all_modules_found) {
 char *line;
 
-               if (ui_line_interactive_ask(_("Fully scan all directories of your local disks?")))
+               if (ui_line_interactive_ask(_(
+                               "Detection of language localized MS-Windows drivers is missing."
+                               " You may need to copy localized ntfs.sys and ntoskrnl.exe to /var/lib/captive/ by cp(1) command;"
+                               " contact me for their proper identification, please.\n"
+                               "Fully scan all directories of your local disks?")))
                        scan_disks();
 
                if (!all_modules_found)
@@ -256,9 +263,7 @@ char *line;
                                if (line && *line) {
 GnomeVFSURI *uri;
 
-                                       uri=gnome_vfs_uri_new((strncmp(line,"http://",strlen("http://")) ? line
-                                                       : captive_printf_alloca("httpcaptive://%s",line+strlen("http://"))));
-                                       if (!uri)
+                                       if (!(uri=gnome_vfs_uri_new(line)))
                                                printf(_("Error paring URI: %s"),line);
                                        else {
                                                mod_uri_load_base_reporting(uri);
@@ -273,10 +278,10 @@ GnomeVFSURI *uri;
                                } while (!all_modules_found && line);
 
                if (ui_line_interactive_ask(_(
-                               "You can download the best available version of needed drivers from Microsoft. They can be found in Microsoft Windows XP Service Pack 1 Checked Build.\n"
-                               "URL: http://www.microsoft.com/WindowsXP/pro/downloads/servicepacks/sp1/checkedbuild.asp\n"
+                               "You can download the best available version of needed drivers from Microsoft. They can be found in Microsoft Windows XP Service Pack 2 Checked Build.\n"
+                               "URL: http://msdn.microsoft.com/security/productinfo/xpsp2\n"
                                "Legal: In some countries you need to have valid Microsoft Windows XP license to use it.\n"
-                               "It is needed to download approx 29MB of data right now out of the 144MB file size. You can also download the file separately and load it in the previous screen if some problems occur.\n")))
+                               "It is needed to download approx 61MB of data right now out of the 307MB file size. You can also download the file separately and load it in the previous screen if some problems occur.\n")))
                        microsoft_com();
                if (!all_modules_found)
                        puts(_("\nWe tried all available drivers acquiration methods - the options will start again."));