summaryrefslogtreecommitdiff
authorsandman <sandman>2002-06-24 22:38:00 (UTC)
committer sandman <sandman>2002-06-24 22:38:00 (UTC)
commit1a3970869e87b41d475368e089a656de96a27561 (patch) (unidiff)
tree8e247a5ea8092e7d3abfda0a4d42b5e24653f9f0
parentb5e6ed78ad6075550985b092211318da47904897 (diff)
downloadopie-1a3970869e87b41d475368e089a656de96a27561.zip
opie-1a3970869e87b41d475368e089a656de96a27561.tar.gz
opie-1a3970869e87b41d475368e089a656de96a27561.tar.bz2
Default font should be helvetica (compatiblity and looks nicer IMHO)
Do not hard-code the encoding, let FontDatabase pick it, when not explicitly specified
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 1534b0b..87a9739 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -560,100 +560,100 @@ QPEApplication::QPEApplication( int& argc, char **argv, Type t )
560 d->preloaded = TRUE; 560 d->preloaded = TRUE;
561 argc-=1; 561 argc-=1;
562 } else if ( qstrcmp(argv[a],"-preload-show")==0 ) { 562 } else if ( qstrcmp(argv[a],"-preload-show")==0 ) {
563 argv[a] = argv[a+1]; 563 argv[a] = argv[a+1];
564 a++; 564 a++;
565 d->preloaded = TRUE; 565 d->preloaded = TRUE;
566 d->forceshow = TRUE; 566 d->forceshow = TRUE;
567 argc-=1; 567 argc-=1;
568 } 568 }
569 } 569 }
570 570
571 /* overide stored arguments */ 571 /* overide stored arguments */
572 setArgs(argc, argv); 572 setArgs(argc, argv);
573 573
574#endif 574#endif
575 575
576 qwsSetDecoration( new QPEDecoration() ); 576 qwsSetDecoration( new QPEDecoration() );
577 577
578#ifndef QT_NO_TRANSLATION 578#ifndef QT_NO_TRANSLATION
579 QStringList langs = Global::languageList(); 579 QStringList langs = Global::languageList();
580 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { 580 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
581 QString lang = *it; 581 QString lang = *it;
582 582
583 QTranslator * trans; 583 QTranslator * trans;
584 QString tfn; 584 QString tfn;
585 585
586 trans = new QTranslator(this); 586 trans = new QTranslator(this);
587 tfn = qpeDir()+"/i18n/"+lang+"/libqpe.qm"; 587 tfn = qpeDir()+"/i18n/"+lang+"/libqpe.qm";
588 if ( trans->load( tfn )) 588 if ( trans->load( tfn ))
589 installTranslator( trans ); 589 installTranslator( trans );
590 else 590 else
591 delete trans; 591 delete trans;
592 592
593 trans = new QTranslator(this); 593 trans = new QTranslator(this);
594 tfn = qpeDir()+"/i18n/"+lang+"/"+d->appName+".qm"; 594 tfn = qpeDir()+"/i18n/"+lang+"/"+d->appName+".qm";
595 if ( trans->load( tfn )) 595 if ( trans->load( tfn ))
596 installTranslator( trans ); 596 installTranslator( trans );
597 else 597 else
598 delete trans; 598 delete trans;
599 599
600 //###language/font hack; should look it up somewhere 600 //###language/font hack; should look it up somewhere
601 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { 601 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) {
602 QFont fn = FontManager::unicodeFont( FontManager::Proportional ); 602 QFont fn = FontManager::unicodeFont( FontManager::Proportional );
603 setFont( fn ); 603 setFont( fn );
604 } 604 }
605 else { 605 else {
606 Config config( "qpe" ); 606 Config config( "qpe" );
607 config.setGroup( "Appearance" ); 607 config.setGroup( "Appearance" );
608 QString familyStr = config.readEntry( "FontFamily", "fixed" ); 608 QString familyStr = config.readEntry( "FontFamily", "helvetica" );
609 QString styleStr = config.readEntry( "FontStyle", "Regular" ); 609 QString styleStr = config.readEntry( "FontStyle", "Regular" );
610 QString sizeStr = config.readEntry( "FontSize", "10" ); 610 QString sizeStr = config.readEntry( "FontSize", "10" );
611 QString charSetStr = config.readEntry( "FontCharSet", "iso10646-1" ); 611 QString charSetStr = config.readEntry( "FontCharSet", QString::null );
612 bool ok; 612 bool ok;
613 int i_size = sizeStr.toInt( &ok, 10 ); 613 int i_size = sizeStr.toInt( &ok, 10 );
614 FontDatabase fdb; 614 FontDatabase fdb;
615 QFont selectedFont = fdb.font( familyStr, styleStr, i_size, charSetStr ); 615 QFont selectedFont = fdb.font( familyStr, styleStr, i_size, charSetStr );
616 setFont( selectedFont ); 616 setFont( selectedFont );
617 } 617 }
618 } 618 }
619 619
620#endif 620#endif
621 621
622 applyStyle(); 622 applyStyle();
623 623
624 if ( type() == GuiServer ) { 624 if ( type() == GuiServer ) {
625 setScreenSaverInterval(-1); 625 setScreenSaverInterval(-1);
626 setVolume(); 626 setVolume();
627 QWSServer::setScreenSaver(new QPEScreenSaver); 627 QWSServer::setScreenSaver(new QPEScreenSaver);
628 } 628 }
629 629
630 installEventFilter( this ); 630 installEventFilter( this );
631 631
632 QPEMenuToolFocusManager::initialize(); 632 QPEMenuToolFocusManager::initialize();
633 633
634#ifdef QT_NO_QWS_CURSOR 634#ifdef QT_NO_QWS_CURSOR
635 // if we have no cursor, probably don't want tooltips 635 // if we have no cursor, probably don't want tooltips
636 QToolTip::setEnabled( FALSE ); 636 QToolTip::setEnabled( FALSE );
637#endif 637#endif
638} 638}
639 639
640static QPtrDict<void>* inputMethodDict=0; 640static QPtrDict<void>* inputMethodDict=0;
641static void createInputMethodDict() 641static void createInputMethodDict()
642{ 642{
643 if ( !inputMethodDict ) 643 if ( !inputMethodDict )
644 inputMethodDict = new QPtrDict<void>; 644 inputMethodDict = new QPtrDict<void>;
645} 645}
646 646
647/*! 647/*!
648 Returns the currently set hint to the system as to whether 648 Returns the currently set hint to the system as to whether
649 \a w has any use for text input methods. 649 \a w has any use for text input methods.
650 650
651 \sa setInputMethodHint() 651 \sa setInputMethodHint()
652*/ 652*/
653QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget* w ) 653QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget* w )
654{ 654{
655 if ( inputMethodDict && w ) 655 if ( inputMethodDict && w )
656 return (InputMethodHint)(int)inputMethodDict->find(w); 656 return (InputMethodHint)(int)inputMethodDict->find(w);
657 return Normal; 657 return Normal;
658} 658}
659 659