void CCategoryLayout::m_OnEntrynameSet(const char *name)
{
Eina_List *idlist = NULL;
- char *str = NULL;
-
- if (!name)
- return;
+ ASSERT(name);
idlist = m_GetSelectedList(m->layoutCatSongs->CategorySongItemInfoList(), (int)ID_TYPE_MEDIA);
- str = strdup(name);
t.epopup->Destroy();
- if (!strcmp(str, MUSIC_STR_EMPTY)) {
+ if (!strcmp(name, MUSIC_STR_EMPTY)) {
CCommonUI::CreateMsgBox(Layout(), MUSIC_TEXT_EMPTY_NAME);
- free(str);
return;
}
- if (m->pController->MediaExistPlaylist(str)) {
+ if (m->pController->MediaExistPlaylist(name)) {
CCommonUI::CreateMsgBox(Layout(), MUSIC_TEXT_INUSE_MSG);
- free(str);
return;
}
- if (!m->pController->MediaInsertPlaylist(str, idlist)) {
+ if (!m->pController->MediaInsertPlaylist(name, idlist)) {
_ERR("Playlist creation failed ");
- free(str);
return;
}
- free(str);
t.depth = E_DEPTH_CATEGORY;
t_UpdateLayoutWithFocus();
#include "Info.h"
-#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
-#define TITLE_FONT_SIZE 50
-#define ARTIST_FONT_SIZE 30
-#define TOTAL_CONTROL_BTNS 6
-#define TOTAL_EDIT_BTNS 3
-#define S_INTERVAL 1 /* seconds */
-#define LP_INTERVAL 0.5 /* seconds */
-#define WAIT_INTERVAL 0.5 /* seconds */
-#define SLIDER_STEP 5000 /* milli seconds */
-#define LP_CHANGE 10000 /* milli seconds */
-#define S_INCREMENT 1000 /* milli seconds */
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
+#define TOTAL_CONTROL_BTNS 6
+#define TOTAL_EDIT_BTNS 3
+#define S_INTERVAL 1 /* seconds */
+#define LP_INTERVAL 0.5 /* seconds */
+#define WAIT_INTERVAL 0.5 /* seconds */
+#define SLIDER_STEP 5000 /* milli seconds */
+#define LP_CHANGE 10000 /* milli seconds */
+#define S_INCREMENT 1000 /* milli seconds */
+
+
+// SSliderWidget
struct SSliderWidget {
Evas_Object *eoSlider;
Evas_Object *eoBase;
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
}
-//
-////////////////////////////////////////////////////////////////////////////////
+// STimer
struct STimer {
int count;
int s, e;
void CTimer::KillTimer(int id)
{
ASSERT(m);
-
-
}
-
-
-
-
+// CPlaybackView
enum EEvasObject {
EO_BASE,
};
-struct SItemInfo {
- Elm_Object_Item *item;
- CSongInfo *sinfo;
- bool edit_mode;
- bool check_status;
- bool select_status;
+enum EControlBtns {
+ BTN_SETTINGS,
+ BTN_SHUFFLE,
+ BTN_REPEAT,
+ BTN_REWIND,
+ BTN_PLAY,
+ BTN_FORWARD
};
+enum ESettingBtns {
+ BTN_EDIT,
+ BTN_CLEAR
+};
+
+enum EEditBtns {
+ BTN_CANCEL,
+ BTN_DESELECT,
+ BTN_DELETE
+};
+
+enum ETimers {
+ TIMER_WAIT,
+ TIMER_LONGPRESS,
+ TIMER_VOLUME
+};
enum EPressTypes {
PRESS_SHORT,
PRESS_LONG_PAUSE,
};
+struct SItemInfo {
+ Elm_Object_Item *item;
+ CSongInfo *sinfo;
+ bool edit_mode;
+ bool check_status;
+ bool select_status;
+};
struct SPlaybackView {
Evas_Object *eoWin;
SPlaybackView() {
memset(this, 0, sizeof(SPlaybackView));
}
- ~SPlaybackView() {
- }
};
struct SBtnInfo {
};
-enum EControlBtns {
- BTN_SETTINGS,
- BTN_SHUFFLE,
- BTN_REPEAT,
- BTN_REWIND,
- BTN_PLAY,
- BTN_FORWARD
-};
-
-enum ESettingBtns {
- BTN_EDIT,
- BTN_CLEAR
-};
-
-enum EEditBtns {
- BTN_CANCEL,
- BTN_DESELECT,
- BTN_DELETE
-};
-
-enum ETimers {
- TIMER_WAIT,
- TIMER_LONGPRESS,
- TIMER_VOLUME
-};
-
-
-
Eina_Bool CPlaybackView::sm_CbLongpressTimer(void *dt)
{
CPlaybackView *root = (CPlaybackView *)dt;
Elm_Object_Item *it = NULL;
SContentInfo *ctxtinfo = NULL;
SItemInfo *itinfo = NULL;
+ SParcel parcel;
- if (strcmp(ev->keyname, KEY_MENU) &&
- strcmp(ev->keyname, KEY_MENU_REMOTE))
- return;
-
- it = elm_object_focused_item_get(obj);
- if (!it) {
- _ERR(" unable to get focused item ");
- return;
- }
- m->focused_item = it;
+ if (!strcmp(ev->keyname, KEY_MENU) ||
+ !strcmp(ev->keyname, KEY_MENU_REMOTE)) {
+ it = elm_object_focused_item_get(obj);
+ if (!it) {
+ _ERR(" unable to get focused item ");
+ return;
+ }
+ m->focused_item = it;
- if (m->ctxtinfo) {
- free(m->ctxtinfo);
- m->ctxtinfo = NULL;
- }
+ if (m->ctxtinfo) {
+ free(m->ctxtinfo);
+ m->ctxtinfo = NULL;
+ }
- ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo));
- if (!ctxtinfo)
- return;
+ ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo));
+ if (!ctxtinfo)
+ return;
- itinfo = m_FindItemInfoFromItem(m->elInfo, it);
- if (!itinfo) {
- free(ctxtinfo);
- return;
- }
+ itinfo = m_FindItemInfoFromItem(m->elInfo, it);
+ if (!itinfo) {
+ free(ctxtinfo);
+ return;
+ }
- if (m->pController->PlayState() == PLAY_STATUS_PLAY &&
- itinfo == m->cs_itinfo)
- ctxtinfo->status = PLAY_STATUS_PLAY;
- else
- ctxtinfo->status = PLAY_STATUS_PAUSE;
+ if (m->pController->PlayState() == PLAY_STATUS_PLAY &&
+ itinfo == m->cs_itinfo)
+ ctxtinfo->status = PLAY_STATUS_PLAY;
+ else
+ ctxtinfo->status = PLAY_STATUS_PAUSE;
- ctxtinfo->cbdata = this;
- ctxtinfo->update = sm_CbCtxtUpdate;
- ctxtinfo->close = sm_CbCtxtClose;
- ctxtinfo->type = CONTEXT_TYPE_PLAYSONG;
- ctxtinfo->context = itinfo->sinfo;
+ ctxtinfo->cbdata = this;
+ ctxtinfo->update = sm_CbCtxtUpdate;
+ ctxtinfo->close = sm_CbCtxtClose;
+ ctxtinfo->type = CONTEXT_TYPE_PLAYSONG;
+ ctxtinfo->context = itinfo->sinfo;
- m->ctxtinfo = ctxtinfo;
+ m->ctxtinfo = ctxtinfo;
- SParcel parcel;
- memset(&parcel, 0, sizeof(SParcel));
- parcel.ctxtInfo = ctxtinfo;
- if (!m->mgr->PushView(MUSIC_CONTEXT_VIEW, &parcel))
- _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed");
+ memset(&parcel, 0, sizeof(SParcel));
+ parcel.ctxtInfo = ctxtinfo;
+ if (!m->mgr->PushView(MUSIC_CONTEXT_VIEW, &parcel))
+ _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed");
+ }
}
default: