r271 - in trunk: . scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed May 16 20:11:12 EDT 2007


Author: icculus
Date: 2007-05-16 20:11:12 -0400 (Wed, 16 May 2007)
New Revision: 271

Modified:
   trunk/gui_stdio.c
   trunk/scripts/localization.lua
Log:
stdio GUI chooses first install destination listed if user just hits enter.


Modified: trunk/gui_stdio.c
===================================================================
--- trunk/gui_stdio.c	2007-05-16 23:50:29 UTC (rev 270)
+++ trunk/gui_stdio.c	2007-05-17 00:11:12 UTC (rev 271)
@@ -298,7 +298,7 @@
     *command = -1;
 
     if (recnum > 0)
-        prompt = entry->xstrdup(entry->_("Choose install destination by number, or enter your own."));
+        prompt = entry->xstrdup(entry->_("Choose install destination by number (hit enter for #1), or enter your own."));
     else
         prompt = entry->xstrdup(entry->_("Enter path where files will be installed."));
 
@@ -311,6 +311,14 @@
 
         if ((len = readstr(prompt, buf, sizeof (buf), can_back, false)) < 0)
             getout = true;
+
+        else if ((len == 0) && (recnum > 0))   // default to first in list.
+        {
+            retval = entry->xstrdup(recommends[0]);
+            *command = 1;
+            getout = true;
+        } // else if
+
         else if (len > 0)
         {
             char *endptr = NULL;

Modified: trunk/scripts/localization.lua
===================================================================
--- trunk/scripts/localization.lua	2007-05-16 23:50:29 UTC (rev 270)
+++ trunk/scripts/localization.lua	2007-05-17 00:11:12 UTC (rev 271)
@@ -92,7 +92,7 @@
     ["Install destination:"] = {
     };
 
-    ["Choose install destination by number, or enter your own."] = {
+    ["Choose install destination by number (hit enter for #1), or enter your own."] = {
     };
 
     ["Enter path where files will be installed."] = {




More information about the mojosetup-commits mailing list