fix N_SE-25920. add press/unpress callback to panes
authoryumi82.ko <yumi82.ko@samsung.com>
Wed, 27 Feb 2013 00:56:04 +0000 (09:56 +0900)
committeryumi82.ko <yumi82.ko@samsung.com>
Wed, 27 Feb 2013 00:56:04 +0000 (09:56 +0900)
Change-Id: Ic6e323d0cf886ec1593506dbad78e62ad1f16735

thread/include/msg-ui-thread-main.h
thread/src/msg-ui-thread-callback.c
thread/src/msg-ui-thread-main.c

index 7aad78e..b063da7 100755 (executable)
@@ -131,6 +131,7 @@ typedef struct _MSG_THREAD_DATA {
        char locale[DEF_BUF_LEN];
 
        bool isRotate;                  /* Rotation state */
+       bool handlerIsPressed;  /*pressed status of panes's handler*/
        bool isIncomingMsg;     /* Check there is new incoming message when it back from edit mode to normal. */
 
        PMSG_THREAD_LIST_DATA list_data[MSG_THREAD_LIST_MAX_COUNT];
@@ -333,6 +334,8 @@ void msg_ui_thread_sweep_btn_cb(void *data, Evas_Object *obj, void *event_info);
 void msg_ui_thread_timezone_change_cb(keynode_t *key, void *data);
 void msg_ui_thread_gl_mode_right(void *data, Evas_Object *obj, void *event_info);
 void msg_ui_thread_gl_mode_left(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_thread_panes_handler_press_cb(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_thread_panes_handler_unpress_cb(void *data, Evas_Object *obj, void *event_info);
 
 /* THREAD UTILS */
 int msg_ui_thread_launch_voice_call(const char *call_num);
index 98c46ab..1598801 100755 (executable)
@@ -1116,3 +1116,19 @@ void msg_ui_thread_gl_mode_left(void *data, Evas_Object *obj, void *event_info)
 
        MSG_UI_LEAVE();
 }
+
+void msg_ui_thread_panes_handler_press_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !data);
+
+       PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)data;
+       pData->handlerIsPressed = true;
+}
+
+void msg_ui_thread_panes_handler_unpress_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !data);
+
+       PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)data;
+       pData->handlerIsPressed = false;
+}
index e89d534..2048dd0 100755 (executable)
@@ -340,6 +340,9 @@ Evas_Object *msg_ui_thread_create_layout_main(PMSG_THREAD_DATA pData)
        evas_object_size_hint_align_set(pData->panes, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_show(pData->panes);
 
+       evas_object_smart_callback_add(pData->panes, "press", msg_ui_thread_panes_handler_press_cb, pData);
+       evas_object_smart_callback_add(pData->panes, "unpress", msg_ui_thread_panes_handler_unpress_cb, pData);
+
        elm_object_part_content_set(layout, "elm.swallow.content", pData->panes);
 
        pData->layout_main = elm_layout_add(pData->panes);
@@ -892,6 +895,9 @@ void msg_ui_thread_rotation_set(void *data, int rot)
        if (!pData)
                return;
 
+       if (pData->handlerIsPressed)
+               evas_event_feed_mouse_up(evas_object_evas_get(pData->panes), 1, EVAS_BUTTON_NONE, 0, NULL);
+
        if (rot == THREAD_ROTATE_ANGLE_LANDSCAPE || rot == THREAD_ROTATE_ANGLE_LANDSCAPE_UPSIDEDOWN) {
                pData->isRotate = true;
                msg_ui_thread_split_view_show(pData);