Changeset 29 in tspsg-svn for trunk/src/main.cpp


Ignore:
Timestamp:
Jun 24, 2009, 6:54:10 PM (16 years ago)
Author:
laleppa
Message:

+ Selected application language is now saved and restored.
+ Added language selection entries to main menu.
+ On-the-fly language switching.
+ Loading corresponding Qt library language, if exists.

  • File/New? sets all table cells to zeros.
  • Translation updates to reflect recent changes.
  • Renamed language files from language names to language codes.
  • Renamed some slot to have unified signal/slot naming.
  • Printer settings are now persistant until application close.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main.cpp

    r27 r29  
    3333        app.setOrganizationDomain("www.leppsville.com");
    3434        app.setApplicationName("TSPSG");
    35 // i18n
    36 // TODO: Language selection in application.
    37 // TODO: Saving and restoring selected language.
    38 QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
    39 QString locale = QLocale::languageToString(QLocale::system().language());
    40 QTranslator translator;
    41         // Getting current locale language name and trying to load it, if it's not English
    42         if (locale.compare("English") && translator.load(locale,"i18n"))
    43                 app.installTranslator(&translator);
     35        QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
    4436MainWindow mainwindow;
    4537        mainwindow.show();
Note: See TracChangeset for help on using the changeset viewer.