diff options
author | Jaeyun Jeong <jyjeong@samsung.com> | 2013-02-14 22:40:50 +0900 |
---|---|---|
committer | Gerrit Code Review <gerrit2@kim11> | 2013-02-14 22:40:50 +0900 |
commit | c625574592a4ee801933b73790e89f07213d0209 (patch) | |
tree | 29a2cac404bf868433e719e614e014a0eec4243a | |
parent | c11c5feb64e702156f322ecd24f5b86feb71f76b (diff) | |
parent | 6388dda2a0f04ef719c33770ba0b50d7cd16e4dd (diff) | |
download | message-app-c625574592a4ee801933b73790e89f07213d0209.tar.gz message-app-c625574592a4ee801933b73790e89f07213d0209.tar.bz2 message-app-c625574592a4ee801933b73790e89f07213d0209.zip |
Merge "Fix N_SE-25254, splitview composer indicator issue, ref_count is applied in composer"
-rwxr-xr-x | composer/include/msg-ui-composer-main.h | 4 | ||||
-rwxr-xr-x | composer/src/gadget/msg-ui-composer-gadget.c | 26 | ||||
-rwxr-xr-x | composer/src/ui-composer/msg-ui-composer-main.c | 7 |
3 files changed, 35 insertions, 2 deletions
diff --git a/composer/include/msg-ui-composer-main.h b/composer/include/msg-ui-composer-main.h index 73f712b..9f0ae0a 100755 --- a/composer/include/msg-ui-composer-main.h +++ b/composer/include/msg-ui-composer-main.h @@ -21,6 +21,10 @@ #include "msg-ui-composer-data.h" #include "msg-ui-composer-util.h" +int msg_ui_composer_get_ref_count(void); +void msg_ui_composer_increase_ref_count(void); +void msg_ui_composer_decrease_ref_count(void); + COMPOSER_RETURN_TYPE_E msg_ui_composer_init(MSG_COMPOSER_VIEW_DATA_S *cd); COMPOSER_RETURN_TYPE_E msg_ui_composer_create(MSG_COMPOSER_VIEW_DATA_S *cd); COMPOSER_RETURN_TYPE_E msg_ui_composer_start(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_handle); diff --git a/composer/src/gadget/msg-ui-composer-gadget.c b/composer/src/gadget/msg-ui-composer-gadget.c index e86e592..d99cde7 100755 --- a/composer/src/gadget/msg-ui-composer-gadget.c +++ b/composer/src/gadget/msg-ui-composer-gadget.c @@ -27,6 +27,29 @@ #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif +int ref_count; + +int msg_ui_composer_get_ref_count(void) +{ + D_MSG("ref_count = %d", ref_count); + return ref_count; +} + +void msg_ui_composer_increase_ref_count(void) +{ + ++ref_count; + D_MSG("ref_count = %d", ref_count); +} + +void msg_ui_composer_decrease_ref_count(void) +{ + --ref_count; + D_MSG("ref_count = %d", ref_count); + + if (ref_count < 0) + ref_count = 0; +} + static void __base_layout_delete_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { D_ENTER; @@ -173,6 +196,9 @@ static void *__msg_ui_composer_on_create(ui_gadget_h ug, enum ug_mode mode, serv return NULL; } + if (cd->base) + msg_ui_composer_increase_ref_count(); + return cd->base; } diff --git a/composer/src/ui-composer/msg-ui-composer-main.c b/composer/src/ui-composer/msg-ui-composer-main.c index 3c98b6a..0fc0a16 100755 --- a/composer/src/ui-composer/msg-ui-composer-main.c +++ b/composer/src/ui-composer/msg-ui-composer-main.c @@ -1195,8 +1195,10 @@ static void __msg_composer_auto_save_and_delete_msg(MSG_COMPOSER_VIEW_DATA_S *cd COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd) { D_ENTER; - COMPOSER_RETURN_TYPE_E ret = COMPOSER_RETURN_SUCCESS; + + msg_ui_composer_decrease_ref_count(); + if (!cd) return COMPOSER_RETURN_FAIL; @@ -1280,7 +1282,8 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd) } /* rollback indicator mode to previous mode */ - elm_win_indicator_mode_set(cd->main_window, cd->indicator_mode); + if (msg_ui_composer_get_ref_count() <= 0) + elm_win_indicator_mode_set(cd->main_window, cd->indicator_mode); D_PRINT("===== Composer UG Destroy End ====="); |