summaryrefslogtreecommitdiffstats
path: root/konsole/konsole
diff options
context:
space:
mode:
Diffstat (limited to 'konsole/konsole')
-rw-r--r--konsole/konsole/TEScreen.cpp46
-rw-r--r--konsole/konsole/TEScreen.h18
-rw-r--r--konsole/konsole/TEWidget.cpp24
-rw-r--r--konsole/konsole/TEWidget.h4
-rw-r--r--konsole/konsole/TEmuVt102.cpp6
-rw-r--r--konsole/konsole/konsole.cpp32
-rw-r--r--konsole/konsole/konsole.h1
-rw-r--r--konsole/konsole/konsole_part.cpp11
8 files changed, 108 insertions, 34 deletions
diff --git a/konsole/konsole/TEScreen.cpp b/konsole/konsole/TEScreen.cpp
index f0ca2b176..8f2473e31 100644
--- a/konsole/konsole/TEScreen.cpp
+++ b/konsole/konsole/TEScreen.cpp
@@ -176,7 +176,7 @@ void TEScreen::cursorLeft(int n)
}
/*!
- Move the cursor left.
+ Move the cursor right.
The cursor will not move beyond the rightmost column.
*/
@@ -189,6 +189,50 @@ void TEScreen::cursorRight(int n)
}
/*!
+ Move the cursor at most n lines next
+*/
+
+void TEScreen::cursorNextLine(int n)
+//=CNL
+{
+ if (n == 0)
+ {
+ n = 1; // Default
+ }
+ cuX = 0;
+ while (n > 0)
+ {
+ if (cuY < lines - 1)
+ {
+ cuY += 1;
+ }
+ n--;
+ }
+}
+
+/*!
+ Move the cursor at most n lines previous
+*/
+
+void TEScreen::cursorPrevLine(int n)
+//=CPL
+{
+ if (n == 0)
+ {
+ n = 1; // Default
+ }
+ cuX = 0;
+ while (n > 0)
+ {
+ if (cuY > 0)
+ {
+ cuY -= 1;
+ }
+ n--;
+ }
+}
+
+/*!
Set top and bottom margin.
*/
diff --git a/konsole/konsole/TEScreen.h b/konsole/konsole/TEScreen.h
index 557a07e4c..a28aab949 100644
--- a/konsole/konsole/TEScreen.h
+++ b/konsole/konsole/TEScreen.h
@@ -52,14 +52,16 @@ public: // these are all `Screen' operations
//
// Cursor Movement
//
- void cursorUp (int n);
- void cursorDown (int n);
- void cursorLeft (int n);
- void cursorRight (int n);
- void setCursorY (int y);
- void setCursorX (int x);
- void setCursorYX (int y, int x);
- void setMargins (int t, int b);
+ void cursorUp (int n);
+ void cursorDown (int n);
+ void cursorLeft (int n);
+ void cursorRight (int n);
+ void cursorNextLine(int n);
+ void cursorPrevLine(int n);
+ void setCursorY (int y);
+ void setCursorX (int x);
+ void setCursorYX (int y, int x);
+ void setMargins (int t, int b);
//
// Cursor Movement with Scrolling
//
diff --git a/konsole/konsole/TEWidget.cpp b/konsole/konsole/TEWidget.cpp
index f151044fc..4ceaeb83d 100644
--- a/konsole/konsole/TEWidget.cpp
+++ b/konsole/konsole/TEWidget.cpp
@@ -308,6 +308,19 @@ void TEWidget::fontChange(const TQFont &)
update();
}
+void TEWidget::biggerFont(void) {
+ TQFont f = getVTFont();
+ f.setPointSize( f.pointSize() + 1 );
+ setVTFont( f );
+}
+
+void TEWidget::smallerFont(void) {
+ TQFont f = getVTFont();
+ if ( f.pointSize() < 6 ) return; // A minimum size
+ f.setPointSize( f.pointSize() - 1 );
+ setVTFont( f );
+}
+
void TEWidget::setVTFont(const TQFont& f)
{
TQFont font = f;
@@ -1693,6 +1706,17 @@ void TEWidget::wheelEvent( TQWheelEvent* ev )
if (ev->orientation() != Qt::Vertical)
return;
+ if (ev->state() & ControlButton) {
+ if (ev->delta() > 0) {
+ biggerFont();
+ }
+ else {
+ smallerFont();
+ }
+ ev->accept();
+ return;
+ }
+
if ( mouse_marks )
TQApplication::sendEvent(scrollbar, ev);
else
diff --git a/konsole/konsole/TEWidget.h b/konsole/konsole/TEWidget.h
index 2baa2531c..ba2d1f6cf 100644
--- a/konsole/konsole/TEWidget.h
+++ b/konsole/konsole/TEWidget.h
@@ -125,6 +125,10 @@ public:
*/
void setVTFont(const TQFont& font);
+ /** Changes font size by 1 point */
+ void biggerFont();
+ void smallerFont();
+
void setMouseMarks(bool on);
static void setAntialias( bool enable ) { s_antialias = enable; }
static bool antialias() { return s_antialias; }
diff --git a/konsole/konsole/TEmuVt102.cpp b/konsole/konsole/TEmuVt102.cpp
index b5ca0ea5b..fb38b6e18 100644
--- a/konsole/konsole/TEmuVt102.cpp
+++ b/konsole/konsole/TEmuVt102.cpp
@@ -172,7 +172,7 @@ void TEmuVt102::reset()
// Tokens ------------------------------------------------------------------ --
/*
- Since the tokens are the central notion if this section, we've put them
+ Since the tokens are the central notion in this section, we've put them
in front. They provide the syntactical elements used to represent the
terminals operations as byte sequences.
@@ -267,7 +267,7 @@ void TEmuVt102::initTokenizer()
for(i = 0; i < 256; i++) tbl[ i] = 0;
for(i = 0; i < 32; i++) tbl[ i] |= CTL;
for(i = 32; i < 256; i++) tbl[ i] |= CHR;
- for(s = (UINT8*)"@ABCDGHILMPSTXZbcdfry"; *s; s++) tbl[*s] |= CPN;
+ for(s = (UINT8*)"@ABCDEFGHILMPSTXZbcdfry"; *s; s++) tbl[*s] |= CPN;
// resize = \e[8;<row>;<col>t
for(s = (UINT8*)"t"; *s; s++) tbl[*s] |= CPS;
for(s = (UINT8*)"0123456789" ; *s; s++) tbl[*s] |= DIG;
@@ -621,6 +621,8 @@ switch( N )
case TY_CSI_PN('B' ) : scr->cursorDown (p ); break; //VT100
case TY_CSI_PN('C' ) : scr->cursorRight (p ); break; //VT100
case TY_CSI_PN('D' ) : scr->cursorLeft (p ); break; //VT100
+ case TY_CSI_PN('E' ) : scr->cursorNextLine (p ); break; //VT100
+ case TY_CSI_PN('F' ) : scr->cursorPrevLine (p ); break; //VT100
case TY_CSI_PN('G' ) : scr->setCursorX (p ); break; //LINUX
case TY_CSI_PN('H' ) : scr->setCursorYX (p, q); break; //VT100
case TY_CSI_PN('I' ) : scr->Tabulate (p ); break;
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index 0101ecab3..11fae96d1 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -266,6 +266,7 @@ Konsole::Konsole(const char* name, int histon, bool menubaron, bool tabbaron, bo
,b_installBitmapFonts(false)
,b_framevis(true)
,b_metaAsAlt(false)
+,b_realTransparency(false)
,b_fullscreen(false)
,m_menuCreated(false)
,b_warnQuit(false)
@@ -361,11 +362,6 @@ Konsole::Konsole(const char* name, int histon, bool menubaron, bool tabbaron, bo
// connect(kapp, TQT_SIGNAL(tdedisplayFontChanged()), this, TQT_SLOT(slotFontChanged()));
kapp->dcopClient()->setDefaultObject( "konsole" );
-
- // Signal that we want to be transparent to the desktop, not to windows behind us...
- Atom kde_wm_transparent_to_desktop;
- kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_DESKTOP", False);
- XChangeProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
}
@@ -1616,6 +1612,20 @@ void Konsole::readProperties(TDEConfig* config, const TQString &schema, bool glo
s_word_seps= config->readEntry("wordseps",":@-./_~");
b_framevis = config->readBoolEntry("has frame",true);
b_metaAsAlt = config->readBoolEntry("metaAsAltMode",false);
+ b_realTransparency = config->readBoolEntry("RealTransparency",false);
+
+ Atom kde_wm_transparent_to_desktop;
+ kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_DESKTOP", False);
+ if (b_realTransparency)
+ {
+ XDeleteProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop);
+ }
+ else
+ {
+ // Signal that we want to be transparent to the desktop, not to windows behind us...
+ XChangeProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ }
+
TQPtrList<TEWidget> tes = activeTEs();
for (TEWidget *_te = tes.first(); _te; _te = tes.next()) {
_te->setWordCharacters(s_word_seps);
@@ -3434,6 +3444,7 @@ void Konsole::addSessionCommand(const TQString &path)
// try to locate the binary
TQString exec= co->readPathEntry("Exec");
exec.remove(TQRegExp("^(sudo )?su (- )?-c ?\'"));
+ exec.remove(TQRegExp("\'?$"));
exec = KRun::binaryName(exec, false);
exec = KShell::tildeExpand(exec);
@@ -4376,20 +4387,13 @@ void Konsole::slotFontChanged()
void Konsole::biggerFont(void) {
if ( !se ) return;
-
- TQFont f = te->getVTFont();
- f.setPointSize( f.pointSize() + 1 );
- te->setVTFont( f );
+ te->biggerFont();
activateSession();
}
void Konsole::smallerFont(void) {
if ( !se ) return;
-
- TQFont f = te->getVTFont();
- if ( f.pointSize() < 6 ) return; // A minimum size
- f.setPointSize( f.pointSize() - 1 );
- te->setVTFont( f );
+ te->smallerFont();
activateSession();
}
diff --git a/konsole/konsole/konsole.h b/konsole/konsole/konsole.h
index 30ca6e5a1..fff364eb7 100644
--- a/konsole/konsole/konsole.h
+++ b/konsole/konsole/konsole.h
@@ -428,6 +428,7 @@ private:
bool b_framevis:1;
bool b_metaAsAlt:1;
+ bool b_realTransparency:1;
bool b_fullscreen:1;
bool m_menuCreated:1;
bool b_warnQuit:1;
diff --git a/konsole/konsole/konsole_part.cpp b/konsole/konsole/konsole_part.cpp
index 1c0067bb9..ce3ebab57 100644
--- a/konsole/konsole/konsole_part.cpp
+++ b/konsole/konsole/konsole_part.cpp
@@ -695,19 +695,12 @@ void konsolePart::slotSelectFont() {
void konsolePart::biggerFont(void) {
if ( !se ) return;
-
- TQFont f = te->getVTFont();
- f.setPointSize( f.pointSize() + 1 );
- te->setVTFont( f );
+ te->biggerFont();
}
void konsolePart::smallerFont(void) {
if ( !se ) return;
-
- TQFont f = te->getVTFont();
- if ( f.pointSize() < 6 ) return; // A minimum size
- f.setPointSize( f.pointSize() - 1 );
- te->setVTFont( f );
+ te->smallerFont();
}
void konsolePart::updateKeytabMenu()