[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio/kfile
From:       David Faure <faure () kde ! org>
Date:       2010-10-22 19:43:40
Message-ID: 20101022194340.AF130AC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1188636 by dfaure:

forwardport: Remove unused "unmounted icon" button in the properties dialog.


 M  +4 -27     kpropertiesdialog.cpp  


--- trunk/KDE/kdelibs/kio/kfile/kpropertiesdialog.cpp #1188635:1188636
@@ -885,11 +885,8 @@
         iconButton->setFixedSize(bsize, bsize);
         iconButton->setIconSize(48);
         iconButton->setStrictIconSize(false);
-        // This works for everything except Device icons on unmounted devices
-        // So we have to really open .desktop files
         QString iconStr = KMimeType::findByUrl( url, mode )->iconName( url );
-        if ( bDesktopFile && isLocal )
-        {
+        if (bDesktopFile && isLocal) {
             KDesktopFile config( url.path() );
             KConfigGroup group = config.desktopGroup();
             iconStr = group.readEntry( "Icon" );
@@ -897,8 +894,9 @@
                 iconButton->setIconType( KIconLoader::Desktop, KIconLoader::Device );
             else
                 iconButton->setIconType( KIconLoader::Desktop, KIconLoader::Application );
-        } else
+        } else {
             iconButton->setIconType( KIconLoader::Desktop, KIconLoader::Place );
+        }
         iconButton->setIcon(iconStr);
         d->iconArea = iconButton;
         connect(iconButton, SIGNAL(iconChanged(QString)),
@@ -2717,7 +2715,6 @@
     KComboBox* device;
     QLabel* mountpoint;
     QCheckBox* readonly;
-    KIconButton* unmounted;
 
     QStringList m_devicelist;
 };
@@ -2810,17 +2807,8 @@
     KSeparator* sep = new KSeparator( Qt::Horizontal, d->m_frame);
     layout->addWidget(sep, 6, 0, 1, 2);
 
-    d->unmounted = new KIconButton( d->m_frame );
-    int bsize = 66 + 2 * d->unmounted->style()->pixelMetric(QStyle::PM_ButtonMargin);
-    d->unmounted->setFixedSize(bsize, bsize);
-    d->unmounted->setIconType(KIconLoader::Desktop, KIconLoader::Device);
-    layout->addWidget(d->unmounted, 7, 0);
+    layout->setRowStretch(7, 1);
 
-    label = new QLabel( i18n("Unmounted Icon"),  d->m_frame );
-    layout->addWidget(label, 7, 1);
-
-    layout->setRowStretch(8, 1);
-
     KUrl url = KIO::NetAccess::mostLocalUrl( _props->kurl(), _props );
     if (!url.isLocalFile()) {
         return;
@@ -2837,7 +2825,6 @@
     QString deviceStr = config.readEntry( "Dev" );
     QString mountPointStr = config.readEntry( "MountPoint" );
     bool ro = config.readEntry( "ReadOnly", false );
-    QString unmountedStr = config.readEntry( "UnmountIcon" );
 
     fileSystem->setText(config.readEntry("FSType"));
 
@@ -2860,19 +2847,12 @@
 
     d->readonly->setChecked( ro );
 
-    if ( unmountedStr.isEmpty() )
-        unmountedStr = KMimeType::defaultMimeTypePtr()->iconName(); // default icon
-
-    d->unmounted->setIcon( unmountedStr );
-
     connect( d->device, SIGNAL( activated( int ) ),
              this, SIGNAL( changed() ) );
     connect( d->device, SIGNAL( textChanged( const QString & ) ),
              this, SIGNAL( changed() ) );
     connect( d->readonly, SIGNAL( toggled( bool ) ),
              this, SIGNAL( changed() ) );
-    connect( d->unmounted, SIGNAL( iconChanged( const QString& ) ),
-             this, SIGNAL( changed() ) );
 
     connect( d->device, SIGNAL( textChanged( const QString & ) ),
              this, SLOT( slotDeviceChanged() ) );
@@ -2991,9 +2971,6 @@
     config.writeEntry( "Dev", d->device->currentText() );
     config.writeEntry( "MountPoint", d->mountpoint->text() );
 
-    config.writeEntry( "UnmountIcon", d->unmounted->icon() );
-    kDebug(250) << "d->unmounted->icon() = " << d->unmounted->icon();
-
     config.writeEntry( "ReadOnly", d->readonly->isChecked() );
 
     config.sync();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic