summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index f3792e4..a8ddc99 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -243,33 +243,33 @@ void Konsole::init(const char* _pgm, QStrList & _args)
243 menuToolBar->setHorizontalStretchable( TRUE ); 243 menuToolBar->setHorizontalStretchable( TRUE );
244 244
245 QPEMenuBar *menuBar = new QPEMenuBar( menuToolBar ); 245 QPEMenuBar *menuBar = new QPEMenuBar( menuToolBar );
246 246
247 fontList = new QPopupMenu( this ); 247 fontList = new QPopupMenu( this );
248 for(uint i = 0; i < fonts.count(); i++) { 248 for(uint i = 0; i < fonts.count(); i++) {
249 VTFont *fnt = fonts.at(i); 249 VTFont *fnt = fonts.at(i);
250 fontList->insertItem(fnt->getName(), i); 250 fontList->insertItem(fnt->getName(), i);
251 } 251 }
252 fontChanged(cfont); 252 fontChanged(cfont);
253 253
254 configMenu = new QPopupMenu( this); 254 configMenu = new QPopupMenu( this);
255 colorMenu = new QPopupMenu( this); 255 colorMenu = new QPopupMenu( this);
256 scrollMenu = new QPopupMenu( this); 256 scrollMenu = new QPopupMenu( this);
257 editCommandListMenu = new QPopupMenu( this); 257 editCommandListMenu = new QPopupMenu( this);
258 258
259 configMenu->insertItem("Command List",editCommandListMenu); 259 configMenu->insertItem(tr("Command List"), editCommandListMenu);
260 260
261 bool listHidden; 261 bool listHidden;
262 cfg.setGroup("Menubar"); 262 cfg.setGroup("Menubar");
263 if( cfg.readEntry("Hidden","FALSE") == "TRUE") { 263 if( cfg.readEntry("Hidden","FALSE") == "TRUE") {
264 editCommandListMenu->insertItem( tr( "Show command list" )); 264 editCommandListMenu->insertItem( tr( "Show command list" ));
265 listHidden=TRUE; 265 listHidden=TRUE;
266 } else { 266 } else {
267 editCommandListMenu->insertItem( tr( "Hide command list" )); 267 editCommandListMenu->insertItem( tr( "Hide command list" ));
268 listHidden=FALSE; 268 listHidden=FALSE;
269 } 269 }
270 270
271 cfg.setGroup("Tabs"); 271 cfg.setGroup("Tabs");
272 tmp=cfg.readEntry("Position","Bottom"); 272 tmp=cfg.readEntry("Position","Bottom");
273 if(tmp=="Top") { 273 if(tmp=="Top") {
274 tab->setTabPosition(QTabWidget::Top); 274 tab->setTabPosition(QTabWidget::Top);
275 configMenu->insertItem( tr( "Tabs on Bottom" ) ); 275 configMenu->insertItem( tr( "Tabs on Bottom" ) );
@@ -608,33 +608,33 @@ TEWidget* Konsole::getTe() {
608void Konsole::switchSession(QWidget* w) { 608void Konsole::switchSession(QWidget* w) {
609 TEWidget* te = (TEWidget *) w; 609 TEWidget* te = (TEWidget *) w;
610 610
611 QFont teFnt = te->getVTFont(); 611 QFont teFnt = te->getVTFont();
612 for(uint i = 0; i < fonts.count(); i++) { 612 for(uint i = 0; i < fonts.count(); i++) {
613 VTFont *fnt = fonts.at(i); 613 VTFont *fnt = fonts.at(i);
614 bool cf = fnt->getFont() == teFnt; 614 bool cf = fnt->getFont() == teFnt;
615 fontList->setItemChecked(i, cf); 615 fontList->setItemChecked(i, cf);
616 if (cf) { 616 if (cf) {
617 cfont = i; 617 cfont = i;
618 } 618 }
619 } 619 }
620} 620}
621 621
622void Konsole::colorMenuIsSelected(int iD) { 622void Konsole::colorMenuIsSelected(int iD) {
623 fromMenu = TRUE; 623 fromMenu = TRUE;
624 colorMenuSelected(iD); 624 colorMenuSelected(iD);
625} 625}
626 626
627/// ------------------------------- some new stuff by L.J. Potter 627/// ------------------------------- some new stuff by L.J. Potter
628void Konsole::colorMenuSelected(int iD) 628void Konsole::colorMenuSelected(int iD)
629{ // this is NOT pretty, elegant or anything else besides functional 629{ // this is NOT pretty, elegant or anything else besides functional
630// QString temp; 630// QString temp;
631// qDebug( temp.sprintf("colormenu %d", iD)); 631// qDebug( temp.sprintf("colormenu %d", iD));
632 TEWidget* te = getTe(); 632 TEWidget* te = getTe();
633 Config cfg("Konsole"); 633 Config cfg("Konsole");
634 cfg.setGroup("Colors"); 634 cfg.setGroup("Colors");
635// QColor foreground; 635// QColor foreground;
636// QColor background; 636// QColor background;
637 colorMenu->setItemChecked(lastSelectedMenu,FALSE); 637 colorMenu->setItemChecked(lastSelectedMenu,FALSE);
638 ColorEntry m_table[TABLE_COLORS]; 638 ColorEntry m_table[TABLE_COLORS];
639 const ColorEntry * defaultCt=te->getdefaultColorTable(); 639 const ColorEntry * defaultCt=te->getdefaultColorTable();
640 /////////// fore back 640 /////////// fore back
@@ -740,33 +740,33 @@ void Konsole::colorMenuSelected(int iD)
740 } 740 }
741 741
742 for (i = 0; i < TABLE_COLORS; i++) { 742 for (i = 0; i < TABLE_COLORS; i++) {
743 if(i==0 || i == 10) { 743 if(i==0 || i == 10) {
744 m_table[i].color = foreground; 744 m_table[i].color = foreground;
745 } 745 }
746 else if(i==1 || i == 11) { 746 else if(i==1 || i == 11) {
747 m_table[i].color = background; m_table[i].transparent=0; 747 m_table[i].color = background; m_table[i].transparent=0;
748 } 748 }
749 else 749 else
750 m_table[i].color = defaultCt[i].color; 750 m_table[i].color = defaultCt[i].color;
751 } 751 }
752 } 752 }
753 lastSelectedMenu = iD; 753 lastSelectedMenu = iD;
754 te->setColorTable(m_table); 754 te->setColorTable(m_table);
755 update(); 755 update();
756 756
757} 757}
758 758
759void Konsole::configMenuSelected(int iD) 759void Konsole::configMenuSelected(int iD)
760{ 760{
761// QString temp; 761// QString temp;
762// qDebug( temp.sprintf("configmenu %d",iD)); 762// qDebug( temp.sprintf("configmenu %d",iD));
763 TEWidget* te = getTe(); 763 TEWidget* te = getTe();
764 Config cfg("Konsole"); 764 Config cfg("Konsole");
765 cfg.setGroup("Menubar"); 765 cfg.setGroup("Menubar");
766 if( iD == -4) { 766 if( iD == -4) {
767 cfg.setGroup("Tabs"); 767 cfg.setGroup("Tabs");
768 QString tmp=cfg.readEntry("Position","Bottom"); 768 QString tmp=cfg.readEntry("Position","Bottom");
769 769
770 if(tmp=="Top") { 770 if(tmp=="Top") {
771 tab->setTabPosition(QTabWidget::Bottom); 771 tab->setTabPosition(QTabWidget::Bottom);
772 configMenu->changeItem( iD,"Tabs on Top"); 772 configMenu->changeItem( iD,"Tabs on Top");
@@ -916,32 +916,32 @@ void Konsole::parseCommandLine() {
916void Konsole::changeForegroundColor(const QColor &color) { 916void Konsole::changeForegroundColor(const QColor &color) {
917 Config cfg("Konsole"); 917 Config cfg("Konsole");
918 cfg.setGroup("Colors"); 918 cfg.setGroup("Colors");
919 int r, g, b; 919 int r, g, b;
920 color.rgb(&r,&g,&b); 920 color.rgb(&r,&g,&b);
921 foreground.setRgb(r,g,b); 921 foreground.setRgb(r,g,b);
922// QString colors; 922// QString colors;
923// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue); 923// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue);
924 cfg.writeEntry("foreground",color.name()); 924 cfg.writeEntry("foreground",color.name());
925 cfg.write(); 925 cfg.write();
926 926
927qDebug("do other dialog"); 927qDebug("do other dialog");
928 ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color"); 928 ColorPopupMenu* penColorPopupMenu2 = new ColorPopupMenu(Qt::black, this,"background color");
929 connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, 929 connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this,
930 SLOT(changeBackgroundColor(const QColor&))); 930 SLOT(changeBackgroundColor(const QColor&)));
931 penColorPopupMenu2->exec(); 931 penColorPopupMenu2->exec();
932 932
933} 933}
934 934
935void Konsole::changeBackgroundColor(const QColor &color) { 935void Konsole::changeBackgroundColor(const QColor &color) {
936 936
937 qDebug("Change background"); 937 qDebug("Change background");
938 Config cfg("Konsole"); 938 Config cfg("Konsole");
939 cfg.setGroup("Colors"); 939 cfg.setGroup("Colors");
940 int r, g, b; 940 int r, g, b;
941 color.rgb(&r,&g,&b); 941 color.rgb(&r,&g,&b);
942 background.setRgb(r,g,b); 942 background.setRgb(r,g,b);
943// QString colors; 943// QString colors;
944// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue); 944// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue);
945 cfg.writeEntry("background",color.name()); 945 cfg.writeEntry("background",color.name());
946 cfg.write(); 946 cfg.write();
947} 947}