Index: mythtv/themes/default/config-ui.xml
===================================================================
--- mythtv/themes/default/config-ui.xml	(revision 20306)
+++ mythtv/themes/default/config-ui.xml	(working copy)
@@ -124,11 +124,6 @@
             <position>210,430</position>
         </buttonlist>
 
-        <button name="delete" from="basebutton">
-            <position>620,427</position>
-            <value>Delete</value>
-        </button>
-
         <textarea name="nochannumlabel" from="basetextarea">
             <area>70,496,500,60</area>
             <value>Hide Channels without channel number.</value>
@@ -143,11 +138,6 @@
             <value>Channel Scan</value>
         </button>
 
-        <button name="importicons" from="basewidebutton">
-            <position>325,540</position>
-            <value>Icon Download</value>
-        </button>
-
         <button name="edittransport" from="basewidebutton">
             <position>585,540</position>
             <value>Edit Transports</value>
Index: mythtv/programs/mythtv-setup/channeleditor.cpp
===================================================================
--- mythtv/programs/mythtv-setup/channeleditor.cpp	(revision 20306)
+++ mythtv/programs/mythtv-setup/channeleditor.cpp	(working copy)
@@ -23,7 +23,6 @@
 #include "sourceutil.h"
 
 #include "scanwizard.h"
-#include "importicons.h"
 
 ChannelWizard::ChannelWizard(int id, int default_sourceid)
     : ConfigurationWizard()
@@ -121,6 +120,9 @@
     m_currentSortMode = tr("Channel Name");
     m_sourceFilter = FILTER_ALL; // All
     m_currentHideMode = false;
+    m_selectedChannelName = "";
+    m_dialogIsRunning = false;
+
 }
 
 bool ChannelEditor::Create()
@@ -137,24 +139,18 @@
     m_sourceList = dynamic_cast<MythUIButtonList *>(GetChild("source"));
     m_channelList = dynamic_cast<MythUIButtonList *>(GetChild("channels"));
 
-    MythUIButton *deleteButton = dynamic_cast<MythUIButton *>(GetChild("delete"));
     MythUIButton *scanButton = dynamic_cast<MythUIButton *>(GetChild("scan"));
-    MythUIButton *importIconButton = dynamic_cast<MythUIButton *>(GetChild("importicons"));
     MythUIButton *transportEditorButton = dynamic_cast<MythUIButton *>(GetChild("edittransport"));
 
     MythUICheckBox *hideCheck = dynamic_cast<MythUICheckBox *>(GetChild("nochannum"));
 
-    if (!sortList || !m_sourceList || !m_channelList || !deleteButton ||
-        !scanButton || !importIconButton || !transportEditorButton ||
-        !hideCheck)
+    if (!sortList || !m_sourceList || !m_channelList || !scanButton ||
+        !transportEditorButton || !hideCheck)
     {
 
         return false;
     }
 
-    // Delete button help text
-    deleteButton->SetHelpText(tr("Delete all channels on currently selected source(s)."));
-
     // Sort List
     new MythUIButtonListItem(sortList, tr("Channel Name"));
     new MythUIButtonListItem(sortList, tr("Channel Number"));
@@ -190,11 +186,6 @@
     scanButton->SetHelpText(tr("Starts the channel scanner."));
     scanButton->SetEnabled(SourceUtil::IsAnySourceScanable());
 
-    // Import Icons Button
-    importIconButton->SetHelpText(tr("Starts the icon downloader"));
-    importIconButton->SetEnabled(SourceUtil::IsAnySourceScanable());
-    connect(importIconButton,  SIGNAL(Clicked()), SLOT(channelIconImport()));
-
     // Transport Editor Button
     transportEditorButton->SetHelpText(
         tr("Allows you to edit the transports directly. "
@@ -207,7 +198,6 @@
     connect(m_channelList, SIGNAL(itemClicked(MythUIButtonListItem *)),
             SLOT(edit(MythUIButtonListItem *)));
     connect(scanButton, SIGNAL(Clicked()), SLOT(scan()));
-    connect(deleteButton,  SIGNAL(Clicked()), SLOT(deleteChannels()));
 
     fillList();
 
@@ -236,8 +226,29 @@
         }
         else if (action == "DELETE")
         {
-            del();
+            int channelID = 0;
+            MythUIButtonListItem *item = m_channelList->GetItemCurrent();
+            if (item)
+                channelID = item->GetData().toInt();
+
+            if (channelID > 0)
+            {
+                GetSelectedChannelName(channelID);
+                deleteChannelsMenu();            
+            }
+            else
+                handled = true;
         }
+        else if (action == "ESCAPE")
+        {
+            if (m_dialogIsRunning)
+            {
+                iconWizard->Cancel();
+                m_dialogIsRunning = false;
+            }
+            else
+                handled = false;
+        }
         else
             handled = false;
     }
@@ -250,6 +261,7 @@
 
 void ChannelEditor::fillList(void)
 {
+    m_dialogIsRunning = false;
     QString currentValue = m_channelList->GetValue();
     uint    currentIndex = qMax(m_channelList->GetCurrentPos(), 0);
     m_channelList->Reset();
@@ -399,34 +411,62 @@
     }
 }
 
-void ChannelEditor::deleteChannels(void)
+void ChannelEditor::deleteChannelsMenu(void)
 {
-    const QString currentLabel = m_sourceList->GetValue();
+    QString chan_msg;
+    
+    if (!m_selectedChannelName.isEmpty())
+    {
+        chan_msg = tr("Are you sure you would like to delete channel %1?")
+                       .arg(m_selectedChannelName);
+    }
+    else if (m_sourceFilter == FILTER_ALL)
+    {
+        chan_msg = tr("Are you sure you would like to delete ALL channels?");
+    }
+    else if (m_sourceFilter == FILTER_UNASSIGNED)
+    {
+        chan_msg = tr("Are you sure you would like to delete all unassigned channels?");
+    }
+    else
+    {
+        chan_msg = tr("Are you sure you would like to delete the channels on %1?")
+                       .arg(m_sourceList->GetValue());
+    }
 
-    bool del_all = m_sourceFilter == FILTER_ALL;
-    bool del_nul = m_sourceFilter == FILTER_UNASSIGNED;
+    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+    MythDialogBox *delChanMenu = new MythDialogBox(chan_msg, popupStack, "deletechannelsmenu");
+    if (delChanMenu->Create())
+    {
+        delChanMenu->SetReturnEvent(this, "deletechannelsmenu");
+ 
+        delChanMenu->AddButton(tr("Yes, delete the channel(s)"));
+        delChanMenu->AddButton(tr("No, don't"));
+ 
+        popupStack->AddScreen(delChanMenu);
+    }
+    else
+        delete delChanMenu;
+}
 
-    QString chan_msg =
-        (del_all) ? tr("Are you sure you would like to delete ALL channels?") :
-        ((del_nul) ?
-         tr("Are you sure you would like to delete all unassigned channels?") :
-         tr("Are you sure you would like to delete the channels on %1?")
-         .arg(currentLabel));
-
-    DialogCode val = MythPopupBox::Show2ButtonPopup(
-        gContext->GetMainWindow(), "", chan_msg,
-        tr("Yes, delete the channels"),
-        tr("No, don't"), kDialogCodeButton1);
-
-    if (kDialogCodeButton0 != val)
-        return;
-
+void ChannelEditor::deleteChannels(void)
+{
     MSqlQuery query(MSqlQuery::InitCon());
-    if (del_all)
+    if (!m_selectedChannelName.isEmpty())
     {
+        MythUIButtonListItem *item = m_channelList->GetItemCurrent();
+        if (!item)
+            return;
+        m_id = item->GetData().toInt();
+
+        query.prepare("DELETE FROM channel WHERE chanid = :CHID ;");
+        query.bindValue(":CHID", m_id);
+    }
+    else if (m_sourceFilter == FILTER_ALL)
+    {
         query.prepare("TRUNCATE TABLE channel");
     }
-    else if (del_nul)
+    else if (m_sourceFilter == FILTER_UNASSIGNED)
     {
         query.prepare("SELECT sourceid "
                       "FROM videosource "
@@ -463,6 +503,8 @@
     if (!query.exec())
         MythDB::DBError("ChannelEditor Delete Channels", query);
 
+    m_selectedChannelName = "";
+
     fillList();
 }
 
@@ -478,33 +520,6 @@
     fillList();
 }
 
-void ChannelEditor::del()
-{
-    MythUIButtonListItem *item = m_channelList->GetItemCurrent();
-
-    if (!item)
-        return;
-
-    m_id = item->GetData().toInt();
-
-    DialogCode val = MythPopupBox::Show2ButtonPopup(
-        gContext->GetMainWindow(),
-        "", tr("Are you sure you would like to delete this channel?"),
-        tr("Yes, delete the channel"),
-        tr("No, don't"), kDialogCodeButton1);
-
-    if (kDialogCodeButton0 == val)
-    {
-        MSqlQuery query(MSqlQuery::InitCon());
-        query.prepare("DELETE FROM channel WHERE chanid = :CHID ;");
-        query.bindValue(":CHID", m_id);
-        if (!query.exec() || !query.isActive())
-            MythDB::DBError("ChannelEditor Delete Channel", query);
-
-        fillList();
-    }
-}
-
 void ChannelEditor::menu()
 {
     MythUIButtonListItem *item = m_channelList->GetItemCurrent();
@@ -517,6 +532,8 @@
        edit(item);
     else
     {
+        GetSelectedChannelName(m_id);
+        
         QString label = tr("Channel Options");
 
         MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
@@ -527,9 +544,22 @@
         {
             menu->SetReturnEvent(this, "channelopts");
 
-            menu->AddButton(tr("Edit"));
-            menu->AddButton(tr("Delete"));
+            menu->AddButton(tr("Edit channel %1").arg(m_selectedChannelName));
+            menu->AddButton(tr("Delete channel %1").arg(m_selectedChannelName));
+            menu->AddButton(tr("Download channel icon for %1").arg(m_selectedChannelName));
+            QString filter = "";
+            if (m_sourceFilter == FILTER_ALL)
+                filter = "ALL";
+            else if (m_sourceFilter == FILTER_UNASSIGNED)
+                filter = "UNASSIGNED";
+            else
+                filter = m_sourceList->GetValue();
 
+            menu->AddButton(tr("Rescan for missing channel icons"));
+            menu->AddButton(tr("Download all channel icons"));
+
+            menu->AddButton(tr("Delete %1 channels").arg(filter));
+
             popupStack->AddScreen(menu);
         }
         else
@@ -556,69 +586,57 @@
 
 void ChannelEditor::transportEditor(void)
 {
-    TransportListEditor *editor = new TransportListEditor(m_sourceFilter);
-    editor->exec();
-    editor->deleteLater();
+    MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
 
+    TransportListEditor *transportedit = new TransportListEditor(mainStack, m_sourceFilter);
+
+    if (transportedit->Create())
+        mainStack->AddScreen(transportedit);
+    else
+        delete transportedit;
+
     fillList();
 }
 
-void ChannelEditor::channelIconImport(void)
+void ChannelEditor::channelIconDownload(bool refresh, const QString &channelname)
 {
-    if (m_channelList->GetCount() == 0)
+    MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+
+    iconWizard = new ImportIconsWizard(mainStack, refresh, channelname);
+
+    if (iconWizard->Create())
     {
-        ShowOkPopup(tr("Add some channels first!"));
+        m_dialogIsRunning = true;
+        connect(iconWizard, SIGNAL(Exiting()), SLOT(fillList()));
+        iconWizard->Run();
+    }
+    else
+        delete iconWizard;
+
+    m_selectedChannelName = "";
+}
+
+/**
+ * \brief Get selected channel name from database.
+*/
+void ChannelEditor::GetSelectedChannelName(int chanid)
+{
+    if (chanid == 0)
+    {   // If no channel selected
+        m_selectedChannelName = "";
         return;
     }
 
-    int channelID = 0;
-    MythUIButtonListItem *item = m_channelList->GetItemCurrent();
-    if (item)
-        channelID = item->GetData().toInt();
-
-    // Get selected channel name from database
     QString querystr = QString("SELECT channel.name FROM channel "
-                               "WHERE chanid='%1'").arg(channelID);
-    QString channelname;
+                               "WHERE chanid='%1'").arg(chanid);
+    
     MSqlQuery query(MSqlQuery::InitCon());
     query.prepare(querystr);
 
     if (query.exec() && query.next())
     {
-        channelname = query.value(0).toString();
+        m_selectedChannelName = query.value(0).toString();
     }
-
-    QStringList buttons;
-    buttons.append(tr("Cancel"));
-    buttons.append(tr("Download all icons.."));
-    buttons.append(tr("Rescan for missing icons.."));
-    if (!channelname.isEmpty())
-        buttons.append(tr("Download icon for ") + channelname);
-
-    int val = MythPopupBox::ShowButtonPopup(gContext->GetMainWindow(),
-                                             "", "Channel Icon Import", buttons, kDialogCodeButton2);
-
-    MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
-
-    ImportIconsWizard *iconwizard;
-    if (val == kDialogCodeButton0) // Cancel pressed
-        return;
-    else if (val == kDialogCodeButton1) // Import all icons pressed
-        iconwizard = new ImportIconsWizard(mainStack, false);
-    else if (val == kDialogCodeButton2) // Rescan for missing pressed
-        iconwizard = new ImportIconsWizard(mainStack, true);
-    else if (val == kDialogCodeButton3) // Import a single channel icon
-        iconwizard = new ImportIconsWizard(mainStack, true, channelname);
-    else
-        return;
-
-    if (iconwizard->Create())
-    {
-        connect(iconwizard, SIGNAL(Exiting()), SLOT(fillList()));
-        mainStack->AddScreen(iconwizard);
-    }
-    else
-        delete iconwizard;
 }
 
 void ChannelEditor::customEvent(QEvent *event)
@@ -635,13 +653,38 @@
         {
             switch (buttonnum)
             {
-                case 0 :
+                case 0 : // Edit Channel
                     edit(m_channelList->GetItemCurrent());
                     break;
-                case 1 :
-                    del();
+                case 1 : // Delete single channel
+                    deleteChannelsMenu();
                     break;
+                case 2 : // Download specific icon
+                    channelIconDownload(false, m_selectedChannelName);
+                    break;
+                case 3 : // Download missing icons
+                    channelIconDownload(true, "");
+                    break;
+                case 4 : // Download all icons
+                    channelIconDownload(false, "");
+                    break;
+                case 5 : // Delete channels from source
+                    m_selectedChannelName = "";
+                    deleteChannelsMenu();
+                    break;
             }
         }
+        else if (resultid == "deletechannelsmenu")
+        {
+            switch (buttonnum)
+            {
+                case 0 : // Confirm channel(s) delete
+                    deleteChannels();
+                    break;
+                case 1 : // Cancel channel(s) deleteChannels
+                    m_selectedChannelName = "";
+                    break;
+            }
+        }
     }
 }
Index: mythtv/programs/mythtv-setup/channeleditor.h
===================================================================
--- mythtv/programs/mythtv-setup/channeleditor.h	(revision 20306)
+++ mythtv/programs/mythtv-setup/channeleditor.h	(working copy)
@@ -4,6 +4,7 @@
 #include "mythscreentype.h"
 
 #include "settings.h"
+#include "importicons.h"
 
 class MythUIButton;
 class MythUIButtonList;
@@ -22,11 +23,12 @@
 
   protected slots:
     void menu();
-    void del();
     void edit(MythUIButtonListItem *item);
     void scan(void);
     void transportEditor(void);
-    void channelIconImport(void);
+    void channelIconDownload(bool refresh, const QString &channelname);
+    void GetSelectedChannelName(int chanid);
+    void deleteChannelsMenu(void);
     void deleteChannels(void);
     void setSortMode(MythUIButtonListItem *item);
     void setSourceID(MythUIButtonListItem *item);
@@ -47,6 +49,10 @@
 
     MythUIButtonList *m_channelList;
     MythUIButtonList *m_sourceList;
+
+    bool m_dialogIsRunning;
+    QString m_selectedChannelName;
+    ImportIconsWizard *iconWizard;
 };
 
 class ChannelID;
Index: mythtv/programs/mythtv-setup/importicons.cpp
===================================================================
--- mythtv/programs/mythtv-setup/importicons.cpp	(revision 20306)
+++ mythtv/programs/mythtv-setup/importicons.cpp	(working copy)
@@ -35,6 +35,8 @@
     m_popupStack = GetMythMainWindow()->GetStack("popup stack");
     m_progressDialog = NULL;
 
+    m_closeDialog = false;
+
     m_tmpDir = QDir(QString("%1/icontmp").arg(GetConfDir()));
 
     if (!m_tmpDir.exists())
@@ -92,9 +94,6 @@
     connect(m_iconsList, SIGNAL(itemClicked(MythUIButtonListItem *)),
             SLOT(menuSelection(MythUIButtonListItem *)));
 
-    if (!initialLoad(m_strChannelname))
-        return false;
-
     BuildFocusList();
 
     enableControls(STATE_NORMAL);
@@ -150,7 +149,7 @@
     m_missingIter++;
 
     if (!doLoad())
-        Close();
+        return;
 }
 
 void ImportIconsWizard::menuSelection(MythUIButtonListItem *item)
@@ -197,7 +196,7 @@
         m_missingCount++;
         m_missingIter++;
         if (!doLoad())
-            Close();
+            return;
     }
     else
     {
@@ -207,12 +206,11 @@
         if (!m_strMatches.isEmpty())
             askSubmit(m_strMatches);
         else
-            Close();
+            return;
     }
-
 }
 
-bool ImportIconsWizard::initialLoad(QString name)
+void ImportIconsWizard::Run(void)
 {
     QString dirpath = GetConfDir();
     QDir configDir(dirpath);
@@ -230,8 +228,6 @@
     }
     m_strChannelDir += "/";
 
-    bool closeDialog = false;
-
     QString querystring("SELECT chanid, name, xmltvid, callsign,"
                         "dtv_multiplex.transportid, atsc_major_chan, "
                         "atsc_minor_chan, dtv_multiplex.networkid, "
@@ -240,8 +236,8 @@
                         "FROM channel LEFT JOIN dtv_multiplex "
                         "ON channel.mplexid = dtv_multiplex.mplexid "
                         "WHERE ");
-    if (!name.isEmpty())
-        querystring.append("name=\"" + name + "\"");
+    if (!m_strChannelname.isEmpty())
+        querystring.append("name=\"" + m_strChannelname + "\"");
     else
         querystring.append("channel.visible");
     querystring.append(" ORDER BY name");
@@ -332,7 +328,7 @@
         m_progressDialog = NULL;
     }
 
-    while (!closeDialog && (m_iter != m_listEntries.end()))
+    while (!m_closeDialog && (m_iter != m_listEntries.end()))
     {
         QString message = QString("Downloading %1 / %2 : ").arg(m_nCount+1)
             .arg(m_listEntries.size()) + (*m_iter).strName;
@@ -360,19 +356,22 @@
         m_progressDialog = NULL;
     }
 
-    if (m_missingEntries.size() == 0 || closeDialog)
-        return false;
+    if (m_missingEntries.size() == 0 || m_closeDialog)
+    {
+        Close();
+        return;
+    }
 
     if (m_nMaxCount > 0)
     {
         m_missingIter = m_missingEntries.begin();
+    
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        mainStack->AddScreen(this);
+
         if (!doLoad())
-            return false;
+            return;
     }
-    else
-        return false;
-
-    return true;
 }
 
 bool ImportIconsWizard::doLoad()
@@ -386,6 +385,7 @@
         enableControls(STATE_DISABLED);
         if (!m_strMatches.isEmpty())
             askSubmit(m_strMatches);
+        Close();
         return false;
     }
     else
@@ -720,6 +720,11 @@
     }
 }
 
+void ImportIconsWizard::Cancel()
+{
+    m_closeDialog = true;
+}
+
 void ImportIconsWizard::customEvent(QEvent *event)
 {
     if (event->type() == kMythDialogBoxCompletionEventType)
Index: mythtv/programs/mythtv-setup/importicons.h
===================================================================
--- mythtv/programs/mythtv-setup/importicons.h	(revision 20306)
+++ mythtv/programs/mythtv-setup/importicons.h	(working copy)
@@ -37,8 +37,10 @@
    ~ImportIconsWizard();
 
     bool Create(void);
+    void Run(void);
 //    bool keyPressEvent(QKeyEvent *);
     void customEvent(QEvent *event);
+    void Cancel(void);
 
     struct SearchEntry               //! search entry results
     {
@@ -135,11 +137,6 @@
      */
     bool checkAndDownload(const QString& url, const QString& localChanId);
 
-    /*! \brief attempt the inital load of the TV channel information
-     * \return true if successful
-     */
-    bool initialLoad(QString name="");
-
     /*! \brief attempts to move the iteration on one/more than one
      * \return true if we can go again or false if we can not
      */
@@ -171,6 +168,8 @@
 
     void startDialog();
 
+    bool m_closeDialog;         //!< Set to true when we want dialog to close
+
     MythScreenStack    *m_popupStack;
     MythUIProgressDialog *m_progressDialog;
 
