]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinsettings.cpp
Fixed issue in method naturalCompare: strings having numbers with the same amount...
[dolphin.git] / src / dolphinsettings.cpp
index f60bf0189254deae58964b6bb2ad372e2a9603bf..ed8259d741c963355c7f536ac69cfb4cd14a20e5 100644 (file)
 #include <assert.h>
 #include <qdir.h>
 
-#include <kapplication.h>
 #include <kbookmark.h>
 #include <kbookmarkmanager.h>
 #include <kicontheme.h>
+#include <kinstance.h>
 #include <klocale.h>
 #include <kstandarddirs.h>
 
@@ -84,75 +84,6 @@ void DolphinSettings::save()
     manager->save(false);
 }
 
-void DolphinSettings::calculateGridSize(int hint)
-{
-    // TODO: remove in KDE4
-    const int previewSize = m_iconsModeSettings->previewSize();
-    const int iconSize = m_iconsModeSettings->iconSize();
-    const int maxSize = (previewSize > iconSize) ? previewSize : iconSize;
-    const Q3IconView::Arrangement arrangement = (m_iconsModeSettings->arrangement() == "LeftToRight") ?
-                                               Q3IconView::LeftToRight : Q3IconView::TopToBottom;
-
-    int gridWidth = 0;
-    int gridHeight = 0;
-    if (arrangement == Q3IconView::LeftToRight) {
-        int widthUnit = maxSize + (maxSize / 2);
-        if (widthUnit < K3Icon::SizeLarge) {
-            widthUnit = K3Icon::SizeLarge;
-        }
-
-        gridWidth = widthUnit + hint * K3Icon::SizeLarge;
-
-        gridHeight = iconSize;
-        if (gridHeight <= K3Icon::SizeMedium) {
-            gridHeight = gridHeight * 2;
-        }
-        else {
-            gridHeight += maxSize / 2;
-        }
-    }
-    else {
-        assert(arrangement == Q3IconView::TopToBottom);
-        gridWidth = maxSize + (hint + 1) * (8 * m_iconsModeSettings->fontSize());
-
-        // The height-setting is ignored yet by KFileIconView if the TopToBottom
-        // arrangement is active. Anyway write the setting to have a defined value.
-        gridHeight = maxSize;
-    }
-
-    m_iconsModeSettings->setGridWidth(gridWidth);
-    m_iconsModeSettings->setGridHeight(gridHeight);
-}
-
-int DolphinSettings::textWidthHint() const
-{
-    // TODO: remove in KDE4
-    const int previewSize = m_iconsModeSettings->previewSize();
-    const int iconSize = m_iconsModeSettings->iconSize();
-    const Q3IconView::Arrangement arrangement = (m_iconsModeSettings->arrangement() == "LeftToRight") ?
-                                               Q3IconView::LeftToRight : Q3IconView::TopToBottom;
-
-    const int gridWidth = m_iconsModeSettings->gridWidth();
-
-    const int maxSize = (previewSize > iconSize) ? previewSize : iconSize;
-    int hint = 0;
-    if (arrangement == Q3IconView::LeftToRight) {
-        int widthUnit = maxSize + (maxSize / 2);
-        if (widthUnit < K3Icon::SizeLarge) {
-            widthUnit = K3Icon::SizeLarge;
-        }
-        hint = (gridWidth - widthUnit) / K3Icon::SizeLarge;
-    }
-    else {
-        assert(arrangement == Q3IconView::TopToBottom);
-        hint = (gridWidth - maxSize) / (8 * m_iconsModeSettings->fontSize()) - 1;
-        if (hint > 2) {
-            hint = 2;
-        }
-    }
-    return hint;
-}
-
 DolphinSettings::DolphinSettings()
 {
     m_generalSettings = new GeneralSettings();