VirtualBox

Changeset 4067 in vbox


Ignore:
Timestamp:
Aug 7, 2007 3:52:44 PM (18 years ago)
Author:
vboxsync
Message:

Shared Folders Improvement:

Sort the group's names always by key & folder's names always by names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h

    r4062 r4067  
    6969
    7070    int rtti() const { return QIRichListItemId; }
     71
     72    int compare (QListViewItem *aItem, int aColumn, bool aAscending) const
     73    {
     74        /* Sorting the children always by name: */
     75        if (parent() && aItem->parent())
     76            return QListViewItem::compare (aItem, 0, aAscending);
     77        /* Sorting the root items always by key: */
     78        else if (!parent() && !aItem->parent())
     79            return QListViewItem::compare (aItem, 2, aAscending);
     80        else
     81            return QListViewItem::compare (aItem, aColumn, aAscending);
     82    }
    7183
    7284    VBoxRichListItem* nextSibling() const
     
    330342{
    331343    mDialogType = WrongType;
    332     listView->setSorting (-1);
     344    listView->setSorting (0);
    333345    new QIListViewSelectionPreserver (this, listView);
    334346    listView->setShowToolTips (false);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette