svnno****@sourc*****
svnno****@sourc*****
2009年 10月 26日 (月) 01:22:26 JST
Revision: 3660 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3660 Author: doda Date: 2009-10-26 01:22:26 +0900 (Mon, 26 Oct 2009) Log Message: ----------- URLの下線の有無を設定できるようにした。 デフォルト: URLUnderline=on Modified Paths: -------------- trunk/teraterm/common/tttypes.h trunk/teraterm/teraterm/vtdisp.c trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2009-10-25 16:11:54 UTC (rev 3659) +++ trunk/teraterm/common/tttypes.h 2009-10-25 16:22:26 UTC (rev 3660) @@ -196,6 +196,7 @@ #define CF_USETEXTCOLOR 256 #define CF_REVERSEVIDEO 512 +#define CF_URLUNDERLINE 1024 // port flags (used in ts.PortFlag) #define PF_CONFIRMDISCONN 1 Modified: trunk/teraterm/teraterm/vtdisp.c =================================================================== --- trunk/teraterm/teraterm/vtdisp.c 2009-10-25 16:11:54 UTC (rev 3659) +++ trunk/teraterm/teraterm/vtdisp.c 2009-10-25 16:22:26 UTC (rev 3660) @@ -2425,6 +2425,7 @@ } #define isURLColored(x) ((ts.ColorFlag & CF_URLCOLOR) && ((x).Attr & AttrURL)) +#define isURLUnderlined(x) ((ts.ColorFlag & CF_URLUNDERLINE) && (ts.ColorFlag & CF_URLCOLOR) && ((x).Attr & AttrURL)) #define isBoldColored(x) ((ts.ColorFlag & CF_BOLDCOLOR) && ((x).Attr & AttrBold)) #define isBlinkColored(x) ((ts.ColorFlag & CF_BLINKCOLOR) && ((x).Attr & AttrBlink)) #define isReverseColored(x) ((ts.ColorFlag & CF_REVERSECOLOR) && ((x).Attr & AttrReverse)) @@ -2447,7 +2448,7 @@ DCAttr = Attr; DCReverse = Reverse; - SelectObject(VTDC, VTFont[(Attr.Attr & AttrFontMask) | (isURLColored(Attr)?AttrUnder:0)]); + SelectObject(VTDC, VTFont[(Attr.Attr & AttrFontMask) | (isURLUnderlined(Attr)?AttrUnder:0)]); if ((ts.ColorFlag & CF_FULLCOLOR) == 0) { if (isBlinkColored(Attr)) { Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2009-10-25 16:11:54 UTC (rev 3659) +++ trunk/teraterm/ttpset/ttset.c 2009-10-25 16:22:26 UTC (rev 3660) @@ -508,6 +508,9 @@ if (GetOnOff(Section, "EnableURLColor", FName, TRUE)) ts->ColorFlag |= CF_URLCOLOR; + if (GetOnOff(Section, "URLUnderline", FName, TRUE)) + ts->ColorFlag |= CF_URLUNDERLINE; + /* TEK Color */ GetPrivateProfileString(Section, "TEKColor", "0,0,0,255,255,255", Temp, sizeof(Temp), FName); @@ -1725,6 +1728,9 @@ WriteOnOff(Section, "EnableURLColor", FName, (WORD) (ts->ColorFlag & CF_URLCOLOR)); + WriteOnOff(Section, "URLUnderline", FName, + (WORD) (ts->ColorFlag & CF_URLCOLOR)); + WriteOnOff(Section, "EnableANSIColor", FName, (WORD) (ts->ColorFlag & CF_ANSICOLOR));