diff options
author | Radoslaw Czerski <r.czerski@samsung.com> | 2016-05-20 15:18:34 +0200 |
---|---|---|
committer | Radoslaw Czerski <r.czerski@samsung.com> | 2016-05-20 15:18:34 +0200 |
commit | 3d5b45c60e66e44f9aee2701e64ec84bc723ad0b (patch) | |
tree | 9aa2480828473fcd4b51eeff3a2898a00093bc40 | |
parent | b3715e1fafac0bb23e8a7bd1ce4c69602ff2f714 (diff) | |
download | share-panel-3d5b45c60e66e44f9aee2701e64ec84bc723ad0b.tar.gz share-panel-3d5b45c60e66e44f9aee2701e64ec84bc723ad0b.tar.bz2 share-panel-3d5b45c60e66e44f9aee2701e64ec84bc723ad0b.zip |
Launch app request method Changed.
app_control_send_launch_request -> appaul_forward_app
Change-Id: I3ab7fad92a62f1c8892ebacc8219000319689fd9
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
-rw-r--r-- | inc/log.h | 17 | ||||
-rw-r--r-- | src/grid.c | 18 | ||||
-rw-r--r-- | src/ui_manager.c | 5 |
3 files changed, 29 insertions, 11 deletions
@@ -30,16 +30,19 @@ #endif #define D_(str) dgettext(PACKAGE, str) + +#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) + #if !defined(_D) -#define _D(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, fmt"\n", ##arg) +#define _D(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s: %s[%d] " #fmt "\n", __FILENAME__, __func__, __LINE__, ##arg) #endif #if !defined(_W) -#define _W(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, fmt"\n", ##arg) +#define _W(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, "%s: %s[%d] " #fmt "\n", __FILENAME__, __func__, __LINE__, ##arg) #endif #if !defined(_E) -#define _E(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, fmt"\n", ##arg) +#define _E(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "%s: %s[%d] " #fmt "\n", __FILENAME__, __func__, __LINE__, ##arg) #endif #define retvm_if(expr, val, fmt, arg...) do { \ @@ -57,6 +60,14 @@ } \ } while (0) +#define retm_if(expr, fmt, arg...) do { \ + if(expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + #define ret_if(expr) do { \ if(expr) { \ _E("(%s) -> %s() return", #expr, __FUNCTION__); \ @@ -17,9 +17,12 @@ #include <Elementary.h> #include <app.h> #include <app_manager.h> -#include <app_control.h> +#include <app_control_internal.h> +#include <bundle.h> +#include <aul.h> #include "share_panel_internal.h" + #include "conf.h" #include "grid.h" #include "log.h" @@ -137,13 +140,14 @@ int _app_control_launch(item_s *item) int ret = APP_CONTROL_ERROR_NONE; - ret = app_control_set_app_id(item->caller_control, item->appid); - retv_if(ret != APP_CONTROL_ERROR_NONE, ret); + bundle *control_bundle; + + ret = app_control_export_as_bundle(item->caller_control, &control_bundle); + retv_if(ret != APP_CONTROL_ERROR_NONE, FAIL); - ret = app_control_send_launch_request(item->caller_control, _app_reply_cb, NULL); - retv_if(ret != APP_CONTROL_ERROR_NONE, ret); + ret = aul_forward_app(item->appid, control_bundle); - _D("app launched"); + bundle_free(control_bundle); return ret; } @@ -170,8 +174,8 @@ static void __item_selected(void *data, Evas_Object *obj, void *event_info) // ret_if(!selected_item); // elm_gengrid_item_selected_set(selected_item, EINA_FALSE); - ret = _app_control_launch(item_info); + if (ret < 0) _E("Fail to launch app(%d)", ret); diff --git a/src/ui_manager.c b/src/ui_manager.c index d5b16af..43a6c5a 100644 --- a/src/ui_manager.c +++ b/src/ui_manager.c @@ -20,6 +20,7 @@ #include "share_panel_internal.h" #include "share_panel.h" + #include "log.h" #include "grid.h" #include "list.h" @@ -219,10 +220,12 @@ Evas_Object *_ui_manager_create(share_panel_s *share_panel) item_info = eina_list_nth(share_panel->list, 0); goto_if(!item_info, ERROR); - _app_control_launch(item_info); + ret = _app_control_launch(item_info); + if (ret < 0) { _E("Fail to launch app(%d)", ret); } + ui_app_exit(); } |