SVN: PLDLiveInstaller/trunk/DiskListWidget.cpp

shadzik shadzik at pld-linux.org
Thu Jan 13 15:00:55 CET 2011


Author: shadzik
Date: Thu Jan 13 15:00:54 2011
New Revision: 12036

Modified:
   PLDLiveInstaller/trunk/DiskListWidget.cpp
Log:
- blah, Solid is still too dumb, can't determine size of unpartitioned devices
- nice feature though is the freedesktop standarized icon selection per device, so we don't have to do it manually


Modified: PLDLiveInstaller/trunk/DiskListWidget.cpp
==============================================================================
--- PLDLiveInstaller/trunk/DiskListWidget.cpp	(original)
+++ PLDLiveInstaller/trunk/DiskListWidget.cpp	Thu Jan 13 15:00:54 2011
@@ -38,8 +38,9 @@
       if(device.is<Solid::StorageDrive>())
       {
 	// show only devices bigger than 6GB
-	if(device.as<Solid::StorageDrive>()->size()/1024/1024 >= 6144)
-	{
+	//qDebug() << "TUTAJ!!" << device.as<Solid::StorageDrive>()->size()/1024/1024;
+	//if(device.as<Solid::StorageDrive>()->size()/1024/1024 >= 6144)
+	//{
 	  QString dev = device.as<Solid::Block>()->device();
 	
 	  if (solidDevice.contains(dev))
@@ -54,10 +55,11 @@
 	    {
 	      QString text = device.product() + " (" + dev + ")"; 
 	      QListWidgetItem *listitem = new QListWidgetItem;
-	      if ((harddisk->driveType()==Solid::StorageDrive::MemoryStick) || harddisk->bus()==Solid::StorageDrive::Usb)
-		listitem->setIcon(KIcon("drive-removable-media-usb").pixmap(64));
-	      else
-		listitem->setIcon(KIcon("drive-harddisk").pixmap(64));
+	      //if ((harddisk->driveType()==Solid::StorageDrive::MemoryStick) || harddisk->bus()==Solid::StorageDrive::Usb)
+		//listitem->setIcon(KIcon("drive-removable-media-usb").pixmap(64));
+	      //else
+		//listitem->setIcon(KIcon("drive-harddisk").pixmap(64));
+	      listitem->setIcon(KIcon(device.icon()).pixmap(64));
 	      listitem->setText(text);
 	      listitem->setToolTip(dev);
 	      addItem(listitem);
@@ -76,7 +78,7 @@
 	  
 	    }
 	  }
-	} // devices bigger than 6GB
+	//} // devices bigger than 6GB
       }
     }
     foreach(QString soldev, solidDevice) {


More information about the pld-cvs-commit mailing list