description {
state, "focus" 0.0;
inherit, "default" 0.0;
+ rel1.relative, 0.5 0.5;
+ rel2.relative, 0.5 0.5;
+ min, 284 284;
color, 255 255 255 255;
}
}
scale, 1;
description {
state, "default" 0.0;
- min, 284 284;
- rel1 {
- to, "bg.photo";
- relative, 0.5 0.5;
- }
- rel2 {
- to, "bg.photo";
- relative, 0.5 0.5;
- }
+ rel1.to, "bg.photo";
+ rel2.to, "bg.photo";
+ fixed, 1 1;
+ }
+ }
+ part {
+ name, "pad";
+ type, RECT;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1.relative, 0.5 0.5;
+ rel2.relative, 0.5 0.5;
fixed, 1 1;
+ min, 290 290;
+ color, 0 119 246 255;
+ visible, 0;
+ }
+ description {
+ state, "focus" 0.0;
+ inherit, "default" 0.0;
+ visible, 1;
}
}
+
part {
name, PART_USER_EDIT_PHOTO_FOCUS;
type, SWALLOW;
state, "default" 0.0;
rel1.to, PART_USER_EDIT_PHOTO;
rel2.to, PART_USER_EDIT_PHOTO;
+ fixed, 1 1;
}
}
}
signal, SIG_FOCUS;
source, SRC_PROG;
action, STATE_SET "focus" 0.0;
- transition, LINEAR 0.2;
target, "bg.photo";
target, "clip";
+ after, "sig,focus,1";
+ }
+ program {
+ name, "sig,focus,1";
+ action, STATE_SET "focus" 0.0;
+ transition, LINEAR 0.2;
+ target, "pad";
}
program {
name, "sig,unfocus";
signal, SIG_UNFOCUS;
source, SRC_PROG;
action, STATE_SET "default" 0.0;
+ target, "pad";
+ after, "sig,unfocus,1";
+ }
+ program {
+ name, "sig,unfocus,1";
+ action, STATE_SET "default" 0.0;
transition, LINEAR 0.2;
target, "bg.photo";
target, "clip";
* limitations under the License.
*/
-#ifndef __AIR_HOME_VIEW_USER_EDIT_H__
-#define __AIR_HOME_VIEW_USER_EDIT_H__
+#ifndef __AIR_HOME_VIEW_H__
+#define __AIR_HOME_VIEW_H__
+enum update_type {
+ UPDATE_TYPE_EDIT,
+ UPDATE_TYPE_PHOTO
+};
+
+view_class *view_home_get_vclass(void);
+view_class *view_user_get_vclass(void);
view_class *view_user_edit_get_vclass(void);
+view_class *view_photo_get_vclass(void);
+view_class *view_recent_get_vclass(void);
-#endif /* __AIR_HOME_VIEW_USER_EDIT_H__ */
+#endif /* __AIR_HOME_VIEW_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __AIR_HOME_VIEW_HOME_H__
-#define __AIR_HOME_VIEW_HOME_H__
-
-view_class *view_home_get_vclass(void);
-
-#endif /* __AIR_HOME_VIEW_HOME_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __AIR_HOME_VIEW_PHOTO_H__
-#define __AIR_HOME_VIEW_PHOTO_H__
-
-view_class *view_photo_get_vclass(void);
-
-#endif /* __AIR_HOME_VIEW_PHOTO_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __AIR_HOME_VIEW_RECENT_H__
-#define __AIR_HOME_VIEW_RECENT_H__
-
-view_class *view_recent_get_vclass(void);
-
-#endif /* __AIR_HOME_VIEW_RECENT_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __AIR_HOME_VIEW_USER_H__
-#define __AIR_HOME_VIEW_USER_H__
-
-view_class *view_user_get_vclass(void);
-
-#endif /* __AIR_HOME_VIEW_USER_H__ */
#include <viewmgr.h>
#include "defs.h"
-#include "view_home.h"
-#include "view_recent.h"
-#include "view_user.h"
+#include "view.h"
SET_TAG(PACKAGE);
#include <inputmgr.h>
#include "defs.h"
-#include "view_home.h"
+#include "view.h"
#include "data_home.h"
#include "datamgr.h"
#include "utils.h"
#include <inputmgr.h>
#include "defs.h"
-#include "view_photo.h"
+#include "view.h"
#include "data_photo.h"
#include "utils.h"
Evas_Event_Key_Down *ev)
{
struct _priv *priv = data;
+ char *thumb;
if (!strcmp(ev->keyname, KEY_ENTER) ||
!strcmp(ev->keyname, KEY_ENTER_REMOTE)) {
_delete_popup(priv, &done_handler, obj);
elm_object_focus_allow_set(priv->grid, EINA_TRUE);
- elm_object_focus_set(priv->grid, EINA_TRUE);
+ thumb = elm_object_item_data_get(priv->cur);
+ if (thumb) {
+ viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_PHOTO,
+ thumb);
+ viewmgr_pop_view();
+ }
} else if (!strcmp(ev->keyname, KEY_BACK) ||
!strcmp(ev->keyname, KEY_BACK_REMOTE)) {
_delete_popup(priv, &done_handler, obj);
#include <inputmgr.h>
#include "defs.h"
-#include "view_recent.h"
+#include "view.h"
#include "data_recent.h"
#include "datamgr.h"
#include "utils.h"
#include <inputmgr.h>
#include "defs.h"
-#include "view_user.h"
-#include "view_user_edit.h"
+#include "view.h"
#include "data_user.h"
#include "datamgr.h"
#include "utils.h"
return;
}
- viewmgr_update_view(VIEW_USER_EDIT, 0, NULL);
+ viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, NULL);
datamgr_select_item(priv->dm, priv->foc->di);
} else if (!strcmp(ev->keyname, KEY_BACK) ||
!strcmp(ev->keyname, KEY_BACK_REMOTE)) {
if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH)
return;
- viewmgr_update_view(VIEW_USER_EDIT, 0, priv->foc->di);
+ viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT,
+ priv->foc->di);
viewmgr_push_view(VIEW_USER_EDIT);
}
}
#include <inputmgr.h>
#include "defs.h"
-#include "view_user_edit.h"
-#include "view_photo.h"
+#include "view.h"
#include "datamgr.h"
#include "utils.h"
Evas_Object *popup;
Evas_Object *lock_icon;
+ char *selected_photo;
+
struct datamgr *dm;
struct datamgr_item *di;
};
icon = utils_add_icon(priv->photo, file, PART_USER_EDIT_PHOTO);
if (!icon)
_ERR("failed to add icon");
+ elm_image_fill_outside_set(icon, EINA_TRUE);
focus_icon = utils_add_icon(priv->photo, focus_file,
PART_USER_EDIT_PHOTO_FOCUS);
if (!focus_icon)
_ERR("failed to add focus icon");
+ elm_image_fill_outside_set(focus_icon, EINA_TRUE);
priv->icon = icon;
priv->focus_icon = focus_icon;
MESSAGE_EDIT_USER);
elm_entry_entry_set(priv->name, priv->di->title);
elm_entry_entry_set(priv->pin, "");
- photo = utils_get_photo_from_icon(priv->di->icon);
- focus_photo = utils_get_focus_photo_from_photo(photo);
- _load_user_icon(priv, photo, focus_photo);
+ if (priv->selected_photo) {
+ _load_user_icon(priv, priv->selected_photo,
+ priv->selected_photo);
+ } else {
+ photo = utils_get_photo_from_icon(priv->di->icon);
+ focus_photo = utils_get_focus_photo_from_photo(photo);
+ _load_user_icon(priv, photo, focus_photo);
+ }
_load_del_btn(priv);
} else {
elm_object_part_text_set(priv->base, PART_USER_EDIT_TITLE,
MESSAGE_ADD_USER);
elm_entry_entry_set(priv->name, MESSAGE_ENTRY_NAME);
elm_entry_entry_set(priv->pin, MESSAGE_ENTRY_PIN);
- _load_user_icon(priv, IMAGE_USER_CURRENT_DEFAULT,
- IMAGE_USER_CURRENT_DEFAULT_FOCUS);
+ if (priv->selected_photo)
+ _load_user_icon(priv, priv->selected_photo,
+ priv->selected_photo);
+ else
+ _load_user_icon(priv, IMAGE_USER_CURRENT_DEFAULT,
+ IMAGE_USER_CURRENT_DEFAULT_FOCUS);
}
_load_lock_icon(priv);
priv->lock_icon = NULL;
}
+ priv->selected_photo = NULL;
evas_object_hide(priv->base);
}
}
priv = view_data;
- priv->di = data;
+
+ switch (update_type) {
+ case UPDATE_TYPE_EDIT:
+ priv->di = data;
+ break;
+ case UPDATE_TYPE_PHOTO:
+ priv->selected_photo = data;
+ break;
+ default:
+ _ERR("Invalid type");
+ return;
+ }
}
static view_class vclass = {