Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37889164
en ru br
Репозитории ALT
5.1: 3.5.10-alt20.M51.2
4.1: 3.5.10-alt16.M41.1
4.0: 3.5.9-alt1.M40.1
3.0: 3.4.1-alt12
+updates:3.4.1-alt12.1.M30
+backports:3.5.6-alt7.0.M30
www.altlinux.org/Changes

Группа :: Графические оболочки/KDE
Пакет: kdebase

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: kdebase-3.5.10-kfontinst.patch
Скачать


--- kdeebase-3.4/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp.orig	2005-02-23 14:25:11 +0300
+++ kdeebase-3.4/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp	2005-03-22 21:55:39 +0300
@@ -160,6 +160,8 @@ CKCmFontInst::CKCmFontInst(QWidget *pare
     fontsLayout->addWidget(button, 1, 0);
     fontsLayout->addItem(new QSpacerItem(4, 4, QSizePolicy::Expanding, QSizePolicy::Minimum));
 
+if ( getuid() != 0)
+{
     layout->addWidget(toolbar);
 #ifdef HAVE_XFT
     layout->addWidget(itsPreview ? itsSplitter : fontsFrame);
@@ -167,6 +169,11 @@ CKCmFontInst::CKCmFontInst(QWidget *pare
     layout->addWidget(fontsFrame);
 #endif
     layout->addWidget(itsStatusLabel);
+}
+else
+{
+    layout->addWidget( new QLabel( i18n("Disabled for root"), this ) );
+}
 
     setButtons(0);
     setRootOnlyMsg(i18n("<b>The fonts shown are your personal fonts.</b><br>To see (and install) "
--- kdeebase-3.4/kcontrol/kfontinst/kcmfontinst/kcmfontinst.desktop.orig	2005-02-23 14:25:11 +0300
+++ kdeebase-3.4/kcontrol/kfontinst/kcmfontinst/kcmfontinst.desktop	2005-03-22 21:58:17 +0300
@@ -8,7 +8,6 @@ DocPath=kcontrol/kcmfontinst/index.html
 
 X-KDE-Library=fontinst
 X-KDE-FactoryName=fontinst
-X-KDE-RootOnly=true
 
 X-KDE-ParentApp=kcontrol
 
--- kdebase-3.5.10/kcontrol/kfontinst/kio/KioFonts.cpp~	2008-06-13 16:14:08 +0400
+++ kdebase-3.5.10/kcontrol/kfontinst/kio/KioFonts.cpp	2008-09-17 14:58:58 +0400
@@ -295,7 +295,7 @@ static bool createFolderUDSEntry(KIO::UD
         QString url(KFI_KIO_FONTS_PROTOCOL+QString::fromLatin1(":/"));
         return true;
     }
-    else if (sys && !Misc::root())   // Default system fonts folder does not actually exist yet!
+    else if (sys && true)   // Default system fonts folder does not actually exist yet!
     {
         KFI_DBUG << "Default system folder (" << path << ") does not yet exist, so create dummy entry" << endl;
         addAtom(entry, KIO::UDS_NAME, 0, name);
@@ -395,9 +395,9 @@ static bool createFontUDSEntry(KIO::UDSE
 
             QString url(KFI_KIO_FONTS_PROTOCOL+QString::fromLatin1(":/"));
 
-            if(!Misc::root())
+            if(true)
             {
-                url+=sys ? i18n(KFI_KIO_FONTS_SYS) : i18n(KFI_KIO_FONTS_USER);
+                url+=i18n(KFI_KIO_FONTS_USER);
                 url+=QString::fromLatin1("/");
             }
             if(multiple)
@@ -436,7 +436,7 @@ static KURL getRedirect(const KURL &u)
 
 static bool nonRootSys(const KURL &u)
 {
-    return !Misc::root() && isSysFolder(CKioFonts::getSect(u.path()));
+    return true && isSysFolder(CKioFonts::getSect(u.path()));
 }
 
 static QString getFontFolder(const QString &defaultDir, const QString &root, QStringList &dirs)
@@ -707,7 +707,7 @@ static bool getFontList(const QStringLis
 
 CKioFonts::CKioFonts(const QCString &pool, const QCString &app)
          : KIO::SlaveBase(KFI_KIO_FONTS_PROTOCOL, pool, app),
-           itsRoot(Misc::root()),
+           itsRoot(false),
            itsUsingFcFpe(false),
            itsUsingXfsFpe(false),
            itsHasSys(false),
@@ -845,6 +845,7 @@ void CKioFonts::listDir(const KURL &url)
 
                 for ( ; it != end; ++it)
                 {
+                    if( FOLDER_SYS==folder ) continue;
                     entry.clear();
                     if(createFontUDSEntry(entry, it.key(), it.data(), FOLDER_SYS==folder))
                         listEntry(entry, false);
@@ -857,8 +858,10 @@ void CKioFonts::listDir(const KURL &url)
             totalSize(size);
             createFolderUDSEntry(entry, i18n(KFI_KIO_FONTS_USER), itsFolders[FOLDER_USER].location, false);
             listEntry(entry, false);
+#if 0
             createFolderUDSEntry(entry, i18n(KFI_KIO_FONTS_SYS), itsFolders[FOLDER_SYS].location, true);
             listEntry(entry, false);
+#endif
         }
 
         listEntry(size ? entry : KIO::UDSEntry(), true);
@@ -1066,7 +1069,7 @@ void CKioFonts::put(const KURL &u, int m
 {
     KFI_DBUG << "put " << u.path() << endl;
 
-    if(isHidden(u))
+    if(isHidden(u) || nonRootSys(u))
     {
         error(KIO::ERR_WRITE_ACCESS_DENIED, u.prettyURL());
         return;
@@ -1311,7 +1314,7 @@ void CKioFonts::copy(const KURL &src, co
     //
     KFI_DBUG << "copy " << src.prettyURL() << " - " << d.prettyURL() << endl;
 
-    if(isHidden(d))
+    if(isHidden(d) || nonRootSys(KURL(d)))
     {
         error(KIO::ERR_WRITE_ACCESS_DENIED, d.prettyURL());
         return;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin