Move omission of SSH protocol setting in PuTTYtel into windlg.c and
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 6 Oct 2000 12:43:19 +0000 (12:43 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 6 Oct 2000 12:43:19 +0000 (12:43 +0000)
remove nosshres.rc accordingly

git-svn-id: svn://svn.tartarus.org/sgt/putty@682 cda61777-01e9-0310-a592-d414129be87e

Makefile
nosshres.rc [deleted file]
windlg.c

index bd106ce..5f9973f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -72,10 +72,8 @@ OBJS3 = sshbn.$(OBJ) sshpubk.$(OBJ) ssh.$(OBJ) pageantc.$(OBJ) tree234.$(OBJ)
 ##-- objects pageant
 PAGE1 = pageant.$(OBJ) sshrsa.$(OBJ) sshpubk.$(OBJ) sshdes.$(OBJ) sshbn.$(OBJ)
 PAGE2 = sshmd5.$(OBJ) version.$(OBJ) tree234.$(OBJ)
-##-- resources putty
+##-- resources putty puttytel
 PRESRC = win_res.$(RES)
-##-- resources puttytel
-TRESRC = nosshres.$(RES)
 ##-- resources pageant
 PAGERC = pageant.$(RES)
 ##-- resources pscp
@@ -104,7 +102,7 @@ all: putty.exe puttytel.exe pscp.exe plink.exe pageant.exe
 putty.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(POBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(PRESRC) putty.rsp
        link $(LFLAGS) -out:putty.exe @putty.rsp
 
-puttytel.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(TOBJS) $(MOBJS) $(TRESRC) puttytel.rsp
+puttytel.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1) $(TOBJS) $(MOBJS) $(PRESRC) puttytel.rsp
        link $(LFLAGS) -out:puttytel.exe @puttytel.rsp
 
 pageant.exe: $(PAGE1) $(PAGE2) $(PAGERC) pageant.rsp
@@ -138,7 +136,7 @@ puttytel.rsp: makefile
        echo $(LOBJS1) >> puttytel.rsp
        echo $(TOBJS) >> puttytel.rsp
        echo $(MOBJS) >> puttytel.rsp
-       echo $(TRESRC) >> puttytel.rsp
+       echo $(PRESRC) >> puttytel.rsp
        echo $(LIBS1) >> puttytel.rsp
        echo $(LIBS2) >> puttytel.rsp
        echo $(SOCK1) >> puttytel.rsp
@@ -225,12 +223,6 @@ win_res.$(RES):
        rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc
 
 ##-- dependencies
-nosshres.$(RES): nosshres.rc win_res.rc win_res.h putty.ico
-##--
-nosshres.$(RES):
-       rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 nosshres.rc
-
-##-- dependencies
 scp.$(RES): scp.rc scp.ico
 ##--
 scp.$(RES):
diff --git a/nosshres.rc b/nosshres.rc
deleted file mode 100644 (file)
index 0e5a801..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Stub rc file for the PuTTYtel ssh-free binary */
-#define NO_SSH
-#include "win_res.rc"
index f660fb0..faa7199 100644 (file)
--- a/windlg.c
+++ b/windlg.c
@@ -1091,15 +1091,22 @@ static int CALLBACK ConnectionProc (HWND hwnd, UINT msg,
         multiedit(&cp,
                   "Host &Name", IDC_HOSTSTATIC, IDC_HOST, 75,
                   "&Port", IDC_PORTSTATIC, IDC_PORT, 25, NULL);
-        radioline(&cp, "Protocol:", IDC_PROTSTATIC, 3,
-                  "&Raw", IDC_PROTRAW,
-                  "&Telnet", IDC_PROTTELNET,
+        if (backends[2].backend == NULL) {
+            /* this is PuTTYtel, so only two protocols available */
+            radioline(&cp, "Protocol:", IDC_PROTSTATIC, 3,
+                      "&Raw", IDC_PROTRAW,
+                      "&Telnet", IDC_PROTTELNET, NULL);
+        } else {
+            radioline(&cp, "Protocol:", IDC_PROTSTATIC, 3,
+                      "&Raw", IDC_PROTRAW,
+                      "&Telnet", IDC_PROTTELNET,
 #ifdef FWHACK
-                  "SS&H/hack",
+                      "SS&H/hack",
 #else
-                  "SS&H",
+                      "SS&H",
 #endif
-                  IDC_PROTSSH, NULL);
+                      IDC_PROTSSH, NULL);
+        }
         sesssaver(&cp, "Stor&ed Sessions",
                   IDC_SESSSTATIC, IDC_SESSEDIT, IDC_SESSLIST,
                   "&Load", IDC_SESSLOAD,