Review Request: KIOSlave implementing "computer:" protocol

Andrius Ribas andriusmao-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sat Jan 1 14:04:10 GMT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6207/
-----------------------------------------------------------

(Updated 2011-01-01 14:04:10.460100)


Review request for kde-windows, kdelibs, Peter Penz, Pino Toscano, Fredrik Höglund, David Faure, and Patrick Spendrin.


Summary
-------

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"),


This addresses bugs 163448 and 169628.
    https://bugs.kde.org/show_bug.cgi?id=163448
    https://bugs.kde.org/show_bug.cgi?id=169628


Diffs
-----

  trunk/KDE/kdebase/apps/konqueror/sidebar/default_entries/CMakeLists.txt 1209179 
  trunk/KDE/kdebase/apps/konqueror/sidebar/default_entries/computer.desktop PRE-CREATION 
  trunk/KDE/kdebase/runtime/kioslave/CMakeLists.txt 1209179 
  trunk/KDE/kdebase/runtime/kioslave/computer/CMakeLists.txt PRE-CREATION 
  trunk/KDE/kdebase/runtime/kioslave/computer/Messages.sh PRE-CREATION 
  trunk/KDE/kdebase/runtime/kioslave/computer/computer.protocol PRE-CREATION 
  trunk/KDE/kdebase/runtime/kioslave/computer/kio_computer.h PRE-CREATION 
  trunk/KDE/kdebase/runtime/kioslave/computer/kio_computer.cpp PRE-CREATION 

Diff: http://svn.reviewboard.kde.org/r/6207/diff


Testing
-------

Tested using MSVC 2008 on a windows 7 machine


Screenshots
-----------

Konqueror with sidebar
  http://svn.reviewboard.kde.org/r/6207/s/589/
Dolphin
  http://svn.reviewboard.kde.org/r/6207/s/590/


Thanks,

Andrius

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110101/eef01a34/attachment.htm>
-------------- next part --------------
_______________________________________________
Kde-windows mailing list
Kde-windows-RoXCvvDuEio at public.gmane.org
https://mail.kde.org/mailman/listinfo/kde-windows


More information about the kde-core-devel mailing list