Index: mediaportal/Dialogs/Dialogs/GUIDialogFileStacking.cs
===================================================================
--- mediaportal/Dialogs/Dialogs/GUIDialogFileStacking.cs	(revision 26774)
+++ mediaportal/Dialogs/Dialogs/GUIDialogFileStacking.cs	(working copy)
@@ -27,12 +27,19 @@
   /// </summary>
   public class GUIDialogFileStacking : GUIDialogWindow
   {
+    private bool m_ControlTitleExists = false;
     private int m_iSelectedFile = -1;
     private int m_iFrames = -1;
     private int m_iNumberOfFiles = 0;
     private int m_MaxNumberOfCDs = 0;
     private const int m_indexStackItemOffset = 100;
-
+    string m_SelectedTitle = string.Empty;
+    int m_MovieID = -1;
+    System.Collections.ArrayList tempFiles = new System.Collections.ArrayList();
+    int dwScreenWidth = 0;
+    float screenRatio = 0.0F;
+    int dwIconDistance = 0;
+    int winOffset = 0;
     public GUIDialogFileStacking()
     {
       GetID = (int)Window.WINDOW_DIALOG_FILESTACKING;
@@ -49,6 +56,36 @@
       {
         case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
           {
+            dwScreenWidth = GUIGraphicsContext.Width;
+            GUIControl tempControl = GetControl(0);
+            int tempSubItems = tempControl.SubItemCount - 1;
+            tempControl.SelectedItem = tempSubItems;
+            tempControl.XPosition = (int)((dwScreenWidth - tempControl.Width) / 2); //400;
+
+            //Test for movie title control for stacked discs.
+            //If it exists change the exists flag to true and run appropriate code in various locations. cyberfix
+            //This prevents skins without the control from having problems and it defaults to the original behavior.
+            GUIControl tempControl2 = GetControl(20);
+            if (tempControl2 != null)
+            {
+                m_ControlTitleExists = true;
+            }            
+
+            //Code to querry for movie title if control exists to display it
+            if (m_ControlTitleExists)
+            {
+                m_SelectedTitle = GUIPropertyManager.GetProperty("#title");
+                SQLite.NET.SQLiteResultSet mResults = Video.Database.VideoDatabase.GetResults("SELECT * FROM movieinfo WHERE strTitle = '" + m_SelectedTitle + "'");
+                if (mResults.Rows.Count > 0)
+                {
+                    m_MovieID = int.Parse(mResults.Rows[0].fields[0]);
+                }
+            }
+            else
+            {
+                Log.Warn("Missing control ID ({0}) in dialogFileStacking.xml (File stacking will not show selected disc title)", 20);
+            }
+
             base.OnMessage(message);
             m_iSelectedFile = -1;
             m_iFrames = 0;
@@ -80,10 +117,48 @@
             // disable CD's we dont use
             for (int i = m_iNumberOfFiles + 1; i <= 40; ++i)
             {
-              HideControl(GetID, i + m_indexStackItemOffset);
-              DisableControl(GetID, i + m_indexStackItemOffset);
+                HideControl(GetID, i + m_indexStackItemOffset);
+                DisableControl(GetID, i + m_indexStackItemOffset);
             }
+                    //setup parameters for CD slide in animation
+                    dwScreenWidth = GUIGraphicsContext.Width;
+                    //dynamically center controll if it exists
+                    if (m_ControlTitleExists)
+                    {
+                        GUIControl pControlL = GetControl(20);
+                        pControlL.XPosition = (int)((dwScreenWidth - pControlL.Width) / 2);
+                    }
+                    GUIControl pControlT = GetControl(101);
+                    screenRatio = (float)dwScreenWidth / (float)System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width;
+                    dwIconDistance = (int)((float)32.0 * screenRatio);
+                    if (m_iNumberOfFiles > 14)
+                    {
+                        dwIconDistance = (int)((float)24.0 * screenRatio);
           }
+                    winOffset = ((m_iNumberOfFiles - 1) * dwIconDistance + pControlT.Width) / 2;
+
+                    //If there are stacked movies and the title control exists, place name in title box
+                    if (m_MovieID > 0 && m_ControlTitleExists)
+                    {
+                        Video.Database.VideoDatabase.GetFiles(m_MovieID, ref tempFiles);
+                        if (tempFiles.Count > 0)
+                        {
+                            int filenameStart = tempFiles[0].ToString().LastIndexOf("\\");
+                            if (filenameStart == -1) { filenameStart = 0; }
+                            else { filenameStart += 1; }
+                            int filenameEnd = tempFiles[0].ToString().LastIndexOf(".");
+                            if (filenameEnd == -1) { filenameEnd = tempFiles[0].ToString().Length; }
+                            if ((filenameEnd - filenameStart) > 0)
+                            {
+                                SetControlLabel(GetID, 20, tempFiles[0].ToString().Substring(filenameStart, filenameEnd - filenameStart));
+                            }
+                            else
+                            {
+                                SetControlLabel(GetID, 20, "");
+                            }
+                        }
+                    }
+                }
           return true;
 
         case GUIMessage.MessageType.GUI_MSG_CLICKED:
@@ -92,7 +167,40 @@
             PageDestroy();
           }
           break;
-      }
+            case GUIMessage.MessageType.GUI_MSG_SETFOCUS:
+                {
+                    if (m_ControlTitleExists)
+                    {
+                        m_iSelectedFile = message.TargetControlId - 100;
+                        if (m_iSelectedFile > 0 && m_iSelectedFile <= m_iNumberOfFiles)
+                        {
+                            //If there are stacked movies and the title control exists, place name in title box
+                            if (m_MovieID > 0)
+                            {
+                                if (tempFiles.Count > 0 && m_iSelectedFile <= tempFiles.Count)
+                                {
+                                    int filenameStart = tempFiles[m_iSelectedFile - 1].ToString().LastIndexOf("\\");
+                                    if (filenameStart == -1) { filenameStart = 0; }
+                                    else { filenameStart += 1; }
+                                    int filenameEnd = tempFiles[m_iSelectedFile - 1].ToString().LastIndexOf(".");
+                                    if (filenameEnd == -1) { filenameEnd = tempFiles[0].ToString().Length; }
+                                    if ((filenameEnd - filenameStart) > 0)
+                                    {
+                                        SetControlLabel(GetID, 20, tempFiles[m_iSelectedFile - 1].ToString().Substring(filenameStart, filenameEnd - filenameStart));
+                                    }
+                                    else
+                                    {
+                                        SetControlLabel(GetID, 20, "");
+                                    }
+                                }
+                            }
+                        }
+                        m_iSelectedFile = -1;
+                        GUIPropertyManager.SetProperty("#title", m_SelectedTitle);
+                    }
+                }
+                break;
+        }
 
       return base.OnMessage(message);
     }
@@ -105,6 +213,7 @@
         // Dialog heading
         GUIControl pDialog = GetControl(1);
         int distance = 32; // some safe value if skinner has used incorrect control IDs
+        int dwOffset = 0;
         if (pDialog != null)
         {
           GUIControl pControl = GetControl(m_indexStackItemOffset + 1);
@@ -115,22 +224,23 @@
           {
             distance = pControl.Width / 2;
           }
+          //setup offset for disc centering based on distance and number of discs. cyberfix
+          dwOffset = (((m_MaxNumberOfCDs - 1) * distance) + pControl.Width) / 2;
         }
-
+        
         // slide in...
-        int dwScreenWidth = GUIGraphicsContext.Width;
-        for (int i = 1; i <= m_MaxNumberOfCDs; ++i)
+        for (int i = 1; i <= m_iNumberOfFiles; ++i)
         {
           GUIControl pControl = GetControl(i + m_indexStackItemOffset);
           if (null != pControl)
           {
-            int dwEndPos = dwScreenWidth / 2 - ((m_MaxNumberOfCDs - i) * distance) + pDialog.Width / 2 -
-                           (int)((float)pControl.Width / 1.5);
-            int dwStartPos = dwScreenWidth / 2 + pDialog.Width / 2 - pControl.Width;
-            float fStep = dwStartPos - dwEndPos;
+            //Simplified position calculations using offset calculated above.  Discs now are centered properly. cyberfix          
+            int dwEndPos = dwScreenWidth / 2 - dwOffset +((i - 1) * distance);
+            int dwStartPos = dwScreenWidth / 2 - pDialog.Width / 2;
+            float fStep = dwEndPos - dwStartPos;
             fStep /= 25.0f;
             fStep *= m_iFrames;
-            int dwPosX = (int)(dwStartPos - fStep);
+            int dwPosX = (int)(dwStartPos + fStep);
             pControl.SetPosition(dwPosX, GUIGraphicsContext.Height / 2);
           }
         }
Index: mediaportal/MediaPortal.Base/skin/Blue3/dialogFileStacking.xml
===================================================================
--- mediaportal/MediaPortal.Base/skin/Blue3/dialogFileStacking.xml	(revision 26774)
+++ mediaportal/MediaPortal.Base/skin/Blue3/dialogFileStacking.xml	(working copy)
@@ -6,6 +6,20 @@
   <controls>
     <import>common.dialog.xml</import>
     <control>
+      <description>Movie Title value</description>
+      <type>fadelabel</type>
+      <id>20</id>
+      <posX>100</posX>
+      <posY>370</posY>
+      <width>620</width>
+      <label>-</label>
+      <font>font12</font>
+      <align>center</align>
+      <textcolor>FFFFFFFF</textcolor>
+      <animation effect="fade" time="200">WindowOpen</animation>
+      <animation effect="fade" time="200">WindowClose</animation>
+    </control>
+    <control>
       <description>CD1</description>
       <type>button</type>
       <id>101</id>
Index: mediaportal/MediaPortal.Base/skin/Blue3wide/dialogFileStacking.xml
===================================================================
--- mediaportal/MediaPortal.Base/skin/Blue3wide/dialogFileStacking.xml	(revision 26774)
+++ mediaportal/MediaPortal.Base/skin/Blue3wide/dialogFileStacking.xml	(working copy)
@@ -6,6 +6,20 @@
   <controls>
     <import>common.dialog.xml</import>
     <control>
+      <description>Movie Title value</description>
+      <type>fadelabel</type>
+      <id>20</id>
+      <posX>300</posX>
+      <posY>460</posY>
+      <width>720</width>
+      <label>-</label>
+      <font>font12</font>
+      <align>center</align>
+      <textcolor>FFFFFFFF</textcolor>
+      <animation effect="fade" time="200">WindowOpen</animation>
+      <animation effect="fade" time="200">WindowClose</animation>
+    </control>
+    <control>
       <description>CD1</description>
       <type>button</type>
       <id>101</id>
