Index: MUSHclient.rc =================================================================== RCS file: /cvs/mushclient/MUSHclient.rc,v retrieving revision 1.207 retrieving revision 1.208 diff -c -r1.207 -r1.208 *** MUSHclient.rc 26 Jul 2007 00:46:46 -0000 1.207 --- MUSHclient.rc 30 Jul 2007 00:06:52 -0000 1.208 *************** *** 56,63 **** // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,16,0 ! PRODUCTVERSION 4,0,16,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L --- 56,63 ---- // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,17,0 ! PRODUCTVERSION 4,0,17,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L *************** *** 75,88 **** VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.16\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.16\0" VALUE "SpecialBuild", "\0" END END --- 75,88 ---- VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.17\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.17\0" VALUE "SpecialBuild", "\0" END END Index: configuration.cpp =================================================================== RCS file: /cvs/mushclient/configuration.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -c -r1.48 -r1.49 *** configuration.cpp 12 Jun 2007 04:01:56 -0000 1.48 --- configuration.cpp 30 Jul 2007 00:06:52 -0000 1.49 *************** *** 2,7 **** --- 2,8 ---- #include "MUSHclient.h" #include "TreePropertySheet.h" #include "MissingEntryPoints.h" + #include "mainfrm.h" #ifdef _DEBUG //#define new DEBUG_NEW *************** *** 47,52 **** --- 48,89 ---- #include "genprint.h" + // for debug messages + static const char * sConfigPhase [] = { + "undefined", // 0 - error if this + "general", // 1 + "sounds ", // 2 + "custom colours", // 3 + "logging", // 4 + "ANSI colours", // 5 + "macros", // 6 + "aliases", // 7 + "triggers", // 8 + "commands", // 9 + "send", // 10 + "notes", // 11 + "keypad", // 12 + "paste", // 13 + "output", // 14 + "info", // 15 + "timers", // 16 + "scripts", // 17 + "variables", // 18 + "autosay", // 19 + "printing", // 20 + "connecting", // 21 + "MXP", // 22 + "chat", // 23 + }; + + static DelayDebugMsg (const char * sPhase, int iWhich) + { + CString msg; + if (iWhich < 1 || iWhich > NUMITEMS (sConfigPhase)) + iWhich = 0; + msg.Format ("%s %s config", sPhase, sConfigPhase [iWhich]); + Frame.DelayDebugStatus (msg); + } CString CMUSHclientDoc::AppendMUDName (const CString strName) { *************** *** 64,69 **** --- 101,107 ---- void CMUSHclientDoc::LoadPrefsP1 (CPrefsP1 &page1) { + DelayDebugMsg ("Loading", 1); page1.m_doc = this; page1.m_port = m_port; page1.m_mush_name = m_mush_name; *************** *** 78,89 **** --- 116,129 ---- void CMUSHclientDoc:: LoadPrefsP2 (CPrefsP2 &page2) { + DelayDebugMsg ("Loading", 2); page2.m_doc = this; } // end of CMUSHclientDoc::LoadPrefsP2 void CMUSHclientDoc:: LoadPrefsP3 (CPrefsP3 &page3) { + DelayDebugMsg ("Loading", 3); page3.m_doc = this; memcpy (page3.m_customtext, m_customtext, sizeof (page3.m_customtext)); memcpy (page3.m_customback, m_customback, sizeof (page3.m_customback)); *************** *** 94,99 **** --- 134,141 ---- void CMUSHclientDoc:: LoadPrefsP4 (CPrefsP4 &page4) { + DelayDebugMsg ("Loading", 4); + // Sleep (1000); page4.m_doc = this; page4.m_bLogOutput = m_bLogOutput; page4.m_log_input = m_log_input; *************** *** 115,120 **** --- 157,163 ---- void CMUSHclientDoc:: LoadPrefsP5 (CPrefsP5 &page5) { + DelayDebugMsg ("Loading", 5); page5.m_doc = this; memcpy (page5.m_normalcolour, m_normalcolour, sizeof (page5.m_normalcolour)); memcpy (page5.m_boldcolour, m_boldcolour, sizeof (page5.m_boldcolour)); *************** *** 124,129 **** --- 167,173 ---- void CMUSHclientDoc:: LoadPrefsP6 (CPrefsP6 &page6) { + DelayDebugMsg ("Loading", 6); int i; page6.m_doc = this; for (i = 0; i < NUMITEMS (m_macros); i++) *************** *** 150,155 **** --- 194,200 ---- void CMUSHclientDoc:: LoadPrefsP7 (CPrefsP7 &page7) { + DelayDebugMsg ("Loading", 7); page7.m_doc = this; page7.m_enable_aliases = m_enable_aliases; page7.m_bUseDefaultAliases = m_bUseDefaultAliases; *************** *** 188,193 **** --- 233,239 ---- void CMUSHclientDoc:: LoadPrefsP8 (CPrefsP8 &page8) { + DelayDebugMsg ("Loading", 8); page8.m_doc = this; page8.m_prefsp3 = NULL; // so we can look up colours (in the document) page8.m_enable_triggers = m_enable_triggers; *************** *** 228,233 **** --- 274,280 ---- void CMUSHclientDoc:: LoadPrefsP9 (CPrefsP9 &page9) { + DelayDebugMsg ("Loading", 9); page9.m_doc = this; page9.m_prefsp3 = NULL; // so we can look up colours (in the document) page9.m_command_stack_character = m_strCommandStackCharacter; *************** *** 288,293 **** --- 335,341 ---- void CMUSHclientDoc:: LoadPrefsP10 (CPrefsP10 &page10) { + DelayDebugMsg ("Loading", 10); page10.m_doc = this; page10.m_file_postamble = m_file_postamble; page10.m_file_preamble = m_file_preamble; *************** *** 302,307 **** --- 350,356 ---- void CMUSHclientDoc:: LoadPrefsP11 (CPrefsP11 &page11) { + DelayDebugMsg ("Loading", 11); page11.m_doc = this; page11.m_notes = m_notes; page11.m_pNotesFindInfo = &m_NotesFindInfo; // for finding *************** *** 309,314 **** --- 358,364 ---- void CMUSHclientDoc:: LoadPrefsP12 (CPrefsP12 &page12) { + DelayDebugMsg ("Loading", 12); page12.m_doc = this; for (int i = 0; i < eKeypad_Max_Items; i++) *************** *** 319,324 **** --- 369,375 ---- void CMUSHclientDoc:: LoadPrefsP13 (CPrefsP13 &page13) { + DelayDebugMsg ("Loading", 13); page13.m_doc = this; page13.m_paste_postamble = m_paste_postamble; page13.m_paste_preamble = m_paste_preamble; *************** *** 333,338 **** --- 384,390 ---- void CMUSHclientDoc:: LoadPrefsP14 (CPrefsP14 &page14) { + DelayDebugMsg ("Loading", 14); page14.m_doc = this; page14.m_font_height = m_font_height; page14.m_font_name = m_font_name; *************** *** 378,383 **** --- 430,436 ---- void CMUSHclientDoc:: LoadPrefsP15 (CPrefsP15 &page15) { + DelayDebugMsg ("Loading", 15); __int64 nTotalTriggers = 0, nTotalAliases = 0, *************** *** 517,522 **** --- 570,576 ---- void CMUSHclientDoc:: LoadPrefsP16 (CPrefsP16 &page16) { + DelayDebugMsg ("Loading", 16); page16.m_doc = this; page16.m_bEnableTimers = m_bEnableTimers; m_bConfigEnableTimers = m_bEnableTimers; *************** *** 556,561 **** --- 610,616 ---- void CMUSHclientDoc:: LoadPrefsP17 (CPrefsP17 &page17) { + DelayDebugMsg ("Loading", 17); page17.m_doc = this; page17.m_strLanguage = m_strLanguage; page17.m_bEnableScripts = m_bEnableScripts; *************** *** 604,609 **** --- 659,665 ---- void CMUSHclientDoc:: LoadPrefsP18 (CPrefsP18 &page18) { + DelayDebugMsg ("Loading", 18); page18.m_doc = this; // variables are used directly from the document *************** *** 632,637 **** --- 688,694 ---- void CMUSHclientDoc:: LoadPrefsP19 (CPrefsP19 &page19) { + DelayDebugMsg ("Loading", 19); page19.m_doc = this; page19.m_strAutoSayString = m_strAutoSayString; page19.m_bEnableAutoSay = m_bEnableAutoSay; *************** *** 643,648 **** --- 700,706 ---- void CMUSHclientDoc:: LoadPrefsP20 (CPrefsP20 &page20) { + DelayDebugMsg ("Loading", 20); page20.m_doc = this; page20.m_bBold0 = (m_nNormalPrintStyle [0] & FONT_BOLD) != 0; page20.m_bBold1 = (m_nNormalPrintStyle [1] & FONT_BOLD) != 0; *************** *** 701,706 **** --- 759,765 ---- void CMUSHclientDoc:: LoadPrefsP21 (CPrefsP21 &page21) { + DelayDebugMsg ("Loading", 21); page21.m_doc = this; page21.m_name = m_name; page21.m_password = m_password; *************** *** 710,715 **** --- 769,775 ---- void CMUSHclientDoc:: LoadPrefsP22 (CPrefsP22 &page22) { + DelayDebugMsg ("Loading", 22); page22.m_doc = this; page22.m_iHyperlinkColour = m_iHyperlinkColour; *************** *** 737,742 **** --- 797,803 ---- void CMUSHclientDoc:: LoadPrefsP23 (CPrefsP23 &page23) { + DelayDebugMsg ("Loading", 23); page23.m_doc = this; // take reasonable defaults *************** *** 782,787 **** --- 843,849 ---- bool CMUSHclientDoc::ChangedPrefsP1 (CPrefsP1 &page1) { + DelayDebugMsg ("Checking", 1); page1.m_mush_name.TrimLeft (); page1.m_mush_name.TrimRight (); *************** *** 804,814 **** --- 866,878 ---- bool CMUSHclientDoc:: ChangedPrefsP2 (CPrefsP2 &page2) { + DelayDebugMsg ("Checking", 2); return m_new_activity_sound != page2.m_sound_pathname; } // end of CMUSHclientDoc::ChangedPrefsP2 bool CMUSHclientDoc:: ChangedPrefsP3 (CPrefsP3 &page3) { + DelayDebugMsg ("Checking", 3); bool bChanged = false; for (int i = 0; i < MAX_CUSTOM; i++) if (page3.m_strCustomName [i] != m_strCustomColourName [i]) *************** *** 824,829 **** --- 888,894 ---- bool CMUSHclientDoc:: ChangedPrefsP4 (CPrefsP4 &page4) { + DelayDebugMsg ("Checking", 4); return m_bLogOutput != page4.m_bLogOutput || m_log_input != page4.m_log_input || *************** *** 847,852 **** --- 912,918 ---- bool CMUSHclientDoc:: ChangedPrefsP5 (CPrefsP5 &page5) { + DelayDebugMsg ("Checking", 5); return memcmp (m_normalcolour, page5.m_normalcolour, sizeof (m_normalcolour)) != 0 || *************** *** 859,864 **** --- 925,931 ---- bool CMUSHclientDoc:: ChangedPrefsP6 (CPrefsP6 &page6) { + DelayDebugMsg ("Checking", 6); int i; bool array_changed = false; *************** *** 877,882 **** --- 944,950 ---- bool CMUSHclientDoc:: ChangedPrefsP7 (CPrefsP7 &page7) { + DelayDebugMsg ("Checking", 7); return m_enable_aliases != page7.m_enable_aliases || m_bUseDefaultAliases != page7.m_bUseDefaultAliases; *************** *** 885,890 **** --- 953,959 ---- bool CMUSHclientDoc:: ChangedPrefsP8 (CPrefsP8 &page8) { + DelayDebugMsg ("Checking", 8); return m_enable_triggers != page8.m_enable_triggers || m_enable_trigger_sounds != page8.m_enable_trigger_sounds || *************** *** 893,898 **** --- 962,968 ---- bool CMUSHclientDoc:: ChangedPrefsP9 (CPrefsP9 &page9) { + DelayDebugMsg ("Checking", 9); return m_strCommandStackCharacter != page9.m_command_stack_character [0] || *************** *** 945,950 **** --- 1015,1021 ---- bool CMUSHclientDoc:: ChangedPrefsP10 (CPrefsP10 &page10) { + DelayDebugMsg ("Checking", 10); return m_file_postamble != page10.m_file_postamble || m_file_preamble != page10.m_file_preamble || *************** *** 961,972 **** --- 1032,1045 ---- bool CMUSHclientDoc:: ChangedPrefsP11 (CPrefsP11 &page11) { + DelayDebugMsg ("Checking", 11); return m_notes != page11.m_notes; } // end of CMUSHclientDoc::ChangedPrefsP11 bool CMUSHclientDoc:: ChangedPrefsP12 (CPrefsP12 &page12) { + DelayDebugMsg ("Checking", 12); bool bChanged = false; *************** *** 982,987 **** --- 1055,1061 ---- bool CMUSHclientDoc:: ChangedPrefsP13 (CPrefsP13 &page13) { + DelayDebugMsg ("Checking", 13); return m_paste_postamble != page13.m_paste_postamble || m_paste_preamble != page13.m_paste_preamble || *************** *** 997,1002 **** --- 1071,1077 ---- bool CMUSHclientDoc:: ChangedPrefsP14 (CPrefsP14 &page14) { + DelayDebugMsg ("Checking", 14); return m_font_height != page14.m_font_height || *************** *** 1038,1048 **** --- 1113,1125 ---- bool CMUSHclientDoc:: ChangedPrefsP15 (CPrefsP15 &page15) { + DelayDebugMsg ("Checking", 15); return false; } // end of CMUSHclientDoc::ChangedPrefsP15 bool CMUSHclientDoc:: ChangedPrefsP16 (CPrefsP16 &page16) { + DelayDebugMsg ("Checking", 16); return m_bEnableTimers != page16.m_bEnableTimers || m_bUseDefaultTimers != page16.m_bUseDefaultTimers; *************** *** 1050,1055 **** --- 1127,1133 ---- bool CMUSHclientDoc:: ChangedPrefsP17 (CPrefsP17 &page17) { + DelayDebugMsg ("Checking", 17); return m_strLanguage != page17.m_strLanguage || m_bEnableScripts != page17.m_bEnableScripts || *************** *** 1081,1092 **** --- 1159,1172 ---- bool CMUSHclientDoc:: ChangedPrefsP18 (CPrefsP18 &page18) { + DelayDebugMsg ("Checking", 18); // page 18 - nothing to check return false; } // end of CMUSHclientDoc::ChangedPrefsP18 bool CMUSHclientDoc:: ChangedPrefsP19 (CPrefsP19 &page19) { + DelayDebugMsg ("Checking", 19); return m_strAutoSayString != page19.m_strAutoSayString || m_bEnableAutoSay != page19.m_bEnableAutoSay || *************** *** 1099,1104 **** --- 1179,1185 ---- bool CMUSHclientDoc:: ChangedPrefsP20 (CPrefsP20 &page20) { + DelayDebugMsg ("Checking", 20); // fix up printer styles int i, *************** *** 1210,1215 **** --- 1291,1297 ---- bool CMUSHclientDoc:: ChangedPrefsP21 (CPrefsP21 &page21) { + DelayDebugMsg ("Checking", 21); page21.m_name.TrimLeft (); page21.m_name.TrimRight (); *************** *** 1224,1229 **** --- 1306,1312 ---- bool CMUSHclientDoc:: ChangedPrefsP22 (CPrefsP22 &page22) { + DelayDebugMsg ("Checking", 22); return m_iMXPdebugLevel != page22.m_iMXPdebugLevel || *************** *** 1243,1248 **** --- 1326,1332 ---- bool CMUSHclientDoc:: ChangedPrefsP23 (CPrefsP23 &page23) { + DelayDebugMsg ("Checking", 23); return m_strOurChatName != page23.m_strOurChatName || *************** *** 1268,1273 **** --- 1352,1358 ---- void CMUSHclientDoc::SavePrefsP1 (CPrefsP1 &page1) { + DelayDebugMsg ("Saving", 1); m_port = (unsigned short) page1.m_port; m_mush_name = page1.m_mush_name; m_server = page1.m_server; *************** *** 1282,1291 **** --- 1367,1378 ---- void CMUSHclientDoc:: SavePrefsP2 (CPrefsP2 &page2) { + DelayDebugMsg ("Saving", 2); } // end of CMUSHclientDoc::SavePrefsP2 void CMUSHclientDoc:: SavePrefsP3 (CPrefsP3 &page3) { + DelayDebugMsg ("Saving", 3); memcpy (m_customtext, page3.m_customtext, sizeof (m_customtext)); memcpy (m_customback, page3.m_customback, sizeof (m_customback)); for (int i = 0; i < MAX_CUSTOM; i++) *************** *** 1295,1300 **** --- 1382,1388 ---- void CMUSHclientDoc:: SavePrefsP4 (CPrefsP4 &page4) { + DelayDebugMsg ("Saving", 4); m_bLogOutput = page4.m_bLogOutput; m_log_input = page4.m_log_input; m_bLogNotes = page4.m_bLogNotes; *************** *** 1315,1320 **** --- 1403,1409 ---- void CMUSHclientDoc:: SavePrefsP5 (CPrefsP5 &page5) { + DelayDebugMsg ("Saving", 5); memcpy (m_normalcolour, page5.m_normalcolour, sizeof (m_normalcolour)); memcpy (m_boldcolour, page5.m_boldcolour, sizeof (m_boldcolour)); m_bUseDefaultColours = page5.m_bUseDefaultColours; *************** *** 1323,1328 **** --- 1412,1418 ---- void CMUSHclientDoc:: SavePrefsP6 (CPrefsP6 &page6) { + DelayDebugMsg ("Saving", 6); int i; for (i = 0; i < NUMITEMS (m_macros); i++) { *************** *** 1334,1345 **** --- 1424,1437 ---- void CMUSHclientDoc:: SavePrefsP7 (CPrefsP7 &page7) { + DelayDebugMsg ("Saving", 7); m_enable_aliases = page7.m_enable_aliases; m_bUseDefaultAliases = page7.m_bUseDefaultAliases; } // end of CMUSHclientDoc::SavePrefsP7 void CMUSHclientDoc:: SavePrefsP8 (CPrefsP8 &page8) { + DelayDebugMsg ("Saving", 8); m_enable_triggers = page8.m_enable_triggers; m_enable_trigger_sounds = page8.m_enable_trigger_sounds; m_bUseDefaultTriggers = page8.m_bUseDefaultTriggers; *************** *** 1347,1352 **** --- 1439,1445 ---- void CMUSHclientDoc:: SavePrefsP9 (CPrefsP9 &page9) { + DelayDebugMsg ("Saving", 9); m_strCommandStackCharacter = page9.m_command_stack_character [0]; m_enable_command_stack = page9.m_enable_command_stacking; m_enable_speed_walk = page9.m_enable_speed_walk; *************** *** 1398,1403 **** --- 1491,1497 ---- void CMUSHclientDoc:: SavePrefsP10 (CPrefsP10 &page10) { + DelayDebugMsg ("Saving", 10); m_file_postamble = page10.m_file_postamble; m_file_preamble = page10.m_file_preamble; m_line_postamble = page10.m_line_postamble; *************** *** 1411,1421 **** --- 1505,1517 ---- void CMUSHclientDoc:: SavePrefsP11 (CPrefsP11 &page11) { + DelayDebugMsg ("Saving", 11); m_notes = page11.m_notes; } // end of CMUSHclientDoc::SavePrefsP11 void CMUSHclientDoc:: SavePrefsP12 (CPrefsP12 &page12) { + DelayDebugMsg ("Saving", 12); for (int i = 0; i < eKeypad_Max_Items; i++) m_keypad [i] = page12.m_keypad [i]; *************** *** 1424,1429 **** --- 1520,1526 ---- void CMUSHclientDoc:: SavePrefsP13 (CPrefsP13 &page13) { + DelayDebugMsg ("Saving", 13); m_paste_postamble = page13.m_paste_postamble; m_paste_preamble = page13.m_paste_preamble; m_pasteline_postamble = page13.m_pasteline_postamble; *************** *** 1437,1442 **** --- 1534,1540 ---- void CMUSHclientDoc:: SavePrefsP14 (CPrefsP14 &page14) { + DelayDebugMsg ("Saving", 14); m_font_height = page14.m_font_height; m_font_name = page14.m_font_name; m_font_weight = page14.m_font_weight; *************** *** 1513,1528 **** --- 1611,1629 ---- void CMUSHclientDoc:: SavePrefsP15 (CPrefsP15 &page15) { + DelayDebugMsg ("Saving", 15); } // end of CMUSHclientDoc::SavePrefsP15 void CMUSHclientDoc:: SavePrefsP16 (CPrefsP16 &page16) { + DelayDebugMsg ("Saving", 16); m_bEnableTimers = page16.m_bEnableTimers; m_bUseDefaultTimers = page16.m_bUseDefaultTimers; } // end of CMUSHclientDoc::SavePrefsP16 void CMUSHclientDoc:: SavePrefsP17 (CPrefsP17 &page17) { + DelayDebugMsg ("Saving", 17); // disable old scripting engine if: // a) The language has changed; or // b) The script file name has changed *************** *** 1601,1611 **** --- 1702,1714 ---- void CMUSHclientDoc:: SavePrefsP18 (CPrefsP18 &page18) { + DelayDebugMsg ("Saving", 18); // page 18 - nothing to copy } // end of CMUSHclientDoc::SavePrefsP18 void CMUSHclientDoc:: SavePrefsP19 (CPrefsP19 &page19) { + DelayDebugMsg ("Saving", 19); m_strAutoSayString = page19.m_strAutoSayString; m_bEnableAutoSay = page19.m_bEnableAutoSay; m_bExcludeMacros = page19.m_bExcludeMacros; *************** *** 1616,1627 **** --- 1719,1732 ---- void CMUSHclientDoc:: SavePrefsP20 (CPrefsP20 &page20) { + DelayDebugMsg ("Saving", 20); // do the saving in the "ischanged" routine - it does a lot of work for it } // end of CMUSHclientDoc::SavePrefsP20 void CMUSHclientDoc:: SavePrefsP21 (CPrefsP21 &page21) { + DelayDebugMsg ("Saving", 21); m_name = page21.m_name; m_password = page21.m_password; m_connect_now = page21.m_connect_now; *************** *** 1630,1635 **** --- 1735,1741 ---- void CMUSHclientDoc:: SavePrefsP22 (CPrefsP22 &page22) { + DelayDebugMsg ("Saving", 22); m_iHyperlinkColour = page22.m_iHyperlinkColour; m_iMXPdebugLevel = page22.m_iMXPdebugLevel; *************** *** 1655,1660 **** --- 1761,1767 ---- void CMUSHclientDoc:: SavePrefsP23 (CPrefsP23 &page23) { + DelayDebugMsg ("Saving", 23); unsigned short iOldPort = m_IncomingChatPort; m_bAutoAllowSnooping = page23.m_bAutoAllowSnooping ; *************** *** 1824,1829 **** --- 1931,1938 ---- bool CMUSHclientDoc::GamePreferences (const int iPage) { + Frame.DelayDebugStatus ("Starting world config"); + int iWantedPage = iPage; if (iWantedPage == -1) *************** *** 1842,1847 **** --- 1951,1958 ---- sheet.m_clrCaptionRight = sheet.m_clrCaptionLeft; // no gradient sheet.m_clrCaptionTextLeft = RGB (255, 255, 255); // white + Frame.DelayDebugStatus ("World config - constructing pages"); + // dividers CPrefsP0 page0; // name *************** *** 1891,1896 **** --- 2002,2009 ---- CPrefsP17 page17; CPrefsP18 page18; + Frame.DelayDebugStatus ("World config - loading pages"); + // name LoadPrefsP1 (page1); *************** *** 1946,1951 **** --- 2059,2067 ---- // page0000.m_doc = this; page00000.m_doc = this; + + Frame.DelayDebugStatus ("World config - adding pages to property sheet"); + // Add pages to property sheet. Their page numbers will depend on the order // in which they are added. *************** *** 2034,2047 **** --- 2150,2172 ---- bool bSavedF1Flag = App.m_bF1macro; App.m_bF1macro = false; + Frame.DelayDebugStatus ("World config - showing dialog"); + // do preferences page int iResult = sheet.DoModal (); + + Frame.DelayDebugStatus ("World config - dialog done"); // now put it back - bluurrrggghhh!!! App.m_bF1macro = bSavedF1Flag; if (iResult != IDOK) + { + Frame.SetStatusNormal (); return false; + } + + Frame.DelayDebugStatus ("World config - dialog not cancelled"); // make sure we re-evaluate the IP address if the server address changes *************** *** 2053,2058 **** --- 2178,2185 ---- if (m_strProxyServerName != page1.m_strProxyServerName) ZeroMemory(&m_ProxyAddr, sizeof m_ProxyAddr); + Frame.DelayDebugStatus ("World config - fixing fonts"); + // change input font if necessary if (m_input_font_height != page9.m_input_font_height || *************** *** 2087,2092 **** --- 2214,2221 ---- page14.m_bShowUnderline, page14.m_iLineSpacing); + Frame.DelayDebugStatus ("World config - checking if world changed"); + if ( // name *************** *** 2141,2152 **** --- 2270,2285 ---- if (ChangedPrefsP20 (page20)) SetModifiedFlag (TRUE); + Frame.DelayDebugStatus ("World config - updating views"); + // update all views in case font or colours changed UpdateAllViews (NULL); // save new values in the document + Frame.DelayDebugStatus ("World config - saving pages"); + // name SavePrefsP1 (page1); *************** *** 2187,2192 **** --- 2320,2327 ---- SavePrefsP17 (page17); SavePrefsP18 (page18); + + Frame.SetStatusNormal (); return true; // did it OK } Index: doc.h =================================================================== RCS file: /cvs/mushclient/doc.h,v retrieving revision 1.225 retrieving revision 1.226 diff -c -r1.225 -r1.226 *** doc.h 26 Jul 2007 00:46:46 -0000 1.225 --- doc.h 30 Jul 2007 00:06:52 -0000 1.226 *************** *** 21,28 **** // New versions - things to change ! #define THISVERSION 416 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.16"; // 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 417 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.17"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT Index: lua_utils.cpp =================================================================== RCS file: /cvs/mushclient/lua_utils.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -c -r1.22 -r1.23 *** lua_utils.cpp 25 Jul 2007 05:02:19 -0000 1.22 --- lua_utils.cpp 30 Jul 2007 00:06:52 -0000 1.23 *************** *** 1189,1194 **** --- 1189,1204 ---- return 1; } + // used in mainfrm.cpp + extern bool bShowDebugStatus; + + static int showdebugstatus (lua_State *L) + { + bShowDebugStatus = optboolean (L, 1, 1); + return 0; + } + + // table of operations static const struct luaL_reg xmllib [] = { *************** *** 1213,1218 **** --- 1223,1229 ---- {"utf8sub", utf8sub}, {"appendtonotepad", appendtonotepad}, {"activatenotepad", activatenotepad}, + {"showdebugstatus", showdebugstatus}, {NULL, NULL} }; Index: mainfrm.cpp =================================================================== RCS file: /cvs/mushclient/mainfrm.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -c -r1.64 -r1.65 *** mainfrm.cpp 21 Jul 2007 03:43:37 -0000 1.64 --- mainfrm.cpp 30 Jul 2007 00:06:52 -0000 1.65 *************** *** 396,401 **** --- 396,409 ---- } } // end of CWinFormsFrame::SetStatusMessageNow + bool bShowDebugStatus = false; + + void CMainFrame::DelayDebugStatus(const CString& msg) + { + if (bShowDebugStatus) + SetStatusMessageNow (msg); + } // end of CWinFormsFrame::DelayDebugStatus + void CMainFrame::SetStatusNormal (void) { SetStatusMessageNow (Translate ("Ready")); Index: mainfrm.h =================================================================== RCS file: /cvs/mushclient/mainfrm.h,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** mainfrm.h 21 Jul 2007 03:43:37 -0000 1.31 --- mainfrm.h 30 Jul 2007 00:06:52 -0000 1.32 *************** *** 51,56 **** --- 51,57 ---- void SetStatusNormal (void); void ReturnStatusRect (CRect & rect); void ReturnToolbarRect(CRect & rect); + void DelayDebugStatus(const CString& msg); void FixUpTitleBar (void); void OnUpdateBtnWorlds (int iWorld, CCmdUI* pCmdUI); Index: mushclient.hlp =================================================================== RCS file: /cvs/mushclient/mushclient.hlp,v retrieving revision 1.85 retrieving revision 1.86 diff -c -r1.85 -r1.86 Binary files /tmp/cvsL27X4O and /tmp/cvsiorkre differ Index: install/readme.txt =================================================================== RCS file: /cvs/mushclient/install/readme.txt,v retrieving revision 1.154 retrieving revision 1.155 diff -c -r1.154 -r1.155 *** install/readme.txt 26 Jul 2007 00:46:54 -0000 1.154 --- install/readme.txt 30 Jul 2007 00:07:00 -0000 1.155 *************** *** 1,7 **** ! MUSHclient version 4.16 ======================= ! Thursday, 26th July 2007 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/ --- 1,7 ---- ! MUSHclient version 4.17 ======================= ! Monday, 30th July 2007 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/ Index: lua/copytable.lua =================================================================== RCS file: /cvs/mushclient/lua/copytable.lua,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** lua/copytable.lua 21 Jul 2007 03:07:39 -0000 1.1 --- lua/copytable.lua 30 Jul 2007 00:07:00 -0000 1.2 *************** *** 21,28 **** Deep: Copies keys and values recursively. If a value is a table, makes a copy of that table, and so on. Restrictions: Items must be "safe" to copy (eg. not file IO userdata). ! If doing a deep copy, a table may not appear inside itself. Example: --- 21,38 ---- Deep: Copies keys and values recursively. If a value is a table, makes a copy of that table, and so on. + Deep copy based on: http://lua-users.org/wiki/CopyTable + Restrictions: Items must be "safe" to copy (eg. not file IO userdata). ! ! The deep copied tables share the same metatable as the original ones. ! To change this, change the line: ! ! return setmetatable(new_table, getmetatable(object)) ! ! to: ! ! return setmetatable(new_table, _copy (getmetatable(object)) Example: *************** *** 40,69 **** module (..., package.seeall) ! function deep (t, done) ! assert (type (t) == "table", "You must specify a table to copy") ! ! local result = {} ! done = done or {} ! ! assert (not done [t], "table is defined within itself") ! ! done [t] = true -- we will disallow recopying table t ! ! for k, v in pairs (t) do ! if type (v) == "table" then ! result [k] = deep (v, done) ! else ! result [k] = v ! end -- if table or not ! end -- for each table element ! ! done [t] = nil -- table t can be copied again ! -- copy the metatable ! return setmetatable (result, getmetatable (t)) ! end -- function deep function shallow (t) assert (type (t) == "table", "You must specify a table to copy") --- 50,78 ---- module (..., package.seeall) ! ! function deep (object) ! local lookup_table = {} ! ! local function _copy (object) ! if type (object) ~= "table" then ! return object ! elseif lookup_table [object] then ! return lookup_table [object] ! end -- if ! ! local new_table = {} ! lookup_table [object] = new_table ! ! for index, value in pairs (object) do ! new_table [_copy (index)] = _copy (value) ! end -- for ! return setmetatable (new_table, getmetatable (object)) ! end -- function _copy ! return _copy (object) ! end -- function deepcopy function shallow (t) assert (type (t) == "table", "You must specify a table to copy")