From eb51f9994269b5b7aa7610f3fb28dfd0342e4eab Mon Sep 17 00:00:00 2001 From: Lars Doelle Date: Mon, 9 Nov 1998 11:54:24 +0000 Subject: [PATCH] font hints added svn path=/trunk/kdebase/konsole/; revision=12308 --- ChangeLog | 2 ++ doc/sgml/konsole-5.html | 24 ++++++++++++++++-------- doc/sgml/konsole.html | 17 +++++++++-------- doc/sgml/konsole.sgml | 7 +++++++ src/TEShell.C | 6 +++++- src/kcmkonsole.C | 26 ++++++++++---------------- src/main.C | 7 ++++--- 7 files changed, 53 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7d6ec2a..c9258da9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 09 Nov 1998 - minor bugs fixed. +- putenv/setenv - prefered Solaris compatibility over + a workaround for some broken gcc/clib version 04 Nov 1998 - minor bug fixes integrated - xterm color schema added diff --git a/doc/sgml/konsole-5.html b/doc/sgml/konsole-5.html index f93df1ab..7c991dd2 100644 --- a/doc/sgml/konsole-5.html +++ b/doc/sgml/konsole-5.html @@ -22,7 +22,15 @@ NextPrevious

Before sending bug reports, please check the problem with another X terminal to find out whether it is `konsole' specific or not.

-

5.1 Application related problems +

5.1 Installation related problems +

+ +

Konsole requieres some specific fonts that come along with it's +distribution but are not installed due to the authors preference +not claim root privileges during the installation process. You'll +have to do this manually. See README.linux.console for details. +

+

5.2 Application related problems

Some programs have flaws when run under a X console. @@ -80,7 +88,7 @@ not cope well with resize events (segfault).

-

5.2 Broken termcap and terminfo databases +

5.3 Broken termcap and terminfo databases

Please be aware of the fact that most applications (those using ncurses) @@ -102,7 +110,7 @@ sequences under some circumstances (ESC Pn C is treated like

-

5.3 Problems with BACKSPACE, DELETE and likely keyboard issues. +

5.4 Problems with BACKSPACE, DELETE and likely keyboard issues.

Once upon a time there was a terminal without a delete key. @@ -128,14 +136,14 @@ are prefixes (i.e. are eventually to be continued with a second character). X11 is known to have these dead keys.

-

5.4 Color Scheme +

5.5 Color Scheme

Because of a storm of complaints about the color scheme, konsole offers configurable color schemes in it's latest versions. A proper document on them is still missing.

-

5.5 Fonts +

5.6 Fonts

(Slightly outdated, check README.linux.console) @@ -159,7 +167,7 @@ family, please drop me a line.

-

5.6 Security +

5.7 Security

Although konsole is prepared to be installed root-suid, it is not @@ -168,7 +176,7 @@ immediately after being started. Secure keyboard is not implemented and konsole does not fchown(2) the pseudo tty.

-

5.7 Known bugs (konsole-0.8.6) +

5.8 Known bugs (konsole-0.8.6)

@@ -182,7 +190,7 @@ install to get the key-presses.

-

5.8 Features that will not be implemented. +

5.9 Features that will not be implemented.

diff --git a/doc/sgml/konsole.html b/doc/sgml/konsole.html index fec027a9..e814fb8b 100644 --- a/doc/sgml/konsole.html +++ b/doc/sgml/konsole.html @@ -42,14 +42,15 @@ Please be aware of the fact that this document is under construction.

5. Bugs and FAQ

diff --git a/doc/sgml/konsole.sgml b/doc/sgml/konsole.sgml index 55e91fca..b935103f 100644 --- a/doc/sgml/konsole.sgml +++ b/doc/sgml/konsole.sgml @@ -214,6 +214,13 @@ If you experience problems with that, please refer to Before sending bug reports, please check the problem with another X terminal to find out whether it is `konsole' specific or not. +Installation related problems +

+Konsole requieres some specific fonts that come along with it's +distribution but are not installed due to the authors preference +not claim root privileges during the installation process. You'll +have to do this manually. See README.linux.console for details. + Application related problems

Some programs have flaws when run under a X console. diff --git a/src/TEShell.C b/src/TEShell.C index 5277d185..c48f829b 100644 --- a/src/TEShell.C +++ b/src/TEShell.C @@ -52,6 +52,7 @@ #include "TEShell.h" #include "TEShell.moc" +#include #define HERE fprintf(stdout,"%s(%d): here\n",__FILE__,__LINE__) @@ -132,7 +133,10 @@ void Shell::makeShell(const char* dev, char* argv[], setuid(getuid()); setgid(getgid()); // drop privileges if (term && term[0]) - setenv("TERM",term,1); // export TERM=term + { + putenv((QString("TERM=") + term).data()); // export TERM=term +// setenv("TERM",term,1); // this is not available with Solaris + } f = argv[0]; if ( login_shell ) // see sh(1) diff --git a/src/kcmkonsole.C b/src/kcmkonsole.C index 121eea9e..78d1e0f2 100644 --- a/src/kcmkonsole.C +++ b/src/kcmkonsole.C @@ -192,10 +192,14 @@ Tripel Tripel::linear(const Tripel &p0, const Tripel &p1, float f) Tripel Tripel::togray(float f) { - // I've guessed these factors. They've to total to 1.0 - Tripel rp = Tripel::linear(Tripel(0.25*r),Tripel(r,0,0),f); - Tripel bp = Tripel::linear(Tripel(0.35*b),Tripel(0,b,0),f); - Tripel gp = Tripel::linear(Tripel(0.45*g),Tripel(0,0,g),f); + // I've used the physiological luminescense factors here. + // They appear not right with the phosphor of my monitor. + // May be i should have set them all to 1/3, but i want + // to get different sorts of gray for the colors also. + // If your' tuning, note that they have to total to 1. + Tripel rp = Tripel::linear(Tripel(0.37*r),Tripel(r,0,0),f); + Tripel bp = Tripel::linear(Tripel(0.39*b),Tripel(0,b,0),f); + Tripel gp = Tripel::linear(Tripel(0.24*g),Tripel(0,0,g),f); return Tripel::add( rp, Tripel::add( bp, gp )); } @@ -228,13 +232,13 @@ setText(pa&&*pa?pa+1:"/* build-in schema */"); } void ColorTable::paintEvent(QPaintEvent* e) -{ int x,y; +{ // in the moment we don't care and paint the whole bunch // we don't care about all the tricks, also. QPainter paint; paint.begin( this ); if (schema) - for (y = 0; y < BASE_COLORS-2; y++) + for (int y = 0; y < BASE_COLORS-2; y++) { QRect base = frameRect(); int top = base.height()*(y+0)/(BASE_COLORS-2); @@ -247,16 +251,6 @@ void ColorTable::paintEvent(QPaintEvent* e) Tripel t3 = Tripel::add( t0.scale(scale), t2 ); Tripel t4 = t3.togray(color); paint.fillRect(rect, t4.color() ); -/* - for (x = 0; x < TABLE_COLORS; x++) - { - int bgn = base.width()*(x+0)/TABLE_COLORS; - int end = base.width()*(x+1)/TABLE_COLORS; - QRect rect(QPoint((3*bgn+end)/4,(3*top+bot)/4), - QPoint((3*end+bgn)/4,(3*bot+top)/4)); - paint.fillRect(rect, schema->table[x].color ); - } -*/ } //drawFrame(&paint); paint.end(); diff --git a/src/main.C b/src/main.C index 73946123..30dc8ef5 100644 --- a/src/main.C +++ b/src/main.C @@ -394,7 +394,8 @@ void TEDemo::setFont(int fontno) if ( !f.exactMatch() ) KMsgBox::message ( this, - "Error", QString("Font '") + fonts[fontno] + "' not found.", + "Error", QString("Font '") + fonts[fontno] + "' not found.\n" + "Check README.linux.console for help.", KMsgBox::EXCLAMATION ); else { @@ -413,8 +414,8 @@ void TEDemo::opt_menu_activated(int item) m_options->setItemChecked(1,b_menuvis); if (b_menuvis) menubar->show(); else menubar->hide(); updateRects(); - if (!b_menuvis) - { + if (!b_menuvis) + { setCaption("Use the right mouse button to bring back the menu"); QTimer::singleShot(5000,this,SLOT(setHeader())); }