}
static void
-_move_files_button_click_cb(void *data, Evas_Object* obj, void *event_info)
+_cb_app_control_send_launch_request(const char *app_id, const char *viewtype)
{
- FUNC_BEGIN();
-
app_control_h app_control = NULL;
int ret_app;
if (ret_app != APP_CONTROL_ERROR_NONE)
return;
- ret_app = app_control_set_app_id(app_control, MYFILES_APP_ID);
+ ret_app = app_control_set_app_id(app_control, app_id);
if (ret_app != APP_CONTROL_ERROR_NONE) {
app_control_destroy(app_control);
return;
}
+ if (viewtype != NULL)
+ app_control_add_extra_data(app_control, VIEWTYPE_KEY, viewtype);
+
ret_app = app_control_send_launch_request(app_control, NULL, NULL);
if (ret_app != APP_CONTROL_ERROR_NONE)
DMSG_ERR("Failed to app_control_send_launch_request(): %d", ret_app);
app_control_destroy(app_control);
-
- FUNC_END();
}
static void
-_move_apps_button_click_cb(void *data, Evas_Object* obj, void *event_info)
+_move_files_button_click_cb(void *data, Evas_Object* obj, void *event_info)
{
FUNC_BEGIN();
- app_control_h app_control = NULL;
- int ret_app;
+ _cb_app_control_send_launch_request(MYFILES_APP_ID, NULL);
- ret_app = app_control_create(&app_control);
- if (ret_app != APP_CONTROL_ERROR_NONE)
- return;
-
- ret_app = app_control_set_app_id(app_control, SETTING_APP_ID);
- if (ret_app != APP_CONTROL_ERROR_NONE) {
- app_control_destroy(app_control);
- return;
- }
+ FUNC_END();
+}
- app_control_add_extra_data(app_control, VIEWTYPE_KEY, APPSELECT);
- ret_app = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret_app != APP_CONTROL_ERROR_NONE)
- DMSG_ERR("Failed to app_control_send_launch_request(): %d", ret_app);
+static void
+_move_apps_button_click_cb(void *data, Evas_Object* obj, void *event_info)
+{
+ FUNC_BEGIN();
- app_control_destroy(app_control);
+ _cb_app_control_send_launch_request(SETTING_APP_ID, APPSELECT);
FUNC_END();
}
{
FUNC_BEGIN();
- app_control_h app_control = NULL;
- int ret_app;
-
- ret_app = app_control_create(&app_control);
- if (ret_app != APP_CONTROL_ERROR_NONE)
- return;
-
- ret_app = app_control_set_app_id(app_control, SETTING_APP_ID);
- if (ret_app != APP_CONTROL_ERROR_NONE) {
- app_control_destroy(app_control);
- return;
- }
-
- app_control_add_extra_data(app_control, VIEWTYPE_KEY, DEFAULT_STORAGE);
- ret_app = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret_app != APP_CONTROL_ERROR_NONE)
- DMSG_ERR("Failed to app_control_send_launch_request(): %d", ret_app);
-
- app_control_destroy(app_control);
+ _cb_app_control_send_launch_request(SETTING_APP_ID, DEFAULT_STORAGE);
FUNC_END();
}