Index: trunk/src/VBox/Frontends/VirtualBox/Makefile
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile	(revision 1121)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile	(revision 1177)
@@ -74,5 +74,6 @@
 # Sources containing local definitions of classes that use the Q_OBJECT macro
 ifneq ($(BUILD_TARGET),win)
-VirtualBox_QT_MOCSRCS = src/COMDefs.cpp
+VirtualBox_QT_MOCSRCS = src/COMDefs.cpp \
+						src/VBoxSelectorWnd.cpp
 endif
 
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h	(revision 1121)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h	(revision 1177)
@@ -38,4 +38,5 @@
 class VBoxSnapshotsWgt;
 class VBoxVMDetailsView;
+class VBoxVMDescriptionPage;
 
 class QLabel;
@@ -64,5 +65,5 @@
 
     void vmNew();
-    void vmSettings (const QString &category = QString::null);
+    void vmSettings (const QString &category = QString::null, int = 0);
     void vmDelete();
     void vmStart();
@@ -72,5 +73,6 @@
     void refreshVMList();
     void refreshVMItem (const QUuid &aID, bool aDetails,
-                                          bool aSnapshots);
+                                          bool aSnapshots,
+                                          bool aDescription);
 
     void showHelpContents();
@@ -90,5 +92,6 @@
 
     void vmListBoxCurrentChanged (bool aRefreshDetails = true,
-                                  bool aRefreshSnapshots = true);
+                                  bool aRefreshSnapshots = true,
+                                  bool aRefreshDescription = true);
     void mediaEnumFinished (const VBoxMediaList &);
 
@@ -123,4 +126,5 @@
     VBoxVMDetailsView *vmDetailsView;
     VBoxSnapshotsWgt *vmSnapshotsWgt;
+    VBoxVMDescriptionPage *vmDescriptionPage;
 
     QValueList <CSession> sessions;
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp	(revision 1121)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp	(revision 1177)
@@ -194,4 +194,85 @@
         mRefreshButton->setUsesTextLabel (true);
     }
+}
+
+// VBoxVMDescriptionPage class
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Comments page widget to represent VM comments.
+ */
+class VBoxVMDescriptionPage : public QWidget
+{
+    Q_OBJECT
+
+public:
+
+    VBoxVMDescriptionPage (VBoxSelectorWnd *, const char *);
+    ~VBoxVMDescriptionPage() {}
+
+    void setMachine (const CMachine &);
+
+    void languageChange();
+
+private slots:
+
+    void goToSettings();
+
+private:
+
+    VBoxSelectorWnd *mParent;
+    QToolButton *mBtnEdit;
+    QTextBrowser *mBrowser;
+};
+
+VBoxVMDescriptionPage::VBoxVMDescriptionPage (VBoxSelectorWnd *aParent,
+                                              const char *aName)
+    : QWidget (aParent, aName), mParent (aParent)
+    , mBtnEdit (0), mBrowser (0)
+{
+    /* main layout creation */
+    QVBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10, "mainLayout");
+    /* mBrowser creation */
+    mBrowser = new QTextBrowser (this, "mBrowser");
+    mBrowser->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mBrowser->setFocusPolicy (QWidget::StrongFocus);
+    mBrowser->setLinkUnderline (false);
+    mBrowser->setFrameShape (QFrame::NoFrame);
+    mBrowser->setPaper (backgroundBrush());
+    mainLayout->addWidget (mBrowser);
+    /* button layout creation */
+    QHBoxLayout *btnLayout = new QHBoxLayout (mainLayout, 10, "btnLayout");
+    QSpacerItem *spacer = new QSpacerItem (0, 0,
+                                           QSizePolicy::Expanding,
+                                           QSizePolicy::Minimum);
+    btnLayout->addItem (spacer);
+    /* button creation */
+    mBtnEdit = new QToolButton (this, "mBtnEdit");
+    mBtnEdit->setFocusPolicy (QWidget::StrongFocus);
+    mBtnEdit->setIconSet (VBoxGlobal::iconSet ("edit_shared_folder_16px.png",
+                          "edit_shared_folder_disabled_16px.png"));
+    mBtnEdit->setTextPosition (QToolButton::BesideIcon);
+    mBtnEdit->setUsesTextLabel (true);
+    connect (mBtnEdit, SIGNAL (clicked()), this, SLOT (goToSettings()));
+    btnLayout->addWidget (mBtnEdit);
+
+    /* apply language settings */
+    languageChange();
+}
+
+void VBoxVMDescriptionPage::setMachine (const CMachine &aMachine)
+{
+    mBrowser->setText (aMachine.GetDescription());
+}
+
+void VBoxVMDescriptionPage::languageChange()
+{
+    mBtnEdit->setTextLabel (tr ("Edit"));
+    mBtnEdit->setAccel (QString ("Ctrl+E"));
+}
+
+void VBoxVMDescriptionPage::goToSettings()
+{
+    mParent->vmSettings ("#general", 2);
 }
 
@@ -308,4 +389,10 @@
                          QString::null);
 
+    /* VM comments page */
+    vmDescriptionPage = new VBoxVMDescriptionPage (this, "vmDescriptionPage");
+    vmTabWidget->addTab (vmDescriptionPage,
+                         VBoxGlobal::iconSet ("edit_shared_folder_16px.png"),
+                         QString::null);
+
     /* add actions to the toolbar */
 
@@ -526,5 +613,5 @@
  *      VBoxVMSettingsDlg::setup().
  */
-void VBoxSelectorWnd::vmSettings (const QString &category /* = QString::null */)
+void VBoxSelectorWnd::vmSettings (const QString &category, int aSubPage)
 {
     VBoxVMListBoxItem *item = (VBoxVMListBoxItem *) vmListBox->selectedItem();
@@ -543,5 +630,5 @@
     VBoxVMSettingsDlg dlg (this, "VBoxVMSettingsDlg");
     dlg.getFromMachine (m);
-    dlg.setup (category);
+    dlg.setup (category, aSubPage);
 
     if (dlg.exec() == QDialog::Accepted)
@@ -736,5 +823,5 @@
     AssertMsgReturn (item, ("Item must be always selected here"), (void) 0);
 
-    refreshVMItem (item->id(), true /* aDetails */, true /* aSnapshots */);
+    refreshVMItem (item->id(), true, true, true);
 }
 
@@ -746,10 +833,11 @@
 
 void VBoxSelectorWnd::refreshVMItem (const QUuid &aID, bool aDetails,
-                                                       bool aSnapshots)
+                                                       bool aSnapshots,
+                                                       bool aDescription)
 {
     vmListBox->refresh (aID);
     VBoxVMListBoxItem *item = (VBoxVMListBoxItem *) vmListBox->selectedItem();
     if (item && item->id() == aID)
-        vmListBoxCurrentChanged (aDetails, aSnapshots);
+        vmListBoxCurrentChanged (aDetails, aSnapshots, aDescription);
 }
 
@@ -822,4 +910,5 @@
     vmTabWidget->changeTab (vmDetailsView, tr ("&Details"));
     vmTabWidget->changeTab (vmSnapshotsWgt, tr ("&Snapshots"));
+    vmTabWidget->changeTab (vmDescriptionPage, tr ("Des&cription"));
 
     /* ensure the details and screenshot view are updated */
@@ -893,4 +982,5 @@
 
     vmDetailsView->languageChange();
+    vmDescriptionPage->languageChange();
 }
 
@@ -900,5 +990,6 @@
 
 void VBoxSelectorWnd::vmListBoxCurrentChanged (bool aRefreshDetails,
-                                               bool aRefreshSnapshots)
+                                               bool aRefreshSnapshots,
+                                               bool aRefreshDescription)
 {
     if ( !vmListBox->selectedItem() && vmListBox->currentItem() >= 0 )
@@ -931,4 +1022,8 @@
             vmSnapshotsWgt->setMachine (m);
         }
+        if (aRefreshDescription)
+        {
+            vmDescriptionPage->setMachine (m);
+        }
 
         CEnums::MachineState state = item->state();
@@ -939,4 +1034,5 @@
         vmDetailsView->setEnabled (modifyEnabled);
         vmSnapshotsWgt->setEnabled (!running);
+        vmDescriptionPage->setEnabled (!running);
 
         /* enable/disable modify actions */
@@ -1041,10 +1137,10 @@
 void VBoxSelectorWnd::machineStateChanged (const VBoxMachineStateChangeEvent &e)
 {
-    refreshVMItem (e.id, false /* aDetails */, false /* aSnapshots */);
+    refreshVMItem (e.id, false, false, false);
 }
 
 void VBoxSelectorWnd::machineDataChanged (const VBoxMachineDataChangeEvent &e)
 {
-    refreshVMItem (e.id, true /* aDetails */, false /* aSnapshots */);
+    refreshVMItem (e.id, true, false, true);
 }
 
@@ -1075,9 +1171,11 @@
 void VBoxSelectorWnd::sessionStateChanged (const VBoxSessionStateChangeEvent &e)
 {
-    refreshVMItem (e.id, false /* aDetails */, false /* aSnapshots */);
+    refreshVMItem (e.id, false, false, false);
 }
 
 void VBoxSelectorWnd::snapshotChanged (const VBoxSnapshotEvent &aEvent)
 {
-    refreshVMItem (aEvent.machineId, false, true);
-}
+    refreshVMItem (aEvent.machineId, false, true, false);
+}
+
+#include "VBoxSelectorWnd.moc"
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui	(revision 1121)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui	(revision 1177)
@@ -1182,4 +1182,41 @@
                             </grid>
                         </widget>
+                        <widget class="QWidget">
+                            <property name="name">
+                                <cstring>description</cstring>
+                            </property>
+                            <attribute name="title">
+                                <string>&amp;Description</string>
+                            </attribute>
+                            <vbox>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <property name="margin">
+                                    <number>10</number>
+                                </property>
+                                <property name="spacing">
+                                    <number>10</number>
+                                </property>
+                                <widget class="QGroupBox">
+                                    <property name="name">
+                                        <cstring>gbDescription</cstring>
+                                    </property>
+                                    <property name="title">
+                                        <string>Virtual Machine &amp;Description</string>
+                                    </property>
+                                    <vbox>
+                                        <property name="name">
+                                            <cstring>unnamed</cstring>
+                                        </property>
+                                        <widget class="QTextEdit">
+                                            <property name="name">
+                                                <cstring>teDescription</cstring>
+                                            </property>
+                                        </widget>
+                                    </vbox>
+                                </widget>
+                            </vbox>
+                        </widget>
                     </widget>
                 </vbox>
@@ -1804,5 +1841,5 @@
                                 </property>
                                 <property name="whatsThis" stdset="0">
-                                    <string>Controls the audio output driver. The &lt;b&gt;Null Audio Driver&lt;/b&gt; 
+                                    <string>Controls the audio output driver. The &lt;b&gt;Null Audio Driver&lt;/b&gt;
 makes the guest see an audio card, however every access to it will be ignored.</string>
                                 </property>
@@ -2722,5 +2759,5 @@
 <functions>
     <function access="private">init()</function>
-    <function>setup( const QString &amp; category )</function>
+    <function>setup( const QString &amp;, int )</function>
     <function>getFromMachine( const CMachine &amp; machine )</function>
     <function returnType="COMResult">putBackToMachine()</function>
Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h	(revision 1121)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h	(revision 1177)
@@ -822,11 +822,19 @@
  *      sign.
  */
-void VBoxVMSettingsDlg::setup (const QString &category)
-{
-    if (category)
-    {
-        QListViewItem *item = listView->findItem (category, listView_Link);
+void VBoxVMSettingsDlg::setup (const QString &aCategory, int aSubPage)
+{
+    if (!aCategory.isNull())
+    {
+        QListViewItem *item = listView->findItem (aCategory, listView_Link);
         if (item)
+        {
             listView->setSelected (item, true);
+            QObjectList *list = widgetStack->visibleWidget()->queryList ("QTabWidget");
+            for (QObject *obj = list->first(); obj != NULL; obj = list->next())
+            {
+                QTabWidget *tabStack = static_cast<QTabWidget*> (obj);
+                tabStack->setCurrentPage (aSubPage);
+            }
+        }
     }
 }
@@ -1066,4 +1074,7 @@
     /* Saved state folder */
     leSnapshotFolder->setText (machine.GetSnapshotFolder());
+
+    /* Description */
+    teDescription->setText (machine.GetDescription());
 
     /* hard disk images */
@@ -1380,4 +1391,7 @@
         cmachine.SetSnapshotFolder (leSnapshotFolder->text());
 
+    /* Description */
+    cmachine.SetDescription (teDescription->text());
+
     /* hard disk images */
     {
