summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 275a9a8..eda3135 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -291,32 +291,33 @@ void Konsole::init(const char* _pgm, QStrList & _args)
291 colorMenu->insertItem(tr( "Green on Yellow")); 291 colorMenu->insertItem(tr( "Green on Yellow"));
292 colorMenu->insertItem(tr( "Blue on Magenta")); 292 colorMenu->insertItem(tr( "Blue on Magenta"));
293 colorMenu->insertItem(tr( "Magenta on Blue")); 293 colorMenu->insertItem(tr( "Magenta on Blue"));
294 colorMenu->insertItem(tr( "Cyan on White")); 294 colorMenu->insertItem(tr( "Cyan on White"));
295 colorMenu->insertItem(tr( "White on Cyan")); 295 colorMenu->insertItem(tr( "White on Cyan"));
296 colorMenu->insertItem(tr( "Blue on Black")); 296 colorMenu->insertItem(tr( "Blue on Black"));
297 colorMenu->insertItem(tr( "Amber on Black")); 297 colorMenu->insertItem(tr( "Amber on Black"));
298 298
299#ifdef QT_QWS_OPIE 299#ifdef QT_QWS_OPIE
300 colorMenu->insertItem(tr( "Custom")); 300 colorMenu->insertItem(tr( "Custom"));
301#endif 301#endif
302 302
303 configMenu->insertItem( tr("Font"), fontList );
303 configMenu->insertItem(tr( "Colors") ,colorMenu); 304 configMenu->insertItem(tr( "Colors") ,colorMenu);
304 305
305 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); 306 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
306 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); 307 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
307 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) )); 308 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) ));
308 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); 309 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
309 connect(editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int))); 310 connect(editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int)));
310 menuBar->insertItem( tr("Font"), fontList ); 311
311 menuBar->insertItem( tr("Options"), configMenu ); 312 menuBar->insertItem( tr("Options"), configMenu );
312 313
313 QPEToolBar *toolbar = new QPEToolBar( this ); 314 QPEToolBar *toolbar = new QPEToolBar( this );
314 315
315 QAction *a; 316 QAction *a;
316 317
317 // Button Commands 318 // Button Commands
318 a = new QAction( tr("New"), Resource::loadPixmap( "konsole" ), QString::null, 0, this, 0 ); 319 a = new QAction( tr("New"), Resource::loadPixmap( "konsole" ), QString::null, 0, this, 0 );
319 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); a->addTo( toolbar ); 320 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); a->addTo( toolbar );
320 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 ); 321 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 );
321 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolbar ); 322 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolbar );
322 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 ); 323 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 );
@@ -657,27 +658,28 @@ void Konsole::switchSession(QWidget* w) {
657 } 658 }
658 } 659 }
659} 660}
660 661
661void Konsole::colorMenuIsSelected(int iD) { 662void Konsole::colorMenuIsSelected(int iD) {
662 fromMenu = TRUE; 663 fromMenu = TRUE;
663 colorMenuSelected(iD); 664 colorMenuSelected(iD);
664} 665}
665 666
666/// ------------------------------- some new stuff by L.J. Potter 667/// ------------------------------- some new stuff by L.J. Potter
667void Konsole::colorMenuSelected(int iD) 668void Konsole::colorMenuSelected(int iD)
668{ // this is NOT pretty, elegant or anything else besides functional 669{ // this is NOT pretty, elegant or anything else besides functional
669// QString temp; 670// QString temp;
670// qDebug( temp.sprintf("colormenu %d", iD)); 671// qDebug( temp.sprintf("colormenu %d", iD));
671 TEWidget* te = getTe(); 672
673 TEWidget* te = getTe();
672 Config cfg("Konsole"); 674 Config cfg("Konsole");
673 cfg.setGroup("Colors"); 675 cfg.setGroup("Colors");
674// QColor foreground; 676// QColor foreground;
675// QColor background; 677// QColor background;
676 colorMenu->setItemChecked(lastSelectedMenu,FALSE); 678 colorMenu->setItemChecked(lastSelectedMenu,FALSE);
677 ColorEntry m_table[TABLE_COLORS]; 679 ColorEntry m_table[TABLE_COLORS];
678 const ColorEntry * defaultCt=te->getdefaultColorTable(); 680 const ColorEntry * defaultCt=te->getdefaultColorTable();
679 /////////// fore back 681 /////////// fore back
680 int i; 682 int i;
681 if(iD==-9) { // default default 683 if(iD==-9) { // default default
682 for (i = 0; i < TABLE_COLORS; i++) { 684 for (i = 0; i < TABLE_COLORS; i++) {
683 m_table[i].color = defaultCt[i].color; 685 m_table[i].color = defaultCt[i].color;
@@ -790,27 +792,28 @@ void Konsole::colorMenuSelected(int iD)
790 else 792 else
791 m_table[i].color = defaultCt[i].color; 793 m_table[i].color = defaultCt[i].color;
792 } 794 }
793 } 795 }
794 lastSelectedMenu = iD; 796 lastSelectedMenu = iD;
795 te->setColorTable(m_table); 797 te->setColorTable(m_table);
796 update(); 798 update();
797 799
798} 800}
799 801
800void Konsole::configMenuSelected(int iD) 802void Konsole::configMenuSelected(int iD)
801{ 803{
802// QString temp; 804// QString temp;
803// qDebug( temp.sprintf("configmenu %d",iD)); 805// qDebug( temp.sprintf("configmenu %d",iD));
804 TEWidget* te = getTe(); 806
807 TEWidget* te = getTe();
805 Config cfg("Konsole"); 808 Config cfg("Konsole");
806 cfg.setGroup("Menubar"); 809 cfg.setGroup("Menubar");
807 int i,j; 810 int i,j;
808#ifdef QT_QWS_OPIE 811#ifdef QT_QWS_OPIE
809 i=-29;j=-30; 812 i=-29;j=-30;
810#else 813#else
811 i=-28;j=-29; 814 i=-28;j=-29;
812#endif 815#endif
813 816
814 if(iD == -4) { 817 if(iD == -4) {
815 cfg.setGroup("Tabs"); 818 cfg.setGroup("Tabs");
816 QString tmp=cfg.readEntry("Position","Bottom"); 819 QString tmp=cfg.readEntry("Position","Bottom");
@@ -862,25 +865,26 @@ void Konsole::changeCommand(const QString &text, int c)
862} 865}
863 866
864void Konsole::setColor() 867void Konsole::setColor()
865{ 868{
866 Config cfg("Konsole"); 869 Config cfg("Konsole");
867 cfg.setGroup("Colors"); 870 cfg.setGroup("Colors");
868 int scheme = cfg.readNumEntry("Schema",1); 871 int scheme = cfg.readNumEntry("Schema",1);
869 if(scheme != 1) colorMenuSelected( -scheme); 872 if(scheme != 1) colorMenuSelected( -scheme);
870} 873}
871 874
872void Konsole::scrollMenuSelected(int index) 875void Konsole::scrollMenuSelected(int index)
873{ 876{
874 qDebug( "scrollbar menu %d",index); 877// qDebug( "scrollbar menu %d",index);
878
875 TEWidget* te = getTe(); 879 TEWidget* te = getTe();
876 Config cfg("Konsole"); 880 Config cfg("Konsole");
877 cfg.setGroup("ScrollBar"); 881 cfg.setGroup("ScrollBar");
878 int i,j,k; 882 int i,j,k;
879#ifdef QT_QWS_OPIE 883#ifdef QT_QWS_OPIE
880i=-25;j=-26;k=-27; 884i=-25;j=-26;k=-27;
881#else 885#else
882i=-24;j=-25;k=-26; 886i=-24;j=-25;k=-26;
883#endif 887#endif
884 if(index == i) { 888 if(index == i) {
885 889
886 te->setScrollbarLocation(0); 890 te->setScrollbarLocation(0);