fix N_SE-12735
authorHyejin Kim <hyejin0906.kim@samsung.com>
Fri, 28 Dec 2012 03:26:44 +0000 (12:26 +0900)
committerHyejin Kim <hyejin0906.kim@samsung.com>
Fri, 28 Dec 2012 03:26:44 +0000 (12:26 +0900)
setting-profile/include/setting-profile.h
setting-profile/src/setting-profile-sound-main.c
setting-profile/src/setting-profile.c

index ab1e340..e551651 100755 (executable)
@@ -194,5 +194,8 @@ void setting_profile_play_vibration(void *data, int value);
 
 int setting_profile_get_call_playing_vib_by_vconf_value(int call_vib_value);
 
+void __setting_profile_ug_key_grab(SettingProfileUG *ad);
+void __setting_profile_ug_key_ungrab(SettingProfileUG *ad);
+
 
 #endif
index f4c6baa..6fc3bbb 100755 (executable)
@@ -19,6 +19,7 @@
  *
  */
 #include <setting-profile-sound-main.h>
+#include <setting-profile.h>
 
 #define VOLUME_STR                     _("IDS_ST_BODY_VOLUME")
 #define RINGTONE_STR           _("IDS_COM_BODY_RINGTONES")
@@ -518,6 +519,8 @@ static Evas_Object *__get_main_list(void *data)
 
        SettingProfileUG *ad = (SettingProfileUG *) data;
 
+       __setting_profile_ug_key_grab(ad);
+
        if(ad->sub_view[SETTING_PROF_VIEW_VOL])
                return ad->sub_view[SETTING_PROF_VIEW_VOL];
 
@@ -1043,6 +1046,8 @@ static int setting_profile_sound_main_destroy(void *cb)
 
        SettingProfileUG *ad = (SettingProfileUG *) cb;
 
+       __setting_profile_ug_key_ungrab(ad);
+
        if (ad->ly_main != NULL) {
                //Fix the memory leak,
                //Manage ad->sub_view[] separately, unset first, then delete in together
@@ -1130,6 +1135,8 @@ static void setting_profile_sound_main_destroy_myfile_ug_cb(ui_gadget_h ug, void
        ret_if(priv == NULL);
        SettingProfileUG *ad = (SettingProfileUG *) priv;
 
+       __setting_profile_ug_key_grab(ad);
+
        if (ug) {
                ug_destroy(ug);
                ad->ug_loading = NULL;
@@ -1287,6 +1294,7 @@ static void setting_profile_sound_main_create_myfile_ug(SettingProfileUG *ad)
        if(pa_cur_ringtone)
                FREE(pa_cur_ringtone);
 
+       __setting_profile_ug_key_ungrab(ad);
        return;
 }
 
index 76f919e..f57e5f0 100755 (executable)
@@ -393,7 +393,7 @@ int setting_profile_unlisten_vconf_change(void *data)
        return 0;
 }
 
-static void __setting_profile_ug_key_grab(SettingProfileUG *ad)
+void __setting_profile_ug_key_grab(SettingProfileUG *ad)
 {
        SETTING_TRACE_BEGIN;
        Ecore_X_Window xwin = 0;
@@ -417,7 +417,7 @@ static void __setting_profile_ug_key_grab(SettingProfileUG *ad)
        ad->event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, NULL, NULL);
        SETTING_TRACE_END;
 }
-static void __setting_profile_ug_key_ungrab(SettingProfileUG *ad)
+void __setting_profile_ug_key_ungrab(SettingProfileUG *ad)
 {
        SETTING_TRACE_BEGIN;
        Ecore_X_Window xwin = 0;
@@ -498,7 +498,6 @@ static void *setting_profile_ug_on_create(ui_gadget_h ug,
                                       setting_profile_ug_cb_resize, profileUG);
 
        setting_profile_listen_vconf_change(profileUG);
-       __setting_profile_ug_key_grab(profileUG);
 
        return profileUG->ly_main;
 }
@@ -580,8 +579,6 @@ static void setting_profile_ug_on_destroy(ui_gadget_h ug, service_h service, voi
 
        SettingProfileUG *profileUG = priv;
 
-       __setting_profile_ug_key_ungrab(profileUG);
-
        setting_profile_unlisten_vconf_change(profileUG);
        evas_object_event_callback_del(profileUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_profile_ug_cb_resize); /* fix flash issue for gallery */
        profileUG->ug = ug;