Fix build error due to changing app-common
[profile/tv/apps/native/filebrowser.git] / src / views / BaseView / SourceCtxPopup.cpp
index 667c50b..f7b4690 100644 (file)
 #include <Eina.h>
 #include <Ecore.h>
 #include <aul.h>
-#include "i18n.h"
+#include "dbg.h"
+#include <AppCommon.h>
 #include "define.h"
 #include "common.h"
+#include "i18n.h"
 #include "Info.h"
-#include "CtxPopup.h"
-#include <MediaContentDbListener.h>
-#include <UsbConnectionListener.h>
 #include "SourceCtxPopup.h"
 
+#define BTN_ID                   "BTN_ID"
+
 const char *srcbtnids[] = {
        "ALL",
        "TV",
@@ -43,15 +44,20 @@ void CSourceCtxPopup::t_OnConfiguration(void)
 {
        int size = ARRAY_SIZE(sourcetext);
 
-       CUsbConnectionListener usb;
-       usb.Create();
-       if (!usb.FlagConnected())
+       CUsbListener usb;
+       if(usb.Create()) {
+               if (!usb.FlagConnected())
+                       size--;
+               usb.Destroy();
+       }
+       else
                size--;
-       usb.Destroy();
 
        t_SetList(sourcetext, size, (int)CInfo::SourceType(),
-                       CCtxPopup::TOPBTN_SOURCE, srcbtnids,
-                       POSITION_SOURCE_POPUP_X, POSITION_SOURCE_POPUP_Y);
+                       CContextPopup::TOPBTN_SOURCE, srcbtnids,
+                       POSITION_SOURCE_POPUP_X, POSITION_SOURCE_POPUP_Y,
+                       NULL,
+                       FBR_STYLE_HOVER_ENTRY, FBR_STYLE_HOVER_ENTRY, FBR_STYLE_HOVER_ENTRY);
 }
 
 
@@ -61,7 +67,7 @@ void CSourceCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev)
                return;
 
        int index = -1;
-       const char *id = (const char*)evas_object_data_get(obj, FBR_BTN_ID);
+       const char *id = (const char*)evas_object_data_get(obj, BTN_ID);
 
        if (!id)
                return;
@@ -79,7 +85,7 @@ void CSourceCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev)
                return;
 
        CInfo::SetSourceType(index);
-       CCtxPopup::t_OnBtnClicked(obj, ev);
+       CContextPopup::t_OnBtnClicked(obj, ev);
 
        Destroy();
 }