diff --git a/uppsrc/ide/Console.cpp b/uppsrc/ide/Console.cpp index c8e3c503d..e8ebab750 100644 --- a/uppsrc/ide/Console.cpp +++ b/uppsrc/ide/Console.cpp @@ -16,7 +16,7 @@ Console::Console() { console = false; SetReadOnly(); NoHorzScrollbar(); - SetColor(PAPER_READONLY, SColorPaper); + SetColor(LineEdit::PAPER_READONLY, SColorPaper); input.Height(EditString::GetStdHeight()); input.SetFrame(Single()); AddFrame(input); @@ -99,7 +99,7 @@ bool Console::Key(dword key, int count) { WhenSelect(); return true; } - return LineEdit::Key(key, count); + return MenuBar::Scan(WhenBar, key) || LineEdit::Key(key, count); } void Console::ToErrors(const String& s) diff --git a/uppsrc/ide/Setup.cpp b/uppsrc/ide/Setup.cpp index bb926a7c4..6a458188b 100644 --- a/uppsrc/ide/Setup.cpp +++ b/uppsrc/ide/Setup.cpp @@ -378,7 +378,6 @@ void Ide::SetupFormat() { ide.gnome.Hide(); ide.xterm.Hide(); ide.mate.Hide(); - #endif ide.kde <<= callback2(SetConsole, &ide.console, "/usr/bin/konsole -e"); ide.gnome <<= callback2(SetConsole, &ide.console, "/usr/bin/gnome-terminal -x"); @@ -544,6 +543,17 @@ void Ide::SetupFormat() { String usc_path = GetHomeDirFile("usc.path"); ide.uscpath <<= LoadFile(usc_path); + fnt.defaults << [&] { + Ide def; + + ed.Set(def.editorfont); + vf.Set(def.veditorfont); + con.Set(def.consolefont); + tf.Set(def.tfont); + f1.Set(def.font1); + f2.Set(def.font2); + }; + for(;;) { int c = dlg.Run(); if(IsNull(ide.uscpath)) diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index fc042ded7..969cdad4f 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -52,7 +52,7 @@ void Puts(const char *s); Display& BoldDisplay(); -class Console : public LineEdit { +class Console : public CodeEditor { public: virtual bool Key(dword key, int count); virtual void LeftDouble(Point p, dword); diff --git a/uppsrc/ide/ide.lay b/uppsrc/ide/ide.lay index 935a2ff9a..a63c98c21 100644 --- a/uppsrc/ide/ide.lay +++ b/uppsrc/ide/ide.lay @@ -466,7 +466,7 @@ LAYOUT(StatLayout, 732, 552) ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(8, 64).BottomPosZ(8, 24)) END_LAYOUT -LAYOUT(SetupFontLayout, 528, 148) +LAYOUT(SetupFontLayout, 528, 176) ITEM(Label, dv___0, SetLabel(t_("Normal")).LeftPosZ(4, 48).TopPosZ(4, 19)) ITEM(DropList, face, HSizePosZ(52, 268).TopPosZ(4, 19)) ITEM(DropList, height, RightPosZ(210, 50).TopPosZ(4, 19)) @@ -503,6 +503,7 @@ LAYOUT(SetupFontLayout, 528, 148) ITEM(Option, tbold, SetLabel(t_("Bold")).RightPosZ(162, 44).TopPosZ(124, 18)) ITEM(Option, titalic, SetLabel(t_("Italic")).RightPosZ(114, 44).TopPosZ(124, 18)) ITEM(Option, tnaa, SetLabel(t_("NonAntiAliased")).RightPosZ(8, 100).TopPosZ(124, 18)) + ITEM(Button, defaults, SetLabel(t_("Restore defaults")).LeftPosZ(412, 116).TopPosZ(152, 24)) END_LAYOUT LAYOUT(SetupHlLayout, 544, 300) diff --git a/uppsrc/ide/idebar.cpp b/uppsrc/ide/idebar.cpp index 3de513492..9b57edeb0 100644 --- a/uppsrc/ide/idebar.cpp +++ b/uppsrc/ide/idebar.cpp @@ -868,6 +868,10 @@ void Ide::ConsoleMenu(Bar& menu) .Key(K_CTRL_V) .Help("Append selection to system console"); menu.Separator(); + menu.Add(AK_FIND, [=] { + console.FindReplace(false, true, false); + }); + menu.Separator(); menu.Add("Clear", THISBACK(ConsoleClear)) .Help("Empty system console"); }