Index: MUSHclient.cpp =================================================================== RCS file: /cvs/mushclient/MUSHclient.cpp,v retrieving revision 1.102 retrieving revision 1.104 diff -c -r1.102 -r1.104 *** MUSHclient.cpp 16 Jul 2009 01:48:53 -0000 1.102 --- MUSHclient.cpp 9 Aug 2009 05:37:57 -0000 1.104 *************** *** 235,240 **** --- 235,242 ---- static const CLSID clsid = { 0x11dfc5e6, 0xad6f, 0x11d0, { 0x8e, 0xae, 0x0, 0xa0, 0x24, 0x7b, 0x3b, 0xfd } }; + + ///////////////////////////////////////////////////////////////////////////// // CMUSHclientApp initialization *************** *** 280,288 **** m_pszProfileName=_tcsdup(strIniFile); ! // in case of error dialogs, etc. ! m_strFixedPitchFont = "FixedSys"; ! m_iFixedPitchFontSize = 9; // open SQLite database for preferences --- 282,288 ---- m_pszProfileName=_tcsdup(strIniFile); ! WorkOutFixedFont (); // FixedSys or whatever // open SQLite database for preferences *************** *** 1928,1933 **** --- 1928,1939 ---- const bool bShowError, const char * default_value) { + if (!db) + { + result = default_value; + return SQLITE_CANTOPEN; + } + sqlite3_stmt *pStmt; const char *pzTail; *************** *** 1981,1990 **** string db_value; db_simple_query ((LPCTSTR) CFormat ( "SELECT value FROM %s WHERE name = '%s'", lpszSection, ! lpszEntry), db_value, true, lpszDefault); --- 1987,2000 ---- string db_value; + CString strEntry = lpszEntry; + + strEntry.Replace ("'", "''"); // fix up quotes + db_simple_query ((LPCTSTR) CFormat ( "SELECT value FROM %s WHERE name = '%s'", lpszSection, ! (LPCTSTR) strEntry), db_value, true, lpszDefault); *************** *** 2003,2008 **** --- 2013,2021 ---- int CMUSHclientApp::db_execute (const char * sql, const bool bShowError) { + if (!db) + return SQLITE_CANTOPEN; + sqlite3_stmt *pStmt; const char *pzHead = sql; const char *pzTail; *************** *** 2026,2032 **** rc = sqlite3_step (pStmt); // error if not done ! if (rc != SQLITE_OK && rc != SQLITE_DONE) { if (bShowError) db_show_error (sql); --- 2039,2045 ---- rc = sqlite3_step (pStmt); // error if not done ! if (rc != SQLITE_OK && rc != SQLITE_DONE && rc != SQLITE_ROW) { if (bShowError) db_show_error (sql); *************** *** 2052,2057 **** --- 2065,2073 ---- void CMUSHclientApp::db_write_string (LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue) { + if (!db) + return; + CString strEntry = lpszEntry; CString strValue = lpszValue; *************** *** 2091,2096 **** void CMUSHclientApp::db_show_error (const char * sql) { ! ::AfxMessageBox ((LPCTSTR) CFormat ("SQL error on statement:\r\n\"%s\"\r\n%s", sql, sqlite3_errmsg(db)), ! MB_ICONEXCLAMATION); } // end of CMUSHclientApp::db_show_error --- 2107,2178 ---- void CMUSHclientApp::db_show_error (const char * sql) { ! if (!db) ! return; ! ! CString strTitle = "SQL errors in global preferences"; ! ! AppendToTheNotepad (strTitle, ! CFormat ("SQL error on statement:\r\n\"%s\"\r\n%s\r\n", sql, sqlite3_errmsg(db)), ! false, // append ! eNotepadWorldLoadError); ! ! // make sure they see it ! ActivateNotepad (strTitle); ! } // end of CMUSHclientApp::db_show_error + + + static int __stdcall EnumFontFamExProc (CONST LOGFONTA * lpelfe, // pointer to logical-font data + CONST TEXTMETRICA * lpntme,// pointer to physical-font data + DWORD FontType, // type of font + LPARAM pUser) // application-defined data + + { + + string sFont = lpelfe->lfFaceName; + CString strFont = sFont.c_str (); + strFont.MakeLower (); + + // Use either of these for preference + if (strFont == "bitstream vera sans mono" || strFont == "fixedsys") + { + App.m_strFixedPitchFont = sFont.c_str (); + return 0; // stop evaluating, we are happy now + } + + // otherwise choose some fixed-pitch font and keep looking + App.m_strFixedPitchFont = sFont.c_str (); + + return 1; // keep enumerating + } // end of EnumFontFamExProc + + + // try to pick a default font that actually exists on their system + void CMUSHclientApp::WorkOutFixedFont () + { + + // in case of error dialogs, etc. + m_strFixedPitchFont = "FixedSys"; + m_iFixedPitchFontSize = 9; + + CDC dc; + + dc.CreateCompatibleDC (NULL); + + LOGFONT lf; + + ZeroMemory (&lf, sizeof lf); + + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfFaceName [0] = 0; + lf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; + + EnumFontFamiliesEx (dc.m_hDC, // handle to device context + &lf, // pointer to logical font information + EnumFontFamExProc, // pointer to callback function + 0, // application-supplied data + 0); // reserved; must be zero + + + } // end of CMUSHclientApp::WorkOutFixedFont Index: MUSHclient.h =================================================================== RCS file: /cvs/mushclient/MUSHclient.h,v retrieving revision 1.59 retrieving revision 1.61 diff -c -r1.59 -r1.61 *** MUSHclient.h 23 Jun 2009 23:39:23 -0000 1.59 --- MUSHclient.h 9 Aug 2009 05:37:57 -0000 1.61 *************** *** 290,295 **** --- 290,297 ---- void db_write_int (LPCTSTR lpszSection, LPCTSTR lpszEntry, int iValue); + void WorkOutFixedFont (); + /* virtual void OnFinalRelease() { *************** *** 350,356 **** { int iOffset; // offset in CMUSHclientApp char * pName; // name, eg. "AsciiArtFont" ! char * sDefault; // original (default) value } tGlobalConfigurationAlphaOption; --- 352,358 ---- { int iOffset; // offset in CMUSHclientApp char * pName; // name, eg. "AsciiArtFont" ! const char * sDefault; // original (default) value } tGlobalConfigurationAlphaOption; Index: MUSHclient.rc =================================================================== RCS file: /cvs/mushclient/MUSHclient.rc,v retrieving revision 1.235 retrieving revision 1.236 diff -c -r1.235 -r1.236 *** MUSHclient.rc 6 Jul 2009 05:58:56 -0000 1.235 --- MUSHclient.rc 25 Jul 2009 01:35:57 -0000 1.236 *************** *** 75,82 **** // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,42,0 ! PRODUCTVERSION 4,0,42,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L --- 75,82 ---- // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,43,0 ! PRODUCTVERSION 4,0,43,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L *************** *** 94,107 **** VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.42\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2009 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.42\0" VALUE "SpecialBuild", "\0" END END --- 94,107 ---- VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.43\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2009 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.43\0" VALUE "SpecialBuild", "\0" END END Index: ProcessPreviousLine.cpp =================================================================== RCS file: /cvs/mushclient/ProcessPreviousLine.cpp,v retrieving revision 1.61 retrieving revision 1.63 diff -c -r1.61 -r1.63 *** ProcessPreviousLine.cpp 6 Jul 2009 05:58:56 -0000 1.61 --- ProcessPreviousLine.cpp 9 Aug 2009 05:37:57 -0000 1.63 *************** *** 308,316 **** // I won't snoop notes because if you snoop yourself you would probably // get into a big loop if (!(flags & COMMENT)) ! for (POSITION pos = m_ChatList.GetHeadPosition (); pos; ) { ! CChatSocket * pSocket = m_ChatList.GetNext (pos); if (pSocket->m_iChatStatus == eChatConnected) { --- 308,316 ---- // I won't snoop notes because if you snoop yourself you would probably // get into a big loop if (!(flags & COMMENT)) ! for (POSITION chatpos = m_ChatList.GetHeadPosition (); chatpos; ) { ! CChatSocket * pSocket = m_ChatList.GetNext (chatpos); if (pSocket->m_iChatStatus == eChatConnected) { *************** *** 598,604 **** m_CurrentPlugin = NULL; // do main triggers ProcessOneTriggerSequence (strCurrentLine, ! // StyledLine, strResponse, prevpos, bNoLog, bNoOutput, bChangedColour, --- 598,604 ---- m_CurrentPlugin = NULL; // do main triggers ProcessOneTriggerSequence (strCurrentLine, ! StyledLine, strResponse, prevpos, bNoLog, bNoOutput, bChangedColour, *************** *** 610,616 **** m_CurrentPlugin = m_PluginList.GetNext (pos); if (m_CurrentPlugin->m_bEnabled) ProcessOneTriggerSequence (strCurrentLine, ! // StyledLine, strResponse, prevpos, bNoLog, bNoOutput, bChangedColour, --- 610,616 ---- m_CurrentPlugin = m_PluginList.GetNext (pos); if (m_CurrentPlugin->m_bEnabled) ProcessOneTriggerSequence (strCurrentLine, ! StyledLine, strResponse, prevpos, bNoLog, bNoOutput, bChangedColour, *************** *** 898,904 **** void CMUSHclientDoc::ProcessOneTriggerSequence (CString & strCurrentLine, ! // CPaneLine & StyledLine, CString & strResponse, const POSITION prevpos, bool & bNoLog, --- 898,904 ---- void CMUSHclientDoc::ProcessOneTriggerSequence (CString & strCurrentLine, ! CPaneLine & StyledLine, CString & strResponse, const POSITION prevpos, bool & bNoLog, *************** *** 973,983 **** if (trigger_item->iMatch & TRIGGER_MATCH_TEXT) if (get_foreground (trigger_item->iMatch) != ! (iFlags & INVERSE) ? iBackColour : iForeColour ) continue; // wrong text colour if (trigger_item->iMatch & TRIGGER_MATCH_BACK) if (get_background (trigger_item->iMatch) != ! (iFlags & INVERSE) ? iForeColour : iBackColour) continue; // wrong background colour if (trigger_item->iMatch & TRIGGER_MATCH_HILITE) if ((get_style (trigger_item->iMatch) & HILITE) != --- 973,983 ---- if (trigger_item->iMatch & TRIGGER_MATCH_TEXT) if (get_foreground (trigger_item->iMatch) != ! ((iFlags & INVERSE) ? iBackColour : iForeColour)) continue; // wrong text colour if (trigger_item->iMatch & TRIGGER_MATCH_BACK) if (get_background (trigger_item->iMatch) != ! ((iFlags & INVERSE) ? iForeColour : iBackColour)) continue; // wrong background colour if (trigger_item->iMatch & TRIGGER_MATCH_HILITE) if ((get_style (trigger_item->iMatch) & HILITE) != *************** *** 1257,1262 **** --- 1257,1331 ---- } // end of being on this line iCurrentCol += pLine->len; // next line starts where this left off } // end of doing each line + + + // cool new feature in version 4.43 - also colour the style runs which eventually get passed to a script + + int iStyleCol = 0; // how far through paragraph + for (CPaneStyleVector::iterator style_it = StyledLine.m_vStyles.begin (); + style_it != StyledLine.m_vStyles.end (); + style_it++) + { + CPaneStyle * pStyle = *style_it; // this style run + string sText = pStyle->m_sText; // original style text + int iStyleLength = sText.size (); // and how long it was + int iStyleEndCol = iStyleCol + iStyleLength; // start column of next style + + if (iEndCol > iStyleCol && // the trigger match ends after the start of the style + iStartCol < iStyleEndCol) // and it starts before the end of the style + { + // if the change starts past the first column of the style we need to split into before and after + if (iStartCol > iStyleCol) + { + CPaneStyle * pNewStyle = new CPaneStyle (*pStyle); // make a new style + pNewStyle->m_sText = sText.substr (0, iStartCol - iStyleCol); // put front part in new style run + pStyle->m_sText = pStyle->m_sText.substr (iStartCol - iStyleCol); // trim front of original style run + style_it = StyledLine.m_vStyles.insert (style_it, pNewStyle); // add new style run before this one + style_it++; // advance past newly inserted item + } // end if we need to split before the matching text + + // if the change ends before the last column of the style we need to split into before and after + if (iEndCol < (iStyleEndCol - 1)) + { + CPaneStyle * pNewStyle = new CPaneStyle (*pStyle); // make a new style + pNewStyle->m_sText = sText.substr (iStyleLength - (iStyleEndCol - iEndCol)); // put back part in new style run + pStyle->m_sText = pStyle->m_sText.substr (0, pStyle->m_sText.size () - (iStyleEndCol - iEndCol)); // trim back part + style_it++; // add new style run after this one + style_it = StyledLine.m_vStyles.insert (style_it, pNewStyle); // insert it + } // end if we need to split after the matching text + + // Right, we have now split up the style if necessary into another two pieces + // we now colour the original style (pStyle). The before and after have been placed + // before and after this one in the style run vector. + + pStyle->m_iStyle = (trigger_item->iStyle & (HILITE | UNDERLINE | BLINK | INVERSE)); + int iChangeType = trigger_item->iColourChangeType; + + if (trigger_item->colour == OTHER_CUSTOM) // already an RGB colour + { + if (iChangeType == TRIGGER_COLOUR_CHANGE_FOREGROUND || + iChangeType == TRIGGER_COLOUR_CHANGE_BOTH) + pStyle->m_cText = trigger_item->iOtherForeground; // plonk in the foreground + if (iChangeType == TRIGGER_COLOUR_CHANGE_BACKGROUND || + iChangeType == TRIGGER_COLOUR_CHANGE_BOTH) + pStyle->m_cBack = trigger_item->iOtherBackground; // and the background + } // end of RGB colour + else + { // must be normal colour - look up the RGB equivalents + if (iChangeType == TRIGGER_COLOUR_CHANGE_FOREGROUND || + iChangeType == TRIGGER_COLOUR_CHANGE_BOTH) + pStyle->m_cText = m_customtext [trigger_item->colour]; // lookup foreground custom colour + if (iChangeType == TRIGGER_COLOUR_CHANGE_BACKGROUND || + iChangeType == TRIGGER_COLOUR_CHANGE_BOTH) + pStyle->m_cBack = m_customback [trigger_item->colour]; // lookup background custom colour + } // end normal colour + + } // trigger match inside this style run + + iStyleCol += iStyleLength; // move column past the size of this style run + } // for each style run + + // end cool new feature // repeating only applies to regular expressions, with repeat requested if (!trigger_item->bRegexp || !trigger_item->bRepeat) Index: doc.h =================================================================== RCS file: /cvs/mushclient/doc.h,v retrieving revision 1.286 retrieving revision 1.288 diff -c -r1.286 -r1.288 *** doc.h 6 Jul 2009 21:35:01 -0000 1.286 --- doc.h 9 Aug 2009 05:37:57 -0000 1.288 *************** *** 21,28 **** // New versions - things to change ! #define THISVERSION 442 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.42"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT --- 21,28 ---- // New versions - things to change ! #define THISVERSION 443 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.43"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT *************** *** 1401,1407 **** void SetNewLineColour (const int flags); void ProcessOneTriggerSequence (CString & strCurrentLine, ! // CPaneLine & StyledLine, CString & strResponse, const POSITION prevpos, bool & bNoLog, --- 1401,1407 ---- void SetNewLineColour (const int flags); void ProcessOneTriggerSequence (CString & strCurrentLine, ! CPaneLine & StyledLine, CString & strResponse, const POSITION prevpos, bool & bNoLog, Index: globalregistryoptions.cpp =================================================================== RCS file: /cvs/mushclient/globalregistryoptions.cpp,v retrieving revision 1.22 retrieving revision 1.24 diff -c -r1.22 -r1.24 *** globalregistryoptions.cpp 16 Jul 2009 01:48:53 -0000 1.22 --- globalregistryoptions.cpp 9 Aug 2009 05:37:57 -0000 1.24 *************** *** 132,137 **** --- 132,144 ---- for (i = 0; AlphaGlobalOptionsTable [i].pName; i++) { const char * p = (const char *) this + AlphaGlobalOptionsTable [i].iOffset; + + // fix up the fixed-pitch font + if (strcmp (AlphaGlobalOptionsTable [i].pName, "DefaultInputFont") == 0 || + strcmp (AlphaGlobalOptionsTable [i].pName, "DefaultOutputFont") == 0 || + strcmp (AlphaGlobalOptionsTable [i].pName, "FixedPitchFont") == 0) + AlphaGlobalOptionsTable [i].sDefault = (LPCTSTR) m_strFixedPitchFont; + CString strValue = GetProfileString ("Global prefs", AlphaGlobalOptionsTable [i].pName, AlphaGlobalOptionsTable [i].sDefault); *************** *** 220,229 **** void CMUSHclientApp::SaveGlobalsToDatabase (void) { ! db_execute ("BEGIN TRANSACTION", true); int i; - int db_rc = SQLITE_OK; for (i = 0; GlobalOptionsTable [i].pName; i++) { --- 227,254 ---- void CMUSHclientApp::SaveGlobalsToDatabase (void) { ! // close and re-open database, in case they somehow lost connection to it ! ! if (db) ! sqlite3_close(db); ! ! int db_rc = sqlite3_open(m_PreferencesDatabaseName.c_str (), &db); ! ! if( db_rc ) ! { ! ::AfxMessageBox ((LPCTSTR) CFormat ("Can't open global preferences database at: %s" ! "\r\n(Error was: \"%s\")" ! "\r\nCheck you have write-access to that file.", ! m_PreferencesDatabaseName.c_str (), ! sqlite3_errmsg(db))); ! sqlite3_close(db); ! db = NULL; ! return; ! } ! ! db_rc = db_execute ("BEGIN TRANSACTION", true); int i; for (i = 0; GlobalOptionsTable [i].pName; i++) { Index: lua_utils.cpp =================================================================== RCS file: /cvs/mushclient/lua_utils.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -c -r1.28 -r1.29 *** lua_utils.cpp 6 Jul 2009 05:58:56 -0000 1.28 --- lua_utils.cpp 25 Jul 2009 01:35:58 -0000 1.29 *************** *** 1316,1322 **** } ! int __stdcall EnumFontFamExProc (CONST LOGFONTA * lpelfe, // pointer to logical-font data CONST TEXTMETRICA * lpntme,// pointer to physical-font data DWORD FontType, // type of font LPARAM L_state) // application-defined data --- 1316,1322 ---- } ! static int __stdcall EnumFontFamExProc (CONST LOGFONTA * lpelfe, // pointer to logical-font data CONST TEXTMETRICA * lpntme,// pointer to physical-font data DWORD FontType, // type of font LPARAM L_state) // application-defined data Index: mainfrm.cpp =================================================================== RCS file: /cvs/mushclient/mainfrm.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -c -r1.69 -r1.70 *** mainfrm.cpp 6 Jul 2009 05:58:56 -0000 1.69 --- mainfrm.cpp 9 Aug 2009 05:37:57 -0000 1.70 *************** *** 1451,1457 **** { #define NORMAL_STYLES WS_CAPTION | WS_BORDER | WS_SYSMENU | WS_THICKFRAME | \ WS_POPUP | WS_OVERLAPPEDWINDOW ! #define FULL_SCREEN_STYLES WS_DLGFRAME if (m_bFullScreen) { --- 1451,1458 ---- { #define NORMAL_STYLES WS_CAPTION | WS_BORDER | WS_SYSMENU | WS_THICKFRAME | \ WS_POPUP | WS_OVERLAPPEDWINDOW ! //#define FULL_SCREEN_STYLES WS_DLGFRAME // old way ! #define FULL_SCREEN_STYLES WS_BORDER // new in version 4.43 if (m_bFullScreen) { *************** *** 1510,1515 **** --- 1511,1517 ---- if (m_bMaximized) pActiveWnd->MDIMaximize (); // restore child's maximized state } + } } Index: mushclient.clw =================================================================== RCS file: /cvs/mushclient/mushclient.clw,v retrieving revision 1.345 retrieving revision 1.346 diff -c -r1.345 -r1.346 *** mushclient.clw 8 Jul 2009 04:10:49 -0000 1.345 --- mushclient.clw 25 Jul 2009 01:35:58 -0000 1.346 *************** *** 2,8 **** [General Info] Version=1 ! LastClass=CMUSHView LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "mushclient.h" --- 2,8 ---- [General Info] Version=1 ! LastClass=CSendView LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "mushclient.h" Index: mushclient.hlp =================================================================== RCS file: /cvs/mushclient/mushclient.hlp,v retrieving revision 1.109 retrieving revision 1.110 diff -c -r1.109 -r1.110 Binary files /tmp/cvswc25K6 and /tmp/cvsZOu8td differ Index: mushview.cpp =================================================================== RCS file: /cvs/mushclient/mushview.cpp,v retrieving revision 1.126 retrieving revision 1.128 diff -c -r1.126 -r1.128 *** mushview.cpp 16 Jul 2009 01:49:52 -0000 1.126 --- mushview.cpp 9 Aug 2009 05:37:57 -0000 1.128 *************** *** 155,161 **** ON_COMMAND(ID_KEYS_TAB, OnKeysActivatecommandview) ON_COMMAND(ID_KEYS_ESCAPE, OnKeysActivatecommandview) ON_UPDATE_COMMAND_UI(ID_DISPLAY_TEXTATTRIBUTES, OnUpdateNeedSelection) ! ON_UPDATE_COMMAND_UI(ID_EDIT_COPYASHTML, OnUpdateNeedSelection) ON_WM_RBUTTONDBLCLK() //}}AFX_MSG_MAP --- 155,161 ---- ON_COMMAND(ID_KEYS_TAB, OnKeysActivatecommandview) ON_COMMAND(ID_KEYS_ESCAPE, OnKeysActivatecommandview) ON_UPDATE_COMMAND_UI(ID_DISPLAY_TEXTATTRIBUTES, OnUpdateNeedSelection) ! ON_UPDATE_COMMAND_UI(ID_EDIT_COPYASHTML, OnUpdateNeedSelectionForCopy) ON_WM_RBUTTONDBLCLK() //}}AFX_MSG_MAP *************** *** 1331,1337 **** // TTI_WARNING = 2 - warning icon // TTI_ERROR = 3 - error icon ! m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) Translate ("Line information") ); m_ToolTip.SetMaxTipWidth(500); } --- 1331,1337 ---- // TTI_WARNING = 2 - warning icon // TTI_ERROR = 3 - error icon ! // m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) Translate ("Line information") ); m_ToolTip.SetMaxTipWidth(500); } *************** *** 2887,2895 **** startcol = MIN (m_selstart_col, pStartLine->len); endcol = MIN (m_selend_col, pEndLine->len); pCmdUI->Enable (m_selend_line > m_selstart_line || ! (m_selend_line == m_selstart_line && ! endcol > startcol)); } --- 2887,2897 ---- startcol = MIN (m_selstart_col, pStartLine->len); endcol = MIN (m_selend_col, pEndLine->len); + pCmdUI->Enable (m_selend_line > m_selstart_line || ! (m_selend_line == m_selstart_line && ! endcol > startcol)); ! } *************** *** 4138,4144 **** // don't do it *past* end of last word long pixel = calculate_width (line, pLine->len, pDoc, dc) + pDoc->m_iPixelOffset + pDoc->m_TextRectangle.left; ! m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) Translate ("Line information") ); if (CursorPos.x < pixel && pDoc->FindStyle (pLine, col, iCol, pStyle, foundpos)) --- 4140,4146 ---- // don't do it *past* end of last word long pixel = calculate_width (line, pLine->len, pDoc, dc) + pDoc->m_iPixelOffset + pDoc->m_TextRectangle.left; ! // m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) Translate ("Line information") ); if (CursorPos.x < pixel && pDoc->FindStyle (pLine, col, iCol, pStyle, foundpos)) *************** *** 4172,4178 **** { strText = hintsList.GetHead (); // don't say "Line information" for MXP hints ! m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) "" ); } } // end of ACTION_SEND or ACTION_PROMPT --- 4174,4180 ---- { strText = hintsList.GetHead (); // don't say "Line information" for MXP hints ! m_ToolTip.SendMessage (TTM_SETTITLE, TTI_NONE, (LPARAM) "" ); } } // end of ACTION_SEND or ACTION_PROMPT *************** *** 4185,4191 **** strText = pStyle->pAction->m_strHint; // don't say "Line information" for MXP hints ! m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) "" ); } // end of ACTION_HYPERLINK --- 4187,4193 ---- strText = pStyle->pAction->m_strHint; // don't say "Line information" for MXP hints ! m_ToolTip.SendMessage (TTM_SETTITLE, TTI_NONE, (LPARAM) "" ); } // end of ACTION_HYPERLINK Index: sendvw.cpp =================================================================== RCS file: /cvs/mushclient/sendvw.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -c -r1.93 -r1.94 *** sendvw.cpp 8 Jul 2009 04:10:49 -0000 1.93 --- sendvw.cpp 25 Jul 2009 01:35:58 -0000 1.94 *************** *** 245,250 **** --- 245,256 ---- ON_COMMAND(ID_EDIT_COPY, OnEditCopy) ON_UPDATE_COMMAND_UI(ID_EDIT_COPY, OnUpdateNeedSel) + ON_COMMAND(ID_EDIT_COPYASHTML, OnEditCopyashtml) + ON_UPDATE_COMMAND_UI(ID_EDIT_COPYASHTML, OnUpdateNeedOutputSel) + + ON_COMMAND(ID_DISPLAY_TEXTATTRIBUTES, OnDisplayTextattributes) + ON_UPDATE_COMMAND_UI(ID_DISPLAY_TEXTATTRIBUTES, OnUpdateNeedOutputSel) + END_MESSAGE_MAP() //#define new DEBUG_NEW *************** *** 2935,2937 **** --- 2941,2964 ---- pCmdUI->Enable(TRUE); // we have a selection in the top view, enable copying } + + void CSendView::OnUpdateNeedOutputSel(CCmdUI* pCmdUI) + { + + pCmdUI->Enable(m_topview->m_selend_line > m_topview->m_selstart_line || + (m_topview->m_selend_line == m_topview->m_selstart_line && + m_topview->m_selend_col > m_topview->m_selstart_col)); + + } + + + void CSendView::OnDisplayTextattributes() + { + m_topview->OnDisplayTextattributes (); + } // end of CSendView::OnDisplayTextattributes() + + void CSendView::OnEditCopyashtml() + { + m_topview->OnEditCopyashtml (); + } // end of CSendView::OnEditCopyashtml() + Index: sendvw.h =================================================================== RCS file: /cvs/mushclient/sendvw.h,v retrieving revision 1.33 retrieving revision 1.34 diff -c -r1.33 -r1.34 *** sendvw.h 8 Jul 2009 04:10:49 -0000 1.33 --- sendvw.h 25 Jul 2009 01:35:58 -0000 1.34 *************** *** 203,209 **** --- 203,213 ---- afx_msg void OnInitMenuPopup(CMenu* pMenu, UINT nIndex, BOOL bSysMenu); afx_msg void OnEditCopy(); afx_msg void OnUpdateNeedSel(CCmdUI* pCmdUI); + afx_msg void OnUpdateNeedOutputSel(CCmdUI* pCmdUI); + afx_msg void OnEditCopyashtml(); + afx_msg void OnDisplayTextattributes(); + DECLARE_MESSAGE_MAP() }; Index: telnet_phases.cpp =================================================================== RCS file: /cvs/mushclient/telnet_phases.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** telnet_phases.cpp 8 Jul 2008 03:50:02 -0000 1.10 --- telnet_phases.cpp 25 Jul 2009 01:35:58 -0000 1.11 *************** *** 128,135 **** { case TELOPT_COMPRESS: case TELOPT_COMPRESS2: ! // initialise compression library ! if (!m_bCompressInitOK) m_bCompressInitOK = InitZlib (m_zCompress); if (m_bCompressInitOK && !m_bDisableCompression) { --- 128,135 ---- { case TELOPT_COMPRESS: case TELOPT_COMPRESS2: ! // initialise compression library if not already decompressing ! if (!m_bCompressInitOK && !m_bCompress) m_bCompressInitOK = InitZlib (m_zCompress); if (m_bCompressInitOK && !m_bDisableCompression) { *************** *** 487,498 **** { TRACE (""); // initialise compression library ! if (!m_bCompressInitOK) m_bCompressInitOK = InitZlib (m_zCompress); if (!(m_bCompressInitOK && m_CompressOutput && m_CompressInput)) { ! strMessage = Translate ("Can not process compressed output. World closed."); return 0; } --- 487,498 ---- { TRACE (""); // initialise compression library ! if (!m_bCompressInitOK && !m_bCompress) m_bCompressInitOK = InitZlib (m_zCompress); if (!(m_bCompressInitOK && m_CompressOutput && m_CompressInput)) { ! strMessage = Translate ("Cannot process compressed output. World closed."); return 0; } Index: install/mushclient.nsi =================================================================== RCS file: /cvs/mushclient/install/mushclient.nsi,v retrieving revision 1.68 retrieving revision 1.69 diff -c -r1.68 -r1.69 *** install/mushclient.nsi 16 Jul 2009 01:49:53 -0000 1.68 --- install/mushclient.nsi 25 Jul 2009 01:35:58 -0000 1.69 *************** *** 96,101 **** --- 96,102 ---- File "..\Example_Filters.lua" File "..\names.txt" File /oname=license.txt "..\..\mushclient_resources\text\agreement.txt" + File "..\Dina.fon" ; Write the installation path into the registry WriteRegStr HKCU "Software\Gammon Software Solutions\MUSHclient\General Options" "InstallDir" $INSTDIR *************** *** 367,374 **** File "..\plugins\Timer.xml" File "..\plugins\ShowActivity.xml" File "..\plugins\Installer_sumcheck.xml" - File "..\plugins\Copy_Output.xml" File "..\plugins\lua_chat.xml" SectionEnd --- 368,376 ---- File "..\plugins\Timer.xml" File "..\plugins\ShowActivity.xml" File "..\plugins\Installer_sumcheck.xml" File "..\plugins\lua_chat.xml" + File "..\plugins\Current_Output_Window.xml" + SectionEnd *************** *** 378,385 **** ; Which section type it is in SectionIn 1 2 ; typical, full ! SetOutPath "$SMPROGRAMS\MUSHclient" CreateShortCut "$SMPROGRAMS\MUSHclient\MUSHclient.lnk" "$INSTDIR\MUSHclient.exe" "" "$INSTDIR\MUSHclient.exe" 0 CreateShortCut "$SMPROGRAMS\MUSHclient\Read Me.lnk" "$INSTDIR\Readme.txt" "" "$INSTDIR\Readme.txt" 0 CreateShortCut "$SMPROGRAMS\MUSHclient\Uninstall MUSHclient.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 SectionEnd --- 380,388 ---- ; Which section type it is in SectionIn 1 2 ; typical, full ! SetOutPath $INSTDIR CreateShortCut "$SMPROGRAMS\MUSHclient\MUSHclient.lnk" "$INSTDIR\MUSHclient.exe" "" "$INSTDIR\MUSHclient.exe" 0 + SetOutPath "$SMPROGRAMS\MUSHclient" CreateShortCut "$SMPROGRAMS\MUSHclient\Read Me.lnk" "$INSTDIR\Readme.txt" "" "$INSTDIR\Readme.txt" 0 CreateShortCut "$SMPROGRAMS\MUSHclient\Uninstall MUSHclient.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 SectionEnd *************** *** 417,422 **** --- 420,428 ---- ; and character name generation file Delete "$INSTDIR\names.txt" + ; and Dina font + Delete "$INSTDIR\Dina.fon" + ; scripting stuff Delete "$INSTDIR\scripts\MUSHclient.tlb" Delete "$INSTDIR\scripts\exampscript.vbs" *************** *** 511,518 **** Delete "$INSTDIR\worlds\plugins\Timer.xml" Delete "$INSTDIR\worlds\plugins\ShowActivity.xml" Delete "$INSTDIR\worlds\plugins\Installer_sumcheck.xml" - Delete "$INSTDIR\worlds\plugins\Copy_Output.xml" Delete "$INSTDIR\worlds\plugins\lua_chat.xml" ; locale stuff --- 517,524 ---- Delete "$INSTDIR\worlds\plugins\Timer.xml" Delete "$INSTDIR\worlds\plugins\ShowActivity.xml" Delete "$INSTDIR\worlds\plugins\Installer_sumcheck.xml" Delete "$INSTDIR\worlds\plugins\lua_chat.xml" + Delete "$INSTDIR\worlds\plugins\Current_Output_Window.xml" ; locale stuff *************** *** 588,596 **** ; post-install Function .onInstSuccess ! MessageBox MB_YESNO "Installation of MUSHclient is complete. View the readme file?" IDNO NoReadme ! Exec 'notepad "$INSTDIR\readme.txt"' ! NoReadme: FunctionEnd --- 594,607 ---- ; post-install Function .onInstSuccess ! ; MessageBox MB_YESNO "Installation of MUSHclient is complete. View the readme file?" IDNO NoReadme ! ; Exec 'notepad "$INSTDIR\readme.txt"' ! ; NoReadme: ! ! MessageBox MB_YESNO "Launch MUSHclient now?" IDNO NoLaunch ! SetOutPath $INSTDIR ! ExecShell "open" "$INSTDIR\mushclient.exe" ! NoLaunch: FunctionEnd Index: install/readme.txt =================================================================== RCS file: /cvs/mushclient/install/readme.txt,v retrieving revision 1.192 retrieving revision 1.194 diff -c -r1.192 -r1.194 *** install/readme.txt 16 Jul 2009 01:49:53 -0000 1.192 --- install/readme.txt 9 Aug 2009 21:12:54 -0000 1.194 *************** *** 1,7 **** ! MUSHclient version 4.42 ======================= ! Thursday, 16th July, 2009 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/ --- 1,7 ---- ! MUSHclient version 4.43 ======================= ! Monday, 10th August, 2009 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/