author | llornkcor <llornkcor> | 2002-10-31 14:49:24 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-31 14:49:24 (UTC) |
commit | c3a6f53669140cf9e3c953772c610cd91d69ab78 (patch) (side-by-side diff) | |
tree | ab8579e66582aedc01da2aea4272e754902e9287 /core/apps/embeddedkonsole/konsole.cpp | |
parent | 7d8a563125b981718ae963ba6308e3506e870045 (diff) | |
download | opie-c3a6f53669140cf9e3c953772c610cd91d69ab78.zip opie-c3a6f53669140cf9e3c953772c610cd91d69ab78.tar.gz opie-c3a6f53669140cf9e3c953772c610cd91d69ab78.tar.bz2 |
no wrap mode taken from console, gui needs work
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index a8ddc99..3c87ad4 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp @@ -358,8 +358,20 @@ void Konsole::init(const char* _pgm, QStrList & _args) scrollMenu->insertItem(tr( "None" )); scrollMenu->insertItem(tr( "Left" )); scrollMenu->insertItem(tr( "Right" )); - configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); + scrollMenu->insertSeparator(4); + scrollMenu->insertItem(tr( "Horizontal" )); + configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); +//scrollMenuSelected(-29); +// cfg.setGroup("ScrollBar"); +// if(cfg.readBoolEntry("HorzScroll",0)) { +// if(cfg.readNumEntry("Position",2) == 0) +// te->setScrollbarLocation(1); +// else +// te->setScrollbarLocation(0); +// te->setScrollbarLocation( cfg.readNumEntry("Position",2)); +// te->setWrapAt(120); +// } // create applications ///////////////////////////////////////////////////// setCentralWidget(tab); @@ -372,7 +384,7 @@ void Konsole::init(const char* _pgm, QStrList & _args) se_pgm = _pgm; se_args = _args; - + se_args.prepend("--login"); parseCommandLine(); // read and apply default values /////////////////////////////////////////// resize(321, 321); // Dummy. @@ -508,6 +520,8 @@ QSize Konsole::calcSize(int columns, int lines) { void Konsole::setColLin(int columns, int lines) { + qDebug("konsole::setColLin:: Columns %d", columns); + if ((columns==0) || (lines==0)) { if (defaultSize.isEmpty()) // not in config file : set default value @@ -552,6 +566,7 @@ void Konsole::setFont(int fontno) void Konsole::changeColumns(int columns) { + qDebug("change columns"); TEWidget* te = getTe(); if (te != 0) { setColLin(columns,te->Lines()); @@ -800,8 +815,7 @@ void Konsole::setColor() void Konsole::scrollMenuSelected(int index) { -// QString temp; -// qDebug( temp.sprintf("scrollbar menu %d",index)); + qDebug( "scrollbar menu %d",index); TEWidget* te = getTe(); Config cfg("Konsole"); cfg.setGroup("ScrollBar"); @@ -818,6 +832,18 @@ void Konsole::scrollMenuSelected(int index) te->setScrollbarLocation(2); cfg.writeEntry("Position",2); break; + case -29: { + bool b=cfg.readBoolEntry("HorzScroll",0); + cfg.writeEntry("HorzScroll", !b ); + cfg.write(); + if(cfg.readNumEntry("Position",2) == 0) + te->setScrollbarLocation(1); + else + te->setScrollbarLocation(0); + te->setScrollbarLocation( cfg.readNumEntry("Position",2)); + te->setWrapAt(120); + } + break; }; } |