diff --git a/kcms/colors/colors.cpp b/kcms/colors/colors.cpp index 45e752d4f..b7b73bb74 100644 --- a/kcms/colors/colors.cpp +++ b/kcms/colors/colors.cpp @@ -1,566 +1,566 @@ /* * Copyright (C) 2007 Matthew Woehlke * Copyright (C) 2007 Jeremy Whiting * Copyright (C) 2016 Olivier Churlaud * Copyright (C) 2019 Kai Uwe Broulik * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "colors.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../krdb/krdb.h" static const QString s_defaultColorSchemeName = QStringLiteral("Breeze"); K_PLUGIN_FACTORY_WITH_JSON(KCMColorsFactory, "kcm_colors.json", registerPlugin();) KCMColors::KCMColors(QObject *parent, const QVariantList &args) : KQuickAddons::ConfigModule(parent, args) , m_config(KSharedConfig::openConfig(QStringLiteral("kdeglobals"))) { qmlRegisterType(); - KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Choose the color scheme"), + KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Colors"), QStringLiteral("2.0"), QString(), KAboutLicense::GPL); about->addAuthor(i18n("Kai Uwe Broulik"), QString(), QStringLiteral("kde@privat.broulik.de")); setAboutData(about); m_model = new QStandardItemModel(this); m_model->setItemRoleNames({ {Qt::DisplayRole, QByteArrayLiteral("display")}, {SchemeNameRole, QByteArrayLiteral("schemeName")}, {PaletteRole, QByteArrayLiteral("palette")}, {RemovableRole, QByteArrayLiteral("removable")}, {PendingDeletionRole, QByteArrayLiteral("pendingDeletion")} }); } KCMColors::~KCMColors() { m_config->markAsClean(); } QStandardItemModel *KCMColors::colorsModel() const { return m_model; } QString KCMColors::selectedScheme() const { return m_selectedScheme; } void KCMColors::setSelectedScheme(const QString &scheme) { if (m_selectedScheme == scheme) { return; } const bool firstTime = m_selectedScheme.isNull(); m_selectedScheme = scheme; emit selectedSchemeChanged(); emit selectedSchemeIndexChanged(); if (!firstTime) { setNeedsSave(true); m_selectedSchemeDirty = true; } } int KCMColors::selectedSchemeIndex() const { return indexOfScheme(m_selectedScheme); } int KCMColors::indexOfScheme(const QString &schemeName) const { const auto results = m_model->match(m_model->index(0, 0), SchemeNameRole, schemeName); if (results.count() == 1) { return results.first().row(); } return -1; } bool KCMColors::downloadingFile() const { return m_tempCopyJob; } void KCMColors::setPendingDeletion(int index, bool pending) { QModelIndex idx = m_model->index(index, 0); m_model->setData(idx, pending, PendingDeletionRole); if (pending && selectedSchemeIndex() == index) { // move to the next non-pending theme const auto nonPending = m_model->match(idx, PendingDeletionRole, false); setSelectedScheme(nonPending.first().data(SchemeNameRole).toString()); } setNeedsSave(true); } void KCMColors::loadModel() { m_model->clear(); QStringList schemeFiles; const QStringList schemeDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes"), QStandardPaths::LocateDirectory); for (const QString &dir : schemeDirs) { const QStringList fileNames = QDir(dir).entryList(QStringList{QStringLiteral("*.colors")}); for (const QString &file : fileNames) { const QString suffixedFileName = QStringLiteral("color-schemes/") + file; // can't use QSet because of the transform below (passing const QString as this argument discards qualifiers) if (!schemeFiles.contains(suffixedFileName)) { schemeFiles.append(suffixedFileName); } } } std::transform(schemeFiles.begin(), schemeFiles.end(), schemeFiles.begin(), [](const QString &item) { return QStandardPaths::locate(QStandardPaths::GenericDataLocation, item); }); for (const QString &schemeFile : schemeFiles) { const QFileInfo fi(schemeFile); const QString baseName = fi.baseName(); KSharedConfigPtr config = KSharedConfig::openConfig(schemeFile, KConfig::SimpleConfig); KConfigGroup group(config, "General"); const QString name = group.readEntry("Name", baseName); QStandardItem *item = new QStandardItem(name); item->setData(baseName, SchemeNameRole); item->setData(fi.isWritable(), RemovableRole); item->setData(false, PendingDeletionRole); item->setData(KColorScheme::createApplicationPalette(config), PaletteRole); m_model->appendRow(item); } m_model->sort(0 /*column*/); emit selectedSchemeIndexChanged(); } void KCMColors::getNewStuff(QQuickItem *ctx) { if (!m_newStuffDialog) { m_newStuffDialog = new KNS3::DownloadDialog(QStringLiteral("colorschemes.knsrc")); m_newStuffDialog.data()->setWindowTitle(i18n("Download New Color Schemes")); m_newStuffDialog->setWindowModality(Qt::WindowModal); m_newStuffDialog->winId(); // so it creates the windowHandle(); connect(m_newStuffDialog.data(), &KNS3::DownloadDialog::accepted, this, [this] { loadModel(); const auto newEntries = m_newStuffDialog->installedEntries(); // If one new theme was installed, select the first color file in it if (newEntries.count() == 1) { QStringList installedThemes; const QString suffix = QStringLiteral(".colors"); for (const QString &path : newEntries.first().installedFiles()) { const QString fileName = path.section(QLatin1Char('/'), -1, -1); const int suffixPos = fileName.indexOf(suffix); if (suffixPos != fileName.length() - suffix.length()) { continue; } installedThemes.append(fileName.left(suffixPos)); } if (!installedThemes.isEmpty()) { // The list is sorted by (potentially translated) name // but that would require us parse every file, so this should be close enough std::sort(installedThemes.begin(), installedThemes.end()); setSelectedScheme(installedThemes.constFirst()); } } }); } if (ctx && ctx->window()) { m_newStuffDialog->windowHandle()->setTransientParent(ctx->window()); } m_newStuffDialog.data()->show(); } void KCMColors::installSchemeFromFile(const QUrl &url) { if (url.isLocalFile()) { installSchemeFile(url.toLocalFile()); return; } if (m_tempCopyJob) { return; } m_tempInstallFile.reset(new QTemporaryFile()); if (!m_tempInstallFile->open()) { emit showErrorMessage(i18n("Unable to create a temporary file.")); m_tempInstallFile.reset(); return; } // Ideally we copied the file into the proper location right away but // (for some reason) we determine the file name from the "Name" inside the file m_tempCopyJob = KIO::file_copy(url, QUrl::fromLocalFile(m_tempInstallFile->fileName()), -1, KIO::Overwrite); m_tempCopyJob->uiDelegate()->setAutoErrorHandlingEnabled(true); emit downloadingFileChanged(); connect(m_tempCopyJob, &KIO::FileCopyJob::result, this, [this, url](KJob *job) { if (job->error() != KJob::NoError) { emit showErrorMessage(i18n("Unable to download the color scheme: %1", job->errorText())); return; } installSchemeFile(m_tempInstallFile->fileName()); m_tempInstallFile.reset(); }); connect(m_tempCopyJob, &QObject::destroyed, this, &KCMColors::downloadingFileChanged); } void KCMColors::installSchemeFile(const QString &path) { KSharedConfigPtr config = KSharedConfig::openConfig(path, KConfig::SimpleConfig); KConfigGroup group(config, "General"); const QString name = group.readEntry("Name"); if (name.isEmpty()) { emit showErrorMessage(i18n("This file is not a color scheme file.")); return; } // Do not overwrite another scheme int increment = 0; QString newName = name; QString testpath; do { if (increment) { newName = name + QString::number(increment); } testpath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes/%1.colors").arg(newName)); increment++; } while (!testpath.isEmpty()); QString newPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/color-schemes/"); if (!QDir().mkpath(newPath)) { emit showErrorMessage(i18n("Failed to create 'color-scheme' data folder.")); return; } newPath += newName + QLatin1String(".colors"); if (!QFile::copy(path, newPath)) { emit showErrorMessage(i18n("Failed to copy color scheme into 'color-scheme' data folder.")); return; } // Update name KSharedConfigPtr config2 = KSharedConfig::openConfig(newPath, KConfig::SimpleConfig); KConfigGroup group2(config2, "General"); group2.writeEntry("Name", newName); config2->sync(); loadModel(); const auto results = m_model->match(m_model->index(0, 0), SchemeNameRole, newName); if (!results.isEmpty()) { setSelectedScheme(newName); } emit showSuccessMessage(i18n("Color scheme installed successfully.")); } void KCMColors::editScheme(int index, QQuickItem *ctx) { if (m_editDialogProcess) { return; } QModelIndex idx = m_model->index(index, 0); m_editDialogProcess = new QProcess(this); connect(m_editDialogProcess, QOverload::of(&QProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) { Q_UNUSED(exitCode); Q_UNUSED(exitStatus); const auto savedThemes = QString::fromUtf8(m_editDialogProcess->readAllStandardOutput()).split(QLatin1Char('\n'), QString::SkipEmptyParts); if (!savedThemes.isEmpty()) { loadModel(); // would be cool to just reload/add the changed/new ones setSelectedScheme(savedThemes.last()); } m_editDialogProcess->deleteLater(); m_editDialogProcess = nullptr; }); QStringList args; args << idx.data(KCMColors::SchemeNameRole).toString(); if (idx.data(KCMColors::RemovableRole).toBool()) { args << QStringLiteral("--overwrite"); } if (ctx && ctx->window()) { // QQuickWidget, used for embedding QML KCMs, renders everything into an offscreen window // Qt is able to resolve this on its own when setting transient parents in-process. // However, since we pass the ID to an external process which has no idea of this // we need to resolve the actual window we end up showing in. if (QWindow *actualWindow = QQuickRenderControl::renderWindowFor(ctx->window())) { if (KWindowSystem::isPlatformX11()) { // TODO wayland: once we have foreign surface support args << QStringLiteral("--attach") << (QStringLiteral("x11:") + QString::number(actualWindow->winId())); } } } m_editDialogProcess->start(QStringLiteral("kcolorschemeeditor"), args); } void KCMColors::load() { loadModel(); m_config->markAsClean(); m_config->reparseConfiguration(); KConfigGroup group(m_config, "General"); const QString schemeName = group.readEntry("ColorScheme", s_defaultColorSchemeName); // If the scheme named in kdeglobals doesn't exist, show a warning and use default scheme if (indexOfScheme(schemeName) == -1) { setSelectedScheme(s_defaultColorSchemeName); emit showSchemeNotInstalledWarning(schemeName); } else { setSelectedScheme(schemeName); } { KConfig cfg(QStringLiteral("kcmdisplayrc"), KConfig::NoGlobals); group = KConfigGroup(&cfg, "X11"); m_applyToAlien = group.readEntry("exportKDEColors", true); } } void KCMColors::save() { if (m_selectedSchemeDirty) { saveColors(); } processPendingDeletions(); setNeedsSave(false); } void KCMColors::saveColors() { KConfigGroup grp(m_config, "General"); grp.writeEntry("ColorScheme", m_selectedScheme); const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes/%1.colors").arg(m_selectedScheme)); KSharedConfigPtr config = KSharedConfig::openConfig(path); const QStringList colorSetGroupList{ QStringLiteral("Colors:View"), QStringLiteral("Colors:Window"), QStringLiteral("Colors:Button"), QStringLiteral("Colors:Selection"), QStringLiteral("Colors:Tooltip"), QStringLiteral("Colors:Complementary") }; const QList colorSchemes{ KColorScheme(QPalette::Active, KColorScheme::View, config), KColorScheme(QPalette::Active, KColorScheme::Window, config), KColorScheme(QPalette::Active, KColorScheme::Button, config), KColorScheme(QPalette::Active, KColorScheme::Selection, config), KColorScheme(QPalette::Active, KColorScheme::Tooltip, config), KColorScheme(QPalette::Active, KColorScheme::Complementary, config) }; for (int i = 0; i < colorSchemes.length(); ++i) { KConfigGroup group(m_config, colorSetGroupList.value(i)); group.writeEntry("BackgroundNormal", colorSchemes[i].background(KColorScheme::NormalBackground).color()); group.writeEntry("BackgroundAlternate", colorSchemes[i].background(KColorScheme::AlternateBackground).color()); group.writeEntry("ForegroundNormal", colorSchemes[i].foreground(KColorScheme::NormalText).color()); group.writeEntry("ForegroundInactive", colorSchemes[i].foreground(KColorScheme::InactiveText).color()); group.writeEntry("ForegroundActive", colorSchemes[i].foreground(KColorScheme::ActiveText).color()); group.writeEntry("ForegroundLink", colorSchemes[i].foreground(KColorScheme::LinkText).color()); group.writeEntry("ForegroundVisited", colorSchemes[i].foreground(KColorScheme::VisitedText).color()); group.writeEntry("ForegroundNegative", colorSchemes[i].foreground(KColorScheme::NegativeText).color()); group.writeEntry("ForegroundNeutral", colorSchemes[i].foreground(KColorScheme::NeutralText).color()); group.writeEntry("ForegroundPositive", colorSchemes[i].foreground(KColorScheme::PositiveText).color()); group.writeEntry("DecorationFocus", colorSchemes[i].decoration(KColorScheme::FocusColor).color()); group.writeEntry("DecorationHover", colorSchemes[i].decoration(KColorScheme::HoverColor).color()); } KConfigGroup groupWMTheme(config, "WM"); KConfigGroup groupWMOut(m_config, "WM"); const QStringList colorItemListWM{ QStringLiteral("activeBackground"), QStringLiteral("activeForeground"), QStringLiteral("inactiveBackground"), QStringLiteral("inactiveForeground"), QStringLiteral("activeBlend"), QStringLiteral("inactiveBlend") }; const QVector defaultWMColors{ QColor(71,80,87), QColor(239,240,241), QColor(239,240,241), QColor(189,195,199), QColor(255,255,255), QColor(75,71,67) }; int i = 0; for (const QString &coloritem : colorItemListWM) { groupWMOut.writeEntry(coloritem, groupWMTheme.readEntry(coloritem, defaultWMColors.value(i))); ++i; } const QStringList groupNameList{ QStringLiteral("ColorEffects:Inactive"), QStringLiteral("ColorEffects:Disabled") }; const QStringList effectList{ QStringLiteral("Enable"), QStringLiteral("ChangeSelectionColor"), QStringLiteral("IntensityEffect"), QStringLiteral("IntensityAmount"), QStringLiteral("ColorEffect"), QStringLiteral("ColorAmount"), QStringLiteral("Color"), QStringLiteral("ContrastEffect"), QStringLiteral("ContrastAmount") }; for (const QString &groupName : groupNameList) { KConfigGroup groupEffectOut(m_config, groupName); KConfigGroup groupEffectTheme(config, groupName); for (const QString &effect : effectList) { groupEffectOut.writeEntry(effect, groupEffectTheme.readEntry(effect)); } } m_config->sync(); runRdb(KRdbExportQtColors | KRdbExportGtkTheme | (m_applyToAlien ? KRdbExportColors : 0)); QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KGlobalSettings"), QStringLiteral("org.kde.KGlobalSettings"), QStringLiteral("notifyChange")); message.setArguments({ 0, //previous KGlobalSettings::PaletteChanged. This is now private API in khintsettings 0 //unused in palette changed but needed for the DBus signature }); QDBusConnection::sessionBus().send(message); if (KWindowSystem::isPlatformX11()) { // Send signal to all kwin instances QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("reloadConfig")); QDBusConnection::sessionBus().send(message); } m_selectedSchemeDirty = false; } void KCMColors::processPendingDeletions() { const auto pendingDeletions = m_model->match(m_model->index(0, 0), PendingDeletionRole, true, -1 /*all*/); QVector persistentPendingDeletions; // turn into persistent model index so we can delete as we go std::transform(pendingDeletions.begin(), pendingDeletions.end(), std::back_inserter(persistentPendingDeletions), [](const QModelIndex &idx) { return QPersistentModelIndex(idx); }); for (const QPersistentModelIndex &idx : persistentPendingDeletions) { const QString schemeName = idx.data(SchemeNameRole).toString(); Q_ASSERT(schemeName != m_selectedScheme); const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes/%1.colors").arg(schemeName)); auto *job = KIO::del(QUrl::fromLocalFile(path), KIO::HideProgressInfo); // needs to block for it to work on "OK" where the dialog (kcmshell) closes job->exec(); } // remove them in a separate loop after all the delete jobs for a smoother animation for (const QPersistentModelIndex &idx : persistentPendingDeletions) { m_model->removeRow(idx.row()); } } void KCMColors::defaults() { setSelectedScheme(s_defaultColorSchemeName); setNeedsSave(true); } #include "colors.moc" diff --git a/kcms/colors/kcm_colors.desktop b/kcms/colors/kcm_colors.desktop index 494df13f9..7cb34e8a3 100644 --- a/kcms/colors/kcm_colors.desktop +++ b/kcms/colors/kcm_colors.desktop @@ -1,174 +1,174 @@ [Desktop Entry] Exec=kcmshell5 kcm_colors Icon=preferences-desktop-color Type=Service X-KDE-ServiceTypes=KCModule X-DocPath=kcontrol/colors/index.html X-KDE-Library=kcm_colors X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=appearance X-KDE-Weight=60 Name=Colors Name[af]=Kleure Name[ar]=الألوان Name[be]=Колеры Name[be@latin]=Kolery Name[bg]=Цветове Name[bn]=রং Name[bn_IN]=রং Name[br]=Livioù Name[bs]=Boje Name[ca]=Colors Name[ca@valencia]=Colors Name[cs]=Barvy Name[csb]=Farwë Name[cy]=Lliwiau Name[da]=Farver Name[de]=Farben Name[el]=Χρώματα Name[en_GB]=Colours Name[eo]=Koloroj Name[es]=Colores Name[et]=Värvid Name[eu]=Koloreak Name[fa]=رنگها Name[fi]=Värit Name[fr]=Couleurs Name[fy]=Kleuren Name[ga]=Dathanna Name[gl]=Cores Name[gu]=રંગો Name[he]=צבעים Name[hi]=रंग Name[hne]=रंग Name[hr]=Boje Name[hsb]=Barby Name[hu]=Színek Name[ia]=Colores Name[id]=Warna Name[is]=Litir Name[it]=Colori Name[ja]=色 Name[ka]=ცვეტები Name[kk]=Түстер Name[km]=ពណ៌ Name[kn]=ಬಣ್ಣಗಳು Name[ko]=색상 Name[ku]=Reng Name[lt]=Spalvos Name[lv]=Krāsas Name[mai]=रँग Name[mk]=Бои Name[ml]=നിറങ്ങള്‍ Name[mr]=रंग Name[ms]=Warna Name[nb]=Farger Name[nds]=Klören Name[ne]=रङ Name[nl]=Kleuren Name[nn]=Fargar Name[oc]=Colors Name[or]=ରଙ୍ଗ Name[pa]=ਰੰਗ Name[pl]=Kolory Name[pt]=Cores Name[pt_BR]=Cores Name[ro]=Culori Name[ru]=Цвета Name[se]=Ivnnit Name[si]=වර්‍ණ Name[sk]=Farby Name[sl]=Barve Name[sr]=Боје Name[sr@ijekavian]=Боје Name[sr@ijekavianlatin]=Boje Name[sr@latin]=Boje Name[sv]=Färger Name[ta]=வண்ணங்கள் Name[te]=రంగులు Name[tg]=Рангҳо Name[th]=สี Name[tr]=Renkler Name[ug]=رەڭلەر Name[uk]=Кольори Name[uz]=Ranglar Name[uz@cyrillic]=Ранглар Name[vi]=Màu sắc Name[wa]=Coleurs Name[xh]=Imibala Name[x-test]=xxColorsxx Name[zh_CN]=色彩 Name[zh_TW]=顏色 -Comment=Choose the color scheme +Comment=Choose color scheme Comment[ca]=Trieu l'esquema de colors Comment[ca@valencia]=Trieu l'esquema de colors Comment[es]=Escoger el esquema de color Comment[fi]=Valitse väriteema Comment[gl]=Escoller o esquema de cores Comment[it]=Scegli lo schema di colori Comment[nl]=Kies het kleurenschema Comment[nn]=Vel fargeoppsett Comment[pl]=Wybierz zestaw kolorów Comment[pt]=Escolher o esquema de cores Comment[pt_BR]=Escolha o esquema de cores Comment[ru]=Выбор цветовой схемы Comment[sk]=Vybrať farebnú schému Comment[sv]=Välj färgschemat Comment[uk]=Вибір теми кольорів Comment[x-test]=xxChoose the color schemexx Comment[zh_CN]=选择配色方案 Comment[zh_TW]=選擇色彩主題 X-KDE-Keywords=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme X-KDE-Keywords[ar]=لون,ألوان,مخطّط,مخطط,تباين,ألوان الودجات,مخطّط ألوان,مخطط ألوان,نمط اللون,سمة اللون X-KDE-Keywords[bs]=boje,boje,tema,kontrast,dodatak bojama,tema u boji,stil boja,tema boja X-KDE-Keywords[ca]=colors,esquema,contrast,colors d'estris,Esquema de color,estil de color, tema de color X-KDE-Keywords[ca@valencia]=colors,esquema,contrast,colors d'estris,Esquema de color,estil de color, tema de color X-KDE-Keywords[da]=farver,tema,kontrast,widget-farver,farvetema,farvestil,farveskema X-KDE-Keywords[de]=Farben,Schema,Kontrast,Farbschema,Elemente X-KDE-Keywords[el]=χρώματα,χρώματα,σχήμα,αντίθεση,χρώματα γραφικών συστατικών,χρωματικό σχήμα,χρωματικό στιλ,θέμα χρώματος X-KDE-Keywords[en_GB]=colours,scheme,contrast,Widget colours,Colour Scheme,colour style,colour theme X-KDE-Keywords[es]=colores,esquema,contraste,colores de elementos gráficos,Esquema de color,estilo de color,tema de color X-KDE-Keywords[et]=värv,värvid,skeem,kontrast,vidina värvid,värviskeem,värvistiil,värviteema X-KDE-Keywords[eu]=kolore,koloreak,eskema,kontraste,trepetaren koloreak,kolore-eskema,kolore-estilo, kolorearen gai X-KDE-Keywords[fi]=värit,teema,kontrasti,käyttöliittymäelementtien värit,elementtien värit,väriteema,värityyli X-KDE-Keywords[fr]=couleurs, couleurs, schéma, contraste, couleur des composants graphiques, schéma de couleur, style de couleur, thème de couleur X-KDE-Keywords[ga]=dathanna,scéim,codarsnacht,dathanna Giuirléidí,Scéim Datha,téama datha X-KDE-Keywords[gl]=cores,esquema,contraste,cores do trebello,esquema de cores, tema de cores X-KDE-Keywords[he]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,צבעים,ערכת נושא,צבע X-KDE-Keywords[hu]=színek,színek,séma,kontraszt,Grafikai elemek színei,Színséma,színstílus,színtéma X-KDE-Keywords[ia]=colores,colores,schema,contrasto,colores de Widget,Schema de Color,stilo de color, thema de color X-KDE-Keywords[id]=warna,warna,skema,kontras,Widget warna,Skema Warna,gaya warna,tema warna X-KDE-Keywords[it]=colori,schema,contrasto,colore degli oggetti,schema di colore,stile colore,tema colore X-KDE-Keywords[kk]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme X-KDE-Keywords[km]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme X-KDE-Keywords[ko]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,색,색 배열,고대비 X-KDE-Keywords[mr]=रंग, रंग, योजना, कॉन्ट्रास्ट, विजेट रंग, रंगयोजना, रंगप्रकार, रंगशैली X-KDE-Keywords[nb]=farger,oppsett,kontrast,elementfarger,fargeoppsett,fargestil,fargetema X-KDE-Keywords[nds]=Klöör,Klören,Schema,Kontrast,Lüttprogramm-Klören,Klöörschema,Klöörstil,Klöörmuster X-KDE-Keywords[nl]=colors,colours, kleuren,scheme,schema,contrast,Widget colors,Widgetkleuren,Color Scheme,kleurschema,kleurstijl,kleurthema X-KDE-Keywords[nn]=fargar,oppsett,kontrast,elementfargar,fargeoppsett,fargestil,fargetema X-KDE-Keywords[pa]=ਰੰਗ,ਸਕੀਮ,ਕਨਟਰਾਸਟ,ਵਿਜੈਟ ਰੰਗ,ਰੰਗ ਸਕੀ,ਰੰਗ ਸਟਾਈਲ,ਰੰਗ ਥੀਮ X-KDE-Keywords[pl]=kolory,schemat,kontrast,kolory elementów interfejsu,zestaw kolorów,styl kolorów,motyw kolorów X-KDE-Keywords[pt]=cores,esquema,contraste,cores dos elementos,esquema de cores,estilo de cores,tema de cores X-KDE-Keywords[pt_BR]=cor,cores,esquema,contraste,Cores do widget,Esquema de cores,estilo de cores,tema de cores X-KDE-Keywords[ru]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,цвет,цвета,схема,контраст,цвета виджета,цветовая схема,цветовой стиль,цветовая тема X-KDE-Keywords[sk]=farba,farby,schéma,kontrast,farby widgetov,Farebná schéma,štýl farieb,téma farieb X-KDE-Keywords[sl]=barve,shema,tema,kontrast,barve gradnikov,barvna shema,barvna tema,barvni slog X-KDE-Keywords[sr]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,боје,шема,контраст,боје виџета,шема боја,стил боја,тема боја X-KDE-Keywords[sr@ijekavian]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,боје,шема,контраст,боје виџета,шема боја,стил боја,тема боја X-KDE-Keywords[sr@ijekavianlatin]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,boje,šema,kontrast,boje vidžeta,šema boja,stil boja,tema boja X-KDE-Keywords[sr@latin]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,boje,šema,kontrast,boje vidžeta,šema boja,stil boja,tema boja X-KDE-Keywords[sv]=färger,schema,kontrast,Komponentfärger,Färgschema,färgstil,färgtema X-KDE-Keywords[tr]=renkler,renk,şema,karşıtlık,kontrast,Gereç renkleri,RenkŞeması,renk biçemi,renk teması,renk biçimi X-KDE-Keywords[uk]=кольори,кольори,схема,контраст,кольори віджетів,схема кольорів,стиль кольорів,тема кольорів,colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme X-KDE-Keywords[x-test]=xxcolorsxx,xxcoloursxx,xxschemexx,xxcontrastxx,xxWidget colorsxx,xxColor Schemexx,xxcolor stylexx,xxcolor themexx X-KDE-Keywords[zh_CN]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme,颜色,配色方案,对比度,部件颜色,颜色方案,颜色风格,颜色主题 X-KDE-Keywords[zh_TW]=colors,colours,scheme,contrast,Widget colors,Color Scheme,color style,color theme Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcms/colors/package/metadata.desktop b/kcms/colors/package/metadata.desktop index b8019bf9c..589df3f5c 100644 --- a/kcms/colors/package/metadata.desktop +++ b/kcms/colors/package/metadata.desktop @@ -1,124 +1,124 @@ [Desktop Entry] Name=Colors Name[af]=Kleure Name[ar]=الألوان Name[be]=Колеры Name[be@latin]=Kolery Name[bg]=Цветове Name[bn]=রং Name[bn_IN]=রং Name[br]=Livioù Name[bs]=Boje Name[ca]=Colors Name[ca@valencia]=Colors Name[cs]=Barvy Name[csb]=Farwë Name[cy]=Lliwiau Name[da]=Farver Name[de]=Farben Name[el]=Χρώματα Name[en_GB]=Colours Name[eo]=Koloroj Name[es]=Colores Name[et]=Värvid Name[eu]=Koloreak Name[fa]=رنگها Name[fi]=Värit Name[fr]=Couleurs Name[fy]=Kleuren Name[ga]=Dathanna Name[gl]=Cores Name[gu]=રંગો Name[he]=צבעים Name[hi]=रंग Name[hne]=रंग Name[hr]=Boje Name[hsb]=Barby Name[hu]=Színek Name[ia]=Colores Name[id]=Warna Name[is]=Litir Name[it]=Colori Name[ja]=色 Name[ka]=ცვეტები Name[kk]=Түстер Name[km]=ពណ៌ Name[kn]=ಬಣ್ಣಗಳು Name[ko]=색상 Name[ku]=Reng Name[lt]=Spalvos Name[lv]=Krāsas Name[mai]=रँग Name[mk]=Бои Name[ml]=നിറങ്ങള്‍ Name[mr]=रंग Name[ms]=Warna Name[nb]=Farger Name[nds]=Klören Name[ne]=रङ Name[nl]=Kleuren Name[nn]=Fargar Name[oc]=Colors Name[or]=ରଙ୍ଗ Name[pa]=ਰੰਗ Name[pl]=Kolory Name[pt]=Cores Name[pt_BR]=Cores Name[ro]=Culori Name[ru]=Цвета Name[se]=Ivnnit Name[si]=වර්‍ණ Name[sk]=Farby Name[sl]=Barve Name[sr]=Боје Name[sr@ijekavian]=Боје Name[sr@ijekavianlatin]=Boje Name[sr@latin]=Boje Name[sv]=Färger Name[ta]=வண்ணங்கள் Name[te]=రంగులు Name[tg]=Рангҳо Name[th]=สี Name[tr]=Renkler Name[ug]=رەڭلەر Name[uk]=Кольори Name[uz]=Ranglar Name[uz@cyrillic]=Ранглар Name[vi]=Màu sắc Name[wa]=Coleurs Name[xh]=Imibala Name[x-test]=xxColorsxx Name[zh_CN]=色彩 Name[zh_TW]=顏色 -Comment=Choose the color scheme +Comment=Choose color scheme Comment[ca]=Trieu l'esquema de colors Comment[ca@valencia]=Trieu l'esquema de colors Comment[es]=Escoger el esquema de color Comment[fi]=Valitse väriteema Comment[gl]=Escoller o esquema de cores Comment[it]=Scegli lo schema di colori Comment[nl]=Kies het kleurenschema Comment[nn]=Vel fargeoppsett Comment[pl]=Wybierz zestaw kolorów Comment[pt]=Escolher o esquema de cores Comment[pt_BR]=Escolha o esquema de cores Comment[ru]=Выбор цветовой схемы Comment[sk]=Vybrať farebnú schému Comment[sv]=Välj färgschemat Comment[uk]=Вибір теми кольорів Comment[x-test]=xxChoose the color schemexx Comment[zh_CN]=选择配色方案 Comment[zh_TW]=選擇色彩主題 Icon=preferences-desktop-color Type=Service X-KDE-PluginInfo-Author=Kai Uwe Broulik X-KDE-PluginInfo-Email=kde@privat.broulik.de X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-Name=kcm_colors X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website= X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/cursortheme/kcm_cursortheme.desktop b/kcms/cursortheme/kcm_cursortheme.desktop index 9cf84c874..4488e4bd4 100644 --- a/kcms/cursortheme/kcm_cursortheme.desktop +++ b/kcms/cursortheme/kcm_cursortheme.desktop @@ -1,116 +1,116 @@ [Desktop Entry] Exec=kcmshell5 kcm_cursortheme Icon=preferences-desktop-cursors Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_cursortheme X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=workspacetheme X-DocPath=kcontrol/cursortheme/index.html X-KDE-Weight=60 Name=Cursors Name[ca]=Cursors Name[ca@valencia]=Cursors Name[cs]=Kurzory Name[da]=Markører Name[de]=Zeiger Name[el]=Δρομείς Name[en_GB]=Cursors Name[es]=Cursores Name[eu]=Kurtsoreak Name[fi]=Osoittimet Name[fr]=Pointeurs Name[gl]=Cursores Name[he]=מצביעים Name[hu]=Kurzorok Name[id]=Kursor Name[it]=Puntatori Name[ko]=커서 Name[lt]=Žymekliai Name[nl]=Cursors Name[nn]=Peikarar Name[pa]=ਕਰਸਰਾਂ Name[pl]=Wskaźniki Name[pt]=Cursores Name[pt_BR]=Cursores Name[ru]=Курсоры мыши Name[sk]=Kurzory Name[sl]=Kazalke Name[sr]=Показивачи Name[sr@ijekavian]=Показивачи Name[sr@ijekavianlatin]=Pokazivači Name[sr@latin]=Pokazivači Name[sv]=Pekare Name[tr]=İmleçler Name[uk]=Вказівники Name[x-test]=xxCursorsxx Name[zh_CN]=光标 Name[zh_TW]=游標 -Comment=Choose the mouse cursor theme +Comment=Choose mouse cursor theme Comment[ca]=Trieu el tema del cursor del ratolí Comment[ca@valencia]=Trieu el tema del cursor del ratolí Comment[de]=Design für den Mauszeiger auswählen Comment[es]=Escoger el tema de cursores de ratón Comment[fi]=Valitse hiiriosoitinteema Comment[gl]=Escoller o tema do cursor do rato Comment[id]=Memilih tema kursor mouse Comment[it]=Scegli il tema dei puntatori del mouse Comment[nl]=Het muiscursorthema kiezen Comment[nn]=Vel peikartema Comment[pl]=Wybierz zestaw wskaźników myszy Comment[pt]=Escolher o tema do cursor do rato Comment[pt_BR]=Escolha o tema do cursor do mouse Comment[ru]=Выбор темы курсоров мыши Comment[sk]=Vybrať tému kurzora myši Comment[sv]=Välj muspekartemat Comment[uk]=Вибір теми вказівника миші Comment[x-test]=xxChoose the mouse cursor themexx Comment[zh_CN]=选择鼠标光标主题 Comment[zh_TW]=選擇滑鼠游標主題 X-KDE-Keywords=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance X-KDE-Keywords[ar]=فأرة,مؤشّر,مؤشر,سمة,ثيم,مظهر المؤشّر,لون المؤشّر,سمة المؤشّر,سمة الفأرة,مظهر الفأرة,بشرات الفأرة,ألوان المؤشّر,مظهر المؤشّر X-KDE-Keywords[bs]=Miš,kursor,tema,pojavljivanje kurosra,boja kursora,tema kursora,tema miša,pojavljivanje miša,površina miša,pokazatelj boja,pojava boja X-KDE-Keywords[ca]=Ratolí,Cursor,Tema,Aparença de cursor,Color de cursor,Tema de cursor,Tema de ratolí,Aparença de ratolí,Pells de ratolí,Colors d'apuntador,Aparença d'apuntador X-KDE-Keywords[ca@valencia]=Ratolí,Cursor,Tema,Aparença de cursor,Color de cursor,Tema de cursor,Tema de ratolí,Aparença de ratolí,Pells de ratolí,Colors d'apuntador,Aparença d'apuntador X-KDE-Keywords[da]=Mus,markør,cursor,tema,markørens udseende,markørfarve,markørtema,musetema,musens udseende,museskin X-KDE-Keywords[de]=Maus,Zeiger,Mauszeiger,Zeigerfarbe,Zeigerdesign X-KDE-Keywords[el]=ποντίκι,δρομέας,θέμα,εμφάνιση δρομέα,χρώμα δρομέα,θέμα δρομέα,θέμα ποντικιού,εμφάνιση ποντικιού,θέματα ποντικιού,χρώματα δείκτη,εμφάνιση δείκτη X-KDE-Keywords[en_GB]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Colour,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colours,Pointer Appearance X-KDE-Keywords[es]=Ratón,Cursor,Tema,Apariencia del cursor,Color del cursor,Tema del cursor,Tema del ratón,Apariencia del ratón,Pieles del ratón,Colores del puntero,Apariencia del puntero X-KDE-Keywords[et]=Hiir,Kursor,Teema,Kursori välimus,Kursori värv,Kursori teema,Hiireteema,Hiire välimus,Hiire nahad,Osutusseadme värvid,Osutusseadme välimus X-KDE-Keywords[eu]=sagu,kurtsore,gai,kurtsorearen itsura,kurtsorearen kolorea,saguaren gaia,saguaren itxura,saguaren azalak,erakuslearen koloreak,erakuslearen itxura X-KDE-Keywords[fi]=hiiri,osoitin,teema,osoittimen ulkoasu,osoittimen väri,osoitinteema,hiiren teema,hiiriteema,hiiren ulkoasu,hiiriteemat,osoitinvärit X-KDE-Keywords[fr]=Souris, Curseur, Thème, Apparence du curseur, Couleur du curseur, Thème de curseurs, Thème de la souris, Apparence de la souris, Revêtement de la souris, Couleur du pointeur, Apparence du pointeur X-KDE-Keywords[gl]=rato, cursor, tema, aparencia do cursor, cor do cursor, tema do cursor, tema do rato, aparencia do rato, cor do rato, punteiro, cor do punteiro, aparencia do punteiro, tema do punteiro X-KDE-Keywords[hu]=Egér,Kurzor,Téma,Kurzormegjelenés,Kurzorszín,Kurzortéma,Egértéma,Egérmegjelenés,Egérfelületek,Mutató színek,Mutató megjelenés X-KDE-Keywords[ia]=Mus,Cursor,Thema,Apparentia,Cursor,Color,Thema de Cursor,Thema de Mus, Apparentia de Mus,Pelles de Mus,Colores de punctator,Apparentia de punctator X-KDE-Keywords[id]=Mouse,Kursor,Tema,Penampilan Kursor,Warna Kursor,Tema Kursor,Tema Mouse,Penampilan Mouse,Kulit Mouse,Warna Penunjuk,Penampilan Penunjuk X-KDE-Keywords[it]=Mouse,Puntatore,Aspetto puntatore,Colore puntatore,Tema puntatore,Tema mouse,Aspetto mouse,Skin mouse,Colore puntatore,Aspetto puntatore X-KDE-Keywords[kk]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance X-KDE-Keywords[km]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance X-KDE-Keywords[ko]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,마우스,커서,커서 테마,포인터 X-KDE-Keywords[mr]=माऊस, कर्सर, थीम, कर्सर, अपिरिअन्स, कर्सर, कलर, कर्सर थीम, माऊस थीम, माऊस अपिरिअन्स, माऊस स्कीन्स, पॉईटर अपिरिअन्स X-KDE-Keywords[nb]=Mus,peker,tema,pekerutseende,pekerfarge,pekertema,musetema,musutseende,museskins,pekerfarger,pekeerutseende X-KDE-Keywords[nds]=Muus,Wieser,Muster, Wieserutsehn,Klöör,Utsehn X-KDE-Keywords[nl]=Muis,Cursor,Thema,Uiterlijk van cursor,kleur van cursor,Thema van cursor,Thema van muis,uiterlijk van muis,Muisoppervlak,Kleuren van aanwijzer,Uiterlijk van aanwijzer X-KDE-Keywords[nn]=mus,peikar,tema,peikarutsjånad,peikarfarge,peikartema,musetema,musutsjånad,musedrakt,peikarfargar,peikarutsjånad X-KDE-Keywords[pl]=Mysz,Kursor,Motyw,Wygląd kursora,Kolor kursora,Motyw kursora,Motyw myszy,Wygląd myszy,Skórki myszy,Kolory wskaźnika,Wygląd wskaźnika X-KDE-Keywords[pt]=Rato,Cursor,Tema,Aparência do Cursor,Cor do Cursor,Tema do Cursor,Tema do Rato,Aparência do Rato,Visuais do Rato,Cores do Cursor X-KDE-Keywords[pt_BR]=Mouse,Cursor,Tema,Aparência do cursor,Cor do cursor,Tema do cursor,Tema do mouse,Aparência do mouse,Visuais do mouse,Cores do ponteiro,Aparência do ponteiro X-KDE-Keywords[ru]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,мышь,курсор,тема,внешний вид курсора мыши,цвет указателя,внешний вид указателя X-KDE-Keywords[sk]=Myš, kurzor,téma,vzhľad kurzora,farba kurzora,téma kurzora,téma myši,vzhľad myši,skiny myši,farby ukazovateľa,vzhľad ukazovateľa X-KDE-Keywords[sl]=miška,kazalec,kurzor,kazalka,tema,videz kazalca,videz kazalke,barva kazalca,barva kazalke,tema kazalcev,tema kazalk,tema miške,videz miške,preobleke miške,teme miške X-KDE-Keywords[sr]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,миш,показивач,курсор,тема,изглед показивача,боја показивача,тема показивача,тема миша,изглед миша,пресвлаке миша,боје показивача X-KDE-Keywords[sr@ijekavian]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,миш,показивач,курсор,тема,изглед показивача,боја показивача,тема показивача,тема миша,изглед миша,пресвлаке миша,боје показивача X-KDE-Keywords[sr@ijekavianlatin]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,miš,pokazivač,kursor,tema,izgled pokazivača,boja pokazivača,tema pokazivača,tema miša,izgled miša,presvlake miša,boje pokazivača X-KDE-Keywords[sr@latin]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,miš,pokazivač,kursor,tema,izgled pokazivača,boja pokazivača,tema pokazivača,tema miša,izgled miša,presvlake miša,boje pokazivača X-KDE-Keywords[sv]=Mus,Pekare,Tema,Utseende,Färg,Pekartema,Mustema,Musutseende,Musskal,Pekarfärger,Pekarutseende X-KDE-Keywords[tr]=Fare,İşaretçi,Tema,İşaretçi Görünümü,İşaretçi Rengi,İşaretçi Teması,Fare Teması,Fare Görünümü,Fare Kabuğu,İşaretçi Renkleri,İşaretçi Görünümü X-KDE-Keywords[uk]=миша,вказівник,тема,вигляд вказівника,колір вказівника,тема вказівника,тема миші,вигляд миші,Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance X-KDE-Keywords[x-test]=xxMousexx,xxCursorxx,xxThemexx,xxCursor Appearancexx,xxCursor Colorxx,xxCursor Themexx,xxMouse Themexx,xxMouse Appearancexx,xxMouse Skinsxx,xxPointer Colorsxx,xxPointer Appearancexx X-KDE-Keywords[zh_CN]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance,鼠标,指针,主题,指针外观,指针颜色,指针主题,鼠标主题,鼠标外观,鼠标皮肤,指针外观 X-KDE-Keywords[zh_TW]=Mouse,Cursor,Theme,Cursor Appearance,Cursor Color,Cursor Theme,Mouse Theme,Mouse Appearance,Mouse Skins,Pointer Colors,Pointer Appearance diff --git a/kcms/cursortheme/kcmcursortheme.cpp b/kcms/cursortheme/kcmcursortheme.cpp index 9366af9b6..99ef30816 100644 --- a/kcms/cursortheme/kcmcursortheme.cpp +++ b/kcms/cursortheme/kcmcursortheme.cpp @@ -1,620 +1,620 @@ /* * Copyright © 2003-2007 Fredrik Höglund * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "kcmcursortheme.h" #include "xcursor/thememodel.h" #include "xcursor/sortproxymodel.h" #include "xcursor/cursortheme.h" #include "xcursor/previewwidget.h" #include "../krdb/krdb.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_XFIXES # include #endif K_PLUGIN_FACTORY_WITH_JSON(CursorThemeConfigFactory, "kcm_cursortheme.json", registerPlugin();) CursorThemeConfig::CursorThemeConfig(QObject *parent, const QVariantList &args) : KQuickAddons::ConfigModule(parent, args), m_appliedSize(0), m_preferredSize(0), m_selectedThemeRow(-1), m_selectedSizeRow(-1), m_originalSelectedThemeRow(-1), m_canInstall(true), m_canResize(true), m_canConfigure(true) { qmlRegisterType("org.kde.private.kcm_cursortheme", 1, 0, "PreviewWidget"); qmlRegisterType(); - KAboutData* aboutData = new KAboutData(QStringLiteral("kcm_cursortheme"), i18n("Choose the mouse cursor theme"), + KAboutData* aboutData = new KAboutData(QStringLiteral("kcm_cursortheme"), i18n("Cursors"), QStringLiteral("1.0"), QString(), KAboutLicense::GPL, i18n("(c) 2003-2007 Fredrik Höglund")); aboutData->addAuthor(i18n("Fredrik Höglund")); aboutData->addAuthor(i18n("Marco Martin")); setAboutData(aboutData); m_model = new CursorThemeModel(this); m_proxyModel = new SortProxyModel(this); m_proxyModel->setSourceModel(m_model); m_proxyModel->setFilterCaseSensitivity(Qt::CaseSensitive); m_proxyModel->sort(NameColumn, Qt::AscendingOrder); m_sizesModel = new QStandardItemModel(this); // Disable the install button if we can't install new themes to ~/.icons, // or Xcursor isn't set up to look for cursor themes there. if (!m_model->searchPaths().contains(QDir::homePath() + "/.icons") || !iconsIsWritable()) { setCanInstall(false); } } CursorThemeConfig::~CursorThemeConfig() { /* */ } void CursorThemeConfig::setCanInstall(bool can) { if (m_canInstall == can) { return; } m_canInstall = can; emit canInstallChanged(); } bool CursorThemeConfig::canInstall() const { return m_canInstall; } void CursorThemeConfig::setCanResize(bool can) { if (m_canResize == can) { return; } m_canResize = can; emit canResizeChanged(); } bool CursorThemeConfig::canResize() const { return m_canResize; } void CursorThemeConfig::setCanConfigure(bool can) { if (m_canConfigure == can) { return; } m_canConfigure = can; emit canConfigureChanged(); } bool CursorThemeConfig::canConfigure() const { return m_canConfigure; } void CursorThemeConfig::setSelectedThemeRow(int row) { if (m_selectedThemeRow == row) { return; } m_selectedThemeRow = row; emit selectedThemeRowChanged(); updateSizeComboBox(); QModelIndex selected = selectedIndex(); if (selected.isValid()) { const CursorTheme *theme = m_proxyModel->theme(selected); } setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); } int CursorThemeConfig::selectedThemeRow() const { return m_selectedThemeRow; } void CursorThemeConfig::setSelectedSizeRow(int row) { Q_ASSERT (row < m_sizesModel->rowCount() && row >= 0); // we don't return early if m_selectedSizeRow == row as this is called after the model is changed m_selectedSizeRow = row; emit selectedSizeRowChanged(); int size = m_sizesModel->item(row)->data().toInt(); m_preferredSize = size; setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); } int CursorThemeConfig::selectedSizeRow() const { return m_selectedSizeRow; } bool CursorThemeConfig::downloadingFile() const { return m_tempCopyJob; } QAbstractItemModel *CursorThemeConfig::cursorsModel() { return m_proxyModel; } QAbstractItemModel *CursorThemeConfig::sizesModel() { return m_sizesModel; } bool CursorThemeConfig::iconsIsWritable() const { const QFileInfo icons = QFileInfo(QDir::homePath() + "/.icons"); const QFileInfo home = QFileInfo(QDir::homePath()); return ((icons.exists() && icons.isDir() && icons.isWritable()) || (!icons.exists() && home.isWritable())); } void CursorThemeConfig::updateSizeComboBox() { // clear the combo box m_sizesModel->clear(); // refill the combo box and adopt its icon size QModelIndex selected = selectedIndex(); int maxIconWidth = 0; int maxIconHeight = 0; if (selected.isValid()) { const CursorTheme *theme = m_proxyModel->theme(selected); const QList sizes = theme->availableSizes(); QIcon m_icon; // only refill the combobox if there is more that 1 size if (sizes.size() > 1) { int i; QList comboBoxList; QPixmap m_pixmap; // insert the items m_pixmap = theme->createIcon(0); if (m_pixmap.width() > maxIconWidth) { maxIconWidth = m_pixmap.width(); } if (m_pixmap.height() > maxIconHeight) { maxIconHeight = m_pixmap.height(); } QStandardItem *item = new QStandardItem(QIcon(m_pixmap), i18nc("@item:inlistbox size", "Resolution dependent")); item->setData(0); m_sizesModel->appendRow(item); comboBoxList << 0; foreach (i, sizes) { m_pixmap = theme->createIcon(i); if (m_pixmap.width() > maxIconWidth) { maxIconWidth = m_pixmap.width(); } if (m_pixmap.height() > maxIconHeight) { maxIconHeight = m_pixmap.height(); } QStandardItem *item = new QStandardItem(QIcon(m_pixmap), QString::number(i)); item->setData(i); m_sizesModel->appendRow(item); comboBoxList << i; }; // select an item int selectItem = comboBoxList.indexOf(m_preferredSize); // m_preferredSize not available for this theme if (selectItem < 0) { /* Search the value next to m_preferredSize. The first entry (0) is ignored. (If m_preferredSize would have been 0, then we would had found it yet. As m_preferredSize is not 0, we won't default to "automatic size".)*/ int j; int distance; int smallestDistance; selectItem = 1; j = comboBoxList.value(selectItem); smallestDistance = j < m_preferredSize ? m_preferredSize - j : j - m_preferredSize; for (int i = 2; i < comboBoxList.size(); ++i) { j = comboBoxList.value(i); distance = j < m_preferredSize ? m_preferredSize - j : j - m_preferredSize; if (distance < smallestDistance || (distance == smallestDistance && j > m_preferredSize)) { smallestDistance = distance; selectItem = i; }; } }; if (selectItem < 0) { selectItem = 0; } setSelectedSizeRow(selectItem); }; }; // enable or disable the combobox KConfig c("kcminputrc"); KConfigGroup cg(&c, "Mouse"); if (cg.isEntryImmutable("cursorSize")) { setCanResize(false); } else { setCanResize(m_sizesModel->rowCount() > 0); }; } bool CursorThemeConfig::applyTheme(const CursorTheme *theme, const int size) { // Require the Xcursor version that shipped with X11R6.9 or greater, since // in previous versions the Xfixes code wasn't enabled due to a bug in the // build system (freedesktop bug #975). #if HAVE_XFIXES && XFIXES_MAJOR >= 2 && XCURSOR_LIB_VERSION >= 10105 if (!theme) { return false; } if (!CursorTheme::haveXfixes()) { return false; } QByteArray themeName = QFile::encodeName(theme->name()); // Set up the proper launch environment for newly started apps OrgKdeKLauncherInterface klauncher(QStringLiteral("org.kde.klauncher5"), QStringLiteral("/KLauncher"), QDBusConnection::sessionBus()); klauncher.setLaunchEnv(QStringLiteral("XCURSOR_THEME"), themeName); // Update the Xcursor X resources runRdb(0); // Notify all applications that the cursor theme has changed KGlobalSettings::self()->emitChange(KGlobalSettings::CursorChanged); // Reload the standard cursors QStringList names; // Qt cursors names << "left_ptr" << "up_arrow" << "cross" << "wait" << "left_ptr_watch" << "ibeam" << "size_ver" << "size_hor" << "size_bdiag" << "size_fdiag" << "size_all" << "split_v" << "split_h" << "pointing_hand" << "openhand" << "closedhand" << "forbidden" << "whats_this" << "copy" << "move" << "link"; // X core cursors names << "X_cursor" << "right_ptr" << "hand1" << "hand2" << "watch" << "xterm" << "crosshair" << "left_ptr_watch" << "center_ptr" << "sb_h_double_arrow" << "sb_v_double_arrow" << "fleur" << "top_left_corner" << "top_side" << "top_right_corner" << "right_side" << "bottom_right_corner" << "bottom_side" << "bottom_left_corner" << "left_side" << "question_arrow" << "pirate"; foreach (const QString &name, names) { XFixesChangeCursorByName(QX11Info::display(), theme->loadCursor(name, size), QFile::encodeName(name)); } return true; #else Q_UNUSED(theme) return false; #endif } void CursorThemeConfig::save() { const CursorTheme *theme = selectedIndex().isValid() ? m_proxyModel->theme(selectedIndex()) : nullptr; KConfig config("kcminputrc"); KConfigGroup c(&config, "Mouse"); if (theme) { c.writeEntry("cursorTheme", theme->name()); }; c.writeEntry("cursorSize", m_preferredSize); c.sync(); if (!applyTheme(theme, m_preferredSize)) { emit showInfoMessage(i18n("You have to restart the Plasma session for these changes to take effect.")); } m_appliedIndex = selectedIndex(); m_appliedSize = m_preferredSize; m_originalSelectedThemeRow = m_selectedThemeRow; m_originalPreferredSize = m_preferredSize; setNeedsSave(false); } void CursorThemeConfig::load() { // Get the name of the theme libXcursor currently uses QString currentTheme; if (QX11Info::isPlatformX11()) { currentTheme = XcursorGetTheme(QX11Info::display()); } // Get the name of the theme KDE is configured to use KConfig c("kcminputrc"); KConfigGroup cg(&c, "Mouse"); currentTheme = cg.readEntry("cursorTheme", currentTheme); // Find the theme in the listview if (!currentTheme.isEmpty()) { m_appliedIndex = m_proxyModel->findIndex(currentTheme); } else { m_appliedIndex = m_proxyModel->defaultIndex(); } // Disable the listview and the buttons if we're in kiosk mode if (cg.isEntryImmutable("cursorTheme")) { setCanConfigure(false); setCanInstall(false); } const CursorTheme *theme = m_proxyModel->theme(m_appliedIndex); setSelectedThemeRow(m_appliedIndex.row()); m_originalSelectedThemeRow = m_selectedThemeRow; // Load cursor size int size = cg.readEntry("cursorSize", 0); if (size <= 0) { m_preferredSize = 0; } else { m_preferredSize = size; } m_originalPreferredSize = m_preferredSize; updateSizeComboBox(); // This handles also the kiosk mode m_appliedSize = size; setNeedsSave(false); } void CursorThemeConfig::defaults() { QModelIndex defaultIndex = m_proxyModel->findIndex("breeze_cursors"); setSelectedThemeRow(defaultIndex.row()); m_preferredSize = 0; updateSizeComboBox(); setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); } void CursorThemeConfig::selectionChanged() { updateSizeComboBox(); setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); //setNeedsSave(m_appliedIndex != selectedIndex()); } QModelIndex CursorThemeConfig::selectedIndex() const { return m_proxyModel->index(m_selectedThemeRow, 0); } void CursorThemeConfig::getNewClicked() { KNS3::DownloadDialog dialog("xcursor.knsrc", nullptr); if (dialog.exec()) { KNS3::Entry::List list = dialog.changedEntries(); if (!list.isEmpty()) { m_model->refreshList(); } } } void CursorThemeConfig::installThemeFromFile(const QUrl &url) { if (url.isLocalFile()) { installThemeFile(url.toLocalFile()); return; } if (m_tempCopyJob) { return; } m_tempInstallFile.reset(new QTemporaryFile()); if (!m_tempInstallFile->open()) { emit showErrorMessage(i18n("Unable to create a temporary file.")); m_tempInstallFile.reset(); return; } m_tempCopyJob = KIO::file_copy(url,QUrl::fromLocalFile(m_tempInstallFile->fileName()), -1, KIO::Overwrite); m_tempCopyJob->uiDelegate()->setAutoErrorHandlingEnabled(true); emit downloadingFileChanged(); connect(m_tempCopyJob, &KIO::FileCopyJob::result, this, [this, url](KJob *job) { if (job->error() != KJob::NoError) { emit showErrorMessage(i18n("Unable to download the icon theme archive: %1", job->errorText())); return; } installThemeFile(m_tempInstallFile->fileName()); m_tempInstallFile.reset(); }); connect(m_tempCopyJob, &QObject::destroyed, this, &CursorThemeConfig::downloadingFileChanged); } void CursorThemeConfig::installThemeFile(const QString &path) { KTar archive(path); archive.open(QIODevice::ReadOnly); const KArchiveDirectory *archiveDir = archive.directory(); QStringList themeDirs; // Extract the dir names of the cursor themes in the archive, and // append them to themeDirs foreach(const QString &name, archiveDir->entries()) { const KArchiveEntry *entry = archiveDir->entry(name); if (entry->isDirectory() && entry->name().toLower() != "default") { const KArchiveDirectory *dir = static_cast(entry); if (dir->entry("index.theme") && dir->entry("cursors")) { themeDirs << dir->name(); } } } if (themeDirs.isEmpty()) { emit showErrorMessage(i18n("The file is not a valid icon theme archive.")); return; } // The directory we'll install the themes to QString destDir = QDir::homePath() + "/.icons/"; if (!QDir().mkpath(destDir)) { emit showErrorMessage(i18n("Failed to create 'icons' folder.")); return; }; // Process each cursor theme in the archive foreach (const QString &dirName, themeDirs) { QDir dest(destDir + dirName); if (dest.exists()) { QString question = i18n("A theme named %1 already exists in your icon " "theme folder. Do you want replace it with this one?", dirName); int answer = KMessageBox::warningContinueCancel(nullptr, question, i18n("Overwrite Theme?"), KStandardGuiItem::overwrite()); if (answer != KMessageBox::Continue) { continue; } // ### If the theme that's being replaced is the current theme, it // will cause cursor inconsistencies in newly started apps. } // ### Should we check if a theme with the same name exists in a global theme dir? // If that's the case it will effectively replace it, even though the global theme // won't be deleted. Checking for this situation is easy, since the global theme // will be in the listview. Maybe this should never be allowed since it might // result in strange side effects (from the average users point of view). OTOH // a user might want to do this 'upgrade' a global theme. const KArchiveDirectory *dir = static_cast (archiveDir->entry(dirName)); dir->copyTo(dest.path()); m_model->addTheme(dest); } archive.close(); emit showSuccessMessage(i18n("Theme installed successfully.")); m_model->refreshList(); } void CursorThemeConfig::removeTheme(int row) { QModelIndex idx = m_proxyModel->index(row, 0); if (!idx.isValid()) { return; } const CursorTheme *theme = m_proxyModel->theme(idx); // Don't let the user delete the currently configured theme if (idx == m_appliedIndex) { KMessageBox::sorry(nullptr, i18n("You cannot delete the theme you are currently " "using.
You have to switch to another theme first.
")); return; } // Get confirmation from the user QString question = i18n("Are you sure you want to remove the " "%1 cursor theme?
" "This will delete all the files installed by this theme.
", theme->title()); int answer = KMessageBox::warningContinueCancel(nullptr, question, i18n("Confirmation"), KStandardGuiItem::del()); if (answer != KMessageBox::Continue) { return; } // Delete the theme from the harddrive KIO::del(QUrl::fromLocalFile(theme->path())); // async // Remove the theme from the model m_proxyModel->removeTheme(idx); // TODO: // Since it's possible to substitute cursors in a system theme by adding a local // theme with the same name, we shouldn't remove the theme from the list if it's // still available elsewhere. We could add a // bool CursorThemeModel::tryAddTheme(const QString &name), and call that, but // since KIO::del() is an asynchronos operation, the theme we're deleting will be // readded to the list again before KIO has removed it. } #include "kcmcursortheme.moc" diff --git a/kcms/cursortheme/package/metadata.desktop b/kcms/cursortheme/package/metadata.desktop index 3882b08fd..fdec501e6 100644 --- a/kcms/cursortheme/package/metadata.desktop +++ b/kcms/cursortheme/package/metadata.desktop @@ -1,74 +1,74 @@ [Desktop Entry] Name=Cursors Name[ca]=Cursors Name[ca@valencia]=Cursors Name[cs]=Kurzory Name[da]=Markører Name[de]=Zeiger Name[el]=Δρομείς Name[en_GB]=Cursors Name[es]=Cursores Name[eu]=Kurtsoreak Name[fi]=Osoittimet Name[fr]=Pointeurs Name[gl]=Cursores Name[he]=מצביעים Name[hu]=Kurzorok Name[id]=Kursor Name[it]=Puntatori Name[ko]=커서 Name[lt]=Žymekliai Name[nl]=Cursors Name[nn]=Peikarar Name[pa]=ਕਰਸਰਾਂ Name[pl]=Wskaźniki Name[pt]=Cursores Name[pt_BR]=Cursores Name[ru]=Курсоры мыши Name[sk]=Kurzory Name[sl]=Kazalke Name[sr]=Показивачи Name[sr@ijekavian]=Показивачи Name[sr@ijekavianlatin]=Pokazivači Name[sr@latin]=Pokazivači Name[sv]=Pekare Name[tr]=İmleçler Name[uk]=Вказівники Name[x-test]=xxCursorsxx Name[zh_CN]=光标 Name[zh_TW]=游標 -Comment=Choose the mouse cursor theme +Comment=Choose mouse cursor theme Comment[ca]=Trieu el tema del cursor del ratolí Comment[ca@valencia]=Trieu el tema del cursor del ratolí Comment[de]=Design für den Mauszeiger auswählen Comment[es]=Escoger el tema de cursores de ratón Comment[fi]=Valitse hiiriosoitinteema Comment[gl]=Escoller o tema do cursor do rato Comment[id]=Memilih tema kursor mouse Comment[it]=Scegli il tema dei puntatori del mouse Comment[nl]=Het muiscursorthema kiezen Comment[nn]=Vel peikartema Comment[pl]=Wybierz zestaw wskaźników myszy Comment[pt]=Escolher o tema do cursor do rato Comment[pt_BR]=Escolha o tema do cursor do mouse Comment[ru]=Выбор темы курсоров мыши Comment[sk]=Vybrať tému kurzora myši Comment[sv]=Välj muspekartemat Comment[uk]=Вибір теми вказівника миші Comment[x-test]=xxChoose the mouse cursor themexx Comment[zh_CN]=选择鼠标光标主题 Comment[zh_TW]=選擇滑鼠游標主題 Icon=edit-select Keywords= Type=Service X-KDE-ParentApp= X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Email=mart@kde.org X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-Name=kcm_cursortheme X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://www.kde.org/plasma-desktop X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/desktoptheme/kcm.cpp b/kcms/desktoptheme/kcm.cpp index 38cdbc182..623e81501 100644 --- a/kcms/desktoptheme/kcm.cpp +++ b/kcms/desktoptheme/kcm.cpp @@ -1,370 +1,370 @@ /* This file is part of the KDE Project Copyright (c) 2014 Marco Martin Copyright (c) 2014 Vishesh Handa Copyright (c) 2016 David Rosca Copyright (c) 2018 Kai Uwe Broulik This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kcm.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include Q_LOGGING_CATEGORY(KCM_DESKTOP_THEME, "kcm_desktoptheme") K_PLUGIN_FACTORY_WITH_JSON(KCMDesktopThemeFactory, "kcm_desktoptheme.json", registerPlugin();) KCMDesktopTheme::KCMDesktopTheme(QObject *parent, const QVariantList &args) : KQuickAddons::ConfigModule(parent, args) , m_defaultTheme(new Plasma::Theme(this)) , m_haveThemeExplorerInstalled(false) { //This flag seems to be needed in order for QQuickWidget to work //see https://bugreports.qt-project.org/browse/QTBUG-40765 //also, it seems to work only if set in the kcm, not in the systemsettings' main qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); qmlRegisterType(); - KAboutData* about = new KAboutData(QStringLiteral("kcm_desktoptheme"), i18n("Choose the Plasma theme"), + KAboutData* about = new KAboutData(QStringLiteral("kcm_desktoptheme"), i18n("Plasma Theme"), QStringLiteral("0.1"), QString(), KAboutLicense::LGPL); about->addAuthor(i18n("David Rosca"), QString(), QStringLiteral("nowrep@gmail.com")); setAboutData(about); setButtons(Apply | Default | Help); m_model = new QStandardItemModel(this); QHash roles = m_model->roleNames(); roles[PluginNameRole] = QByteArrayLiteral("pluginName"); roles[ThemeNameRole] = QByteArrayLiteral("themeName"); roles[DescriptionRole] = QByteArrayLiteral("description"); roles[IsLocalRole] = QByteArrayLiteral("isLocal"); roles[PendingDeletionRole] = QByteArrayLiteral("pendingDeletion"); m_model->setItemRoleNames(roles); m_haveThemeExplorerInstalled = !QStandardPaths::findExecutable(QStringLiteral("plasmathemeexplorer")).isEmpty(); } KCMDesktopTheme::~KCMDesktopTheme() { delete m_defaultTheme; } QStandardItemModel *KCMDesktopTheme::desktopThemeModel() const { return m_model; } QString KCMDesktopTheme::selectedPlugin() const { return m_selectedPlugin; } void KCMDesktopTheme::setSelectedPlugin(const QString &plugin) { if (m_selectedPlugin == plugin) { return; } m_selectedPlugin = plugin; emit selectedPluginChanged(m_selectedPlugin); emit selectedPluginIndexChanged(); updateNeedsSave(); } int KCMDesktopTheme::selectedPluginIndex() const { const auto results = m_model->match(m_model->index(0, 0), PluginNameRole, m_selectedPlugin); if (results.count() == 1) { return results.first().row(); } return -1; } bool KCMDesktopTheme::downloadingFile() const { return m_tempCopyJob; } void KCMDesktopTheme::setPendingDeletion(int index, bool pending) { QModelIndex idx = m_model->index(index, 0); m_model->setData(idx, pending, PendingDeletionRole); if (pending && selectedPluginIndex() == index) { // move to the next non-pending theme const auto nonPending = m_model->match(idx, PendingDeletionRole, false); setSelectedPlugin(nonPending.first().data(PluginNameRole).toString()); } updateNeedsSave(); } void KCMDesktopTheme::getNewStuff(QQuickItem *ctx) { if (!m_newStuffDialog) { m_newStuffDialog = new KNS3::DownloadDialog(QStringLiteral("plasma-themes.knsrc")); m_newStuffDialog.data()->setWindowTitle(i18n("Download New Desktop Themes")); m_newStuffDialog->setWindowModality(Qt::WindowModal); m_newStuffDialog->winId(); // so it creates the windowHandle(); connect(m_newStuffDialog.data(), &KNS3::DownloadDialog::accepted, this, &KCMDesktopTheme::load); } if (ctx && ctx->window()) { m_newStuffDialog->windowHandle()->setTransientParent(ctx->window()); } m_newStuffDialog.data()->show(); } void KCMDesktopTheme::installThemeFromFile(const QUrl &url) { if (url.isLocalFile()) { installTheme(url.toLocalFile()); return; } if (m_tempCopyJob) { return; } m_tempInstallFile.reset(new QTemporaryFile()); if (!m_tempInstallFile->open()) { emit showErrorMessage(i18n("Unable to create a temporary file.")); m_tempInstallFile.reset(); return; } m_tempCopyJob = KIO::file_copy(url, QUrl::fromLocalFile(m_tempInstallFile->fileName()), -1, KIO::Overwrite); m_tempCopyJob->uiDelegate()->setAutoErrorHandlingEnabled(true); emit downloadingFileChanged(); connect(m_tempCopyJob, &KIO::FileCopyJob::result, this, [this, url](KJob *job) { if (job->error() != KJob::NoError) { emit showErrorMessage(i18n("Unable to download the theme: %1", job->errorText())); return; } installTheme(m_tempInstallFile->fileName()); m_tempInstallFile.reset(); }); connect(m_tempCopyJob, &QObject::destroyed, this, &KCMDesktopTheme::downloadingFileChanged); } void KCMDesktopTheme::installTheme(const QString &path) { qCDebug(KCM_DESKTOP_THEME) << "Installing ... " << path; const QString program = QStringLiteral("kpackagetool5"); const QStringList arguments = { QStringLiteral("--type"), QStringLiteral("Plasma/Theme"), QStringLiteral("--install"), path}; qCDebug(KCM_DESKTOP_THEME) << program << arguments.join(QStringLiteral(" ")); QProcess *myProcess = new QProcess(this); connect(myProcess, static_cast(&QProcess::finished), this, [this, myProcess](int exitCode, QProcess::ExitStatus exitStatus) { Q_UNUSED(exitStatus); if (exitCode == 0) { emit showSuccessMessage(i18n("Theme installed successfully.")); load(); } else { Q_EMIT showErrorMessage(i18n("Theme installation failed.")); } }); connect(myProcess, static_cast(&QProcess::error), this, [this](QProcess::ProcessError e) { qCWarning(KCM_DESKTOP_THEME) << "Theme installation failed: " << e; Q_EMIT showErrorMessage(i18n("Theme installation failed.")); }); myProcess->start(program, arguments); } void KCMDesktopTheme::applyPlasmaTheme(QQuickItem *item, const QString &themeName) { if (!item) { return; } Plasma::Theme *theme = m_themes[themeName]; if (!theme) { theme = new Plasma::Theme(themeName, this); m_themes[themeName] = theme; } Q_FOREACH (Plasma::Svg *svg, item->findChildren()) { svg->setTheme(theme); svg->setUsingRenderingCache(false); } } void KCMDesktopTheme::load() { m_pendingRemoval.clear(); // Get all desktop themes QStringList themes; const QStringList &packs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("plasma/desktoptheme"), QStandardPaths::LocateDirectory); Q_FOREACH (const QString &ppath, packs) { const QDir cd(ppath); const QStringList &entries = cd.entryList(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot); Q_FOREACH (const QString &pack, entries) { const QString _metadata = ppath + QLatin1Char('/') + pack + QStringLiteral("/metadata.desktop"); if (QFile::exists(_metadata)) { themes << _metadata; } } } m_model->clear(); Q_FOREACH (const QString &theme, themes) { int themeSepIndex = theme.lastIndexOf(QLatin1Char('/'), -1); const QString themeRoot = theme.left(themeSepIndex); int themeNameSepIndex = themeRoot.lastIndexOf(QLatin1Char('/'), -1); const QString packageName = themeRoot.right(themeRoot.length() - themeNameSepIndex - 1); KDesktopFile df(theme); if (df.noDisplay()) { continue; } QString name = df.readName(); if (name.isEmpty()) { name = packageName; } const bool isLocal = QFileInfo(theme).isWritable(); if (m_model->findItems(packageName).isEmpty()) { QStandardItem *item = new QStandardItem; item->setText(packageName); item->setData(packageName, PluginNameRole); item->setData(name, ThemeNameRole); item->setData(df.readComment(), DescriptionRole); item->setData(isLocal, IsLocalRole); item->setData(false, PendingDeletionRole); m_model->appendRow(item); } } m_model->setSortRole(ThemeNameRole); // FIXME the model should really be just using Qt::DisplayRole m_model->sort(0 /*column*/); KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("plasmarc")), "Theme"); setSelectedPlugin(cg.readEntry("name", m_defaultTheme->themeName())); updateNeedsSave(); } void KCMDesktopTheme::save() { if (m_defaultTheme->themeName() != m_selectedPlugin) { m_defaultTheme->setThemeName(m_selectedPlugin); } processPendingDeletions(); updateNeedsSave(); } void KCMDesktopTheme::defaults() { setSelectedPlugin(QStringLiteral("default")); // can this be done more elegantly? const auto pendingDeletions = m_model->match(m_model->index(0, 0), PendingDeletionRole, true); for (const QModelIndex &idx : pendingDeletions) { m_model->setData(idx, false, PendingDeletionRole); } } bool KCMDesktopTheme::canEditThemes() const { return m_haveThemeExplorerInstalled; } void KCMDesktopTheme::editTheme(const QString &theme) { QProcess::startDetached(QStringLiteral("plasmathemeexplorer -t ") % theme); } void KCMDesktopTheme::updateNeedsSave() { setNeedsSave(!m_model->match(m_model->index(0, 0), PendingDeletionRole, true).isEmpty() || m_selectedPlugin != m_defaultTheme->themeName()); } void KCMDesktopTheme::processPendingDeletions() { const QString program = QStringLiteral("plasmapkg2"); const auto pendingDeletions = m_model->match(m_model->index(0, 0), PendingDeletionRole, true, -1 /*all*/); QVector persistentPendingDeletions; // turn into persistent model index so we can delete as we go std::transform(pendingDeletions.begin(), pendingDeletions.end(), std::back_inserter(persistentPendingDeletions), [](const QModelIndex &idx) { return QPersistentModelIndex(idx); }); for (const QPersistentModelIndex &idx : persistentPendingDeletions) { const QString pluginName = idx.data(PluginNameRole).toString(); const QString displayName = idx.data(Qt::DisplayRole).toString(); Q_ASSERT(pluginName != m_selectedPlugin); const QStringList arguments = {QStringLiteral("-t"), QStringLiteral("theme"), QStringLiteral("-r"), pluginName}; QProcess *process = new QProcess(this); connect(process, static_cast(&QProcess::finished), this, [this, process, idx, pluginName, displayName](int exitCode, QProcess::ExitStatus exitStatus) { Q_UNUSED(exitStatus); if (exitCode == 0) { m_model->removeRow(idx.row()); } else { emit showErrorMessage(i18n("Removing theme failed: %1", QString::fromLocal8Bit(process->readAllStandardOutput().trimmed()))); m_model->setData(idx, false, PendingDeletionRole); } process->deleteLater(); }); process->start(program, arguments); process->waitForFinished(); // needed so it deletes fine when "OK" is clicked and the dialog destroyed } } #include "kcm.moc" diff --git a/kcms/desktoptheme/kcm_desktoptheme.desktop b/kcms/desktoptheme/kcm_desktoptheme.desktop index 0c4cede62..d19fcd735 100644 --- a/kcms/desktoptheme/kcm_desktoptheme.desktop +++ b/kcms/desktoptheme/kcm_desktoptheme.desktop @@ -1,109 +1,109 @@ [Desktop Entry] Icon=preferences-desktop-plasma-theme Exec=kcmshell5 kcm_desktoptheme Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_desktoptheme X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=workspacetheme X-KDE-Weight=40 X-DocPath=kcontrol/desktopthemedetails/index.html Name=Plasma Theme Name[ca]=Tema del Plasma Name[ca@valencia]=Tema del Plasma Name[cs]=Motiv Plasma Name[de]=Plasma-Design Name[es]=Tema de Plasma Name[fi]=Plasma-teema Name[fr]=Thème Plasma pour les thèmes foncés Name[gl]=Tema de Plasma Name[id]=Tema Plasma Name[it]=Tema di Plasma Name[nl]=Plasma-thema Name[nn]=Plasma-tema Name[pl]=Wygląd Plazmy Name[pt]=Tema do Plasma Name[pt_BR]=Tema do Plasma Name[ru]=Тема оформления Plasma Name[sk]=Plasma téma Name[sv]=Plasmatema Name[uk]=Теми Плазми Name[x-test]=xxPlasma Themexx Name[zh_CN]=Plasma 主题 Name[zh_TW]=Plasma 主題 -Comment=Choose the Plasma theme +Comment=Choose Plasma theme Comment[ca]=Trieu el tema del Plasma Comment[ca@valencia]=Trieu el tema del Plasma Comment[de]=Plasma-Design auswählen Comment[es]=Escoger el tema de Plasma Comment[fi]=Valitse Plasma-teema Comment[gl]=Escoller o tema de Plasma Comment[id]=Memilih tema Plasma Comment[it]=Scegli il tema di Plasma Comment[nl]=Kies het Plasma-thema Comment[nn]=Vel Plasma-tema Comment[pl]=Wybierz wygląd Plazmy Comment[pt]=Escolher o tema do Plasma Comment[pt_BR]=Escolha o tema do Plasma Comment[ru]=Выбор темы оформления Plasma Comment[sk]=Vybrať Plasma tému Comment[sv]=Välj Plasmatemat Comment[uk]=Вибір теми Плазми Comment[x-test]=xxChoose the Plasma themexx Comment[zh_CN]=选择 Plasma 主题 Comment[zh_TW]=選擇 Plasma 主題 X-KDE-Keywords=Desktop Theme X-KDE-Keywords[ar]=سمة سطح المكتب X-KDE-Keywords[bs]=Tema površi X-KDE-Keywords[ca]=Tema d'escriptori X-KDE-Keywords[ca@valencia]=Tema d'escriptori X-KDE-Keywords[cs]=Motiv plochy X-KDE-Keywords[da]=Skrivebordstema X-KDE-Keywords[de]=Arbeitsflächen-Design X-KDE-Keywords[el]=Θέμα επιφάνειας εργασίας X-KDE-Keywords[en_GB]=Desktop Theme X-KDE-Keywords[es]=Tema de escritorio X-KDE-Keywords[et]=Töölauateema X-KDE-Keywords[eu]=Mahaigaineko gaia X-KDE-Keywords[fi]=Työpöytäteema X-KDE-Keywords[fr]=Thème du bureau X-KDE-Keywords[ga]=Téama Deisce X-KDE-Keywords[gl]=Tema do escritorio X-KDE-Keywords[he]=ערכת־הנושא X-KDE-Keywords[hu]=Asztali téma X-KDE-Keywords[ia]=Thema de scriptorio X-KDE-Keywords[id]=Tema Desktop X-KDE-Keywords[is]=Skjáborðsþema X-KDE-Keywords[it]=Tema del desktop X-KDE-Keywords[ja]=デスクトップテーマ X-KDE-Keywords[kk]=Desktop Theme,Үстел нақышы X-KDE-Keywords[km]=រូបរាង​ផ្ទៃតុ X-KDE-Keywords[ko]=데스크톱 테마 X-KDE-Keywords[lt]=Darbalaukio apipavidalinimas X-KDE-Keywords[mr]=डेस्कटॉप शैली X-KDE-Keywords[nb]=Skrivebordstema X-KDE-Keywords[nds]=Schriefdischmuster X-KDE-Keywords[nl]=Bureaubladthema X-KDE-Keywords[nn]=Skrivebordstema X-KDE-Keywords[pa]=ਡੈਸਕਟਾਪ ਥੀਮ X-KDE-Keywords[pl]=Wygląd pulpitu X-KDE-Keywords[pt]=Tema do Ambiente de Trabalho X-KDE-Keywords[pt_BR]=Tema da área de trabalho X-KDE-Keywords[ro]=Tematica de birou X-KDE-Keywords[ru]=Тема рабочего стола X-KDE-Keywords[sk]=Téma plochy X-KDE-Keywords[sl]=Namizna tema X-KDE-Keywords[sr]=Desktop Theme,тема површи X-KDE-Keywords[sr@ijekavian]=Desktop Theme,тема површи X-KDE-Keywords[sr@ijekavianlatin]=Desktop Theme,tema površi X-KDE-Keywords[sr@latin]=Desktop Theme,tema površi X-KDE-Keywords[sv]=Skrivbordstema X-KDE-Keywords[tr]=Masaüstü Teması X-KDE-Keywords[ug]=ئۈستەلئۈستى ئۆرنىكى X-KDE-Keywords[uk]=тема,стільниця X-KDE-Keywords[vi]=Sắc thái màn hình X-KDE-Keywords[x-test]=xxDesktop Themexx X-KDE-Keywords[zh_CN]=Desktop Theme,桌面主题 X-KDE-Keywords[zh_TW]=Desktop Theme diff --git a/kcms/desktoptheme/package/metadata.desktop b/kcms/desktoptheme/package/metadata.desktop index e19b6e919..449e8edc6 100644 --- a/kcms/desktoptheme/package/metadata.desktop +++ b/kcms/desktoptheme/package/metadata.desktop @@ -1,59 +1,59 @@ [Desktop Entry] Name=Plasma Theme Name[ca]=Tema del Plasma Name[ca@valencia]=Tema del Plasma Name[cs]=Motiv Plasma Name[de]=Plasma-Design Name[es]=Tema de Plasma Name[fi]=Plasma-teema Name[fr]=Thème Plasma pour les thèmes foncés Name[gl]=Tema de Plasma Name[id]=Tema Plasma Name[it]=Tema di Plasma Name[nl]=Plasma-thema Name[nn]=Plasma-tema Name[pl]=Wygląd Plazmy Name[pt]=Tema do Plasma Name[pt_BR]=Tema do Plasma Name[ru]=Тема оформления Plasma Name[sk]=Plasma téma Name[sv]=Plasmatema Name[uk]=Теми Плазми Name[x-test]=xxPlasma Themexx Name[zh_CN]=Plasma 主题 Name[zh_TW]=Plasma 主題 -Comment=Choose the Plasma theme +Comment=Choose Plasma theme Comment[ca]=Trieu el tema del Plasma Comment[ca@valencia]=Trieu el tema del Plasma Comment[de]=Plasma-Design auswählen Comment[es]=Escoger el tema de Plasma Comment[fi]=Valitse Plasma-teema Comment[gl]=Escoller o tema de Plasma Comment[id]=Memilih tema Plasma Comment[it]=Scegli il tema di Plasma Comment[nl]=Kies het Plasma-thema Comment[nn]=Vel Plasma-tema Comment[pl]=Wybierz wygląd Plazmy Comment[pt]=Escolher o tema do Plasma Comment[pt_BR]=Escolha o tema do Plasma Comment[ru]=Выбор темы оформления Plasma Comment[sk]=Vybrať Plasma tému Comment[sv]=Välj Plasmatemat Comment[uk]=Вибір теми Плазми Comment[x-test]=xxChoose the Plasma themexx Comment[zh_CN]=选择 Plasma 主题 Comment[zh_TW]=選擇 Plasma 主題 Icon=preferences-desktop-theme Keywords= Type=Service X-KDE-ParentApp= X-KDE-PluginInfo-Author=David Rosca X-KDE-PluginInfo-Email=nowrep@gmail.com X-KDE-PluginInfo-License=GPL-2.0+ X-KDE-PluginInfo-Name=kcm_desktoptheme X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://www.kde.org/plasma-desktop X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/emoticons/emoticons.desktop b/kcms/emoticons/emoticons.desktop index 46ce6b63c..ee828f45d 100644 --- a/kcms/emoticons/emoticons.desktop +++ b/kcms/emoticons/emoticons.desktop @@ -1,203 +1,203 @@ [Desktop Entry] Exec=kcmshell5 emoticons Icon=face-smile Type=Service X-DocPath=kcontrol/emoticons/index.html X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_emoticons X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=icons X-KDE-Weight=110 Name=Emoticons Name[af]=Emotikons Name[ar]=الوجوه التّعبيرية Name[as]=ভাব-প্ৰতীক Name[be@latin]=Smajliki Name[bg]=Емотикони Name[bn]=ইমোট-আইকন Name[bn_IN]=ইমোআইকন Name[bs]=Emotikoni Name[ca]=Emoticones Name[ca@valencia]=Emoticones Name[cs]=Emotikony Name[csb]=Emòtikónczi Name[da]=Emotikoner Name[de]=Emoticons Name[el]=Εικονίδια διάθεσης Name[en_GB]=Emoticons Name[eo]=Miensimboloj Name[es]=Emoticonos Name[et]=Emotikonid Name[eu]=Aurpegierak Name[fa]=صورتک Name[fi]=Hymiöt Name[fr]=Émoticônes Name[fy]=Emobyldkaikes Name[ga]=Straoiseoga Name[gl]=Emoticonas Name[gu]=લાગણીઓ Name[he]=רגשונים Name[hi]=हँसमुख Name[hne]=चेहराचिनहा Name[hr]=Emoticons Name[hsb]=Emotikony Name[hu]=Emotikonok Name[ia]=Emoticones Name[id]=Emoticon Name[is]=Tjáningartákn Name[it]=Faccine Name[ja]=感情アイコン Name[kk]=Көңіл күйі белгілері Name[km]=សញ្ញា​អារម្មណ៍ Name[kn]=ಭಾವನಾಚಿಹ್ನೆಗಳು (ಎಮೋಟಿಕಾನ್) Name[ko]=이모티콘 Name[ku]=Emotîkon Name[lt]=Jaustukai Name[lv]=Emocijzīmes Name[mai]=भाव-प्रतीक Name[mk]=Емотикони Name[ml]=വികാരചിഹ്നങ്ങള്‍ Name[mr]=भावप्रतिमा Name[nb]=Humørfjes Name[nds]=Snuten Name[nl]=Emoticons Name[nn]=Fjesingar Name[or]=Emoticons Name[pa]=ਈਮੋਸ਼ਨ Name[pl]=Emotikony Name[pt]=Ícones Emotivos Name[pt_BR]=Emoticons Name[ro]=Emoticoni Name[ru]=Смайлики Name[si]=ඉමොටිකොන Name[sk]=Emotikony Name[sl]=Izrazne ikone Name[sr]=Емотикони Name[sr@ijekavian]=Емотикони Name[sr@ijekavianlatin]=Emotikoni Name[sr@latin]=Emotikoni Name[sv]=Smilisar Name[ta]=உணர்வோயியங்கள் Name[te]=ఎమొటికాన్లు Name[tg]=Тасвирчаҳо Name[th]=ไอคอนสื่ออารมณ์ Name[tr]=Duygu Simgeleri Name[ug]=چىراي ئىپادىلىرى Name[uk]=Емоційки Name[uz]=His-tuygʻular Name[uz@cyrillic]=Ҳис-туйғулар Name[vi]=Hình biểu cảm Name[wa]=Xhinêyes Name[x-test]=xxEmoticonsxx Name[zh_CN]=表情符号 Name[zh_TW]=表情圖示 -Comment=Emoticon Theme +Comment=Choose emoticon theme Comment[ar]=سمة الوجوه التّعبيرية Comment[bs]=Tema emotikona Comment[ca]=Tema d'emoticones Comment[ca@valencia]=Tema d'emoticones Comment[cs]=Motiv emotikonů Comment[da]=Emotikontema Comment[de]=Emoticon-Design Comment[el]=Θέμα εικονιδίων διάθεσης Comment[en_GB]=Emoticon Theme Comment[es]=Tema de emoticonos Comment[et]=Emotikoniteema Comment[eu]=Aurpegiera gaia Comment[fi]=Hymiöteema Comment[fr]=Thème d'émoticônes Comment[gl]=Tema de emoticonas Comment[he]=מנהל ערכות רגשונים Comment[hu]=Hangulatjel-téma Comment[id]=Tema Emoticon Comment[is]=Tjáningartáknaþema Comment[it]=Tema delle faccine Comment[ja]=感情アイコンテーマ Comment[ko]=이모티콘 테마 Comment[lt]=Jaustukų apipavidalinimas Comment[mr]=भावप्रतिमा शैली Comment[nb]=Humørfjestema Comment[nds]=Snutensett Comment[nl]=Thema voor emoticons Comment[nn]=Fjesingtema Comment[pa]= ਈਮੋਸ਼ਨ ਥੀਮ Comment[pl]=Zestaw emotikon Comment[pt]=Tema de Ícones Emotivos Comment[pt_BR]=Tema de emoticons Comment[ru]=Набор смайликов Comment[sk]=Téma emotikonov Comment[sl]=Tema izraznih ikon Comment[sr]=Тема емотикона Comment[sr@ijekavian]=Тема емотикона Comment[sr@ijekavianlatin]=Tema emotikona Comment[sr@latin]=Tema emotikona Comment[sv]=Smilistema Comment[tr]=Duygu Teması Comment[uk]=Тема емоційок Comment[x-test]=xxEmoticon Themexx Comment[zh_CN]=表情主题 Comment[zh_TW]=表情圖示主題 X-KDE-Keywords=Emoticons X-KDE-Keywords[ar]=الوجوه التعبيرية,وجوه تعبيرية,ابتسامات X-KDE-Keywords[bg]=Emoticons,Емотикони X-KDE-Keywords[bn]=ইমোট-আইকন X-KDE-Keywords[bs]=Emotikoni X-KDE-Keywords[ca]=Emoticones X-KDE-Keywords[ca@valencia]=Emoticones X-KDE-Keywords[cs]=Emotikony X-KDE-Keywords[da]=Emotikoner X-KDE-Keywords[de]=Emoticons X-KDE-Keywords[el]=Εικονίδια διάθεσης X-KDE-Keywords[en_GB]=Emoticons X-KDE-Keywords[eo]=Miensimboloj X-KDE-Keywords[es]=Emoticonos X-KDE-Keywords[et]=Emotikonid X-KDE-Keywords[eu]=Aurpegierak X-KDE-Keywords[fa]=صورتک X-KDE-Keywords[fi]=Hymiöt X-KDE-Keywords[fr]=Émoticônes X-KDE-Keywords[ga]=Straoiseoga X-KDE-Keywords[gl]=Emoticonas X-KDE-Keywords[gu]=લાગણીઓ X-KDE-Keywords[he]=רגשונים X-KDE-Keywords[hi]=हँसमुख X-KDE-Keywords[hu]=Emotikonok X-KDE-Keywords[ia]=Emoticones X-KDE-Keywords[id]=Emoticons X-KDE-Keywords[is]=Tjáningartákn X-KDE-Keywords[it]=Faccine X-KDE-Keywords[ja]=感情アイコン X-KDE-Keywords[kk]=Emoticons,Көңіл күйі белгілері X-KDE-Keywords[km]=សញ្ញា​អារម្មណ៍ X-KDE-Keywords[ko]=이모티콘 X-KDE-Keywords[lt]=Jaustukai X-KDE-Keywords[lv]=Emocijzīmes X-KDE-Keywords[mr]=भावप्रतिमा X-KDE-Keywords[nb]=Humørfjes X-KDE-Keywords[nds]=Snuten,Emoticons X-KDE-Keywords[nl]=Emoticons X-KDE-Keywords[nn]=Fjesingar X-KDE-Keywords[pa]=ਈਮੋਸ਼ਨ X-KDE-Keywords[pl]=Emotikony X-KDE-Keywords[pt]=Ícones Emotivos X-KDE-Keywords[pt_BR]=Emoticons X-KDE-Keywords[ro]=Emoticoni X-KDE-Keywords[ru]=Emoticons,смайлики,смайлы,улыбочки X-KDE-Keywords[sk]=Emotikony X-KDE-Keywords[sl]=Izrazne ikone X-KDE-Keywords[sr]=emoticons,емотикони X-KDE-Keywords[sr@ijekavian]=emoticons,емотикони X-KDE-Keywords[sr@ijekavianlatin]=emoticons,emotikoni X-KDE-Keywords[sr@latin]=emoticons,emotikoni X-KDE-Keywords[sv]=Smilisar X-KDE-Keywords[tg]=Тасвирчаҳо X-KDE-Keywords[tr]=Duygu Simgeleri X-KDE-Keywords[ug]=چىراي ئىپادىلىرى X-KDE-Keywords[uk]=емоційка,емоційки,смайлик,смайлики X-KDE-Keywords[vi]=Hình biểu cảm X-KDE-Keywords[wa]=Xhinêyes X-KDE-Keywords[x-test]=xxEmoticonsxx X-KDE-Keywords[zh_CN]=表情符号 X-KDE-Keywords[zh_TW]=Emoticons diff --git a/kcms/fonts/fonts.cpp b/kcms/fonts/fonts.cpp index ec82c0f14..b91cdfca5 100644 --- a/kcms/fonts/fonts.cpp +++ b/kcms/fonts/fonts.cpp @@ -1,711 +1,711 @@ /* Copyright 1997 Mark Donohoe Copyright 1999 Lars Knoll Copyright 2000 Rik Hemsley Copyright 2015 Antonis Tsiapaliokas Copyright 2017 Marco Martin Ported to kcontrol2 by Geert Jansen. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "fonts.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../krdb/krdb.h" #include "previewimageprovider.h" /**** DLL Interface ****/ K_PLUGIN_FACTORY_WITH_JSON(KFontsFactory, "kcm_fonts.json", registerPlugin();) //from KFontRequester // Determine if the font with given properties is available on the system, // otherwise find and return the best fitting combination. static QFont nearestExistingFont(const QFont &font) { QFontDatabase dbase; // Initialize font data according to given font object. QString family = font.family(); QString style = dbase.styleString(font); qreal size = font.pointSizeF(); // Check if the family exists. const QStringList families = dbase.families(); if (!families.contains(family)) { // Chose another family. family = QFontInfo(font).family(); // the nearest match if (!families.contains(family)) { family = families.count() ? families.at(0) : QStringLiteral("fixed"); } } // Check if the family has the requested style. // Easiest by piping it through font selection in the database. QString retStyle = dbase.styleString(dbase.font(family, style, 10)); style = retStyle; // Check if the family has the requested size. // Only for bitmap fonts. if (!dbase.isSmoothlyScalable(family, style)) { QList sizes = dbase.smoothSizes(family, style); if (!sizes.contains(size)) { // Find nearest available size. int mindiff = 1000; int refsize = size; Q_FOREACH (int lsize, sizes) { int diff = qAbs(refsize - lsize); if (mindiff > diff) { mindiff = diff; size = lsize; } } } } // Select the font with confirmed properties. QFont result = dbase.font(family, style, int(size)); if (dbase.isSmoothlyScalable(family, style) && result.pointSize() == floor(size)) { result.setPointSizeF(size); } return result; } /**** FontAASettings ****/ #if defined(HAVE_FONTCONFIG) && defined (HAVE_X11) FontAASettings::FontAASettings(QObject *parent) : QObject(parent) , m_subPixelOptionsModel(new QStandardItemModel(this)) , m_hintingOptionsModel(new QStandardItemModel(this)) { for (int t = KXftConfig::SubPixel::NotSet; t <= KXftConfig::SubPixel::Vbgr; ++t) { QStandardItem *item = new QStandardItem(KXftConfig::description((KXftConfig::SubPixel::Type)t)); m_subPixelOptionsModel->appendRow(item); } for (int s = KXftConfig::Hint::NotSet; s <= KXftConfig::Hint::Full; ++s) { QStandardItem * item = new QStandardItem(KXftConfig::description((KXftConfig::Hint::Style)s)); m_hintingOptionsModel->appendRow(item); } } void FontAASettings::load() { double from, to; KXftConfig xft; if (xft.getExcludeRange(from, to)) { m_excludeFrom = from; m_excludeTo = to; setExclude(true); } else { m_excludeFrom = 8; m_excludeTo = 15; setExclude(false); } m_excludeFromOriginal = m_excludeFrom; m_excludeToOriginal = m_excludeTo; excludeToChanged(); excludeFromChanged(); KXftConfig::SubPixel::Type spType; xft.getSubPixelType(spType); setSubPixelCurrentIndex(spType); m_subPixelCurrentIndexOriginal = spType; KXftConfig::Hint::Style hStyle; if (!xft.getHintStyle(hStyle) || KXftConfig::Hint::NotSet == hStyle) { KConfig kglobals("kdeglobals", KConfig::NoGlobals); hStyle = KXftConfig::Hint::NotSet; xft.setHintStyle(hStyle); KConfigGroup(&kglobals, "General").writeEntry("XftHintStyle", KXftConfig::toStr(hStyle)); kglobals.sync(); runRdb(KRdbExportXftSettings | KRdbExportGtkTheme); } setHintingCurrentIndex(hStyle); m_hintingCurrentIndexOriginal = hStyle; KConfig _cfgfonts("kcmfonts"); KConfigGroup cfgfonts(&_cfgfonts, "General"); int dpicfg; if (KWindowSystem::isPlatformWayland()) { dpicfg = cfgfonts.readEntry("forceFontDPIWayland", 0); } else { dpicfg = cfgfonts.readEntry("forceFontDPI", 0); } if (dpicfg <= 0) { m_dpiOriginal = 0; } else { m_dpiOriginal = dpicfg; }; setDpi(dpicfg); KSharedConfig::Ptr config = KSharedConfig::openConfig("kdeglobals"); KConfigGroup cg(config, "General"); if (cfgfonts.readEntry("dontChangeAASettings", true)) { setAntiAliasing(1); //AASystem } else if (cg.readEntry("XftAntialias", true)) { setAntiAliasing(0); //AAEnabled } else { setAntiAliasing(2); //AADisabled } m_antiAliasingOriginal = m_antiAliasing; } bool FontAASettings::save(KXftConfig::AntiAliasing::State aaState) { KXftConfig xft; KConfig kglobals("kdeglobals", KConfig::NoGlobals); KConfigGroup grp(&kglobals, "General"); xft.setAntiAliasing(aaState); if (m_exclude) { xft.setExcludeRange(m_excludeFrom, m_excludeTo); } else { xft.setExcludeRange(0, 0); } KXftConfig::SubPixel::Type spType = (KXftConfig::SubPixel::Type)m_subPixelCurrentIndex; xft.setSubPixelType(spType); grp.writeEntry("XftSubPixel", KXftConfig::toStr(spType)); if (aaState == KXftConfig::AntiAliasing::NotSet) { grp.revertToDefault("XftAntialias"); } else { grp.writeEntry("XftAntialias", aaState == KXftConfig::AntiAliasing::Enabled); } bool mod = false; KXftConfig::Hint::Style hStyle = (KXftConfig::Hint::Style)m_hintingCurrentIndex; xft.setHintStyle(hStyle); QString hs(KXftConfig::toStr(hStyle)); if (hs != grp.readEntry("XftHintStyle")) { if (KXftConfig::Hint::NotSet == hStyle) { grp.revertToDefault("XftHintStyle"); } else { grp.writeEntry("XftHintStyle", hs); } } mod = true; kglobals.sync(); if (!mod) { mod = xft.changed(); } xft.apply(); KConfig _cfgfonts("kcmfonts"); KConfigGroup cfgfonts(&_cfgfonts, "General"); if (KWindowSystem::isPlatformWayland()) { cfgfonts.writeEntry("forceFontDPIWayland", m_dpi); } else { cfgfonts.writeEntry("forceFontDPI", m_dpi); } cfgfonts.sync(); #if HAVE_X11 // if the setting is reset in the module, remove the dpi value, // otherwise don't explicitly remove it and leave any possible system-wide value if (m_dpi == 0 && m_dpiOriginal != 0 && !KWindowSystem::isPlatformWayland()) { QProcess proc; proc.setProcessChannelMode(QProcess::ForwardedChannels); proc.start("xrdb", QStringList() << "-quiet" << "-remove" << "-nocpp"); if (proc.waitForStarted()) { proc.write(QByteArray("Xft.dpi\n")); proc.closeWriteChannel(); proc.waitForFinished(); } } #endif QApplication::processEvents(); // Process font change ourselves // Don't overwrite global settings unless explicitly asked for - e.g. the system // fontconfig setup may be much more complex than this module can provide. // TODO: With AASystem the changes already made by this module should be reverted somehow. #if defined(HAVE_FONTCONFIG) && defined (HAVE_X11) if (mod || (m_antiAliasing != m_antiAliasingOriginal) || m_dpi != m_dpiOriginal) { KMessageBox::information(nullptr, i18n( "

Some changes such as anti-aliasing or DPI will only affect newly started applications.

" ), i18n("Font Settings Changed"), "FontSettingsChanged"); m_antiAliasingOriginal = m_antiAliasing; m_dpiOriginal = m_dpi; } #else #if HAVE_X11 if (m_dpi != m_dpiOriginal) { KMessageBox::information(0, i18n( "

Some changes such as DPI will only affect newly started applications.

" ), i18n("Font Settings Changed"), "FontSettingsChanged"); m_dpiOriginal = m_dpi; } #endif #endif m_excludeToOriginal = m_excludeTo; m_excludeFromOriginal = m_excludeFrom; m_subPixelCurrentIndexOriginal = m_subPixelCurrentIndex; m_hintingCurrentIndexOriginal = m_hintingCurrentIndex; return mod; } void FontAASettings::defaults() { setExcludeTo(15); setExcludeFrom(8); setAntiAliasing(1); m_antiAliasingOriginal = m_antiAliasing; setDpi(0); setSubPixelCurrentIndex(KXftConfig::SubPixel::NotSet); setHintingCurrentIndex(KXftConfig::Hint::NotSet); } #endif void FontAASettings::setExclude(bool exclude) { if (exclude == m_exclude) { return; } m_exclude = exclude; emit excludeChanged(); } bool FontAASettings::exclude() const { return m_exclude; } void FontAASettings::setExcludeTo(const int &excludeTo) { if (m_excludeTo == excludeTo) { return; } m_excludeTo = excludeTo; emit excludeToChanged(); } int FontAASettings::excludeTo() const { return m_excludeTo; } void FontAASettings::setExcludeFrom(const int &excludeTo) { if (m_excludeFrom == excludeTo) { return; } m_excludeFrom = excludeTo; emit excludeToChanged(); } int FontAASettings::excludeFrom() const { return m_excludeFrom; } void FontAASettings::setAntiAliasing(const int &antiAliasing) { if (m_antiAliasing == antiAliasing) { return; } m_antiAliasing = antiAliasing; emit aliasingChanged(); } int FontAASettings::antiAliasing() const { return m_antiAliasing; } void FontAASettings::setDpi(const int &dpi) { if (m_dpi == dpi) { return; } m_dpi = dpi; emit dpiChanged(); } int FontAASettings::dpi() const { return m_dpi; } void FontAASettings::setSubPixelCurrentIndex(int idx) { if (m_subPixelCurrentIndex == idx) { return; } m_subPixelCurrentIndex = idx; emit subPixelCurrentIndexChanged(); } int FontAASettings::subPixelCurrentIndex() { return m_subPixelCurrentIndex; } void FontAASettings::setHintingCurrentIndex(int idx) { if (m_hintingCurrentIndex == idx) { return; } m_hintingCurrentIndex = idx; emit hintingCurrentIndexChanged(); } int FontAASettings::hintingCurrentIndex() { return m_hintingCurrentIndex; } bool FontAASettings::needsSave() const { return m_excludeTo != m_excludeToOriginal || m_excludeFrom != m_excludeFromOriginal || m_antiAliasing != m_antiAliasingOriginal || m_dpi != m_dpiOriginal || m_subPixelCurrentIndex != m_subPixelCurrentIndexOriginal || m_hintingCurrentIndex != m_hintingCurrentIndexOriginal; } /**** KFonts ****/ KFonts::KFonts(QObject *parent, const QVariantList &args) : KQuickAddons::ConfigModule(parent, args) , m_fontAASettings(new FontAASettings(this)) { qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); - KAboutData* about = new KAboutData("kcm_fonts", i18n("Configure the system fonts"), + KAboutData* about = new KAboutData("kcm_fonts", i18n("Fonts"), "0.1", QString(), KAboutLicense::LGPL); about->addAuthor(i18n("Antonis Tsiapaliokas"), QString(), "antonis.tsiapaliokas@kde.org"); setAboutData(about); qmlRegisterType(); setButtons(Apply | Default | Help); auto updateState = [this]() { setNeedsSave(m_fontAASettings->needsSave()); }; connect(m_fontAASettings, &FontAASettings::subPixelCurrentIndexChanged, this, updateState); connect(m_fontAASettings, &FontAASettings::hintingCurrentIndexChanged, this, updateState); connect(m_fontAASettings, &FontAASettings::excludeToChanged, this, updateState); connect(m_fontAASettings, &FontAASettings::antiAliasingChanged, this, updateState); connect(m_fontAASettings, &FontAASettings::aliasingChanged, this, updateState); connect(m_fontAASettings, &FontAASettings::dpiChanged, this, updateState); } KFonts::~KFonts() { } void KFonts::defaults() { #ifdef Q_OS_MAC setGeneralFont(QFont("Lucida Grande", 13)); setMenuFont(QFont("Lucida Grande", 13)); setFixedWidthFont(QFont("Monaco", 10)); setToolbarFont(QFont("Lucida Grande", 11)); setSmallFont(QFont("Lucida Grande", 9)); setWindowTitleFont(QFont("Lucida Grande", 14)); #else setGeneralFont(QFont("Noto Sans", 10)); setMenuFont(QFont("Noto Sans", 10)); setFixedWidthFont(QFont("Hack", 9)); setToolbarFont(QFont("Noto Sans", 10)); setSmallFont(QFont("Noto Sans", 8)); setWindowTitleFont(QFont("Noto Sans", 10)); #endif m_fontAASettings->defaults(); } void KFonts::load() { KSharedConfig::Ptr config = KSharedConfig::openConfig("kdeglobals"); KConfigGroup cg(config, "General"); m_generalFont = m_generalFontOriginal = nearestExistingFont(cg.readEntry("font", m_defaultFont)); m_fixedWidthFont = m_fixedWidthFontOriginal = nearestExistingFont(cg.readEntry("fixed", QFont("Hack", 9))); m_smallFont = m_smallFontOriginal = nearestExistingFont(cg.readEntry("smallestReadableFont", m_defaultFont)); m_toolbarFont = m_toolbarFontOriginal = nearestExistingFont(cg.readEntry("toolBarFont", m_defaultFont)); m_menuFont = m_menuFontOriginal = nearestExistingFont(cg.readEntry("menuFont", m_defaultFont)); cg = KConfigGroup(config, "WM"); m_windowTitleFont = m_windowTitleFontOriginal = nearestExistingFont(cg.readEntry("activeFont", m_defaultFont)); engine()->addImageProvider("preview", new PreviewImageProvider(generalFont())); emit generalFontChanged(); emit fixedWidthFontChanged(); emit smallFontChanged(); emit toolbarFontChanged(); emit menuFontChanged(); emit windowTitleFontChanged(); m_fontAASettings->load(); setNeedsSave(false); } void KFonts::save() { KSharedConfig::Ptr config = KSharedConfig::openConfig("kdeglobals"); KConfigGroup cg(config, "General"); cg.writeEntry("font", m_generalFont.toString()); cg.writeEntry("fixed", m_fixedWidthFont.toString()); cg.writeEntry("smallestReadableFont", m_smallFont.toString()); cg.writeEntry("toolBarFont", m_toolbarFont.toString()); cg.writeEntry("menuFont", m_menuFont.toString()); cg.sync(); cg = KConfigGroup(config, "WM"); cg.writeEntry("activeFont", m_windowTitleFont.toString()); cg.sync(); m_defaultFontOriginal = m_defaultFont; m_generalFontOriginal = m_generalFont; m_fixedWidthFontOriginal = m_fixedWidthFont; m_smallFontOriginal = m_smallFont; m_toolbarFontOriginal = m_toolbarFont; m_menuFontOriginal = m_menuFont; m_windowTitleFontOriginal = m_windowTitleFont; KConfig _cfgfonts("kcmfonts"); KConfigGroup cfgfonts(&_cfgfonts, "General"); FontAASettings::AASetting aaSetting = (FontAASettings::AASetting)m_fontAASettings->antiAliasing(); cfgfonts.writeEntry("dontChangeAASettings", aaSetting == FontAASettings::AASystem); if (aaSetting == FontAASettings::AAEnabled) { m_fontAASettings->save(KXftConfig::AntiAliasing::Enabled); } else if (aaSetting == FontAASettings::AADisabled) { m_fontAASettings->save(KXftConfig::AntiAliasing::Disabled); } else { m_fontAASettings->save(KXftConfig::AntiAliasing::NotSet); } KGlobalSettings::self()->emitChange(KGlobalSettings::FontChanged); runRdb(KRdbExportXftSettings | KRdbExportGtkTheme); emit fontsHaveChanged(); setNeedsSave(false); } void KFonts::updateNeedsSave() { setNeedsSave(m_defaultFontOriginal != m_defaultFont || m_generalFontOriginal != m_generalFont || m_fixedWidthFontOriginal != m_fixedWidthFont || m_smallFontOriginal != m_smallFont || m_toolbarFontOriginal != m_toolbarFont || m_menuFontOriginal != m_menuFont || m_windowTitleFontOriginal != m_windowTitleFont || m_fontAASettings->needsSave()); } void KFonts::setGeneralFont(const QFont &font) { if (m_generalFont == font) { return; } m_generalFont = font; emit generalFontChanged(); updateNeedsSave(); } QFont KFonts::generalFont() const { return m_generalFont; } void KFonts::setFixedWidthFont(const QFont &font) { if (m_fixedWidthFont == font) { return; } m_fixedWidthFont = font; emit fixedWidthFontChanged(); updateNeedsSave(); } QFont KFonts::fixedWidthFont() const { return m_fixedWidthFont; } void KFonts::setSmallFont(const QFont &font) { if (m_smallFont == font) { return; } m_smallFont = font; emit smallFontChanged(); updateNeedsSave(); } QFont KFonts::smallFont() const { return m_smallFont; } void KFonts::setToolbarFont(const QFont &font) { if (m_toolbarFont == font) { return; } m_toolbarFont = font; emit toolbarFontChanged(); updateNeedsSave(); } QFont KFonts::toolbarFont() const { return m_toolbarFont; } void KFonts::setMenuFont(const QFont &font) { if (m_menuFont == font) { return; } m_menuFont = font; emit menuFontChanged(); updateNeedsSave(); } QFont KFonts::menuFont() const { return m_menuFont; } void KFonts::setWindowTitleFont(const QFont &font) { if (m_windowTitleFont == font) { return; } m_windowTitleFont = font; emit windowTitleFontChanged(); updateNeedsSave(); } QFont KFonts::windowTitleFont() const { return m_windowTitleFont; } void KFonts::adjustAllFonts() { QFont font = m_generalFont; KFontChooser::FontDiffFlags fontDiffFlags; int ret = KFontDialog::getFontDiff(font, fontDiffFlags, KFontChooser::NoDisplayFlags); if (ret == KDialog::Accepted && fontDiffFlags) { setGeneralFont(applyFontDiff(m_generalFont, font, fontDiffFlags)); setMenuFont(applyFontDiff(m_menuFont, font, fontDiffFlags)); { const QFont adjustedFont = applyFontDiff(m_fixedWidthFont, font, fontDiffFlags); if (QFontInfo(adjustedFont).fixedPitch()) { setFixedWidthFont(adjustedFont); } } setToolbarFont(applyFontDiff(m_toolbarFont, font, fontDiffFlags)); setSmallFont(applyFontDiff(m_smallFont, font, fontDiffFlags)); setWindowTitleFont(applyFontDiff(m_windowTitleFont, font, fontDiffFlags)); } } QFont KFonts::applyFontDiff(const QFont &fnt, const QFont &newFont, int fontDiffFlags) { QFont font(fnt); if (fontDiffFlags & KFontChooser::FontDiffSize) { font.setPointSizeF(newFont.pointSizeF()); } if ((fontDiffFlags & KFontChooser::FontDiffFamily)) { font.setFamily(newFont.family()); } if (fontDiffFlags & KFontChooser::FontDiffStyle) { font.setWeight(newFont.weight()); font.setStyle(newFont.style()); font.setUnderline(newFont.underline()); font.setStyleName(newFont.styleName()); } return font; } #include "fonts.moc" diff --git a/kcms/fonts/kcm_fonts.desktop b/kcms/fonts/kcm_fonts.desktop index 89be11c40..477f93326 100644 --- a/kcms/fonts/kcm_fonts.desktop +++ b/kcms/fonts/kcm_fonts.desktop @@ -1,161 +1,161 @@ [Desktop Entry] Exec=kcmshell5 fonts Icon=preferences-desktop-font Type=Service X-KDE-ServiceTypes=KCModule X-DocPath=kcontrol/fonts/index.html X-KDE-Library=kcm_fonts X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=font X-KDE-Weight=50 Name=Fonts Name[af]=Skriftipes Name[ar]=الخطوط Name[be]=Шрыфты Name[be@latin]=Šryfty Name[bg]=Шрифтове Name[bn]=ফন্ট Name[bn_IN]=ফন্ট Name[br]=Fontoù Name[bs]=Fontovi Name[ca]=Tipus de lletra Name[ca@valencia]=Tipus de lletra Name[cs]=Písma Name[csb]=Fòntë Name[cy]=Ffontiau Name[da]=Skrifttyper Name[de]=Schriftarten Name[el]=Γραμματοσειρές Name[en_GB]=Fonts Name[eo]=Tiparoj Name[es]=Tipos de letra Name[et]=Fondid Name[eu]=Letra-tipoak Name[fa]=قلمها Name[fi]=Fontit Name[fr]=Polices de caractères Name[fy]=Lettertypen Name[ga]=Clónna Name[gl]=Tipos de letra Name[gu]=ફોન્ટ્સ Name[he]=גופנים Name[hi]=फ़ॉन्ट्स Name[hne]=फोंट Name[hr]=Fontovi Name[hsb]=Pisma Name[hu]=Betűtípusok Name[ia]=Fontes Name[id]=Font Name[is]=Letur Name[it]=Caratteri Name[ja]=フォント Name[ka]=ფონტები Name[kk]=Қаріптер Name[km]=ពុម្ព​អក្សរ Name[kn]=ಅಕ್ಷರಶೈಲಿಗಳು Name[ko]=글꼴 Name[ku]=Curenivîs Name[lt]=Šriftai Name[lv]=Fonti Name[mai]=फान्ट Name[mk]=Фонтови Name[ml]=അക്ഷരസഞ്ചയങ്ങള്‍ Name[mr]=फॉन्ट Name[ms]=Fon Name[nb]=Skrifttyper Name[nds]=Schriftoorden Name[ne]=फन्ट Name[nl]=Lettertypen Name[nn]=Skrifter Name[oc]=Poliças Name[or]=ଅକ୍ଷର ରୂପ Name[pa]=ਫੋਂਟ Name[pl]=Czcionki Name[pt]=Tipos de Letra Name[pt_BR]=Fontes Name[ro]=Fonturi Name[ru]=Шрифты Name[se]=Fonttat Name[si]=අකුරු Name[sk]=Písma Name[sl]=Pisave Name[sr]=Фонтови Name[sr@ijekavian]=Фонтови Name[sr@ijekavianlatin]=Fontovi Name[sr@latin]=Fontovi Name[sv]=Teckensnitt Name[ta]=எழுத்துருக்கள் Name[te]=ఫాంట్‍స్ Name[tg]=Ҳарфҳо Name[th]=แบบอักษรต่างๆ Name[tr]=Yazı Tipleri Name[ug]=خەت نۇسخىلىرى Name[uk]=Шрифти Name[uz]=Shriftlar Name[uz@cyrillic]=Шрифтлар Name[vi]=Phông chữ Name[wa]=Fontes Name[xh]=Uhlobo lwamagama Name[x-test]=xxFontsxx Name[zh_CN]=字体 Name[zh_TW]=字型 -Comment=Configure the system fonts +Comment=Configure user interface fonts Comment[ca]=Configura els tipus de lletra del sistema Comment[gl]=Configurar os tipos de letra do sistema Comment[nl]=De systeemlettertypen configureren Comment[pt]=Configurar os tipos de letra do sistema Comment[sv]=Anpassa systemteckensnitt Comment[uk]=Налаштовування загальносистемних шрифтів Comment[x-test]=xxConfigure the system fontsxx Comment[zh_TW]=設定系統字型 X-KDE-Keywords=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts X-KDE-Keywords[ar]=خطوط,حجم الخط,أنماط,طقم محارف,طقوم محارف,لوحة,لوحة تحكّم,أسطح المكتب,مدير ملفات,أشرطة أدوات,قائمة,عنوان نافذة,عنوان,نقطة/بوصة,DPI,إزالة التسنّن,خطوط سطح المكتب,خطوط شريط الأدوات,محرف,خطوط عامة X-KDE-Keywords[bs]=slova,veličina slova,stil,znakovi,postaviti znakove,ploča,kontrolna ploča,pozadina,upravitelj datoteka,alatne trake,meni,naslov prozora,naslov,DPI,niskopropusni,slova pozadine,slova na alatnoj traci,obilježja,opći fontovi X-KDE-Keywords[ca]=tipus de lletres,mida de tipus de lletra,estils,joc de caràcters,jocs de caràcters,plafó,plafó de control,escriptoris,Gestor de fitxers,Barres d'eines,Menú,Títol de la finestra,Títol,DPI,antialiàsing,tipus de lletra d'escriptori,tipus de lletra de barra d'eines,caràcter,tipus de lletra general X-KDE-Keywords[ca@valencia]=tipus de lletres,mida de tipus de lletra,estils,joc de caràcters,jocs de caràcters,plafó,plafó de control,escriptoris,Gestor de fitxers,Barres d'eines,Menú,Títol de la finestra,Títol,DPI,antialiàsing,tipus de lletra d'escriptori,tipus de lletra de barra d'eines,caràcter,tipus de lletra general X-KDE-Keywords[da]=skrifttyper,skriftstørrelse,stile,tegnsæt,panel,kontrolpanel,skriveborde,filhåndtering,værktøjslinjer,menu,vinduestitel,titel,DPI,anti-aliasing,værktøjslinjer,tegn X-KDE-Keywords[de]=Schriftarten,Schriftgrößen,Stile,Zeichensätze,Kontrollleiste,Stile,Dateiverwaltung,Arbeitsflächen,Werkzeugleisten,Menüs,Fenstertitel,Titel,DPI,Antialiasing,Arbeitsflächenschriften,Werkzeugleistenschriften,Zeichen,Allgemeine Schriftarten X-KDE-Keywords[el]=γραμματοσειρές,μέγεθος γραμματοσειράς,στιλ,σύνολα χαρακτήρων,πίνακας,πίνακας ελέγχου,επιφάνειες εργασίας,διαχειριστής αρχείων,γραμμές εργαλείων,μενού,τίτλος παραθύρου,τίτλος,DPI,εξομάλυνση,γραμματοσειρές επιφάνειας εργασίας,γραμματοσειρές γραμμής εργαλείων,χαρακτήρας,γενικές γραμματοσειρές X-KDE-Keywords[en_GB]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts X-KDE-Keywords[es]=tipos de letra,tamaño del tipo de letra,estilos,juegos de caracteres,panel,panel de control panel,escritorios,Gestor de archivos,Barras de herramientas,Menú,Título de la ventana,Título,DPI,suavizado de texto,tipos de letra del escritorio,tipos de letra de las barras de herramientas,carácter,tipos de letra generales X-KDE-Keywords[et]=fondid,fondi suurus,kodeering,kooditabel,paneel,juhtpaneel,töölauad,failihaldur,tööriistaribad,menüü,aken,tiitel,nimetus,nimi,DPI,antialias,töölaua fondid,tööriistariba fondid,märk,märgid,sümbolid,üldised fondid X-KDE-Keywords[eu]=letra-tipoak,letra-tamaina,estiloak,karaktere-jokoak,panela,kontrol-panela,mahaigain,fitxategi-kudeatzaile,tresna-barra,menu,leihoaren titulu,titulu,DPI,antialiasing,mahaigaineko letra-tripo,tresna-barrako letra-tipo,karaktere,letra-tipo orokor X-KDE-Keywords[fi]=kirjasimet,fontit,kirjasinkoko,fonttikoko,tyylit,merkistöt,paneeli,ohjauskeskus,työpöydät,Tiedostonhallinta,Työkalurivit,Työkalupalkit,Valikko,Ikkunan otsikko,Otsikko,DPI,antialiasointi,työpöytäkirjasimet,työpöytäfontit,työkalurivikirjasimet, työkalurivien kirjasimet, työkalurivifontit, työkalurivien fontit,merkki,yleiskirjasimet,yleiset kirjasimet,yleisfontit,yleiset fontit X-KDE-Keywords[fr]=polices, taille de police, styles, tables de caractères, jeux de caractères, tableau de bord, bureaux, Gestionnaire de Fichiers, Barre d'outils, Menu, Titre de fenêtre, Titre, DPI, anti crénelage, polices du bureau, police de barre d'outils, caractère, polices générales X-KDE-Keywords[ga]=clónna,clófhoirne,clómhéid,stíleanna,tacair charachtar,painéal,painéal rialaithe,deasca,Bainisteoir Comhad,Barraí Uirlisí,Roghchlár,Teideal Fuinneoige,Teideal,PSO,frithailiasáil,clónna deisce,clófhoirne deisce,clónna barra uirlisí,carachtar,clónna ginearálta,clófhoirne ginearálta X-KDE-Keywords[gl]=tipo de letra,letra,tamaño de letra,tamaño da letra,codificacións de caracteres,conxuntos de caracteres,panel,control,panel de control,escritorios,xestor de ficheiros,barras de ferramentas,menú,título de xanela,título,DPI,PPP,antialiasing,suavizado,tipos de letra do escritorio,tipos de letra das barras de ferramentas,carácter,tipos de letra xerais X-KDE-Keywords[hu]=betűkészletek,betűméret,stílusok,karakterkészletek,karakterkészletek,panel,beállítópanel,asztalok,Fájlkezelő,Eszköztárak,Menü,Ablakcím,Cím,DPI,élsimítás,asztal betűkészletek,eszköztár betűkészletek,karakter,általános betűkészletek X-KDE-Keywords[ia]=fonts,grandor de font,stilos,insimules de characteres,insimules de characteres,pannello,pannello de controlo,scriptorios,Gerente de File,Barra de instrumentos,menu,Titulo de Fenestra,Titulo,DPI,anti-aliasing,fonts de scriptorio, fonts de barra de titulo, character,fonts general X-KDE-Keywords[id]=fon,ukuran fon,gaya,charset,set karakter,panel,panel kendali,desktop,FileManager,Bilah Alat,Menu,Judul Window,Judul,DPI,anti-alias,font desktop,font bilah alat,karakter,font umum X-KDE-Keywords[it]=caratteri,dimensione dei caratteri,stili,codifiche,insiemi di caratteri,pannello,pannello di controllo,desktop,gestore dei file,barre degli strumenti,menu,titolo della finestra,titolo,DPI,anti-aliasing,caratteri del desktop,caratteri della barra degli strumenti,carattere,caratteri generali X-KDE-Keywords[kk]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts X-KDE-Keywords[km]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts X-KDE-Keywords[ko]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,글꼴,스타일,창 제목,글자 X-KDE-Keywords[mr]=फॉन्ट्स, फॉन्ट साईज, कॅरेक्टर, कॅरेक्टर सेटस, पँनल, कन्ट्रोल पँनल, डेस्कटॉप्स, फाईल मेनेजर, टूलबार्स, मेन्यू, चौकट टाईटल, टाईटल, डी पी आय , अन्टी अलायझिंग, डेस्कटॉप फॉन्टस, टूलबार फॉन्टस, कॅरेक्टर, जनरल फॉन्ट्स X-KDE-Keywords[nb]=skrifter,skriftstørrelse,stiler,tegnsett,panel,kontrollpanel,skrivebord,filbehandler,Verktøylinje,Meny,Vindiustittel,tittel,DPI,kantutjevning,skrivebordsskrifter,verktøylinjeskrifter,generelle skrifter X-KDE-Keywords[nds]=Schriftoorden,Schrift,Stilen,Tekensetten,Paneel,Stüerpaneel,Schriefdisch,Dateipleger,Warktüüchbalkens,Menü,Finstertitel,Titel,DPI,Kantstreken,anti-aliasing,Schriefdisch,Teken X-KDE-Keywords[nl]=lettertypes,lettertype,tekengrootte,stijlen,tekensets,paneel,besturingspaneel,bureaubladen,bestandsbeheerder,werkbalken,menu,venstertitel,titel,DPI,anti-aliasing,lettertypen van bureaublad,lettertypen van werkbalk,teken,algemene lettertypes X-KDE-Keywords[nn]=skrifter,skriftstorleik,stilar,teiknsett,teiknkodingar,panel,kontrollpanel,skrivebord,filhandsamar,verktøylinje,meny,vindaugstittel,tittel,DPI,PPT,kantutjamning,skrivebordsskrifter,verktøylinjeskrifter,generelle skriftar X-KDE-Keywords[pl]=czcionki,rozmiar czcionki,style,zestaw znaków,panel,panel sterowania,pulpity,Menadżer plików,Paski narzędzi,Menu,Tytuł okna,Tytuł,DPI,wygładzanie,czcionki pulpitu,czcionki pasków narzędzi,znak,czcionki ogólne X-KDE-Keywords[pt]=tipos de letra,tamanho de letra,estilos,codificações,codificações de caracteres,painel,painel de controlo,ecrãs,gestor de ficheiros,barras de ferramentas,menu,título da janela,título,PPP,suavização,tipos de letra do ecrã,tipos de letra da barra de ferramentas,carácter,tipos de letra gerais X-KDE-Keywords[pt_BR]=fontes,tamanho da fonte,estilos,codificações,codificações de caracteres,painel,painel de controle,áreas de trabalho,gerenciador de arquivos,barras de ferramentas,Menu,Título da janela,Título,PPP,anti-aliasing,fontes da área de trabalho,fontes da barra de ferramentas,caractere,fontes gerais X-KDE-Keywords[ru]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,шрифты,размер шрифтов,стили,кодировки,панель,панель управления,рабочие столы,диспетчер файлов,панель инструментов,меню,заголовок окна,заголовок,сглаживание,шрифты рабочего стола,шрифты панели инструментов,символы,общие шрифты X-KDE-Keywords[sk]=písmo,veľkosť písma,štýly,znakové sady,sady znakov,panel,ovládací panel,plochy,Správca súborov,Panely nástrojov,Ponuka,Titulok okna,Titulok,DPI,anti-aliasing,písma plochy,písma nástrojových panelov,znak,všeobecné písma X-KDE-Keywords[sl]=pisave,velikost pisav,slogi,nabori znakov,znakovni nabori,pult,nadzorna plošča,namizja,upravljalnik datotek,datotečni upravljalnik,orodjarne,orodne vrstice,meni,naslov okna,naslovna vrstica,naslov,ločljivost,točk na palec,glajenje robov,namizne pisave,pisave namizja,pisave orodjarne, pisave orodne vrstice,znak,splošne pisave X-KDE-Keywords[sr]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,фонт,величина фонта,стил,кодирање,панел,контролни панел,површ,менаџер фајлова,траке алатки,мени,наслов прозора,тпи,омекшавање,фонт површи,фонт траке алатки,знакови,општи фонт X-KDE-Keywords[sr@ijekavian]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,фонт,величина фонта,стил,кодирање,панел,контролни панел,површ,менаџер фајлова,траке алатки,мени,наслов прозора,тпи,омекшавање,фонт површи,фонт траке алатки,знакови,општи фонт X-KDE-Keywords[sr@ijekavianlatin]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,font,veličina fonta,stil,kodiranje,panel,kontrolni panel,površ,menadžer fajlova,trake alatki,meni,naslov prozora,tpi,omekšavanje,font površi,font trake alatki,znakovi,opšti font X-KDE-Keywords[sr@latin]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,font,veličina fonta,stil,kodiranje,panel,kontrolni panel,površ,menadžer fajlova,trake alatki,meni,naslov prozora,tpi,omekšavanje,font površi,font trake alatki,znakovi,opšti font X-KDE-Keywords[sv]=teckensnitt,teckenstorlek,stil,teckenuppsättningar,panel,kontrollpanel,skrivbord,Filhanterare,Verktygsrader,Meny,Fönsternamn,Namn,Punkter/tum,kantutjämning,skrivbordsteckensnitt,verktygsradsteckensnitt,tecken,allmänna teckensnitt X-KDE-Keywords[tr]=yazı tipi,yazı tipi boyutu,karakterler,karakter setleri,panel,denetim paneli,masaüstleri,Dosya Yöneticisi,Araç Çubukları,Menü,Pencere Başlığı,Başlık,DPI,yumuşatma,anti-aliasing,masaüstü yazı tipleri,araç çubuğu yazı tipleri,karakter,genel yazı tipleri,biçemler X-KDE-Keywords[uk]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,шрифт,шрифти,розмір,розмір шрифту,стиль,стилі,гарнітура,гарнітури,кодування,набір,символ,символи,набір символів,панель,панель керування,стільниця,стільниці,файл,керування,керування файлами,менеджер,панель інструментів,меню,заголовок,заголовок вікна,роздільність,згладжування,шрифти стільниці,шрифти панелі,символ,загальні шрифти X-KDE-Keywords[x-test]=xxfontsxx,xxfont sizexx,xxstylesxx,xxcharsetsxx,xxcharacter setsxx,xxpanelxx,xxcontrol panelxx,xxdesktopsxx,xxFileManagerxx,xxToolbarsxx,xxMenuxx,xxWindow Titlexx,xxTitlexx,xxDPIxx,xxanti-aliasingxx,xxdesktop fontsxx,xxtoolbar fontsxx,xxcharacterxx,xxgeneral fontsxx X-KDE-Keywords[zh_CN]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts,字体字体大小,样式,字符集,面板,控制面板,桌面,文件管理器,工具栏,菜单,窗口标题,标题,反锯齿,桌面字体,工具栏字体,字符,常规字体 X-KDE-Keywords[zh_TW]=fonts,font size,styles,charsets,character sets,panel,control panel,desktops,FileManager,Toolbars,Menu,Window Title,Title,DPI,anti-aliasing,desktop fonts,toolbar fonts,character,general fonts Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcms/fonts/package/metadata.desktop b/kcms/fonts/package/metadata.desktop index ffb6a1b02..5bb63b3d5 100644 --- a/kcms/fonts/package/metadata.desktop +++ b/kcms/fonts/package/metadata.desktop @@ -1,117 +1,117 @@ [Desktop Entry] Name=Fonts Name[af]=Skriftipes Name[ar]=الخطوط Name[be]=Шрыфты Name[be@latin]=Šryfty Name[bg]=Шрифтове Name[bn]=ফন্ট Name[bn_IN]=ফন্ট Name[br]=Fontoù Name[bs]=Fontovi Name[ca]=Tipus de lletra Name[ca@valencia]=Tipus de lletra Name[cs]=Písma Name[csb]=Fòntë Name[cy]=Ffontiau Name[da]=Skrifttyper Name[de]=Schriftarten Name[el]=Γραμματοσειρές Name[en_GB]=Fonts Name[eo]=Tiparoj Name[es]=Tipos de letra Name[et]=Fondid Name[eu]=Letra-tipoak Name[fa]=قلمها Name[fi]=Fontit Name[fr]=Polices de caractères Name[fy]=Lettertypen Name[ga]=Clónna Name[gl]=Tipos de letra Name[gu]=ફોન્ટ્સ Name[he]=גופנים Name[hi]=फ़ॉन्ट्स Name[hne]=फोंट Name[hr]=Fontovi Name[hsb]=Pisma Name[hu]=Betűtípusok Name[ia]=Fontes Name[id]=Font Name[is]=Letur Name[it]=Caratteri Name[ja]=フォント Name[ka]=ფონტები Name[kk]=Қаріптер Name[km]=ពុម្ព​អក្សរ Name[kn]=ಅಕ್ಷರಶೈಲಿಗಳು Name[ko]=글꼴 Name[ku]=Curenivîs Name[lt]=Šriftai Name[lv]=Fonti Name[mai]=फान्ट Name[mk]=Фонтови Name[ml]=അക്ഷരസഞ്ചയങ്ങള്‍ Name[mr]=फॉन्ट Name[ms]=Fon Name[nb]=Skrifttyper Name[nds]=Schriftoorden Name[ne]=फन्ट Name[nl]=Lettertypen Name[nn]=Skrifter Name[oc]=Poliças Name[or]=ଅକ୍ଷର ରୂପ Name[pa]=ਫੋਂਟ Name[pl]=Czcionki Name[pt]=Tipos de Letra Name[pt_BR]=Fontes Name[ro]=Fonturi Name[ru]=Шрифты Name[se]=Fonttat Name[si]=අකුරු Name[sk]=Písma Name[sl]=Pisave Name[sr]=Фонтови Name[sr@ijekavian]=Фонтови Name[sr@ijekavianlatin]=Fontovi Name[sr@latin]=Fontovi Name[sv]=Teckensnitt Name[ta]=எழுத்துருக்கள் Name[te]=ఫాంట్‍స్ Name[tg]=Ҳарфҳо Name[th]=แบบอักษรต่างๆ Name[tr]=Yazı Tipleri Name[ug]=خەت نۇسخىلىرى Name[uk]=Шрифти Name[uz]=Shriftlar Name[uz@cyrillic]=Шрифтлар Name[vi]=Phông chữ Name[wa]=Fontes Name[xh]=Uhlobo lwamagama Name[x-test]=xxFontsxx Name[zh_CN]=字体 Name[zh_TW]=字型 -Comment=Configure the system fonts +Comment=Configure user interface fonts Comment[ca]=Configura els tipus de lletra del sistema Comment[gl]=Configurar os tipos de letra do sistema Comment[nl]=De systeemlettertypen configureren Comment[pt]=Configurar os tipos de letra do sistema Comment[sv]=Anpassa systemteckensnitt Comment[uk]=Налаштовування загальносистемних шрифтів Comment[x-test]=xxConfigure the system fontsxx Comment[zh_TW]=設定系統字型 Icon=preferences-desktop-font Keywords= Type=Service X-KDE-ParentApp= X-KDE-PluginInfo-Author=Antonis Tsiapaliokas X-KDE-PluginInfo-Email=antonis.tsiapaliokas@kde.org X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-Name=kcm_fonts X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://www.kde.org/plasma-desktop X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/icons/kcm_icons.desktop b/kcms/icons/kcm_icons.desktop index 1406f4f42..b47e8ac2e 100644 --- a/kcms/icons/kcm_icons.desktop +++ b/kcms/icons/kcm_icons.desktop @@ -1,214 +1,214 @@ [Desktop Entry] Exec=kcmshell5 icons Icon=preferences-desktop-icons Type=Service X-KDE-ServiceTypes=KCModule X-DocPath=kcontrol/icons/index.html X-KDE-Library=kcm_icons X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=icons X-KDE-Weight=40 Name=Icons Name[af]=Ikone Name[ar]=الأيقونات Name[as]=আইকন Name[be]=Значкі Name[be@latin]=Ikony Name[bg]=Икони Name[bn]=আইকন Name[bn_IN]=আইকন Name[br]=Arlunioù Name[bs]=Ikone Name[ca]=Icones Name[ca@valencia]=Icones Name[cs]=Ikony Name[csb]=Ikònë Name[cy]=Eicon Name[da]=Ikoner Name[de]=Symbole Name[el]=Εικονίδια Name[en_GB]=Icons Name[eo]=Piktogramoj Name[es]=Iconos Name[et]=Ikoonid Name[eu]=Ikonoak Name[fa]=شمایلها Name[fi]=Kuvakkeet Name[fr]=Icônes Name[fy]=Byldkaikes Name[ga]=Deilbhíní Name[gl]=Iconas Name[gu]=ચિહ્નો Name[he]=סמלים Name[hi]=प्रतीक Name[hne]=चिनहा Name[hr]=Ikone Name[hsb]=Piktogramy Name[hu]=Ikonok Name[ia]=Icones Name[id]=Ikon Name[is]=Táknmyndir Name[it]=Icone Name[ja]=アイコン Name[ka]=ხატულები Name[kk]=Таңбашалар Name[km]=រូប​តំណាង Name[kn]=ಚಿಹ್ನೆಗಳು Name[ko]=아이콘 Name[ku]=Îkon Name[lt]=Ženkliukai Name[lv]=Ikonas Name[mai]=प्रतीक Name[mk]=Икони Name[ml]=ചിഹ്നങ്ങള്‍ Name[mr]=चिन्ह Name[ms]=Ikon Name[nb]=Ikoner Name[nds]=Lüttbiller Name[ne]=प्रतिमा Name[nl]=Pictogrammen Name[nn]=Ikon Name[oc]=Icònas Name[or]=ଚିତ୍ର ସଂକେତଗୁଡ଼ିକ Name[pa]=ਆਈਕਾਨ Name[pl]=Ikony Name[pt]=Ícones Name[pt_BR]=Ícones Name[ro]=Pictograme Name[ru]=Значки Name[si]=අයිකන Name[sk]=Ikony Name[sl]=Ikone Name[sr]=Иконице Name[sr@ijekavian]=Иконице Name[sr@ijekavianlatin]=Ikonice Name[sr@latin]=Ikonice Name[sv]=Ikoner Name[ta]=சின்னங்கள் Name[te]=ప్రతిమలు Name[tg]=Нишонаҳо Name[th]=ไอคอน Name[tr]=Simgeler Name[ug]=سىنبەلگىلەر Name[uk]=Піктограми Name[uz]=Nishonchalar Name[uz@cyrillic]=Нишончалар Name[vi]=Biểu tượng Name[wa]=Imådjetes Name[xh]=Imphawu zemmifanekiso Name[x-test]=xxIconsxx Name[zh_CN]=图标 Name[zh_TW]=圖示 -Comment=Icon Theme +Comment=Choose icon theme Comment[ar]=سمة الأيقونات Comment[bs]=Tema ikone Comment[ca]=Tema d'icones Comment[ca@valencia]=Tema d'icones Comment[cs]=Motiv ikon Comment[da]=Ikontema Comment[de]=Symbol-Design Comment[el]=Θέμα εικονιδίων Comment[en_GB]=Icon Theme Comment[es]=Tema de iconos Comment[et]=Ikooniteema Comment[eu]=Ikono gaia Comment[fi]=Kuvaketeema Comment[fr]=Thème d'icônes Comment[gl]=Tema de iconas Comment[he]=ערכת־נושא לסמלים Comment[hu]=Ikontéma Comment[id]=Tema Ikon Comment[is]=Táknmyndaþema Comment[it]=Tema delle icone Comment[ja]=アイコンテーマ Comment[ko]=아이콘 테마 Comment[lt]=Ženkliukų apipavidalinimas Comment[mr]=चिन्ह शैली Comment[nb]=Ikontema Comment[nds]=Lüttbildmuster Comment[nl]=Pictogramthema Comment[nn]=Ikontema Comment[pa]=ਆਈਕਾਨ ਥੀਮ Comment[pl]=Zestaw ikon Comment[pt]=Tema de Ícones Comment[pt_BR]=Tema de ícones Comment[ru]=Набор значков Comment[sk]=Téma ikon Comment[sl]=Tema ikon Comment[sr]=Тема иконица Comment[sr@ijekavian]=Тема иконица Comment[sr@ijekavianlatin]=Tema ikonica Comment[sr@latin]=Tema ikonica Comment[sv]=Ikontema Comment[tr]=Simge Teması Comment[uk]=Тема піктограм Comment[x-test]=xxIcon Themexx Comment[zh_CN]=图标主题 Comment[zh_TW]=圖示主題 X-KDE-Keywords=icons,effects,size,hicolor,locolor X-KDE-Keywords[ar]=أيقونات,تأثيرات,حجم,لون عالي,لون سفلي X-KDE-Keywords[bg]=icons,effects,size,hicolor,locolor,икони,ефекти,размер X-KDE-Keywords[bn]=icons,effects,size,hicolor,locolor X-KDE-Keywords[bs]=icons,effects,size,hicolor,locolor,ikone,efekti,veličina,boje X-KDE-Keywords[ca]=icones,efectes,mida,color alt,color baix X-KDE-Keywords[ca@valencia]=icones,efectes,mida,color alt,color baix X-KDE-Keywords[cs]=ikony,efekty,velikost,hicolor,locolor X-KDE-Keywords[da]=ikoner,effekter,størrelse,hicolor,locolor X-KDE-Keywords[de]=Symbole,Icons,Effekte,Größe,16-Bit-Farben,8-Bit-Farben X-KDE-Keywords[el]=εικονίδια,εφέ,μέγεθος,hicolor,locolor X-KDE-Keywords[en_GB]=icons,effects,size,hicolor,locolor X-KDE-Keywords[eo]=piktogramoj,efektoj,grando,hicolor,locolor X-KDE-Keywords[es]=iconos,efectos,tamaño,hicolor,locolor X-KDE-Keywords[et]=ikoonid,efektid,suurus,hicolor,locolor X-KDE-Keywords[eu]=ikonoak,efektuak,tamaina,hicolor,locolor X-KDE-Keywords[fa]=icons,effects,size,hicolor,locolor X-KDE-Keywords[fi]=kuvakkeet,tehosteet,koko,hicolor,locolor X-KDE-Keywords[fr]=icônes, effets, taille, hicolor, locolor X-KDE-Keywords[ga]=deilbhíní,maisíochtaí,méid,ard-dath,ísealdath X-KDE-Keywords[gl]=iconas, efectos, tamaño, hicolor, locolor X-KDE-Keywords[gu]=ચિહ્નો,અસરો,માપ,ઉચ્ચરંગ,નીચરંગ X-KDE-Keywords[he]=סמלים,אפקטים,icons,effects,size,hicolor,locolor X-KDE-Keywords[hi]=प्रतीक, प्रभाव, आकार, hicolor, locolor X-KDE-Keywords[hu]=ikonok,effektusok,méret,hicolor,locolor X-KDE-Keywords[ia]=icones,effectos,grandor,alte color,basse color X-KDE-Keywords[id]=ikon,efek,ukuran,warna tinggi,warna rendah X-KDE-Keywords[is]=táknmynd,sjónhverfingar,brellur,stærð,hicolor,locolor X-KDE-Keywords[it]=icone,effetti,dimensione,molti colori,pochi colori X-KDE-Keywords[kk]=icons,effects,size,hicolor,locolor X-KDE-Keywords[km]=រូបតំណាង បែបផែន ទំហំ ពណ៌​ខ្ពស់ ពណ៌​ទាប X-KDE-Keywords[ko]=icons,effects,size,hicolor,locolor,아이콘,효과,크기,색상 X-KDE-Keywords[lv]=ikonas,efekti,izmērs,krāsa X-KDE-Keywords[mr]=चिन्ह, परिणाम, आकार, हाय कलर, लो कलर X-KDE-Keywords[nb]=ikoner,effekter,størrelse,fargesterk,fargesvak X-KDE-Keywords[nds]=Lüttbiller,Effekten,Grött,HiColor,LoColor,Klören,Klöör X-KDE-Keywords[nl]=pictoogrammen,effecten,grootte,hi-kleur,lo-kleur X-KDE-Keywords[nn]=ikon,effektar,storleik,hicolor,locolor X-KDE-Keywords[pa]=ਆਈਕਾਨ,ਪ੍ਰਭਾਵ,ਪਰਭਾਵ,ਆਕਾਰ,ਵੱਧ-ਰੰਗ,ਘੱਟਰੰਗ X-KDE-Keywords[pl]=ikony,efekty,rozmiar,hicolor,locolor X-KDE-Keywords[pt]=ícones,efeitos,tamanho,muitas cores,poucas cores X-KDE-Keywords[pt_BR]=ícones,efeitos,tamanho,muitas cores,poucas cores X-KDE-Keywords[ro]=pictograme,efecte,mărime,hicolor,locolor X-KDE-Keywords[ru]=icons,effects,size,hicolor,locolor,значки,иконки,эффекты,размер,цвет X-KDE-Keywords[sk]=ikony,efekty,veľkosť,hicolor,locolor X-KDE-Keywords[sl]=ikone,učinki,velikost,barve,barva X-KDE-Keywords[sr]=icons,effects,size,hicolor,locolor,иконице,ефекти,величина,боја X-KDE-Keywords[sr@ijekavian]=icons,effects,size,hicolor,locolor,иконице,ефекти,величина,боја X-KDE-Keywords[sr@ijekavianlatin]=icons,effects,size,hicolor,locolor,ikonice,efekti,veličina,boja X-KDE-Keywords[sr@latin]=icons,effects,size,hicolor,locolor,ikonice,efekti,veličina,boja X-KDE-Keywords[sv]=ikoner,effekter,storlek,hicolor,locolor X-KDE-Keywords[tg]=нишонаҳо,таъсирҳо,андоза,ранги баланд,ранги паст X-KDE-Keywords[tr]=simgeler,efektler,boyut,yüksekrenk,düşükrenk X-KDE-Keywords[ug]=سىنبەلگىلەر، ئۈنۈملەر، چوڭلۇق، hicolor، locolor X-KDE-Keywords[uk]=icons,effects,size,hicolor,locolor,піктограми,значки,іконки,ефект,ефекти,розмір,колір X-KDE-Keywords[vi]=biểu tượng,hiệu ứng,cỡ,nhiều màu, ít màu, icons,effects,size,hicolor,locolor X-KDE-Keywords[wa]=imådjetes,efets,grandeu,grandeur,coleur X-KDE-Keywords[x-test]=xxiconsxx,xxeffectsxx,xxsizexx,xxhicolorxx,xxlocolorxx X-KDE-Keywords[zh_CN]=icons,effects,size,hicolor,locolor,图标,效果,特效,大小,颜色 X-KDE-Keywords[zh_TW]=icons,effects,size,hicolor,locolor Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcms/icons/package/metadata.desktop b/kcms/icons/package/metadata.desktop index e6e174d6d..4602758ed 100644 --- a/kcms/icons/package/metadata.desktop +++ b/kcms/icons/package/metadata.desktop @@ -1,151 +1,151 @@ [Desktop Entry] Name=Icons Name[af]=Ikone Name[ar]=الأيقونات Name[as]=আইকন Name[be]=Значкі Name[be@latin]=Ikony Name[bg]=Икони Name[bn]=আইকন Name[bn_IN]=আইকন Name[br]=Arlunioù Name[bs]=Ikone Name[ca]=Icones Name[ca@valencia]=Icones Name[cs]=Ikony Name[csb]=Ikònë Name[cy]=Eicon Name[da]=Ikoner Name[de]=Symbole Name[el]=Εικονίδια Name[en_GB]=Icons Name[eo]=Piktogramoj Name[es]=Iconos Name[et]=Ikoonid Name[eu]=Ikonoak Name[fa]=شمایلها Name[fi]=Kuvakkeet Name[fr]=Icônes Name[fy]=Byldkaikes Name[ga]=Deilbhíní Name[gl]=Iconas Name[gu]=ચિહ્નો Name[he]=סמלים Name[hi]=प्रतीक Name[hne]=चिनहा Name[hr]=Ikone Name[hsb]=Piktogramy Name[hu]=Ikonok Name[ia]=Icones Name[id]=Ikon Name[is]=Táknmyndir Name[it]=Icone Name[ja]=アイコン Name[ka]=ხატულები Name[kk]=Таңбашалар Name[km]=រូប​តំណាង Name[kn]=ಚಿಹ್ನೆಗಳು Name[ko]=아이콘 Name[ku]=Îkon Name[lt]=Ženkliukai Name[lv]=Ikonas Name[mai]=प्रतीक Name[mk]=Икони Name[ml]=ചിഹ്നങ്ങള്‍ Name[mr]=चिन्ह Name[ms]=Ikon Name[nb]=Ikoner Name[nds]=Lüttbiller Name[ne]=प्रतिमा Name[nl]=Pictogrammen Name[nn]=Ikon Name[oc]=Icònas Name[or]=ଚିତ୍ର ସଂକେତଗୁଡ଼ିକ Name[pa]=ਆਈਕਾਨ Name[pl]=Ikony Name[pt]=Ícones Name[pt_BR]=Ícones Name[ro]=Pictograme Name[ru]=Значки Name[si]=අයිකන Name[sk]=Ikony Name[sl]=Ikone Name[sr]=Иконице Name[sr@ijekavian]=Иконице Name[sr@ijekavianlatin]=Ikonice Name[sr@latin]=Ikonice Name[sv]=Ikoner Name[ta]=சின்னங்கள் Name[te]=ప్రతిమలు Name[tg]=Нишонаҳо Name[th]=ไอคอน Name[tr]=Simgeler Name[ug]=سىنبەلگىلەر Name[uk]=Піктограми Name[uz]=Nishonchalar Name[uz@cyrillic]=Нишончалар Name[vi]=Biểu tượng Name[wa]=Imådjetes Name[xh]=Imphawu zemmifanekiso Name[x-test]=xxIconsxx Name[zh_CN]=图标 Name[zh_TW]=圖示 -Comment=Icon Theme +Comment=Choose icon theme Comment[ar]=سمة الأيقونات Comment[bs]=Tema ikone Comment[ca]=Tema d'icones Comment[ca@valencia]=Tema d'icones Comment[cs]=Motiv ikon Comment[da]=Ikontema Comment[de]=Symbol-Design Comment[el]=Θέμα εικονιδίων Comment[en_GB]=Icon Theme Comment[es]=Tema de iconos Comment[et]=Ikooniteema Comment[eu]=Ikono gaia Comment[fi]=Kuvaketeema Comment[fr]=Thème d'icônes Comment[gl]=Tema de iconas Comment[he]=ערכת־נושא לסמלים Comment[hu]=Ikontéma Comment[id]=Tema Ikon Comment[is]=Táknmyndaþema Comment[it]=Tema delle icone Comment[ja]=アイコンテーマ Comment[ko]=아이콘 테마 Comment[lt]=Ženkliukų apipavidalinimas Comment[mr]=चिन्ह शैली Comment[nb]=Ikontema Comment[nds]=Lüttbildmuster Comment[nl]=Pictogramthema Comment[nn]=Ikontema Comment[pa]=ਆਈਕਾਨ ਥੀਮ Comment[pl]=Zestaw ikon Comment[pt]=Tema de Ícones Comment[pt_BR]=Tema de ícones Comment[ru]=Набор значков Comment[sk]=Téma ikon Comment[sl]=Tema ikon Comment[sr]=Тема иконица Comment[sr@ijekavian]=Тема иконица Comment[sr@ijekavianlatin]=Tema ikonica Comment[sr@latin]=Tema ikonica Comment[sv]=Ikontema Comment[tr]=Simge Teması Comment[uk]=Тема піктограм Comment[x-test]=xxIcon Themexx Comment[zh_CN]=图标主题 Comment[zh_TW]=圖示主題 Icon=preferences-desktop-icons Type=Service X-KDE-PluginInfo-Author=Kai Uwe Broulik X-KDE-PluginInfo-Email=kde@privat.broulik.de X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-Name=kcm_icons X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://www.kde.org/plasma-desktop X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/kfontinst/kcmfontinst/KCmFontInst.cpp b/kcms/kfontinst/kcmfontinst/KCmFontInst.cpp index 8f285fc3c..d0589de9d 100644 --- a/kcms/kfontinst/kcmfontinst/KCmFontInst.cpp +++ b/kcms/kfontinst/kcmfontinst/KCmFontInst.cpp @@ -1,1277 +1,1277 @@ /* * KFontInst - KDE Font Installer * * Copyright 2003-2007 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "KCmFontInst.h" #include "KfiConstants.h" #include "PrintDialog.h" #include "FcEngine.h" #include "FontPreview.h" #include "FontsPackage.h" #include "Misc.h" #include "FontList.h" #include "DuplicatesDialog.h" #include "FontFilter.h" #include "PreviewSelectAction.h" #include "PreviewList.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define CFG_GROUP "Main Settings" #define CFG_PREVIEW_SPLITTER_SIZES "PreviewSplitterSizes" #define CFG_GROUP_SPLITTER_SIZES "GroupSplitterSizes" #define CFG_FONT_SIZE "FontSize" K_PLUGIN_FACTORY(FontInstallFactory, registerPlugin(); ) K_EXPORT_PLUGIN(FontInstallFactory("fontinst")) namespace KFI { static QString partialIcon(bool load=true) { QString name = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/kfi/partial.png"; if(Misc::fExists(name)) { if(!load) QFile::remove(name); } else if(load) { QString pth; QPixmap pix=KIconLoader::global()->loadIcon("dialog-ok", KIconLoader::Small, KIconLoader::SizeSmall, KIconLoader::DisabledState); pix.save(name, "PNG"); } return name; } class CPushButton : public QPushButton { public: CPushButton(const KGuiItem &item, QWidget *parent) : QPushButton(parent) { KGuiItem::assign(this, item); theirHeight=qMax(theirHeight, QPushButton::sizeHint().height()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); } QSize sizeHint() const override { QSize sh(QPushButton::sizeHint()); sh.setHeight(theirHeight); if(sh.width()addAppDir(KFI_NAME); - KAboutData *about = new KAboutData(QStringLiteral("fontinst"), i18n("KDE Font Manager"), QStringLiteral("1.0"), QString(), + KAboutData *about = new KAboutData(QStringLiteral("fontinst"), i18n("Font Management"), QStringLiteral("1.0"), QString(), KAboutLicense::GPL, i18n("(C) Craig Drummond, 2000 - 2009")); about->addAuthor(i18n("Craig Drummond"), i18n("Developer and maintainer"), QStringLiteral("craig@kde.org")); setAboutData(about); KConfigGroup cg(&itsConfig, CFG_GROUP); itsGroupSplitter=new QSplitter(this); itsGroupSplitter->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); QWidget *groupWidget=new QWidget(itsGroupSplitter), *fontWidget=new QWidget(itsGroupSplitter); itsPreviewSplitter=new QSplitter(fontWidget); itsPreviewSplitter->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); QWidget *toolbarWidget=new QWidget(this), *fontControlWidget=new QWidget(fontWidget); CToolBar *toolbar=new CToolBar(toolbarWidget); QGridLayout *groupsLayout=new QGridLayout(groupWidget); QBoxLayout *mainLayout=new QBoxLayout(QBoxLayout::TopToBottom, this), *toolbarLayout=new QBoxLayout(QBoxLayout::LeftToRight, toolbarWidget), *fontsLayout=new QBoxLayout(QBoxLayout::TopToBottom, fontWidget), *fontControlLayout=new QBoxLayout(QBoxLayout::LeftToRight, fontControlWidget); toolbarLayout->setMargin(0); mainLayout->setMargin(0); groupsLayout->setMargin(0); fontsLayout->setMargin(0); fontControlLayout->setMargin(0); // Toolbar... duplicateFontsAct=new QAction(QIcon::fromTheme("system-search"), i18n("Scan for Duplicate Fonts..."), this); // validateFontsAct=new QAction(QIcon::fromTheme("checkmark"), i18n("Validate Fonts..."), this); toolbar->addAction(duplicateFontsAct); // toolbar->addAction(validateFontsAct); toolbar->setToolButtonStyle(Qt::ToolButtonFollowStyle); itsFilter=new CFontFilter(toolbarWidget); // Details - Groups... itsGroupList=new CGroupList(groupWidget); itsGroupListView=new CGroupListView(groupWidget, itsGroupList); QPushButton *createGroup=new CPushButton(KGuiItem(QString(), "list-add", i18n("Create a new group")), groupWidget); itsDeleteGroupControl=new CPushButton(KGuiItem(QString(), "edit-delete", i18n("Remove group")), groupWidget); itsEnableGroupControl=new CPushButton(KGuiItem(QString(), "enablefont", i18n("Enable all disabled fonts in the current group")), groupWidget); itsDisableGroupControl=new CPushButton(KGuiItem(QString(), "disablefont", i18n("Disable all enabled fonts in the current group")), groupWidget); groupsLayout->addWidget(itsGroupListView, 0, 0, 1, 5); groupsLayout->addWidget(createGroup, 1, 0); groupsLayout->addWidget(itsDeleteGroupControl, 1, 1); groupsLayout->addWidget(itsEnableGroupControl, 1, 2); groupsLayout->addWidget(itsDisableGroupControl, 1, 3); groupsLayout->addItem(new QSpacerItem(itsDisableGroupControl->width(), groupsLayout->spacing(), QSizePolicy::Expanding, QSizePolicy::Fixed), 1, 4); itsPreviewWidget = new QWidget(this); QBoxLayout *previewWidgetLayout = new QBoxLayout(QBoxLayout::TopToBottom, itsPreviewWidget); previewWidgetLayout->setMargin(0); previewWidgetLayout->setSpacing(0); // Preview QFrame *previewFrame=new QFrame(itsPreviewWidget); QBoxLayout *previewFrameLayout=new QBoxLayout(QBoxLayout::LeftToRight, previewFrame); previewFrameLayout->setMargin(0); previewFrameLayout->setSpacing(0); previewFrame->setFrameShape(QFrame::StyledPanel); previewFrame->setFrameShadow(QFrame::Sunken); previewFrame->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding); itsPreview=new CFontPreview(previewFrame); itsPreview->setWhatsThis(i18n("This displays a preview of the selected font.")); itsPreview->setContextMenuPolicy(Qt::CustomContextMenu); previewFrameLayout->addWidget(itsPreview); previewWidgetLayout->addWidget(previewFrame); itsPreview->engine()->readConfig(itsConfig); // List-style preview... itsPreviewList = new CPreviewListView(itsPreview->engine(), itsPreviewWidget); previewWidgetLayout->addWidget(itsPreviewList); itsPreviewList->setVisible(false); // Font List... itsFontList=new CFontList(fontWidget); itsFontListView=new CFontListView(itsPreviewSplitter, itsFontList); itsFontListView->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); itsAddFontControl=new CPushButton(KGuiItem(i18n("Install from File..."), "document-import", i18n("Install fonts from a local file")), fontControlWidget); itsGetNewFontsControl=new CPushButton(KGuiItem(i18n("Get New Fonts..."), "get-hot-new-stuff", i18n("Download new fonts")), fontControlWidget); itsDeleteFontControl=new CPushButton(KGuiItem(i18n("Delete"), "edit-delete", i18n("Delete all selected fonts")), fontControlWidget); itsPreviewSplitter->addWidget(itsPreviewWidget); itsPreviewSplitter->setCollapsible(1, true); itsStatusLabel = new QLabel(fontControlWidget); itsStatusLabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight); itsListingProgress=new CProgressBar(fontControlWidget, itsStatusLabel->height()); itsListingProgress->setRange(0, 100); // Layout widgets... toolbarLayout->addWidget(toolbar); toolbarLayout->addItem(new QSpacerItem(toolbarLayout->spacing(), 2, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed)); toolbarLayout->addWidget(itsFilter); mainLayout->addWidget(toolbarWidget); mainLayout->addWidget(itsGroupSplitter); fontControlLayout->addWidget(itsDeleteFontControl); fontControlLayout->addWidget(itsStatusLabel); fontControlLayout->addItem(new QSpacerItem(0, itsListingProgress->height()+4, QSizePolicy::Fixed, QSizePolicy::Fixed)); fontControlLayout->addWidget(itsListingProgress); fontControlLayout->addWidget(itsAddFontControl); fontControlLayout->addWidget(itsGetNewFontsControl); fontsLayout->addWidget(itsPreviewSplitter); fontsLayout->addWidget(fontControlWidget); // Set size of widgets... itsPreviewSplitter->setChildrenCollapsible(false); itsGroupSplitter->setChildrenCollapsible(false); itsGroupSplitter->setStretchFactor(0, 0); itsGroupSplitter->setStretchFactor(1, 1); itsPreviewSplitter->setStretchFactor(0, 1); itsPreviewSplitter->setStretchFactor(1, 0); // Set sizes for 3 views... QList defaultSizes; defaultSizes+=300; defaultSizes+=220; itsPreviewSplitter->setSizes(cg.readEntry(CFG_PREVIEW_SPLITTER_SIZES, defaultSizes)); itsPreviewHidden=itsPreviewSplitter->sizes().at(1)<8; defaultSizes.clear(); defaultSizes+=110; defaultSizes+=350; itsGroupSplitter->setSizes(cg.readEntry(CFG_GROUP_SPLITTER_SIZES, defaultSizes)); // Preview widget pop-up menu itsPreviewMenu = new QMenu(itsPreview); QAction *zoomIn=KStandardAction::create(KStandardAction::ZoomIn, itsPreview, SLOT(zoomIn()), this), *zoomOut=KStandardAction::create(KStandardAction::ZoomOut, itsPreview, SLOT(zoomOut()), this); itsPreviewMenu->addAction(zoomIn); itsPreviewMenu->addAction(zoomOut); itsPreviewMenu->addSeparator(); CPreviewSelectAction *prevSel=new CPreviewSelectAction(itsPreviewMenu); itsPreviewMenu->addAction(prevSel); QAction *changeTextAct=new QAction(QIcon::fromTheme("edit-rename"), i18n("Change Preview Text..."), this); itsPreviewMenu->addAction(changeTextAct), itsPreviewListMenu = new QMenu(itsPreviewList); itsPreviewListMenu->addAction(changeTextAct), // Connect signals... connect(itsPreview, SIGNAL(atMax(bool)), zoomIn, SLOT(setDisabled(bool))); connect(itsPreview, SIGNAL(atMin(bool)), zoomOut, SLOT(setDisabled(bool))); connect(prevSel, SIGNAL(range(QList)), itsPreview, SLOT(setUnicodeRange(QList))); connect(changeTextAct, SIGNAL(triggered(bool)), SLOT(changeText())); connect(itsFilter, SIGNAL(textChanged(QString)), itsFontListView, SLOT(filterText(QString))); connect(itsFilter, SIGNAL(criteriaChanged(int,qulonglong,QStringList)), itsFontListView, SLOT(filterCriteria(int,qulonglong,QStringList))); connect(itsGroupListView, SIGNAL(del()), SLOT(removeGroup())); connect(itsGroupListView, SIGNAL(print()), SLOT(printGroup())); connect(itsGroupListView, SIGNAL(enable()), SLOT(enableGroup())); connect(itsGroupListView, SIGNAL(disable()), SLOT(disableGroup())); connect(itsGroupListView, SIGNAL(moveFonts()), SLOT(moveFonts())); connect(itsGroupListView, SIGNAL(zip()), SLOT(zipGroup())); connect(itsGroupListView, SIGNAL(itemSelected(QModelIndex)), SLOT(groupSelected(QModelIndex))); connect(itsGroupListView, SIGNAL(info(QString)), SLOT(showInfo(QString))); connect(itsGroupList, SIGNAL(refresh()), SLOT(refreshFontList())); connect(itsFontList, SIGNAL(listingPercent(int)), SLOT(listingPercent(int))); connect(itsFontList, SIGNAL(layoutChanged()), SLOT(setStatusBar())); connect(itsFontListView, SIGNAL(del()), SLOT(deleteFonts())); connect(itsFontListView, SIGNAL(print()), SLOT(print())); connect(itsFontListView, SIGNAL(enable()), SLOT(enableFonts())); connect(itsFontListView, SIGNAL(disable()), SLOT(disableFonts())); connect(itsFontListView, SIGNAL(fontsDropped(QSet)), SLOT(addFonts(QSet))); connect(itsFontListView, SIGNAL(itemsSelected(QModelIndexList)), SLOT(fontsSelected(QModelIndexList))); connect(itsFontListView, SIGNAL(refresh()), SLOT(setStatusBar())); connect(itsGroupListView, SIGNAL(unclassifiedChanged()), itsFontListView, SLOT(refreshFilter())); connect(createGroup, SIGNAL(clicked()), SLOT(addGroup())); connect(itsDeleteGroupControl, SIGNAL(clicked()), SLOT(removeGroup())); connect(itsEnableGroupControl, SIGNAL(clicked()), SLOT(enableGroup())); connect(itsDisableGroupControl, SIGNAL(clicked()), SLOT(disableGroup())); connect(itsAddFontControl, SIGNAL(clicked()), SLOT(addFonts())); connect(itsGetNewFontsControl, SIGNAL(clicked()), SLOT(downloadFonts())); connect(itsDeleteFontControl, SIGNAL(clicked()), SLOT(deleteFonts())); connect(duplicateFontsAct, SIGNAL(triggered(bool)), SLOT(duplicateFonts())); //connect(validateFontsAct, SIGNAL(triggered(bool)), SLOT(validateFonts())); connect(itsPreview, SIGNAL(customContextMenuRequested(QPoint)), SLOT(previewMenu(QPoint))); connect(itsPreviewList, SIGNAL(showMenu(QPoint)), SLOT(previewMenu(QPoint))); connect(itsPreviewSplitter, SIGNAL(splitterMoved(int,int)), SLOT(splitterMoved())); selectMainGroup(); itsFontList->load(); } CKCmFontInst::~CKCmFontInst() { KConfigGroup cg(&itsConfig, CFG_GROUP); cg.writeEntry(CFG_PREVIEW_SPLITTER_SIZES, itsPreviewSplitter->sizes()); cg.writeEntry(CFG_GROUP_SPLITTER_SIZES, itsGroupSplitter->sizes()); delete itsTempDir; partialIcon(false); } QString CKCmFontInst::quickHelp() const { return Misc::root() ? i18n("

Font Installer

This module allows you to" " install TrueType, Type1, and Bitmap" " fonts.

You may also install fonts using Konqueror:" " type fonts:/ into Konqueror's location bar" " and this will display your installed fonts. To install a" " font, simply copy one into the folder.

") : i18n("

Font Installer

This module allows you to" " install TrueType, Type1, and Bitmap" " fonts.

You may also install fonts using Konqueror:" " type fonts:/ into Konqueror's location bar" " and this will display your installed fonts. To install a" " font, simply copy it into the appropriate folder - " " \"%1\" for fonts available to just yourself, or " " \"%2\" for system-wide fonts (available to all).

", i18n(KFI_KIO_FONTS_USER), i18n(KFI_KIO_FONTS_SYS)); } void CKCmFontInst::previewMenu(const QPoint &pos) { if(itsPreviewList->isHidden()) itsPreviewMenu->popup(itsPreview->mapToGlobal(pos)); else itsPreviewListMenu->popup(itsPreviewList->mapToGlobal(pos)); } void CKCmFontInst::splitterMoved() { if(itsPreviewWidget->width()>8 && itsPreviewHidden) { itsPreviewHidden=false; fontsSelected(itsFontListView->getSelectedItems()); } else if(!itsPreviewHidden && itsPreviewWidget->width()<8) itsPreviewHidden=true; } void CKCmFontInst::fontsSelected(const QModelIndexList &list) { if(!itsPreviewHidden) { if(!list.isEmpty()) { if(list.count()<2) { CFontModelItem *mi=static_cast(list.last().internalPointer()); CFontItem *font=mi->parent() ? static_cast(mi) : (static_cast(mi))->regularFont(); if(font) itsPreview->showFont(font->isEnabled() ? font->family() : font->fileName(), font->styleInfo(), font->index()); } else itsPreviewList->showFonts(list); } itsPreviewList->setVisible(list.count()>1); itsPreview->parentWidget()->setVisible(list.count()<2); } itsDeleteFontControl->setEnabled(list.count()); } void CKCmFontInst::addFonts() { QFileDialog dlg(this, i18n("Add Fonts")); dlg.setFileMode(QFileDialog::ExistingFiles); dlg.setMimeTypeFilters(CFontList::fontMimeTypes); QList list; if (dlg.exec() == QDialog::Accepted) list = dlg.selectedUrls(); if(!list.isEmpty()) { QSet urls; QList::Iterator it(list.begin()), end(list.end()); for(; it!=end; ++it) { if(KFI_KIO_FONTS_PROTOCOL!=(*it).scheme()) // Do not try to install from fonts:/ !!! { auto job = KIO::mostLocalUrl(*it); KJobWidgets::setWindow(job, this); job->exec(); QUrl url = job->mostLocalUrl(); if(url.isLocalFile()) { QString file(url.toLocalFile()); if(Misc::isPackage(file)) // If its a package we need to unzip 1st... urls+=FontsPackage::extract(url.toLocalFile(), &itsTempDir); else if(!Misc::isMetrics(url)) urls.insert(url); } else if(!Misc::isMetrics(url)) urls.insert(url); } } if(!urls.isEmpty()) addFonts(urls); delete itsTempDir; itsTempDir=nullptr; } } void CKCmFontInst::groupSelected(const QModelIndex &index) { CGroupListItem *grp=nullptr; if(index.isValid()) grp=static_cast(index.internalPointer()); else return; itsFontListView->setFilterGroup(grp); setStatusBar(); // // Check fonts listed within group are still valid! if(grp->isCustom() && !grp->validated()) { QSet remList; QSet::Iterator it(grp->families().begin()), end(grp->families().end()); for(; it!=end; ++it) if(!itsFontList->hasFamily(*it)) remList.insert(*it); it=remList.begin(); end=remList.end(); for(; it!=end; ++it) itsGroupList->removeFromGroup(grp, *it); grp->setValidated(); } itsGetNewFontsControl->setEnabled(grp->isPersonal() || grp->isAll()); } void CKCmFontInst::print(bool all) { // // In order to support printing of newly installed/enabled fonts, the actual printing // is carried out by the kfontinst helper app. This way we know Qt's font list will be // up to date. if((!itsPrintProc || QProcess::NotRunning==itsPrintProc->state()) && !Misc::app(KFI_PRINTER).isEmpty()) { QSet fonts; itsFontListView->getPrintableFonts(fonts, !all); if(!fonts.isEmpty()) { CPrintDialog dlg(this); KConfigGroup cg(&itsConfig, CFG_GROUP); if(dlg.exec(cg.readEntry(CFG_FONT_SIZE, 1))) { static const int constSizes[]={0, 12, 18, 24, 36, 48}; QSet::ConstIterator it(fonts.begin()), end(fonts.end()); QTemporaryFile tmpFile; bool useFile(fonts.count()>16), startProc(true); QStringList args; if(!itsPrintProc) itsPrintProc=new QProcess(this); else itsPrintProc->kill(); QString title = QGuiApplication::applicationDisplayName(); if (title.isEmpty()) title = QCoreApplication::applicationName(); // // If we have lots of fonts to print, pass kfontinst a temporary groups file to print // instead of passing font by font... if(useFile) { if(tmpFile.open()) { QTextStream str(&tmpFile); for(; it!=end; ++it) str << (*it).family << endl << (*it).styleInfo << endl; args << "--embed" << QString().sprintf("0x%x", (unsigned int)window()->winId()) << "--qwindowtitle" << title << "--qwindowicon" << "preferences-desktop-font-installer" << "--size" << QString().setNum(constSizes[dlg.chosenSize() < 6 ? dlg.chosenSize() : 2]) << "--listfile" << tmpFile.fileName() << "--deletefile"; } else { KMessageBox::error(this, i18n("Failed to save list of fonts to print.")); startProc=false; } } else { args << "--embed" << QString().sprintf("0x%x", (unsigned int)window()->winId()) << "--qwindowtitle" << title << "--qwindowicon" << "preferences-desktop-font-installer" << "--size" << QString().setNum(constSizes[dlg.chosenSize()<6 ? dlg.chosenSize() : 2]); for(; it!=end; ++it) args << "--pfont" << QString((*it).family.toUtf8()+','+QString().setNum((*it).styleInfo)); } if(startProc) { itsPrintProc->start(Misc::app(KFI_PRINTER), args); if(itsPrintProc->waitForStarted(1000)) { if(useFile) tmpFile.setAutoRemove(false); } else KMessageBox::error(this, i18n("Failed to start font printer.")); } cg.writeEntry(CFG_FONT_SIZE, dlg.chosenSize()); } } else KMessageBox::information(this, i18n("There are no printable fonts.\n" "You can only print non-bitmap and enabled fonts."), i18n("Cannot Print")); } } void CKCmFontInst::deleteFonts() { CJobRunner::ItemList urls; QStringList fontNames; QSet fonts; itsDeletedFonts.clear(); itsFontListView->getFonts(urls, fontNames, &fonts, true); if(urls.isEmpty()) KMessageBox::information(this, i18n("You did not select anything to delete."), i18n("Nothing to Delete")); else { QSet::ConstIterator it(fonts.begin()), end(fonts.end()); bool doIt=false; for(; it!=end; ++it) itsDeletedFonts.insert((*it).family); switch(fontNames.count()) { case 0: break; case 1: doIt = KMessageBox::Yes==KMessageBox::warningYesNo(this, i18n("

Do you really want to " "delete

\'%1\'?

", fontNames.first()), i18n("Delete Font"), KStandardGuiItem::del()); break; default: doIt = KMessageBox::Yes==KMessageBox::warningYesNoList(this, i18np("Do you really want to delete this font?", "Do you really want to delete these %1 fonts?", fontNames.count()), fontNames, i18n("Delete Fonts"), KStandardGuiItem::del()); } if(doIt) { itsStatusLabel->setText(i18n("Deleting font(s)...")); doCmd(CJobRunner::CMD_DELETE, urls); } } } void CKCmFontInst::moveFonts() { CJobRunner::ItemList urls; QStringList fontNames; itsDeletedFonts.clear(); itsFontListView->getFonts(urls, fontNames, nullptr, true); if(urls.isEmpty()) KMessageBox::information(this, i18n("You did not select anything to move."), i18n("Nothing to Move")); else { bool doIt=false; switch(fontNames.count()) { case 0: break; case 1: doIt = KMessageBox::Yes==KMessageBox::warningYesNo(this, i18n("

Do you really want to " "move

\'%1\'

from %2 to %3?

", fontNames.first(), itsGroupListView->isSystem() ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER), itsGroupListView->isSystem() ? i18n(KFI_KIO_FONTS_USER) : i18n(KFI_KIO_FONTS_SYS)), i18n("Move Font"), KGuiItem(i18n("Move"))); break; default: doIt = KMessageBox::Yes==KMessageBox::warningYesNoList(this, i18np("

Do you really want to move this font from %2 to %3?

", "

Do you really want to move these %1 fonts from %2 to %3?

", fontNames.count(), itsGroupListView->isSystem() ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER), itsGroupListView->isSystem() ? i18n(KFI_KIO_FONTS_USER) : i18n(KFI_KIO_FONTS_SYS)), fontNames, i18n("Move Fonts"), KGuiItem(i18n("Move"))); } if(doIt) { itsStatusLabel->setText(i18n("Moving font(s)...")); doCmd(CJobRunner::CMD_MOVE, urls, !itsGroupListView->isSystem()); } } } void CKCmFontInst::zipGroup() { QModelIndex idx(itsGroupListView->currentIndex()); if(idx.isValid()) { CGroupListItem *grp=static_cast(idx.internalPointer()); if(grp) { QFileDialog dlg(this, i18n("Export Group")); dlg.setAcceptMode(QFileDialog::AcceptSave); dlg.setDirectoryUrl(QUrl::fromLocalFile(grp->name())); dlg.setMimeTypeFilters(QStringList() << QStringLiteral("application/zip")); QString fileName; if (dlg.exec() == QDialog::Accepted) fileName = dlg.selectedFiles().value(0); if(!fileName.isEmpty()) { KZip zip(fileName); if(zip.open(QIODevice::WriteOnly)) { QSet files; files=itsFontListView->getFiles(); if(!files.isEmpty()) { QMap map=Misc::getFontFileMap(files); QMap::ConstIterator it(map.constBegin()), end(map.constEnd()); for(; it!=end; ++it) zip.addLocalFile(it.value(), it.key()); zip.close(); } else KMessageBox::error(this, i18n("No files?")); } else KMessageBox::error(this, i18n("Failed to open %1 for writing", fileName)); } } } } void CKCmFontInst::enableFonts() { toggleFonts(true); } void CKCmFontInst::disableFonts() { toggleFonts(false); } void CKCmFontInst::addGroup() { bool ok; QString name(QInputDialog::getText(this, i18n("Create New Group"), i18n("Please enter the name of the new group:"), QLineEdit::Normal, i18n("New Group"), &ok)); if(ok && !name.isEmpty()) itsGroupList->createGroup(name); } void CKCmFontInst::removeGroup() { if(itsGroupList->removeGroup(itsGroupListView->currentIndex())) selectMainGroup(); } void CKCmFontInst::enableGroup() { toggleGroup(true); } void CKCmFontInst::disableGroup() { toggleGroup(false); } void CKCmFontInst::changeText() { bool status; QString oldStr(itsPreview->engine()->getPreviewString()), newStr(QInputDialog::getText(this, i18n("Preview Text"), i18n("Please enter new text:"), QLineEdit::Normal, oldStr, &status)); if(status && oldStr!=newStr) { itsPreview->engine()->setPreviewString(newStr); itsPreview->showFont(); itsPreviewList->refreshPreviews(); } } void CKCmFontInst::duplicateFonts() { CDuplicatesDialog(this, itsFontList).exec(); } //void CKCmFontInst::validateFonts() //{ //} void CKCmFontInst::downloadFonts() { KNS3::DownloadDialog *newStuff = new KNS3::DownloadDialog("kfontinst.knsrc", this); newStuff->exec(); if(!newStuff->changedEntries().isEmpty()) // We have new fonts, so need to reconfigure fontconfig... { // Ask dbus helper for the current fonts folder name... // We then sym-link our knewstuff3 download folder into the fonts folder... QString destFolder=CJobRunner::folderName(false); if(!destFolder.isEmpty()) { destFolder+="kfontinst"; if(!QFile::exists(destFolder)) { QFile _file(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "kfontinst"); _file.link(destFolder); } } doCmd(CJobRunner::CMD_UPDATE, CJobRunner::ItemList()); } delete newStuff; } void CKCmFontInst::print() { print(false); } void CKCmFontInst::printGroup() { print(true); } void CKCmFontInst::listingPercent(int p) { if(0==p) { showInfo(i18n("Scanning font list...")); itsListingProgress->show(); } else if(100==p && p!=itsListingProgress->value()) { removeDeletedFontsFromGroups(); QSet foundries; itsFontList->getFoundries(foundries); itsFilter->setFoundries(foundries); refreshFamilies(); itsListingProgress->hide(); itsFontListView->selectFirstFont(); } itsListingProgress->setValue(p); } void CKCmFontInst::refreshFontList() { itsFontListView->refreshFilter(); refreshFamilies(); } void CKCmFontInst::refreshFamilies() { QSet enabledFamilies, disabledFamilies, partialFamilies; itsFontList->getFamilyStats(enabledFamilies, disabledFamilies, partialFamilies); itsGroupList->updateStatus(enabledFamilies, disabledFamilies, partialFamilies); setStatusBar(); } void CKCmFontInst::showInfo(const QString &info) { if(info.isEmpty()) if(itsLastStatusBarMsg.isEmpty()) setStatusBar(); else { itsStatusLabel->setText(itsLastStatusBarMsg); itsLastStatusBarMsg=QString(); } else { if(itsLastStatusBarMsg.isEmpty()) itsLastStatusBarMsg=itsStatusLabel->text(); itsStatusLabel->setText(info); } } void CKCmFontInst::setStatusBar() { if(itsFontList->slowUpdates()) return; int enabled=0, disabled=0, partial=0; bool selectedEnabled=false, selectedDisabled=false; itsStatusLabel->setToolTip(QString()); if(0==itsFontList->families().count()) itsStatusLabel->setText(i18n("No fonts")); else { itsFontListView->stats(enabled, disabled, partial); itsFontListView->selectedStatus(selectedEnabled, selectedDisabled); QString text(i18np("1 Font", "%1 Fonts", enabled+disabled+partial)); if(disabled||partial) { text+=QString(" (%2").arg(KIconLoader::global()->iconPath("dialog-ok", -KIconLoader::SizeSmall)).arg(enabled) +QString(" %2").arg(KIconLoader::global()->iconPath("dialog-cancel", -KIconLoader::SizeSmall)).arg(disabled); if(partial) text+=QString(" %2").arg(partialIcon()).arg(partial); text+=QLatin1Char(')'); itsStatusLabel->setToolTip(partial ? i18n("" "" "" "" "" "
Enabled:%1
Disabled:%2
Partially enabled:%3
Total:%4
", enabled, disabled, partial, enabled+disabled+partial) : i18n("" "" "" "" "
Enabled:%1
Disabled:%2
Total:%3
", enabled, disabled, enabled+disabled)); } itsStatusLabel->setText(disabled||partial ? "

"+text+"

" : text); } CGroupListItem::EType type(itsGroupListView->getType()); bool isStd(CGroupListItem::CUSTOM==type); itsAddFontControl->setEnabled(CGroupListItem::ALL==type||CGroupListItem::UNCLASSIFIED==type|| CGroupListItem::PERSONAL==type||CGroupListItem::SYSTEM==type); itsDeleteGroupControl->setEnabled(isStd); itsEnableGroupControl->setEnabled(disabled||partial); itsDisableGroupControl->setEnabled(isStd && (enabled||partial)); itsGroupListView->controlMenu(itsDeleteGroupControl->isEnabled(), itsEnableGroupControl->isEnabled(), itsDisableGroupControl->isEnabled(), enabled||partial, enabled||disabled); itsDeleteFontControl->setEnabled(selectedEnabled||selectedDisabled); } void CKCmFontInst::addFonts(const QSet &src) { if(!src.isEmpty() && !itsGroupListView->isCustom()) { bool system; if(Misc::root()) system=true; else { switch(itsGroupListView->getType()) { case CGroupListItem::ALL: case CGroupListItem::UNCLASSIFIED: switch(KMessageBox::questionYesNoCancel(this, i18n("Do you wish to install the font(s) for personal use " "(only available to you), or " "system-wide (available to all users)?"), i18n("Where to Install"), KGuiItem(i18n(KFI_KIO_FONTS_USER)), KGuiItem(i18n(KFI_KIO_FONTS_SYS)))) { case KMessageBox::Yes: system=false; break; case KMessageBox::No: system=true; break; default: case KMessageBox::Cancel: return; } break; case CGroupListItem::PERSONAL: system=false; break; case CGroupListItem::SYSTEM: system=true; break; default: return; } } QSet copy; QSet::ConstIterator it, end(src.end()); // // Check if font has any associated AFM or PFM file... itsStatusLabel->setText(i18n("Looking for any associated files...")); if(!itsProgress) { itsProgress = new QProgressDialog(this); itsProgress->setWindowTitle(i18n("Scanning Files...")); itsProgress->setLabelText(i18n("Looking for additional files to install...")); itsProgress->setModal(true); itsProgress->setAutoReset(true); itsProgress->setAutoClose(true); } itsProgress->setCancelButton(nullptr); itsProgress->setMinimumDuration(500); itsProgress->setRange(0, src.size()); itsProgress->setValue(0); int steps=src.count()<200 ? 1 : src.count()/10; for(it=src.begin(); it!=end; ++it) { QList associatedUrls; itsProgress->setLabelText(i18n("Looking for files associated with %1", (*it).url())); itsProgress->setValue(itsProgress->value()+1); if(1==steps || 0==(itsProgress->value()%steps)) { bool dialogVisible(itsProgress->isVisible()); QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); if(dialogVisible && !itsProgress->isVisible()) // User closed dialog! re-open!!! itsProgress->show(); } CJobRunner::getAssociatedUrls(*it, associatedUrls, false, this); copy.insert(*it); QList::Iterator aIt(associatedUrls.begin()), aEnd(associatedUrls.end()); for(; aIt!=aEnd; ++aIt) copy.insert(*aIt); } itsProgress->close(); CJobRunner::ItemList installUrls; end=copy.end(); for(it=copy.begin(); it!=end; ++it) installUrls.append(*it); itsStatusLabel->setText(i18n("Installing font(s)...")); doCmd(CJobRunner::CMD_INSTALL, installUrls, system); } } void CKCmFontInst::removeDeletedFontsFromGroups() { if(!itsDeletedFonts.isEmpty()) { QSet::Iterator it(itsDeletedFonts.begin()), end(itsDeletedFonts.end()); for(; it!=end; ++it) if(!itsFontList->hasFamily(*it)) itsGroupList->removeFamily(*it); itsDeletedFonts.clear(); } } void CKCmFontInst::selectGroup(CGroupListItem::EType grp) { QModelIndex current(itsGroupListView->currentIndex()); if(current.isValid()) { CGroupListItem *grpItem=static_cast(current.internalPointer()); if(grpItem && grp==grpItem->type()) return; else itsGroupListView->selectionModel()->select(current, QItemSelectionModel::Deselect); } QModelIndex idx(itsGroupList->index(grp)); itsGroupListView->selectionModel()->select(idx, QItemSelectionModel::Select); itsGroupListView->setCurrentIndex(idx); groupSelected(idx); itsFontListView->refreshFilter(); setStatusBar(); } void CKCmFontInst::toggleGroup(bool enable) { QModelIndex idx(itsGroupListView->currentIndex()); if(idx.isValid()) { CGroupListItem *grp=static_cast(idx.internalPointer()); if(grp) toggleFonts(enable, grp->name()); } } void CKCmFontInst::toggleFonts(bool enable, const QString &grp) { CJobRunner::ItemList urls; QStringList fonts; itsFontListView->getFonts(urls, fonts, nullptr, grp.isEmpty(), !enable, enable); if(urls.isEmpty()) KMessageBox::information(this, enable ? i18n("You did not select anything to enable.") : i18n("You did not select anything to disable."), enable ? i18n("Nothing to Enable") : i18n("Nothing to Disable")); else toggleFonts(urls, fonts, enable, grp); } void CKCmFontInst::toggleFonts(CJobRunner::ItemList &urls, const QStringList &fonts, bool enable, const QString &grp) { bool doIt=false; switch(fonts.count()) { case 0: break; case 1: doIt = KMessageBox::Yes==KMessageBox::warningYesNo(this, grp.isEmpty() ? enable ? i18n("

Do you really want to " "enable

\'%1\'?

", fonts.first()) : i18n("

Do you really want to " "disable

\'%1\'?

", fonts.first()) : enable ? i18n("

Do you really want to " "enable

\'%1\', " "contained within group \'%2\'?

", fonts.first(), grp) : i18n("

Do you really want to " "disable

\'%1\', " "contained within group \'%2\'?

", fonts.first(), grp), enable ? i18n("Enable Font") : i18n("Disable Font"), enable ? KGuiItem(i18n("Enable"), "enablefont", i18n("Enable Font")) : KGuiItem(i18n("Disable"), "disablefont", i18n("Disable Font"))); break; default: doIt = KMessageBox::Yes==KMessageBox::warningYesNoList(this, grp.isEmpty() ? enable ? i18np("Do you really want to enable this font?", "Do you really want to enable these %1 fonts?", urls.count()) : i18np("Do you really want to disable this font?", "Do you really want to disable these %1 fonts?", urls.count()) : enable ? i18np("

Do you really want to enable this font " "contained within group \'%2\'?

", "

Do you really want to enable these %1 fonts " "contained within group \'%2\'?

", urls.count(), grp) : i18np("

Do you really want to disable this font " "contained within group \'%2\'?

", "

Do you really want to disable these %1 fonts " "contained within group \'%2\'?

", urls.count(), grp), fonts, enable ? i18n("Enable Fonts") : i18n("Disable Fonts"), enable ? KGuiItem(i18n("Enable"), "enablefont", i18n("Enable Fonts")) : KGuiItem(i18n("Disable"), "disablefont", i18n("Disable Fonts"))); } if(doIt) { if(enable) itsStatusLabel->setText(i18n("Enabling font(s)...")); else itsStatusLabel->setText(i18n("Disabling font(s)...")); doCmd(enable ? CJobRunner::CMD_ENABLE : CJobRunner::CMD_DISABLE, urls); } } void CKCmFontInst::selectMainGroup() { selectGroup(/*Misc::root() ? */CGroupListItem::ALL/* : CGroupListItem::PERSONAL*/); } void CKCmFontInst::doCmd(CJobRunner::ECommand cmd, const CJobRunner::ItemList &urls, bool system) { itsFontList->setSlowUpdates(true); CJobRunner runner(this); connect(&runner, SIGNAL(configuring()), itsFontList, SLOT(unsetSlowUpdates())); runner.exec(cmd, urls, system); itsFontList->setSlowUpdates(false); refreshFontList(); if(CJobRunner::CMD_DELETE==cmd) itsFontListView->clearSelection(); CFcEngine::setDirty(); setStatusBar(); delete itsTempDir; itsTempDir=nullptr; itsFontListView->repaint(); removeDeletedFontsFromGroups(); } } #include "KCmFontInst.moc" diff --git a/kcms/kfontinst/kcmfontinst/fontinst.desktop b/kcms/kfontinst/kcmfontinst/fontinst.desktop index baa9d9743..c4f3898bb 100644 --- a/kcms/kfontinst/kcmfontinst/fontinst.desktop +++ b/kcms/kfontinst/kcmfontinst/fontinst.desktop @@ -1,161 +1,161 @@ [Desktop Entry] Exec=kcmshell5 fontinst Icon=preferences-desktop-font-installer Type=Service X-KDE-ServiceTypes=KCModule X-DocPath=kcontrol/fontinst/index.html X-KDE-Library=kcm_fontinst X-KDE-ParentApp=kcontrol X-KDE-OnlyShowOnQtPlatforms=xcb; Categories=Qt;KDE;X-KDE-settings-system; X-KDE-System-Settings-Parent-Category=font Name=Font Management Name[ar]=إدارة الخطوط Name[bg]=Управление на шрифтове Name[bn]=ফন্ট ব্যবস্থাপনা Name[bs]=Font za upravljanje Name[ca]=Gestió dels tipus de lletra Name[ca@valencia]=Gestió dels tipus de lletra Name[cs]=Správa písem Name[da]=Håndtering af skrifttyper Name[de]=Schriftarten-Verwaltung Name[el]=Διαχείριση γραμματοσειρών Name[en_GB]=Font Management Name[es]=Gestión de tipos de letra Name[et]=Fondihaldur Name[eu]=Letra-tipoen kudeaketa Name[fi]=Fonttienhallinta Name[fr]=Gestion des polices de caractères Name[ga]=Bainisteoireacht Clónna Name[gl]=Xestión dos tipos de letra Name[he]=ניהול גופנים Name[hr]=Upravljanje pismima Name[hu]=Betűtípus-kezelés Name[ia]=Gestion de font Name[id]=Pengelolaan Font Name[is]=Leturstjórn Name[it]=Gestione dei caratteri Name[ja]=フォント管理 Name[kk]=Қаріптерді басқару Name[km]=ការ​គ្រប់គ្រង​ពុម្ពអក្សរ Name[ko]=글꼴 관리 Name[lt]=Šriftų tvarkymas Name[lv]=Fontu pārvaldnieks Name[mr]=फॉन्ट व्यवस्थापन Name[nb]=Skriftadministrering Name[nds]=Schriftpleeg Name[nl]=Lettertypenbeheer Name[nn]=Skrift­handsaming Name[pa]=ਫੋਂਟ ਪਰਬੰਧ Name[pl]=Zarządzanie czcionkami Name[pt]=Gestão dos Tipos de Letra Name[pt_BR]=Gerenciamento de fontes Name[ro]=Administrare fonturi Name[ru]=Управление шрифтами Name[sk]=Správa písiem Name[sl]=Upravljanje pisav Name[sr]=Управљање фонтовима Name[sr@ijekavian]=Управљање фонтовима Name[sr@ijekavianlatin]=Upravljanje fontovima Name[sr@latin]=Upravljanje fontovima Name[sv]=Teckensnittshantering Name[tr]=Yazı Tipi Yönetimi Name[uk]=Керування шрифтами Name[vi]=Trình quản lý phông chữ Name[x-test]=xxFont Managementxx Name[zh_CN]=字体管理 Name[zh_TW]=字型管理 -Comment=Font Installation, Preview and Removal +Comment=Install, manage and preview fonts Comment[ar]=ثبّت الخطوط، وعاينها وأزلها Comment[bs]=Instalacija fonta, pregled i uklanjanje Comment[ca]=Instal·lació, vista prèvia i eliminació dels tipus de lletra Comment[ca@valencia]=Instal·lació, vista prèvia i eliminació dels tipus de lletra Comment[cs]=Instalace a náhled písem Comment[da]=Installation, forhåndsvisning og fjernelse af skrifttyper Comment[de]=Installation, Vorschau und Entfernen von Schriftarten Comment[el]=Εγκατάσταση, προεπισκόπηση και αφαίρεση γραμματοσειρών Comment[en_GB]=Font Installation, Preview and Removal Comment[es]=Instalación, vista previa y eliminación de tipos de letra Comment[et]=Fontide paigaldamine, eelvaatlus ja eemaldamine Comment[eu]=Letra-tipoak instalatzea, aurreikustea eta kentzea Comment[fi]=Fonttien asennus, esikatselu ja poistaminen Comment[fr]=Installation, aperçu et suppression de polices Comment[gl]=Instalación, vista previa e desinstalación de tipos de letra Comment[he]=Font Installation, Preview and Removal Comment[hu]=Betűkészlet-telepítés, előnézet és eltávolítás Comment[id]=Penginstalan Font, Pratinjau dan Pencopotan Comment[it]=Installazione dei caratteri, anteprima e rimozione Comment[ko]=글꼴 설치, 미리 보기, 삭제 Comment[lt]=Šriftų diegimas, peržiūra ir šalinimas Comment[nb]=Skriftinstallering, forhåndsvisning og fjerning Comment[nds]=Schriftoorden ankieken, installeren un wegmaken Comment[nl]=Installatie, voorbeeldweergave en verwijdering van lettertypen Comment[nn]=Installering, førehandsvising og fjerning av skrifter Comment[pa]=ਫ਼ੋਂਟ ਇੰਸਟਾਲੇਸ਼ਨ, ਝਲਕ ਅਤੇ ਹਟਾਉਣਾ Comment[pl]=Wgrywanie, podgląd i usuwanie czcionek Comment[pt]=Instalação, Antevisão e Remoção de Tipos de Letra Comment[pt_BR]=Instalação, visualização e remoção de fontes Comment[ru]=Установка, просмотр и удаление шрифтов Comment[sk]=Inštalácia, náhľad a odstránenie písiem Comment[sl]=Namestitev, predogled in odstranitev pisav Comment[sr]=Инсталирање, преглед и уклањање фонтова Comment[sr@ijekavian]=Инсталирање, преглед и уклањање фонтова Comment[sr@ijekavianlatin]=Instaliranje, pregled i uklanjanje fontova Comment[sr@latin]=Instaliranje, pregled i uklanjanje fontova Comment[sv]=Installation, förhandsgranskning och borttagning av teckensnitt Comment[tr]=Yazı Tipi Kurulumu, Önizlemesi ve Kaldırılması Comment[uk]=Встановлення, перегляд і вилучення шрифтів Comment[x-test]=xxFont Installation, Preview and Removalxx Comment[zh_CN]=字体安装,预览和删除 Comment[zh_TW]=字型安裝、預覽與移除 X-KDE-Keywords=font,fonts,installer,truetype,type1,bitmap X-KDE-Keywords[ar]=خط,خطوط,مثبّت,مثبت,ترو.تايب,تايب1,صورة نقطية,truetype X-KDE-Keywords[bs]=slovo,slova,instalacijski program,truetype,tip1,bitna mapa X-KDE-Keywords[ca]=tipus de lletra,tipus de lletres,instal·lador,truetype,type1,mapa de bits X-KDE-Keywords[ca@valencia]=tipus de lletra,tipus de lletres,instal·lador,truetype,type1,mapa de bits X-KDE-Keywords[cs]=písmo,písma,instalátor,truetype,type1,bitmap X-KDE-Keywords[da]=font,fonts,skrifttype,skrifttyper,installer,truetype,type1,bitmap X-KDE-Keywords[de]=Schrift,Fonts,Schriftarten,Installation,TrueType,Type1,Bitmapschriften X-KDE-Keywords[el]=γραμματοσειρά,γραμματοσειρές,πρόγραμμα εγκατάστασης,truetype,type1,bitmap X-KDE-Keywords[en_GB]=font,fonts,installer,truetype,type1,bitmap X-KDE-Keywords[es]=tipo de letra,tipos de letra,instalador,truetype,type1,mapa de bits X-KDE-Keywords[et]=font,fondid,paigaldaja,truetype,type1,bitmap,bittraster X-KDE-Keywords[eu]=letra-tipo,letra-tipoak,instalatzaile,truetype,type1,bitmapa X-KDE-Keywords[fi]=kirjasin,kirjasimet,fontti,fontit,asentaja,asennin,truetype,type1,bitmap,bittikartta X-KDE-Keywords[fr]=police, polices, installateur, TrueType, type1, bitmap X-KDE-Keywords[ga]=cló,clófhoireann,clónna,clófhoirne,suiteálaí,truetype,type1,mapa giotán,giotánmhapach X-KDE-Keywords[gl]=letra, glifo, tipo de letra, tipo, instalador X-KDE-Keywords[hu]=betűkészlet,betűkészletek,telepítő,truetype,type 1,bitmap X-KDE-Keywords[ia]=font,fonts,installator,truetype,type1,bitmap X-KDE-Keywords[id]=fon,fon,penginstal,truetype,type1,bitmap X-KDE-Keywords[it]=carattere,caratteri,installatore,truetype,type1,bitmap X-KDE-Keywords[kk]=font,fonts,installer,truetype,type1,bitmap X-KDE-Keywords[km]=font,fonts,installer,truetype,type1,bitmap X-KDE-Keywords[ko]=font,fonts,installer,truetype,type1,bitmap,글꼴,폰트,설치 X-KDE-Keywords[mr]=फॉन्ट, फॉन्टस, इंस्टालर, ट्रू टाईप, टाईप १, बीटमँप X-KDE-Keywords[nb]=skrift,skrifter,installer,truetrype,type1,bitmap X-KDE-Keywords[nds]=Schrift,Schriften,Schriftoort,Schriftoorden,TrueType,Type1,Bitmap X-KDE-Keywords[nl]=lettertype,lettertypen,installatieprogramma,truetype,type1,bitmap X-KDE-Keywords[nn]=skrift,skrifter,font,installer,truetype,type1,bitmap,punktskrift X-KDE-Keywords[pl]=czcionki,czcionka,instalator,truetype,typ1,mapa bitowa X-KDE-Keywords[pt]=tipo de letra,tipos de letra,instalador,truetype,type1,imagem X-KDE-Keywords[pt_BR]=fonte,fontes,instalador,truetype,type1,bitmap,imagem X-KDE-Keywords[ru]=font,fonts,installer,truetype,type1,bitmap,шрифт,шрифты,установка шрифтов,инсталлятор,битовая карта,растровое изображение,удаление шрифтов X-KDE-Keywords[sk]=písmo,písma,inštalátor,truetype,type1,bitmap X-KDE-Keywords[sl]=pisava,pisave,namestilnik,truetype,type1,bitmap,namestilnik pisav X-KDE-Keywords[sr]=font,fonts,installer,truetype,type1,bitmap,фонт,фонтови,инсталатер,трутајп,тип‑1,битмапски X-KDE-Keywords[sr@ijekavian]=font,fonts,installer,truetype,type1,bitmap,фонт,фонтови,инсталатер,трутајп,тип‑1,битмапски X-KDE-Keywords[sr@ijekavianlatin]=font,fonts,installer,truetype,type1,bitmap,font,fontovi,instalater,Truetype,Type1,bitmapski X-KDE-Keywords[sr@latin]=font,fonts,installer,truetype,type1,bitmap,font,fontovi,instalater,Truetype,Type1,bitmapski X-KDE-Keywords[sv]=teckensnitt,installation,truetype,type1,bitavbildning X-KDE-Keywords[tr]=yazı tipi,yazı tipleri,yükleyici,kurucu,trueytpe,type1,resim X-KDE-Keywords[uk]=шрифт,шрифти,встановлювач,truetype,type1,растрові X-KDE-Keywords[x-test]=xxfontxx,xxfontsxx,xxinstallerxx,xxtruetypexx,xxtype1xx,xxbitmapxx X-KDE-Keywords[zh_CN]=font,fonts,installer,truetype,type1,bitmap,字体,安装器,点阵 X-KDE-Keywords[zh_TW]=font,fonts,installer,truetype,type1,bitmap diff --git a/kcms/ksplash/kcm.cpp b/kcms/ksplash/kcm.cpp index 4b14375af..c9dd84a8a 100644 --- a/kcms/ksplash/kcm.cpp +++ b/kcms/ksplash/kcm.cpp @@ -1,211 +1,211 @@ /* This file is part of the KDE Project Copyright (c) 2014 Marco Martin Copyright (c) 2014 Vishesh Handa This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kcm.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include K_PLUGIN_FACTORY_WITH_JSON(KCMSplashScreenFactory, "kcm_splashscreen.json", registerPlugin();) KCMSplashScreen::KCMSplashScreen(QObject* parent, const QVariantList& args) : KQuickAddons::ConfigModule(parent, args) , m_config(QStringLiteral("ksplashrc")) , m_configGroup(m_config.group("KSplash")) { qmlRegisterType(); - KAboutData* about = new KAboutData(QStringLiteral("kcm_splashscreen"), i18n("Choose the splash screen theme"), + KAboutData* about = new KAboutData(QStringLiteral("kcm_splashscreen"), i18n("Splash Screen"), QStringLiteral("0.1"), QString(), KAboutLicense::LGPL); about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); setAboutData(about); setButtons(Help | Apply | Default); m_model = new QStandardItemModel(this); QHash roles = m_model->roleNames(); roles[PluginNameRole] = "pluginName"; roles[ScreenhotRole] = "screenshot"; roles[DescriptionRole] = "description"; m_model->setItemRoleNames(roles); loadModel(); } QList KCMSplashScreen::availablePackages(const QString &component) { QList packages; QStringList paths; const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); for (const QString &path : dataPaths) { QDir dir(path + QStringLiteral("/plasma/look-and-feel")); paths << dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot); } for (const QString &path : paths) { Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); pkg.setPath(path); pkg.setFallbackPackage(Plasma::Package()); if (component.isEmpty() || !pkg.filePath(component.toUtf8()).isEmpty()) { packages << pkg; } } return packages; } QStandardItemModel *KCMSplashScreen::splashModel() { return m_model; } QString KCMSplashScreen::selectedPlugin() const { return m_selectedPlugin; } void KCMSplashScreen::setSelectedPlugin(const QString &plugin) { if (m_selectedPlugin == plugin) { return; } if (!m_selectedPlugin.isEmpty()) { setNeedsSave(true); } m_selectedPlugin = plugin; emit selectedPluginChanged(); emit selectedPluginIndexChanged(); } void KCMSplashScreen::getNewClicked() { KNS3::DownloadDialog dialog("ksplash.knsrc", nullptr); if (dialog.exec()) { KNS3::Entry::List list = dialog.changedEntries(); if (!list.isEmpty()) { loadModel(); } } } void KCMSplashScreen::loadModel() { m_model->clear(); QStandardItem* row = new QStandardItem(i18n("None")); row->setData("None", PluginNameRole); row->setData(i18n("No splash screen will be shown"), DescriptionRole); m_model->appendRow(row); const QList pkgs = availablePackages(QStringLiteral("splashmainscript")); for (const Plasma::Package &pkg : pkgs) { QStandardItem* row = new QStandardItem(pkg.metadata().name()); row->setData(pkg.metadata().pluginName(), PluginNameRole); row->setData(pkg.filePath("previews", QStringLiteral("splash.png")), ScreenhotRole); row->setData(pkg.metadata().comment(), DescriptionRole); m_model->appendRow(row); } m_model->sort(0 /*column*/); emit selectedPluginIndexChanged(); } void KCMSplashScreen::load() { m_package = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kdeglobals")), "KDE"); const QString packageName = cg.readEntry("LookAndFeelPackage", QString()); if (!packageName.isEmpty()) { m_package.setPath(packageName); } QString currentPlugin = m_configGroup.readEntry("Theme", QString()); if (currentPlugin.isEmpty()) { currentPlugin = m_package.metadata().pluginName(); } setSelectedPlugin(currentPlugin); setNeedsSave(false); } void KCMSplashScreen::save() { if (m_selectedPlugin.isEmpty()) { return; } else if (m_selectedPlugin == QLatin1String("None")) { m_configGroup.writeEntry("Theme", m_selectedPlugin); m_configGroup.writeEntry("Engine", "none"); } else { m_configGroup.writeEntry("Theme", m_selectedPlugin); m_configGroup.writeEntry("Engine", "KSplashQML"); } m_configGroup.sync(); setNeedsSave(false); } void KCMSplashScreen::defaults() { if (!m_package.metadata().isValid()) { return; } setSelectedPlugin(m_package.metadata().pluginName()); } int KCMSplashScreen::selectedPluginIndex() const { for (int i = 0; i < m_model->rowCount(); ++i) { if (m_model->data(m_model->index(i, 0), PluginNameRole).toString() == m_selectedPlugin) { return i; } } return -1; } void KCMSplashScreen::test(const QString &plugin) { if (plugin.isEmpty() || plugin == QLatin1String("None")) { return; } QProcess proc; QStringList arguments; arguments << plugin << QStringLiteral("--test"); if (proc.execute(QStringLiteral("ksplashqml"), arguments)) { QMessageBox::critical(nullptr, i18n("Error"), i18n("Failed to successfully test the splash screen.")); } } #include "kcm.moc" diff --git a/kcms/ksplash/kcm_splashscreen.desktop b/kcms/ksplash/kcm_splashscreen.desktop index 46534d583..6d9320871 100644 --- a/kcms/ksplash/kcm_splashscreen.desktop +++ b/kcms/ksplash/kcm_splashscreen.desktop @@ -1,120 +1,120 @@ [Desktop Entry] Icon=preferences-system-splash Exec=kcmshell5 kcm_splashscreen X-DocPath=kcontrol/splashscreen/index.html Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_splashscreen X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=workspacetheme X-KDE-Weight=100 Name=Splash Screen Name[bs]=Čuvar ekrana Name[ca]=Pantalla de presentació Name[ca@valencia]=Pantalla de presentació Name[cs]=Úvodní obrazovka Name[da]=Splashskærm Name[de]=Startbildschirm Name[el]=Αρχική οθόνη Name[en_GB]=Splash Screen Name[es]=Pantalla de bienvenida Name[et]=Tiitelkuva Name[eu]=Plast pantaila Name[fi]=Tervetuloruutu Name[fr]=Écran de démarrage Name[gl]=Pantalla de benvida Name[he]=מסך פתיחה Name[hu]=Nyitóképernyő Name[id]=Layar Splash Name[is]=Upphafsskjár Name[it]=Schermata iniziale Name[ko]=시작 화면 Name[lt]=Pasveikinimo ekranas Name[nb]=Velkomstbilde Name[nds]=Startschirm Name[nl]=Opstartscherm Name[nn]=Velkomst­bilete Name[pa]=ਸਵਾਗਤੀ ਸਕਰੀਨ Name[pl]=Ekran powitalny Name[pt]=Ecrã Inicial Name[pt_BR]=Tela de apresentação Name[ru]=Заставка Name[se]=Álgošearbma Name[sk]=Úvodná obrazovka Name[sl]=Pozdravno okno Name[sr]=Уводни екран Name[sr@ijekavian]=Уводни екран Name[sr@ijekavianlatin]=Uvodni ekran Name[sr@latin]=Uvodni ekran Name[sv]=Startskärm Name[tr]=Açılış Ekranı Name[uk]=Вікно вітання Name[vi]=Màn hình chào mừng Name[x-test]=xxSplash Screenxx Name[zh_CN]=欢迎屏幕 Name[zh_TW]=啟動畫面 -Comment=Choose the splash screen theme +Comment=Choose splash screen theme Comment[ca]=Trieu el tema de la pantalla de presentació Comment[ca@valencia]=Trieu el tema de la pantalla de presentació Comment[de]=Startbildschirm-Design auswählen Comment[es]=Escoger el tema de la pantalla de bienvenida Comment[fi]=Valitse tervetuloruudun teema Comment[gl]=Escoller o tema da pantalla de benvida Comment[id]=Memilih tema layar splash Comment[it]=Scegli il tema della schermata iniziale Comment[nl]=Het opstartschermthema kiezen Comment[nn]=Vel tema for velkomstbilete Comment[pl]=Wybierz wygląd ekranu powitalnego Comment[pt]=Escolher o tema do ecrã inicial Comment[pt_BR]=Escolha o tema da tela de apresentação Comment[ru]=Выбор темы экрана-заставки Comment[sk]=Vybrať tému pre úvodnú obrazovku Comment[sv]=Välj startskärmstemat Comment[uk]=Вибір теми вікна вітання Плазми Comment[x-test]=xxChoose the splash screen themexx Comment[zh_CN]=选择欢迎屏幕主题 Comment[zh_TW]=選擇啟動畫面主題 X-KDE-Keywords=splash screen,splash theme,startup X-KDE-Keywords[bs]=čuvar ekrana,blijesak teme,pokretanje X-KDE-Keywords[ca]=pantalla de presentació,tema de presentació,engegar X-KDE-Keywords[ca@valencia]=pantalla de presentació,tema de presentació,engegar X-KDE-Keywords[da]=opstartsbillede,opstartsskærm,splash,opstartstema,opstart X-KDE-Keywords[de]=Startbildschirm,Design X-KDE-Keywords[el]=οθόνης εκκίνησης,θέμα εκκίνησης,έναρξη X-KDE-Keywords[en_GB]=splash screen,splash theme,startup X-KDE-Keywords[es]=pantalla de bienvenida,tema de bienvenida,inicio X-KDE-Keywords[et]=tiitelkuva,tiitelkuva teema,käivitamine X-KDE-Keywords[eu]=plasta pantaila,plasta gaia,abiaraztea X-KDE-Keywords[fi]=aloitusruutu,aloitusteema,käynnistys,käynnistysruutu,käynnistysteema,tervetuloruutu,tervetuloikkuna,tervetuloteema X-KDE-Keywords[fr]=écran de démarrage, thème de l'écran de démarrage, démarrage X-KDE-Keywords[gl]=pantalla de benvida, tema de benvida, inicio X-KDE-Keywords[hu]=indítóképernyő,indítótéma,indulás X-KDE-Keywords[id]=screen splash,tema splash,pemulaian X-KDE-Keywords[it]=schermata iniziale,tema della schermata iniziale,avvio X-KDE-Keywords[ko]=splash screen,splash theme,startup,시작 화면,시작 테마,시작 X-KDE-Keywords[nb]=velkomstbilde,velkomstbildetema,oppstart X-KDE-Keywords[nds]=Startschirm,Startschirm-Muster,Hoochfohren X-KDE-Keywords[nl]=splash-scherm,splash-thema,opstarten X-KDE-Keywords[nn]=velkomstbilete,velkomstbilettema,oppstart X-KDE-Keywords[pa]=ਸਵਾਗਤੀ ਸਕਰੀਨ,ਸਪਲੈਸ਼ ਥੀਮ,ਸ਼ੁਰੂ,ਸ਼ੁਰੂਆਤ X-KDE-Keywords[pl]=ekran powitalny,wystrój ekranu powitalnego,uruchamianie X-KDE-Keywords[pt]=ecrã inicial,tema do ecrã inicial,arranque X-KDE-Keywords[pt_BR]=tela inicial,tema inicial,inicialização X-KDE-Keywords[ru]=splash screen,splash theme,startup,заставка,экран-заставка,тема заставки,запуск,приветствие X-KDE-Keywords[sk]=splash screen,splash theme,spustenie X-KDE-Keywords[sl]=pozdravno okno,pozdravni zaslon,tema pozdravnega zaslona,zagon X-KDE-Keywords[sr]=splash screen,splash theme,startup,уводни екран,уводна тема,покретање X-KDE-Keywords[sr@ijekavian]=splash screen,splash theme,startup,уводни екран,уводна тема,покретање X-KDE-Keywords[sr@ijekavianlatin]=splash screen,splash theme,startup,uvodni ekran,uvodna tema,pokretanje X-KDE-Keywords[sr@latin]=splash screen,splash theme,startup,uvodni ekran,uvodna tema,pokretanje X-KDE-Keywords[sv]=startskärm,starttema,start X-KDE-Keywords[tr]=açılış ekranı,açılış ekranı teması,açılış X-KDE-Keywords[uk]=splash screen,splash theme,startup,вікно,вітання,тема,запуск X-KDE-Keywords[x-test]=xxsplash screenxx,xxsplash themexx,xxstartupxx X-KDE-Keywords[zh_CN]=splash screen,splash theme,startup,飞溅屏幕,启动画面,启动画面主题,飞溅屏幕主题,启动 X-KDE-Keywords[zh_TW]=splash screen,splash theme,startup Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcms/ksplash/package/metadata.desktop b/kcms/ksplash/package/metadata.desktop index e21804d35..8f3d4e67a 100644 --- a/kcms/ksplash/package/metadata.desktop +++ b/kcms/ksplash/package/metadata.desktop @@ -1,81 +1,81 @@ [Desktop Entry] Name=Splash Screen Name[bs]=Čuvar ekrana Name[ca]=Pantalla de presentació Name[ca@valencia]=Pantalla de presentació Name[cs]=Úvodní obrazovka Name[da]=Splashskærm Name[de]=Startbildschirm Name[el]=Αρχική οθόνη Name[en_GB]=Splash Screen Name[es]=Pantalla de bienvenida Name[et]=Tiitelkuva Name[eu]=Plast pantaila Name[fi]=Tervetuloruutu Name[fr]=Écran de démarrage Name[gl]=Pantalla de benvida Name[he]=מסך פתיחה Name[hu]=Nyitóképernyő Name[id]=Layar Splash Name[is]=Upphafsskjár Name[it]=Schermata iniziale Name[ko]=시작 화면 Name[lt]=Pasveikinimo ekranas Name[nb]=Velkomstbilde Name[nds]=Startschirm Name[nl]=Opstartscherm Name[nn]=Velkomst­bilete Name[pa]=ਸਵਾਗਤੀ ਸਕਰੀਨ Name[pl]=Ekran powitalny Name[pt]=Ecrã Inicial Name[pt_BR]=Tela de apresentação Name[ru]=Заставка Name[se]=Álgošearbma Name[sk]=Úvodná obrazovka Name[sl]=Pozdravno okno Name[sr]=Уводни екран Name[sr@ijekavian]=Уводни екран Name[sr@ijekavianlatin]=Uvodni ekran Name[sr@latin]=Uvodni ekran Name[sv]=Startskärm Name[tr]=Açılış Ekranı Name[uk]=Вікно вітання Name[vi]=Màn hình chào mừng Name[x-test]=xxSplash Screenxx Name[zh_CN]=欢迎屏幕 Name[zh_TW]=啟動畫面 -Comment=Choose the splash screen theme +Comment=Choose splash screen theme Comment[ca]=Trieu el tema de la pantalla de presentació Comment[ca@valencia]=Trieu el tema de la pantalla de presentació Comment[de]=Startbildschirm-Design auswählen Comment[es]=Escoger el tema de la pantalla de bienvenida Comment[fi]=Valitse tervetuloruudun teema Comment[gl]=Escoller o tema da pantalla de benvida Comment[id]=Memilih tema layar splash Comment[it]=Scegli il tema della schermata iniziale Comment[nl]=Het opstartschermthema kiezen Comment[nn]=Vel tema for velkomstbilete Comment[pl]=Wybierz wygląd ekranu powitalnego Comment[pt]=Escolher o tema do ecrã inicial Comment[pt_BR]=Escolha o tema da tela de apresentação Comment[ru]=Выбор темы экрана-заставки Comment[sk]=Vybrať tému pre úvodnú obrazovku Comment[sv]=Välj startskärmstemat Comment[uk]=Вибір теми вікна вітання Плазми Comment[x-test]=xxChoose the splash screen themexx Comment[zh_CN]=选择欢迎屏幕主题 Comment[zh_TW]=選擇啟動畫面主題 Icon=preferences-system-splash Keywords= Type=Service X-KDE-ParentApp= X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Email=mart@kde.org X-KDE-PluginInfo-License=GPLv2 X-KDE-PluginInfo-Name=kcm_splashscreen X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://www.kde.org/plasma-desktop X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/lookandfeel/kcm.cpp b/kcms/lookandfeel/kcm.cpp index 788a8dcb4..13d76957a 100644 --- a/kcms/lookandfeel/kcm.cpp +++ b/kcms/lookandfeel/kcm.cpp @@ -1,833 +1,833 @@ /* This file is part of the KDE Project Copyright (c) 2014 Marco Martin Copyright (c) 2014 Vishesh Handa This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kcm.h" #include "../krdb/krdb.h" #include "../cursortheme/xcursor/xcursortheme.h" #include "config-kcm.h" #include "config-workspace.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_XFIXES # include #endif KCMLookandFeel::KCMLookandFeel(QObject* parent, const QVariantList& args) : KQuickAddons::ConfigModule(parent, args) , m_config(QStringLiteral("kdeglobals")) , m_configGroup(m_config.group("KDE")) , m_applyColors(true) , m_applyWidgetStyle(true) , m_applyIcons(true) , m_applyPlasmaTheme(true) , m_applyCursors(true) , m_applyWindowSwitcher(true) , m_applyDesktopSwitcher(true) , m_resetDefaultLayout(false) , m_applyWindowDecoration(true) { //This flag seems to be needed in order for QQuickWidget to work //see https://bugreports.qt-project.org/browse/QTBUG-40765 //also, it seems to work only if set in the kcm, not in the systemsettings' main qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); qmlRegisterType(); qmlRegisterType(); - KAboutData* about = new KAboutData(QStringLiteral("kcm_lookandfeel"), i18n("Choose the Look and Feel theme"), + KAboutData* about = new KAboutData(QStringLiteral("kcm_lookandfeel"), i18n("Look and Feel"), QStringLiteral("0.1"), QString(), KAboutLicense::LGPL); about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("mart@kde.org")); setAboutData(about); setButtons(Apply | Default); m_model = new QStandardItemModel(this); QHash roles = m_model->roleNames(); roles[PluginNameRole] = "pluginName"; roles[DescriptionRole] = "description"; roles[ScreenhotRole] = "screenshot"; roles[FullScreenPreviewRole] = "fullScreenPreview"; roles[HasSplashRole] = "hasSplash"; roles[HasLockScreenRole] = "hasLockScreen"; roles[HasRunCommandRole] = "hasRunCommand"; roles[HasLogoutRole] = "hasLogout"; roles[HasColorsRole] = "hasColors"; roles[HasWidgetStyleRole] = "hasWidgetStyle"; roles[HasIconsRole] = "hasIcons"; roles[HasPlasmaThemeRole] = "hasPlasmaTheme"; roles[HasCursorsRole] = "hasCursors"; roles[HasWindowSwitcherRole] = "hasWindowSwitcher"; roles[HasDesktopSwitcherRole] = "hasDesktopSwitcher"; m_model->setItemRoleNames(roles); loadModel(); } KCMLookandFeel::~KCMLookandFeel() { } void KCMLookandFeel::getNewStuff(QQuickItem *ctx) { if (!m_newStuffDialog) { m_newStuffDialog = new KNS3::DownloadDialog( QLatin1String("lookandfeel.knsrc") ); m_newStuffDialog.data()->setWindowTitle(i18n("Download New Look and Feel Themes")); m_newStuffDialog->setWindowModality(Qt::WindowModal); m_newStuffDialog->winId(); // so it creates the windowHandle(); connect(m_newStuffDialog.data(), &KNS3::DownloadDialog::accepted, this, &KCMLookandFeel::loadModel); } if (ctx && ctx->window()) { m_newStuffDialog->windowHandle()->setTransientParent(ctx->window()); } m_newStuffDialog.data()->show(); } QStandardItemModel *KCMLookandFeel::lookAndFeelModel() { return m_model; } QString KCMLookandFeel::selectedPlugin() const { return m_selectedPlugin; } void KCMLookandFeel::setSelectedPlugin(const QString &plugin) { if (m_selectedPlugin == plugin) { return; } const bool firstTime = m_selectedPlugin.isNull(); m_selectedPlugin = plugin; emit selectedPluginChanged(); emit selectedPluginIndexChanged(); if (!firstTime) { setNeedsSave(true); } } int KCMLookandFeel::selectedPluginIndex() const { for (int i = 0; i < m_model->rowCount(); ++i) { if (m_model->data(m_model->index(i, 0), PluginNameRole).toString() == m_selectedPlugin) { return i; } } return -1; } QList KCMLookandFeel::availablePackages(const QStringList &components) { QList packages; QStringList paths; const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); paths.reserve(dataPaths.count()); for (const QString &path : dataPaths) { QDir dir(path + QStringLiteral("/plasma/look-and-feel")); paths << dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot); } for (const QString &path : paths) { Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); pkg.setPath(path); pkg.setFallbackPackage(Plasma::Package()); if (components.isEmpty()) { packages << pkg; } else { for (const auto &component : components) { if (!pkg.filePath(component.toUtf8()).isEmpty()) { packages << pkg; break; } } } } return packages; } void KCMLookandFeel::loadModel() { m_model->clear(); const QList pkgs = availablePackages({"defaults", "layouts"}); for (const Plasma::Package &pkg : pkgs) { if (!pkg.metadata().isValid()) { continue; } QStandardItem* row = new QStandardItem(pkg.metadata().name()); row->setData(pkg.metadata().pluginName(), PluginNameRole); row->setData(pkg.metadata().comment(), DescriptionRole); row->setData(pkg.filePath("preview"), ScreenhotRole); row->setData(pkg.filePath("fullscreenpreview"), FullScreenPreviewRole); //What the package provides row->setData(!pkg.filePath("splashmainscript").isEmpty(), HasSplashRole); row->setData(!pkg.filePath("lockscreenmainscript").isEmpty(), HasLockScreenRole); row->setData(!pkg.filePath("runcommandmainscript").isEmpty(), HasRunCommandRole); row->setData(!pkg.filePath("logoutmainscript").isEmpty(), HasLogoutRole); if (!pkg.filePath("defaults").isEmpty()) { KSharedConfigPtr conf = KSharedConfig::openConfig(pkg.filePath("defaults")); KConfigGroup cg(conf, "kdeglobals"); cg = KConfigGroup(&cg, "General"); bool hasColors = !cg.readEntry("ColorScheme", QString()).isEmpty(); if (!hasColors) { hasColors = !pkg.filePath("colors").isEmpty(); } row->setData(hasColors, HasColorsRole); cg = KConfigGroup(&cg, "KDE"); row->setData(!cg.readEntry("widgetStyle", QString()).isEmpty(), HasWidgetStyleRole); cg = KConfigGroup(conf, "kdeglobals"); cg = KConfigGroup(&cg, "Icons"); row->setData(!cg.readEntry("Theme", QString()).isEmpty(), HasIconsRole); cg = KConfigGroup(conf, "kdeglobals"); cg = KConfigGroup(&cg, "Theme"); row->setData(!cg.readEntry("name", QString()).isEmpty(), HasPlasmaThemeRole); cg = KConfigGroup(conf, "kcminputrc"); cg = KConfigGroup(&cg, "Mouse"); row->setData(!cg.readEntry("cursorTheme", QString()).isEmpty(), HasCursorsRole); cg = KConfigGroup(conf, "kwinrc"); cg = KConfigGroup(&cg, "WindowSwitcher"); row->setData(!cg.readEntry("LayoutName", QString()).isEmpty(), HasWindowSwitcherRole); cg = KConfigGroup(conf, "kwinrc"); cg = KConfigGroup(&cg, "DesktopSwitcher"); row->setData(!cg.readEntry("LayoutName", QString()).isEmpty(), HasDesktopSwitcherRole); } m_model->appendRow(row); } m_model->sort(0 /*column*/); emit selectedPluginIndexChanged(); } void KCMLookandFeel::load() { m_package = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kdeglobals")), "KDE"); const QString packageName = cg.readEntry("LookAndFeelPackage", QString()); if (!packageName.isEmpty()) { m_package.setPath(packageName); } if (!m_package.metadata().isValid()) { return; } setSelectedPlugin(m_package.metadata().pluginName()); setNeedsSave(false); } void KCMLookandFeel::save() { Plasma::Package package = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); package.setPath(m_selectedPlugin); if (!package.isValid()) { return; } m_configGroup.writeEntry("LookAndFeelPackage", m_selectedPlugin); if (m_resetDefaultLayout) { QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.plasmashell"), QStringLiteral("/PlasmaShell"), QStringLiteral("org.kde.PlasmaShell"), QStringLiteral("loadLookAndFeelDefaultLayout")); QList args; args << m_selectedPlugin; message.setArguments(args); QDBusConnection::sessionBus().call(message, QDBus::NoBlock); } if (!package.filePath("defaults").isEmpty()) { KSharedConfigPtr conf = KSharedConfig::openConfig(package.filePath("defaults")); KConfigGroup cg(conf, "kdeglobals"); cg = KConfigGroup(&cg, "KDE"); if (m_applyWidgetStyle) { setWidgetStyle(cg.readEntry("widgetStyle", QString())); } if (m_applyColors) { QString colorsFile = package.filePath("colors"); KConfigGroup cg(conf, "kdeglobals"); cg = KConfigGroup(&cg, "General"); QString colorScheme = cg.readEntry("ColorScheme", QString()); if (!colorsFile.isEmpty()) { if (!colorScheme.isEmpty()) { setColors(colorScheme, colorsFile); } else { setColors(package.metadata().name(), colorsFile); } } else if (!colorScheme.isEmpty()) { colorScheme.remove(QLatin1Char('\'')); // So Foo's does not become FooS QRegExp fixer(QStringLiteral("[\\W,.-]+(.?)")); int offset; while ((offset = fixer.indexIn(colorScheme)) >= 0) { colorScheme.replace(offset, fixer.matchedLength(), fixer.cap(1).toUpper()); } colorScheme.replace(0, 1, colorScheme.at(0).toUpper()); //NOTE: why this loop trough all the scheme files? //the scheme theme name is an heuristic, there is no plugin metadata whatsoever. //is based on the file name stripped from weird characters or the //eventual id- prefix store.kde.org puts, so we can just find a //theme that ends as the specified name bool schemeFound = false; const QStringList schemeDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes"), QStandardPaths::LocateDirectory); for (const QString &dir : schemeDirs) { const QStringList fileNames = QDir(dir).entryList(QStringList()<emitChange(KGlobalSettings::StyleChanged); } void KCMLookandFeel::setColors(const QString &scheme, const QString &colorFile) { if (scheme.isEmpty() && colorFile.isEmpty()) { return; } KSharedConfigPtr conf = KSharedConfig::openConfig(colorFile, KSharedConfig::CascadeConfig); foreach (const QString &grp, conf->groupList()) { KConfigGroup cg(conf, grp); KConfigGroup cg2(&m_config, grp); cg.copyTo(&cg2); } KConfigGroup configGroup(&m_config, "General"); configGroup.writeEntry("ColorScheme", scheme); configGroup.sync(); KGlobalSettings::self()->emitChange(KGlobalSettings::PaletteChanged); } void KCMLookandFeel::setIcons(const QString &theme) { if (theme.isEmpty()) { return; } KConfigGroup cg(&m_config, "Icons"); cg.writeEntry("Theme", theme); cg.sync(); for (int i=0; i < KIconLoader::LastGroup; i++) { KIconLoader::emitChange(KIconLoader::Group(i)); } } void KCMLookandFeel::setPlasmaTheme(const QString &theme) { if (theme.isEmpty()) { return; } KConfig config(QStringLiteral("plasmarc")); KConfigGroup cg(&config, "Theme"); cg.writeEntry("name", theme); cg.sync(); } void KCMLookandFeel::setCursorTheme(const QString themeName) { //TODO: use pieces of cursor kcm when moved to plasma-desktop if (themeName.isEmpty()) { return; } KConfig config(QStringLiteral("kcminputrc")); KConfigGroup cg(&config, "Mouse"); cg.writeEntry("cursorTheme", themeName); cg.sync(); // Require the Xcursor version that shipped with X11R6.9 or greater, since // in previous versions the Xfixes code wasn't enabled due to a bug in the // build system (freedesktop bug #975). #if HAVE_XFIXES && XFIXES_MAJOR >= 2 && XCURSOR_LIB_VERSION >= 10105 const int cursorSize = cg.readEntry("cursorSize", 0); QDir themeDir = cursorThemeDir(themeName, 0); if (!themeDir.exists()) { return; } XCursorTheme theme(themeDir); if (!CursorTheme::haveXfixes()) { return; } // Set up the proper launch environment for newly started apps OrgKdeKLauncherInterface klauncher(QStringLiteral("org.kde.klauncher5"), QStringLiteral("/KLauncher"), QDBusConnection::sessionBus()); klauncher.setLaunchEnv(QStringLiteral("XCURSOR_THEME"), themeName); // Update the Xcursor X resources runRdb(0); // Notify all applications that the cursor theme has changed KGlobalSettings::self()->emitChange(KGlobalSettings::CursorChanged); // Reload the standard cursors QStringList names; // Qt cursors names << QStringLiteral("left_ptr") << QStringLiteral("up_arrow") << QStringLiteral("cross") << QStringLiteral("wait") << QStringLiteral("left_ptr_watch") << QStringLiteral("ibeam") << QStringLiteral("size_ver") << QStringLiteral("size_hor") << QStringLiteral("size_bdiag") << QStringLiteral("size_fdiag") << QStringLiteral("size_all") << QStringLiteral("split_v") << QStringLiteral("split_h") << QStringLiteral("pointing_hand") << QStringLiteral("openhand") << QStringLiteral("closedhand") << QStringLiteral("forbidden") << QStringLiteral("whats_this") << QStringLiteral("copy") << QStringLiteral("move") << QStringLiteral("link"); // X core cursors names << QStringLiteral("X_cursor") << QStringLiteral("right_ptr") << QStringLiteral("hand1") << QStringLiteral("hand2") << QStringLiteral("watch") << QStringLiteral("xterm") << QStringLiteral("crosshair") << QStringLiteral("left_ptr_watch") << QStringLiteral("center_ptr") << QStringLiteral("sb_h_double_arrow") << QStringLiteral("sb_v_double_arrow") << QStringLiteral("fleur") << QStringLiteral("top_left_corner") << QStringLiteral("top_side") << QStringLiteral("top_right_corner") << QStringLiteral("right_side") << QStringLiteral("bottom_right_corner") << QStringLiteral("bottom_side") << QStringLiteral("bottom_left_corner") << QStringLiteral("left_side") << QStringLiteral("question_arrow") << QStringLiteral("pirate"); foreach (const QString &name, names) { XFixesChangeCursorByName(QX11Info::display(), theme.loadCursor(name, cursorSize), QFile::encodeName(name)); } #else KMessageBox::information(this, i18n("You have to restart the Plasma session for these changes to take effect."), i18n("Cursor Settings Changed"), "CursorSettingsChanged"); #endif } QDir KCMLookandFeel::cursorThemeDir(const QString &theme, const int depth) { // Prevent infinite recursion if (depth > 10) { return QDir(); } // Search each icon theme directory for 'theme' foreach (const QString &baseDir, cursorSearchPaths()) { QDir dir(baseDir); if (!dir.exists() || !dir.cd(theme)) { continue; } // If there's a cursors subdir, we'll assume this is a cursor theme if (dir.exists(QStringLiteral("cursors"))) { return dir; } // If the theme doesn't have an index.theme file, it can't inherit any themes. if (!dir.exists(QStringLiteral("index.theme"))) { continue; } // Open the index.theme file, so we can get the list of inherited themes KConfig config(dir.path() + QStringLiteral("/index.theme"), KConfig::NoGlobals); KConfigGroup cg(&config, "Icon Theme"); // Recurse through the list of inherited themes, to check if one of them // is a cursor theme. QStringList inherits = cg.readEntry("Inherits", QStringList()); foreach (const QString &inherit, inherits) { // Avoid possible DoS if (inherit == theme) { continue; } if (cursorThemeDir(inherit, depth + 1).exists()) { return dir; } } } return QDir(); } const QStringList KCMLookandFeel::cursorSearchPaths() { if (!m_cursorSearchPaths.isEmpty()) return m_cursorSearchPaths; #if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR < 1 // These are the default paths Xcursor will scan for cursor themes QString path("~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons"); // If XCURSOR_PATH is set, use that instead of the default path char *xcursorPath = std::getenv("XCURSOR_PATH"); if (xcursorPath) path = xcursorPath; #else // Get the search path from Xcursor QString path = XcursorLibraryPath(); #endif // Separate the paths m_cursorSearchPaths = path.split(QLatin1Char(':'), QString::SkipEmptyParts); // Remove duplicates QMutableStringListIterator i(m_cursorSearchPaths); while (i.hasNext()) { const QString path = i.next(); QMutableStringListIterator j(i); while (j.hasNext()) if (j.next() == path) j.remove(); } // Expand all occurrences of ~/ to the home dir m_cursorSearchPaths.replaceInStrings(QRegExp(QStringLiteral("^~\\/")), QDir::home().path() + QLatin1Char('/')); return m_cursorSearchPaths; } void KCMLookandFeel::setSplashScreen(const QString &theme) { if (theme.isEmpty()) { return; } KConfig config(QStringLiteral("ksplashrc")); KConfigGroup cg(&config, "KSplash"); cg.writeEntry("Theme", theme); //TODO: a way to set none as spash in the l&f cg.writeEntry("Engine", "KSplashQML"); cg.sync(); } void KCMLookandFeel::setLockScreen(const QString &theme) { if (theme.isEmpty()) { return; } KConfig config(QStringLiteral("kscreenlockerrc")); KConfigGroup cg(&config, "Greeter"); cg.writeEntry("Theme", theme); cg.sync(); } void KCMLookandFeel::setWindowSwitcher(const QString &theme) { if (theme.isEmpty()) { return; } KConfig config(QStringLiteral("kwinrc")); KConfigGroup cg(&config, "TabBox"); cg.writeEntry("LayoutName", theme); cg.sync(); } void KCMLookandFeel::setDesktopSwitcher(const QString &theme) { if (theme.isEmpty()) { return; } KConfig config(QStringLiteral("kwinrc")); KConfigGroup cg(&config, "TabBox"); cg.writeEntry("DesktopLayout", theme); cg.writeEntry("DesktopListLayout", theme); cg.sync(); } void KCMLookandFeel::setWindowDecoration(const QString &library, const QString &theme) { if (library.isEmpty()) { return; } KConfig config(QStringLiteral("kwinrc")); KConfigGroup cg(&config, "org.kde.kdecoration2"); cg.writeEntry("library", library); cg.writeEntry("theme", theme); cg.sync(); // Reload KWin. QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("reloadConfig")); QDBusConnection::sessionBus().send(message); } void KCMLookandFeel::setApplyColors(bool apply) { if (m_applyColors == apply) { return; } m_applyColors = apply; emit applyColorsChanged(); } bool KCMLookandFeel::applyColors() const { return m_applyColors; } void KCMLookandFeel::setApplyWidgetStyle(bool apply) { if (m_applyWidgetStyle == apply) { return; } m_applyWidgetStyle = apply; emit applyWidgetStyleChanged(); } bool KCMLookandFeel::applyWidgetStyle() const { return m_applyWidgetStyle; } void KCMLookandFeel::setApplyIcons(bool apply) { if (m_applyIcons == apply) { return; } m_applyIcons = apply; emit applyIconsChanged(); } bool KCMLookandFeel::applyIcons() const { return m_applyIcons; } void KCMLookandFeel::setApplyPlasmaTheme(bool apply) { if (m_applyPlasmaTheme == apply) { return; } m_applyPlasmaTheme = apply; emit applyPlasmaThemeChanged(); } bool KCMLookandFeel::applyPlasmaTheme() const { return m_applyPlasmaTheme; } void KCMLookandFeel::setApplyWindowSwitcher(bool apply) { if (m_applyWindowSwitcher == apply) { return; } m_applyWindowSwitcher = apply; emit applyWindowSwitcherChanged(); } bool KCMLookandFeel::applyWindowSwitcher() const { return m_applyWindowSwitcher; } void KCMLookandFeel::setApplyDesktopSwitcher(bool apply) { if (m_applyDesktopSwitcher == apply) { return; } m_applyDesktopSwitcher = apply; emit applyDesktopSwitcherChanged(); } bool KCMLookandFeel::applyDesktopSwitcher() const { return m_applyDesktopSwitcher; } void KCMLookandFeel::setResetDefaultLayout(bool reset) { if (m_resetDefaultLayout == reset) { return; } m_resetDefaultLayout = reset; emit resetDefaultLayoutChanged(); if (reset) { setNeedsSave(true); } } bool KCMLookandFeel::resetDefaultLayout() const { return m_resetDefaultLayout; } diff --git a/kcms/lookandfeel/kcm_lookandfeel.desktop b/kcms/lookandfeel/kcm_lookandfeel.desktop index 6864cb5dd..62a8058ff 100644 --- a/kcms/lookandfeel/kcm_lookandfeel.desktop +++ b/kcms/lookandfeel/kcm_lookandfeel.desktop @@ -1,114 +1,114 @@ [Desktop Entry] Icon=preferences-desktop-theme-global Exec=kcmshell5 kcm_lookandfeel Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_lookandfeel X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=workspacetheme X-KDE-Weight=1 Name=Look and Feel Name[ca]=Aspecte i comportament Name[ca@valencia]=Aspecte i comportament Name[cs]=Vzhled a dojem Name[da]=Udseende og fremtoning Name[de]=Erscheinungsbild Name[el]=Εμφάνιση και αίσθηση Name[en_GB]=Look and Feel Name[es]=Aspecto visual Name[eu]=Itxura eta izaera Name[fi]=Ulkoasu ja tuntuma Name[fr]=Apparence Name[gl]=Aparencia e comportamento Name[he]=מראה ותחושה Name[hu]=Megjelenés Name[id]=Nuansa Dan Suasana Name[it]=Aspetto Name[ko]=모습과 느낌 Name[lt]=Išvaizda ir turinys Name[nb]=Utseende og oppførsel Name[nl]=Uiterlijk en gedrag Name[nn]=Utsjånad og åtferd Name[pa]=ਦਿੱਖ ਅਤੇ ਛੋਹ Name[pl]=Wrażenia wzrokowe i dotykowe Name[pt]=Aparência e Comportamento Name[pt_BR]=Aparência Name[ru]=Оформления рабочей среды Name[sk]=Vzhľad a nastavenie Name[sl]=Videz in občutek Name[sr]=Изглед и осећај Name[sr@ijekavian]=Изглед и осећај Name[sr@ijekavianlatin]=Izgled i osećaj Name[sr@latin]=Izgled i osećaj Name[sv]=Utseende och känsla Name[tr]=Bak ve Hisset Name[uk]=Вигляд і поведінка Name[x-test]=xxLook and Feelxx Name[zh_CN]=观感 Name[zh_TW]=外觀與感覺 -Comment=Choose the Look and Feel theme +Comment=Choose Look and Feel theme Comment[ca]=Trieu el tema d'aspecte i comportament Comment[ca@valencia]=Trieu el tema d'aspecte i comportament Comment[de]=Erscheinungsbild-Design auswählen Comment[es]=Escoger el tema del aspecto visual... Comment[fi]=Valitse ulkoasuteema Comment[gl]=Escolla un tema de aparencia e comportamento Comment[id]=Memilih tema Nuansa dan Suasana Comment[it]=Scegli il tema dell'aspetto Comment[nl]=Thema voor uiterlijk en gedrag kiezen Comment[nn]=Vel tema for utsjånad og åtferd Comment[pl]=Wybierz jak będą wyglądać wrażenia wzrokowe i dotykowe Comment[pt]=Escolher o tema de Aparência e Comportamento Comment[pt_BR]=Escolha o tema de aparência Comment[ru]=Выбор оформления рабочей среды Plasma Comment[sk]=Vybrať tému pre vzhľad Comment[sv]=Välj tema med utseende och känsla Comment[uk]=Вибір теми вигляду і поведінки Comment[x-test]=xxChoose the Look and Feel themexx Comment[zh_CN]=选择观感主题 Comment[zh_TW]=選擇「外觀與感覺」的主題 X-KDE-Keywords=theme, look, feel X-KDE-Keywords[bs]=tema,pogledaj,osjeti X-KDE-Keywords[ca]=tema, aspecte, comportament X-KDE-Keywords[ca@valencia]=tema, aspecte, comportament X-KDE-Keywords[cs]=motiv,vzhled,chování X-KDE-Keywords[da]=tema, udseende, fremtoning, look, feel X-KDE-Keywords[de]=Design,Erscheinungsbild X-KDE-Keywords[el]=θέμα, εμφάνιση, αίσθηση X-KDE-Keywords[en_GB]=theme, look, feel X-KDE-Keywords[es]=tema, aspecto visual X-KDE-Keywords[et]=teema, välimus X-KDE-Keywords[eu]=gaia,itxura,izaera X-KDE-Keywords[fi]=teema, ulkoasu, tuntuma X-KDE-Keywords[fr]=thème, apparence, comportement, graphique X-KDE-Keywords[gl]=tema, aparencia, estilo, comportamento X-KDE-Keywords[hu]=téma, megjelenés X-KDE-Keywords[id]=tema, nuansa, suasana X-KDE-Keywords[it]=tema,aspetto X-KDE-Keywords[ko]=theme, look, feel,테마, 모습과 느낌,외형,외관 X-KDE-Keywords[nb]=tema, utseende, oppførsel X-KDE-Keywords[nds]=Muster, Utsehn, Bedenen X-KDE-Keywords[nl]=thema, uiterlijk, gedrag X-KDE-Keywords[nn]=tema, utsjånad, åtferd X-KDE-Keywords[pa]=ਥੀਮ, ਦਿੱਖ, ਰਵੱਈਆ X-KDE-Keywords[pl]=wystrój, wygląd, odczucia, wrażenia X-KDE-Keywords[pt]=tema, aparência, comportamento X-KDE-Keywords[pt_BR]=tema, visual, aparência X-KDE-Keywords[ru]=theme,look,feel,тема,внешний вид рабочей среды,ощущение,стиль виджетов X-KDE-Keywords[sk]=téma, vzhľad, nastavenie X-KDE-Keywords[sl]=tema, videz, občutek X-KDE-Keywords[sr]=theme,look,feel,тема,изглед,осећај X-KDE-Keywords[sr@ijekavian]=theme,look,feel,тема,изглед,осећај X-KDE-Keywords[sr@ijekavianlatin]=theme,look,feel,tema,izgled,osećaj X-KDE-Keywords[sr@latin]=theme,look,feel,tema,izgled,osećaj X-KDE-Keywords[sv]=tema, utseende, känsla X-KDE-Keywords[tr]=tema, görünüm, duyum X-KDE-Keywords[uk]=theme,look,feel,тема,вигляд,поведінка X-KDE-Keywords[x-test]=xxthemexx,xx lookxx,xx feelxx X-KDE-Keywords[zh_CN]=theme, look, feel, 主题, 观感 X-KDE-Keywords[zh_TW]=theme, look, feel Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcms/lookandfeel/package/metadata.desktop b/kcms/lookandfeel/package/metadata.desktop index dd5ace609..17de7c48a 100644 --- a/kcms/lookandfeel/package/metadata.desktop +++ b/kcms/lookandfeel/package/metadata.desktop @@ -1,75 +1,75 @@ [Desktop Entry] Name=Look and Feel Name[ca]=Aspecte i comportament Name[ca@valencia]=Aspecte i comportament Name[cs]=Vzhled a dojem Name[da]=Udseende og fremtoning Name[de]=Erscheinungsbild Name[el]=Εμφάνιση και αίσθηση Name[en_GB]=Look and Feel Name[es]=Aspecto visual Name[eu]=Itxura eta izaera Name[fi]=Ulkoasu ja tuntuma Name[fr]=Apparence Name[gl]=Aparencia e comportamento Name[he]=מראה ותחושה Name[hu]=Megjelenés Name[id]=Nuansa Dan Suasana Name[it]=Aspetto Name[ko]=모습과 느낌 Name[lt]=Išvaizda ir turinys Name[nb]=Utseende og oppførsel Name[nl]=Uiterlijk en gedrag Name[nn]=Utsjånad og åtferd Name[pa]=ਦਿੱਖ ਅਤੇ ਛੋਹ Name[pl]=Wrażenia wzrokowe i dotykowe Name[pt]=Aparência e Comportamento Name[pt_BR]=Aparência Name[ru]=Оформления рабочей среды Name[sk]=Vzhľad a nastavenie Name[sl]=Videz in občutek Name[sr]=Изглед и осећај Name[sr@ijekavian]=Изглед и осећај Name[sr@ijekavianlatin]=Izgled i osećaj Name[sr@latin]=Izgled i osećaj Name[sv]=Utseende och känsla Name[tr]=Bak ve Hisset Name[uk]=Вигляд і поведінка Name[x-test]=xxLook and Feelxx Name[zh_CN]=观感 Name[zh_TW]=外觀與感覺 -Comment=Choose the Look and Feel theme +Comment=Choose Look and Feel theme Comment[ca]=Trieu el tema d'aspecte i comportament Comment[ca@valencia]=Trieu el tema d'aspecte i comportament Comment[de]=Erscheinungsbild-Design auswählen Comment[es]=Escoger el tema del aspecto visual... Comment[fi]=Valitse ulkoasuteema Comment[gl]=Escolla un tema de aparencia e comportamento Comment[id]=Memilih tema Nuansa dan Suasana Comment[it]=Scegli il tema dell'aspetto Comment[nl]=Thema voor uiterlijk en gedrag kiezen Comment[nn]=Vel tema for utsjånad og åtferd Comment[pl]=Wybierz jak będą wyglądać wrażenia wzrokowe i dotykowe Comment[pt]=Escolher o tema de Aparência e Comportamento Comment[pt_BR]=Escolha o tema de aparência Comment[ru]=Выбор оформления рабочей среды Plasma Comment[sk]=Vybrať tému pre vzhľad Comment[sv]=Välj tema med utseende och känsla Comment[uk]=Вибір теми вигляду і поведінки Comment[x-test]=xxChoose the Look and Feel themexx Comment[zh_CN]=选择观感主题 Comment[zh_TW]=選擇「外觀與感覺」的主題 Icon=preferences-desktop-theme-style Keywords= Type=Service X-KDE-ParentApp= X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Email=mart@kde.org X-KDE-PluginInfo-License=GPLv2 X-KDE-PluginInfo-Name=kcm_lookandfeel X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website=https://www.kde.org/plasma-desktop X-KDE-ServiceTypes=Plasma/Generic X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml diff --git a/kcms/style/kcmstyle.cpp b/kcms/style/kcmstyle.cpp index 518af5509..8423fbd78 100644 --- a/kcms/style/kcmstyle.cpp +++ b/kcms/style/kcmstyle.cpp @@ -1,753 +1,753 @@ /* * KCMStyle * Copyright (C) 2002 Karol Szwed * Copyright (C) 2002 Daniel Molkentin * Copyright (C) 2007 Urs Wolfer * Copyright (C) 2009 by Davide Bettio * Portions Copyright (C) 2007 Paolo Capriotti * Portions Copyright (C) 2007 Ivan Cukic * Portions Copyright (C) 2008 by Petri Damsten * Portions Copyright (C) 2000 TrollTech AS. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "kcmstyle.h" #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) #include #endif #include "styleconfdialog.h" #include "ui_stylepreview.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) #include #endif #include "../krdb/krdb.h" #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) #include #endif // X11 namespace cleanup #undef Bool #undef Below #undef KeyPress #undef KeyRelease /**** DLL Interface for kcontrol ****/ #include #include #include K_PLUGIN_FACTORY(KCMStyleFactory, registerPlugin();) K_EXPORT_PLUGIN(KCMStyleFactory("kcmstyle")) extern "C" { Q_DECL_EXPORT void kcminit_style() { uint flags = KRdbExportQtSettings | KRdbExportQtColors | KRdbExportXftSettings | KRdbExportGtkTheme; KConfig _config( QStringLiteral("kcmdisplayrc"), KConfig::NoGlobals ); KConfigGroup config(&_config, "X11"); // This key is written by the "colors" module. bool exportKDEColors = config.readEntry("exportKDEColors", true); if (exportKDEColors) flags |= KRdbExportColors; runRdb( flags ); } } class StylePreview : public QWidget, public Ui::StylePreview { public: StylePreview(QWidget *parent = nullptr) : QWidget(parent) { setupUi(this); // Ensure that the user can't toy with the child widgets. // Method borrowed from Qt's qtconfig. QList widgets = findChildren(); foreach (QWidget* widget, widgets) { widget->installEventFilter(this); widget->setFocusPolicy(Qt::NoFocus); } } bool eventFilter( QObject* /* obj */, QEvent* ev ) override { switch( ev->type() ) { case QEvent::MouseButtonPress: case QEvent::MouseButtonRelease: case QEvent::MouseButtonDblClick: case QEvent::MouseMove: case QEvent::KeyPress: case QEvent::KeyRelease: case QEvent::Enter: case QEvent::Leave: case QEvent::Wheel: case QEvent::ContextMenu: return true; // ignore default: break; } return false; } }; QString KCMStyle::defaultStyle() { #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) return QStringLiteral("breeze"); #else return QString(); // native style #endif } KCMStyle::KCMStyle( QWidget* parent, const QVariantList& ) : KCModule( parent ), appliedStyle(nullptr) { setQuickHelp( i18n("

Style

" "This module allows you to modify the visual appearance " "of user interface elements, such as the widget style " "and effects.")); m_bStyleDirty= false; m_bEffectsDirty = false; KGlobal::dirs()->addResourceType("themes", "data", "kstyle/themes"); KAboutData *about = - new KAboutData( QStringLiteral("kcmstyle"), i18n("KDE Style Module"), QStringLiteral("1.0"), + new KAboutData( QStringLiteral("kcmstyle"), i18n("Widget Style"), QStringLiteral("1.0"), QString(), KAboutLicense::GPL, i18n("(c) 2002 Karol Szwed, Daniel Molkentin")); about->addAuthor(i18n("Karol Szwed"), QString(), QStringLiteral("gallium@kde.org")); about->addAuthor(i18n("Daniel Molkentin"), QString(), QStringLiteral("molkentin@kde.org")); setAboutData( about ); // Setup pages and mainLayout mainLayout = new QVBoxLayout( this ); mainLayout->setMargin(0); tabWidget = new QTabWidget( this ); mainLayout->addWidget( tabWidget ); // Add Page1 (Applications Style) // ----------------- //gbWidgetStyle = new QGroupBox( i18n("Widget Style"), page1 ); page1 = new QWidget; page1Layout = new QVBoxLayout( page1 ); QWidget* gbWidgetStyle = new QWidget( page1 ); QVBoxLayout *widgetLayout = new QVBoxLayout(gbWidgetStyle); gbWidgetStyleLayout = new QVBoxLayout; widgetLayout->addLayout( gbWidgetStyleLayout ); gbWidgetStyleLayout->setAlignment( Qt::AlignTop ); hbLayout = new QHBoxLayout( ); hbLayout->setObjectName( QStringLiteral("hbLayout") ); QLabel* label=new QLabel(i18n("Widget style:"),this); hbLayout->addWidget( label ); cbStyle = new KComboBox( gbWidgetStyle ); cbStyle->setObjectName( QStringLiteral("cbStyle") ); cbStyle->setEditable( false ); hbLayout->addWidget( cbStyle ); hbLayout->setStretchFactor( cbStyle, 1 ); label->setBuddy(cbStyle); pbConfigStyle = new QPushButton( QIcon::fromTheme(QStringLiteral("configure")), i18n("Con&figure..."), gbWidgetStyle ); pbConfigStyle->setEnabled( false ); hbLayout->addWidget( pbConfigStyle ); gbWidgetStyleLayout->addLayout( hbLayout ); lblStyleDesc = new QLabel( gbWidgetStyle ); gbWidgetStyleLayout->addWidget( lblStyleDesc ); QGroupBox *gbPreview = new QGroupBox( i18n( "Preview" ), page1 ); QVBoxLayout *previewLayout = new QVBoxLayout(gbPreview); previewLayout->setMargin( 0 ); stylePreview = new StylePreview( gbPreview ); gbPreview->layout()->addWidget( stylePreview ); page1Layout->addWidget( gbWidgetStyle ); page1Layout->addWidget( gbPreview ); page1Layout->addStretch(); connect( cbStyle, SIGNAL(activated(int)), this, SLOT(styleChanged()) ); connect( cbStyle, SIGNAL(activated(int)), this, SLOT(updateConfigButton())); connect( pbConfigStyle, &QAbstractButton::clicked, this, &KCMStyle::styleSpecificConfig); // Add Page2 (Effects) // ------------------- page2 = new QWidget; fineTuningUi.setupUi(page2); connect(cbStyle, SIGNAL(activated(int)), this, SLOT(setStyleDirty())); connect(fineTuningUi.cbIconsOnButtons, &QAbstractButton::toggled, this, &KCMStyle::setEffectsDirty); connect(fineTuningUi.cbIconsInMenus, &QAbstractButton::toggled, this, &KCMStyle::setEffectsDirty); connect(fineTuningUi.comboToolbarIcons, SIGNAL(activated(int)), this, SLOT(setEffectsDirty())); connect(fineTuningUi.comboSecondaryToolbarIcons, SIGNAL(activated(int)), this, SLOT(setEffectsDirty())); addWhatsThis(); // Insert the pages into the tabWidget tabWidget->addTab(page1, i18nc("@title:tab", "&Applications")); tabWidget->addTab(page2, i18nc("@title:tab", "&Fine Tuning")); } KCMStyle::~KCMStyle() { qDeleteAll(styleEntries); delete appliedStyle; } void KCMStyle::updateConfigButton() { if (!styleEntries[currentStyle()] || styleEntries[currentStyle()]->configPage.isEmpty()) { pbConfigStyle->setEnabled(false); return; } // We don't check whether it's loadable here - // lets us report an error and not waste time // loading things if the user doesn't click the button pbConfigStyle->setEnabled( true ); } void KCMStyle::styleSpecificConfig() { QString libname = styleEntries[currentStyle()]->configPage; KLibrary library(libname); if (!library.load()) { KMessageBox::detailedError(this, i18n("There was an error loading the configuration dialog for this style."), library.errorString(), i18n("Unable to Load Dialog")); return; } KLibrary::void_function_ptr allocPtr = library.resolveFunction("allocate_kstyle_config"); if (!allocPtr) { KMessageBox::detailedError(this, i18n("There was an error loading the configuration dialog for this style."), library.errorString(), i18n("Unable to Load Dialog")); return; } //Create the container dialog StyleConfigDialog* dial = new StyleConfigDialog(this, styleEntries[currentStyle()]->name); typedef QWidget*(* factoryRoutine)( QWidget* parent ); //Get the factory, and make the widget. factoryRoutine factory = (factoryRoutine)(allocPtr); //Grmbl. So here I am on my //"never use C casts" moralizing streak, and I find that one can't go void* -> function ptr //even with a reinterpret_cast. QWidget* pluginConfig = factory( dial ); //Insert it in... dial->setMainWidget( pluginConfig ); //..and connect it to the wrapper connect(pluginConfig, SIGNAL(changed(bool)), dial, SLOT(setDirty(bool))); connect(dial, SIGNAL(defaults()), pluginConfig, SLOT(defaults())); connect(dial, SIGNAL(save()), pluginConfig, SLOT(save())); if (dial->exec() == QDialog::Accepted && dial->isDirty() ) { // Force re-rendering of the preview, to apply settings switchStyle(currentStyle(), true); //For now, ask all KDE apps to recreate their styles to apply the setitngs KGlobalSettings::self()->emitChange(KGlobalSettings::StyleChanged); // We call setStyleDirty here to make sure we force style re-creation setStyleDirty(); } delete dial; } void KCMStyle::changeEvent( QEvent *event ) { KCModule::changeEvent( event ); if ( event->type() == QEvent::PaletteChange ) { // Force re-rendering of the preview, to apply new palette switchStyle(currentStyle(), true); } } void KCMStyle::load() { KConfig config( QStringLiteral("kdeglobals"), KConfig::FullConfig ); loadStyle( config ); loadEffects( config ); m_bStyleDirty= false; m_bEffectsDirty = false; //Enable/disable the button for the initial style updateConfigButton(); emit changed( false ); } void KCMStyle::save() { // Don't do anything if we don't need to. if ( !(m_bStyleDirty | m_bEffectsDirty ) ) return; // Save effects. KConfig _config(QStringLiteral("kdeglobals"), KConfig::NoGlobals); KConfigGroup config(&_config, "KDE"); // Effects page config.writeEntry( "ShowIconsOnPushButtons", fineTuningUi.cbIconsOnButtons->isChecked()); config.writeEntry( "ShowIconsInMenuItems", fineTuningUi.cbIconsInMenus->isChecked()); config.writeEntry("widgetStyle", currentStyle()); KConfigGroup toolbarStyleGroup(&_config, "Toolbar style"); toolbarStyleGroup.writeEntry("ToolButtonStyle", toolbarButtonText(fineTuningUi.comboToolbarIcons->currentIndex())); toolbarStyleGroup.writeEntry("ToolButtonStyleOtherToolbars", toolbarButtonText(fineTuningUi.comboSecondaryToolbarIcons->currentIndex())); _config.sync(); // Export the changes we made to qtrc, and update all qt-only // applications on the fly, ensuring that we still follow the user's // export fonts/colors settings. if (m_bStyleDirty || m_bEffectsDirty) // Export only if necessary { uint flags = KRdbExportQtSettings | KRdbExportGtkTheme; KConfig _kconfig( QStringLiteral("kcmdisplayrc"), KConfig::NoGlobals ); KConfigGroup kconfig(&_kconfig, "X11"); bool exportKDEColors = kconfig.readEntry("exportKDEColors", true); if (exportKDEColors) flags |= KRdbExportColors; runRdb( flags ); } // Now allow KDE apps to reconfigure themselves. if ( m_bStyleDirty ) KGlobalSettings::self()->emitChange(KGlobalSettings::StyleChanged); if ( m_bEffectsDirty ) { KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged, KGlobalSettings::SETTINGS_STYLE); // ##### FIXME - Doesn't apply all settings correctly due to bugs in // KApplication/KToolbar KGlobalSettings::self()->emitChange(KGlobalSettings::ToolbarStyleChanged); #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) // Send signal to all kwin instances QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("reloadConfig")); QDBusConnection::sessionBus().send(message); #endif } // Clean up m_bStyleDirty = false; m_bEffectsDirty = false; emit changed( false ); } bool KCMStyle::findStyle( const QString& str, int& combobox_item ) { StyleEntry* se = styleEntries[str.toLower()]; QString name = se ? se->name : str; combobox_item = 0; //look up name for( int i = 0; i < cbStyle->count(); i++ ) { if ( cbStyle->itemText(i) == name ) { combobox_item = i; return true; } } return false; } void KCMStyle::defaults() { // Select default style int item = 0; bool found; found = findStyle( defaultStyle(), item ); if (!found) found = findStyle( QStringLiteral("oxygen"), item ); if (!found) found = findStyle( QStringLiteral("plastique"), item ); if (!found) found = findStyle( QStringLiteral("windows"), item ); if (!found) found = findStyle( QStringLiteral("platinum"), item ); if (!found) found = findStyle( QStringLiteral("motif"), item ); cbStyle->setCurrentIndex( item ); m_bStyleDirty = true; switchStyle( currentStyle() ); // make resets visible // Effects fineTuningUi.comboToolbarIcons->setCurrentIndex(toolbarButtonIndex(QStringLiteral("TextBesideIcon"))); fineTuningUi.comboSecondaryToolbarIcons->setCurrentIndex(toolbarButtonIndex(QStringLiteral("TextBesideIcon"))); fineTuningUi.cbIconsOnButtons->setChecked(true); fineTuningUi.cbIconsInMenus->setChecked(true); emit changed(true); } void KCMStyle::setEffectsDirty() { m_bEffectsDirty = true; emit changed(true); } void KCMStyle::setStyleDirty() { m_bStyleDirty = true; emit changed(true); } // ---------------------------------------------------------------- // All the Style Switching / Preview stuff // ---------------------------------------------------------------- void KCMStyle::loadStyle( KConfig& config ) { cbStyle->clear(); // Create a dictionary of WidgetStyle to Name and Desc. mappings, // as well as the config page info qDeleteAll(styleEntries); styleEntries.clear(); QString strWidgetStyle; QStringList list = KGlobal::dirs()->findAllResources("themes", QStringLiteral("*.themerc"), KStandardDirs::Recursive | KStandardDirs::NoDuplicates); for (QStringList::iterator it = list.begin(); it != list.end(); ++it) { KConfig config( *it, KConfig::SimpleConfig); if ( !(config.hasGroup("KDE") && config.hasGroup("Misc")) ) continue; KConfigGroup configGroup = config.group("KDE"); strWidgetStyle = configGroup.readEntry("WidgetStyle"); if (strWidgetStyle.isNull()) continue; // We have a widgetstyle, so lets read the i18n entries for it... StyleEntry* entry = new StyleEntry; configGroup = config.group("Misc"); entry->name = configGroup.readEntry("Name"); entry->desc = configGroup.readEntry("Comment", i18n("No description available.")); entry->configPage = configGroup.readEntry("ConfigPage", QString()); // Check if this style should be shown configGroup = config.group("Desktop Entry"); entry->hidden = configGroup.readEntry("Hidden", false); // Insert the entry into our dictionary. styleEntries.insert(strWidgetStyle.toLower(), entry); } // Obtain all style names QStringList allStyles = QStyleFactory::keys(); // Get translated names, remove all hidden style entries. QStringList styles; StyleEntry* entry; for (QStringList::iterator it = allStyles.begin(); it != allStyles.end(); ++it) { QString id = (*it).toLower(); // Find the entry. if ( (entry = styleEntries[id]) != nullptr ) { // Do not add hidden entries if (entry->hidden) continue; styles += entry->name; nameToStyleKey[entry->name] = id; } else { styles += (*it); //Fall back to the key (but in original case) nameToStyleKey[*it] = id; } } // Sort the style list, and add it to the combobox styles.sort(); cbStyle->addItems( styles ); // Find out which style is currently being used KConfigGroup configGroup = config.group( "KDE" ); QString defaultStyle = KCMStyle::defaultStyle(); QString cfgStyle = configGroup.readEntry( "widgetStyle", defaultStyle ); // Select the current style // Do not use cbStyle->listBox() as this may be NULL for some styles when // they use QPopupMenus for the drop-down list! // ##### Since Trolltech likes to seemingly copy & paste code, // QStringList::findItem() doesn't have a Qt::StringComparisonMode field. // We roll our own (yuck) cfgStyle = cfgStyle.toLower(); int item = 0; for( int i = 0; i < cbStyle->count(); i++ ) { QString id = nameToStyleKey[cbStyle->itemText(i)]; item = i; if ( id == cfgStyle ) // ExactMatch break; else if ( id.contains( cfgStyle ) ) break; else if ( id.contains( QApplication::style()->metaObject()->className() ) ) break; item = 0; } cbStyle->setCurrentIndex( item ); m_bStyleDirty = false; switchStyle( currentStyle() ); // make resets visible } QString KCMStyle::currentStyle() { return nameToStyleKey[cbStyle->currentText()]; } void KCMStyle::styleChanged() { switchStyle( currentStyle() ); } void KCMStyle::switchStyle(const QString& styleName, bool force) { // Don't flicker the preview if the same style is chosen in the cb if (!force && appliedStyle && appliedStyle->objectName() == styleName) return; // Create an instance of the new style... QStyle* style = QStyleFactory::create(styleName); if (!style) return; // Prevent Qt from wrongly caching radio button images QPixmapCache::clear(); setStyleRecursive( stylePreview, style ); // this flickers, but reliably draws the widgets correctly. stylePreview->resize( stylePreview->sizeHint() ); delete appliedStyle; appliedStyle = style; // Set the correct style description StyleEntry* entry = styleEntries[ styleName ]; QString desc; desc = i18n("Description: %1", entry ? entry->desc : i18n("No description available.") ); lblStyleDesc->setText( desc ); } void KCMStyle::setStyleRecursive(QWidget* w, QStyle* s) { // Don't let broken styles kill the palette // for other styles being previewed. (e.g SGI style) w->setPalette(QPalette()); QPalette newPalette(KGlobalSettings::createApplicationPalette()); s->polish( newPalette ); w->setPalette(newPalette); // Apply the new style. w->setStyle(s); // Recursively update all children. const QObjectList children = w->children(); // Apply the style to each child widget. foreach (QObject* child, children) { if (child->isWidgetType()) setStyleRecursive((QWidget *) child, s); } } // ---------------------------------------------------------------- // All the Effects stuff // ---------------------------------------------------------------- QString KCMStyle::toolbarButtonText(int index) { switch (index) { case 1: return QStringLiteral("TextOnly"); case 2: return QStringLiteral("TextBesideIcon"); case 3: return QStringLiteral("TextUnderIcon"); default: break; } return QStringLiteral("NoText"); } int KCMStyle::toolbarButtonIndex(const QString &text) { if (text == QLatin1String("TextOnly")) { return 1; } else if (text == QLatin1String("TextBesideIcon")) { return 2; } else if (text == QLatin1String("TextUnderIcon")) { return 3; } return 0; } QString KCMStyle::menuBarStyleText(int index) { switch (index) { case 1: return QStringLiteral("Decoration"); case 2: return QStringLiteral("Widget"); } return QStringLiteral("InApplication"); } int KCMStyle::menuBarStyleIndex(const QString &text) { if (text == QLatin1String("Decoration")) { return 1; } else if (text == QLatin1String("Widget")) { return 2; } return 0; } void KCMStyle::loadEffects( KConfig& config ) { // KDE's Part via KConfig KConfigGroup configGroup = config.group("Toolbar style"); QString tbIcon = configGroup.readEntry("ToolButtonStyle", "TextBesideIcon"); fineTuningUi.comboToolbarIcons->setCurrentIndex(toolbarButtonIndex(tbIcon)); tbIcon = configGroup.readEntry("ToolButtonStyleOtherToolbars", "TextBesideIcon"); fineTuningUi.comboSecondaryToolbarIcons->setCurrentIndex(toolbarButtonIndex(tbIcon)); configGroup = config.group("KDE"); fineTuningUi.cbIconsOnButtons->setChecked(configGroup.readEntry("ShowIconsOnPushButtons", true)); fineTuningUi.cbIconsInMenus->setChecked(configGroup.readEntry("ShowIconsInMenuItems", true)); m_bEffectsDirty = false; } void KCMStyle::addWhatsThis() { // Page1 cbStyle->setWhatsThis( i18n("Here you can choose from a list of" " predefined widget styles (e.g. the way buttons are drawn) which" " may or may not be combined with a theme (additional information" " like a marble texture or a gradient).") ); stylePreview->setWhatsThis( i18n("This area shows a preview of the currently selected style " "without having to apply it to the whole desktop.") ); // Page2 page2->setWhatsThis( i18n("This page allows you to choose details about the widget style options") ); fineTuningUi.comboToolbarIcons->setWhatsThis( i18n( "

No Text: Shows only icons on toolbar buttons. " "Best option for low resolutions.

" "

Text Only: Shows only text on toolbar buttons.

" "

Text Beside Icons: Shows icons and text on toolbar buttons. " "Text is aligned beside the icon.

" "Text Below Icons: Shows icons and text on toolbar buttons. " "Text is aligned below the icon.") ); fineTuningUi.cbIconsOnButtons->setWhatsThis( i18n( "If you enable this option, KDE Applications will " "show small icons alongside some important buttons.") ); fineTuningUi.cbIconsInMenus->setWhatsThis( i18n( "If you enable this option, KDE Applications will " "show small icons alongside most menu items.") ); } #include "kcmstyle.moc" // vim: set noet ts=4: diff --git a/kcms/style/style.desktop b/kcms/style/style.desktop index 24c79ef66..118f2f468 100644 --- a/kcms/style/style.desktop +++ b/kcms/style/style.desktop @@ -1,143 +1,143 @@ [Desktop Entry] Exec=kcmshell5 style Icon=preferences-desktop-theme-style Type=Service X-KDE-ServiceTypes=KCModule,KCModuleInit X-DocPath=kcontrol/kcmstyle/index.html X-KDE-Library=kcm_style X-KDE-Init-Symbol=kcminit_style X-KDE-Init-Phase=0 X-KDE-ParentApp=kcontrol X-KDE-System-Settings-Parent-Category=applicationstyle X-KDE-Weight=0 Name=Widget Style Name[ar]=نمط الودجات Name[bs]=Stil grafičke kontrole Name[ca]=Estil dels estris Name[ca@valencia]=Estil dels estris Name[cs]=Styl widgetu Name[da]=Kontrolstil Name[de]=Stil der Bedienelemente Name[el]=Στιλ γραφικών συστατικών Name[en_GB]=Widget Style Name[es]=Estilo de los elementos gráficos Name[et]=Vidina stiil Name[eu]=Trepeten estiloa Name[fi]=Elementtien tyyli Name[fr]=Style de composant graphique Name[gl]=Estilo do trebello Name[he]=עיצוב הישומון Name[hu]=Grafikai elemstílus Name[id]=Gaya Widget Name[is]=Græjustíll Name[it]=Stile degli oggetti Name[ja]=ウィジェットスタイル Name[ko]=위젯 스타일 Name[lt]=Valdiklių stilius Name[nb]=Skjermelementstil Name[nds]=Bedeenelement-Stil Name[nl]=Widget-stijl Name[nn]=Elementstil Name[pa]=ਵਿਜੈਟ ਸਟਾਈਲ Name[pl]=Wygląd interfejsu Name[pt]=Estilo Gráfico Name[pt_BR]=Estilo dos widgets Name[ru]=Стиль интерфейса Name[sk]=Štýl prvku Name[sl]=Slog gradnikov Name[sr]=Стил виџета̂ Name[sr@ijekavian]=Стил виџета̂ Name[sr@ijekavianlatin]=Stil vidžetâ̂ Name[sr@latin]=Stil vidžetâ̂ Name[sv]=Stil för grafiska komponenter Name[tr]=Gereç Biçemi Name[uk]=Стиль віджетів Name[x-test]=xxWidget Stylexx Name[zh_CN]=部件风格 Name[zh_TW]=元件樣式 -Comment=Widget Style and Behavior +Comment=Configure widget style and behavior Comment[ar]=نمط الودجات وسلوكها Comment[bs]=Stil i ponašanje grafičke kontrole Comment[ca]=Estil i comportament dels estris Comment[ca@valencia]=Estil i comportament dels estris Comment[cs]=Styl a chování widgetu Comment[da]=Kontrolstil og -opførsel Comment[de]=Stil und Verhalten der Bedienelemente Comment[el]=Στιλ και συμπεριφορά γραφικών συστατικών Comment[en_GB]=Widget Style and Behaviour Comment[es]=Estilo y comportamiento de elementos gráficos Comment[et]=Vidina stiil ja käitumine Comment[eu]=Trepeten estiloa eta portaera Comment[fi]=Käyttöliittymäelementtien tyyli ja toiminta Comment[fr]=Style et comportement des composants graphiques Comment[gl]=Estilo e comportamento do trebello Comment[he]=עיצוב והתנהגות ישומונים Comment[hu]=Elemstílus és működés Comment[id]=Gaya dan Perilaku Widget Comment[is]=Stíll og hegðun skjágræja (widget) Comment[it]=Stile e comportamento degli oggetti Comment[ja]=ウィジェットスタイルと挙動 Comment[ko]=위젯 스타일과 행동 Comment[lt]=Valdiklio stilius ir elgsena Comment[nb]=Stil og oppførsel for skjermelementer Comment[nds]=Bedeenelement-Stil un -Bedregen Comment[nl]=Widget-stijl en gedrag Comment[nn]=Stil og åtferd for skjermelement Comment[pa]=ਵਿਜੈੱਟ ਸਟਾਈਲ ਅਤੇ ਰਵੱਈਆ Comment[pl]=Elementy interfejsu - wygląd i zachowanie Comment[pt]=Estilo e Comportamento Gráfico Comment[pt_BR]=Estilo e comportamento dos widgets Comment[ru]=Стиль и облик элементов графического интерфейса Comment[sk]=Štýl a správanie widgetov Comment[sl]=Slog in obnašanje gradnikov Comment[sr]=Стил и понашање виџета̂ Comment[sr@ijekavian]=Стил и понашање виџета̂ Comment[sr@ijekavianlatin]=Stil i ponašanje vidžetâ̂ Comment[sr@latin]=Stil i ponašanje vidžetâ̂ Comment[sv]=Stil och beteende för grafiska komponenter Comment[tr]=Gereç Biçemi ve Davranışı Comment[uk]=Стиль і поведінка віджетів Comment[x-test]=xxWidget Style and Behaviorxx Comment[zh_CN]=部件风格和行为 Comment[zh_TW]=元件樣式與行為 X-KDE-Keywords=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu X-KDE-Keywords[ca]=estil,estils,aspecte,estri,icones,barres d'eines,text,ressaltat,aplicacions,aplicacions del KDE,tema,plasma,menu,menu global X-KDE-Keywords[ca@valencia]=estil,estils,aspecte,estri,icones,barres d'eines,text,ressaltat,aplicacions,aplicacions del KDE,tema,plasma,menu,menu global X-KDE-Keywords[da]=stil,style,udseende,kontrol,widget,ikoner,værktøjslinjer,tekst,fremhævning,programmer,KDE-programmer,tema,plasma,menu,global menu X-KDE-Keywords[de]=Stile,Design,Themes,Schema,Elemente,Bildschirmelemente,Icons,Bedienelemente,Schriften,Symbole,Werkzeugleisten,Text,Hervorhebungen,Knöpfe,Anwendungen,Programme,KDE-Programme,Menü,Globales Menü X-KDE-Keywords[el]=στιλ,στιλ,εμφάνιση,γραφικό συστατικό,εικονίδια,γραμμές εργαλείων,κείμενο,τονισμός,εφαρμογές,εφαρμογές KDE,θέμα,plasma,μενού,καθολικό μενού X-KDE-Keywords[en_GB]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu X-KDE-Keywords[es]=estilo,estilos,apariencia,controles,iconos,barras de herramientas,texto,resaltado,aplicaciones,aplicaciones de KDE,tema,plasma,menú,menú global X-KDE-Keywords[eu]=estilo,estiloak,itxura,trepeta,ikonoak,tresna-barrak,testua,nabarmentzea,aplikazioak,KDE aplikazioak,gaia,plasma,menu,menu orokorra X-KDE-Keywords[fi]=tyyli,tyylit,ulkoasu,käyttöliittymäelementti,elementti,kuvakkeet,työkalurivit,työkalupalkit, teksti,korostus,sovellukset,KDE-sovellukset,teema,plasma,työpöydänlaajuinen valikko X-KDE-Keywords[fr]=style, styles, apparence, composant graphique, icônes, barres d'outil, texte, mise en valeur, applications, applications KDE, thème, plasma, menu, menu global X-KDE-Keywords[gl]=estilo, estilos, aparencia, trebello, iconas, barras de ferramentas, texto, realzar, aplicativos, aplicacións, programas, software, tema, plasma,menu,menú,global menu,menú global X-KDE-Keywords[hu]=stílus,stílusok,kinézet,widget,ikonok,eszköztárak,szöveg,kiemelés,alkalmazások,KDe alkalmazások,téma,plazma,menü,globális menü X-KDE-Keywords[id]=gaya,gaya,look,widget,ikon,bilah alat,teks,sorot,apl,aplikasi KDE,tema,plasma,menu,menu global X-KDE-Keywords[it]=stile,stili,aspetto,oggetto,icone,barre degli strumenti,testo,evidenziazione,applicazioni,applicazioni KDE,tema,plasma,menu,menu globale X-KDE-Keywords[ko]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu,스타일,모양,위젯,아이콘,툴바,도구 모음,강조,프로그램,앱,KDE 프로그램,테마,전역 메뉴,메뉴 X-KDE-Keywords[nl]=stijl,stijlen,uiterlijk,widget,pictogrammen,werkbalk,tekst,accentuering,apps,KDE-toepassingen,thema,plasma, menu,globaal menu X-KDE-Keywords[nn]=stil,stilar,utsjånad,skjermelement,ikon,verktøylinjer,tekst,framheva,program,KDE-program,tema,plasma,meny,global meny X-KDE-Keywords[pa]=ਸਟਾਈਲ,ਸ਼ੈਲੀ,ਦਿੱਖ,ਵਿਜੈੱਟ,ਆਈਕਾਨ,ਟੂਲਬਾਰ,ਟੈਕਸਟ,ਪਾਠ,ਸ਼ਬਦ,ਉਭਾਰਨਾ,ਐਪਸ,ਕੇਡੀਈ ਐਪਲੀਕੇਸ਼ਨਾਂ,ਥੀਮ,ਪਲਾਜ਼ਮਾ,ਮੇਨੂ,ਗਲੋਬਲ ਮੇਨੂ X-KDE-Keywords[pl]=style,styl,wygląd,element interfejsu,ikony,paski narzędzi,tekst,podświetlenie,programy,programy KDE,motyw,plazma,menu,globalne menu X-KDE-Keywords[pt]=estilo,estilos,aparência,elemento,item,ícones,barras de ferramentas,texto,realce,aplicações,aplicações do KDE,tema,plasma,menu global X-KDE-Keywords[pt_BR]=estilo,estilos,aparência,widget,ícones,barras de ferramentas,texto,realce,aplicativos,aplicativos do KDE,tema,plasma, menu, menu global X-KDE-Keywords[ru]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,стиль,стили,внешний вид,виджет,значки,панель инструментов,текст,подсветка,приложения,приложения KDE,тема,плазма,меню,глобальное меню X-KDE-Keywords[sk]=štýl,štýly,vzhľad,widget,ikony,panely nástrojov,text,zvýraznenie,aplikácie,KDE aplikácie,téma,plasma,ponuka,globálna ponuka X-KDE-Keywords[sl]=slog,slogi,videz,gradnik,ikone,orodjarne,orodne vrstice,besedilo,poudarek,programi,tema,plasma,meni,splošni meni X-KDE-Keywords[sr]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu,стил,стилови,изглед,виџет,иконице,траке алатки,текст,истицање,програми,КДЕ програми,тема,Плазма,мени,глобални мени X-KDE-Keywords[sr@ijekavian]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu,стил,стилови,изглед,виџет,иконице,траке алатки,текст,истицање,програми,КДЕ програми,тема,Плазма,мени,глобални мени X-KDE-Keywords[sr@ijekavianlatin]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu,stil,stilovi,izgled,vidžet,ikonice,trake alatki,tekst,isticanje,programi,KDE programi,tema,Plasma,meni,globalni meni X-KDE-Keywords[sr@latin]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu,stil,stilovi,izgled,vidžet,ikonice,trake alatki,tekst,isticanje,programi,KDE programi,tema,Plasma,meni,globalni meni X-KDE-Keywords[sv]=stil,stilar,utseende,grafisk komponent,ikoner,verktygsrader,text,markering,program,KDE-program,tema,plasma,meny,global meny X-KDE-Keywords[tr]=biçim,biçimler,görünüm,parçacık,simgeler,araç çubukları,metin,vurgulama,uygulamalar,KDE uygulamaları,tema,plasmamenüsü,genel menü X-KDE-Keywords[uk]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu,стиль,стилі,вигляд,віджет,піктограма,піктограми,значок,значки,іконки,панель,панель інструментів,текст,підсвічування,позначення,програма,програми,тема,плазма,меню,загальне меню X-KDE-Keywords[x-test]=xxstylexx,xxstylesxx,xxlookxx,xxwidgetxx,xxiconsxx,xxtoolbarsxx,xxtextxx,xxhighlightxx,xxappsxx,xxKDE applicationsxx,xxthemexx,xxplasmaxx,xxmenuxx,xxglobal menuxx X-KDE-Keywords[zh_CN]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,风格,外观,部件,图标,工具栏,文本,突出显示,程序,KDE 应用程序,主题 X-KDE-Keywords[zh_TW]=style,styles,look,widget,icons,toolbars,text,highlight,apps,KDE applications,theme,plasma,menu,global menu Categories=Qt;KDE;X-KDE-settings-looknfeel;