summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/konsole.cpp
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp34
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)
358 scrollMenu->insertItem(tr( "None" )); 358 scrollMenu->insertItem(tr( "None" ));
359 scrollMenu->insertItem(tr( "Left" )); 359 scrollMenu->insertItem(tr( "Left" ));
360 scrollMenu->insertItem(tr( "Right" )); 360 scrollMenu->insertItem(tr( "Right" ));
361 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); 361 scrollMenu->insertSeparator(4);
362 scrollMenu->insertItem(tr( "Horizontal" ));
362 363
364 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu);
365//scrollMenuSelected(-29);
366// cfg.setGroup("ScrollBar");
367// if(cfg.readBoolEntry("HorzScroll",0)) {
368// if(cfg.readNumEntry("Position",2) == 0)
369// te->setScrollbarLocation(1);
370// else
371// te->setScrollbarLocation(0);
372// te->setScrollbarLocation( cfg.readNumEntry("Position",2));
373// te->setWrapAt(120);
374// }
363 // create applications ///////////////////////////////////////////////////// 375 // create applications /////////////////////////////////////////////////////
364 setCentralWidget(tab); 376 setCentralWidget(tab);
365 377
@@ -372,7 +384,7 @@ void Konsole::init(const char* _pgm, QStrList & _args)
372 384
373 se_pgm = _pgm; 385 se_pgm = _pgm;
374 se_args = _args; 386 se_args = _args;
375 387 se_args.prepend("--login");
376parseCommandLine(); 388parseCommandLine();
377 // read and apply default values /////////////////////////////////////////// 389 // read and apply default values ///////////////////////////////////////////
378 resize(321, 321); // Dummy. 390 resize(321, 321); // Dummy.
@@ -508,6 +520,8 @@ QSize Konsole::calcSize(int columns, int lines) {
508 520
509void Konsole::setColLin(int columns, int lines) 521void Konsole::setColLin(int columns, int lines)
510{ 522{
523 qDebug("konsole::setColLin:: Columns %d", columns);
524
511 if ((columns==0) || (lines==0)) 525 if ((columns==0) || (lines==0))
512 { 526 {
513 if (defaultSize.isEmpty()) // not in config file : set default value 527 if (defaultSize.isEmpty()) // not in config file : set default value
@@ -552,6 +566,7 @@ void Konsole::setFont(int fontno)
552 566
553void Konsole::changeColumns(int columns) 567void Konsole::changeColumns(int columns)
554{ 568{
569 qDebug("change columns");
555 TEWidget* te = getTe(); 570 TEWidget* te = getTe();
556 if (te != 0) { 571 if (te != 0) {
557 setColLin(columns,te->Lines()); 572 setColLin(columns,te->Lines());
@@ -800,8 +815,7 @@ void Konsole::setColor()
800 815
801void Konsole::scrollMenuSelected(int index) 816void Konsole::scrollMenuSelected(int index)
802{ 817{
803// QString temp; 818 qDebug( "scrollbar menu %d",index);
804// qDebug( temp.sprintf("scrollbar menu %d",index));
805 TEWidget* te = getTe(); 819 TEWidget* te = getTe();
806 Config cfg("Konsole"); 820 Config cfg("Konsole");
807 cfg.setGroup("ScrollBar"); 821 cfg.setGroup("ScrollBar");
@@ -818,6 +832,18 @@ void Konsole::scrollMenuSelected(int index)
818 te->setScrollbarLocation(2); 832 te->setScrollbarLocation(2);
819 cfg.writeEntry("Position",2); 833 cfg.writeEntry("Position",2);
820 break; 834 break;
835 case -29: {
836 bool b=cfg.readBoolEntry("HorzScroll",0);
837 cfg.writeEntry("HorzScroll", !b );
838 cfg.write();
839 if(cfg.readNumEntry("Position",2) == 0)
840 te->setScrollbarLocation(1);
841 else
842 te->setScrollbarLocation(0);
843 te->setScrollbarLocation( cfg.readNumEntry("Position",2));
844 te->setWrapAt(120);
845 }
846 break;
821 }; 847 };
822 848
823} 849}