}
}
} else {
- if (strstr (szFilePath, "/.") != NULL) {
+ char* filename = NULL;
+ filename = strrchr(szFilePath, '/');
+
+ if (filename[1] == '.') {
data->mode = IVUG_MODE_HIDDEN;
}
}
Evas_Event_Flags _zoom_start(void *data, void *event_info);
Evas_Event_Flags _zoom_move(void *data, void *event_info);
Evas_Event_Flags _zoom_end(void *data, void *event_info);
-void ivug_disable_gesture(Ivug_SliderNew *slider_new);
-void ivug_enable_gesture(Ivug_SliderNew *slider_new);
Evas_Event_Flags _zoom_abort(void *data, void *event_info);
Evas_Object * ivug_slider_new_get_layout(Ivug_SliderNew *slider_new);
ivug_deletepopup_show(Evas_Object* parent, const char* title_id,
const char* contents_id, Evas_Smart_Cb response, void* user_data)
{
- Evas_Object *popup = NULL;
- Evas_Object *btn_delete = NULL;
- Evas_Object *btn_cancel = NULL;
+ Evas_Object *popup;
+ Evas_Object *btn_delete;
+ Evas_Object *btn_cancel;
//create popup
IV_ASSERT(response != NULL);
Ivug_Popup *iv_popup = ivug_popup_create();
- if (iv_popup == NULL) {
- MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
- return NULL;
- }
popup = elm_popup_add(parent);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
IV_ASSERT(response != NULL);
Ivug_Popup *iv_popup = ivug_popup_create();
- if (iv_popup == NULL) {
- MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
- return NULL;
- }
Evas_Object *popup;
Evas_Object *btn_yes;
{
Ivug_Popup *iv_popup = ivug_popup_create();
+
if (iv_popup == NULL) {
MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
return NULL;
ivug_longpress_popup_show(Evas_Object *parent, int x, int y, bool bUseExtMenu, Evas_Smart_Cb response, void *data)
{
Ivug_Popup *iv_popup = ivug_popup_create();
+
if (iv_popup == NULL) {
MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
return NULL;
Evas_Object *layout = NULL;
Ivug_Popup *iv_popup = ivug_popup_create();
- if (iv_popup == NULL) {
+ if (iv_popup == NULL)
+ {
MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
return NULL;
}
ivug_radio_popup_item *popup_item;
Ivug_Popup *iv_popup = ivug_popup_create();
+
if (iv_popup == NULL) {
MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
return NULL;
Evas_Object *popup = NULL;
Ivug_Popup *iv_popup = ivug_popup_create();
- if (iv_popup == NULL) {
- MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
- return NULL;
- }
popup = elm_popup_add(parent);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
return;
}
-static Evas_Event_Flags _momentum_start(void *data , void *event_info)
-{
- return EVAS_EVENT_FLAG_NONE;
-}
-
-static Evas_Event_Flags _momentum_move(void *data , void *event_info)
-{
- Ivug_SliderNew *slider_new = (Ivug_SliderNew *)data;
- MSG_ASSERT(slider_new != NULL);
-
- Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-
- MSG_LOW("No of Fingers = %d", p->n);
-
- if (p->n >= 2) {
- slider_new->pMainView->bmultitouchsliding = true;
- }
-
- return EVAS_EVENT_FLAG_NONE;
-}
-
-static Evas_Event_Flags _momentum_end(void *data , void *event_info)
-{
- Ivug_SliderNew *slider_new = (Ivug_SliderNew *)data;
- MSG_ASSERT(slider_new != NULL);
-
- Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-
- if (p->n >= 2) {
- slider_new->pMainView->bmultitouchsliding = false;
- }
-
- return EVAS_EVENT_FLAG_NONE;
-}
-
-static Evas_Event_Flags _momentum_abort(void *data , void *event_info)
-{
- Ivug_SliderNew *slider_new = (Ivug_SliderNew *)data;
- MSG_ASSERT(slider_new != NULL);
-
- Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-
- if (p->n >= 2) {
- slider_new->pMainView->bmultitouchsliding = false;
- }
-
- return EVAS_EVENT_FLAG_NONE;
-}
-
static Evas_Event_Flags n_finger_tap_end(void *data , void *event_info)
{
Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
Ivug_SliderNew *slider_new = (Ivug_SliderNew *)data;
MSG_ASSERT(slider_new != NULL);
-
- if (!slider_new->bZooming) {
- slider_new->bSliding = true ;
- }
-
return EVAS_EVENT_FLAG_NONE;
}
return EVAS_EVENT_FLAG_NONE;
}
+ slider_new->bSliding = false ;
if (p->zoom == 1.000000) {
slider_new->curpcm_state = false;
}
if (slider_new->curpcm_state == true) {
MSG_MAIN_HIGH("_zoom_start");
- slider_new->bSliding = false ;
slider_new->curpcm_state = false;
slider_new->pcreset = true;
return EVAS_EVENT_FLAG_NONE;
}
-void ivug_disable_gesture(Ivug_SliderNew *slider_new)
-{
- MSG_ASSERT(slider_new != NULL);
-
- elm_photocam_gesture_enabled_set(slider_new->pMainView->photocam0, EINA_FALSE);
- elm_photocam_gesture_enabled_set(slider_new->pMainView->photocam, EINA_FALSE);
- elm_photocam_gesture_enabled_set(slider_new->pMainView->photocam2, EINA_FALSE);
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM , ELM_GESTURE_STATE_START, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM , ELM_GESTURE_STATE_MOVE, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, NULL, slider_new);
-
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, NULL, slider_new);
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_START, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_END, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_ABORT, NULL, slider_new);
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_END, NULL, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_ABORT, NULL, slider_new);
-
-}
-
-void ivug_enable_gesture(Ivug_SliderNew *slider_new)
-{
- MSG_ASSERT(slider_new != NULL);
-
- elm_photocam_gesture_enabled_set(slider_new->pMainView->photocam0, EINA_TRUE);
- elm_photocam_gesture_enabled_set(slider_new->pMainView->photocam, EINA_TRUE);
- elm_photocam_gesture_enabled_set(slider_new->pMainView->photocam2, EINA_TRUE);
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM , ELM_GESTURE_STATE_START, _momentum_start, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM , ELM_GESTURE_STATE_MOVE, _momentum_move, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END, _momentum_end, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, _momentum_abort, slider_new);
-
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, n_finger_tap_end, slider_new);
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_START, _dbl_click_start, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_END, _dbl_click_end, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_ABORT, _dbl_click_abort, slider_new);
-
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START, _zoom_start, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE, _zoom_move, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_END, _zoom_end, slider_new);
- elm_gesture_layer_cb_set(slider_new->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_ABORT, _zoom_abort, slider_new);
-}
-
Ivug_SliderNew * ivug_slider_new_init(Evas_Object *parent, void *pMainView)
{
Ivug_SliderNew *slider_new = (Ivug_SliderNew *)calloc(1, sizeof(Ivug_SliderNew));
MSG_ERROR("Cannot attach event rect");
}
- elm_gesture_layer_cb_set(gesture, ELM_GESTURE_MOMENTUM , ELM_GESTURE_STATE_START, _momentum_start, slider_new);
- elm_gesture_layer_cb_set(gesture, ELM_GESTURE_MOMENTUM , ELM_GESTURE_STATE_MOVE, _momentum_move, slider_new);
- elm_gesture_layer_cb_set(gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END, _momentum_end, slider_new);
- elm_gesture_layer_cb_set(gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, _momentum_abort, slider_new);
-
-
elm_gesture_layer_cb_set(gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, n_finger_tap_end, slider_new);
elm_gesture_layer_cb_set(gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_START, _dbl_click_start, slider_new);
#endif
bool bSetThmByUser;
- bool bmultitouchsliding;
Evas_Object* popup; //popup
Evas_Object* ctx_popup; //context popup 1depth
Ecore_Timer *hide_timer;
Ecore_Timer *back_timer;
Ecore_Timer *reg_idler;
+ Ecore_Timer *update_timer;
Ecore_Timer *db_idler;
int hide_count;
IV_ASSERT(data != NULL);
Ivug_MainView *pMainView = (Ivug_MainView *)data;
IV_ASSERT(pMainView != NULL);
+
ivug_update_list(pMainView);
if(pMainView->db_idler != NULL) {
ecore_timer_del(pMainView->db_idler);
pMainView->db_idler = NULL;
}
pMainView->db_idler = ecore_idler_add(_ivug_db_update_idler, data);
+ if(pMainView->update_timer != NULL) {
+ ecore_timer_del(pMainView->update_timer);
+ pMainView->update_timer = NULL;
+ }
return ECORE_CALLBACK_CANCEL;
}
IV_ASSERT(data != NULL);
Ivug_MainView *pMainView = (Ivug_MainView *)data;
IV_ASSERT(pMainView != NULL);
- _ivug_db_update_timer_cb(data);
+
+ if(pMainView->update_timer != NULL) {
+ ecore_timer_del(pMainView->update_timer);
+ pMainView->update_timer = NULL;
+ }
+ pMainView->update_timer = ecore_timer_add(1.0f,
+ _ivug_db_update_timer_cb, data);
return 0;
}
evas_object_smart_callback_del(pNameView->entry, "clicked", (Evas_Smart_Cb)
_ivug_rename_view_on_entry_clicked);
+ elm_entry_select_none(pNameView->entry);
return;
}
IV_ASSERT(data != NULL);
Ivug_MainView *pMainView = (Ivug_MainView *)data;
Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *) event_info;
- MSG_MAIN_LOW("mouse moved current(%d,%d) prev (%d,%d)", ev->cur.output.x, ev->cur.output.y,ev->prev.output.x, ev->prev.output.y);
+ MSG_MAIN_HIGH("mouse moved current(%d,%d) prev (%d,%d)", ev->cur.output.x, ev->cur.output.y,ev->prev.output.x, ev->prev.output.y);
int bx=0;
int by=0;
int bw=0;
return ;//Do not accept the flick event if transition is not completed
}
- Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
-
if (pMainView->cur_mitem && ivug_isslide_enabled(pMainView->pSliderNew)) {
count = ivug_medialist_get_count(pMainView->mList);
Media_Data *pData = ivug_medialist_get_data(pMainView->cur_mitem);
currentindex = pData->index;
}
- if (pMainView->prev_mouse_point != 0 && currentindex != -1 && count != -1 && ivug_isslide_enabled(pMainView->pSliderNew) && pMainView->bmultitouchsliding == false) {
+ if (pMainView->prev_mouse_point != 0 && currentindex != -1 && count != -1 && ivug_isslide_enabled(pMainView->pSliderNew)) {
if (pMainView->currentphotocam == PHOTOCAM_0) {
evas_object_geometry_get(pMainView->photocam0, &bx, &by, &bw, &bh);
} else if(pMainView->currentphotocam == PHOTOCAM_1) {
}
MSG_HIGH("current index = %d , diff %d",currentindex, ev->cur.output.x - pMainView->prev_mouse_point);
- if ((ev->cur.output.x - pMainView->prev_mouse_point < 0 && ( currentindex + 1 < count
- || (currentindex + 1 == count && bx > 0 ) ) ) || ( ev->cur.output.x - pMainView->prev_mouse_point > 0
- && (currentindex > 0 ))) {
+ if ((ev->cur.output.x - pMainView->prev_mouse_point < 0 && ( currentindex+1 < count || (currentindex+1 == count && bx > 0 ) ) ) || ( ev->cur.output.x - pMainView->prev_mouse_point > 0 && (currentindex >0 ||( currentindex ==0 && bx < 0 ) ))) {
pMainView->is_moved = true;
- int diffX = pMainView->last_prev_mouse_point - ev->cur.output.x ;
- if (pMainView->is_play_Icon == true && (diffX > 10 || diffX < -10)) {
- pMainView->is_play_Icon = false;
- edje_object_signal_emit(elm_layout_edje_get(sn_layout), "hide,icon", "video_play_icon");
- }
ivug_slider_set_current_Photocam(pMainView->pSliderNew,pMainView->currentphotocam);
ivug_slider_set_Photocam_moved(pMainView->pSliderNew,pMainView->is_moved);
}
}
}
- /*
- * Below condition check if the last
- * item in the folder is video and when
- * slide left slightly video play icon disappear
- * and again come back at original position
- * then video play icon should appear
- */
- Media_Data *pData = ivug_medialist_get_data(pMainView->cur_mitem);
- if (( pMainView->last_prev_mouse_point - ev->cur.output.x > -10 ) && ( pMainView->is_play_Icon == false ) && ( currentindex + 1 == count ) && ( pData->slide_type == SLIDE_TYPE_VIDEO )){
- edje_object_signal_emit(elm_layout_edje_get(sn_layout), "show,icon", "video_play_icon");
- pMainView->is_play_Icon = true;
- }
}
-
pMainView->prev_mouse_point = ev->cur.output.x;
// pMainView->last_prev_mouse_point = ev->prev.output.x;
}
currentindex = pData->index;
MSG_MAIN_HIGH(" _main_view_eventbox_flick_left_cb currentindex = %d count =%d ",currentindex,count);
}
+ // Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
int diffX = pMainView->last_prev_mouse_point - ev->output.x ;
pMainView->cur_mitem = ivug_medialist_get_next(pMainView->mList, pMainView->cur_mitem);
ivug_medialist_set_current_item(pMainView->mList, pMainView->cur_mitem);
+ if (pMainView->is_play_Icon == true) {
+ pMainView->is_play_Icon = false;
+ Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
+ edje_object_signal_emit(elm_layout_edje_get(sn_layout), "hide,icon", "video_play_icon");
+ }
// Update Main View.
if (pMainView->bShowMenu == true) {
PERF_CHECK_BEGIN(LVL5, "Update main view");
pMainView->cur_mitem = ivug_medialist_get_prev(pMainView->mList, pMainView->cur_mitem);
ivug_medialist_set_current_item(pMainView->mList, pMainView->cur_mitem);
+ if (pMainView->is_play_Icon == true) {
+ pMainView->is_play_Icon = false;
+ Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
+ edje_object_signal_emit(elm_layout_edje_get(sn_layout), "hide,icon", "video_play_icon");
+ }
// Update Main View.
if (pMainView->bShowMenu == true) {
PERF_CHECK_BEGIN(LVL5, "Update main view");
update_check(pMainView);
Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
- ivug_disable_gesture(pMainView->pSliderNew);
-
if (pMainView->prevphotocam == PHOTOCAM_1) {
elm_photocam_zoom_mode_set(pMainView->photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
movepossible = _main_view_object_move_(pMainView, pMainView->photocam, PC_POSITION_LEFT);
update_check(pMainView);
Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
- ivug_disable_gesture(pMainView->pSliderNew);
-
if (pMainView->prevphotocam == PHOTOCAM_1) {
elm_photocam_zoom_mode_set(pMainView->photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
movepossible = _main_view_object_move_(pMainView, pMainView->photocam, PC_POSITION_RIGHT);
int wx, wy, ww, wh;
evas_object_geometry_get(win, &wx, &wy, &ww, &wh);
- MSG_MAIN_LOW("_main_view_object_move_ enter,ww =%d wh = %d",ww,wh);
+ MSG_MAIN_HIGH("_main_view_object_move_ enter,ww =%d wh = %d",ww,wh);
int pixelmovx = 15;
int pixelmovy;
if (pMainView->mode == IVUG_MODE_SELECT) {
MSG_MAIN_HIGH("emission: %s, source: %s", emission, source);
Ivug_MainView *pMainView = (Ivug_MainView *)data;
Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
-
- ivug_enable_gesture(pMainView->pSliderNew);
-
if(pMainView->prevphotocam == PHOTOCAM_1) {
edje_object_signal_emit(elm_layout_edje_get(sn_layout), "set_stop", "imageview_area_temp2");
edje_object_signal_emit(elm_layout_edje_get(sn_layout), "set_left", "imageview_area");
Ivug_MainView *pMainView = (Ivug_MainView *)data;
Evas_Object *sn_layout = ivug_slider_new_get_layout(pMainView->pSliderNew);
- ivug_enable_gesture(pMainView->pSliderNew);
-
if(pMainView->prevphotocam == PHOTOCAM_1) {
edje_object_signal_emit(elm_layout_edje_get(sn_layout), "set_stop", "imageview_area_temp0");
edje_object_signal_emit(elm_layout_edje_get(sn_layout), "set_right", "imageview_area");