Index: /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui	(revision 1023)
+++ /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui	(revision 1024)
@@ -135,4 +135,21 @@
                         <widget class="QToolButton">
                             <property name="name">
+                                <cstring>tbEdit</cstring>
+                            </property>
+                            <property name="focusPolicy">
+                                <enum>TabFocus</enum>
+                            </property>
+                            <property name="text">
+                                <string>Edit</string>
+                            </property>
+                            <property name="autoRaise">
+                                <bool>true</bool>
+                            </property>
+                            <property name="whatsThis" stdset="0">
+                                <string>Edit selected shared folder definition.</string>
+                            </property>
+                        </widget>
+                        <widget class="QToolButton">
+                            <property name="name">
                                 <cstring>tbRemove</cstring>
                             </property>
@@ -191,4 +208,5 @@
 <slots>
     <slot>tbAddPressed()</slot>
+    <slot>tbEditPressed()</slot>
     <slot>tbRemovePressed()</slot>
     <slot>processOnItem( QListViewItem* )</slot>
Index: /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h	(revision 1023)
+++ /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h	(revision 1024)
@@ -69,4 +69,10 @@
         return aIndex >= 0 && aIndex < (int)mTextList.size() ?
             mTextList [aIndex] : QString::null;
+    }
+
+    void updateText (int aColumn, const QString &aText)
+    {
+        if (aColumn >= 0 && aColumn < (int)mTextList.size())
+            mTextList [aColumn] = aText;
     }
 
@@ -148,9 +154,21 @@
 public:
 
-    VBoxAddSFDialog (QWidget *aParent) :
+    enum DialogType { AddDType, EditDType };
+
+    VBoxAddSFDialog (QWidget *aParent, VBoxAddSFDialog::DialogType aType) :
         QDialog (aParent, "VBoxAddSFDialog", true /* modal */),
         mLePath (0), mLeName (0)
     {
-        setCaption (tr ("Add Share"));
+        switch (aType)
+        {
+            case AddDType:
+                setCaption (tr ("Add Share"));
+                break;
+            case EditDType:
+                setCaption (tr ("Edit Share"));
+                break;
+            default:
+                AssertMsgFailed (("Incorrect SF Dialog type\n"));
+        }
         QVBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10, "mainLayout");
 
@@ -199,6 +217,8 @@
 
     QString getPath() { return mLePath->text(); }
-
     QString getName() { return mLeName->text(); }
+
+    void setPath (const QString &aPath) { mLePath->setText (aPath); }
+    void setName (const QString &aName) { mLeName->setText (aName); }
 
 private slots:
@@ -262,7 +282,13 @@
     tbAdd->setIconSet (VBoxGlobal::iconSet ("select_file_16px.png",
                                             "select_file_dis_16px.png"));
+    tbEdit->setIconSet (VBoxGlobal::iconSet ("global_settings_16px.png",
+                                             "global_settings_diasbled_16px.png"));
     tbRemove->setIconSet (VBoxGlobal::iconSet ("eraser_16px.png",
                                                "eraser_disabled_16px.png"));
+    QToolTip::add (tbAdd, tr ("Add new shared folder"));
+    QToolTip::add (tbEdit, tr ("Edit selected shared folder"));
+    QToolTip::add (tbRemove, tr ("Remove selected shared folder"));
     connect (tbAdd, SIGNAL (clicked()), this, SLOT (tbAddPressed()));
+    connect (tbEdit, SIGNAL (clicked()), this, SLOT (tbEditPressed()));
     connect (tbRemove, SIGNAL (clicked()), this, SLOT (tbRemovePressed()));
     connect (listView, SIGNAL (currentChanged (QListViewItem *)),
@@ -483,5 +509,5 @@
 {
     /* Invoke Add-Box Dialog */
-    VBoxAddSFDialog dlg (this);
+    VBoxAddSFDialog dlg (this, VBoxAddSFDialog::AddDType);
     if (dlg.exec() != QDialog::Accepted)
         return;
@@ -503,4 +529,28 @@
 }
 
+void VBoxSharedFoldersSettings::tbEditPressed()
+{
+    /* Check selected item */
+    QListViewItem *selectedItem = listView->selectedItem();
+    VBoxRichListItem *item = 0;
+    if (selectedItem->rtti() == VBoxRichListItem::QIRichListItemId)
+        item = static_cast<VBoxRichListItem*> (selectedItem);
+    Assert (item);
+    /* Invoke Add-Box Dialog */
+    VBoxAddSFDialog dlg (this, VBoxAddSFDialog::EditDType);
+    dlg.setPath (item->getText (1));
+    dlg.setName (item->getText (0));
+    if (dlg.exec() != QDialog::Accepted)
+        return;
+    QString name = dlg.getName();
+    QString path = dlg.getPath();
+    /* Shared folder's name & path could not be empty */
+    Assert (!name.isEmpty() && !path.isEmpty());
+    /* Updating an edited listview item */
+    item->updateText (1, path);
+    item->updateText (0, name);
+    mIsListViewChanged = true;
+}
+
 void VBoxSharedFoldersSettings::tbRemovePressed()
 {
@@ -530,11 +580,12 @@
     if (aItem && aItem->isSelectable() && listView->selectedItem() != aItem)
         listView->setSelected (aItem, true);
-    bool removeEnabled = aItem && aItem->parent() &&
-                         isEditable (aItem->parent()->text (2));
     bool addEnabled = aItem &&
                       (isEditable (aItem->text (2)) ||
                        aItem->parent() && isEditable (aItem->parent()->text (2)));
+    bool removeEnabled = aItem && aItem->parent() &&
+                         isEditable (aItem->parent()->text (2));
+    tbAdd->setEnabled (addEnabled);
+    tbEdit->setEnabled (removeEnabled);
     tbRemove->setEnabled (removeEnabled);
-    tbAdd->setEnabled (addEnabled);
 }
 
@@ -554,3 +605,2 @@
 
 #include "VBoxSharedFoldersSettings.ui.moc"
-
