*** Setup.old.cpp Wed Apr 14 17:50:40 2010 --- Setup.cpp Wed Apr 14 17:57:43 2010 *************** *** 316,322 **** dlg.Add(edt, "Editor"); dlg.Add(ide, "IDE"); dlg.Add(ast, "Code formatting"); ! dlg.WhenClose = dlg.Acceptor(IDYES); FontSelectManager ed, vf, con, f1, f2, tf; ed.Set(fnt.face, fnt.height, fnt.bold, fnt.italic, fnt.naa); vf.Set(fnt.vface, fnt.vheight, fnt.vbold, fnt.vitalic, fnt.vnaa); --- 316,322 ---- dlg.Add(edt, "Editor"); dlg.Add(ide, "IDE"); dlg.Add(ast, "Code formatting"); ! dlg.WhenClose = dlg.Acceptor(IDEXIT); FontSelectManager ed, vf, con, f1, f2, tf; ed.Set(fnt.face, fnt.height, fnt.bold, fnt.italic, fnt.naa); vf.Set(fnt.vface, fnt.vheight, fnt.vbold, fnt.vitalic, fnt.vnaa); *************** *** 407,419 **** hlt.hlstyle.ColumnWidths("130 70 40 40 70"); hlt.hlstyle.EvenRowColor().NoHorzGrid().SetLineCy(EditField::GetStdHeight() + 2); ReadHlStyles(hlt.hlstyle); edt.charset <<= (int)default_charset; edt.tabsize <<= rtvr <<= hlt.hlstyle.WhenCtrlsAction = ed.WhenAction = tf.WhenAction = ! con.WhenAction = f1.WhenAction = f2.WhenAction = dlg.Breaker(222); ide.showtimeafter <<= Nvl((Date)FileGetTime(ConfigFile("version")), GetSysDate() - 1); ! ide.today <<= dlg.Breaker(444); ! hlt.hl_restore <<= dlg.Breaker(333); ide.chstyle.Add(0, "Host platform"); ide.chstyle.Add(1, "Standard"); ide.chstyle.Add(2, "Classic"); --- 407,424 ---- hlt.hlstyle.ColumnWidths("130 70 40 40 70"); hlt.hlstyle.EvenRowColor().NoHorzGrid().SetLineCy(EditField::GetStdHeight() + 2); ReadHlStyles(hlt.hlstyle); + + const int IDAPPLY = IDEXIT + 1; + const int IDRESTOREHL = IDEXIT + 2; + const int IDSETTODAY = IDEXIT + 3; + edt.charset <<= (int)default_charset; edt.tabsize <<= rtvr <<= hlt.hlstyle.WhenCtrlsAction = ed.WhenAction = tf.WhenAction = ! con.WhenAction = f1.WhenAction = f2.WhenAction = dlg.Breaker(IDAPPLY); ide.showtimeafter <<= Nvl((Date)FileGetTime(ConfigFile("version")), GetSysDate() - 1); ! ide.today <<= dlg.Breaker(IDSETTODAY); ! hlt.hl_restore <<= dlg.Breaker(IDRESTOREHL); ide.chstyle.Add(0, "Host platform"); ide.chstyle.Add(1, "Standard"); ide.chstyle.Add(2, "Classic"); *************** *** 444,456 **** editor.SetHlStyle(i, hlt.hlstyle.Get(i, 1), hlt.hlstyle.Get(i, 2), hlt.hlstyle.Get(i, 3), hlt.hlstyle.Get(i, 4)); UpdateFormat(); ! if(c == IDYES) break; ! if(c == 333 && PromptYesNo("Restore default highlighting colors?")) { editor.DefaultHlStyles(); ReadHlStyles(hlt.hlstyle); ! } ! if(c == 444) ide.showtimeafter = GetSysDate(); } if(filelist.IsCursor()) { --- 449,460 ---- editor.SetHlStyle(i, hlt.hlstyle.Get(i, 1), hlt.hlstyle.Get(i, 2), hlt.hlstyle.Get(i, 3), hlt.hlstyle.Get(i, 4)); UpdateFormat(); ! if(c == IDEXIT) break; ! if(c == IDRESTOREHL && PromptYesNo("Restore default highlighting colors?")) { editor.DefaultHlStyles(); ReadHlStyles(hlt.hlstyle); ! }else if(c == IDSETTODAY) ide.showtimeafter = GetSysDate(); } if(filelist.IsCursor()) {