}
-void CFbBaseView::OnConnect(void)
+void CFbBaseView::OnStatusChanged(SUsbHostDeviceStatus status)
{
- m->pPopup = new CPopup;
- if (!m->pPopup)
- return;
- if (!m->pPopup->Create(m->eoBase)) {
- delete m->pPopup;
- m->pPopup = NULL;
- return;
- }
+ if(status == USB_HOST_DEV_CONNECTED) {
+ m->pPopup = new CPopup;
+ if (!m->pPopup)
+ return;
+ if (!m->pPopup->Create(m->eoBase)) {
+ delete m->pPopup;
+ m->pPopup = NULL;
+ return;
+ }
- if (CInfo::SourceType() == E_USB) {
- if (!FlagConnected()) {
- CInfo::SetSourceType(E_ALL);
- elm_object_text_set(m->eoBtnSource,
- _(CSourceCtxPopup::SourceText(CInfo::SourceType())));
+ if (CInfo::SourceType() == E_USB) {
+ if (!FlagConnected()) {
+ CInfo::SetSourceType(E_ALL);
+ elm_object_text_set(m->eoBtnSource,
+ _(CSourceCtxPopup::SourceText(CInfo::SourceType())));
+ }
}
}
+ /* FIXME: should add disconnected flow */
}