summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/konsole.cpp
Unidiff
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index d54fa1f..e2d4886 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -224,7 +224,8 @@ void Konsole::init(const char* _pgm, QStrList & _args)
224 224
225 configMenu = new QPopupMenu( this); 225 configMenu = new QPopupMenu( this);
226 colorMenu = new QPopupMenu( this); 226 colorMenu = new QPopupMenu( this);
227 227 scrollMenu = new QPopupMenu( this);
228
228 bool listHidden; 229 bool listHidden;
229 cfg.setGroup("Menubar"); 230 cfg.setGroup("Menubar");
230 if( cfg.readEntry("Hidden","FALSE") == "TRUE") { 231 if( cfg.readEntry("Hidden","FALSE") == "TRUE") {
@@ -263,6 +264,7 @@ void Konsole::init(const char* _pgm, QStrList & _args)
263 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); 264 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
264 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); 265 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
265 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) )); 266 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuSelected(int) ));
267 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
266 268
267 menuBar->insertItem( tr("Font"), fontList ); 269 menuBar->insertItem( tr("Font"), fontList );
268 menuBar->insertItem( tr("Options"), configMenu ); 270 menuBar->insertItem( tr("Options"), configMenu );
@@ -316,6 +318,11 @@ void Konsole::init(const char* _pgm, QStrList & _args)
316 318
317 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); 319 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) ));
318 320
321 scrollMenu->insertItem("None");
322 scrollMenu->insertItem("Left");
323 scrollMenu->insertItem("Right");
324 configMenu->insertItem("ScrollBar",scrollMenu);
325
319 // create applications ///////////////////////////////////////////////////// 326 // create applications /////////////////////////////////////////////////////
320 setCentralWidget(tab); 327 setCentralWidget(tab);
321 328
@@ -763,3 +770,25 @@ void Konsole::setColor()
763 if(scheme != 1) colorMenuSelected( -scheme); 770 if(scheme != 1) colorMenuSelected( -scheme);
764 771
765} 772}
773
774void Konsole::scrollMenuSelected(int index)
775{
776 TEWidget* te = getTe();
777Config cfg("Konsole");
778 cfg.setGroup("Scrollbar");
779 switch( index){
780 case -21:
781 te->setScrollbarLocation(0);
782 cfg.writeEntry("Position",0);
783 break;
784 case -22:
785 te->setScrollbarLocation(1);
786 cfg.writeEntry("Position",1);
787 break;
788 case -23:
789 te->setScrollbarLocation(2);
790 cfg.writeEntry("Position",2);
791 break;
792 };
793
794}