Index: mythplugins/mythmusic/mythmusic/playbackbox.cpp
===================================================================
--- mythplugins/mythmusic/mythmusic/playbackbox.cpp	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/playbackbox.cpp	(working copy)
@@ -49,7 +49,13 @@
     playlist_tree = NULL;
     playlist_popup = NULL;
     progress = NULL;
-
+   
+//added by Anthony D'Alberto to support back button
+    back_button = NULL;
+    menu_button = NULL;
+    exec_button = NULL;
+//end of added section
+ 
     isplaying = false;
     tree_is_done = false;
     first_playlist_check = true;
@@ -226,6 +232,28 @@
 
     // Ready to go. Let's update the foreground just to be safe.
 
+//added by Anthony D'Alberto to support back button
+    back_button = getUIPushButtonType("backbutton");
+    menu_button = getUIPushButtonType("menubutton");
+    exec_button = getUIPushButtonType("execbutton");
+    
+    if (back_button!= NULL)
+    	connect(back_button, SIGNAL(pushed()), this, SLOT(back()));
+    else
+ 	back_button = NULL;
+
+    if(menu_button != NULL)
+        connect(menu_button, SIGNAL(pushed()), this, SLOT(Menu()));
+    else
+        menu_button = NULL;
+
+    if(exec_button != NULL)
+        connect(exec_button, SIGNAL(pushed()), this, SLOT(Run()));
+    else
+        exec_button = NULL;
+        
+//end of added section
+
     updateForeground();
 
     if (class LCD *lcd = LCD::Get())
@@ -588,6 +616,72 @@
     }
 }
 
+//added by Anthony D'Alberto to support back button (and mouse presses)
+void PlaybackBoxMusic::mousePressEvent(QMouseEvent *e)
+{
+        int iReturnValue;
+	if(back_button != NULL)
+	{
+        	if(back_button->getScreenArea().contains(e->x(), e->y()))
+        	{
+                	back_button->push();
+                	e->accept();
+                	return;
+        	}
+	}
+
+    if(menu_button != NULL)
+    {
+            if(menu_button->getScreenArea().contains(e->x(), e->y()))
+            {
+                menu_button->push();
+                e->accept();
+                return;
+            }
+    }
+
+    if(exec_button != NULL)
+    {
+            if(exec_button->getScreenArea().contains(e->x(), e->y()))
+            {
+                exec_button->push();
+                e->accept();
+                return;
+            }
+    }
+
+        iReturnValue = music_tree_list->mousePressHandler(e);
+
+        if(iReturnValue >= 0)
+        {
+                //the mouse was pressed in the tree control
+                e->accept();
+
+        }
+        else
+        {
+                MythThemedDialog::mousePressEvent(e);
+        }
+}
+
+void PlaybackBoxMusic::back()
+{
+        keyPressEvent(new QKeyEvent(QEvent::KeyPress, 4096, 27, 0));
+}
+
+void PlaybackBoxMusic::Menu()
+{
+      showMenu();
+}
+
+void PlaybackBoxMusic::Run()
+{
+      printf("Exec button\n");
+
+}
+
+//end of added section
+
 void PlaybackBoxMusic::showMenu()
 {
     if (playlist_popup)
@@ -629,6 +723,10 @@
         playlist_popup->addButton(tr("Tracks from current Year"), this,
                                   SLOT(byYear()));
     }
+
+    //Added by Anthiny D'Alberto to support mouswe
+        playlist_popup->addButton(tr("Cancel"), this, SLOT(closePlaylistPopup()));
+    //end of added section
     
     playlist_popup->ShowPopup(this, SLOT(closePlaylistPopup()));
 
@@ -2305,6 +2403,7 @@
     QButton *button = popup->addButton(tr("Replace"));
     popup->addButton(tr("Insert after current track"));
     popup->addButton(tr("Append to end"));
+
     button->setFocus();
 
     QLabel *splitter = popup->addLabel(" ", MythPopupBox::Small);
@@ -2337,14 +2436,14 @@
     {
         case 0:
             insertOption = PL_REPLACE;
-            break;
+             break;
         case 1:
             insertOption = PL_INSERTAFTERCURRENT;
-            break;
+             break;
         case 2:
-            insertOption = PL_INSERTATEND;
-            break;
-    }
+            insertOption = PL_INSERTATEND;            
+             break;
+     }
 
     bRemoveDups = dupsCheck->isChecked();
 
Index: mythplugins/mythmusic/mythmusic/cdrip.h
===================================================================
--- mythplugins/mythmusic/mythmusic/cdrip.h	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/cdrip.h	(working copy)
@@ -120,6 +120,9 @@
     void searchArtist(void);
     void searchAlbum(void);
     void searchGenre(void);
+//added by Anthony D'Alberto to support back button
+    void back();
+//end of added section
 
   private:
     void wireupTheme(void);
@@ -151,6 +154,10 @@
     UIPushButtonType  *m_searchAlbumButton;
     UIPushButtonType  *m_searchGenreButton;
 
+//added by Anthony D'Alberto to support the back button
+    MythPushButton *back_button;
+//end of added section
+
     int                m_currentTrack;
     int                m_totalTracks;
     vector<RipTrack*> *m_tracks;
Index: mythplugins/mythmusic/mythmusic/music-ui.xml
===================================================================
--- mythplugins/mythmusic/mythmusic/music-ui.xml	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/music-ui.xml	(working copy)
@@ -817,6 +817,7 @@
             </textbutton>
 
       </container>
+
    </window>
 
    <window name="cdripper">
Index: mythplugins/mythmusic/mythmusic/cdrip.cpp
===================================================================
--- mythplugins/mythmusic/mythmusic/cdrip.cpp	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/cdrip.cpp	(working copy)
@@ -405,6 +405,10 @@
 {
     m_CDdevice = device;
 
+//added by Anthony D'Alberto to support back button
+    back_button = NULL;
+//end of added section
+
 #ifndef _WIN32
     // if the MediaMonitor is running stop it
     m_mediaMonitorActive = false;
@@ -541,6 +545,15 @@
 
     m_trackList = (UIListType*) getUIObject("track_list");
 
+//added by Anthony D'Alberto to support back button
+    back_button = new MythPushButton(tr("Back"), m_parent);
+    if(back_button)
+    {
+    	    //vbox->addWidget(back_button);
+    	connect(back_button, SIGNAL(clicked()), this, SLOT(back()));
+    }
+//end of added section
+
     buildFocusList();
     assignFirstFocus();
 }
@@ -808,6 +821,7 @@
 bool Ripper::isNewTune(const QString& artist, const QString& album, const QString& title)
 {
 
+
     QString matchartist = artist;
     QString matchalbum = album;
     QString matchtitle = title;
@@ -905,6 +919,7 @@
                 MythContext::DBError("Delete Track", deleteQuery);
         }
     }
+
 }
 
 // static function to create a filename based on the metadata information
@@ -1603,3 +1618,10 @@
     m_ripperThread = new CDRipperThread(this, m_CDdevice, m_tracks, m_quality);
     m_ripperThread->start();
 }
+
+//added by Anthony D'Alberto to support back button
+void Ripper::back()
+{
+	keyPressEvent(new QKeyEvent(QEvent::KeyPress, 4096, 27,0));
+}
+//end of added section
Index: mythplugins/mythmusic/mythmusic/databasebox.h
===================================================================
--- mythplugins/mythmusic/mythmusic/databasebox.h	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/databasebox.h	(working copy)
@@ -48,7 +48,13 @@
     void dealWithTracks(PlaylistItem *item_ptr);
     void setCDTitle(const QString& title);
     void fillCD(void);
-    
+
+//Added by Anthony D'Alberto to support back button
+  public slots:
+    void back();
+    void Menu();
+//end of added section
+
   protected slots:
     void selected(UIListGenericTree *);
     void entered(UIListTreeType *, UIListGenericTree *);
@@ -76,6 +82,10 @@
     void CreateCDMP3();
     void BlankCDRW();
 
+//added by Anthony D'Alberto to support mouse presses
+    void mousePressEvent(QMouseEvent *e);
+//end of added section
+
   private:
     void doSelected(UIListGenericTree *, bool cd_flag);
     void doPlaylistPopup(TreeCheckItem *item_ptr);
@@ -119,6 +129,12 @@
     QStringList         treelevels;
 
     QPtrList<UITextType> m_lines;
+
+//Added by Anthony D'Alberto to support back button
+    UIPushButtonType *back_button;
+    UIPushButtonType *menu_button;
+//end of added section
+
 };
 
 #endif
Index: mythplugins/mythmusic/mythmusic/databasebox.cpp
===================================================================
--- mythplugins/mythmusic/mythmusic/databasebox.cpp	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/databasebox.cpp	(working copy)
@@ -32,6 +32,11 @@
     the_playlists = all_playlists;
     active_playlist = NULL;
 
+//Added by Anthony D'Alberto to support back button
+    back_button = NULL;
+    menu_button = NULL;
+//end of added section
+
     if (!music_ptr)
     {
         VERBOSE(VB_IMPORTANT, "We are not going to get very far with a null "
@@ -133,6 +138,22 @@
     fill_list_timer = new QTimer(this);
     connect(fill_list_timer, SIGNAL(timeout()), this, SLOT(keepFilling()));
     fill_list_timer->start(20);
+
+//Added by Anthony D'Alberto to support back button
+    back_button = getUIPushButtonType("backbutton");
+    menu_button = getUIPushButtonType("menubutton");
+    
+    if(back_button)
+	connect(back_button, SIGNAL(pushed()), this, SLOT(back()));
+    else
+	back_button = NULL;
+
+    if(menu_button)
+    connect(menu_button, SIGNAL(pushed()), this, SLOT(Menu()));
+    else
+    menu_button = NULL;
+//end of added section
+
 }
 
 DatabaseBox::~DatabaseBox()
@@ -797,6 +818,9 @@
 
     playlist_popup->addButton(tr("Rename This Playlist"), this,
                               SLOT(renamePlaylist()));
+    //added by Anthony D'Alberto to support mouse
+    playlist_popup->addButton(tr("Cancel"), this, SLOT(closePlaylistPopup()));
+    //end of added section
 
     playlist_popup->ShowPopup(this, SLOT(closePlaylistPopup()));
 
@@ -860,6 +884,10 @@
         active_popup->addButton(tr("Clear CD-RW Disk"), this,
                                 SLOT(BlankCDRW()));
 
+        //added by Anthony D'Alberto to support mouse
+        active_popup->addButton(tr("Cancel"), this, SLOT(closeActivePopup()));
+        //end of added section
+        
         double size_in_MB = 0.0;
         double size_in_sec = 0.0;
         active_playlist->computeSize(size_in_MB, size_in_sec);
@@ -1332,3 +1360,58 @@
     delete decoder;
 }
 
+//Added by Anthony D'Alberto to support mouse press
+void DatabaseBox::mousePressEvent(QMouseEvent *e)
+{
+	int iReturnValue;
+	UIListGenericTree *curItem;
+
+	if(back_button != NULL)
+	{
+		if(back_button->getScreenArea().contains(e->x(), e->y()))
+		{
+			back_button->push();
+			e->accept();
+			return;
+		}
+
+		if(menu_button->getScreenArea().contains(e->x(), e->y()))
+		{
+			menu_button->push();
+			e->accept();
+			return;
+		}
+
+	}
+
+	iReturnValue = tree->mousePressHandler(e);
+
+	if(iReturnValue >= 0)
+	{
+		e->accept();
+		if((iReturnValue & ClickCheck) == ClickCheck)
+		{
+			curItem = tree->GetCurrentPosition();
+			if(curItem)
+				selected(curItem);
+		}
+	}
+	else
+	{
+		MythThemedDialog::mousePressEvent(e);
+	}
+}
+
+void DatabaseBox::back()
+{
+	keyPressEvent(new QKeyEvent(QEvent::KeyPress, 4096, 27, 0));
+}
+
+void DatabaseBox::Menu()
+{
+    UIListGenericTree *curItem;
+    curItem = tree->GetCurrentPosition();
+    doMenus(curItem);
+}
+
+//end of added section
Index: mythplugins/mythmusic/mythmusic/playbackbox.h
===================================================================
--- mythplugins/mythmusic/mythmusic/playbackbox.h	(revision 14265)
+++ mythplugins/mythmusic/mythmusic/playbackbox.h	(working copy)
@@ -41,6 +41,10 @@
 
     bool onMediaEvent(MythMediaDevice *pDev);
 
+//added by Anthony D'Alberto to support back button
+    void mousePressEvent(QMouseEvent *e);
+//end of added section
+
   public slots:
 
     void play();
@@ -94,6 +98,11 @@
     void showSearchDialog();
     bool getInsertPLOptions(InsertPLOption &insertOption,
                             PlayPLOption &playOption, bool &bRemoveDups);
+//added by Anthony D'Alberto to support back button
+    void back();
+    void Menu();
+    void Run();
+//end of added section
 
   signals:
 
@@ -239,6 +248,12 @@
     UITextButtonType      *pledit_button;
     UITextButtonType      *vis_button;
 
+//added by Anthony D'Alberto to support back button
+    UIPushButtonType	*back_button;
+    UIPushButtonType    *menu_button;
+    UIPushButtonType    *exec_button;
+//end of added section
+
     MythProgressDialog    *progress;
     enum { kProgressNone, kProgressMusic } progress_type;
 };

