~thomas-moenicke/ubuntu-keyboard/ubuntu-keyboard-language-menu-2

« back to all changes in this revision

Viewing changes to src/plugin/inputmethod_p.h

  • Committer: Thomas Moenicke
  • Date: 2013-10-24 12:55:54 UTC
  • Revision ID: thomas.moenicke@canonical.com-20131024125554-kkjolk5a7vn0h527
fixed reading locale
reading locale at show() to detect changes in system

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    bool autocapsEnabled;
92
92
    bool predictionEnabled;
93
93
    Maliit::TextContentType contentType;
94
 
    QString activeLayoutId;
95
94
    QString activeLanguage;
96
95
    Qt::ScreenOrientation appsCurrentOrientation;
97
96
 
114
113
        , autocapsEnabled(false)
115
114
        , predictionEnabled(false)
116
115
        , contentType(Maliit::FreeTextContentType)
117
 
        , activeLayoutId("en_us")
118
116
        , appsCurrentOrientation(qGuiApp->primaryScreen()->orientation())
119
117
        , m_settings()
120
118
    {
351
349
    void registerActiveLanguage()
352
350
    {
353
351
        activeLanguage = QString(getenv("LANGUAGE"));
 
352
        activeLanguage.truncate(2);
354
353
 
355
354
        Q_EMIT q->activeLanguageChanged(activeLanguage);
356
355
    }