[vlc-commits] Qt: EPG: clear epg on input change
Francois Cartegnie
git at videolan.org
Wed Dec 28 11:14:09 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 28 11:12:25 2016 +0100| [c6b4ff82a82e5d1a3f718d60f46910e9195179f8] | committer: Francois Cartegnie
Qt: EPG: clear epg on input change
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6b4ff82a82e5d1a3f718d60f46910e9195179f8
---
modules/gui/qt/dialogs/epg.cpp | 12 +++++++++++-
modules/gui/qt/dialogs/epg.hpp | 1 +
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/dialogs/epg.cpp b/modules/gui/qt/dialogs/epg.cpp
index 0485bbc..67f0950 100644
--- a/modules/gui/qt/dialogs/epg.cpp
+++ b/modules/gui/qt/dialogs/epg.cpp
@@ -77,7 +77,7 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
CONNECT( epg, itemSelectionChanged( EPGItem *), this, displayEvent( EPGItem *) );
CONNECT( THEMIM->getIM(), epgChanged(), this, scheduleUpdate() );
- CONNECT( THEMIM, inputChanged( bool ), this, updateInfos() );
+ CONNECT( THEMIM, inputChanged( bool ), this, inputChanged() );
QDialogButtonBox *buttonsBox = new QDialogButtonBox( this );
@@ -119,6 +119,12 @@ void EpgDialog::timeout()
updateInfos();
}
+void EpgDialog::inputChanged()
+{
+ epg->reset();
+ timeout();
+}
+
void EpgDialog::scheduleUpdate()
{
if( !timer->isActive() )
@@ -173,5 +179,9 @@ void EpgDialog::updateInfos()
epg->updateEPG( p_input_item );
vlc_gc_decref( p_input_item );
}
+ else
+ {
+ epg->reset();
+ }
}
}
diff --git a/modules/gui/qt/dialogs/epg.hpp b/modules/gui/qt/dialogs/epg.hpp
index 10c3ff1..1afc3c1 100644
--- a/modules/gui/qt/dialogs/epg.hpp
+++ b/modules/gui/qt/dialogs/epg.hpp
@@ -52,6 +52,7 @@ private:
private slots:
void scheduleUpdate();
+ void inputChanged();
void updateInfos();
void timeout();
void displayEvent( EPGItem * );
More information about the vlc-commits
mailing list