OSDN Git Service

Version 0.5 master
authorTakumi ASAKI <takumi.asaki@gmail.com>
Tue, 10 Apr 2012 17:31:18 +0000 (02:31 +0900)
committerTakumi ASAKI <takumi.asaki@nokia.com>
Thu, 19 Apr 2012 07:39:32 +0000 (16:39 +0900)
* Add changing config order.
* Add editing System font.
* Add backup/restore configuration.
* Improvement UI & performance

41 files changed:
applicationcontroller.cpp
applicationcontroller.h
fontconfigdefs.h
fontconfigmanager.cpp
fontconfigmanager.h
fontinfo.cpp
fontinfo.h
fontsconf.cpp
fontsconf.h
fontsconfeditorcontroller.cpp
fontsconfeditorcontroller.h
fontsconfelement.cpp
fontsconfelement.h
fontsconfigproperties.cpp
fontsconfigproperties.h
installedfontinfo.cpp
installedfontinfo.h
main.cpp
qml/fontmanager/BottomButtons.qml
qml/fontmanager/ConfigValueComboBox.qml
qml/fontmanager/EditFontsConfPage.qml
qml/fontmanager/EditorHelper.js
qml/fontmanager/EditorListDelegate.qml
qml/fontmanager/FileSelectionPage.qml
qml/fontmanager/FontInstallPage.qml
qml/fontmanager/FontSelectionPage.qml
qml/fontmanager/FontsConfEditor.qml
qml/fontmanager/FontsConfProperties.qml
qml/fontmanager/FontsConfViewPage.qml
qml/fontmanager/HelpDialog.js
qml/fontmanager/HelpDialog.qml
qml/fontmanager/InstalledFontInfoPage.qml
qml/fontmanager/MainPage.qml
qml/fontmanager/PageHeader.qml
qml/fontmanager/RestoreFontsConfPage.qml
qml/fontmanager/SelectInstallFamilyDialog.qml
qml/fontmanager/functions.js
qml/fontmanager/main.qml
qtc_packaging/debian_harmattan/changelog
translations/fontmanager_ja.ts
translations/fontmanager_untranslated.ts

index 71499ba..2a5d132 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
 
 #include <QtCore>
 
+#define VERSION_STRING "0.5"
+
 ApplicationController::ApplicationController(QObject *parent) :
     QObject(parent), mFontDirExists(false), mShowSystemFont(false),
     mUpdating(0),
-    mForceOverwrite(false), mWorking(false), mIgnoreUpdate(false),
+    mWorking(false), mIgnoreUpdate(false),
     mFontConfig(0)
 {
 
@@ -96,7 +98,7 @@ void ApplicationController::init()
 
 QString ApplicationController::version() const
 {
-    return QLatin1String("0.4.95(0.5RC)");
+    return QLatin1String(VERSION_STRING);
 }
 
 QString ApplicationController::currentLanguage() const
@@ -230,11 +232,23 @@ QString ApplicationController::defaultBackupFilename() const
 QString ApplicationController::url2path(const QUrl &url) const
 {
     QString path = url.toLocalFile();
-    if (path.startsWith(QDir::homePath()))
-        path.replace(0, QDir::homePath().length(), QLatin1String("~"));
     return path;
 }
 
+QString ApplicationController::path4display(const QString &path) const
+{
+    QString str(path);
+    if (str.startsWith(QDir::homePath()))
+        str.replace(0, QDir::homePath().length(), QLatin1String("~"));
+//    str.replace(QLatin1Char('/'), "/<wbr>");
+    return str;
+}
+
+QStringList ApplicationController::installedFonts() const
+{
+    return mInstalledFonts;
+}
+
 void ApplicationController::updateAllEditorController()
 {
     if (!mFontConfig->fontsConfModified() || mIgnoreUpdate) {
@@ -307,9 +321,8 @@ void ApplicationController::resetLocalFontsConf()
 void ApplicationController::importSystemSettings(const QString &family)
 {
     mFontConfig->importSystemSettings(family);
-    if (mFontConfig->fontsConfModified()) {
+    if (mFontConfig->fontsConfModified())
         updateEditorController(family);
-    }
 }
 
 void ApplicationController::createRecommendedSettings()
@@ -329,6 +342,11 @@ void ApplicationController::restoreConfig(const QString &filename)
     emit restoreConfigFinished(filename);
 }
 
+void ApplicationController::restoreConfig(const QUrl &filename)
+{
+    restoreConfig(filename.toLocalFile());
+}
+
 void ApplicationController::createFontDir()
 {
     QDir fontDir(mFontDirPath);
@@ -351,6 +369,11 @@ void ApplicationController::installFont(FontInfo *fontinfo)
         mFontConfig->appendFontProperty(prop);
     }
 
+    if (!mInstalledFonts.contains(dstfont.absoluteFilePath())) {
+        mInstalledFonts.append(dstfont.absoluteFilePath());
+        emit installedFontsChanged();
+    }
+
     emit installFinished(srcfont.fileName());
 
     mWorking = true;
@@ -367,6 +390,12 @@ void ApplicationController::updateFontsConf(InstalledFontInfo *fontInfo)
 void ApplicationController::uninstallFont(const QString &fontpath)
 {
     bool check = QFile::remove(fontpath);
+
+    if (mInstalledFonts.contains(fontpath)) {
+        mInstalledFonts.removeOne(fontpath);
+        emit installedFontsChanged();
+    }
+
     if (check) {
         emit uninstallFinished(fontpath);
 
@@ -404,12 +433,13 @@ void ApplicationController::syncInstallableFamilyFor(const QString &family)
 
 void ApplicationController::saveFontsConf()
 {
-    if (!mFontConfig->fontsConfModified())
+    if (!mFontConfig->fontsConfModified()) {
+        emit localFontsConfFileUpdated();
         return;
+    }
 
     mFontConfig->saveFontsConf();
-    mForceOverwrite = false;
-    emit localFontsConfPathChanged();
+    emit localFontsConfFileUpdated();
 }
 
 void ApplicationController::appendFamilyToConfig(const QString &family, const QString &value, const QString &priority)
index e858eef..f81ff5a 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -59,14 +59,16 @@ class ApplicationController : public QObject
 
     Q_PROPERTY(QString localFontsConfPath READ localFontsConfPath NOTIFY localFontsConfPathChanged)
     Q_PROPERTY(bool localFontsConfExists READ localFontsConfExists NOTIFY localFontsConfExistsChanged)
-    Q_PROPERTY(bool isEmptyFontsConf READ isEmptyFontsConf NOTIFY localFontsConfChanged)
-    Q_PROPERTY(QString localFontsConf READ localFontsConf NOTIFY localFontsConfChanged)
+    Q_PROPERTY(bool isEmptyFontsConf READ isEmptyFontsConf NOTIFY localFontsConfFileUpdated)
+    Q_PROPERTY(QString localFontsConf READ localFontsConf NOTIFY localFontsConfFileUpdated)
 
     Q_PROPERTY(bool showSystemFont READ showSystemFont WRITE setShowSystemFont NOTIFY showSystemFontChanged)
 
     Q_PROPERTY(bool working READ working NOTIFY workingChanged)
 
     Q_PROPERTY(QUrl backupDir READ backupDir NOTIFY backupDirChanged)
+
+    Q_PROPERTY(QStringList installedFonts READ installedFonts NOTIFY installedFontsChanged)
 public:
     explicit ApplicationController(QObject *parent = 0);
     
@@ -101,6 +103,9 @@ public:
     Q_INVOKABLE QString defaultBackupFilename() const;
 
     Q_INVOKABLE QString url2path(const QUrl &url) const;
+    Q_INVOKABLE QString path4display(const QString &path) const;
+
+    QStringList installedFonts() const;
 
 public slots:
     void updateAllEditorController();
@@ -125,6 +130,7 @@ public slots:
 
     void backupConfig(const QString &filename);
     void restoreConfig(const QString &filename);
+    void restoreConfig(const QUrl &filename);
 
 signals:
     void alertDialog(const QString &message);
@@ -133,6 +139,7 @@ signals:
     void fontDirExistsChanged();
 
     void showSystemFontChanged();
+    void installedFontsChanged();
 
     void installFinished(const QString &fontpath);
     void uninstallFinished(const QString &fontpath);
@@ -148,6 +155,7 @@ signals:
     void localFontsConfPathChanged();
     void localFontsConfExistsChanged();
     void localFontsConfChanged();
+    void localFontsConfFileUpdated();
 
     void workingChanged();
 
@@ -181,9 +189,9 @@ private:
     QString mFontDirPath;
     bool mFontDirExists;
     bool mShowSystemFont;
+    QStringList mInstalledFonts;
 
     int mUpdating;
-    bool mForceOverwrite;
     bool mWorking;
     bool mIgnoreUpdate;
 
index 59c6626..aa1b692 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 9d98f7f..dce59b3 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
 #include <QVariant>
 #include <QFontInfo>
 #include <QFontMetrics>
+#include <QFontDatabase>
 #include <QUrl>
+#include <QTextStream>
 
+#undef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
 #include <QDebug>
+#endif
 
 #define FCBIN_PATH "/usr/bin/"
 #define FCCACHE_COMMAND "fc-cache"
 #define FCLIST_COMMAND "fc-list"
 #define FCLIST_OPTION "-v"
 
-//static QStringList configKeys;
-
 FontConfigManager::FontConfigManager(QObject *parent) :
     QObject(parent), mLang("en"), mLocalFontsConf(0)
 {
     connect(this, SIGNAL(localFontsConfPathChanged()), SIGNAL(localFontsConfExistsChanged()));
-//    connect(this, SIGNAL(localFontsConfPathChanged()), SIGNAL(fontsConfUpdated()));
+    //    connect(this, SIGNAL(localFontsConfPathChanged()), SIGNAL(fontsConfUpdated()));
 
     mLocalFontsConf = new FontsConf(this);
     mSystemLocalConf = new FontsConf(this);
@@ -401,7 +405,7 @@ void FontConfigManager::createRecommendedSettings()
     emit startUpdateFontsConfig();
     resetFontsConf();
 
-#if 0
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
     QStringList f;
     foreach (InstalledFontInfo *info, monospaceFonts)
         f << info->localefamily();
@@ -431,59 +435,52 @@ void FontConfigManager::createRecommendedSettings()
     if (monospaceFonts.count())
         foreach (InstalledFontInfo *info, monospaceFonts) {
             addPreferFamily(MONOSPACE_DEF, info->enfamily());
-            addPreferFamily(MONOSPACE_DEF, info->localefamily());
         }
     else if (monospaceSansSerifFonts.count())
         foreach (InstalledFontInfo *info, monospaceSansSerifFonts) {
             addPreferFamily(MONOSPACE_DEF, info->enfamily());
-            addPreferFamily(MONOSPACE_DEF, info->localefamily());
         }
     else if (monospaceSerifFonts.count())
         foreach (InstalledFontInfo *info, monospaceSerifFonts) {
             addPreferFamily(MONOSPACE_DEF, info->enfamily());
-            addPreferFamily(MONOSPACE_DEF, info->localefamily());
         }
 
     if (sansSerifFonts.count())
         foreach (InstalledFontInfo *info, sansSerifFonts) {
             addPreferFamily(SANSSERIF_DEF, info->enfamily());
-            addPreferFamily(SANSSERIF_DEF, info->localefamily());
+            addPreferFamily(SYSTEM_DEF, info->enfamily());
         }
     else if (monospaceSansSerifFonts.count())
         foreach (InstalledFontInfo *info, monospaceSansSerifFonts) {
             addPreferFamily(SANSSERIF_DEF, info->enfamily());
-            addPreferFamily(SANSSERIF_DEF, info->localefamily());
+            addPreferFamily(SYSTEM_DEF, info->enfamily());
         }
     else if (unknownFonts.count())
         foreach (InstalledFontInfo *info, unknownFonts) {
             addPreferFamily(SANSSERIF_DEF, info->enfamily());
-            addPreferFamily(SANSSERIF_DEF, info->localefamily());
+            addPreferFamily(SYSTEM_DEF, info->enfamily());
         }
     else if (monospaceFonts.count())
         foreach (InstalledFontInfo *info, monospaceFonts) {
             addPreferFamily(SANSSERIF_DEF, info->enfamily());
-            addPreferFamily(SANSSERIF_DEF, info->localefamily());
+            addPreferFamily(SYSTEM_DEF, info->enfamily());
         }
 
     if (serifFonts.count())
         foreach (InstalledFontInfo *info, serifFonts) {
             addPreferFamily(SERIF_DEF, info->enfamily());
-            addPreferFamily(SERIF_DEF, info->localefamily());
         }
     else if (monospaceSerifFonts.count())
         foreach (InstalledFontInfo *info, monospaceSerifFonts) {
             addPreferFamily(SANSSERIF_DEF, info->enfamily());
-            addPreferFamily(SANSSERIF_DEF, info->localefamily());
         }
     else if (unknownFonts.count())
         foreach (InstalledFontInfo *info, unknownFonts) {
             addPreferFamily(SERIF_DEF, info->enfamily());
-            addPreferFamily(SERIF_DEF, info->localefamily());
         }
     else if (monospaceFonts.count())
         foreach (InstalledFontInfo *info, monospaceFonts) {
             addPreferFamily(SERIF_DEF, info->enfamily());
-            addPreferFamily(SERIF_DEF, info->localefamily());
         }
 
     foreach (const QString &f, FontsConf::genericFamilies())
@@ -552,18 +549,56 @@ bool FontConfigManager::maybeSerifFont(InstalledFontInfo *info) const
     return false;
 }
 
+#define DEFAULT_POINTSIZE 24
+
 bool FontConfigManager::maybeMonospaceFont(InstalledFontInfo *info) const
 {
-    QFont font(info->enfamily());
+    int fontId = -1;
+    QFont font = font4info(info, DEFAULT_POINTSIZE);
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+    qDebug() << "0 - FontConfigManager::maybeMonospaceFont(" << info->enfamily() << info->enstyle() << point << ")" << font.family() << font.exactMatch();
+#endif
+    if (!font.exactMatch() || font.family() != info->enfamily()) {
+        fontId = QFontDatabase::addApplicationFont(info->file());
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+        qDebug() << "\tfontId:" << fontId << info->file();
+#endif
+        if (fontId >= 0) {
+            font = font4info(info, DEFAULT_POINTSIZE);
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+            qDebug() << "1 - FontConfigManager::maybeMonospaceFont(" << info->enfamily() << info->enstyle() << point << ")" << font.family() << font.exactMatch();
+#endif
+            if (!font.exactMatch() || font.family() != info->enfamily()) {
+                font = QFont(info->enfamily());
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+                qDebug() << "2 - FontConfigManager::maybeMonospaceFont(" << info->enfamily() << info->enstyle() << point << ")" << font.family() << font.exactMatch();
+#endif
+            }
+        }
+    }
+    bool isFixed = false;
     if (font.exactMatch()) {
         QFontInfo fi(font);
-        if (fi.fixedPitch())
-            return true;
-        QFontMetrics fm(font);
-        int w = fm.width(QLatin1Char('A'));
-        if (fm.width(QLatin1Char('i')) == w && fm.width(QLatin1Char('X')) == w)
-            return true;
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+        qDebug() << "\tfixedPitch:" << fi.fixedPitch();
+#endif
+        if (fi.fixedPitch()) {
+            isFixed = true;
+        } else {
+            QFontMetrics fm(font);
+            int w = fm.width(QLatin1Char('A'));
+#ifdef FONTMANAGER_DEBUG_RECOMMENDED_SETTINGS
+            qDebug() << "\twidth:" << w << fm.width(QLatin1Char('i')) << fm.width(QLatin1Char('X'));
+#endif
+            if (fm.width(QLatin1Char('i')) == w && fm.width(QLatin1Char('X')) == w) {
+                isFixed = true;
+            }
+        }
     }
+    if (fontId >= 0)
+        QFontDatabase::removeApplicationFont(fontId);
+    if (isFixed)
+        return true;
     foreach (const QString &f, info->family()) {
         if (f.contains("courier", Qt::CaseInsensitive) ||
                 f.contains("mono", Qt::CaseInsensitive))
@@ -572,6 +607,19 @@ bool FontConfigManager::maybeMonospaceFont(InstalledFontInfo *info) const
     return false;
 }
 
+QFont FontConfigManager::font4info(InstalledFontInfo *info, int pointSize) const
+{
+    QFontDatabase fdb;
+    int point = pointSize;
+    if (!fdb.isScalable(info->enfamily(), info->enstyle())) {
+        QList<int> points = fdb.pointSizes(info->enfamily(), info->enstyle());
+        if (points.count() > 0)
+            point = points.first();
+    }
+    QFont font = fdb.font(info->enfamily(), info->enstyle(), point);
+    return font;
+}
+
 void FontConfigManager::runFcCache()
 {
     QProcess *proc = new QProcess(this);
@@ -597,7 +645,7 @@ void FontConfigManager::readFcList()
     QByteArray buf = proc->readAllStandardOutput();
     QByteArray errbuf = proc->readAllStandardError();
     if (!errbuf.isEmpty())
-        qWarning() << errbuf;
+        qWarning("%s", errbuf.constData());
     Q_ASSERT(errbuf.isEmpty());
 
     static QByteArray emptyLine("\n");
@@ -652,9 +700,8 @@ void FontConfigManager::saveFontsConf()
         }
     } else {
         mLocalFontsConf->save(mLocalFontsConfPath);
-        if (!check) {
+        if (!check)
             emit localFontsConfExistsChanged();
-        }
     }
 }
 
@@ -665,9 +712,8 @@ void FontConfigManager::backupFontsConf(const QString &filepath)
     mLocalFontsConf->save(filepath);
 }
 
-void FontConfigManager::restoreFontsConf(const QUrl &fileUrl)
+void FontConfigManager::restoreFontsConf(const QString &filepath)
 {
-    QString filepath = fileUrl.toLocalFile();
     if (filepath.isEmpty() || !QFile::exists(filepath))
         return;
     FontsConf *restoredConf = new FontsConf(this);
index 809f492..98a439e 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -43,6 +43,7 @@
 #include <QList>
 #include <QStringList>
 #include <QMap>
+#include <QFont>
 
 #include "fontsconfigproperties.h"
 
@@ -120,6 +121,7 @@ private:
     bool maybeSansSerifFont(InstalledFontInfo *info) const;
     bool maybeSerifFont(InstalledFontInfo *info) const;
     bool maybeMonospaceFont(InstalledFontInfo *info) const;
+    QFont font4info(InstalledFontInfo *info, int pointSize) const;
 
 signals:
     void fcCacheFinished();
@@ -140,7 +142,7 @@ public slots:
     void readFontsConf();
     void saveFontsConf();
     void backupFontsConf(const QString &filepath);
-    void restoreFontsConf(const QUrl &fileUrl);
+    void restoreFontsConf(const QString &filepath);
 
     void resetFontsConf();
 
index b62cb17..694c6c5 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 42053fb..1ad4335 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index fcf2935..13acafa 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 9da9eba..46edabf 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 32f1ebc..328cdac 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index f859031..d89b056 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 66f7575..0f8fc8c 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 42d4919..a37689d 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index f72a4b6..00584ee 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 8ff641d..0f9ca1d 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index e83eec5..d7618c0 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 5d05f89..1646c1e 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 60d3dd6..50ab518 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 4ebd733..b8ee9fb 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import 'UIConstants.js' as UI
index 6a997fb..5e5962a 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 5d11699..ceefbd5 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -52,20 +52,23 @@ Page {
     property bool showHelp: false
     property string helpMessage: qsTr(
                                      "<p>Select font family and edit priorities.</p>" +
-                                     "<p><img src=\"image://theme/icon-m-toolbar-add\">: Add fonts to the selected <i>Priority</i> in config file.</p>" +
-                                     "<p><img src=\"image://theme/icon-m-toolbar-delete\">: Remove fonts from the selected <i>Priority</i> in config file.  <i>Note: The fonts are NOT uninstalled</i>.</p>" +
+                                     "<p><img src=\"image://theme/icon-m-toolbar-add\">: Add fonts to the target <i>Priority</i> in config file.</p>" +
                                      "<hr/>" +
-                                     "<p><b>Priorities</b>:<p>" +
+                                     "<p><img src=\"image://theme/icon-m-toolbar-up\">: Move up selected font.</p>" +
+                                     "<p><img src=\"image://theme/icon-m-toolbar-delete\">: Remove selected font from the its <i>Priority</i> in config file.  <i>Note: The fonts are NOT uninstalled</i>.</p>" +
+                                     "<p><img src=\"image://theme/icon-m-toolbar-down\">: Move down selected font.</p>" +
+                                     "<hr/>" +
+                                     "<h2>Priorities</h2><p>" +
                                      "&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority.  ('prepend' fonts in fontconfig)<br/>" +
-                                     "&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default.  ('prefer' fonts in fontconfig)<br/>" +
+                                     "&nbsp;&nbsp;<b>Normal</b>: These fonts are usally used as default.  System settings may be given priority than these.  ('prefer' fonts in fontconfig)<br/>" +
                                      "&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority.  ('accept' fonts in fontconfig)<br/>" +
+                                     "<ul><li>Please check <a href=\"http://www.freedesktop.org/software/fontconfig/fontconfig-user.html\">fontconfig</a> for more details.</li></ul>" +
                                      "<hr/>" +
                                      "<p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p>" +
                                      "<hr/>" +
+                                     "<h2>Menu(<img src=\"image://theme/icon-m-toolbar-view-menu\">)</h2>" +
                                      "<p><b>Remove current font config</b>(Menu): Remove current user's font config file.</p>" +
-                                     "<p><b>View current font config</b>(Menu): View current user's font config file.</p>" +
-                                     "<hr/>" +
-                                     "Please check <a href=\"http://www.freedesktop.org/software/fontconfig/fontconfig-user.html\">fontconfig</a> for more details."
+                                     "<p><b>View current font config</b>(Menu): View current user's font config file.</p>"
                                      )
 
     property Item selectionDialog: null
index fe01921..12644f8 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 5913a46..5ab982d 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import com.nokia.extras 1.0
@@ -26,6 +64,8 @@ Item {
         anchors.fill: parent
         anchors.leftMargin: -UI.MARGIN_XLARGE
         anchors.rightMargin: -UI.MARGIN_XLARGE
+        anchors.topMargin: 1
+        anchors.bottomMargin: 1
         color: UI.COLOR_SELECT
         visible: listItem.isHeader
     }
index 21e15e7..752b226 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index c4e7497..2366732 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 7f2b3bc..0ee2b3d 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 924c8ed..c3109f5 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 1648325..e5c2032 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -45,7 +45,8 @@ Item {
     property variant fontconf
     property bool modified: (sansSerifCheck.checked !== fontconf.prefer("sans-serif")) ||
                             (serifCheck.checked !== fontconf.prefer("serif")) ||
-                            (monospaceCheck.checked !== fontconf.prefer("monospace"))
+                            (monospaceCheck.checked !== fontconf.prefer("monospace")) ||
+                            (systemCheck.checked !== fontconf.prefer("Nokia Pure Text"))
 //                            ||
 //                            (embeddedBitmapCombo.selectedIndex !== fontconf.embeddedBitmap) ||
 //                            (hintingCombo.selectedIndex !== fontconf.hinting)
@@ -63,6 +64,7 @@ Item {
         sansSerifCheck.checked = fontconf.prefer("sans-serif")
         serifCheck.checked = fontconf.prefer("serif")
         monospaceCheck.checked = fontconf.prefer("monospace")
+        systemCheck.checked = fontconf.prefer("Nokia Pure Text")
 //        embeddedBitmapCombo.selectedIndex = fontconf.embeddedBitmap
 //        hintingCombo.selectedIndex = fontconf.hinting
     }
@@ -85,6 +87,10 @@ Item {
             fontconf.addPreferFamily("monospace")
         else
             fontconf.removePreferFamily("monospace")
+        if (systemCheck.checked)
+            fontconf.addPreferFamily("Nokia Pure Text")
+        else
+            fontconf.removePreferFamily("Nokia Pure Text")
 //        fontconf.embeddedBitmap = embeddedBitmapCombo.selectedIndex
 //        fontconf.hinting = hintingCombo.selectedIndex
     }
@@ -107,6 +113,11 @@ Item {
             width: parent.width
             text: qsTr("Use as Prefer Font for Monospace")
         }
+        CheckBox {
+            id: systemCheck
+            width: parent.width
+            text: qsTr("Use as Prefer Font for System")
+        }
 //        ConfigValueComboBox {
 //            id: embeddedBitmapCombo
 //            width: parent.width
index e78e6df..1aafd54 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index c57e6ee..d39bd33 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index a5d4ef5..2331eee 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 import QtQuick 1.1
 import com.nokia.meego 1.0
@@ -13,7 +51,7 @@ Item {
     Rectangle {
         id: textRect
         anchors.fill: parent
-        anchors.margins: UI.DEFAULT_MARGIN
+        anchors.margins: UI.DEFAULT_MARGIN / 2
         color: "white"
 
         Text {
@@ -21,7 +59,7 @@ Item {
             anchors.top: parent.top
             anchors.left: parent.left
             anchors.right: parent.right
-            anchors.bottomMargin: UI.DEFAULT_MARGIN
+            anchors.topMargin: UI.DEFAULT_MARGIN / 2
             text: helpDialog.titleText
             font.pixelSize: UI.FONT_XLARGE
             font.bold: true
@@ -31,11 +69,13 @@ Item {
         Rectangle {
             id: border
             anchors.top: helpTitle.bottom
-            anchors.bottom: okButton.top
+            anchors.bottom: closeButton.top
             anchors.left: parent.left
             anchors.right: parent.right
-            anchors.rightMargin: 1
-            anchors.bottomMargin: UI.DEFAULT_MARGIN
+            anchors.leftMargin: UI.DEFAULT_MARGIN / 2
+            anchors.rightMargin: UI.DEFAULT_MARGIN / 2
+            anchors.bottomMargin: UI.DEFAULT_MARGIN / 2
+            radius: 3
             clip: true
 
             border.width: 1
@@ -67,11 +107,11 @@ Item {
         }
 
         Button {
-            id: okButton
+            id: closeButton
             text: qsTr("Close")
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.bottom: parent.bottom
-            anchors.margins: UI.DEFAULT_MARGIN
+            anchors.bottomMargin: UI.DEFAULT_MARGIN / 2
             onClicked: {
                 helpDialog.visible = false
                 helpDialog.clicked()
index c72fc9b..9817ae8 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index c5a76ad..f678f1c 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -52,10 +52,15 @@ Page {
     property bool showHelp: false
     property string helpMessage: qsTr(
                                      "<h1>How to use</h1>" +
+                                     "<hr/>" +
+                                     "<h2>Toolbar</h2>" +
                                      "<p><img src=\"image://theme/icon-m-toolbar-add\">: Install font.  Please copy font file(s) to this device in advance.  Currently *.ttf and *.ttc are supported.</p>" +
-                                     "<p><img src=\"image://theme/icon-m-toolbar-settings\">: Configure fonts(expert).  You can assign/unassign any fonts to Serif/Sans Serif/Monospace.</p>" +
+                                     "<p><img src=\"image://theme/icon-m-toolbar-settings\">: Configure fonts(expert).  You can assign/unassign any fonts to Serif/Sans Serif/Monospace/System.</p>" +
                                      "<hr/>" +
-                                     "<p><b>Create Recommended Settings</b>(Menu): Create recommended settings.  <i>Normal</i> priority is given to user installed font(s).  System fonts have <i>Higher</i> priority.  System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p>"
+                                     "<h2>Menu(<img src=\"image://theme/icon-m-toolbar-view-menu\">)</h2>" +
+                                     "<p><b>Create Recommended Settings</b>: Create recommended settings.  <i>Normal</i> priority is given to user installed font(s).  System fonts have <i>Higher</i> priority.  System CJK fonts conflicts your installed fonts have <i>Lower</i> priority.</p>" +
+                                     "<p><b>Backup Config</b>: Save current fonts config into ~/MyDocs/Documents</p>" +
+                                     "<p><b>Restore Config</b>: Restore fonts config from backuped file</p>"
                                      )
 
     Connections {
@@ -89,12 +94,12 @@ Page {
         anchors.right: parent.right
         anchors.margins: UI.DEFAULT_MARGIN / 2
         clip: true
-        enabled: !disableTools
-        opacity: enabled ? 1.0 : 0.5
 
         ListView {
-            id: listView
+            id: installedFontListView
             anchors.fill: parent
+            enabled: !disableTools
+            opacity: enabled ? 1.0 : 0.5
 
             model: installedFontList
 
@@ -111,25 +116,28 @@ Page {
 
         }
 
+        Flickable {
+            id: helpView
+            visible: false
+            anchors.fill: parent
+            contentHeight: helpText.paintedHeight
+            Text {
+                id: helpText
+                wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+                width: parent.width
+                text: helpMessage
+                font.pixelSize: UI.FONT_DEFAULT
+                color: "black"
+                horizontalAlignment: Text.AlignLeft
+            }
+        }
+
         ScrollDecorator {
-            flickableItem: listView
+            id: scrollDecorator
+            flickableItem: installedFontListView
         }
 
-    }
 
-    Column {
-        id: warningText
-        width: contents.width - UI.DEFAULT_MARGIN * 2
-        anchors.centerIn: contents
-        visible: false
-        Text {
-            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
-            width: parent.width
-            text: helpMessage
-            font.pixelSize: UI.FONT_DEFAULT
-            color: "black"
-            horizontalAlignment: Text.AlignLeft
-        }
     }
 
     BusyIndicator {
@@ -186,6 +194,9 @@ Page {
                 onClicked: {
                     if (mainMenu.status !== DialogStatus.Closed)
                         mainMenu.close()
+//                    if (controller.installedFonts.length > 0) {
+//                        console.log("Installed Fonts:" + controller.installedFonts)
+//                    }
                     if (controller.localFontsConfExists)
                         openCreateConfirmDialog()
                     else
@@ -261,16 +272,24 @@ Page {
     states: [
         State {
             name: "nofonts"
-            when: (listView.count == 0) && !controller.working && !showHelp
+            when: (installedFontListView.count == 0) && !controller.working && !showHelp
             PropertyChanges {
                 target: createRecommendedSettingsItem
                 enabled: false
             }
+//            PropertyChanges {
+//                target: installedFontListView
+//                visible: false
+//            }
             PropertyChanges {
-                target: warningText
+                target: helpView
                 visible: true
             }
             PropertyChanges {
+                target: scrollDecorator
+                flickableItem: helpView
+            }
+            PropertyChanges {
                 target: pageHeader
                 text: qsTr("No Fonts Installed")
             }
index 8ee92bc..b1b7820 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import com.nokia.extras 1.0
index 364547d..a33b952 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -61,7 +61,7 @@ FileSelectionPage {
     function openRestoreConfirmDialog()
     {
         queryDialog.titleText = qsTr("Restore it?")
-        queryDialog.message = qsTr("Existing Fonts Config will be replaced by '%1'.  Are you sure?").arg(controller.url2path(restoreFilePath))
+        queryDialog.message = qsTr("Existing Fonts Config will be replaced by '%1'.  Are you sure?").arg(controller.path4display(controller.url2path(restoreFilePath)))
         queryDialog.acceptButtonText = qsTr("OK")
         queryDialog.rejectButtonText = qsTr("Cancel")
         queryDialog.accepted.connect(restoreFontsConf)
index 448c366..f5cd00b 100644 (file)
@@ -1,3 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Takumi Asaki
+** All rights reserved.
+** Contact: Takumi Asaki (takumi.asaki@gmail.com)
+**
+** This file is part of the fontmanager application.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import 'UIConstants.js' as UI
index 9571282..d88630b 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
index 6929f1a..9f6b050 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Takumi Asaki
+** Copyright (C) 2012 Takumi Asaki
 ** All rights reserved.
 ** Contact: Takumi Asaki (takumi.asaki@gmail.com)
 **
@@ -155,7 +155,7 @@ PageStackWindow {
             return
         }
         queryDialog.titleText = qsTr("Backup finished")
-        queryDialog.message = qsTr("Fonts Config is backuped as '%1' successfully.").arg(filePath)
+        queryDialog.message = qsTr("Fonts Config is backuped as '%1' successfully.").arg(controller.path4display(filePath))
         openFinishedDialog()
     }
 
@@ -167,7 +167,7 @@ PageStackWindow {
             return
         }
         queryDialog.titleText = qsTr("Restore finished")
-        queryDialog.message = qsTr("Fonts Config is restored from '%1' successfully.").arg(filePath)
+        queryDialog.message = qsTr("Fonts Config is restored from '%1' successfully.").arg(controller.path4display(filePath))
         openFinishedDialog()
     }
 
index 66aa674..6079c65 100644 (file)
@@ -1,6 +1,13 @@
+fontmanager (0.5) unstable; urgency=low
+
+  * fix bugs
+  * update helps
+
+ -- Takumi Asaki <takumi.asaki@gmail.com>  Thu, 19 Apr 2012 16:15:00 +0900
+
 fontmanager (0.4.95) unstable; urgency=low
 
-  0.5RC
+  0.5 RC(for internal test only)
   * UI improvments
   * UI Optimizations
 
@@ -8,7 +15,7 @@ fontmanager (0.4.95) unstable; urgency=low
 
 fontmanager (0.4.9) unstable; urgency=low
 
-  0.5 beta
+  0.5 beta(for test only)
   * Add reorder configuration.
   * Add backup/restore configuration.
   * Add edit System font configuration.
index f845c4e..2c42bf6 100644 (file)
@@ -4,7 +4,7 @@
 <context>
     <name>ApplicationController</name>
     <message>
-        <location filename="../applicationcontroller.cpp" line="+378"/>
+        <location filename="../applicationcontroller.cpp" line="+407"/>
         <source>Could not remove Font &apos;%1&apos;</source>
         <translation>フォント &apos;%1&apos; を削除できません</translation>
     </message>
@@ -12,7 +12,7 @@
 <context>
     <name>BottomButtons</name>
     <message>
-        <location filename="../qml/fontmanager/BottomButtons.qml" line="+63"/>
+        <location filename="../qml/fontmanager/BottomButtons.qml" line="+101"/>
         <source>Import System Settings</source>
         <translation>システム設定のインポート</translation>
     </message>
 <context>
     <name>EditFontsConfPage</name>
     <message>
-        <location filename="../qml/fontmanager/EditFontsConfPage.qml" line="+53"/>
-        <source>&lt;p&gt;Select font family and edit priorities.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Add fonts to the selected &lt;i&gt;Priority&lt;/i&gt; in config file.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-delete&quot;&gt;: Remove fonts from the selected &lt;i&gt;Priority&lt;/i&gt; in config file.  &lt;i&gt;Note: The fonts are NOT uninstalled&lt;/i&gt;.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Priorities&lt;/b&gt;:&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Higher&lt;/b&gt;: These fonts have a higher priority.  (&apos;prepend&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Normal&lt;/b&gt;: These fonts are usally used as default.  (&apos;prefer&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Lowser&lt;/b&gt;: These fonts have a lower priority.  (&apos;accept&apos; fonts in fontconfig)&lt;br/&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Import System Settings&lt;/b&gt;: Import settings from system(/etc/fonts/local.conf).&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Remove current font config&lt;/b&gt;(Menu): Remove current user&apos;s font config file.&lt;/p&gt;&lt;p&gt;&lt;b&gt;View current font config&lt;/b&gt;(Menu): View current user&apos;s font config file.&lt;/p&gt;&lt;hr/&gt;Please check &lt;a href=&quot;http://www.freedesktop.org/software/fontconfig/fontconfig-user.html&quot;&gt;fontconfig&lt;/a&gt; for more details.</source>
-        <translation>&lt;p&gt;フォントファミリーを選択し、プロパティを編集します。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: フォントを設定ファイルの選択した &lt;i&gt;優先順位&lt;/i&gt; に追加します。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-delete&quot;&gt;: フォントを設定ファイルの選択した &lt;i&gt;優先順位&lt;/i&gt; から削除します。&lt;i&gt;注: フォントはアンインストールされません。&lt;/i&gt;&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;優先順位&lt;/b&gt;:&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;高&lt;/b&gt;: これらのフォントは優先して使用されます。(fontconfig で &apos;prepend&apos; されるフォントとして扱います)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;標準&lt;/b&gt;: これらのフォントがデフォルトで使用されます。(fontconfig で &apos;prefer&apos; されるフォントとして扱います)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;低&lt;/b&gt;: これらのフォントは代替フォントして使用されます。(fontconfig で &apos;accept&apos; されるフォントとして扱います)&lt;br/&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;システム設定のインポート&lt;/b&gt;: システム(/etc/fonts/local.conf)の設定をインポートします。&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;現在のフォント設定を削除&lt;/b&gt;(メニュー): 現在のユーザーのフォント設定ファイルを削除します。&lt;/p&gt;&lt;p&gt;&lt;b&gt;現在のフォント設定を表示&lt;/b&gt;(メニュー): 現在のユーザーのフォント設定ファイルを表示します。&lt;/p&gt;&lt;hr/&gt;詳細は &lt;a href=&quot;http://www.freedesktop.org/software/fontconfig/fontconfig-user.html&quot;&gt;fontconfig&lt;/a&gt; も参照してください。</translation>
-    </message>
-    <message>
-        <location line="+23"/>
+        <location filename="../qml/fontmanager/EditFontsConfPage.qml" line="+79"/>
         <source>Sans Serif</source>
         <translation type="unfinished"></translation>
     </message>
         <translation>現在のフォント設定を削除</translation>
     </message>
     <message>
-        <location line="-91"/>
+        <location line="-120"/>
+        <source>&lt;p&gt;Select font family and edit priorities.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Add fonts to the target &lt;i&gt;Priority&lt;/i&gt; in config file.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-up&quot;&gt;: Move up selected font.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-delete&quot;&gt;: Remove selected font from the its &lt;i&gt;Priority&lt;/i&gt; in config file.  &lt;i&gt;Note: The fonts are NOT uninstalled&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-down&quot;&gt;: Move down selected font.&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;Priorities&lt;/h2&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Higher&lt;/b&gt;: These fonts have a higher priority.  (&apos;prepend&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Normal&lt;/b&gt;: These fonts are usally used as default.  System settings may be given priority than these.  (&apos;prefer&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Lowser&lt;/b&gt;: These fonts have a lower priority.  (&apos;accept&apos; fonts in fontconfig)&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Please check &lt;a href=&quot;http://www.freedesktop.org/software/fontconfig/fontconfig-user.html&quot;&gt;fontconfig&lt;/a&gt; for more details.&lt;/li&gt;&lt;/ul&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Import System Settings&lt;/b&gt;: Import settings from system(/etc/fonts/local.conf).&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;Menu(&lt;img src=&quot;image://theme/icon-m-toolbar-view-menu&quot;&gt;)&lt;/h2&gt;&lt;p&gt;&lt;b&gt;Remove current font config&lt;/b&gt;(Menu): Remove current user&apos;s font config file.&lt;/p&gt;&lt;p&gt;&lt;b&gt;View current font config&lt;/b&gt;(Menu): View current user&apos;s font config file.&lt;/p&gt;</source>
+        <translation>&lt;p&gt;フォントファミリーを選択し、プロパティを編集します。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: フォントを設定ファイルの対象となる &lt;i&gt;優先順位&lt;/i&gt; に追加します。&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-up&quot;&gt;: 選択したフォントの順番を上げます。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-delete&quot;&gt;: 選択したフォントを設定ファイルの対象となる &lt;i&gt;優先順位&lt;/i&gt; から削除します。&lt;i&gt;注: フォントはアンインストールされません。&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-down&quot;&gt;: 選択したフォントの順番を下げます。&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;優先順位&lt;/h2&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;高&lt;/b&gt;: これらのフォントは優先して使用されます。(fontconfig で &apos;prepend&apos; されるフォントとして扱います)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;標準&lt;/b&gt;: これらのフォントがデフォルトで使用されます。システム設定のフォントが優先して使用されることがあります。(fontconfig で &apos;prefer&apos; されるフォントとして扱います)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;低&lt;/b&gt;: これらのフォントは代替フォントして使用されます。(fontconfig で &apos;accept&apos; されるフォントとして扱います)&lt;br/&gt;&lt;ul&gt;&lt;li&gt;詳細は &lt;a href=&quot;http://www.freedesktop.org/software/fontconfig/fontconfig-user.html&quot;&gt;fontconfig&lt;/a&gt; も参照してください。&lt;/li&gt;&lt;/ul&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;システム設定のインポート&lt;/b&gt;: システム(/etc/fonts/local.conf)の設定をインポートします。&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;メニュー(&lt;img src=&quot;image://theme/icon-m-toolbar-view-menu&quot;&gt;)&lt;/h2&gt;&lt;p&gt;&lt;b&gt;現在のフォント設定を削除&lt;/b&gt;: 現在のユーザーのフォント設定ファイルを削除します。&lt;/p&gt;&lt;p&gt;&lt;b&gt;現在のフォント設定を表示&lt;/b&gt;: 現在のユーザーのフォント設定ファイルを表示します。&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location line="+29"/>
         <source>System</source>
         <translation>システム</translation>
     </message>
 <context>
     <name>FontsConfProperties</name>
     <message>
-        <location filename="../qml/fontmanager/FontsConfProperties.qml" line="+98"/>
+        <location filename="../qml/fontmanager/FontsConfProperties.qml" line="+104"/>
         <source>Use as Prefer Font for Sans-Serif</source>
         <translation>Sans-Serif(ゴシック体)で使用</translation>
     </message>
         <source>Use as Prefer Font for Monospace</source>
         <translation>等幅フォントで使用</translation>
     </message>
+    <message>
+        <location line="+5"/>
+        <source>Use as Prefer Font for System</source>
+        <translation>システムフォントで使用</translation>
+    </message>
 </context>
 <context>
     <name>FontsConfViewPage</name>
 <context>
     <name>HelpDialog</name>
     <message>
-        <location filename="../qml/fontmanager/HelpDialog.qml" line="+8"/>
+        <location filename="../qml/fontmanager/HelpDialog.qml" line="+46"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location line="+63"/>
+        <location line="+65"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
 <context>
     <name>MainPage</name>
     <message>
-        <location filename="../qml/fontmanager/MainPage.qml" line="+81"/>
+        <location filename="../qml/fontmanager/MainPage.qml" line="+86"/>
         <source>Installed Fonts</source>
         <translation>インストール済みフォント</translation>
     </message>
     <message>
-        <location line="+164"/>
+        <location line="+170"/>
         <source>Close</source>
         <translation>閉じる</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+38"/>
         <source>No Fonts Installed</source>
         <translation>フォントは未インストールです</translation>
     </message>
     <message>
-        <location line="-63"/>
+        <location line="-71"/>
         <source>About</source>
         <translation>Font managerについて</translation>
     </message>
     <message>
-        <location line="-159"/>
-        <source>&lt;h1&gt;How to use&lt;/h1&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Install font.  Please copy font file(s) to this device in advance.  Currently *.ttf and *.ttc are supported.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-settings&quot;&gt;: Configure fonts(expert).  You can assign/unassign any fonts to Serif/Sans Serif/Monospace.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Create Recommended Settings&lt;/b&gt;(Menu): Create recommended settings.  &lt;i&gt;Normal&lt;/i&gt; priority is given to user installed font(s).  System fonts have &lt;i&gt;Higher&lt;/i&gt; priority.  System CJK fonts conflicts your installed fonts have &lt;i&gt;Lower&lt;/i&gt; priority.&lt;/p&gt;</source>
-        <translation>&lt;h1&gt;使い方&lt;/h1&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: フォントのインストール。事前にデバイスにフォントファイルをコピーしておいてください。現状では *.ttf と *.ttc のみサポートしています。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-settings&quot;&gt;: フォント設定(詳細設定).  Serif/Sans Serif/等幅フォントへ任意のフォントを割り当てられます。&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;推奨設定の作成&lt;/b&gt;(メニュー): 推奨設定を生成します。ユーザーがインストールしたフォントは&lt;i&gt;標準&lt;/i&gt;の優先順位に割り当てます。システムのフォントは&lt;i&gt;高い&lt;/i&gt;優先順位に割り当てられますが、ユーザーがインストールしたCJKフォントと競合するフォントの優先順位は&lt;i&gt;低く&lt;/i&gt;なります。&lt;/p&gt;</translation>
-    </message>
-    <message>
-        <location line="+163"/>
+        <location line="+4"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location line="-31"/>
+        <location line="-34"/>
         <source>Create Recommended Settings</source>
         <translation>推奨設定の作成</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="-140"/>
+        <source>&lt;h1&gt;How to use&lt;/h1&gt;&lt;hr/&gt;&lt;h2&gt;Toolbar&lt;/h2&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Install font.  Please copy font file(s) to this device in advance.  Currently *.ttf and *.ttc are supported.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-settings&quot;&gt;: Configure fonts(expert).  You can assign/unassign any fonts to Serif/Sans Serif/Monospace/System.&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;Menu(&lt;img src=&quot;image://theme/icon-m-toolbar-view-menu&quot;&gt;)&lt;/h2&gt;&lt;p&gt;&lt;b&gt;Create Recommended Settings&lt;/b&gt;: Create recommended settings.  &lt;i&gt;Normal&lt;/i&gt; priority is given to user installed font(s).  System fonts have &lt;i&gt;Higher&lt;/i&gt; priority.  System CJK fonts conflicts your installed fonts have &lt;i&gt;Lower&lt;/i&gt; priority.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Backup Config&lt;/b&gt;: Save current fonts config into ~/MyDocs/Documents&lt;/p&gt;&lt;p&gt;&lt;b&gt;Restore Config&lt;/b&gt;: Restore fonts config from backuped file&lt;/p&gt;</source>
+        <translation>&lt;h1&gt;使い方&lt;/h1&gt;&lt;hr/&gt;&lt;h2&gt;ツールバー&lt;/h2&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: フォントのインストール。事前にデバイスにフォントファイルをコピーしておいてください。現状では *.ttf と *.ttc のみサポートしています。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-settings&quot;&gt;: フォント設定(詳細設定).  Serif/Sans Serif/等幅/システムフォントへ任意のフォントを割り当てられます。&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;メニュー(&lt;img src=&quot;image://theme/icon-m-toolbar-view-menu&quot;&gt;)&lt;/h2&gt;&lt;p&gt;&lt;b&gt;推奨設定の作成&lt;/b&gt;: 推奨設定を生成します。ユーザーがインストールしたフォントは&lt;i&gt;標準&lt;/i&gt;の優先順位に割り当てます。システムのフォントは&lt;i&gt;高い&lt;/i&gt;優先順位に割り当てられますが、ユーザーがインストールしたCJKフォントと競合するフォントの優先順位は&lt;i&gt;低く&lt;/i&gt;なります。&lt;/p&gt;&lt;p&gt;&lt;b&gt;設定のバックアップ&lt;/b&gt;: 現在のフォント設定を ~/MyDocs/Documents に保存します。&lt;/p&gt;&lt;p&gt;&lt;b&gt;設定の復旧&lt;/b&gt;: バックアップしたファイルからフォント設定を復旧します。&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location line="+155"/>
         <source>Backup Config</source>
         <translation>設定のバックアップ</translation>
     </message>
@@ -491,7 +496,7 @@ Application Icon is created by hirao</source>
 <context>
     <name>SelectInstallFamilyDialog</name>
     <message>
-        <location filename="../qml/fontmanager/SelectInstallFamilyDialog.qml" line="+9"/>
+        <location filename="../qml/fontmanager/SelectInstallFamilyDialog.qml" line="+47"/>
         <source>Add</source>
         <translation>追加</translation>
     </message>
index 62f1ddb..1708072 100644 (file)
@@ -4,12 +4,20 @@
 <context>
     <name>ApplicationController</name>
     <message>
-        <location filename="../applicationcontroller.cpp" line="+341"/>
+        <location filename="../applicationcontroller.cpp" line="+407"/>
         <source>Could not remove Font &apos;%1&apos;</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
+    <name>BottomButtons</name>
+    <message>
+        <location filename="../qml/fontmanager/BottomButtons.qml" line="+101"/>
+        <source>Import System Settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>ConfigValueComboBox</name>
     <message>
         <location filename="../qml/fontmanager/ConfigValueComboBox.qml" line="+89"/>
 <context>
     <name>EditFontsConfPage</name>
     <message>
-        <location filename="../qml/fontmanager/EditFontsConfPage.qml" line="+51"/>
-        <source>&lt;p&gt;Select font family and edit priorities.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Add fonts to the selected &lt;i&gt;Priority&lt;/i&gt; in config file.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-delete&quot;&gt;: Remove fonts from the selected &lt;i&gt;Priority&lt;/i&gt; in config file.  &lt;i&gt;Note: The fonts are NOT uninstalled&lt;/i&gt;.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Priorities&lt;/b&gt;:&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Higher&lt;/b&gt;: These fonts have a higher priority.  (&apos;prepend&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Normal&lt;/b&gt;: These fonts are usally used as default.  (&apos;prefer&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Lowser&lt;/b&gt;: These fonts have a lower priority.  (&apos;accept&apos; fonts in fontconfig)&lt;br/&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Import System Settings&lt;/b&gt;: Import settings from system(/etc/fonts/local.conf).&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Remove current font config&lt;/b&gt;(Menu): Remove current user&apos;s font config file.&lt;/p&gt;&lt;p&gt;&lt;b&gt;View current font config&lt;/b&gt;(Menu): View current user&apos;s font config file.&lt;/p&gt;&lt;hr/&gt;Please check &lt;a href=&quot;http://www.freedesktop.org/software/fontconfig/fontconfig-user.html&quot;&gt;fontconfig&lt;/a&gt; for more details.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+28"/>
+        <location filename="../qml/fontmanager/EditFontsConfPage.qml" line="+79"/>
         <source>Sans Serif</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+1"/>
         <source>Serif</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+1"/>
         <source>Monospace</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Add</source>
+        <location line="+111"/>
+        <source>Help</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Add Family for %1</source>
+        <location line="-19"/>
+        <source>Remove current fonts config</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+74"/>
-        <source>Help</source>
+        <location line="-120"/>
+        <source>&lt;p&gt;Select font family and edit priorities.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Add fonts to the target &lt;i&gt;Priority&lt;/i&gt; in config file.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-up&quot;&gt;: Move up selected font.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-delete&quot;&gt;: Remove selected font from the its &lt;i&gt;Priority&lt;/i&gt; in config file.  &lt;i&gt;Note: The fonts are NOT uninstalled&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-down&quot;&gt;: Move down selected font.&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;Priorities&lt;/h2&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Higher&lt;/b&gt;: These fonts have a higher priority.  (&apos;prepend&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Normal&lt;/b&gt;: These fonts are usally used as default.  System settings may be given priority than these.  (&apos;prefer&apos; fonts in fontconfig)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Lowser&lt;/b&gt;: These fonts have a lower priority.  (&apos;accept&apos; fonts in fontconfig)&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Please check &lt;a href=&quot;http://www.freedesktop.org/software/fontconfig/fontconfig-user.html&quot;&gt;fontconfig&lt;/a&gt; for more details.&lt;/li&gt;&lt;/ul&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Import System Settings&lt;/b&gt;: Import settings from system(/etc/fonts/local.conf).&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;Menu(&lt;img src=&quot;image://theme/icon-m-toolbar-view-menu&quot;&gt;)&lt;/h2&gt;&lt;p&gt;&lt;b&gt;Remove current font config&lt;/b&gt;(Menu): Remove current user&apos;s font config file.&lt;/p&gt;&lt;p&gt;&lt;b&gt;View current font config&lt;/b&gt;(Menu): View current user&apos;s font config file.&lt;/p&gt;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-16"/>
-        <source>Remove current fonts config</source>
+        <location line="+29"/>
+        <source>System</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+8"/>
+        <source>Edit Fonts Config: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+91"/>
         <source>View current fonts config</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+27"/>
         <source>Remove it?</source>
         <translation type="unfinished"></translation>
     </message>
         <source>Cancel</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+37"/>
+        <source>Select Family to edit</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>FontInstallPage</name>
     <message>
-        <location filename="../qml/fontmanager/FontInstallPage.qml" line="+75"/>
+        <location filename="../qml/fontmanager/FontInstallPage.qml" line="+71"/>
         <source>Install Font</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+38"/>
+        <location line="+52"/>
         <source>&lt;b&gt;Font Family&lt;/b&gt;: %1</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+46"/>
         <source>Install</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+15"/>
         <source>Create it?</source>
         <translation type="unfinished"></translation>
     </message>
     </message>
     <message>
         <location line="+1"/>
-        <location line="+12"/>
+        <location line="+17"/>
         <source>OK</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-11"/>
-        <location line="+12"/>
+        <location line="-16"/>
+        <location line="+17"/>
         <source>Cancel</source>
         <translation type="unfinished"></translation>
     </message>
     </message>
 </context>
 <context>
-    <name>FontSelectPage</name>
+    <name>FontSelectionPage</name>
     <message>
-        <location filename="../qml/fontmanager/FontSelectPage.qml" line="+64"/>
+        <location filename="../qml/fontmanager/FontSelectionPage.qml" line="+48"/>
         <source>Select Font to install</source>
         <translation type="unfinished"></translation>
     </message>
 <context>
     <name>FontsConfEditor</name>
     <message>
-        <location filename="../qml/fontmanager/FontsConfEditor.qml" line="+66"/>
-        <source>Edit Fonts Config: %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <location filename="../qml/fontmanager/FontsConfEditor.qml" line="+70"/>
         <source>Priority: %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+15"/>
         <location line="+14"/>
+        <location line="+13"/>
         <source>System Font</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-14"/>
-        <location line="+14"/>
+        <location line="-13"/>
+        <location line="+13"/>
         <source>User Font</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+68"/>
-        <source>Import System Settings</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>FontsConfEditorController</name>
     <message>
-        <location filename="../fontsconfeditorcontroller.cpp" line="+57"/>
+        <location filename="../fontsconfeditorcontroller.cpp" line="+79"/>
         <source>Higher</source>
         <translation type="unfinished"></translation>
     </message>
 <context>
     <name>FontsConfProperties</name>
     <message>
-        <location filename="../qml/fontmanager/FontsConfProperties.qml" line="+98"/>
+        <location filename="../qml/fontmanager/FontsConfProperties.qml" line="+104"/>
         <source>Use as Prefer Font for Sans-Serif</source>
         <translation type="unfinished"></translation>
     </message>
         <source>Use as Prefer Font for Monospace</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+5"/>
+        <source>Use as Prefer Font for System</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>FontsConfViewPage</name>
     <message>
-        <location filename="../qml/fontmanager/FontsConfViewPage.qml" line="+60"/>
+        <location filename="../qml/fontmanager/FontsConfViewPage.qml" line="+56"/>
         <source>Current Fonts Config</source>
         <translation type="unfinished"></translation>
     </message>
 <context>
     <name>HelpDialog</name>
     <message>
-        <location filename="../qml/fontmanager/HelpDialog.qml" line="+8"/>
+        <location filename="../qml/fontmanager/HelpDialog.qml" line="+46"/>
         <source>Help</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+63"/>
-        <source>OK</source>
+        <location line="+65"/>
+        <source>Close</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
     <name>InstalledFontInfoPage</name>
     <message>
-        <location filename="../qml/fontmanager/InstalledFontInfoPage.qml" line="+67"/>
+        <location filename="../qml/fontmanager/InstalledFontInfoPage.qml" line="+63"/>
         <source>Installed Font Info</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+12"/>
         <source>Delete Font?</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+0"/>
+        <source>Unknown</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Do you really want to remove this font now?</source>
         <translation type="unfinished"></translation>
     </message>
 <context>
     <name>MainPage</name>
     <message>
-        <location filename="../qml/fontmanager/MainPage.qml" line="+74"/>
+        <location filename="../qml/fontmanager/MainPage.qml" line="+86"/>
         <source>Installed Fonts</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+187"/>
-        <source>No Fonts Installed</source>
+        <location line="+170"/>
+        <source>Close</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-48"/>
-        <source>About</source>
+        <location line="+38"/>
+        <source>No Fonts Installed</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-158"/>
-        <source>&lt;h1&gt;How to use&lt;/h1&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Install font.  Please copy font file(s) to this device in advance.  Currently *.ttf and *.ttc are supported.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-settings&quot;&gt;: Configure fonts(expert).  You can assign/unassign any fonts to Serif/Sans Serif/Monospace.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;b&gt;Create Recommended Settings&lt;/b&gt;(Menu): Create recommended settings.  &lt;i&gt;Normal&lt;/i&gt; priority is given to user installed font(s).  System fonts have &lt;i&gt;Higher&lt;/i&gt; priority.  System CJK fonts conflicts your installed fonts have &lt;i&gt;Lower&lt;/i&gt; priority.&lt;/p&gt;</source>
+        <location line="-71"/>
+        <source>About</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+162"/>
+        <location line="+4"/>
         <source>Help</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-15"/>
+        <location line="-34"/>
         <source>Create Recommended Settings</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="-140"/>
+        <source>&lt;h1&gt;How to use&lt;/h1&gt;&lt;hr/&gt;&lt;h2&gt;Toolbar&lt;/h2&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-add&quot;&gt;: Install font.  Please copy font file(s) to this device in advance.  Currently *.ttf and *.ttc are supported.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;image://theme/icon-m-toolbar-settings&quot;&gt;: Configure fonts(expert).  You can assign/unassign any fonts to Serif/Sans Serif/Monospace/System.&lt;/p&gt;&lt;hr/&gt;&lt;h2&gt;Menu(&lt;img src=&quot;image://theme/icon-m-toolbar-view-menu&quot;&gt;)&lt;/h2&gt;&lt;p&gt;&lt;b&gt;Create Recommended Settings&lt;/b&gt;: Create recommended settings.  &lt;i&gt;Normal&lt;/i&gt; priority is given to user installed font(s).  System fonts have &lt;i&gt;Higher&lt;/i&gt; priority.  System CJK fonts conflicts your installed fonts have &lt;i&gt;Lower&lt;/i&gt; priority.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Backup Config&lt;/b&gt;: Save current fonts config into ~/MyDocs/Documents&lt;/p&gt;&lt;p&gt;&lt;b&gt;Restore Config&lt;/b&gt;: Restore fonts config from backuped file&lt;/p&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+155"/>
+        <source>Backup Config</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Restore Config</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+24"/>
         <source>Replace it?</source>
         <translation type="unfinished"></translation>
     </message>
     </message>
     <message>
         <location line="+1"/>
-        <location line="+17"/>
         <source>OK</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-16"/>
+        <location line="+1"/>
         <source>Cancel</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+13"/>
         <source>Font Manager for N9</source>
         <translation type="unfinished"></translation>
     </message>
@@ -436,21 +463,66 @@ Application Icon is created by hirao</source>
     </message>
 </context>
 <context>
-    <name>main</name>
+    <name>RestoreFontsConfPage</name>
     <message>
-        <location filename="../qml/fontmanager/main.qml" line="+89"/>
-        <location line="+8"/>
-        <location line="+10"/>
+        <location filename="../qml/fontmanager/RestoreFontsConfPage.qml" line="+47"/>
+        <source>Restore Fonts Config</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Restore it?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Existing Fonts Config will be replaced by &apos;%1&apos;.  Are you sure?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>OK</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-19"/>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>SelectInstallFamilyDialog</name>
+    <message>
+        <location filename="../qml/fontmanager/SelectInstallFamilyDialog.qml" line="+47"/>
+        <source>Add</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Add Family for %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Unknwon</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>main</name>
+    <message>
+        <location filename="../qml/fontmanager/main.qml" line="+110"/>
         <source>Alert</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="+2"/>
         <location line="+7"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>Install finished</source>
         <translation type="unfinished"></translation>
     </message>
@@ -460,7 +532,7 @@ Application Icon is created by hirao</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+11"/>
         <source>Uninstall finished</source>
         <translation type="unfinished"></translation>
     </message>
@@ -469,5 +541,25 @@ Application Icon is created by hirao</source>
         <source>Font &apos;%1&apos; is uninstalled successfully.</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+11"/>
+        <source>Backup finished</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Fonts Config is backuped as &apos;%1&apos; successfully.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Restore finished</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Fonts Config is restored from &apos;%1&apos; successfully.</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 </TS>