OSDN Git Service

Version 0.4.95(0.5RC)
authorTakumi ASAKI <takumi.asaki@gmail.com>
Mon, 9 Apr 2012 16:06:33 +0000 (01:06 +0900)
committerTakumi ASAKI <takumi.asaki@gmail.com>
Mon, 9 Apr 2012 16:06:33 +0000 (01:06 +0900)
* Improvement UI & performance

22 files changed:
applicationcontroller.cpp
applicationcontroller.h
fontconfigmanager.cpp
fontsconf.cpp
qml/fontmanager/BottomButtons.qml [new file with mode: 0644]
qml/fontmanager/EditFontsConfPage.qml
qml/fontmanager/EditorHelper.js
qml/fontmanager/EditorListDelegate.qml
qml/fontmanager/FileSelectionPage.qml
qml/fontmanager/FontInstallPage.qml
qml/fontmanager/FontsConfEditor.qml
qml/fontmanager/HelpDialog.js [new file with mode: 0644]
qml/fontmanager/HelpDialog.qml
qml/fontmanager/InstalledFontInfoPage.qml
qml/fontmanager/MainPage.qml
qml/fontmanager/PageHeader.qml
qml/fontmanager/RestoreFontsConfPage.qml
qml/fontmanager/SelectInstallFamilyDialog.qml [new file with mode: 0644]
qml/fontmanager/main.qml
qtc_packaging/debian_harmattan/changelog
translations/fontmanager_ja.ts
translations/translations.pri

index 1241b60..71499ba 100644 (file)
@@ -96,7 +96,7 @@ void ApplicationController::init()
 
 QString ApplicationController::version() const
 {
-    return QLatin1String("0.4.9(0.5beta)");
+    return QLatin1String("0.4.95(0.5RC)");
 }
 
 QString ApplicationController::currentLanguage() const
@@ -227,6 +227,14 @@ QString ApplicationController::defaultBackupFilename() const
     return backupfile;
 }
 
+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;
+}
+
 void ApplicationController::updateAllEditorController()
 {
     if (!mFontConfig->fontsConfModified() || mIgnoreUpdate) {
@@ -312,11 +320,13 @@ void ApplicationController::createRecommendedSettings()
 void ApplicationController::backupConfig(const QString &filename)
 {
     mFontConfig->backupFontsConf(filename);
+    emit backupConfigFinished(filename);
 }
 
 void ApplicationController::restoreConfig(const QString &filename)
 {
     mFontConfig->restoreFontsConf(filename);
+    emit restoreConfigFinished(filename);
 }
 
 void ApplicationController::createFontDir()
index d073c0b..e858eef 100644 (file)
@@ -53,7 +53,7 @@ class FontsConfEditorController;
 class ApplicationController : public QObject
 {
     Q_OBJECT
-    Q_PROPERTY(QString version READ version)
+    Q_PROPERTY(QString version READ version NOTIFY dummySignal)
     Q_PROPERTY(QString fontDir READ fontDir WRITE setFontDir NOTIFY fontDirChanged)
     Q_PROPERTY(bool fontDirExists READ fontDirExists NOTIFY fontDirExistsChanged)
 
@@ -100,6 +100,8 @@ public:
     QUrl backupDir() const;
     Q_INVOKABLE QString defaultBackupFilename() const;
 
+    Q_INVOKABLE QString url2path(const QUrl &url) const;
+
 public slots:
     void updateAllEditorController();
 
@@ -134,6 +136,8 @@ signals:
 
     void installFinished(const QString &fontpath);
     void uninstallFinished(const QString &fontpath);
+    void backupConfigFinished(const QString &filepath);
+    void restoreConfigFinished(const QString &filepath);
 
     void clearInstalledFontList();
     void appendInstalledFont(const QString &family, const QString &fullname);
@@ -149,6 +153,8 @@ signals:
 
     void backupDirChanged();
 
+    void dummySignal();
+
 private slots:
     void readFcListFinished();
 
index f9084ee..9d98f7f 100644 (file)
@@ -675,7 +675,7 @@ void FontConfigManager::restoreFontsConf(const QUrl &fileUrl)
     if (restoredConf->isValid()) {
         mLocalFontsConf->copy(restoredConf);
         emit fontsConfUpdated();
-        restoredConf->deleteLater();
+        delete restoredConf;
     }
 }
 
index 898785e..fcf2935 100644 (file)
@@ -89,7 +89,7 @@ void FontsConf::initFontsConf()
 {
     if (mElements)
         mModified = true;
-    FontsConfElementPointer rootElem(new FontsConfElement(FONTCONFIG_DEF, this));
+    FontsConfElementPointer rootElem(new FontsConfElement(FONTCONFIG_DEF));
     mElements = rootElem;
 }
 
@@ -117,7 +117,7 @@ bool FontsConf::parse(const QByteArray &buf)
             case Initialized:
                 if (elemName == FONTCONFIG_DEF) {
                     state = Ready;
-                    elem = FontsConfElementPointer(new FontsConfElement(elemName, this));
+                    elem = FontsConfElementPointer(new FontsConfElement(elemName));
                     bool check = elem->parse(xml);
                     if (!check)
                         state = UnknownState;
@@ -133,7 +133,7 @@ bool FontsConf::parse(const QByteArray &buf)
         }
 
         if (state == InvalidConfig)
-            qDebug("Invalid Config!!!");
+            qWarning("Invalid Config!!!");
 
         if (state == InvalidConfig)
             break;
diff --git a/qml/fontmanager/BottomButtons.qml b/qml/fontmanager/BottomButtons.qml
new file mode 100644 (file)
index 0000000..4ebd733
--- /dev/null
@@ -0,0 +1,70 @@
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import 'UIConstants.js' as UI
+
+Item {
+    id: bottomButtons
+    
+    property Item targetTab
+
+    height: bottomItem.height + importButton.height + UI.DEFAULT_MARGIN * 2
+
+    Rectangle {
+        anchors.fill: parent
+        anchors.topMargin: UI.DEFAULT_MARGIN / 2
+        gradient: Gradient {
+            GradientStop { position: 0.0; color: Qt.lighter("#76221d") }
+            GradientStop { position: 1.0; color: Qt.lighter("#bd543d") }
+        }
+    }
+    
+    Item {
+        id: bottomItem
+        anchors.bottom: importButton.top
+        anchors.left: parent.left
+        anchors.right: parent.right
+        height: UI.LIST_ITEM_HEIGHT_SMALL
+        
+        Button {
+            width: 75
+            anchors.left: parent.left
+            anchors.leftMargin: UI.DEFAULT_MARGIN
+            iconSource: "image://theme/icon-m-toolbar-down"
+            onClicked: targetTab.moveDownFamily()
+            enabled: targetTab !== null &&
+                     (targetTab.listView.currentIndex >= 0 &&
+                      targetTab.listView.currentIndex < targetTab.listView.count - 1) &&
+                     (!targetTab.listView.model.get(targetTab.listView.currentIndex+1).header)
+        }
+        
+        Button {
+            width: 75
+            anchors.horizontalCenter: parent.horizontalCenter
+            iconSource: "image://theme/icon-m-toolbar-delete"
+            onClicked: targetTab.removeFamily()
+            enabled: targetTab !== null && targetTab.listView.currentIndex >= 0
+        }
+        
+        Button {
+            width: 75
+            anchors.right: parent.right
+            anchors.rightMargin: UI.DEFAULT_MARGIN
+            iconSource: "image://theme/icon-m-toolbar-up"
+            onClicked: targetTab.moveUpFamily()
+            enabled: targetTab !== null && (targetTab.listView.currentIndex > 0) && (!targetTab.listView.model.get(targetTab.listView.currentIndex-1).header)
+        }
+    }
+    
+    Button {
+        id: importButton
+        anchors.horizontalCenter: parent.horizontalCenter
+        anchors.bottom: parent.bottom
+        anchors.bottomMargin: UI.DEFAULT_MARGIN
+        text: qsTr("Import System Settings")
+        opacity: 0.9
+        onClicked: {
+            controller.importSystemSettings(targetTab.family)
+        }
+        enabled: targetTab !== null
+    }
+}
index e3c43ef..5d11699 100644 (file)
 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 import QtQuick 1.1
 import com.nokia.meego 1.0
-import com.nokia.extras 1.0
 import 'UIConstants.js' as UI
 
+import 'HelpDialog.js' as HelpHelper
+
 Page {
     id: editorTabPage
     tools: editorTabTool
@@ -67,135 +68,56 @@ Page {
                                      "Please check <a href=\"http://www.freedesktop.org/software/fontconfig/fontconfig-user.html\">fontconfig</a> for more details."
                                      )
 
-    property alias curTab: editFontsConfTab.currentTab
+    property Item selectionDialog: null
+
+    property int currentIndex: 0
+    ListModel {
+        id: familyModel
+        ListElement { family: "sans-serif";         name: QT_TR_NOOP("Sans Serif") }
+        ListElement { family: "serif";              name: QT_TR_NOOP("Serif") }
+        ListElement { family: "monospace";          name: QT_TR_NOOP("Monospace") }
+        ListElement { family: "Nokia Pure Text";    name: QT_TR_NOOP("System") }
+    }
 
     PageHeader {
         id: pageHeader
         anchors.top: parent.top
         anchors.left: parent.left
         anchors.right: parent.right
-        text: qsTr("Edit Fonts Config: %1").arg(curTab.familyName)
-    }
-
-    TabGroup {
-        id: editFontsConfTab
-        anchors.top: pageHeader.bottom
-        anchors.bottom: bottomButtons.top
-
-        opacity: enabled ? 1.0 : 0.5
-
-        currentTab: sansSerifTab
-
-        FontsConfEditor {
-            id: sansSerifTab
-            family: "sans-serif"
-            familyName: qsTr("Sans Serif")
-            editorController: controller.editorController(family)
-        }
-
-        FontsConfEditor {
-            id: serifTab
-            family: "serif"
-            familyName: qsTr("Serif")
-            editorController: controller.editorController(family)
-        }
-
-        FontsConfEditor {
-            id: monospaceTab
-            family: "monospace"
-            familyName: qsTr("Monospace")
-            editorController: controller.editorController(family)
-        }
-
-        FontsConfEditor {
-            id: systemTab
-            family: "Nokia Pure Text"
-            familyName: qsTr("System")
-            editorController: controller.editorController(family)
-        }
-
+        text: qsTr("Edit Fonts Config: %1").arg(confEditor.familyName)
+        enabled: !showHelp
     }
 
     Item {
-        id: bottomButtons
-
-        height: bottomItem.height + importButton.height + UI.DEFAULT_MARGIN * 2
+        id: contents
+        anchors.top: pageHeader.bottom
         anchors.bottom: parent.bottom
         anchors.left: parent.left
         anchors.right: parent.right
 
-        Rectangle {
-            anchors.fill: parent
-            anchors.topMargin: UI.DEFAULT_MARGIN / 2
-            gradient: Gradient {
-                GradientStop { position: 0.0; color: Qt.lighter("#76221d") }
-                GradientStop { position: 1.0; color: Qt.lighter("#bd543d") }
-            }
 
-            Component.onCompleted: {
-                console.log("bottomButtons: " + width + " x " + height)
-            }
-        }
+        opacity: enabled ? 1.0 : 0.5
 
-        Item {
-            id: bottomItem
-            anchors.bottom: importButton.top
+        FontsConfEditor {
+            id: confEditor
+            anchors.top: parent.top
+            anchors.bottom: bottomButtons.top
             anchors.left: parent.left
             anchors.right: parent.right
-            height: UI.LIST_ITEM_HEIGHT_SMALL
-
-            ListButton {
-                anchors.left: parent.left
-                anchors.leftMargin: UI.DEFAULT_MARGIN
-                iconSource: "image://theme/icon-m-toolbar-down"
-                onClicked: curTab.moveDownFamily()
-                enabled: (curTab.listView.currentIndex >= 0 &&
-                          curTab.listView.currentIndex < curTab.listView.count - 1) &&
-                         (!curTab.listView.model.get(curTab.listView.currentIndex+1).header)
-            }
 
-            ListButton {
-                anchors.horizontalCenter: parent.horizontalCenter
-                iconSource: "image://theme/icon-m-toolbar-delete"
-                onClicked: curTab.removeFamily()
-                enabled: curTab.listView.currentIndex >= 0
-            }
-
-            ListButton {
-                anchors.right: parent.right
-                anchors.rightMargin: UI.DEFAULT_MARGIN
-                iconSource: "image://theme/icon-m-toolbar-up"
-                onClicked: curTab.moveUpFamily()
-                enabled: (curTab.listView.currentIndex > 0) && (!curTab.listView.model.get(curTab.listView.currentIndex-1).header)
-            }
+            family: familyModel.get(currentIndex).family
+            familyName: familyModel.get(currentIndex).name
+            editorController: controller.editorController(family)
         }
 
-        Button {
-            id: importButton
-            anchors.horizontalCenter: parent.horizontalCenter
+        BottomButtons {
+            id: bottomButtons
             anchors.bottom: parent.bottom
-            anchors.bottomMargin: UI.DEFAULT_MARGIN
-            text: qsTr("Import System Settings")
-            onClicked: {
-                controller.importSystemSettings(editFontsConfTab.currentTab.family)
-            }
+            anchors.left: parent.left
+            anchors.right: parent.right
+            targetTab: confEditor
         }
-    }
 
-    MultiSelectionDialog {
-        id: selectInstallFamily
-        model: installableFamilyListModel
-        acceptButtonText: qsTr("Add")
-        titleText: qsTr("Add Family for %1").arg(curTab.familyName)
-        onAccepted: {
-            for (var i = 0; i < selectedIndexes.length; i++) {
-                var idx = selectedIndexes[i]
-                var sItem = installableFamilyListModel.get(idx)
-                var tab = editFontsConfTab.currentTab
-                tab.editorController.appendFamily(sItem.enfamily, currentPriority)
-                tab.insertFamily(sItem.enfamily, currentPriority, sItem.systemFont)
-            }
-        }
     }
 
     ToolBarLayout {
@@ -210,25 +132,22 @@ Page {
                 pageStack.pop()
             }
         }
-        ButtonRow {
-            style: TabButtonStyle { }
-            TabButton {
-                text: sansSerifTab.familyName
-                tab: sansSerifTab
-            }
-            TabButton {
-                text: serifTab.familyName
-                tab: serifTab
-            }
-            TabButton {
-                text: monospaceTab.familyName
-                tab: monospaceTab
+
+        Button {
+            text: confEditor.familyName
+
+            Image {
+                id: openImage
+                anchors.right: parent.right
+                anchors.rightMargin: UI.DEFAULT_MARGIN
+                anchors.verticalCenter: parent.verticalCenter
+                source: "image://theme/icon-m-common-expand"
             }
-            TabButton {
-                text: systemTab.familyName
-                tab: systemTab
+            onClicked: {
+                selectCurrentFamilyDialog.open()
             }
         }
+
         ToolIcon {
             platformIconId: "toolbar-view-menu"
             anchors.right: (parent === undefined) ? undefined : parent.right
@@ -252,39 +171,81 @@ Page {
                 enabled: !controller.isEmptyFontsConf
                 onClicked: {
                     editMenu.close()
-                    removeConfirmDialog.open()
+                    openRemoveConfirmDialog()
                 }
             }
             MenuItem {
                 text: qsTr("View current fonts config");
-                //                enabled: controller.localFontsConfExists
+                enabled: controller.localFontsConfExists
                 onClicked: {
                     editMenu.close()
-                    pageStack.push(fontsConfViewPageComponent, { "text": controller.localFontsConf } )
+                    var component = Qt.createComponent("FontsConfViewPage.qml")
+                    if (component.status === Component.Error)
+                        console.log("Error: " + component.errorString())
+                    pageStack.push(component, { "text": controller.localFontsConf } )
                 }
             }
             MenuItem {
                 text: qsTr("Help")
-                onClicked: showHelp = true
+                onClicked: {
+                    showHelp = true
+                    HelpHelper.openHelpDialog(editorTabPage, contents, helpMessage, closeHelp)
+                }
             }
         }
     }
 
-    QueryDialog {
-        id: removeConfirmDialog
-        titleText: qsTr("Remove it?")
-        message: qsTr("Existing fonts config %1 will be removed.  Are you sure?").arg(controller.localFontsConfPath)
-        acceptButtonText: qsTr("OK")
-        rejectButtonText: qsTr("Cancel")
-        onAccepted: controller.resetLocalFontsConf()
+    function closeHelp()
+    {
+        showHelp = false
+    }
+
+    function openRemoveConfirmDialog()
+    {
+        queryDialog.titleText = qsTr("Remove it?")
+        queryDialog.message = qsTr("Existing fonts config %1 will be removed.  Are you sure?").arg(controller.localFontsConfPath)
+        queryDialog.acceptButtonText = qsTr("OK")
+        queryDialog.rejectButtonText = qsTr("Cancel")
+        queryDialog.accepted.connect(resetLocalFontsConf)
+        queryDialog.open()
     }
 
-    HelpDialog {
-        id: helpDialog
-        anchors.fill: editFontsConfTab
-        message: helpMessage
-        visible: showHelp
-        onClicked: showHelp = false
+    function resetLocalFontsConf()
+    {
+        queryDialog.accepted.disconnect(resetLocalFontsConf)
+        controller.resetLocalFontsConf()
+    }
+
+    function openSelectInstallFamilyDialog(priority)
+    {
+        deleteSelectInstallFamilyDialog()
+        var dialogComponent = Qt.createComponent("SelectInstallFamilyDialog.qml")
+        if (dialogComponent.status === Component.Error)
+            console.log("Error: " + dialogComponent.errorString())
+        controller.syncInstallableFamilyFor(confEditor.family)
+        editorTabPage.currentPriority = priority
+        selectionDialog = dialogComponent.createObject(editorTabPage, { "editor": confEditor } )
+        selectionDialog.selectedIndexes = []
+        selectionDialog.accepted.connect(deleteSelectInstallFamilyDialog)
+        selectionDialog.rejected.connect(deleteSelectInstallFamilyDialog)
+        selectionDialog.open()
+    }
+
+    function deleteSelectInstallFamilyDialog()
+    {
+        if (selectionDialog)
+            selectionDialog.destroy()
+        selectionDialog = null
+    }
+
+    SelectionDialog {
+        id: selectCurrentFamilyDialog
+        model: familyModel
+        selectedIndex: currentIndex
+        titleText: qsTr("Select Family to edit")
+        onAccepted: {
+            currentIndex = selectedIndex
+        }
     }
 
     states: [
@@ -292,7 +253,7 @@ Page {
             name: "showHelp"
             when: showHelp
             PropertyChanges {
-                target: editFontsConfTab
+                target: contents
                 enabled: false
             }
             PropertyChanges {
index 8478f33..fe01921 100644 (file)
@@ -36,7 +36,8 @@
 **
 ****************************************************************************/
 
-var sectionIndexes;
+var sectionIndexes
+var connectionObject
 
 function init()
 {
@@ -68,3 +69,11 @@ function updateRemoveIndexes(index)
             sectionIndexes[key]--
     }
 }
+
+function setConnection(editController)
+{
+    if (connectionObject)
+        connectionObject.destroy()
+    connectionObject = modelSyncConnections.createObject(editorPage, {target: editController})
+    editController.syncFamilyList()
+}
index 84761f8..5913a46 100644 (file)
@@ -43,7 +43,7 @@ Item {
             Column {
                 anchors.verticalCenter: parent.verticalCenter
 
-                Label {
+                Text {
                     id: mainText
                     text: model.title
                     font.weight: listItem.titleWeight
@@ -51,7 +51,7 @@ Item {
                     color: listItem.titleColor
                 }
 
-                Label {
+                Text {
                     id: subText
                     text: model.subtitle
                     font.weight: listItem.subtitleWeight
@@ -71,14 +71,16 @@ Item {
         anchors.rightMargin: UI.DEFAULT_MARGIN
         iconSource: "image://theme/icon-m-toolbar-add"
         onClicked: {
-            controller.syncInstallableFamilyFor(editorPage.family)
-            editorTabPage.currentPriority = model.priority
-            selectInstallFamily.selectedIndexes = []
-            selectInstallFamily.open()
+            openSelectInstallFamilyDialog(model.priority)
         }
         visible: listItem.isHeader
     }
 
+    Loader {
+        id: selectInstallFamilyDialogLoader
+        anchors.fill: parent
+    }
+
     MouseArea {
         id: selectItem
         anchors.fill: parent
index b7cfbc5..21e15e7 100644 (file)
@@ -71,6 +71,8 @@ Page {
         anchors.bottom: parent.bottom
         anchors.left: parent.left
         anchors.right: parent.right
+        anchors.topMargin: UI.DEFAULT_MARGIN / 2
+        anchors.bottomMargin: UI.DEFAULT_MARGIN / 2
         anchors.leftMargin: UI.DEFAULT_MARGIN
         anchors.rightMargin: UI.DEFAULT_MARGIN
         clip: true
index 7b4cf5f..c4e7497 100644 (file)
@@ -49,10 +49,10 @@ Page {
 
     signal saveProperties
 
-    function installFont()
+    function installFont(checked)
     {
-        if (controller.fontExists(fontInfo))
-            overwriteFontDialog.open()
+        if (!checked && controller.fontExists(fontInfo))
+            openOverwriteFontDialog()
         else
             controller.installFont(fontInfo);
     }
@@ -71,105 +71,154 @@ Page {
         text: qsTr("Install Font")
     }
 
-    Flickable {
-        id: view
+    Item {
+        id: contents
         anchors.top: pageHeader.bottom
         anchors.bottom: parent.bottom
         anchors.left: parent.left
         anchors.right: parent.right
-        anchors.topMargin: UI.DEFAULT_MARGIN / 2
-        anchors.leftMargin: UI.DEFAULT_MARGIN
-        anchors.rightMargin: UI.DEFAULT_MARGIN
-        clip: true
 
-        //        contentWidth: contentColumn.width
-        contentHeight: contentColumn.height
+        Flickable {
+            id: view
+            anchors.top: parent.top
+            anchors.left: parent.left
+            anchors.right: parent.right
+            anchors.bottom: bottomField.top
+            anchors.topMargin: UI.DEFAULT_MARGIN / 2
+            anchors.bottomMargin: UI.DEFAULT_MARGIN / 2
+            anchors.leftMargin: UI.DEFAULT_MARGIN / 2
+            anchors.rightMargin: UI.DEFAULT_MARGIN / 2
+            clip: true
 
-        Column {
-            id: contentColumn
-            width: parent.width
-            spacing: UI.DEFAULT_MARGIN
 
-            Repeater {
+            contentHeight: contentColumn.height
+
+            Column {
+                id: contentColumn
                 width: parent.width
-                model: fontInfo.families
-
-                delegate: Rectangle {
-                    width: parent.width - 1
-                    height: childrenRect.height + UI.DEFAULT_MARGIN * 2
-                    border.width: 1
-                    color: "transparent"
-                    Column {
-                        anchors.top: parent.top
-                        anchors.left: parent.left
-                        anchors.right: parent.right
-//                        width: parent.width
-                        anchors.margins: UI.DEFAULT_MARGIN
-                        spacing: UI.DEFAULT_MARGIN
-                        Label {
-                            width: parent.width
-                            text: qsTr("<b>Font Family</b>: %1").arg(modelData)
-                        }
-                        Label {
-                            width: parent.width
-                            text: qsTr("<b>Example</b>: ")
-                        }
-                        Label {
-                            width: parent.width - UI.DEFAULT_MARGIN * 2
-                            x: UI.DEFAULT_MARGIN
-                            text: qsTr("The quick brown fox jumps over the lazy dog")
-                            font.family: modelData
-                        }
-                        FontsConfProperties {
-                            id: fontProp
-                            width: parent.width
-                            fontconf: fontInfo.fontProperty(modelData)
-                            Connections {
-                                target: fontInstallPage
-                                onSaveProperties: {
-                                    fontProp.save()
+                spacing: UI.DEFAULT_MARGIN
+
+                Repeater {
+                    width: parent.width
+                    model: fontInfo.families
+
+                    delegate: Item {
+                        width: parent.width
+                        height: itemColumn.height + UI.DEFAULT_MARGIN * 2
+                        Rectangle {
+                            width: parent.width - 1
+                            height: parent.height - 1
+                            border.width: 1
+                            color: "transparent"
+                            Column {
+                                id: itemColumn
+                                anchors.top: parent.top
+                                anchors.left: parent.left
+                                anchors.right: parent.right
+                                //                        width: parent.width
+                                anchors.margins: UI.DEFAULT_MARGIN
+                                spacing: UI.DEFAULT_MARGIN
+                                Label {
+                                    width: parent.width
+                                    text: qsTr("<b>Font Family</b>: %1").arg(modelData)
+                                }
+                                Label {
+                                    width: parent.width
+                                    text: qsTr("<b>Example</b>: ")
+                                }
+                                Label {
+                                    width: parent.width - UI.DEFAULT_MARGIN * 2
+                                    x: UI.DEFAULT_MARGIN
+                                    text: qsTr("The quick brown fox jumps over the lazy dog")
+                                    font.family: modelData
+                                }
+                                FontsConfProperties {
+                                    id: fontProp
+                                    width: parent.width
+                                    fontconf: fontInfo.fontProperty(modelData)
+                                    Connections {
+                                        target: fontInstallPage
+                                        onSaveProperties: {
+                                            fontProp.save()
+                                        }
+                                    }
                                 }
                             }
                         }
                     }
                 }
+
+            }
+
+        }
+
+        ScrollDecorator {
+            flickableItem: view
+        }
+
+        Item {
+            id: bottomField
+            anchors.bottom: parent.bottom
+            anchors.left: parent.left
+            anchors.right: parent.right
+            height: installButton.height + UI.DEFAULT_MARGIN * 2
+
+            Rectangle {
+                id: bgrect
+                anchors.fill: parent
+                gradient: Gradient {
+                    GradientStop { position: 0.0; color: Qt.lighter("#76221d") }
+                    GradientStop { position: 1.0; color: Qt.lighter("#bd543d") }
+                }
             }
 
             Button {
                 id: installButton
+                anchors.centerIn: parent
                 text: qsTr("Install")
-                anchors.horizontalCenter: parent.horizontalCenter
                 onClicked: {
                     saveProperties()
                     if (!controller.fontDirExists)
-                        createFontDirDialog.open()
+                        openCreateFontDirDialog()
                     else
-                        installFont()
+                        installFont(false)
                 }
             }
         }
+    }
+
+
+    function openCreateFontDirDialog()
+    {
+        queryDialog.titleText = qsTr("Create it?")
+        queryDialog.message = qsTr("Local fonts directory '%1' does not exists!  Create it now?").arg(controller.fontDir)
+        queryDialog.acceptButtonText = qsTr("OK")
+        queryDialog.rejectButtonText = qsTr("Cancel")
+        queryDialog.accepted.connect(createFontDir)
+        queryDialog.open()
+    }
 
+    function createFontDir()
+    {
+        queryDialog.accepted.disconnect(createFontDir)
+        controller.createFontDir()
+        installFont(false)
     }
 
-    QueryDialog {
-        id: createFontDirDialog
-        titleText: qsTr("Create it?")
-        message: qsTr("Local fonts directory '%1' does not exists!  Create it now?").arg(controller.fontDir)
-        acceptButtonText: qsTr("OK")
-        rejectButtonText: qsTr("Cancel")
-        onAccepted: {
-            controller.createFontDir()
-            installFont()
-        }
+    function openOverwriteFontDialog()
+    {
+        queryDialog.titleText = qsTr("Overwrite it?")
+        queryDialog.message = qsTr("Local font '%1' already exists!  Overwrite it?").arg(fontInfo.fileName)
+        queryDialog.acceptButtonText = qsTr("OK")
+        queryDialog.rejectButtonText = qsTr("Cancel")
+        queryDialog.accepted.connect(overwriteFont)
+        queryDialog.open()
     }
 
-    QueryDialog {
-        id: overwriteFontDialog
-        titleText: qsTr("Overwrite it?")
-        message: qsTr("Local font '%1' already exists!  Overwrite it?").arg(fontInfo.fileName)
-        acceptButtonText: qsTr("OK")
-        rejectButtonText: qsTr("Cancel")
-        onAccepted: controller.installFont(fontInfo)
+    function overwriteFont()
+    {
+        queryDialog.accepted.disconnect(overwriteFont)
+        installFont(true)
     }
 
     ToolBarLayout {
index 966ea94..924c8ed 100644 (file)
@@ -43,7 +43,7 @@ import com.nokia.extras 1.0
 import 'UIConstants.js' as UI
 import 'EditorHelper.js' as Helper
 
-Page {
+Item {
     id: editorPage
 
     property string family
@@ -57,8 +57,7 @@ Page {
 
     onEditorControllerChanged: {
         if (editorController) {
-            modelSyncConnections.createObject(editorPage, {target: editorController})
-            editorController.syncFamilyList()
+            Helper.setConnection(editorController)
         }
     }
 
@@ -80,7 +79,6 @@ Page {
     function insertFamily(family, priority, systemFont)
     {
         var index = Helper.index(priority)
-        //        console.log("insertFamily(" + family + "," + priority + "): " + controller.localeFamily(family))
         preferFamilyList.insert(index, {
                                     "title": controller.localeFamily(family),
                                     "subtitle": (systemFont ? qsTr("System Font") : qsTr("User Font")),
@@ -94,7 +92,6 @@ Page {
 
     function addFamily(section, family, priority, systemFont)
     {
-        //        console.log("addFamily(" + family + "," + priority + "): " + controller.localeFamily(family))
         preferFamilyList.append({
                                     "title": controller.localeFamily(family),
                                     "subtitle": (systemFont ? qsTr("System Font") : qsTr("User Font")),
diff --git a/qml/fontmanager/HelpDialog.js b/qml/fontmanager/HelpDialog.js
new file mode 100644 (file)
index 0000000..c57e6ee
--- /dev/null
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 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."
+**
+****************************************************************************/
+
+var dialogComponent
+var helpDialog
+
+function openHelpDialog(parent, anchorTarget, message, acceptedFunc)
+{
+    deleteHelpDialog()
+    if (!dialogComponent) {
+        dialogComponent = Qt.createComponent("HelpDialog.qml")
+        if (dialogComponent.status !== Component.Ready) {
+            console.log("Error: " + dialogComponent.errorString())
+        }
+    }
+    helpDialog = dialogComponent.createObject(parent, { "anchors.fill": anchorTarget, "message": message } )
+    if (!helpDialog) {
+        console.log("Error: " + dialogComponent.errorString())
+    }
+    helpDialog.clicked.connect(acceptedFunc)
+    helpDialog.clicked.connect(deleteHelpDialog)
+}
+
+function deleteHelpDialog()
+{
+    if (helpDialog)
+        helpDialog.destroy()
+    helpDialog = null
+}
index da85d8c..a5d4ef5 100644 (file)
@@ -72,7 +72,10 @@ Item {
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.bottom: parent.bottom
             anchors.margins: UI.DEFAULT_MARGIN
-            onClicked: helpDialog.clicked()
+            onClicked: {
+                helpDialog.visible = false
+                helpDialog.clicked()
+            }
         }
 
     }
index c8ed7c7..c72fc9b 100644 (file)
@@ -153,19 +153,23 @@ Page {
         }
     }
 
-    QueryDialog {
-        id: confirmDialog
-        property int fontcount: 1
-        property variant fontlist
-        titleText: qsTr("Delete Font?")
-        message: fontcount > 1 ?
-                     qsTr("This Font has %1 families(%2).  Do you really want to remove these fonts now?").arg(fontcount).arg(fontlist.join(qsTr(', '))) :
-                     qsTr("Do you really want to remove this font now?")
-        acceptButtonText: qsTr("OK")
-        rejectButtonText: qsTr("Cancel")
-        onAccepted: {
-            controller.uninstallFont(fontInfo.file)
-        }
+    function openDeleteConfirmDialog(fontcount, fontlist)
+    {
+        queryDialog.titleText = qsTr("Delete Font?")
+        if (fontcount > 1)
+            queryDialog.message = qsTr("This Font has %1 families(%2).  Do you really want to remove these fonts now?").arg(fontcount).arg(fontlist ? fontlist.join(qsTr(', ')) : qsTr("Unknown"))
+        else
+            queryDialog.message = qsTr("Do you really want to remove this font now?")
+        queryDialog.acceptButtonText = qsTr("OK")
+        queryDialog.rejectButtonText = qsTr("Cancel")
+        queryDialog.accepted.connect(uninstallFont)
+        queryDialog.open()
+    }
+
+    function uninstallFont()
+    {
+        queryDialog.accepted.disconnect(uninstallFont)
+        controller.uninstallFont(fontInfo.file)
     }
 
     ToolBarLayout {
@@ -180,11 +184,10 @@ Page {
         }
         ToolIcon {
             platformIconId: "toolbar-delete"
+            anchors.horizontalCenter: parent.horizontalCenter
             onClicked: {
                 var fontlist = controller.fontCount(fontInfo.file)
-                confirmDialog.fontcount = fontlist.length
-                confirmDialog.fontlist = fontlist
-                confirmDialog.open()
+                openDeleteConfirmDialog(fontlist.length, fontlist)
             }
         }
     }
index 9f9f366..c5a76ad 100644 (file)
@@ -41,14 +41,12 @@ import com.nokia.meego 1.0
 import com.nokia.extras 1.0
 import 'UIConstants.js' as UI
 
+import "HelpDialog.js" as HelpHelper
+
 Page {
     id: mainPage
     tools: mainTools
 
-    onEnabledChanged: {
-        console.log("mainPage.enabled: " + enabled)
-    }
-
     property bool disableTools: false
 
     property bool showHelp: false
@@ -60,15 +58,6 @@ Page {
                                      "<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>"
                                      )
 
-    PageHeader {
-        id: pageHeader
-        anchors.top: parent.top
-        anchors.left: parent.left
-        anchors.right: parent.right
-        enabled: !disableTools
-        text: qsTr("Installed Fonts")
-    }
-
     Connections {
         target: controller
         onClearInstalledFontList: {
@@ -83,6 +72,15 @@ Page {
         id: installedFontList
     }
 
+    PageHeader {
+        id: pageHeader
+        anchors.top: parent.top
+        anchors.left: parent.left
+        anchors.right: parent.right
+        enabled: !disableTools
+        text: qsTr("Installed Fonts")
+    }
+
     Item {
         id: contents
         anchors.top: pageHeader.bottom
@@ -104,7 +102,10 @@ Page {
                 onClicked: {
                     if (mainMenu.status !== DialogStatus.Closed)
                         mainMenu.close()
-                    pageStack.push(installedFontInfoPageComponent, { "fontInfo": controller.fontInfo(title, subtitle) } );
+                    var component = Qt.createComponent("InstalledFontInfoPage.qml")
+                    if (component.status === Component.Error)
+                        console.log("Error: " + component.errorString())
+                    pageStack.push(component, { "fontInfo": controller.fontInfo(title, subtitle) } );
                 }
             }
 
@@ -139,25 +140,6 @@ Page {
         visible: running
     }
 
-    Loader {
-        id: componentLoader
-    }
-
-    Component {
-        id: installedFontInfoPageComponent
-        InstalledFontInfoPage { }
-    }
-
-    Component {
-        id: fontsConfViewPageComponent
-        FontsConfViewPage { }
-    }
-
-    Component {
-        id: editFontsConfPageComponent
-        EditFontsConfPage {}
-    }
-
     ToolBarLayout {
         id: mainTools
         visible: true
@@ -176,7 +158,10 @@ Page {
             onClicked: {
                 if (mainMenu.status !== DialogStatus.Closed)
                     mainMenu.close()
-                pageStack.push(editFontsConfPageComponent)
+                var component = Qt.createComponent("EditFontsConfPage.qml")
+                if (component.status === Component.Error)
+                    console.log("Error: " + component.errorString())
+                pageStack.push(component)
             }
         }
         ToolIcon {
@@ -202,77 +187,75 @@ Page {
                     if (mainMenu.status !== DialogStatus.Closed)
                         mainMenu.close()
                     if (controller.localFontsConfExists)
-                        createConfirmDialog.open()
+                        openCreateConfirmDialog()
                     else
-                        controller.createRecommendedSettings()
+                        createRecommendedSettings()
                 }
             }
             MenuItem {
                 id: backupConfigItem
                 text: qsTr("Backup Config")
                 onClicked: backupConfig()
+                enabled: !controller.isEmptyFontsConf
             }
             MenuItem {
                 id: restoreConfigItem
                 text: qsTr("Restore Config")
-                onClicked: pageStack.push(restoreFontsConfPageComponent)
+                onClicked: {
+                    var component = Qt.createComponent("RestoreFontsConfPage.qml")
+                    if (component.status === Component.Error)
+                        console.log("Error: " + component.errorString())
+                    pageStack.push(component)
+                }
             }
             MenuItem {
                 text: qsTr("About")
-                onClicked: aboutDialog.open()
+                onClicked: openAboutDialog()
             }
             MenuItem {
                 text: qsTr("Help")
-                onClicked: showHelp = true
+                onClicked: {
+                    showHelp = true
+                    HelpHelper.openHelpDialog(mainPage, contents, helpMessage, closeHelp)
+                }
             }
         }
     }
 
-    QueryDialog {
-        id: createConfirmDialog
-        titleText: qsTr("Replace it?")
-        message: qsTr("Existing %1 will be replaced by recommended settings.  Are you sure?").arg(controller.localFontsConfPath)
-        acceptButtonText: qsTr("OK")
-        rejectButtonText: qsTr("Cancel")
-        onAccepted: controller.createRecommendedSettings()
-    }
-
-    HelpDialog {
-        id: helpDialog
-        anchors.fill: contents
-        message: helpMessage
-        visible: showHelp
-        onClicked: showHelp = false
+    function openCreateConfirmDialog()
+    {
+        queryDialog.titleText = qsTr("Replace it?")
+        queryDialog.message = qsTr("Existing %1 will be replaced by recommended settings.  Are you sure?").arg(controller.localFontsConfPath)
+        queryDialog.acceptButtonText = qsTr("OK")
+        queryDialog.rejectButtonText = qsTr("Cancel")
+        queryDialog.accepted.connect(createRecommendedSettings)
+        queryDialog.open()
     }
 
-    QueryDialog {
-        id: aboutDialog
-        titleText: qsTr("Font Manager for N9")
-        message: qsTr("Version: %1\nAuthor: Takumi Asaki <takumi.asaki@gmail.com>\n\nApplication Icon is created by hirao").arg(controller.version)
-        acceptButtonText: qsTr("Close")
+    function createRecommendedSettings()
+    {
+        queryDialog.accepted.disconnect(createRecommendedSettings)
+        controller.createRecommendedSettings()
     }
 
-    QueryDialog {
-        id: backupDialog
-        width: parent.width
-        property string filepath
-        titleText: qsTr("Backup finished")
-        message: qsTr("Current config is backuped as '%1'").arg(filepath)
-        acceptButtonText: qsTr("Close")
+    function openAboutDialog()
+    {
+        queryDialog.titleText = qsTr("Font Manager for N9")
+        queryDialog.message = qsTr("Version: %1\nAuthor: Takumi Asaki <takumi.asaki@gmail.com>\n\nApplication Icon is created by hirao").arg(controller.version)
+        queryDialog.acceptButtonText = qsTr("Close")
+        queryDialog.rejectButtonText = ""
+        queryDialog.open()
     }
 
-    Component {
-        id: restoreFontsConfPageComponent
-        RestoreFontsConfPage { }
+    function closeHelp()
+    {
+        showHelp = false
     }
 
     function backupConfig()
     {
         var filepath = controller.defaultBackupFilename()
         controller.backupConfig(filepath)
-        var displaypath = filepath.replace(/^\/home\/[^/]*\//, "~/")
-        backupDialog.filepath = displaypath
-        backupDialog.open()
     }
 
     states: [
index c7e254d..8ee92bc 100644 (file)
@@ -11,14 +11,12 @@ Item {
     property alias text: label.text
 
     Rectangle {
+        id: bgrect
         anchors.fill: parent
         gradient: Gradient {
             GradientStop { position: 0.0; color: Qt.lighter("#bd543d") }
             GradientStop { position: 1.0; color: Qt.lighter("#76221d") }
         }
-        Component.onCompleted: {
-            console.log("PageHeader: " + width + " x " + height)
-        }
     }
 
     Label {
@@ -28,4 +26,4 @@ Item {
         font.pixelSize: UI.FONT_LARGE
         font.bold: true
     }
-}
\ No newline at end of file
+}
index b5a4145..364547d 100644 (file)
@@ -48,15 +48,30 @@ FileSelectionPage {
     folder: controller.backupDir
     nameFilters: [ "*.conf" ]
 
-    function restoreConfig(filename)
+    property url restoreFilePath
+
+    onClicked: {
+        restoreFilePath = filePath
+        if (controller.localFontsConfExists)
+            openRestoreConfirmDialog()
+        else
+            restoreFontsConf()
+    }
+
+    function openRestoreConfirmDialog()
     {
-        console.log("Restore: " + filename)
-        controller.restoreConfig(filename)
+        queryDialog.titleText = qsTr("Restore it?")
+        queryDialog.message = qsTr("Existing Fonts Config will be replaced by '%1'.  Are you sure?").arg(controller.url2path(restoreFilePath))
+        queryDialog.acceptButtonText = qsTr("OK")
+        queryDialog.rejectButtonText = qsTr("Cancel")
+        queryDialog.accepted.connect(restoreFontsConf)
+        queryDialog.open()
     }
 
-    onClicked: {
-        restoreConfig(filePath)
-        pageStack.pop()
+    function restoreFontsConf()
+    {
+        queryDialog.accepted.disconnect(restoreFontsConf)
+        controller.restoreConfig(restoreFilePath)
     }
 
 }
diff --git a/qml/fontmanager/SelectInstallFamilyDialog.qml b/qml/fontmanager/SelectInstallFamilyDialog.qml
new file mode 100644 (file)
index 0000000..448c366
--- /dev/null
@@ -0,0 +1,19 @@
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import 'UIConstants.js' as UI
+
+MultiSelectionDialog {
+    id: selectInstallFamily
+    model: installableFamilyListModel
+    property Item editor
+    acceptButtonText: qsTr("Add")
+    titleText: qsTr("Add Family for %1").arg(editor !== null ? editor.familyName : qsTr("Unknwon"))
+    onAccepted: {
+        for (var i = 0; i < selectedIndexes.length; i++) {
+            var idx = selectedIndexes[i]
+            var sItem = installableFamilyListModel.get(idx)
+            editor.editorController.appendFamily(sItem.enfamily, currentPriority)
+            editor.insertFamily(sItem.enfamily, currentPriority, sItem.systemFont)
+        }
+    }
+}
index ba9f11f..6929f1a 100644 (file)
@@ -49,24 +49,41 @@ PageStackWindow {
         id: mainPage
     }
 
+    property string filePath
+    property string alertMessage
+
     Connections {
         target: controller
         onAlertDialog: {
-            alertDialog.message = message
-            alertDialog.open()
+            alertMessage = message
+            openAlertDialog()
         }
+
         onInstallFinished: {
-            installFinishedDialog.fontpath = fontpath
-            installFinishedDialog.open()
+            filePath = fontpath
+            openInstallFinishedDialog()
         }
+
         onUninstallFinished: {
-            uninstallFinishedDialog.fontpath = fontpath
-            uninstallFinishedDialog.open()
+            filePath = fontpath
+            openUninstallFinishedDialog()
+        }
+
+        onBackupConfigFinished: {
+            filePath = filepath
+            openBackupConfigFinishedDialog()
+        }
+
+        onRestoreConfigFinished: {
+            filePath = filepath
+            openRestoreConfigFinishedDialog()
         }
+
         onClearInstallableFamilyListFor: {
             installableFamilyListModel.clear()
             installableFamilyListModel.family = family;
         }
+
         onAppendInstallableFamily: {
             installableFamilyListModel.append( { "name": family, "enfamily": enfamily, "systemFont": systemFont } )
         }
@@ -83,30 +100,87 @@ PageStackWindow {
         }
     }
 
-    QueryDialog {
-        id: alertDialog
-        titleText: qsTr("Alert")
-        acceptButtonText: qsTr("OK")
+    function openAlertDialog()
+    {
+        queryDialog.statusChanged.disconnect(openAlertDialog)
+        if (queryDialog.status !== DialogStatus.Closed) {
+            queryDialog.statusChanged.connect(openAlertDialog)
+            return
+        }
+        queryDialog.titleText = qsTr("Alert")
+        queryDialog.message = alertMessage
+        queryDialog.acceptButtonText = qsTr("Close")
+        queryDialog.rejectButtonText = ""
+        queryDialog.open()
     }
 
-    QueryDialog {
-        id: installFinishedDialog
-        property string fontpath: "Unknown"
-        titleText: qsTr("Install finished")
-        message: qsTr("Font '%1' is installed successfully.").arg(fontpath)
-        acceptButtonText: qsTr("Close")
-        onAccepted: { pageStack.pop(mainPage) }
-        onRejected: { pageStack.pop(mainPage) }
+    function openFinishedDialog()
+    {
+        queryDialog.acceptButtonText = qsTr("Close")
+        queryDialog.rejectButtonText = ""
+        queryDialog.accepted.connect(popToMainPage)
+        queryDialog.rejected.connect(popToMainPage)
+        queryDialog.open()
+    }
+
+    function openInstallFinishedDialog()
+    {
+        queryDialog.statusChanged.disconnect(openInstallFinishedDialog)
+        if (queryDialog.status !== DialogStatus.Closed) {
+            queryDialog.statusChanged.connect(openInstallFinishedDialog)
+            return
+        }
+        queryDialog.titleText = qsTr("Install finished")
+        queryDialog.message = qsTr("Font '%1' is installed successfully.").arg(filePath)
+        openFinishedDialog()
+    }
+
+    function openUninstallFinishedDialog()
+    {
+        queryDialog.statusChanged.disconnect(openUninstallFinishedDialog)
+        if (queryDialog.status !== DialogStatus.Closed) {
+            queryDialog.statusChanged.connect(openUninstallFinishedDialog)
+            return
+        }
+        queryDialog.titleText = qsTr("Uninstall finished")
+        queryDialog.message = qsTr("Font '%1' is uninstalled successfully.").arg(filePath)
+        openFinishedDialog()
+    }
+
+    function openBackupConfigFinishedDialog()
+    {
+        queryDialog.statusChanged.disconnect(openBackupConfigFinishedDialog)
+        if (queryDialog.status !== DialogStatus.Closed) {
+            queryDialog.statusChanged.connect(openBackupConfigFinishedDialog)
+            return
+        }
+        queryDialog.titleText = qsTr("Backup finished")
+        queryDialog.message = qsTr("Fonts Config is backuped as '%1' successfully.").arg(filePath)
+        openFinishedDialog()
+    }
+
+    function openRestoreConfigFinishedDialog()
+    {
+        queryDialog.statusChanged.disconnect(openRestoreConfigFinishedDialog)
+        if (queryDialog.status !== DialogStatus.Closed) {
+            queryDialog.statusChanged.connect(openRestoreConfigFinishedDialog)
+            return
+        }
+        queryDialog.titleText = qsTr("Restore finished")
+        queryDialog.message = qsTr("Fonts Config is restored from '%1' successfully.").arg(filePath)
+        openFinishedDialog()
+    }
+
+    function popToMainPage()
+    {
+        queryDialog.accepted.disconnect(popToMainPage)
+        queryDialog.rejected.disconnect(popToMainPage)
+        if (pageStack.currentPage !== mainPage)
+            pageStack.pop(mainPage)
     }
 
     QueryDialog {
-        id: uninstallFinishedDialog
-        property string fontpath: "Unknown"
-        titleText: qsTr("Uninstall finished")
-        message: qsTr("Font '%1' is uninstalled successfully.").arg(fontpath)
-        acceptButtonText: qsTr("Close")
-        onAccepted: pageStack.pop(mainPage)
-        onRejected: pageStack.pop(mainPage)
+        id: queryDialog
     }
 
 }
index 70eccda..66aa674 100644 (file)
@@ -1,3 +1,11 @@
+fontmanager (0.4.95) unstable; urgency=low
+
+  0.5RC
+  * UI improvments
+  * UI Optimizations
+
+ -- Takumi Asaki <takumi.asaki@gmail.com>  Mon,  9 Apr 2012 21:45:00 +0900
+
 fontmanager (0.4.9) unstable; urgency=low
 
   0.5 beta
index bf72a4d..f845c4e 100644 (file)
@@ -4,12 +4,20 @@
 <context>
     <name>ApplicationController</name>
     <message>
-        <location filename="../applicationcontroller.cpp" line="+341"/>
+        <location filename="../applicationcontroller.cpp" line="+378"/>
         <source>Could not remove Font &apos;%1&apos;</source>
         <translation>フォント &apos;%1&apos; を削除できません</translation>
     </message>
 </context>
 <context>
+    <name>BottomButtons</name>
+    <message>
+        <location filename="../qml/fontmanager/BottomButtons.qml" line="+63"/>
+        <source>Import System Settings</source>
+        <translation>システム設定のインポート</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"/>
+        <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="+28"/>
+        <location line="+23"/>
         <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>等幅</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Add</source>
-        <translation>追加</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Add Family for %1</source>
-        <translation>%1 に追加するフォントファミリー</translation>
-    </message>
-    <message>
-        <location line="+74"/>
+        <location line="+111"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location line="-16"/>
+        <location line="-19"/>
         <source>Remove current fonts config</source>
         <translation>現在のフォント設定を削除</translation>
     </message>
     <message>
-        <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;Middle&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="obsolete">&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;Middle&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.</translation>
+        <location line="-91"/>
+        <source>System</source>
+        <translation>システム</translation>
     </message>
     <message>
         <location line="+8"/>
+        <source>Edit Fonts Config: %1</source>
+        <translation>フォント設定の編集: %1</translation>
+    </message>
+    <message>
+        <location line="+91"/>
         <source>View current fonts config</source>
         <translation>現在のフォント設定を表示</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+27"/>
         <source>Remove it?</source>
         <translation>削除しますか?</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>OK</source>
-        <translation>はい</translation>
+        <translation>OK</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
+    <message>
+        <location line="+37"/>
+        <source>Select Family to edit</source>
+        <translation>編集するファミリの選択</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>フォントのインストール</translation>
     </message>
     <message>
-        <location line="+38"/>
+        <location line="+52"/>
         <source>&lt;b&gt;Font Family&lt;/b&gt;: %1</source>
         <translation>&lt;b&gt;フォントファミリー&lt;/b&gt;: %1</translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+46"/>
         <source>Install</source>
         <translation>インストール</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+15"/>
         <source>Create it?</source>
         <translation>作成しますか?</translation>
     </message>
     </message>
     <message>
         <location line="+1"/>
-        <location line="+12"/>
+        <location line="+17"/>
         <source>OK</source>
-        <translation>はい</translation>
+        <translation>OK</translation>
     </message>
     <message>
-        <location line="-11"/>
-        <location line="+12"/>
+        <location line="-16"/>
+        <location line="+17"/>
         <source>Cancel</source>
         <translation>キャンセル</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>インストールするフォントの選択</translation>
     </message>
 <context>
     <name>FontsConfEditor</name>
     <message>
-        <location filename="../qml/fontmanager/FontsConfEditor.qml" line="+66"/>
-        <source>Edit Fonts Config: %1</source>
-        <translation>フォント設定の編集: %1</translation>
-    </message>
-    <message>
-        <location line="+16"/>
+        <location filename="../qml/fontmanager/FontsConfEditor.qml" line="+70"/>
         <source>Priority: %1</source>
         <translation>優先順位: %1</translation>
     </message>
     <message>
-        <location line="+15"/>
         <location line="+14"/>
+        <location line="+13"/>
         <source>System Font</source>
         <translation>システムフォント</translation>
     </message>
     <message>
-        <location line="-14"/>
-        <location line="+14"/>
+        <location line="-13"/>
+        <location line="+13"/>
         <source>User Font</source>
         <translation>ユーザーフォント</translation>
     </message>
-    <message>
-        <location line="+68"/>
-        <source>Import System Settings</source>
-        <translation>システム設定のインポート</translation>
-    </message>
 </context>
 <context>
     <name>FontsConfEditorController</name>
     <message>
-        <source>High</source>
-        <translation type="obsolete">高</translation>
-    </message>
-    <message>
-        <location filename="../fontsconfeditorcontroller.cpp" line="+57"/>
+        <location filename="../fontsconfeditorcontroller.cpp" line="+79"/>
         <source>Higher</source>
         <translation>高</translation>
     </message>
         <source>Lower</source>
         <translation>低</translation>
     </message>
-    <message>
-        <source>Low</source>
-        <translation type="obsolete">低</translation>
-    </message>
 </context>
 <context>
     <name>FontsConfProperties</name>
 <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>現在のフォント設定</translation>
     </message>
     </message>
     <message>
         <location line="+63"/>
-        <source>OK</source>
-        <translation>はい</translation>
+        <source>Close</source>
+        <translation>閉じる</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>インストール済みフォントの詳細</translation>
     </message>
         <translation>&lt;b&gt;フォント設定&lt;/b&gt;</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+12"/>
         <source>Delete Font?</source>
         <translation>フォントを削除しますか?</translation>
     </message>
         <translation>このフォントには %1 個のファミリー(%2)があります。これら全てのフォントを削除しますか?</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+0"/>
+        <source>Unknown</source>
+        <translation>不明</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Do you really want to remove this font now?</source>
         <translation>このフォントを削除しますか?</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>OK</source>
-        <translation>はい</translation>
+        <translation>OK</translation>
     </message>
     <message>
         <location line="+1"/>
 <context>
     <name>MainPage</name>
     <message>
-        <location filename="../qml/fontmanager/MainPage.qml" line="+74"/>
+        <location filename="../qml/fontmanager/MainPage.qml" line="+81"/>
         <source>Installed Fonts</source>
         <translation>インストール済みフォント</translation>
     </message>
     <message>
-        <location line="+187"/>
+        <location line="+164"/>
+        <source>Close</source>
+        <translation>閉じる</translation>
+    </message>
+    <message>
+        <location line="+30"/>
         <source>No Fonts Installed</source>
         <translation>フォントは未インストールです</translation>
     </message>
     <message>
-        <location line="-48"/>
+        <location line="-63"/>
         <source>About</source>
         <translation>Font managerについて</translation>
     </message>
     <message>
-        <location line="-158"/>
+        <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="+162"/>
+        <location line="+163"/>
         <source>Help</source>
         <translation>ヘルプ</translation>
     </message>
     <message>
-        <location line="-15"/>
+        <location line="-31"/>
         <source>Create Recommended Settings</source>
         <translation>推奨設定の作成</translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="+12"/>
+        <source>Backup Config</source>
+        <translation>設定のバックアップ</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Restore Config</source>
+        <translation>設定の復旧</translation>
+    </message>
+    <message>
+        <location line="+24"/>
         <source>Replace it?</source>
         <translation>置き換えますか?</translation>
     </message>
     </message>
     <message>
         <location line="+1"/>
-        <location line="+17"/>
         <source>OK</source>
         <translation>はい</translation>
     </message>
     <message>
-        <location line="-16"/>
+        <location line="+1"/>
         <source>Cancel</source>
         <translation>キャンセル</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+13"/>
         <source>Font Manager for N9</source>
         <translation>N9用フォントマネージャ</translation>
     </message>
@@ -451,21 +461,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>復旧させるフォント設定</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Restore it?</source>
+        <translation>復旧しますか</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Existing Fonts Config will be replaced by &apos;%1&apos;.  Are you sure?</source>
+        <translation>既存のフォント設定は %1 で置き換えられます。よろしいですか?</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>OK</source>
         <translation>はい</translation>
     </message>
     <message>
-        <location line="-19"/>
+        <location line="+1"/>
+        <source>Cancel</source>
+        <translation>キャンセル</translation>
+    </message>
+</context>
+<context>
+    <name>SelectInstallFamilyDialog</name>
+    <message>
+        <location filename="../qml/fontmanager/SelectInstallFamilyDialog.qml" line="+9"/>
+        <source>Add</source>
+        <translation>追加</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Add Family for %1</source>
+        <translation>%1 に追加するフォントファミリー</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Unknwon</source>
+        <translation>不明</translation>
+    </message>
+</context>
+<context>
+    <name>main</name>
+    <message>
+        <location filename="../qml/fontmanager/main.qml" line="+110"/>
         <source>Alert</source>
         <translation>警告</translation>
     </message>
     <message>
+        <location line="+2"/>
         <location line="+7"/>
+        <source>Close</source>
+        <translation>閉じる</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>Install finished</source>
         <translation>インストール完了</translation>
     </message>
@@ -475,7 +530,7 @@ Application Icon is created by hirao</source>
         <translation>フォント &apos;%1&apos; のインストールが成功しました。</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+11"/>
         <source>Uninstall finished</source>
         <translation>アンインストール完了</translation>
     </message>
@@ -484,5 +539,25 @@ Application Icon is created by hirao</source>
         <source>Font &apos;%1&apos; is uninstalled successfully.</source>
         <translation>フォント &apos;%1&apos; のアンインストールが成功しました。</translation>
     </message>
+    <message>
+        <location line="+11"/>
+        <source>Backup finished</source>
+        <translation>バックアップ完了</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Fonts Config is backuped as &apos;%1&apos; successfully.</source>
+        <translation>フォントの設定を %1 にバックアップしました。</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Restore finished</source>
+        <translation>復旧完了</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Fonts Config is restored from &apos;%1&apos; successfully.</source>
+        <translation>フォントの設定を %1 から復旧しました。</translation>
+    </message>
 </context>
 </TS>
index 476e52c..9463a39 100644 (file)
@@ -21,8 +21,6 @@ for(file, files) {
     lang = $$replace(file, .*_([^/]*)\\.ts, \\1)
     v = ts-$${lang}.commands
     $$v = cd $$wd && $$LUPDATE $$sources -ts $$file
-    v = ts-$${lang}.depends
-    $$v = extract
     QMAKE_EXTRA_TARGETS += ts-$$lang
 }
 ts-all.commands = cd $$wd && $$LUPDATE $$sources -ts $$files