added print screen

This commit is contained in:
chombier 2001-06-18 09:11:55 +00:00
parent f50eeb7327
commit bb32b20f18
1 changed files with 30 additions and 10 deletions

View File

@ -53,7 +53,6 @@
#include <Printing.h> #include <Printing.h>
#include "printing.proto.h" #include "printing.proto.h"
#include "menuseg.proto.h"
#include "translate.proto.h" #include "translate.proto.h"
#include "parse.proto.h" // For SendNAWSinfo proto #include "parse.proto.h" // For SendNAWSinfo proto
#include "keypadmenus.proto.h" #include "keypadmenus.proto.h"
@ -149,6 +148,7 @@ void AdjustMenus(void)
DisableItem( myMenus[Fil],FLsave); DisableItem( myMenus[Fil],FLsave);
DisableItem( myMenus[Fil],FLsavem); DisableItem( myMenus[Fil],FLsavem);
DisableItem( myMenus[Fil],FLprint); DisableItem( myMenus[Fil],FLprint);
DisableItem( myMenus[Fil],FLprintScrn);
DisableItem( myMenus[Fil],FLselect); DisableItem( myMenus[Fil],FLselect);
DisableItem( myMenus[Fil],FLupload); DisableItem( myMenus[Fil],FLupload);
DisableItem( myMenus[Edit],EDcut); DisableItem( myMenus[Edit],EDcut);
@ -213,6 +213,7 @@ void AdjustMenus(void)
EnableItem ( myMenus[Fil],FLsave); EnableItem ( myMenus[Fil],FLsave);
EnableItem ( myMenus[Fil],FLsavem); EnableItem ( myMenus[Fil],FLsavem);
EnableItem ( myMenus[Fil],FLupload); EnableItem ( myMenus[Fil],FLupload);
EnableItem ( myMenus[Fil],FLprintScrn);
EnableItem ( myMenus[Emul],0); // RAB BetterTelnet 1.0fc8 EnableItem ( myMenus[Emul],0); // RAB BetterTelnet 1.0fc8
@ -832,7 +833,7 @@ void copyText( short vs)
tlong=ZeroScrap(); /* This Scrap aint big enough for the both of us */ tlong=ZeroScrap(); /* This Scrap aint big enough for the both of us */
charh=RSGetTextSel(vs,0); /* Get the text selection */ charh=RSGetTextSel(vs, 0, 1); /* Get the text selection */
if (charh == (char **)-1L) if (charh == (char **)-1L)
OutOfMemory(400); OutOfMemory(400);
@ -857,7 +858,7 @@ void copyTable( short vs)
tlong=ZeroScrap(); /* This Scrap aint big enough for the both of us */ tlong=ZeroScrap(); /* This Scrap aint big enough for the both of us */
charh=RSGetTextSel(vs, gApplicationPrefs->CopyTableThresh); /* Get the text selection */ charh=RSGetTextSel(vs, gApplicationPrefs->CopyTableThresh, 1); /* Get the text selection */
if (charh>(char **)0L) { /* BYU LSC - Can't do anything without characters */ if (charh>(char **)0L) { /* BYU LSC - Can't do anything without characters */
HLock(charh); /* Lock for putting */ HLock(charh); /* Lock for putting */
@ -989,7 +990,7 @@ void autoPaste(short vs) // RAB: routine added in BetterTelnet 1.0fc6
/* Flush the buffer if necessary */ //CCP fix for linemode /* Flush the buffer if necessary */ //CCP fix for linemode
kbflush(tw); kbflush(tw);
charh = RSGetTextSel(vs,0); /* Get the text selection */ charh = RSGetTextSel(vs, 0, 1); /* Get the text selection */
if (charh == (char **)-1L) { if (charh == (char **)-1L) {
OutOfMemory(400); OutOfMemory(400);
@ -1150,6 +1151,7 @@ void HandleMenuCommand( long mResult, short modifiers)
register short i; register short i;
short theItem, theMenu; short theItem, theMenu;
Boolean doWrap; Boolean doWrap;
Str255 scratchPstring;
theMenu = mResult >> 16; theMenu = mResult >> 16;
theItem = mResult & 0xffff; theItem = mResult & 0xffff;
@ -1239,6 +1241,10 @@ void HandleMenuCommand( long mResult, short modifiers)
PrintSelection(); PrintSelection();
break; break;
case FLprintScrn: /* Print Screen */
PrintScreen();
break;
case FLselect: case FLselect:
SaveSelectionToFile(); SaveSelectionToFile();
break; break;
@ -1763,24 +1769,29 @@ void HandleMenuCommand( long mResult, short modifiers)
break; break;
} }
if ( theItem == COshowlog ) {
DebugKeys(TRUE, 39, -1);
break;
}
if (theItem == COtitle) { if (theItem == COtitle) {
ChangeWindowName(FrontWindow()); ChangeWindowName(FrontWindow());
break; break;
} }
if (theItem >= FIRST_CNXN_ITEM) { if (theItem >= FIRST_CNXN_ITEM) {
if ((theItem - FIRST_CNXN_ITEM-1)>(TelInfo->numwindows+1)) break; /* rotten danish */ if ((theItem - FIRST_CNXN_ITEM-1)>(TelInfo->numwindows+1)) break; /* rotten danish */
if (screens[theItem - FIRST_CNXN_ITEM].active != CNXN_ACTIVE) { if (screens[theItem - FIRST_CNXN_ITEM].active != CNXN_ACTIVE) {
displayStatus(theItem - FIRST_CNXN_ITEM); /* Tell them about it..... */ displayStatus(theItem - FIRST_CNXN_ITEM); /* Tell them about it..... */
break; break;
} }
else { else {
HiliteWindow(screens[scrn].wind, FALSE); HiliteWindow(screens[scrn].wind, FALSE);
changeport(scrn,(theItem - FIRST_CNXN_ITEM)); changeport(scrn,(theItem - FIRST_CNXN_ITEM));
if (!(modifiers & optionKey)) SelectWindow(screens[scrn].wind); if (!(modifiers & optionKey)) SelectWindow(screens[scrn].wind);
else HiliteWindow(screens[scrn].wind, TRUE); else HiliteWindow(screens[scrn].wind, TRUE);
}
} }
}
break; break;
case fontMenu: case fontMenu:
@ -1942,9 +1953,15 @@ void DoTheMenuChecks(void)
return; return;
} }
EnableItem( myMenus[Conn], 0 );
EnableItem( myMenus[Conn], COshowlog);
if (TelInfo->numwindows>0) if (TelInfo->numwindows>0)
{ {
EnableItem( myMenus[Conn],0); // EnableItem(myMenus[Conn], 0 );
EnableItem( myMenus[Conn], COtitle );
if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */ if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */
EnableItem(myMenus[Keypad], 0); /* Baylor */ EnableItem(myMenus[Keypad], 0); /* Baylor */
EnableItem(myMenus[Function], 0); /* Baylor */ EnableItem(myMenus[Function], 0); /* Baylor */
@ -1954,7 +1971,9 @@ void DoTheMenuChecks(void)
else else
{ {
DisableItem(myMenus[Conn],0); // DisableItem(myMenus[Conn], 0 );
DisableItem(myMenus[Conn], COtitle );
if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */ if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */
DisableItem(myMenus[Keypad], 0); /* Baylor */ DisableItem(myMenus[Keypad], 0); /* Baylor */
DisableItem(myMenus[Function], 0); /* Baylor */ DisableItem(myMenus[Function], 0); /* Baylor */
@ -1962,6 +1981,7 @@ void DoTheMenuChecks(void)
DrawMenuBar(); DrawMenuBar();
} }
active =0; active =0;
for (windownum=0;windownum<TelInfo->numwindows;windownum++) for (windownum=0;windownum<TelInfo->numwindows;windownum++)
@ -2244,7 +2264,7 @@ void SaveThisSelection(short vs) {
short refNum, exist; short refNum, exist;
long tempCount; long tempCount;
charh=RSGetTextSel(vs,0); /* Get the text selection */ charh=RSGetTextSel(vs, 0, 1); /* Get the text selection */
if (charh == (char **)-1L) if (charh == (char **)-1L)
OutOfMemory(400); OutOfMemory(400);