<div class="gmail_quote">On Sat, Feb 5, 2011 at 7:35 AM, Andrius Ribas <span dir="ltr"><<a href="mailto:andriusmao@gmail.com">andriusmao@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





 <div>
  <div style="font-family:Verdana, Arial, Helvetica, Sans-Serif"><div class="im">
   <table style="border:1px #c9c399 solid" bgcolor="#f9f3c9" cellpadding="8" width="100%">
    <tbody><tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/6207/" target="_blank">http://svn.reviewboard.kde.org/r/6207/</a>
     </td>
    </tr>
   </tbody></table>
   <br>





 </div><pre style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">I'll rewrite the patch for <a href="http://git.reviewboard.kde.org" target="_blank">git.reviewboard.kde.org</a> but I'd like some more feedback first.. I've got some positive feedback from SaroEngels and negative from Pino on IRC.. This protocol is intended to have functionality similar to "desktop:"... I'm not sure if it would be better to enhance "file:" protocol instead (it'd maybe be harder to integrate)... I've checked some browsers (IE, Chrome, Opera) and only opera seems to implement correctly the "root" of "file:" protocol on Windows (Opera shows drive letters, IE and Chrome gives "not found" for "file:///"; KDE points "file:///", "file:" etc.. to "C:", "file:/localhost/C:" fails and "file://c:" points to "smb:/c/", so some behaviors need to be fixed and/or more compliant to RFC 1630 and RFC 1738) . Please note Solid is still not much stable on windows so imo, we cannot use it to query the drives yet.</pre>


 <br>







<p>- Andrius</p><div class="im">


<br>
<p>On January 1st, 2011, 2:04 p.m., Andrius Ribas wrote:</p>






</div><table style="background-repeat:repeat-x;border:1px black solid" bgcolor="#fefadf" cellpadding="8" cellspacing="0" width="100%">
 <tbody><tr>
  <td><div class="im">

<div>Review request for kde-windows, kdelibs, Peter Penz, Pino Toscano, Fredrik Höglund, David Faure, and Patrick Spendrin.</div>
<div>By Andrius Ribas.</div>


</div><p style="color:grey"><i>Updated Jan. 1, 2011, 2:04 p.m.</i></p><div><div></div><div class="h5">




<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Description </h1>
<table style="border:1px solid #b8b5a0" bgcolor="#ffffff" cellpadding="10" cellspacing="0" width="100%">
 <tbody><tr>
  <td>
   <pre style="margin:0;padding:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">A simple "computer" kioslave, showing the drive letters on "/", and redirecting to "file" otherwise.
Additionaly this patch substitutes "root" on Konqueror sidebar, by "computer", also this changes the "places" panel (see below).


(as reviewboard only supports single patches) additional patch for the "places" panel on trunk/KDE/kdelibs:

Index: kfile/kfileplacesmodel.cpp
===================================================================
--- kfile/kfileplacesmodel.cpp  (revision 1209174)
+++ kfile/kfileplacesmodel.cpp  (working copy)
@@ -120,40 +120,9 @@
                                               "Network", I18N_NOOP2("KFile System Bookmarks", "Network"),
                                               KUrl("remote:/"), "network-workgroup");
 #ifdef Q_OS_WIN
-        // adding drives
-        foreach ( const QFileInfo& info, QDir::drives() ) {
-#ifndef _WIN32_WCE
-            uint type = DRIVE_UNKNOWN;
-#endif
-            QString driveIcon = "drive-harddisk";
-#ifndef _WIN32_WCE
-            QT_WA({ type = GetDriveTypeW((wchar_t *)info.absoluteFilePath().utf16()); },
-                  { type = GetDriveTypeA(info.absoluteFilePath().toLocal8Bit()); });
-            // qDebug() << "drive " << info.absoluteFilePath() << " type: " << type;
-            switch (type) {
-                case DRIVE_REMOVABLE:
-                    driveIcon = "drive-removable-media";
-                    break;
-                case DRIVE_FIXED:
-                    driveIcon = "drive-harddisk";
-                    break;
-                case DRIVE_REMOTE:
-                    driveIcon = "network-server";
-                    break;
-                case DRIVE_CDROM:
-                    driveIcon = "drive-optical";
-                    break;
-                case DRIVE_RAMDISK:
-                case DRIVE_UNKNOWN:
-                case DRIVE_NO_ROOT_DIR:
-                default:
-                    driveIcon = "drive-harddisk";
-            }
-#endif
-            KFilePlacesItem::createSystemBookmark(d->bookmarkManager,
-                                                  info.absoluteFilePath(), info.absoluteFilePath(),
-                                                  KUrl(info.absoluteFilePath()), driveIcon);
-        }
+        KFilePlacesItem::createSystemBookmark(d->bookmarkManager,
+                                              "Computer", I18N_NOOP2("KFile System Bookmarks", "Computer"),
+                                              KUrl("computer:"), "Computer");
 #else
         KFilePlacesItem::createSystemBookmark(d->bookmarkManager,
                                               "Root", I18N_NOOP2("KFile System Bookmarks", "Root"),
</pre>
  </td>
 </tr>
</tbody></table>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Testing </h1>
<table style="border:1px solid #b8b5a0" bgcolor="#ffffff" cellpadding="10" cellspacing="0" width="100%">
 <tbody><tr>
  <td>
   <pre style="margin:0;padding:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word">Tested using MSVC 2008 on a windows 7 machine</pre>
  </td>
 </tr>
</tbody></table>



<div style="margin-top:1.5em">
 <b style="color:#575012;font-size:10pt;margin-top:1.5em">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=163448" target="_blank">163448</a>, 

 <a href="https://bugs.kde.org/show_bug.cgi?id=169628" target="_blank">169628</a>


</div>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Diffs </h1>
<ul style="margin-left:3em;padding-left:0">

 <li>trunk/KDE/kdebase/apps/konqueror/sidebar/default_entries/CMakeLists.txt <span style="color:grey">(1209179)</span></li>

 <li>trunk/KDE/kdebase/apps/konqueror/sidebar/default_entries/computer.desktop <span style="color:grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdebase/runtime/kioslave/CMakeLists.txt <span style="color:grey">(1209179)</span></li>

 <li>trunk/KDE/kdebase/runtime/kioslave/computer/CMakeLists.txt <span style="color:grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdebase/runtime/kioslave/computer/Messages.sh <span style="color:grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdebase/runtime/kioslave/computer/computer.protocol <span style="color:grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdebase/runtime/kioslave/computer/kio_computer.h <span style="color:grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdebase/runtime/kioslave/computer/kio_computer.cpp <span style="color:grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/6207/diff/" style="margin-left:3em" target="_blank">View Diff</a></p>



<h1 style="color:#575012;font-size:10pt;margin-top:1.5em">Screenshots </h1>

<div>

 <a href="http://svn.reviewboard.kde.org/r/6207/s/589/" target="_blank"><img src="" style="border:1px black solid" alt="Konqueror with sidebar"></a>

 <a href="http://svn.reviewboard.kde.org/r/6207/s/590/" target="_blank"><img src="" style="border:1px black solid" alt="Dolphin"></a>

</div>


  </div></div></td>
 </tr>
</tbody></table>








  </div>
 </div>


</blockquote></div><br><br>Just out of curiosity, why is this limited to only windows?  A bunch of users have requested something similar for Linux as well, apparently preferring that interface to the dolphin places panel.  <br>

<br>It has uses beyond the normal file manager.  For instance it could be used in the folder view widget as an alternative to the device notifier, allowing people to use the popup navigation in folderview  to drill down into removable media (I personally would prefer such an interface to the existing device notifier).  It could be used by S&L containment to provide removable device access and navigation in one interface.  <br>

<br>I think this has potential to provide a lot of useful capabilities to Linux as well as to Windows.<br><br>-Todd<br>