summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-05-18 06:07:52 (UTC)
committer llornkcor <llornkcor>2004-05-18 06:07:52 (UTC)
commit7ef1b7162aa93f7ec8b93db57b9a1cda900c9276 (patch) (unidiff)
tree74e8297889fc6b6e0be13032d7b96814ce184466
parent8fa8520b56173c4b2b48b602a93188d40d375435 (diff)
downloadopie-7ef1b7162aa93f7ec8b93db57b9a1cda900c9276.zip
opie-7ef1b7162aa93f7ec8b93db57b9a1cda900c9276.tar.gz
opie-7ef1b7162aa93f7ec8b93db57b9a1cda900c9276.tar.bz2
use menu icon, and cleanup control file for pics dir, so not to include the CVS dir
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp2
-rw-r--r--core/apps/embeddedkonsole/opie-embeddedkonsole.control2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 80c8223..5cfd644 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -416,385 +416,385 @@ void Konsole::init(const char* _pgm, QStrList & _args)
416 416
417 for(uint j = 0; j < (uint)familyNames.count(); j++) 417 for(uint j = 0; j < (uint)familyNames.count(); j++)
418 { 418 {
419 s = familyNames[j]; 419 s = familyNames[j];
420 if ( s.contains('-') ) 420 if ( s.contains('-') )
421 { 421 {
422 int i = s.find('-'); 422 int i = s.find('-');
423 s = s.right( s.length() - i - 1 ) + " [" + s.left( i ) + "]"; 423 s = s.right( s.length() - i - 1 ) + " [" + s.left( i ) + "]";
424 } 424 }
425 s[0] = s[0].upper(); 425 s[0] = s[0].upper();
426 426
427 QValueList<int> sizes = fontDB.pointSizes( familyNames[j] ); 427 QValueList<int> sizes = fontDB.pointSizes( familyNames[j] );
428 428
429 printf("family[%d] = %s with %d sizes\n", j, familyNames[j].latin1(), 429 printf("family[%d] = %s with %d sizes\n", j, familyNames[j].latin1(),
430 sizes.count()); 430 sizes.count());
431 431
432 if (sizes.count() > 0) 432 if (sizes.count() > 0)
433 { 433 {
434 QPopupMenu *sizeMenu; 434 QPopupMenu *sizeMenu;
435 QFont f; 435 QFont f;
436 int last_width = -1; 436 int last_width = -1;
437 sizeMenu = NULL; 437 sizeMenu = NULL;
438 438
439 for(uint i = 0; i < (uint)sizes.count() + 4; i++) 439 for(uint i = 0; i < (uint)sizes.count() + 4; i++)
440 { 440 {
441 // printf("family %s size %d ", familyNames[j].latin1(), sizes[i]); 441 // printf("family %s size %d ", familyNames[j].latin1(), sizes[i]);
442 // need to divide by 10 on the Z, but not otherwise 442 // need to divide by 10 on the Z, but not otherwise
443 int size; 443 int size;
444 444
445 if (i >= (uint)sizes.count()) 445 if (i >= (uint)sizes.count())
446 { 446 {
447 // try for expandable fonts 447 // try for expandable fonts
448 size = sizes[sizes.count()-1] + 2 * (i - sizes.count() + 1); 448 size = sizes[sizes.count()-1] + 2 * (i - sizes.count() + 1);
449 } 449 }
450 else 450 else
451 { 451 {
452 printf("sizes[%d] = %d\n", i, sizes[i]); 452 printf("sizes[%d] = %d\n", i, sizes[i]);
453 size = sizes[i]; 453 size = sizes[i];
454 } 454 }
455 455
456 f = QFont(familyNames[j], size); 456 f = QFont(familyNames[j], size);
457 f.setFixedPitch(true); 457 f.setFixedPitch(true);
458 QFontMetrics fm(f); 458 QFontMetrics fm(f);
459 // don't trust f.fixedPitch() or f.exactMatch(), they lie!! 459 // don't trust f.fixedPitch() or f.exactMatch(), they lie!!
460 if (fm.width("l") == fm.width("m") 460 if (fm.width("l") == fm.width("m")
461 && (i < (uint)sizes.count() 461 && (i < (uint)sizes.count()
462 || fm.width("m") > last_width)) 462 || fm.width("m") > last_width))
463 { 463 {
464 if (i < (uint)sizes.count()) 464 if (i < (uint)sizes.count())
465 { 465 {
466 last_width = fm.width("m"); 466 last_width = fm.width("m");
467 } 467 }
468 if (sizeMenu == NULL) 468 if (sizeMenu == NULL)
469 { 469 {
470 sizeMenu = new QPopupMenu(); 470 sizeMenu = new QPopupMenu();
471 } 471 }
472 int id = sizeMenu->insertItem(QString("%1").arg(size), fontIndex); 472 int id = sizeMenu->insertItem(QString("%1").arg(size), fontIndex);
473 sizeMenu->setItemParameter(id, fontIndex); 473 sizeMenu->setItemParameter(id, fontIndex);
474 sizeMenu->connectItem(id, this, SLOT(setFont(int))); 474 sizeMenu->connectItem(id, this, SLOT(setFont(int)));
475 QString name = s + " " + QString::number(size); 475 QString name = s + " " + QString::number(size);
476 fonts.append(new VTFont(name, f, familyNames[j], familyNum, size)); 476 fonts.append(new VTFont(name, f, familyNames[j], familyNum, size));
477 if (familyNames[j] == cfgFontName && size == cfgFontSize) 477 if (familyNames[j] == cfgFontName && size == cfgFontSize)
478 { 478 {
479 cfont = fontIndex; 479 cfont = fontIndex;
480 } 480 }
481 printf("FOUND: %s family %s size %d\n", name.latin1(), familyNames[j].latin1(), size); 481 printf("FOUND: %s family %s size %d\n", name.latin1(), familyNames[j].latin1(), size);
482 fontIndex++; 482 fontIndex++;
483 } 483 }
484 } 484 }
485 if (sizeMenu) 485 if (sizeMenu)
486 { 486 {
487 fontList->insertItem(s, sizeMenu, familyNum + 1000); 487 fontList->insertItem(s, sizeMenu, familyNum + 1000);
488 488
489 familyNum++; 489 familyNum++;
490 } 490 }
491 } 491 }
492 492
493 } 493 }
494 494
495 if (cfont < 0 || cfont >= (int)fonts.count()) 495 if (cfont < 0 || cfont >= (int)fonts.count())
496 { 496 {
497 cfont = 0; 497 cfont = 0;
498 } 498 }
499 499
500 // create terminal emulation framework //////////////////////////////////// 500 // create terminal emulation framework ////////////////////////////////////
501 nsessions = 0; 501 nsessions = 0;
502 502
503 tab = new EKNumTabWidget(this); 503 tab = new EKNumTabWidget(this);
504 // tab->setMargin(tab->margin()-5); 504 // tab->setMargin(tab->margin()-5);
505 connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*))); 505 connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*)));
506 506
507 // create terminal toolbar //////////////////////////////////////////////// 507 // create terminal toolbar ////////////////////////////////////////////////
508 setToolBarsMovable( FALSE ); 508 setToolBarsMovable( FALSE );
509 menuToolBar = new QToolBar( this ); 509 menuToolBar = new QToolBar( this );
510 menuToolBar->setHorizontalStretchable( TRUE ); 510 menuToolBar->setHorizontalStretchable( TRUE );
511 511
512 QMenuBar *menuBar = new QMenuBar( menuToolBar ); 512 QMenuBar *menuBar = new QMenuBar( menuToolBar );
513 513
514 setFont(cfont); 514 setFont(cfont);
515 515
516 configMenu = new QPopupMenu( this); 516 configMenu = new QPopupMenu( this);
517 colorMenu = new QPopupMenu( this); 517 colorMenu = new QPopupMenu( this);
518 scrollMenu = new QPopupMenu( this); 518 scrollMenu = new QPopupMenu( this);
519 editCommandListMenu = new QPopupMenu( this); 519 editCommandListMenu = new QPopupMenu( this);
520 520
521 configMenu->insertItem(tr("Command List"), editCommandListMenu); 521 configMenu->insertItem(tr("Command List"), editCommandListMenu);
522 522
523 bool listHidden; 523 bool listHidden;
524 cfg.setGroup("Menubar"); 524 cfg.setGroup("Menubar");
525 if( cfg.readEntry("Hidden","FALSE") == "TRUE") 525 if( cfg.readEntry("Hidden","FALSE") == "TRUE")
526 { 526 {
527 ec_cmdlist = editCommandListMenu->insertItem( tr( "Show command list" )); 527 ec_cmdlist = editCommandListMenu->insertItem( tr( "Show command list" ));
528 listHidden=TRUE; 528 listHidden=TRUE;
529 } 529 }
530 else 530 else
531 { 531 {
532 ec_cmdlist = editCommandListMenu->insertItem( tr( "Hide command list" )); 532 ec_cmdlist = editCommandListMenu->insertItem( tr( "Hide command list" ));
533 listHidden=FALSE; 533 listHidden=FALSE;
534 } 534 }
535 535
536 cfg.setGroup("Tabs"); 536 cfg.setGroup("Tabs");
537 537
538 tabMenu = new QPopupMenu(this); 538 tabMenu = new QPopupMenu(this);
539 tm_bottom = tabMenu->insertItem(tr("Bottom" )); 539 tm_bottom = tabMenu->insertItem(tr("Bottom" ));
540 tm_top = tabMenu->insertItem(tr("Top")); 540 tm_top = tabMenu->insertItem(tr("Top"));
541 tm_hidden = tabMenu->insertItem(tr("Hidden")); 541 tm_hidden = tabMenu->insertItem(tr("Hidden"));
542 542
543 configMenu->insertItem(tr("Tabs"), tabMenu); 543 configMenu->insertItem(tr("Tabs"), tabMenu);
544 544
545 tmp=cfg.readEntry("Position","Top"); 545 tmp=cfg.readEntry("Position","Top");
546 if(tmp=="Top") 546 if(tmp=="Top")
547 { 547 {
548 tab->setTabPosition(QTabWidget::Top); 548 tab->setTabPosition(QTabWidget::Top);
549 tab->getTabBar()->show(); 549 tab->getTabBar()->show();
550 tabPos = tm_top; 550 tabPos = tm_top;
551 } 551 }
552 else if (tmp=="Bottom") 552 else if (tmp=="Bottom")
553 { 553 {
554 tab->setTabPosition(QTabWidget::Bottom); 554 tab->setTabPosition(QTabWidget::Bottom);
555 tab->getTabBar()->show(); 555 tab->getTabBar()->show();
556 tabPos = tm_bottom; 556 tabPos = tm_bottom;
557 } 557 }
558 else 558 else
559 { 559 {
560 tab->getTabBar()->hide(); 560 tab->getTabBar()->hide();
561 tab->setMargin(tab->margin()); 561 tab->setMargin(tab->margin());
562 tabPos = tm_hidden; 562 tabPos = tm_hidden;
563 } 563 }
564 564
565 cm_bw = colorMenu->insertItem(tr( "Black on White")); 565 cm_bw = colorMenu->insertItem(tr( "Black on White"));
566 cm_wb = colorMenu->insertItem(tr( "White on Black")); 566 cm_wb = colorMenu->insertItem(tr( "White on Black"));
567 cm_gb = colorMenu->insertItem(tr( "Green on Black")); 567 cm_gb = colorMenu->insertItem(tr( "Green on Black"));
568 // cm_bt = colorMenu->insertItem(tr( "Black on Transparent")); 568 // cm_bt = colorMenu->insertItem(tr( "Black on Transparent"));
569 cm_br = colorMenu->insertItem(tr( "Black on Pink")); 569 cm_br = colorMenu->insertItem(tr( "Black on Pink"));
570 cm_rb = colorMenu->insertItem(tr( "Pink on Black")); 570 cm_rb = colorMenu->insertItem(tr( "Pink on Black"));
571 cm_gy = colorMenu->insertItem(tr( "Green on Yellow")); 571 cm_gy = colorMenu->insertItem(tr( "Green on Yellow"));
572 cm_bm = colorMenu->insertItem(tr( "Blue on Magenta")); 572 cm_bm = colorMenu->insertItem(tr( "Blue on Magenta"));
573 cm_mb = colorMenu->insertItem(tr( "Magenta on Blue")); 573 cm_mb = colorMenu->insertItem(tr( "Magenta on Blue"));
574 cm_cw = colorMenu->insertItem(tr( "Cyan on White")); 574 cm_cw = colorMenu->insertItem(tr( "Cyan on White"));
575 cm_wc = colorMenu->insertItem(tr( "White on Cyan")); 575 cm_wc = colorMenu->insertItem(tr( "White on Cyan"));
576 cm_bb = colorMenu->insertItem(tr( "Blue on Black")); 576 cm_bb = colorMenu->insertItem(tr( "Blue on Black"));
577 cm_ab = colorMenu->insertItem(tr( "Amber on Black")); 577 cm_ab = colorMenu->insertItem(tr( "Amber on Black"));
578 cm_default = colorMenu->insertItem(tr("default")); 578 cm_default = colorMenu->insertItem(tr("default"));
579 579
580#ifdef QT_QWS_OPIE 580#ifdef QT_QWS_OPIE
581 581
582 colorMenu->insertItem(tr( "Custom")); 582 colorMenu->insertItem(tr( "Custom"));
583#endif 583#endif
584 584
585 configMenu->insertItem(tr( "Colors") ,colorMenu); 585 configMenu->insertItem(tr( "Colors") ,colorMenu);
586 586
587 sessionList = new QPopupMenu(this); 587 sessionList = new QPopupMenu(this);
588 sessionList-> insertItem ( Resource::loadPixmap ( "konsole/Terminal" ), tr( "new session" ), this, 588 sessionList-> insertItem ( Resource::loadPixmap ( "konsole/Terminal" ), tr( "new session" ), this,
589 SLOT(newSession()) ); 589 SLOT(newSession()) );
590 590
591 // connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); 591 // connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
592 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); 592 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
593 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) )); 593 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) ));
594 connect( tabMenu, SIGNAL( activated(int) ), this, SLOT( tabMenuSelected(int) )); 594 connect( tabMenu, SIGNAL( activated(int) ), this, SLOT( tabMenuSelected(int) ));
595 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); 595 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
596 connect( editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int))); 596 connect( editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int)));
597 connect( sessionList, SIGNAL(activated(int)), this, SLOT( sessionListSelected(int) ) ); 597 connect( sessionList, SIGNAL(activated(int)), this, SLOT( sessionListSelected(int) ) );
598 598
599 menuBar->insertItem( tr("View"), configMenu ); 599 menuBar->insertItem( tr("View"), configMenu );
600 menuBar->insertItem( tr("Fonts"), fontList ); 600 menuBar->insertItem( tr("Fonts"), fontList );
601 menuBar->insertItem( tr("Sessions"), sessionList ); 601 menuBar->insertItem( tr("Sessions"), sessionList );
602 602
603 toolBar = new QToolBar( this ); 603 toolBar = new QToolBar( this );
604 604
605 QAction *a; 605 QAction *a;
606 606
607 // Button Commands 607 // Button Commands
608 a = new QAction( tr("New"), Resource::loadPixmap( "konsole/Terminal" ), QString::null, 0, this, 0 ); 608 a = new QAction( tr("New"), Resource::loadPixmap( "konsole/konsole" ), QString::null, 0, this, 0 );
609 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); 609 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) );
610 a->addTo( toolBar ); 610 a->addTo( toolBar );
611 611
612 a = new QAction( tr("Full Screen"), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 ); 612 a = new QAction( tr("Full Screen"), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 );
613 connect( a, SIGNAL( activated() ), this, SLOT( toggleFullScreen() ) ); 613 connect( a, SIGNAL( activated() ), this, SLOT( toggleFullScreen() ) );
614 a->addTo( toolBar ); 614 a->addTo( toolBar );
615 615
616 a = new QAction( tr("Zoom"), Resource::loadPixmap( "zoom" ), QString::null, 0, this, 0 ); 616 a = new QAction( tr("Zoom"), Resource::loadPixmap( "zoom" ), QString::null, 0, this, 0 );
617 connect( a, SIGNAL( activated() ), this, SLOT( cycleZoom() ) ); 617 connect( a, SIGNAL( activated() ), this, SLOT( cycleZoom() ) );
618 a->addTo( toolBar ); 618 a->addTo( toolBar );
619 619
620 620
621 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 ); 621 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 );
622 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolBar ); 622 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolBar );
623 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 ); 623 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 );
624 connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolBar ); 624 connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolBar );
625 a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 ); 625 a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 );
626 connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolBar ); 626 connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolBar );
627 a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 ); 627 a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 );
628 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar ); 628 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar );
629 a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 ); 629 a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 );
630 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar ); 630 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar );
631 631
632 a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 ); 632 a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 );
633 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); 633 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) );
634 a->addTo( toolBar ); 634 a->addTo( toolBar );
635 635
636 secondToolBar = new QToolBar( this ); 636 secondToolBar = new QToolBar( this );
637 secondToolBar->setHorizontalStretchable( TRUE ); 637 secondToolBar->setHorizontalStretchable( TRUE );
638 638
639 commonCombo = new QComboBox( secondToolBar ); 639 commonCombo = new QComboBox( secondToolBar );
640 // commonCombo->setMaximumWidth(236); 640 // commonCombo->setMaximumWidth(236);
641 641
642 ec_quick = editCommandListMenu->insertItem( tr( "Quick Edit" ) ); 642 ec_quick = editCommandListMenu->insertItem( tr( "Quick Edit" ) );
643 if( listHidden) 643 if( listHidden)
644 { 644 {
645 secondToolBar->hide(); 645 secondToolBar->hide();
646 editCommandListMenu->setItemEnabled(ec_quick ,FALSE); 646 editCommandListMenu->setItemEnabled(ec_quick ,FALSE);
647 } 647 }
648 ec_edit = editCommandListMenu->insertItem(tr( "Edit..." ) ); 648 ec_edit = editCommandListMenu->insertItem(tr( "Edit..." ) );
649 649
650 cfg.setGroup("Commands"); 650 cfg.setGroup("Commands");
651 commonCombo->setInsertionPolicy(QComboBox::AtCurrent); 651 commonCombo->setInsertionPolicy(QComboBox::AtCurrent);
652 652
653 initCommandList(); 653 initCommandList();
654 // for (int i = 0; commonCmds[i] != NULL; i++) { 654 // for (int i = 0; commonCmds[i] != NULL; i++) {
655 // commonCombo->insertItem( commonCmds[i], i ); 655 // commonCombo->insertItem( commonCmds[i], i );
656 // tmp = cfg.readEntry( QString::number(i),""); 656 // tmp = cfg.readEntry( QString::number(i),"");
657 // if(tmp != "") 657 // if(tmp != "")
658 // commonCombo->changeItem( tmp,i ); 658 // commonCombo->changeItem( tmp,i );
659 // } 659 // }
660 660
661 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); 661 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) ));
662 662
663 sm_none = scrollMenu->insertItem(tr( "None" )); 663 sm_none = scrollMenu->insertItem(tr( "None" ));
664 sm_left = scrollMenu->insertItem(tr( "Left" )); 664 sm_left = scrollMenu->insertItem(tr( "Left" ));
665 sm_right = scrollMenu->insertItem(tr( "Right" )); 665 sm_right = scrollMenu->insertItem(tr( "Right" ));
666 // scrollMenu->insertSeparator(4); 666 // scrollMenu->insertSeparator(4);
667 // scrollMenu->insertItem(tr( "Horizontal" )); 667 // scrollMenu->insertItem(tr( "Horizontal" ));
668 668
669 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); 669 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu);
670 670
671 configMenu->insertItem(tr( "History..." ), this, SLOT(historyDialog())); 671 configMenu->insertItem(tr( "History..." ), this, SLOT(historyDialog()));
672 672
673 cm_wrap = configMenu->insertItem(tr( "Wrap" )); 673 cm_wrap = configMenu->insertItem(tr( "Wrap" ));
674 cfg.setGroup("ScrollBar"); 674 cfg.setGroup("ScrollBar");
675 configMenu->setItemChecked(cm_wrap, cfg.readBoolEntry("HorzScroll",0)); 675 configMenu->setItemChecked(cm_wrap, cfg.readBoolEntry("HorzScroll",0));
676 676
677 cm_beep = configMenu->insertItem(tr( "Use Beep" )); 677 cm_beep = configMenu->insertItem(tr( "Use Beep" ));
678 cfg.setGroup("Menubar"); 678 cfg.setGroup("Menubar");
679 configMenu->setItemChecked(cm_beep, cfg.readBoolEntry("useBeep",0)); 679 configMenu->setItemChecked(cm_beep, cfg.readBoolEntry("useBeep",0));
680 680
681 fullscreen_msg = new QLabel(this); 681 fullscreen_msg = new QLabel(this);
682 fullscreen_msg-> setAlignment ( AlignCenter | SingleLine ); 682 fullscreen_msg-> setAlignment ( AlignCenter | SingleLine );
683 fullscreen_msg-> hide(); 683 fullscreen_msg-> hide();
684 fullscreen_msg-> setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding )); 684 fullscreen_msg-> setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ));
685 fullscreen_msg-> setAutoResize(true); 685 fullscreen_msg-> setAutoResize(true);
686 fullscreen_msg-> setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 686 fullscreen_msg-> setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
687 fullscreen_msg-> setText(tr("To exit fullscreen, tap here.")); 687 fullscreen_msg-> setText(tr("To exit fullscreen, tap here."));
688 688
689 fullscreen_timer = new QTimer(this); 689 fullscreen_timer = new QTimer(this);
690 connect(fullscreen_timer, SIGNAL(timeout()), 690 connect(fullscreen_timer, SIGNAL(timeout()),
691 this, SLOT(fullscreenTimeout())); 691 this, SLOT(fullscreenTimeout()));
692 show_fullscreen_msg = true; 692 show_fullscreen_msg = true;
693 693
694 //scrollMenuSelected(-29); 694 //scrollMenuSelected(-29);
695 // cfg.setGroup("ScrollBar"); 695 // cfg.setGroup("ScrollBar");
696 // if(cfg.readBoolEntry("HorzScroll",0)) { 696 // if(cfg.readBoolEntry("HorzScroll",0)) {
697 // if(cfg.readNumEntry("Position",2) == 0) 697 // if(cfg.readNumEntry("Position",2) == 0)
698 // te->setScrollbarLocation(1); 698 // te->setScrollbarLocation(1);
699 // else 699 // else
700 // te->setScrollbarLocation(0); 700 // te->setScrollbarLocation(0);
701 // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); 701 // te->setScrollbarLocation( cfg.readNumEntry("Position",2));
702 // te->setWrapAt(120); 702 // te->setWrapAt(120);
703 // } 703 // }
704 // create applications ///////////////////////////////////////////////////// 704 // create applications /////////////////////////////////////////////////////
705 setCentralWidget(tab); 705 setCentralWidget(tab);
706 706
707 // load keymaps //////////////////////////////////////////////////////////// 707 // load keymaps ////////////////////////////////////////////////////////////
708 KeyTrans::loadAll(); 708 KeyTrans::loadAll();
709 for (int i = 0; i < KeyTrans::count(); i++) 709 for (int i = 0; i < KeyTrans::count(); i++)
710 { 710 {
711 KeyTrans* s = KeyTrans::find(i); 711 KeyTrans* s = KeyTrans::find(i);
712 assert( s ); 712 assert( s );
713 } 713 }
714 714
715 se_pgm = _pgm; 715 se_pgm = _pgm;
716 se_args = _args; 716 se_args = _args;
717 717
718 cfg.setGroup("CommandLine"); 718 cfg.setGroup("CommandLine");
719 719
720 if (cfg.hasKey("shell_args")) 720 if (cfg.hasKey("shell_args"))
721 { 721 {
722 QStringList se_args_list = cfg.readListEntry("shell_args",'|'); 722 QStringList se_args_list = cfg.readListEntry("shell_args",'|');
723 for(uint i = 0; i < se_args_list.count(); i++) 723 for(uint i = 0; i < se_args_list.count(); i++)
724 { 724 {
725 se_args.prepend(se_args_list[se_args_list.count() - i - 1].latin1()); 725 se_args.prepend(se_args_list[se_args_list.count() - i - 1].latin1());
726 } 726 }
727 } 727 }
728 else 728 else
729 { 729 {
730 se_args.prepend("--login"); 730 se_args.prepend("--login");
731 } 731 }
732 732
733 se_pgm = cfg.readEntry("shell_bin", QString(se_pgm)); 733 se_pgm = cfg.readEntry("shell_bin", QString(se_pgm));
734 734
735 // this is the "documentation" for those who know to look 735 // this is the "documentation" for those who know to look
736 if (! cfg.hasKey("shell_args")) 736 if (! cfg.hasKey("shell_args"))
737 { 737 {
738 cfg.writeEntry("shell_args",QStringList::fromStrList(se_args),'|'); 738 cfg.writeEntry("shell_args",QStringList::fromStrList(se_args),'|');
739 } 739 }
740 if (! cfg.hasKey("shell_bin")) 740 if (! cfg.hasKey("shell_bin"))
741 { 741 {
742 cfg.writeEntry("shell_bin",QString(se_pgm)); 742 cfg.writeEntry("shell_bin",QString(se_pgm));
743 } 743 }
744 744
745 parseCommandLine(); 745 parseCommandLine();
746 746
747 // read and apply default values /////////////////////////////////////////// 747 // read and apply default values ///////////////////////////////////////////
748 resize(321, 321); // Dummy. 748 resize(321, 321); // Dummy.
749 QSize currentSize = size(); 749 QSize currentSize = size();
750 if (currentSize != size()) 750 if (currentSize != size())
751 defaultSize = size(); 751 defaultSize = size();
752 752
753 753
754 /* allows us to catch cancel/escape */ 754 /* allows us to catch cancel/escape */
755 reparent ( 0, WStyle_Customize | WStyle_NoBorder, 755 reparent ( 0, WStyle_Customize | WStyle_NoBorder,
756 QPoint ( 0, 0 )); 756 QPoint ( 0, 0 ));
757} 757}
758 758
759void Konsole::show() 759void Konsole::show()
760{ 760{
761 if ( !nsessions ) 761 if ( !nsessions )
762 { 762 {
763 newSession(); 763 newSession();
764 } 764 }
765 QMainWindow::show(); 765 QMainWindow::show();
766 766
767} 767}
768 768
769void Konsole::initSession(const char*, QStrList &) 769void Konsole::initSession(const char*, QStrList &)
770{ 770{
771 QMainWindow::show(); 771 QMainWindow::show();
772} 772}
773 773
774Konsole::~Konsole() 774Konsole::~Konsole()
775{ 775{
776 while (nsessions > 0) 776 while (nsessions > 0)
777 { 777 {
778 doneSession(getTe(), 0); 778 doneSession(getTe(), 0);
779 } 779 }
780} 780}
781 781
782void 782void
783Konsole::historyDialog() 783Konsole::historyDialog()
784{ 784{
785 QDialog *d = new QDialog ( this, "histdlg", true ); 785 QDialog *d = new QDialog ( this, "histdlg", true );
786 // d-> setCaption ( tr( "History" )); 786 // d-> setCaption ( tr( "History" ));
787 787
788 QBoxLayout *lay = new QVBoxLayout ( d, 4, 4 ); 788 QBoxLayout *lay = new QVBoxLayout ( d, 4, 4 );
789 789
790 QLabel *l = new QLabel ( tr( "History Lines:" ), d ); 790 QLabel *l = new QLabel ( tr( "History Lines:" ), d );
791 lay-> addWidget ( l ); 791 lay-> addWidget ( l );
792 792
793 Config cfg( "Konsole" ); 793 Config cfg( "Konsole" );
794 cfg.setGroup("History"); 794 cfg.setGroup("History");
795 int hist = cfg.readNumEntry("history_lines",300); 795 int hist = cfg.readNumEntry("history_lines",300);
796 int avg_line = cfg.readNumEntry("avg_line_length",60); 796 int avg_line = cfg.readNumEntry("avg_line_length",60);
797 797
798 QSpinBox *spin = new QSpinBox ( 1, 100000, 20, d ); 798 QSpinBox *spin = new QSpinBox ( 1, 100000, 20, d );
799 spin-> setValue ( hist ); 799 spin-> setValue ( hist );
800 spin-> setWrapping ( true ); 800 spin-> setWrapping ( true );
diff --git a/core/apps/embeddedkonsole/opie-embeddedkonsole.control b/core/apps/embeddedkonsole/opie-embeddedkonsole.control
index a338e19..8456ff7 100644
--- a/core/apps/embeddedkonsole/opie-embeddedkonsole.control
+++ b/core/apps/embeddedkonsole/opie-embeddedkonsole.control
@@ -1,10 +1,10 @@
1Package: opie-embeddedkonsole 1Package: opie-embeddedkonsole
2Files: plugins/application/libembeddedkonsole.so* bin/embeddedkonsole apps/Applications/embeddedkonsole.desktop pics/konsole 2Files: plugins/application/libembeddedkonsole.so* bin/embeddedkonsole apps/Applications/embeddedkonsole.desktop pics/konsole/Terminal.png pics/konsole/down.png pics/konsole/enter.png pics/konsole/konsole.png pics/konsole/space.png pics/konsole/tab.png pics/konsole/up.png
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: L.J. Potter <lpotter@trolltech.com> 5Maintainer: L.J. Potter <lpotter@trolltech.com>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal, libopiecore2, libqtaux2, opie-keytabs 7Depends: task-opie-minimal, libopiecore2, libqtaux2, opie-keytabs
8Description: KDE's konsole (shell terminal) 8Description: KDE's konsole (shell terminal)
9 Ported to the Opie environment. 9 Ported to the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION 10Version: $QPE_VERSION$EXTRAVERSION