ivug_db_destroy_file_handle(m_handle);
}
- _send_result(gGetUGHandle(), "crop_image_path", path, NULL, NULL);
+ _send_result(gGetUGHandle(), "crop_image_path", path, "http://tizen.org/appcontrol/data/selected", path);
MSG_HIGH("Start destroy ug");
ug_destroy_me(gGetUGHandle());
if(mode == IVUG_SETAS_CROP)
{
ivug_copy_file(path, appsvc_home_path);
- _send_result(gGetUGHandle(), "crop_image_path", appsvc_home_path, NULL, NULL);
+ _send_result(gGetUGHandle(), "crop_image_path", appsvc_home_path,
+ "http://tizen.org/appcontrol/data/selected", appsvc_home_path);
}
else
{
evas_object_smart_callback_del(obj, "cancel,clicked", _ivug_crop_view_cancel_clicked_cb);
- _send_result(gGetUGHandle(), "crop_image_path", NULL, NULL, NULL);
+ _send_result(gGetUGHandle(), "crop_image_path", NULL, "http://tizen.org/appcontrol/data/selected", NULL);
MSG_HIGH("Start destroy ug");
ug_destroy_me(gGetUGHandle());
crop_ug->crop_view = NULL;
- _send_result(gGetUGHandle(), "crop_image_path", NULL, NULL, NULL);
+ _send_result(gGetUGHandle(), "crop_image_path", NULL, "http://tizen.org/appcontrol/data/selected", NULL);
MSG_HIGH("Start destroy ug");
ug_destroy_me(gGetUGHandle());
#define IVUG_BUNDLE_KEY_RESOLUTION "Resolution"
#define IVUG_BUNDLE_KEY_FIXED_RATIO "Fixed ratio"
+#define IVUG_BUNDLE_KEY_CROP_MODE "http://tizen.org/appcontrol/data/image/crop_mode"
+#define IVUG_BUNDLE_VALUE_CROP_MODE_AUTO "auto"
+#define IVUG_BUNDLE_VALUE_CROP_MODE_FIT_TO_SCREEN "fit_to_screen"
+
#define IVUG_BUNDLE_KEY_MEDIA_TYPE "Media type"
#define IVUG_BUNDLE_KEY_STANDALONE "Standalone"
}
_ivug_free(&bRatioFix);
}
+
+ char* crop_mode = NULL;
+ service_get_extra_data (service, IVUG_BUNDLE_KEY_CROP_MODE, &crop_mode);
+ if(crop_mode)
+ {
+ MSG_IVUG_MED("Crop mode=%s", crop_mode);
+ if(strcmp(crop_mode, IVUG_BUNDLE_VALUE_CROP_MODE_FIT_TO_SCREEN) == 0)
+ {
+ int lcd_x = 0;
+ int lcd_y = 0;
+ int lcd_w = 0;
+ int lcd_h = 0;
+ int rot = 0;
+ evas_object_geometry_get((Evas_Object *)ug_get_window(), &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+ rot = gGetRotationDegree();
+ if(rot == 90 || rot == 270)
+ {
+ int temp = lcd_w;
+ lcd_w = lcd_h;
+ lcd_h = temp;
+ }
+ data->width = lcd_w;
+ data->height = lcd_h;
+ data->bRatioFix = true;
+ }
+ _ivug_free(&crop_mode);
+ }
+
_ivug_free(&val);
}
static void _OnCancel(Ivug_SetAsView *pSetAsView);
static Evas_Object*_show_exit_popup( Evas_Object *parent, const char *title, const char *desc, void *data);
static void _send_result(ui_gadget_h ug, const char *key1, const char *val1, const char *key2, const char *val2);
+static void _send_result2(ui_gadget_h ug, const char *key1, const char *val1,
+ const char *key2, const char *val2, const char *key3, const char *val3);
static void
service_destroy(service);
}
+static void
+_send_result2(ui_gadget_h ug, const char *key1, const char *val1,
+ const char *key2, const char *val2, const char *key3, const char *val3)
+{
+ ivug_ret_if(!ug);
+
+ service_h service;
+ service_create(&service);
+ if(key1 && val1)
+ {
+ MSG_SETAS_HIGH("Bundle 1 : [%s = %s]", key1, val1);
+ service_add_extra_data(service, key1, val1);
+ }
+ if(key2 && val2)
+ {
+ MSG_SETAS_HIGH("Bundle 2 : [%s = %s]", key2, val2);
+ service_add_extra_data(service, key2, val2);
+ }
+
+ if(key3 && val3)
+ {
+ MSG_SETAS_HIGH("Bundle 3 : [%s = %s]", key3, val3);
+ service_add_extra_data(service, key3, val3);
+ }
+
+ ug_send_result(ug, service);
+ service_destroy(service);
+}
static void _on_setas_homescreen(Ivug_SetAsView *pSetAsView)
{
else // IVUG_SETAS_CROP
{
_show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_SUCCESS, (void *)pSetAsView);
- _send_result(gGetUGHandle(), "crop_image_path", homescreen_path, NULL, NULL);
+ _send_result(gGetUGHandle(), "crop_image_path", homescreen_path,
+ "http://tizen.org/appcontrol/data/selected", homescreen_path);
MSG_SETAS_HIGH("Set Home screen: %s", homescreen_path);
}
if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
{
- _send_result(gGetUGHandle(), "crop_image_path", SET_AS_CALL_ID_PATH, "image_path", SET_AS_CALL_ID_LCD_PATH);
+ //_send_result(gGetUGHandle(), "crop_image_path", SET_AS_CALL_ID_PATH, "image_path", SET_AS_CALL_ID_LCD_PATH);
+ _send_result2(gGetUGHandle(), "crop_image_path", SET_AS_CALL_ID_PATH,
+ "image_path", SET_AS_CALL_ID_LCD_PATH, "http://tizen.org/appcontrol/data/selected", SET_AS_CALL_ID_PATH);
_show_exit_popup(pSetAsView->content, title, IDS_SUCCESS, pSetAsView);
}
if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
{
- _send_result(gGetUGHandle(), "crop_image_path", SET_AS_VIDEO_CALL_ID_PATH, NULL, NULL);
+ _send_result(gGetUGHandle(), "crop_image_path", SET_AS_VIDEO_CALL_ID_PATH,
+ "http://tizen.org/appcontrol/data/selected", SET_AS_VIDEO_CALL_ID_PATH);
}
_show_exit_popup(pSetAsView->content, title, IDS_SUCCESS, pSetAsView);