Delete the previous popup before creating new popup
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 11 Sep 2012 08:17:53 +0000 (17:17 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 11 Sep 2012 08:17:53 +0000 (17:17 +0900)
[Comment] It is possible that we can't delete the popup

Change-Id: I6a4ef4918e78e2233dfaf2430a522eb67a000741

debian/changelog
packaging/ug-bluetooth-efl.spec
src/libraries/bt-callback.c
src/ui/bt-main-view.c
src/ui/bt-profile-view.c

index 25bb831..fd20e79 100644 (file)
@@ -1,3 +1,11 @@
+ug-setting-bluetooth-efl (0.2.116) unstable; urgency=low
+
+  * Upload the package
+  * Git: magnolia/apps/home/ug-bluetooth-efl
+  * Tag: ug-setting-bluetooth-efl_0.2.116
+
+ -- DoHyun Pyun <dh79.pyun@samsung.com>  Tue, 11 Sep 2012 17:06:31 +0900
+
 ug-setting-bluetooth-efl (0.2.115) unstable; urgency=low
 
   * Upload the package
index 44c690f..8abfef9 100644 (file)
@@ -5,7 +5,7 @@
 
 Name:       ug-bluetooth-efl
 Summary:    UI gadget about the bluetooth
-Version: 0.2.115
+Version: 0.2.116
 Release:    1
 Group:      TO_BE/FILLED_IN
 License:    TO BE FILLED IN
index 1ca61ac..fdc0b0e 100644 (file)
@@ -567,6 +567,11 @@ void _bt_cb_service_searched(int result, bt_device_sdp_info_s *sdp_info,
                BT_DBG("Failed to get the service list [%d]", result);
 
                if (ugd->waiting_service_response == TRUE) {
+                       if (ugd->popup) {
+                               evas_object_del(ugd->popup);
+                               ugd->popup = NULL;
+                       }
+
                        ugd->popup =
                            _bt_create_popup(ugd->win_main, BT_STR_ERROR,
                                        BT_STR_UNABLE_TO_GET_THE_SERVICE_LIST,
index e72ada7..6a0a11d 100644 (file)
@@ -1234,6 +1234,11 @@ static void __bt_main_paired_item_sel_cb(void *data, Evas_Object *obj,
                                                        dev->name,
                                                        BT_STR_DISCONNECT_Q);
 
+                       if (ugd->popup) {
+                               evas_object_del(ugd->popup);
+                               ugd->popup = NULL;
+                       }
+
                        popup = _bt_create_popup(ugd->win_main, BT_STR_INFORMATION,
                                        msg,
                                        _bt_main_popup_del_cb, ugd, 0);
index eb5ad3d..52e50af 100644 (file)
@@ -748,6 +748,11 @@ static void __bt_profile_call_option_item_sel(void *data, Evas_Object *obj,
                                                dev->name,
                                                BT_STR_DISCONNECT_Q);
 
+               if (ugd->popup) {
+                       evas_object_del(ugd->popup);
+                       ugd->popup = NULL;
+               }
+
                popup = _bt_create_popup(ugd->win_main, BT_STR_INFORMATION,
                                msg,
                                _bt_main_popup_del_cb, ugd, 0);
@@ -835,6 +840,11 @@ static void __bt_profile_media_option_item_sel(void *data, Evas_Object *obj,
                                                dev->name,
                                                BT_STR_DISCONNECT_Q);
 
+               if (ugd->popup) {
+                       evas_object_del(ugd->popup);
+                       ugd->popup = NULL;
+               }
+
                popup = _bt_create_popup(ugd->win_main, BT_STR_INFORMATION,
                                msg,
                                _bt_main_popup_del_cb, ugd, 0);
@@ -916,11 +926,15 @@ static void __bt_profile_hid_option_item_sel(void *data, Evas_Object *obj,
 
        ugd = dev->ugd;
 
-       if (dev->hid_checked == TRUE) {
+       if (dev->hid_checked) {
                /* connected case */
                snprintf(msg, sizeof(msg), "%s %s<br>%s", BT_STR_END_CONNECTION,
                                                dev->name,
                                                BT_STR_DISCONNECT_Q);
+               if (ugd->popup) {
+                       evas_object_del(ugd->popup);
+                       ugd->popup = NULL;
+               }
 
                popup = _bt_create_popup(ugd->win_main, BT_STR_INFORMATION,
                                msg,