mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Console output now supports search, font settings 'set to defaults' button
git-svn-id: svn://ultimatepp.org/upp/trunk@13490 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c3976889b5
commit
69459dfe4d
5 changed files with 20 additions and 5 deletions
|
|
@ -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<TopTextFrame>());
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue