diff options
Diffstat (limited to 'lib/service')
| -rw-r--r-- | lib/service/listboxservice.cpp | 30 | ||||
| -rw-r--r-- | lib/service/servicedvb.cpp | 26 |
2 files changed, 42 insertions, 14 deletions
diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp index f413f2e2..19ff6933 100644 --- a/lib/service/listboxservice.cpp +++ b/lib/service/listboxservice.cpp @@ -155,7 +155,37 @@ int eListboxServiceContent::setCurrentMarked(bool state) m_current_marked = state; if (state != prev && m_listbox) + { m_listbox->entryChanged(m_cursor_number); + if (!state) + { + ePtr<iListableService> lst; + if (m_service_center->list(m_root, lst)) + eDebug("no list available!"); + else + { + ePtr<iMutableServiceList> list; + if (lst->startEdit(list)) + eDebug("no editable list"); + else + { + eServiceReference ref; + getCurrent(ref); + if(!ref) + eDebug("no valid service selected"); + else + { + int pos = cursorGet(); + eDebugNoNewLine("move %s to %d ", ref.toString().c_str(), pos); + if (list->moveService(ref, cursorGet())) + eDebug("failed"); + else + eDebug("ok"); + } + } + } + } + } return 0; } diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 94833f44..b1c18a1d 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -66,7 +66,7 @@ RESULT eStaticServiceDVBBouquetInformation::getName(const eServiceReference &ref return err; } - const eBouquet *bouquet=0; + eBouquet *bouquet=0; if ((err = db->getBouquet(ref, bouquet)) != 0) { eDebug("eStaticServiceDVBBouquetInformation::getName failed.. getBouquet failed!"); @@ -280,10 +280,9 @@ RESULT eDVBServiceList::startEdit(ePtr<iMutableServiceList> &res) if (eDVBResourceManager::getInstance(resm) || resm->getChannelList(db)) return -1; - // FIXME! - if (db->getBouquet(m_parent, (const eBouquet*&)m_bouquet) != 0) + if (db->getBouquet(m_parent, m_bouquet) != 0) return -1; - + res = this; return 0; @@ -294,24 +293,23 @@ RESULT eDVBServiceList::startEdit(ePtr<iMutableServiceList> &res) RESULT eDVBServiceList::addService(eServiceReference &ref) { - ASSERT(m_bouquet); -// return m_bouquet->addService(ref); - return -1; + if (!m_bouquet) + return -1; + return m_bouquet->addService(ref); } RESULT eDVBServiceList::removeService(eServiceReference &ref) { - ASSERT(m_bouquet); -// return m_bouquet->removeService(ref); - return -1; + if (!m_bouquet) + return -1; + return m_bouquet->removeService(ref); } RESULT eDVBServiceList::moveService(eServiceReference &ref, int pos) { - ASSERT(m_bouquet); - -// return m_bouquet->moveService(ref, pos); - return -1; + if (!m_bouquet) + return -1; + return m_bouquet->moveService(ref, pos); } RESULT eServiceFactoryDVB::play(const eServiceReference &ref, ePtr<iPlayableService> &ptr) |
