QString ApplicationController::version() const
{
- return QLatin1String("0.4.9(0.5beta)");
+ return QLatin1String("0.4.95(0.5RC)");
}
QString ApplicationController::currentLanguage() 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) {
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()
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)
QUrl backupDir() const;
Q_INVOKABLE QString defaultBackupFilename() const;
+ Q_INVOKABLE QString url2path(const QUrl &url) const;
+
public slots:
void updateAllEditorController();
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);
void backupDirChanged();
+ void dummySignal();
+
private slots:
void readFcListFinished();
if (restoredConf->isValid()) {
mLocalFontsConf->copy(restoredConf);
emit fontsConfUpdated();
- restoredConf->deleteLater();
+ delete restoredConf;
}
}
{
if (mElements)
mModified = true;
- FontsConfElementPointer rootElem(new FontsConfElement(FONTCONFIG_DEF, this));
+ FontsConfElementPointer rootElem(new FontsConfElement(FONTCONFIG_DEF));
mElements = rootElem;
}
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;
}
if (state == InvalidConfig)
- qDebug("Invalid Config!!!");
+ qWarning("Invalid Config!!!");
if (state == InvalidConfig)
break;
--- /dev/null
+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
+ }
+}
// 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
"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 {
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
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: [
name: "showHelp"
when: showHelp
PropertyChanges {
- target: editFontsConfTab
+ target: contents
enabled: false
}
PropertyChanges {
**
****************************************************************************/
-var sectionIndexes;
+var sectionIndexes
+var connectionObject
function init()
{
sectionIndexes[key]--
}
}
+
+function setConnection(editController)
+{
+ if (connectionObject)
+ connectionObject.destroy()
+ connectionObject = modelSyncConnections.createObject(editorPage, {target: editController})
+ editController.syncFamilyList()
+}
Column {
anchors.verticalCenter: parent.verticalCenter
- Label {
+ Text {
id: mainText
text: model.title
font.weight: listItem.titleWeight
color: listItem.titleColor
}
- Label {
+ Text {
id: subText
text: model.subtitle
font.weight: listItem.subtitleWeight
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
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
signal saveProperties
- function installFont()
+ function installFont(checked)
{
- if (controller.fontExists(fontInfo))
- overwriteFontDialog.open()
+ if (!checked && controller.fontExists(fontInfo))
+ openOverwriteFontDialog()
else
controller.installFont(fontInfo);
}
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 {
import 'UIConstants.js' as UI
import 'EditorHelper.js' as Helper
-Page {
+Item {
id: editorPage
property string family
onEditorControllerChanged: {
if (editorController) {
- modelSyncConnections.createObject(editorPage, {target: editorController})
- editorController.syncFamilyList()
+ Helper.setConnection(editorController)
}
}
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")),
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")),
--- /dev/null
+/****************************************************************************
+**
+** 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
+}
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.margins: UI.DEFAULT_MARGIN
- onClicked: helpDialog.clicked()
+ onClicked: {
+ helpDialog.visible = false
+ helpDialog.clicked()
+ }
}
}
}
}
- 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 {
}
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)
}
}
}
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
"<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: {
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
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) } );
}
}
visible: running
}
- Loader {
- id: componentLoader
- }
-
- Component {
- id: installedFontInfoPageComponent
- InstalledFontInfoPage { }
- }
-
- Component {
- id: fontsConfViewPageComponent
- FontsConfViewPage { }
- }
-
- Component {
- id: editFontsConfPageComponent
- EditFontsConfPage {}
- }
-
ToolBarLayout {
id: mainTools
visible: true
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 {
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: [
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 {
font.pixelSize: UI.FONT_LARGE
font.bold: true
}
-}
\ No newline at end of file
+}
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)
}
}
--- /dev/null
+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)
+ }
+ }
+}
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 } )
}
}
}
- 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
}
}
+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
<context>
<name>ApplicationController</name>
<message>
- <location filename="../applicationcontroller.cpp" line="+341"/>
+ <location filename="../applicationcontroller.cpp" line="+378"/>
<source>Could not remove Font '%1'</source>
<translation>フォント '%1' を削除できません</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><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><hr/><p><b>Priorities</b>:<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>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><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.</source>
<translation><p>フォントファミリーを選択し、プロパティを編集します。</p><p><img src="image://theme/icon-m-toolbar-add">: フォントを設定ファイルの選択した <i>優先順位</i> に追加します。</p><p><img src="image://theme/icon-m-toolbar-delete">: フォントを設定ファイルの選択した <i>優先順位</i> から削除します。<i>注: フォントはアンインストールされません。</i></p><hr/><p><b>優先順位</b>:<p>&nbsp;&nbsp;<b>高</b>: これらのフォントは優先して使用されます。(fontconfig で 'prepend' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>標準</b>: これらのフォントがデフォルトで使用されます。(fontconfig で 'prefer' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>低</b>: これらのフォントは代替フォントして使用されます。(fontconfig で 'accept' されるフォントとして扱います)<br/><hr/><p><b>システム設定のインポート</b>: システム(/etc/fonts/local.conf)の設定をインポートします。</p><hr/><p><b>現在のフォント設定を削除</b>(メニュー): 現在のユーザーのフォント設定ファイルを削除します。</p><p><b>現在のフォント設定を表示</b>(メニュー): 現在のユーザーのフォント設定ファイルを表示します。</p><hr/>詳細は <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">fontconfig</a> も参照してください。</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><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><hr/><p><b>Priorities</b>:<p>&nbsp;&nbsp;<b>Higher</b>: These fonts have a higher priority. ('prepend' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Middle</b>: These fonts are usally used as default. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><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.</source>
- <translation type="obsolete"><p>フォントファミリーを選択し、プロパティを編集します。</p><p><img src="image://theme/icon-m-toolbar-add">: フォントを設定ファイルの選択した <i>優先順位</i> に追加します。</p><p><img src="image://theme/icon-m-toolbar-delete">: フォントを設定ファイルの選択した <i>優先順位</i> から削除します。<i>注: フォントはアンインストールされません。</i></p><hr/><p><b>優先順位</b>:<p>&nbsp;&nbsp;<b>高</b>: これらのフォントは優先して使用されます。(fontconfig で 'prepend' されるフォントとして扱います)<br/>&nbsp;&nbsp;<b>Middle</b>: These fonts are usally used as default. ('prefer' fonts in fontconfig)<br/>&nbsp;&nbsp;<b>Lowser</b>: These fonts have a lower priority. ('accept' fonts in fontconfig)<br/><hr/><p><b>Import System Settings</b>: Import settings from system(/etc/fonts/local.conf).</p><hr/><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.</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><b>Font Family</b>: %1</source>
<translation><b>フォントファミリー</b>: %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><b>フォント設定</b></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><h1>How to use</h1><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><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></source>
<translation><h1>使い方</h1><p><img src="image://theme/icon-m-toolbar-add">: フォントのインストール。事前にデバイスにフォントファイルをコピーしておいてください。現状では *.ttf と *.ttc のみサポートしています。</p><p><img src="image://theme/icon-m-toolbar-settings">: フォント設定(詳細設定). Serif/Sans Serif/等幅フォントへ任意のフォントを割り当てられます。</p><hr/><p><b>推奨設定の作成</b>(メニュー): 推奨設定を生成します。ユーザーがインストールしたフォントは<i>標準</i>の優先順位に割り当てます。システムのフォントは<i>高い</i>優先順位に割り当てられますが、ユーザーがインストールしたCJKフォントと競合するフォントの優先順位は<i>低く</i>なります。</p></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>
</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 '%1'. 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>
<translation>フォント '%1' のインストールが成功しました。</translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+11"/>
<source>Uninstall finished</source>
<translation>アンインストール完了</translation>
</message>
<source>Font '%1' is uninstalled successfully.</source>
<translation>フォント '%1' のアンインストールが成功しました。</translation>
</message>
+ <message>
+ <location line="+11"/>
+ <source>Backup finished</source>
+ <translation>バックアップ完了</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Fonts Config is backuped as '%1' 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 '%1' successfully.</source>
+ <translation>フォントの設定を %1 から復旧しました。</translation>
+ </message>
</context>
</TS>
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