Build : Block some features to build this over 24/51824/2 accepted/tizen/mobile/20151117.005647 submit/tizen/20151116.111701
authorJin Yoon <jinny.yoon@samsung.com>
Mon, 16 Nov 2015 10:51:22 +0000 (19:51 +0900)
committerJin Yoon <jinny.yoon@samsung.com>
Mon, 16 Nov 2015 11:12:52 +0000 (20:12 +0900)
Change-Id: Ic5d27fceb898e9d99e2eb1222751358f5e4606e6

84 files changed:
CMakeLists.txt
doc/attach_panel_doc.h
include/attach_panel.h
include/attach_panel_internal.h
include/conf.h
include/content_list.h
include/gesture.h
include/grid.h
include/list.h [new file with mode: 0644]
include/scroller.h
include/ui_manager.h
packaging/attach-panel.spec
po/ar.po
po/az.po
po/bg.po
po/bn.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el_GR.po
po/en.po
po/en_PH.po
po/en_US.po
po/es_ES.po
po/es_US.po
po/et.po
po/eu.po
po/fa.po
po/fi.po
po/fr.po
po/fr_CA.po
po/ga.po
po/gl.po
po/gu.po
po/he.po
po/hi.po
po/hr.po
po/hu.po
po/hy.po
po/is.po
po/it_IT.po
po/ja_JP.po
po/ka.po
po/kk.po
po/kn.po
po/ko_KR.po
po/lt.po
po/lv.po
po/mk.po
po/ml.po
po/nb.po
po/nl.po
po/pl.po
po/pt_BR.po
po/pt_PT.po
po/ro.po
po/ru_RU.po
po/si.po
po/sk.po
po/sl.po
po/sr.po
po/sv.po
po/ta.po
po/te.po
po/th.po
po/tr_TR.po
po/uk.po
po/ur.po
po/uz.po
po/zh_CN.po
po/zh_HK.po
po/zh_TW.po
res/edje/layout.edc
sample/sample.c
src/attach_bundle.c
src/attach_panel.c
src/content_list.c
src/gesture.c
src/grid.c
src/list.c [new file with mode: 0644]
src/scroller.c
src/ug.c
src/ui_manager.c

index c119891d3de5bb8017fb975e163c2995d6382796..df8e9c7f60342c4e719e8e643ce2c886564f115a 100644 (file)
@@ -33,11 +33,13 @@ SET(SRCS
        src/toolbar.c
        src/ug.c
        src/ui_manager.c
+       src/list.c
 )
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
+       aul
        capi-base-common
        capi-system-info
        bundle
@@ -49,6 +51,7 @@ pkg_check_modules(pkgs REQUIRED
        isf
 #      security-privilege-checker
        ui-gadget-1
+       rua
 )
 
 FOREACH(flag ${pkgs_CFLAGS})
index cc7da6da06f982b4378b250d843ad43764a24711..b0aaff421253a9954063423398c8c06d54330902 100644 (file)
 #define __TIZEN_ATTACH_PANEL_DOC_H__
 
 /**
- * @defgroup CAPI_PANEL_MODULE Panel
- * @brief The Panel module provides APIs to choose data or apps easily.
  * @ingroup CAPI_APPLICATION_FRAMEWORK
- *
- * @section CAPI_PANEL_MODULE_OVERVIEW Overview
- * <table>
- * <tr><th>API</th><th>Description</th></tr>
- * <tr><td>@ref CAPI_PANEL_ATTACH_MODULE</td><td>Provide functions to attach images, voices, contacts, events and files.</td></tr>
- * <tr><td>@ref CAPI_PANEL_STICKER_MODULE</td><td>Provide functions to attach stickers easily.</td></tr>
- * <tr><td>@ref CAPI_PANEL_SHARE_MODULE</td><td>Provide functions to share data with apps.</td></tr>
- * </table>
- *
  * @defgroup CAPI_PANEL_ATTACH_MODULE Attach panel
- * @brief The Attach Panel provides functions to attach data easily. Users can attach images, take pictures, record voice and select files to attach into the caller app
- * @ingroup CAPI_PANEL_MODULE
+ * @brief Attach panel provides functions to attach images, voices, contacts, events and files. Users can attach images, take pictures, record voice and select files to attach into the caller app
  *
  * @section CAPI_PANEL_ATTACH_MODULE_HEADER Required Header
  *   \#include <attach_panel.h>
+ *
  * @section CAPI_PANEL_ATTACH_MODULE_OVERVIEW Overview
- * It provides functions for adding an Attach Panel (attach_panel_create()) and deleting it (attach_panel_destroy()) in an app.\n
- * It is shown with (attach_panel_show()) and hiden with (attach_panel_hide()).\n
- * The results can be returned into the result callback that is set (attach_panel_set_result_cb()) or unset (attach_panel_unset_result_cb()).\n
- * Content categories can be added (attach_panel_add_content_category()) or removed (attach_panel_remove_content_category()).\n
+ * - It provides functions for adding an attach panel (attach_panel_create()) and deleting it (attach_panel_destroy()) in an app.\n
+ * - Content categories can be added (attach_panel_add_content_category()) or removed (attach_panel_remove_content_category()).\n
+ * - Dynamic configurations can be handled with (attach_panel_set_extra_data()). This is used with a content category.
+ * - Results can be returned into the result callback that is set (attach_panel_set_result_cb()) or unset (attach_panel_unset_result_cb()).\n
+ * - Events are delivered into the event callback that is set with (attach_panel_set_event_cb()) or unset with (attach_panel_unset_event_cb()).\n
+ * - The panel can be shown with (attach_panel_show()) and hidden with (attach_panel_hide()).\n
+ * - You can get the state of the panel with (attach_panel_get_visibility()).\n
  *
  * @section CAPI_PANEL_ATTACH_MODULE_FEATURE Related Features
  * This API is related with the following features:\n
- *  - http://tizen.org/feature/camera\n
- *  - http://tizen.org/feature/microphone\n
+ *  - %http://tizen.org/feature/camera\n
+ *  - %http://tizen.org/feature/microphone\n
+ *
  * It is recommended to design feature related codes in your application for reliability.\n
  * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
  * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
  */
 
+
 #endif
index 009ce7c0fb1fe2d0d3c512972e93a524b1bacef1..95babcfc8cd0f5556b6eb8d346c8d1aca7c6316c 100644 (file)
@@ -49,15 +49,29 @@ extern "C" {
  */
 typedef enum attach_panel_content_category {
        ATTACH_PANEL_CONTENT_CATEGORY_IMAGE = 1, /**< Attaching images from the gallery */
-       ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, /**< Taking pictures or videos with the camera to attach */
-       ATTACH_PANEL_CONTENT_CATEGORY_VOICE, /**< Taking voices with the voice-recoder to attach */
+       ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, /**< Taking pictures to attach */
+       ATTACH_PANEL_CONTENT_CATEGORY_VOICE, /**< Taking a voice clip to attach */
        ATTACH_PANEL_CONTENT_CATEGORY_VIDEO, /**< Attaching video from the gallery */
        ATTACH_PANEL_CONTENT_CATEGORY_AUDIO, /**< Attaching audio from my files */
        ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR, /**< Attaching calendar data from the calendar */
        ATTACH_PANEL_CONTENT_CATEGORY_CONTACT, /**< Attaching contact data from the contacts */
        ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, /**< Attaching files data from my files */
+       ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, /**< Taking a video clip to attach */
 } attach_panel_content_category_e;
 
+/**
+ * @brief Enumeration for events
+ * @since_tizen 2.4
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
+ */
+typedef enum attach_panel_event {
+       ATTACH_PANEL_EVENT_SHOW_START = 1, /**< Attach panel starts the effect to show */
+       ATTACH_PANEL_EVENT_SHOW_FINISH, /**< Attach panel finishes the effect to show */
+       ATTACH_PANEL_EVENT_HIDE_START, /**< Attach panel starts the effect to hide the panel */
+       ATTACH_PANEL_EVENT_HIDE_FINISH, /**< Attach panel finishes the effect to hide the panel */
+} attach_panel_event_e;
+
 /**
  * @brief Attach panel handle.
  * @since_tizen 2.4
@@ -73,6 +87,7 @@ typedef struct _attach_panel *attach_panel_h;
  * @param[in] result app_control handler.\n
  *                   The caller app has to use app_control_get_extra_data_array() to get received data.\n
  *                   http://tizen.org/appcontrol/data/selected\n
+ * @param[in] result_code result of app_control
  * @param[in] user_data user data
  * @pre The callback must be registered using attach_panel_set_result_cb()\n
  * attach_panel_add_content_category() and attach_panel_show() must be called to invoke this callback.
@@ -81,7 +96,23 @@ typedef struct _attach_panel *attach_panel_h;
  * @see        attach_panel_set_result_cb()
  * @see        attach_panel_unset_result_cb()
  */
-typedef void (*attach_panel_result_cb)(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *user_data);
+typedef void (*attach_panel_result_cb)(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *user_data);
+
+/**
+ * @brief Called when reserved events are published from the panel-side.
+ *
+ * @since_tizen 2.4
+ * @param[in] attach_panel Attach panel handler
+ * @param[in] event Attach panel event
+ * @param[in] event_info additional event information.\n
+ *                       This can be NULL if there are no necessary information.
+ * @param[in] user_data user data
+ * @pre The callback must be registered using attach_panel_set_event_cb()
+ *
+ * @see        attach_panel_set_event_cb()
+ * @see        attach_panel_unset_event_cb()
+ */
+typedef void (*attach_panel_event_cb)(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *user_data);
 
 /**
  * @brief Enumeration for values of attach-panel response types.
@@ -120,6 +151,8 @@ typedef enum attach_panel_error {
  * @see attach_panel_set_extra_data()
  * @see attach_panel_set_result_cb()
  * @see attach_panel_unset_result_cb()
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
  * @see attach_panel_show()
  * @see attach_panel_hide()
  * @see attach_panel_get_visibility()
@@ -133,7 +166,7 @@ typedef enum attach_panel_error {
  *   Evas_Object *conformant;
  * };
  *
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
  * {
  *   char **select = NULL;
  *   int i = 0;
@@ -144,6 +177,10 @@ typedef enum attach_panel_error {
  *     // Error handling
  *   }
  *
+ *   if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ *     // Error handling
+ *   }
+ *
  *   ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
  *   if (APP_CONTROL_ERROR_NONE != ret || !select) {
  *     // Error handling
@@ -216,7 +253,7 @@ typedef enum attach_panel_error {
  *
  * @endcode
  */
-extern int attach_panel_create(Evas_Object *conformant, attach_panel_h *attach_panel);
+int attach_panel_create(Evas_Object *conformant, attach_panel_h *attach_panel);
 
 /**
  * @brief Destroys the attach panel.
@@ -236,6 +273,8 @@ extern int attach_panel_create(Evas_Object *conformant, attach_panel_h *attach_p
  * @see attach_panel_set_extra_data()
  * @see attach_panel_set_result_cb()
  * @see attach_panel_unset_result_cb()
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
  * @see attach_panel_show()
  * @see attach_panel_hide()
  * @see attach_panel_get_visibility()
@@ -298,17 +337,22 @@ extern int attach_panel_create(Evas_Object *conformant, attach_panel_h *attach_p
  *
  * @endcode
  */
-extern int attach_panel_destroy(attach_panel_h attach_panel);
+int attach_panel_destroy(attach_panel_h attach_panel);
 
 /**
  * @brief Adds a content category in the attach panel.
  * @since_tizen 2.4
  * @privlevel public
+ * @privilege %http://tizen.org/privilege/mediastorage
+ * @privilege %http://tizen.org/privilege/camera
+ * @privilege %http://tizen.org/privilege/recorder
+ * @privilege %http://tizen.org/privilege/appmanager.launch
  * @remarks The caller app has to check the return value of this function.\n
  *          Content categories will be shown as the sequence of using @a attach_panel_add_content_category.\n
  *          Some contents need time to load it all.\n
  *          So, it is needed to use this before the mainloop of attach_panel_show().\n
  *          Privileges,\n
+ *          %http://tizen.org/privilege/mediastorage, for using ATTACH_PANEL_CONTENT_CATEGORY_IMAGE or ATTACH_PANEL_CONTENT_CATEGORY_CAMERA\n
  *          %http://tizen.org/privilege/camera, for using ATTACH_PANEL_CONTENT_CATEGORY_CAMERA\n
  *          %http://tizen.org/privilege/recorder, for using ATTACH_PANEL_CONTENT_CATEGORY_VOICE\n
  *          %http://tizen.org/privilege/appmanager.launch, for adding content categories on the More tab\n
@@ -318,7 +362,7 @@ extern int attach_panel_destroy(attach_panel_h attach_panel);
  *
  * @param[in] attach_panel Attach panel handler
  * @param[in] content_category The content_category to be added in the @a attach_panel.
- * @param[in] The attach panel send some information using @a bundle.
+ * @param[in] extra_data The attach panel send some information using @a bundle.
  * @return #ATTACH_PANEL_ERROR_NONE on success,
  *         otherwise a negative error value
  * @retval #ATTACH_PANEL_ERROR_NONE Successful
@@ -355,7 +399,7 @@ extern int attach_panel_destroy(attach_panel_h attach_panel);
  *   Evas_Object *conformant;
  * };
  *
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
  * {
  *   char **select = NULL;
  *   int i = 0;
@@ -366,6 +410,10 @@ extern int attach_panel_destroy(attach_panel_h attach_panel);
  *     // Error handling
  *   }
  *
+ *   if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ *     // Error handling
+ *   }
+ *
  *   ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
  *   if (APP_CONTROL_ERROR_NONE != ret || !select) {
  *     // Error handling
@@ -438,7 +486,7 @@ extern int attach_panel_destroy(attach_panel_h attach_panel);
  *
  * @endcode
  */
-extern int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle * extra_data);
+int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data);
 
 /**
  * @brief Removes the content category from the attach panel.
@@ -531,7 +579,7 @@ extern int attach_panel_add_content_category(attach_panel_h attach_panel, attach
  *
  * @endcode
  */
-extern int attach_panel_remove_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category);
+int attach_panel_remove_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category);
 
 /**
  * @brief Sets extra data to send to the content category using a bundle.
@@ -544,7 +592,7 @@ extern int attach_panel_remove_content_category(attach_panel_h attach_panel, att
  *
  * @param[in] attach_panel Attach panel handler
  * @param[in] content_category The content_category to be set the some information in the @a attach_panel.
- * @param[in] The attach panel set some information using @a bundle.
+ * @param[in] extra_data The attach panel set some information using @a bundle.
  * @return #ATTACH_PANEL_ERROR_NONE on success,
  *         otherwise a negative error value
  * @retval #ATTACH_PANEL_ERROR_NONE Successful
@@ -580,7 +628,7 @@ extern int attach_panel_remove_content_category(attach_panel_h attach_panel, att
  *   Evas_Object *conformant;
  * };
  *
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
  * {
  *   char **select = NULL;
  *   int i = 0;
@@ -591,6 +639,10 @@ extern int attach_panel_remove_content_category(attach_panel_h attach_panel, att
  *     // Error handling
  *   }
  *
+ *   if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ *     // Error handling
+ *   }
+ *
  *   ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
  *   if (APP_CONTROL_ERROR_NONE != ret || !select) {
  *     // Error handling
@@ -604,7 +656,7 @@ extern int attach_panel_remove_content_category(attach_panel_h attach_panel, att
  *   free(select);
  * }
  *
- * static void _event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+ * static void _reset_bundle_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
  * {
  *   struct appdata *ad = data;
  *   bundle *extra_data = NULL;
@@ -638,7 +690,6 @@ extern int attach_panel_remove_content_category(attach_panel_h attach_panel, att
  *   }
  *
  *   bundle_free(extra_data);
- *
  * }
  *
  * static int app_control(void *data)
@@ -700,7 +751,7 @@ extern int attach_panel_remove_content_category(attach_panel_h attach_panel, att
  *
  * @endcode
  */
-extern int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data);
+int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data);
 
 /**
  * @brief Sets the result callback that will be called when an user selects and confirms something to attach in the attach panel.
@@ -741,7 +792,7 @@ extern int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel
  *   Evas_Object *conformant;
  * };
  *
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
  * {
  *   char **select = NULL;
  *   int i = 0;
@@ -752,6 +803,10 @@ extern int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel
  *     // Error handling
  *   }
  *
+ *   if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ *     // Error handling
+ *   }
+ *
  *   ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
  *   if (APP_CONTROL_ERROR_NONE != ret || !select) {
  *     // Error handling
@@ -824,7 +879,7 @@ extern int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel
  *
  * @endcode
  */
-extern int attach_panel_set_result_cb(attach_panel_h attach_panel, attach_panel_result_cb result_cb, void *user_data);
+int attach_panel_set_result_cb(attach_panel_h attach_panel, attach_panel_result_cb result_cb, void *user_data);
 
 /**
  * @brief Unsets the result callback that will be called when an user selects and confirms something to attach in the attach panel.
@@ -832,7 +887,6 @@ extern int attach_panel_set_result_cb(attach_panel_h attach_panel, attach_panel_
  * @remarks The caller app has to check the return value of this function.\n
  *
  * @param[in] attach_panel Attach panel handler
- * @param[in] result_cb Attach panel result callback
  * @return #ATTACH_PANEL_ERROR_NONE on success,
  *         otherwise a negative error value
  * @retval #ATTACH_PANEL_ERROR_NONE Successful
@@ -908,7 +962,157 @@ extern int attach_panel_set_result_cb(attach_panel_h attach_panel, attach_panel_
  *
  * @endcode
  */
-extern int attach_panel_unset_result_cb(attach_panel_h attach_panel);
+int attach_panel_unset_result_cb(attach_panel_h attach_panel);
+
+/**
+ * @brief Sets the event callback that will be called when reserved events are published from the panel-side.
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.\n
+ *          We can set only one callback function with this API.\n
+ *          If you set multiple callbacks with this API,\n
+ *          the last one is registered only.
+ *
+ * @param[in] attach_panel Attach panel handler
+ * @param[in] panel_event_cb Attach panel event callback
+ * @param[in] user_data User data
+ * @return #ATTACH_PANEL_ERROR_NONE on success,
+ *         otherwise a negative error value
+ * @retval #ATTACH_PANEL_ERROR_NONE Successful
+ * @retval #ATTACH_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ATTACH_PANEL_ERROR_ALREADY_DESTROYED already removed
+ *
+ * @pre Call attach_panel_create() before calling this function.
+ * @post The event_cb set with attach_panel_set_event_cb() will be called after publishing reserved events.
+ * @see attach_panel_create()
+ * @see attach_panel_destroy()
+ * @see attach_panel_show()
+ * @see attach_panel_hide()
+ * @see attach_panel_get_visibility()
+ * @see attach_panel_unset_event_cb()
+ * @see attach_panel_event_cb
+ *
+ * @par Example
+ * @code
+ * #include <attach_panel.h>
+ *
+ * struct appdata {
+ *   Evas_Object *attach_panel;
+ *   Evas_Object *conformant;
+ * };
+ *
+ * static void _event_cb(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *data)
+ * {
+ *   switch (event) {
+ *   case ATTACH_PANEL_EVENT_SHOW_START:
+ *     // event handling
+ *     break;
+ *   case ATTACH_PANEL_EVENT_SHOW_FINISH:
+ *     // event handling
+ *     break;
+ *   case ATTACH_PANEL_EVENT_HIDE_START:
+ *     // event handling
+ *     break;
+ *   case ATTACH_PANEL_EVENT_HIDE_FINISH:
+ *     // event handling
+ *     break;
+ *   default:
+ *     // error handling
+ *     break;
+ *   }
+ * }
+ *
+ * static int app_control(void *data)
+ * {
+ *   struct appdata *ad = data;
+ *   int ret = ATTACH_PANEL_ERROR_NONE;
+ *
+ *   if (!ad) {
+ *     // Error handling
+ *   }
+ *
+ *   if (!ad->conformant) {
+ *     // Error handling
+ *   }
+ *
+ *   ret = attach_panel_create(ad->conformant, &ad->attach_panel);
+ *   if (ATTACH_PANEL_ERROR_NONE != ret) {
+ *      // Error handling
+ *   }
+ *
+ *   ret = attach_panel_set_event_cb(ad->attach_panel, _event_cb, ad);
+ *   if (ATTACH_PANEL_ERROR_NONE != ret) {
+ *      // Error handling
+ *   }
+ *
+ *   // other routines
+ *
+ *      return 0;
+ * }
+ *
+ * @endcode
+ */
+int attach_panel_set_event_cb(attach_panel_h attach_panel, attach_panel_event_cb panel_event_cb, void *user_data);
+
+/**
+ * @brief Unsets the event callback
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.
+ *
+ * @param[in] attach_panel Attach panel handler
+ * @param[in] result_cb Attach panel result callback
+ * @return #ATTACH_PANEL_ERROR_NONE on success,
+ *         otherwise a negative error value
+ * @retval #ATTACH_PANEL_ERROR_NONE Successful
+ * @retval #ATTACH_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ATTACH_PANEL_ERROR_ALREADY_DESTROYED already removed
+ *
+ * @pre Call attach_panel_create() before calling this function.
+ * @see attach_panel_create()
+ * @see attach_panel_destroy()
+ * @see attach_panel_show()
+ * @see attach_panel_hide()
+ * @see attach_panel_get_visibility()
+ * @see attach_panel_set_event_cb()
+ *
+ * @par Example
+ * @code
+ * #include <attach_panel.h>
+ *
+ * struct appdata {
+ *   Evas_Object *attach_panel;
+ *   Evas_Object *conformant;
+ * };
+ *
+ * static int app_terminate(void *data)
+ * {
+ *   struct appdata *ad = data;
+ *   int ret = 0;
+ *
+ *   if (!ad) {
+ *     // Error handling
+ *   }
+ *
+ *   if (!ad->attach_panel) {
+ *     // Error handling
+ *   }
+ *
+ *   ret = attach_panel_unset_event_cb(ad->attach_panel);
+ *   if (ATTACH_PANEL_ERROR_NONE != ret) {
+ *      // Error handling
+ *   }
+ *
+ *   ret = attach_panel_destroy(ad->attach_panel);
+ *   if (ATTACH_PANEL_ERROR_NONE != ret) {
+ *      // Error handling
+ *   }
+ *   ad->attach_panel = NULL;
+ *
+ *      return 0;
+ * }
+ *
+ * @endcode
+ */
+int attach_panel_unset_event_cb(attach_panel_h attach_panel);
 
 /**
  * @brief Shows the attach panel, asynchronously.
@@ -942,7 +1146,7 @@ extern int attach_panel_unset_result_cb(attach_panel_h attach_panel);
  *   Evas_Object *conformant;
  * };
  *
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
  * {
  *   char **select = NULL;
  *   int i = 0;
@@ -953,6 +1157,10 @@ extern int attach_panel_unset_result_cb(attach_panel_h attach_panel);
  *     // Error handling
  *   }
  *
+ *   if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ *     // Error handling
+ *   }
+ *
  *   ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
  *   if (APP_CONTROL_ERROR_NONE != ret || !select) {
  *     // Error handling
@@ -1025,7 +1233,7 @@ extern int attach_panel_unset_result_cb(attach_panel_h attach_panel);
  *
  * @endcode
  */
-extern int attach_panel_show(attach_panel_h attach_panel);
+int attach_panel_show(attach_panel_h attach_panel);
 
 /**
  * @brief Hides the attach panel, asynchronously.
@@ -1108,7 +1316,7 @@ extern int attach_panel_show(attach_panel_h attach_panel);
  *
  * @endcode
  */
-extern int attach_panel_hide(attach_panel_h attach_panel);
+int attach_panel_hide(attach_panel_h attach_panel);
 
 /**
  * @brief Gets a value that indicates whether the attach_panel is visible.
@@ -1200,7 +1408,7 @@ extern int attach_panel_hide(attach_panel_h attach_panel);
  *
  * @endcode
  */
-extern int attach_panel_get_visibility(attach_panel_h attach_panel, bool *visible);
+int attach_panel_get_visibility(attach_panel_h attach_panel, bool *visible);
 
 /**
  * @}
index 5772c3d352e176acdadac465792d47045cdfc1b7..34eb1bd7af8987b37cf0470501e2a5da64ddbf86 100644 (file)
@@ -31,6 +31,8 @@
 
 #define MODE_ENABLE "enable"
 #define MODE_DISABLE "disable"
+#define MODE_TRUE "true"
+#define MODE_FALSE "false"
 
 #define TABBAR_NAME_MORE "More"
 #define BUF_SIZE 128
@@ -44,6 +46,8 @@
  *   mime : "image/(asterisk)"
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ *   2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ *   3) "http://tizen.org/appcontrol/data/total_size" : any bytes
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
@@ -53,6 +57,7 @@
  *   mime : NULL
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ *   2) "http://tizen.org/appcontrol/data/total_size" : any bytes
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
@@ -62,6 +67,7 @@
  *   mime : NULL
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ *   2) "http://tizen.org/appcontrol/data/total_size" : any bytes
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
@@ -71,6 +77,8 @@
  *   mime : "video/(asterisk)"
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ *   2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ *   3) "http://tizen.org/appcontrol/data/total_size" : any bytes
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
@@ -80,6 +88,8 @@
  *   mime : "audio/(asterisk)"
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ *   2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ *   3) "http://tizen.org/appcontrol/data/total_size" : any bytes
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
  *   2) "http://tizen.org/appcontrol/data/mode" : 1
- *   3) "http://tizen.org/appcontrol/data/result_type" : "vcs"
- *   4) "http://tizen.org/appcontrol/data/item_type" : "event"
- *   5) "http://tizen.org/appcontrol/data/max" : 1
+ *   3) "http://tizen.org/appcontrol/data/type" : "vcs"
+ *   4) "http://tizen.org/appcontrol/data/total_count" : any numbers
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
  *   operation : APP_CONTROL_OPERATION_PICK
  *   mime : "application/vnd.tizen.contact"
  *   extra_data : See below
- *   APP_CONTROL_DATA_SELECTION_MODE : "multiple"
- *   1) "http://tizen.org/appcontrol/data/result_type" : "vcard"
- *   2) "http://tizen.org/appcontrol/data/item_type" : "person"
+ *   1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ *   2) "http://tizen.org/appcontrol/data/type" : "vcf"
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
  *
  *   mime : NULL
  *   extra_data : See below
  *   1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ *   2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ *   3) "http://tizen.org/appcontrol/data/total_size" : any bytes
+ *   return data : See below
+ *   1) "http://tizen.org/appcontrol/data/selected"
+ *
+ * - ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER
+ *   appid : NULL
+ *   operation : APP_CONTROL_OPERATION_CREATE_CONTENT
+ *   mime : "video/3gp"
+ *   extra_data : See below
+ *   1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ *   2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ *   3) "http://tizen.org/appcontrol/data/total_size" : any bytes
  *   return data : See below
  *   1) "http://tizen.org/appcontrol/data/selected"
+
  */
 
 
  *
  *   key : "__ATTACH_PANEL_SHOW_TOOLBAR__"
  *   value : "true" or "false"
- *   when : set as true when the panel's tabbar it is needed to be shown, and false when it is needed to be hidden.
+ *   when : set as true when the panel's tabbar needs to be shown, and false when it needs to be hidden.
+ *   how : ug_send_result()
+ *
+ *   key : "__ATTACH_PANEL_SHOW_PANEL__"
+ *   value : "true" or "false"
+ *   when : set as true when the panel it needs to be shown, and false when it needs to be hidden.
  *   how : ug_send_result()
  */
 
@@ -200,6 +227,8 @@ struct _attach_panel {
        attach_panel_state_e attach_panel_land_state;
        attach_panel_result_cb result_cb;
        void *result_data;
+       attach_panel_event_cb event_cb;
+       void *event_data;
 
        Evas_Coord transit_width;
        Evas_Coord transit_height;
@@ -207,8 +236,9 @@ struct _attach_panel {
        Eina_Bool is_delete;
        Eina_Bool rotate;
        Eina_Bool flick;
-       int current_page;
-       int show_page;
+       int cur_page_no;
+       int cur_event_state;
+       int magic_no;
 };
 typedef struct _attach_panel attach_panel_s;
 
@@ -225,7 +255,7 @@ struct _innate_content {
 
        /* launching features */
        const char *operation;
-       const char *result_type;
+       const char *type;
        const char *item_type;
        const char *selection_mode;
        const char *mime;
@@ -242,8 +272,10 @@ struct _content {
        Elm_Object_Item *tabbar_item;
        Elm_Object_Item *grid_item;
        Evas_Object *content;
+       Evas_Object *page;
        bundle *extra_data;
        int index;
+       int order;
 };
 typedef struct _content content_s;
 
index 4451c1d463645b661f6795f557e23c2705fdcf20..c0cb907ab36cc0f72fa064326be92770284a1531 100644 (file)
@@ -22,6 +22,7 @@
 #define GRID_ROW_COUNT 4
 #define GRID_ITEM_HEIGHT_REL 1.15
 #define GRID_ICON_SIZE_REL 0.5
+#define ORDER_MAX 99
 
 
 #endif
index 83c84f80a5a6e494034c1fb5519e059ff5d10ec1..7abd204fcb327497ce18d8b1a76c1cfa9b6b53b9 100644 (file)
@@ -22,7 +22,7 @@
 
 
 void _content_list_send_message(Eina_List *list, const char *key, const char *value, int is_ug);
-void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int show_page);
+void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int cur_page_no);
 void _content_list_set_pause(Eina_List *list, int is_ug);
 void _content_list_set_resume(Eina_List *list, int is_ug);
 
index bfcdb8a98bd29677cd0c33b458703c705d07fbe1..5fd12475f90e831ef5ee7555ac3714cfe56c42bf 100644 (file)
@@ -26,6 +26,7 @@ extern void _gesture_hide(attach_panel_h attach_panel);
 
 extern void _gesture_set_full_mode(attach_panel_h attach_panel);
 extern attach_panel_state_e _gesture_get_state(void);
+extern void _gesture_set_state(attach_panel_state_e state);
 
 extern Evas_Object *_gesture_create(attach_panel_h attach_panel);
 extern void _gesture_destroy(attach_panel_h attach_panel);
index 9c9b0b591caa8dacd12f1fd8aa0e29d6ad3dc1f1..7c122f3505d9b7a41269e6efdcc4a2253fd47037 100644 (file)
@@ -21,6 +21,7 @@
 
 extern Evas_Object *_grid_create(Evas_Object *page, attach_panel_h attach_panel);
 extern void _grid_destroy(Evas_Object *grid);
+extern void _grid_refresh(Evas_Object *grid);
 
 extern Elm_Object_Item *_grid_append_item(Evas_Object *grid, content_s *content_info);
 extern void _grid_remove_item(Evas_Object *grid, content_s *content_info);
diff --git a/include/list.h b/include/list.h
new file mode 100644 (file)
index 0000000..69eddc5
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * 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 __ATTACH_PANEL_LIST_H__
+#define __ATTACH_PANEL_LIST_H__
+
+extern Eina_List *_list_sort_by_rua(Eina_List *content_list);
+
+#endif
index 7598943b111f5fc7ffc4b3e613dbe3885d334c7b..a9938d445bff582490484ab5015659fcdb9a258b 100644 (file)
@@ -31,7 +31,7 @@ extern void _scroller_destroy(Evas_Object *scroller);
 extern void _scroller_append_page(Evas_Object *scroller, Evas_Object *page);
 extern void _scroller_remove_page(Evas_Object *scroller, Evas_Object *page);
 
-extern void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *current_page);
+extern void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *cur_page_no);
 
 extern int _scroller_is_scrolling(Evas_Object *scroller);
 extern void _scroller_resize(Evas_Object *scroller, int width, int height);
index 0e7b61e09a98a1c0a3d9582e866c0199f5dc2b11..fc71378900641e687878214277fdabe73fa98f77 100644 (file)
@@ -24,5 +24,7 @@ extern void _ui_manager_remove_content_category(Evas_Object *ui_manager, content
 
 extern Evas_Object *_ui_manager_create(attach_panel_h attach_panel);
 extern void _ui_manager_destroy(Evas_Object *ui_manager);
+extern Evas_Object *_ui_manager_create_content(Evas_Object *page, content_s *content_info, attach_panel_h attach_panel);
+extern void _ui_manager_destroy_content(content_s *content_info, attach_panel_h attach_panel);
 
 #endif /* __TIZEN_ATTACH_PANEL_UI_MANAGER_H__ */
index d89c5c6873abcc32adb4c083c978a91806a772e3..81fec63a2ee4f77fd1a694ad4f9fde8cf57537e0 100755 (executable)
@@ -15,6 +15,7 @@ BuildRequires: edje-tools
 BuildRequires: gettext-tools
 
 BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(bundle)
 BuildRequires: pkgconfig(capi-base-common)
 BuildRequires: pkgconfig(capi-system-info)
@@ -28,6 +29,7 @@ BuildRequires: pkgconfig(feedback)
 BuildRequires: pkgconfig(isf)
 #BuildRequires: pkgconfig(security-privilege-checker)
 BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: pkgconfig(rua)
 
 %description
 Description: Attach Panel
index cacec807e110f2d33c3782e9b8013f9d797d01ef..081bcfe4d4728c675eab0e12b0a3de67475a28d1 100755 (executable)
--- a/po/ar.po
+++ b/po/ar.po
@@ -25,3 +25,6 @@ msgstr "جهات الاتصال"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "ملفاتي"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "تسجيل\nفيديو"
+
index 617b95d82661f5624f9ffe9880cad8ce856b2818..55f574e0c1cbf544a2aed6b1701c6247dce85548 100755 (executable)
--- a/po/az.po
+++ b/po/az.po
@@ -25,3 +25,6 @@ msgstr "Əlaqələr"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Fayllarım"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nyaz"
+
index 2d36edeb6139f64048e0e2a3977d51ce2623a0f8..52b7ae789df978f1f6e697cc387756c0025ebccf 100755 (executable)
--- a/po/bg.po
+++ b/po/bg.po
@@ -25,3 +25,6 @@ msgstr "Контакти"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Моите файлове"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Запис\nвидео"
+
index 18b6ae1b0808314b2bd75af2510fee185fef591f..3cd66b932db7f4f2409fe4bc58831083d6213084 100755 (executable)
--- a/po/bn.po
+++ b/po/bn.po
@@ -25,3 +25,6 @@ msgstr "পরিচিতিগুলি"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "আমার ফাইলগুলি"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ভিডিও\nরেকর্ড করুন"
+
index 10b97393af0c3f5c54a394ece8e8ae95f1a5f829..900522791c32303987dda51d9e3892e4d99c965e 100755 (executable)
--- a/po/ca.po
+++ b/po/ca.po
@@ -25,3 +25,6 @@ msgstr "Contactes"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Meus fitx"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
index 07db8f079045064401b4a4faeae90cd9a49b56ad..fc2943b6ec3c872fff92aaa90cec74d98e52625c 100755 (executable)
--- a/po/cs.po
+++ b/po/cs.po
@@ -25,3 +25,6 @@ msgstr "Kontakty"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Moje soubory"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Nahrát\nvideo"
+
index aa2cc1dbe5b3b583c1547a875cbda922a23191ff..7e0de7202a29e41662bb76d3d915d2fae1deb447 100755 (executable)
--- a/po/da.po
+++ b/po/da.po
@@ -25,3 +25,6 @@ msgstr "Kontakter"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mine filer"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Optag\nvideo"
+
index 5fd4df64b9919760281d1c76390ab16e4e272f9b..996368b8c0bfedc37b26788e7c7c680456419997 100755 (executable)
--- a/po/de.po
+++ b/po/de.po
@@ -25,3 +25,6 @@ msgstr "Kontakte"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Eigene Dateien"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\naufnehmen"
+
index d29055da989fe11eb6b29bc4475e765b3840ff21..e00207abfed95df723a1582e771b36cb0cca21a9 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Επαφές"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Τα Αρχεία Μου"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Εγγραφή\nβίντεο"
+
index 7cbe4c7ee2b9198989dcf3bc6a23974c0a742473..5dab7a8ac3f3068817c7d1aad6764c0d06148c18 100755 (executable)
--- a/po/en.po
+++ b/po/en.po
@@ -25,3 +25,6 @@ msgstr "Contacts"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "My Files"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Record\nvideo"
+
index 7cbe4c7ee2b9198989dcf3bc6a23974c0a742473..5dab7a8ac3f3068817c7d1aad6764c0d06148c18 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contacts"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "My Files"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Record\nvideo"
+
index 7cbe4c7ee2b9198989dcf3bc6a23974c0a742473..5dab7a8ac3f3068817c7d1aad6764c0d06148c18 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contacts"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "My Files"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Record\nvideo"
+
index adcee32cc09163626afae8dce2228972ccdfd117..a0fdd5601751163792817d4daa163e6c4badf09c 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contactos"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mis archivos"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Grabar\nvídeo"
+
index a578033376d5be2abd0ff909b91209a565980718..07fd95f2c1a6c544f838a8f0c9ae7ea7133e7204 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contactos"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mis archivos"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Grabar\nvideo"
+
index 6a43002958b6cb88406689c7042b6ab93e48c5da..db3907a6d10dea589def00502ec23e9bf9d8e61e 100755 (executable)
--- a/po/et.po
+++ b/po/et.po
@@ -25,3 +25,6 @@ msgstr "Kontaktid"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Minu failid"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Salvesta\nvideo"
+
index 09d483d795fec2a12655d70dd780ef6c83a697a5..dd6bc3648c5e709fca7616f92b64c5f18cc7fd84 100755 (executable)
--- a/po/eu.po
+++ b/po/eu.po
@@ -25,3 +25,6 @@ msgstr "Kontaktuak"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Nire fitxat."
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Grabatu\nbideoa"
+
index dc30f9dd2c366d8f064f89775b5d37c400c9e162..cc320a1acdb57dafb6d1f78bf7a6bef8131527e5 100755 (executable)
--- a/po/fa.po
+++ b/po/fa.po
@@ -25,3 +25,6 @@ msgstr "مخاطبين"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "فایل‌های من"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ضبط\nویدیو"
+
index 82d84a2db367e89ec19f16a3e9ee26cca629878c..dee19b261b97f345ccc14166b8c4e874d7fd156f 100755 (executable)
--- a/po/fi.po
+++ b/po/fi.po
@@ -25,3 +25,6 @@ msgstr "Yhteystiedot"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Omat tied."
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Tallenna\nvideota"
+
index 66ba08d90aa6da3b44da6620601fba2101178c7a..b75612295242faaadd861bf9547f2962a9ff09c9 100755 (executable)
--- a/po/fr.po
+++ b/po/fr.po
@@ -25,3 +25,6 @@ msgstr "Contacts"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mes fichiers"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Enreg.\nvidéo"
+
index d4a6cac9b6d6fb0fbc6acd305e182ac9aa9f0ad0..7375cf864b0a17d7dfa1e1ab3f0bc65a1d39f06b 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contacts"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mes fichiers"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Enreg.\nvidéo"
+
index 15ae295fd3305ffa4ad683863e72c88a08648974..a89db5a7e4dfb266f313020fdfd22a1dec6baec5 100755 (executable)
--- a/po/ga.po
+++ b/po/ga.po
@@ -25,3 +25,6 @@ msgstr "Teagmhálaithe"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mo Chomhaid"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Taifead\nfíseán"
+
index 29e29a5dd98e3eb9edc1c6b160ac4c9226bbb989..86b21e56903634f2ecf7ccb0c0d6d0c111b826b2 100755 (executable)
--- a/po/gl.po
+++ b/po/gl.po
@@ -25,3 +25,6 @@ msgstr "Contactos"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Os meus arqu."
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
index f9896964d5487b11bbb0e8f8172f5c4ec2d8cb78..11bae678add86eb31feca2fb465b4a85e3ba349c 100755 (executable)
--- a/po/gu.po
+++ b/po/gu.po
@@ -25,3 +25,6 @@ msgstr "સંપર્કો"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "મારી ફાઇલ્સ"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "વિડિયો\nરેકોર્ડ કરો"
+
index bbd83a8d27a8150c8a127fa7f453036352ee95f9..758ddcf047513ae7538b67b1625f0317c5cce907 100755 (executable)
--- a/po/he.po
+++ b/po/he.po
@@ -25,3 +25,6 @@ msgstr "אנשי קשר"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "הקבצים שלי"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "צלם\nוידאו"
+
index 0908d0e4b4d039cda14c70e4149532b29a00197c..73f99cd41878044ade3bb426c0e6655c5a985df0 100755 (executable)
--- a/po/hi.po
+++ b/po/hi.po
@@ -25,3 +25,6 @@ msgstr "संपर्क"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "मेरी फाइलें"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "वीडियो\nरिकॉर्ड करे"
+
index c5e7f22c3d3dea5133a36e354a08d5d91422337f..90431db8fa62b41c60b63ef9deb1f782e6e11fb3 100755 (executable)
--- a/po/hr.po
+++ b/po/hr.po
@@ -25,3 +25,6 @@ msgstr "Imenik"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Moje datoteke"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Snimi\nvideo."
+
index 35a17d9e0d171f370605a0d65dbf2b47524e4e31..c8d400abc0a17bfea7a4fd2832134a1626e49ee1 100755 (executable)
--- a/po/hu.po
+++ b/po/hu.po
@@ -25,3 +25,6 @@ msgstr "Névjegyzék"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Saját fájlok"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Videó-\nrögzítés"
+
index 9e3870e803aea0740cb58679fbad641fa94d990a..9c43710d5aba73d21683354935275bd2a1049788 100755 (executable)
--- a/po/hy.po
+++ b/po/hy.po
@@ -25,3 +25,6 @@ msgstr "Կոնտակտներ"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Իմ Ֆայլերը"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Տեսագրել"
+
index 458984e22d7a7bb244ae5517e67b5e9b2cf9cb34..d4871e1fa7544703f385e66d60823a2b38867b50 100755 (executable)
--- a/po/is.po
+++ b/po/is.po
@@ -25,3 +25,6 @@ msgstr "Tengiliðir"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Skrár"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Taka\nmyndskeið"
+
index dd85b932e2417684e8b1716977d92e50851fb56a..96350b931907b4ccb68f9d91c0d218aa62dd9028 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Rubrica"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Archivio"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Registra\nvideo"
+
index 9725bb2fda9bcf71c7d031b70d6aa60a0db4b633..870054c778f9fd994ccb16ac5121a89181b1800f 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "連絡先"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "マイファイル"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "録画"
+
index 21bb2554b2f79a51666845f2326aef5c555dce56..b78df59e1dc3804209affb55eec7b328afa50639 100755 (executable)
--- a/po/ka.po
+++ b/po/ka.po
@@ -25,3 +25,6 @@ msgstr "კონტაქტები"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "ჩემი ფაილები"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ვიდეოს\nჩაწერა"
+
index cd1dc1d7c3f0c29be62a69ac0f367ede109838d8..b2873466cae0e5c21eaf84872eb62ecc8f7ce08d 100755 (executable)
--- a/po/kk.po
+++ b/po/kk.po
@@ -25,3 +25,6 @@ msgstr "Контактілер"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Файлдарым"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Бейне\nжазу"
+
index c4cdf6aa935c6d75257f97179697ff7cfa41c123..f7a4cd34cc3f7a5dd23329085f4ae1d5b3b9ec3c 100755 (executable)
--- a/po/kn.po
+++ b/po/kn.po
@@ -25,3 +25,6 @@ msgstr "ಸಂಪರ್ಕಗಳು"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "ನನ್ನ ಫೈಲ್‌ಗಳು"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ವೀಡಿಯೊ\nರೆಕಾರ್ಡ್"
+
index ba49cff754a2d9a0c418c23514dfd7d71db6e990..e0a407ed829b59735220477b4b398f513b9b67b3 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "연락처"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "내 파일"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "동영상\n촬영"
+
index 2db61f14a609dca688bc4c2bd3eeae1cedecbc35..ae703615a0783e5a49f7cb5ea5df484cd869353f 100755 (executable)
--- a/po/lt.po
+++ b/po/lt.po
@@ -25,3 +25,6 @@ msgstr "Adresatai"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mano failai"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Įraš.\nvaiz.įr."
+
index 2b6321812ccda1a345a92a51b9b0712d42283e2c..aee4b57d1b569887a5c4bb9bbca6add3c1ec8c64 100755 (executable)
--- a/po/lv.po
+++ b/po/lv.po
@@ -25,3 +25,6 @@ msgstr "Kontakti"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mani faili"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Ierakst.\nvideo"
+
index 900d9b4a146b0c8ceae431d68957143f1cc7cab1..182168a16fcf284c5e1962b0d734e61e96da151e 100755 (executable)
--- a/po/mk.po
+++ b/po/mk.po
@@ -25,3 +25,6 @@ msgstr "Контакти"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Мои датотеки"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Снимање\nвидео"
+
index 3b876df328319a54e74f8217bed2cacffded7758..76911ed9f4b619c134daf3e4e36a6c737ad60f3d 100755 (executable)
--- a/po/ml.po
+++ b/po/ml.po
@@ -25,3 +25,6 @@ msgstr "കോൺടാക്ടുകള്‍"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "എന്‍റെ ഫയലുകൾ"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "വീഡിയോ\nറെക്കോർഡ് ചെയ്യുക"
+
index a782431e353ef63713afc597f9d91ef00a158221..eda1f7f5874a3a1c39ba975c9e6e0fad37e9faf4 100755 (executable)
--- a/po/nb.po
+++ b/po/nb.po
@@ -25,3 +25,6 @@ msgstr "Kontakter"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mine filer"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Ta opp\nvideo"
+
index a9f0f321d277922f8e60919afda65f805df2edcc..90b30c5020bb8bb5f63d974a813edc007c14dea2 100755 (executable)
--- a/po/nl.po
+++ b/po/nl.po
@@ -25,3 +25,6 @@ msgstr "Contacten"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mijn bestanden"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nopnemen"
+
index a3fa6dfe0f860ca3ef9f549c424829af13beb969..b6c9a2e95c9447bb92b65ce093baaf6424e458da 100755 (executable)
--- a/po/pl.po
+++ b/po/pl.po
@@ -25,3 +25,6 @@ msgstr "Kontakty"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Moje pliki"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Nagraj\nwideo"
+
index dcb4ff5f0640dcdf361c8faa4d78ea0b28a84447..bee0a390ac61d7712faf7b4b7b36a2be6396ffb6 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contatos"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Meus Arquivos"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
index 6fbaf574a1e016f848a3f12b131474294dfe3c9f..a9cadb9055da6c266b6ebd309cbafe14ae8d27da 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Contactos"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Meus Ficheiros"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
index 36b788d7a6956158fd7267aeebb5d84b19b0b23c..b658796f7b8f0b726a581a902cb3e42cc297949c 100755 (executable)
--- a/po/ro.po
+++ b/po/ro.po
@@ -25,3 +25,6 @@ msgstr "Contacte"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Fiş. mele"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Înreg.\nvideo"
+
index 4457efc68440ec1e08a88c8816a19728383b2855..0caeb18854d169d461d63a3001a52e9156c9a694 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Контакты"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Мои файлы"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Запись\nвидео"
+
index 7da92a3cdc3a647b906ad7e1ab29296d17502713..eaed724f091bb3ccaeda18d2be6e46ff4e6e45a5 100755 (executable)
--- a/po/si.po
+++ b/po/si.po
@@ -25,3 +25,6 @@ msgstr "සබඳතා"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "මගේ ගොනු"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "වීඩියෝ\nපටිගත ක."
+
index a6e20dbf4fc432ec7e42f57a6ae5480101cfe4dd..6e6020c9bb7d3e59f97105a3c156dfc7a5890c19 100755 (executable)
--- a/po/sk.po
+++ b/po/sk.po
@@ -25,3 +25,6 @@ msgstr "Kontakty"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Moje súbory"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Nahrať\nvideo"
+
index 26476e0b84829a1abf08ccfca4159bd2eda9d330..15498cccdf7b77aacec643f3cbdfbae03d4a46e1 100755 (executable)
--- a/po/sl.po
+++ b/po/sl.po
@@ -25,3 +25,6 @@ msgstr "Stiki"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Moje datoteke"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Snemaj\nvideo"
+
index cd15f304cb92ddd6c60fe57a791c6719b1fd6017..300122eabb3c4566836bea4f823339045b1ef4e1 100755 (executable)
--- a/po/sr.po
+++ b/po/sr.po
@@ -25,3 +25,6 @@ msgstr "Kontakti"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Moji fajlovi"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Snimi\nvideo"
+
index f3cad1fa11b07632256cf2d4f269acf5b9af5841..d05cb8a11e64e170b95a1a01585df228e3a4a7da 100755 (executable)
--- a/po/sv.po
+++ b/po/sv.po
@@ -25,3 +25,6 @@ msgstr "Kontakter"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Mina filer"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Spela in\nvideo"
+
index 711ad679b26059f4b234cc6018d68d34f1e8af0d..2d09ac883553984cba75f8c5c1f766017b69ed2e 100755 (executable)
--- a/po/ta.po
+++ b/po/ta.po
@@ -25,3 +25,6 @@ msgstr "தொடர்புகள்"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "எ. கோப்புகள்"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "நிகழ்படத்தை\nபதிவுசெய்."
+
index 97b1d1b3d63c0b80b660ad0bc2c1b9c9e8e4860e..15b9091be0ff7841532494559dce9e923a3d2c92 100755 (executable)
--- a/po/te.po
+++ b/po/te.po
@@ -25,3 +25,6 @@ msgstr "పరిచయాలు"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "నా ఫైల్‌లు"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "వీడియో\nరికార్డ్ చేయి"
+
index b6bb805cc78e1a6644db05a8f97eb3b86da7c3cd..e73a69ccd15ce3cbed66020f015e971517a1908a 100755 (executable)
--- a/po/th.po
+++ b/po/th.po
@@ -25,3 +25,6 @@ msgstr "รายชื่อ"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "ไฟล์ส่วนตัว"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "บันทึก\nวิดีโอ"
+
index e9ce055d85df44967c25687c32286d0090b44669..7b18ed2593c2685eb982b3560d27c8d28681728e 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "Kişiler"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Dosyalarım"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nkaydı"
+
index a68d62743cc3b9ace1f236045481478e60b032f2..2c2cd16cf015e49179e1f73b34c6c5078b3e2383 100755 (executable)
--- a/po/uk.po
+++ b/po/uk.po
@@ -25,3 +25,6 @@ msgstr "Контакти"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Мої файли"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Запис\nвідео"
+
index 08bae154d12e1ffba34e5e1c3fd7323c065840dc..bde4466545a79c2d38e749b070f9e7bc120fc4ae 100755 (executable)
--- a/po/ur.po
+++ b/po/ur.po
@@ -25,3 +25,6 @@ msgstr "رابطے"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "میری فائلیں"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ریکارڈ\nویڈیو"
+
index 773f0b0892ce27d0dc93c3189732ca2e74cac45a..1ad0f5c8f0e898bbc7ec18ef3c55f4f54899558a 100755 (executable)
--- a/po/uz.po
+++ b/po/uz.po
@@ -25,3 +25,6 @@ msgstr "Kontaktlar"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "Fayllarim"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nyozish"
+
index d401bc340c20006cd640198a50850db143f53163..898a70d18f7c040df8aa8a5812bb0a4363bd05a2 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "联系人"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "我的文件"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "录制\n视频"
+
index 89f1fa5ac1e143ee4249318cc5da39dba8134f23..9c1816e8383604579bb19403e07c754b7d8e9efd 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "聯絡人"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "我的檔案"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "錄製\n影片"
+
index 89f1fa5ac1e143ee4249318cc5da39dba8134f23..0dddbb5d4d74ba75dec3e6a63a5836d1bc14c01f 100755 (executable)
@@ -25,3 +25,6 @@ msgstr "聯絡人"
 msgid "IDS_COM_BUTTON_MY_FILES_ABB"
 msgstr "我的檔案"
 
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "錄影"
+
index 168536256ad9bc62f79914cfe836686cba119dde..805da51f27320499a728a11c30d29d55c0280e64 100644 (file)
@@ -35,10 +35,9 @@ collections {
                                }
                        }
                        part {
-                               name: "toolbar";
-                               type: SWALLOW;
+                               name: "toolbar,clip";
+                               type: RECT;
                                scale: 1;
-                               mouse_events: 1;
                                description {
                                        state: "default" 0.0;
                                        rel1 { relative: 0.0 0.0; to: "bg"; }
@@ -48,6 +47,26 @@ collections {
                                        align: 0.5 0.0;
                                        visible: 1;
                                }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 0;
+                               }
+                       }
+                       part {
+                               name: "toolbar";
+                               type: SWALLOW;
+                               clip_to: "toolbar,clip";
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; to: "toolbar,clip"; }
+                                       rel2 { relative: 1.0 1.0; to: "toolbar,clip"; }
+                                       fixed: 0 1;
+                                       align: 0.5 0.5;
+                                       visible: 1;
+                               }
                        }
                        part {
                                name: "scroller";
@@ -56,7 +75,7 @@ collections {
                                mouse_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.0 1.0; to: "toolbar"; }
+                                       rel1 { relative: 0.0 1.0; to: "toolbar,clip"; }
                                        rel2 { relative: 1.0 1.0; to: "bg"; }
                                        align: 0.5 1.0;
                                        fixed: 1 1;
@@ -64,6 +83,24 @@ collections {
                                }
                        }
                }
+               programs {
+                       program {
+                               name: "toolbar,show";
+                               signal: "toolbar,show";
+                               source: "toolbar";
+                               action: STATE_SET "default" 0.0;
+                               target: "toolbar,clip";
+                               transition: LINEAR 0.2;
+                       }
+                       program {
+                               name: "toolbar,hide";
+                               signal: "toolbar,hide";
+                               source: "toolbar";
+                               action: STATE_SET "hide" 0.0;
+                               target: "toolbar,clip";
+                               transition: LINEAR 0.2;
+                       }
+               }
        } // group
        group {
                name: "grid,icon";
index 68d042bb4aca0002a671da765c60e3064f396b91..383727414273ccd20c90eb1d87db69f7189e5b58 100644 (file)
@@ -82,6 +82,51 @@ static void _rotate_cb(void *data, Evas_Object *obj, void *event)
 
 
 
+static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *user_data)
+{
+       char **select = NULL;
+       int i = 0;
+       int length = 0;
+       int ret = APP_CONTROL_ERROR_NONE;
+
+       ret_if(!result);
+
+       ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
+       if (APP_CONTROL_ERROR_NONE == ret) {
+               for (i = 0; i < length; i++) {
+                       _D("file_path is %s[%d]", select[i], i);
+                       elm_object_part_text_set(sample_info.layout, "result", select[i]);
+                       free(select[i]);
+               }
+       }
+
+       free(select);
+}
+
+
+
+static void _event_cb(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *data)
+{
+       ret_if(!attach_panel);
+
+       switch (event) {
+       case ATTACH_PANEL_EVENT_SHOW_START:
+               _D("attach panel : show start");
+               break;
+       case ATTACH_PANEL_EVENT_SHOW_FINISH:
+               _D("attach panel : show finish");
+               break;
+       case ATTACH_PANEL_EVENT_HIDE_START:
+               _D("attach panel : hide start");
+               break;
+       case ATTACH_PANEL_EVENT_HIDE_FINISH:
+               _D("attach panel : hide finish");
+               break;
+       }
+}
+
+
+
 static void _win_back_key_cb(void *data, Evas_Object *obj, void *event_info)
 {
        bool visible = false;
@@ -103,6 +148,10 @@ static void _win_back_key_cb(void *data, Evas_Object *obj, void *event_info)
                        attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR);
                        attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CONTACT);
                        attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_MYFILES);
+                       attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER);
+
+                       attach_panel_unset_result_cb(sample_info.attach_panel);
+                       attach_panel_unset_event_cb(sample_info.attach_panel);
 
                        attach_panel_destroy(sample_info.attach_panel);
                        sample_info.attach_panel = NULL;
@@ -127,8 +176,12 @@ static void _attach_panel_cancel_cb(void *data, Evas_Object *obj, const char *em
                attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR);
                attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CONTACT);
                attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_MYFILES);
+               attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER);
 
                attach_panel_hide(sample_info.attach_panel);
+               attach_panel_unset_result_cb(sample_info.attach_panel);
+               attach_panel_unset_event_cb(sample_info.attach_panel);
+
                attach_panel_destroy(sample_info.attach_panel);
                sample_info.attach_panel = NULL;
        }
@@ -136,29 +189,6 @@ static void _attach_panel_cancel_cb(void *data, Evas_Object *obj, const char *em
 
 
 
-static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *user_data)
-{
-       char **select = NULL;
-       int i = 0;
-       int length = 0;
-       int ret = APP_CONTROL_ERROR_NONE;
-
-       ret_if(!result);
-
-       ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
-       if (APP_CONTROL_ERROR_NONE == ret) {
-               for (i = 0; i < length; i++) {
-                       _D("file_path is %s[%d]", select[i], i);
-                       elm_object_part_text_set(sample_info.layout, "result", select[i]);
-                       free(select[i]);
-               }
-       }
-
-       free(select);
-}
-
-
-
 static void _attach_panel_create_cb(void *data, Evas_Object *obj, void *event_info)
 {
        attach_panel_h attach_panel = NULL;
@@ -189,7 +219,9 @@ static void _attach_panel_create_cb(void *data, Evas_Object *obj, void *event_in
        attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR, NULL);
        attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CONTACT, NULL);
        attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, NULL);
+       attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, NULL);
        attach_panel_set_result_cb(attach_panel, _result_cb, NULL);
+       attach_panel_set_event_cb(attach_panel, _event_cb, NULL);
 
        attach_panel_show(attach_panel);
 
index 43c1790c13df13866e6983545382075117ebf381..209a22d0e0792ae93545dabf6f0edf00cbee0296 100644 (file)
@@ -40,6 +40,8 @@ static void __foreach_bundle_to_add_cb(const char *key, const int type, bundle_k
        ret_if(!key);
        ret_if(!app_control);
 
+       _D("key: %s", key);
+
        switch(type) {
        case BUNDLE_TYPE_STR:
                ret = bundle_keyval_get_basic_val(kv, (void *) &basic_val, &size);
index 50cf7e83d6fc8bb3aa68a4446df611dbf7453235..892d9ca038a44cd9c5fbf4bfcb7853eddc550b99 100644 (file)
@@ -21,7 +21,9 @@
 #include <isf_control.h>
 #include <system_info.h>
 #include <tizen.h>
-//#include <privilege_checker.h>
+#if 0 /* privilege_checker is not included in the 3.0 */
+#include <privilege_checker.h>
+#endif
 #include <ui-gadget.h>
 
 #include "attach_panel.h"
 #include "conf.h"
 #include "content_list.h"
 #include "gesture.h"
+#include "grid.h"
 #include "ui_manager.h"
+#include "list.h"
 #include "log.h"
 #include "scroller.h"
+#include "toolbar.h"
 
 static const char *const ATTACH_PANEL_DOMAIN = "attach-panel";
 static const char *const PLATFORM_FEATURE_CAMERA = "tizen.org/feature/camera";
@@ -40,7 +45,7 @@ static const char *const PLATFORM_FEATURE_MICROPHONE = "tizen.org/feature/microp
 
 
 
-innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
+innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER] = {
        {
                .appid = "attach-panel-gallery",
                .name = "IDS_COM_TAB4_IMAGES_ABB2",
@@ -70,7 +75,7 @@ innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
                .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_UG,
        },
        {
-               .appid = NULL,
+               .appid = "videos",
                .name = "IDS_COM_BUTTON2_VIDEOS",
                .operation = APP_CONTROL_OPERATION_PICK,
                .icon = "/usr/share/icons/video.png",
@@ -81,7 +86,7 @@ innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
                .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
        },
        {
-               .appid = "NULL",
+               .appid = "audio",
                .name = "IDS_COM_BUTTON2_AUDIO_FILES",
                .operation = APP_CONTROL_OPERATION_PICK,
                .icon = "/usr/share/icons/music.png",
@@ -92,14 +97,13 @@ innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
                .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
        },
        {
-               .appid = "NULL",
+               .appid = "calendar",
                .name = "IDS_EMAIL_BUTTON2_CALENDAR",
                .operation = APP_CONTROL_OPERATION_PICK,
                .icon = "/usr/share/icons/calendar.png",
                .tabbar_name = "IDS_COM_TAB4_MORE_ABB",
                .mode = 1,
-               .result_type = "vcs",
-               .item_type = "event",
+               .type = "vcs",
                .selection_mode = "multiple",
                .mime = "application/vnd.tizen.calendar",
                .max = 1,
@@ -107,12 +111,12 @@ innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
                .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
        },
        {
-               .appid = "NULL",
+               .appid = "contacts",
                .name = "IDS_COM_BUTTON2_CONTACTS",
                .operation = APP_CONTROL_OPERATION_PICK,
                .icon = "/usr/share/icons/contact.png",
                .tabbar_name = "IDS_COM_TAB4_MORE_ABB",
-               .result_type = "vcard",
+               .type = "vcf",
                .item_type = "person",
                .selection_mode = "multiple",
                .mime = "application/vnd.tizen.contact",
@@ -120,7 +124,7 @@ innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
                .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
        },
        {
-               .appid = "NULL",
+               .appid = "myfiles",
                .name = "IDS_COM_BUTTON_MY_FILES_ABB",
                .operation = APP_CONTROL_OPERATION_PICK,
                .tabbar_name = "IDS_COM_TAB4_MORE_ABB",
@@ -129,6 +133,17 @@ innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
                .content_category = ATTACH_PANEL_CONTENT_CATEGORY_MYFILES,
                .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
        },
+       {
+               .appid = "record_video",
+               .name = "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB",
+               .operation = APP_CONTROL_OPERATION_CREATE_CONTENT,
+               .icon = "/usr/share/icons/default.png",
+               .tabbar_name = "IDS_COM_TAB4_MORE_ABB",
+               .selection_mode = "single",
+               .mime = "video/3gp",
+               .content_category = ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER,
+               .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
+       },
 };
 
 
@@ -194,10 +209,12 @@ static void __rotate_cb(void *data, Evas_Object *obj, void *event)
                        attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_HIDE;
                } else if (ATTACH_PANEL_STATE_HALF == attach_panel->attach_panel_port_state) {
                        attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_FULL;
+                       _gesture_set_state(ATTACH_PANEL_STATE_FULL);
                        _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
                        elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,full", "");
                } else {
                        attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_FULL;
+                       _gesture_set_state(ATTACH_PANEL_STATE_FULL);
                }
                break;
        case 0:
@@ -214,10 +231,12 @@ static void __rotate_cb(void *data, Evas_Object *obj, void *event)
                        attach_panel->attach_panel_port_state = ATTACH_PANEL_STATE_HIDE;
                } else {
                        if (ATTACH_PANEL_STATE_HALF == attach_panel->attach_panel_port_state) {
+                               _gesture_set_state(ATTACH_PANEL_STATE_HALF);
                                _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
                                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,half", "");
                        } else {
                                attach_panel->attach_panel_port_state = ATTACH_PANEL_STATE_FULL;
+                               _gesture_set_state(ATTACH_PANEL_STATE_FULL);
                        }
                }
                break;
@@ -227,6 +246,7 @@ static void __rotate_cb(void *data, Evas_Object *obj, void *event)
        }
 
        _scroller_resize(attach_panel->scroller, w, 0);
+       elm_scroller_page_show(attach_panel->scroller, attach_panel->cur_page_no, 0);
 }
 
 
@@ -286,13 +306,14 @@ EXPORT_API int attach_panel_create(Evas_Object *conformant, attach_panel_h *atta
        panel->is_delete = EINA_FALSE;
        panel->rotate = EINA_FALSE;
        panel->flick = EINA_TRUE;
-       panel->current_page = 0;
-       panel->show_page = 0;
+       panel->cur_page_no = 0;
+       panel->magic_no = 0x1024;
 
        panel->gesture = _gesture_create(panel);
        goto_if(!panel->gesture, ERROR);
 
        evas_object_smart_callback_add(panel->win, "wm,rotation,changed", __rotate_cb, panel);
+       elm_scroller_movement_block_set(panel->scroller, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL);
        __rotate_cb(panel, panel->win, NULL);
        *attach_panel = panel;
 
@@ -321,6 +342,14 @@ extern void _attach_panel_del(attach_panel_h attach_panel)
        Eina_List *l = NULL;
 
        ret_if(!attach_panel);
+       _D("%s : attach panel is destroyed", __func__);
+
+       if (0x1024 != attach_panel->magic_no) {
+               _D("attach panel is already destroyed");
+               return;
+       }
+
+       attach_panel->magic_no = 0;
 
        _gesture_destroy(attach_panel);
 
@@ -346,16 +375,18 @@ extern void _attach_panel_del(attach_panel_h attach_panel)
 EXPORT_API int attach_panel_destroy(attach_panel_h attach_panel)
 {
        retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+       _D("%s : attach panel will be destroyed", __func__);
 
        if (EINA_TRUE == attach_panel->is_delete) {
                _E("Attach panel is already removed");
                return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
        }
 
+       attach_panel->is_delete = EINA_TRUE;
        if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
                _attach_panel_del(attach_panel);
        } else {
-               attach_panel->is_delete = EINA_TRUE;
+               attach_panel_hide(attach_panel);
        }
 
        return ATTACH_PANEL_ERROR_NONE;
@@ -376,9 +407,11 @@ static void __iter_cb(const char *key, const int type, bundle_keyval_t *kv, void
 
 
 
-//static const char *const PRIVILEGE_CAMERA = "http://tizen.org/privilege/camera";
-//static const char *const PRIVILEGE_RECORDER = "http://tizen.org/privilege/recorder";
-//static const char *const PRIVILEGE_APPMANAGER_LAUNCH = "http://tizen.org/privilege/appmanager.launch";
+#if 0 /* privilege_checker is not included in the 3.0 */
+static const char *const PRIVILEGE_CAMERA = "http://tizen.org/privilege/camera";
+static const char *const PRIVILEGE_RECORDER = "http://tizen.org/privilege/recorder";
+static const char *const PRIVILEGE_APPMANAGER_LAUNCH = "http://tizen.org/privilege/appmanager.launch";
+#endif
 EXPORT_API int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data)
 {
        content_s *content_info = NULL;
@@ -390,7 +423,7 @@ EXPORT_API int attach_panel_add_content_category(attach_panel_h attach_panel, at
        retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
        retv_if(!attach_panel->ui_manager, ATTACH_PANEL_ERROR_NOT_INITIALIZED);
        retv_if(content_category < ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
-       retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+       retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
 
        if (EINA_TRUE == attach_panel->is_delete) {
                _E("Attach panel is already removed");
@@ -402,33 +435,34 @@ EXPORT_API int attach_panel_add_content_category(attach_panel_h attach_panel, at
                ret = system_info_get_platform_bool(PLATFORM_FEATURE_CAMERA, &value);
                break_if(SYSTEM_INFO_ERROR_NONE != ret);
                retv_if(false == value, ATTACH_PANEL_ERROR_UNSUPPORTED_CONTENT_CATEGORY);
-/*
+
+#if 0 /* privilege_checker is not included in the 3.0 */
                ret = privilege_checker_check_privilege(PRIVILEGE_CAMERA);
                retv_if(PRIVILEGE_CHECKER_ERR_UNDECLARED_PRIVILEGE == ret, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
                break_if(PRIVILEGE_CHECKER_ERR_NONE != ret);
-*/
+#endif
                break;
        case ATTACH_PANEL_CONTENT_CATEGORY_VOICE:
                ret = system_info_get_platform_bool(PLATFORM_FEATURE_MICROPHONE, &value);
                break_if(SYSTEM_INFO_ERROR_NONE != ret);
                retv_if(false == value, ATTACH_PANEL_ERROR_UNSUPPORTED_CONTENT_CATEGORY);
 
-/*
+#if 0 /* privilege_checker is not included in the 3.0 */
                ret = privilege_checker_check_privilege(PRIVILEGE_RECORDER);
                retv_if(PRIVILEGE_CHECKER_ERR_UNDECLARED_PRIVILEGE == ret, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
                break_if(PRIVILEGE_CHECKER_ERR_NONE != ret);
-*/
+#endif
                break;
        case ATTACH_PANEL_CONTENT_CATEGORY_VIDEO:
        case ATTACH_PANEL_CONTENT_CATEGORY_AUDIO:
        case ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR:
        case ATTACH_PANEL_CONTENT_CATEGORY_CONTACT:
        case ATTACH_PANEL_CONTENT_CATEGORY_MYFILES:
-/*
+#if 0 /* privilege_checker is not included in the 3.0 */
                ret = privilege_checker_check_privilege(PRIVILEGE_APPMANAGER_LAUNCH);
                retv_if(PRIVILEGE_CHECKER_ERR_UNDECLARED_PRIVILEGE == ret, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
                break_if(PRIVILEGE_CHECKER_ERR_NONE != ret);
-*/
+#endif
                break;
        default:
                break;
@@ -470,7 +504,7 @@ EXPORT_API int attach_panel_remove_content_category(attach_panel_h attach_panel,
        retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
        retv_if(!attach_panel->ui_manager, ATTACH_PANEL_ERROR_NOT_INITIALIZED);
        retv_if(content_category < ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
-       retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+       retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
 
        if (EINA_TRUE == attach_panel->is_delete) {
                _E("Attach panel is already removed");
@@ -505,7 +539,8 @@ EXPORT_API int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_p
        retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
        retv_if(!attach_panel->ui_manager, ATTACH_PANEL_ERROR_NOT_INITIALIZED);
        retv_if(content_category < ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
-       retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+       retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+       retv_if(!extra_data, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
 
        bundle_foreach(extra_data, (void *) __iter_cb, &bundle_is_op);
 
@@ -534,6 +569,16 @@ EXPORT_API int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_p
        }
 
        if (innate_content_info[content_category-1].is_ug) {
+               if (!content_info->content) {
+                       _D("Create ug because ug is not created yet");
+                       content_info->content = _ui_manager_create_content(content_info->page, content_info, attach_panel);
+                       retv_if(!content_info->content, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+                       if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
+                               _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                       } else {
+                               _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                       }
+               }
 
                ret = app_control_create(&app_control);
                retv_if(APP_CONTROL_ERROR_NONE != ret, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
@@ -593,8 +638,45 @@ EXPORT_API int attach_panel_unset_result_cb(attach_panel_h attach_panel)
 
 
 
+EXPORT_API int attach_panel_set_event_cb(attach_panel_h attach_panel, attach_panel_event_cb event_cb, void *user_data)
+{
+       retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+       retv_if(!event_cb, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+
+       if (EINA_TRUE == attach_panel->is_delete) {
+               _E("Attach panel is already removed");
+               return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
+       }
+
+       attach_panel->event_cb = event_cb;
+       attach_panel->event_data = user_data;
+
+       return ATTACH_PANEL_ERROR_NONE;
+}
+
+
+
+EXPORT_API int attach_panel_unset_event_cb(attach_panel_h attach_panel)
+{
+       retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+
+       if (EINA_TRUE == attach_panel->is_delete) {
+               _E("Attach panel is already removed");
+               return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
+       }
+
+       attach_panel->event_cb = NULL;
+       attach_panel->event_data = NULL;
+
+       return ATTACH_PANEL_ERROR_NONE;
+}
+
+
+
 EXPORT_API int attach_panel_show(attach_panel_h attach_panel)
 {
+       Elm_Object_Item *first_it;
+       content_s *content_info = NULL;
        int height = 0;
 
        retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
@@ -617,11 +699,31 @@ EXPORT_API int attach_panel_show(attach_panel_h attach_panel)
                attach_panel->transit_height = height;
        }
 
-       //_content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
+       retv_if(!content_info, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+
+       _toolbar_bring_in(attach_panel->toolbar, content_info->tabbar_item);
+
+       if (content_info->content) {
+               elm_scroller_page_show(attach_panel->scroller, attach_panel->cur_page_no, 0);
+       } else {
+               content_info->content = _ui_manager_create_content(content_info->page, content_info, attach_panel);
+               retv_if(!content_info->content, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+       }
+
+       _content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
        _content_list_send_message(attach_panel->content_list, "__ATTACH_PANEL_INITIALIZE__", MODE_ENABLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
        evas_object_show(attach_panel->ui_manager);
+
        _gesture_show(attach_panel);
-       elm_scroller_page_show(attach_panel->scroller, attach_panel->current_page, 0);
+
+       attach_panel->content_list = _list_sort_by_rua(attach_panel->content_list);
+       _grid_refresh(attach_panel->grid);
+
+       first_it = elm_gengrid_first_item_get(attach_panel->grid);
+       if (first_it) {
+               elm_gengrid_item_show(first_it, ELM_GENGRID_ITEM_SCROLLTO_TOP);
+       }
 
        return ATTACH_PANEL_ERROR_NONE;
 }
@@ -638,7 +740,7 @@ EXPORT_API int attach_panel_hide(attach_panel_h attach_panel)
                return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
        }
 
-       //_content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
        _gesture_hide(attach_panel);
 
        return ATTACH_PANEL_ERROR_NONE;
index 79bb01cf68bcf8629fbb59098cfbc5b7df718a33..3b4f8fba9955eb7272d4b11a6e15ede5d1c57558 100644 (file)
@@ -58,6 +58,10 @@ void _content_list_send_message(Eina_List *list, const char *key, const char *va
 
        EINA_LIST_FOREACH(list, l, content_info) {
                continue_if(!content_info);
+               if (!content_info->content) {
+                       _D("ug is not created yet");
+                       continue;
+               }
                innate_content_s *innate_content_info = content_info->innate_content_info;
                continue_if(!innate_content_info);
 
@@ -66,9 +70,8 @@ void _content_list_send_message(Eina_List *list, const char *key, const char *va
 
                        ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
                        if (!ui_gadget) {
-                               _E("Fail to get the ui gadget");
-                               app_control_destroy(app_control);
-                               return;
+                               _D("Fail to get the ui gadget");
+                               continue;
                        }
                        ug_send_message(ui_gadget, app_control);
                }
@@ -80,7 +83,7 @@ void _content_list_send_message(Eina_List *list, const char *key, const char *va
 
 
 
-void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int show_page)
+void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int cur_page_no)
 {
        content_s *content_info = NULL;
        app_control_h app_control = NULL;
@@ -92,7 +95,7 @@ void _content_list_send_message_to_content(Eina_List *list, const char *key, con
        ret_if(!key);
        ret_if(!value);
 
-       content_info = eina_list_nth(list, show_page);
+       content_info = eina_list_nth(list, cur_page_no);
        ret_if(!content_info);
 
        if (!content_info->innate_content_info->is_ug) {
@@ -119,7 +122,7 @@ void _content_list_send_message_to_content(Eina_List *list, const char *key, con
 
        ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
        if (!ui_gadget) {
-               _E("Fail to get the ui gadget");
+               _D("Fail to get the ui gadget");
                app_control_destroy(app_control);
                return;
        }
@@ -147,10 +150,12 @@ void _content_list_set_pause(Eina_List *list, int is_ug)
 
                        ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
                        if (!ui_gadget) {
-                               _E("Fail to get the ui gadget");
-                               return;
+                               _D("Fail to get the ui gadget");
+                               continue;
                        }
-                       //ug_pause_ug(ui_gadget);
+#if 0 /* privilege_checker is not included in the 3.0 */
+                       ug_pause_ug(ui_gadget);
+#endif
                }
        }
 }
@@ -173,10 +178,12 @@ void _content_list_set_resume(Eina_List *list, int is_ug)
 
                        ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
                        if (!ui_gadget) {
-                               _E("Fail to get the ui gadget");
-                               return;
+                               _D("Fail to get the ui gadget");
+                               continue;
                        }
-                       //ug_resume_ug(ui_gadget);
+#if 0 /* privilege_checker is not included in the 3.0 */
+                       ug_resume_ug(ui_gadget);
+#endif
                }
        }
 }
index e9b34854fbd3290a89b59314f899eac1a84d9a52..1555b8c0012a2baf909cdccd7d26a928e92e2c42 100644 (file)
@@ -52,6 +52,13 @@ attach_panel_state_e _gesture_get_state(void)
 
 
 
+void _gesture_set_state(attach_panel_state_e state)
+{
+       gesture_info_s.attach_panel_state = state;
+}
+
+
+
 static Elm_Transit_Effect *__custom_effect_new(Evas_Coord from_h, Evas_Coord to_h)
 {
        custom_effect_s *custom_effect = calloc(1, sizeof(custom_effect_s));
@@ -102,15 +109,22 @@ static void __custom_effect_free(Elm_Transit_Effect *effect, Elm_Transit *transi
 static void __attach_panel_transit_del_cb(void *data, Elm_Transit *transit)
 {
        attach_panel_h attach_panel = data;
+       _D("%s : transit is ended", __func__);
 
        gesture_info_s.transit = NULL;
        if (gesture_info_s.attach_panel_state == ATTACH_PANEL_STATE_HIDE) {
                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,hide,finished", "");
+               if (attach_panel->event_cb) {
+                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_FINISH, NULL, attach_panel->event_data);
+               }
                if (attach_panel->is_delete) {
                        _attach_panel_del(attach_panel);
                }
        } else {
                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,finished", "");
+               if (attach_panel->event_cb) {
+                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_FINISH, NULL, attach_panel->event_data);
+               }
        }
 }
 
@@ -122,6 +136,21 @@ static void __attach_panel_transit_set(attach_panel_h attach_panel, Evas_Coord f
 
        if (gesture_info_s.transit) {
                _E("Transit is already activating");
+               if (attach_panel->cur_event_state == ATTACH_PANEL_EVENT_HIDE_START) {
+                       if (gesture_info_s.attach_panel_state != ATTACH_PANEL_STATE_HIDE) {
+                               if (attach_panel->event_cb) {
+                                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_FINISH, NULL, attach_panel->event_data);
+                                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_START, NULL, attach_panel->event_data);
+                               }
+                       }
+               } else {
+                       if (gesture_info_s.attach_panel_state == ATTACH_PANEL_STATE_HIDE) {
+                               if (attach_panel->event_cb) {
+                                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_FINISH, NULL, attach_panel->event_data);
+                                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_START, NULL, attach_panel->event_data);
+                               }
+                       }
+               }
                return;
        }
 
@@ -130,8 +159,16 @@ static void __attach_panel_transit_set(attach_panel_h attach_panel, Evas_Coord f
 
        if (gesture_info_s.attach_panel_state == ATTACH_PANEL_STATE_HIDE) {
                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,hide,started", "");
+               attach_panel->cur_event_state = ATTACH_PANEL_EVENT_HIDE_START;
+               if (attach_panel->event_cb) {
+                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_START, NULL, attach_panel->event_data);
+               }
        } else {
                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,started", "");
+               attach_panel->cur_event_state = ATTACH_PANEL_EVENT_SHOW_START;
+               if (attach_panel->event_cb) {
+                       attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_START, NULL, attach_panel->event_data);
+               }
        }
 
        gesture_info_s.transit = elm_transit_add();
@@ -154,11 +191,12 @@ static void __attach_panel_transit_set(attach_panel_h attach_panel, Evas_Coord f
 void _gesture_show(attach_panel_h attach_panel)
 {
        gesture_info_s.attach_panel_state = ATTACH_PANEL_STATE_HALF;
-       _D("");
+       _D("gesture show start");
 
        if (attach_panel->rotate) {
                _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
                attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_FULL;
+               gesture_info_s.attach_panel_state = ATTACH_PANEL_STATE_FULL;
                __attach_panel_transit_set(attach_panel, 0, attach_panel->transit_height, TRANSIT_DURATION);
                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,full", "");
 
@@ -167,6 +205,7 @@ void _gesture_show(attach_panel_h attach_panel)
                _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
                elm_scroller_movement_block_set(attach_panel->grid, ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL);
                attach_panel->attach_panel_port_state = ATTACH_PANEL_STATE_HALF;
+               gesture_info_s.attach_panel_state = ATTACH_PANEL_STATE_HALF;
                __attach_panel_transit_set(attach_panel, 0, attach_panel->transit_height, TRANSIT_DURATION);
        }
 }
@@ -175,7 +214,7 @@ void _gesture_show(attach_panel_h attach_panel)
 
 void _gesture_hide(attach_panel_h attach_panel)
 {
-       _D("");
+       _D("gestrue hide start");
        if (attach_panel->rotate) {
                attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_HIDE;
                elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,half", "");
index 51267da45809b86d296c5e2c11e30e15f29aa0ee..8918cc40f42e243a53c97c5ed4aaf0d3ad57be50 100644 (file)
  * limitations under the License.
  */
 
+#include <aul.h>
 #include <app_control.h>
 #include <Elementary.h>
+#include <rua.h>
 
 #include "attach_panel.h"
 #include "attach_panel_internal.h"
 #include "attach_bundle.h"
 #include "conf.h"
+#include "content_list.h"
 #include "gesture.h"
 #include "grid.h"
 #include "log.h"
@@ -58,7 +61,7 @@ Eina_Bool _grid_can_flick(attach_panel_h attach_panel)
                }
        }
 
-       current_content_info = eina_list_nth(attach_panel->content_list, attach_panel->current_page);
+       current_content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
        retv_if(!current_content_info, EINA_TRUE);
 
        if (attach_panel->grid != current_content_info->content) {
@@ -88,12 +91,14 @@ static char *__text_get(void *data, Evas_Object *obj, const char *part)
 {
        content_s *info = data;
        innate_content_s *innate_content_info = NULL;
+       char *buf = NULL;
        retv_if(!info, NULL);
 
        innate_content_info = info->innate_content_info;
        retv_if(!innate_content_info, NULL);
        if (!strcmp(part, "elm.text")) {
-               return strdup(D_(innate_content_info->name));
+               buf = elm_entry_utf8_to_markup(D_(innate_content_info->name));
+               return buf;
        }
 
        return NULL;
@@ -189,19 +194,40 @@ static void __del(void *data, Evas_Object *obj)
 static void __reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
 {
        content_s *content_info = user_data;
+       char **select = NULL;
+       int i = 0;
+       int length = 0;
+       int ret = APP_CONTROL_ERROR_NONE;
 
        ret_if(!content_info);
        ret_if(!content_info->attach_panel);
 
+       /* This is just for protocol log */
+       _D("relay callback is called");
+       ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &select, &length);
+       if (APP_CONTROL_ERROR_NONE == ret && select) {
+               for (i = 0; i < length; i++) {
+                       _D("selected is %s[%d]", select[i], i);
+               }
+       }
+
+       ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/path", &select, &length);
+       if (APP_CONTROL_ERROR_NONE == ret && select) {
+               for (i = 0; i < length; i++) {
+                       _D("path is %s[%d]", select[i], i);
+               }
+       }
+
        if (content_info->attach_panel->result_cb) {
                content_info->attach_panel->result_cb(content_info->attach_panel
                                , content_info->innate_content_info->content_category
                                , reply
+                               , result
                                , content_info->attach_panel->result_data);
 
                if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
-                       /* This is same with attach_panel_hide */
-                       //_content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                       /* This is same with attach_panel_hide() */
+                       _content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
                        _gesture_hide(content_info->attach_panel);
                }
        } else {
@@ -227,33 +253,47 @@ static void __launch_app(content_s *content_info)
        ret_if(APP_CONTROL_ERROR_NONE != ret);
 
        if (content_info->innate_content_info->operation) {
-               app_control_set_operation(app_control, content_info->innate_content_info->operation);
+               ret = app_control_set_operation(app_control, content_info->innate_content_info->operation);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to set operation");
        }
 
        if (content_info->innate_content_info->mode) {
                snprintf(value, sizeof(value), "%d", content_info->innate_content_info->mode);
-               app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/mode", value);
+               ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/mode", value);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to add 'http://tizen.org/appcontrol/data/mode'");
        }
 
-       if (content_info->innate_content_info->result_type) {
-               app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/result_type", content_info->innate_content_info->result_type);
+       if (content_info->innate_content_info->type) {
+               ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/type", content_info->innate_content_info->type);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to add 'http://tizen.org/appcontrol/data/type'");
        }
 
        if (content_info->innate_content_info->item_type) {
-               app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/item_type", content_info->innate_content_info->item_type);
+               ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/item_type", content_info->innate_content_info->item_type);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to add 'http://tizen.org/appcontrol/data/item_type'");
        }
 
        if (content_info->innate_content_info->selection_mode) {
-               app_control_add_extra_data(app_control, APP_CONTROL_DATA_SELECTION_MODE, content_info->innate_content_info->selection_mode);
+               ret = app_control_add_extra_data(app_control, APP_CONTROL_DATA_SELECTION_MODE, content_info->innate_content_info->selection_mode);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to add APP_CONTROL_DATA_SELECTION_MODE");
        }
 
        if (content_info->innate_content_info->mime) {
-               app_control_set_mime(app_control, content_info->innate_content_info->mime);
+               ret = app_control_set_mime(app_control, content_info->innate_content_info->mime);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to set mime");
        }
 
        if (content_info->innate_content_info->max) {
                snprintf(value, sizeof(value), "%d", content_info->innate_content_info->max);
-               app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/max", value);
+               ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/max", value);
+               if (APP_CONTROL_ERROR_NONE != ret)
+                       _E("Fail to add 'http://tizen.org/appcontrol/data/max'");
        }
 
        if (content_info->extra_data) {
@@ -261,9 +301,28 @@ static void __launch_app(content_s *content_info)
                _bundle_add_to_app_control(content_info->extra_data, app_control);
        }
 
-       app_control_set_launch_mode(app_control, APP_CONTROL_LAUNCH_MODE_GROUP);
+#if 0 /* privilege_checker is not included in the 3.0 */
+       ret = app_control_add_extra_data(app_control, AUL_SVC_K_RUA_STAT_CALLER, "attach-panel");
+       if (APP_CONTROL_ERROR_NONE != ret)
+               _E("Fail to add 'AUL_SVC_K_RUA_STAT_CALLER'");
+
+       ret = app_control_add_extra_data(app_control, AUL_SVC_K_RUA_STAT_TAG, content_info->innate_content_info->appid);
+       if (APP_CONTROL_ERROR_NONE != ret)
+               _E("Fail to add 'AUL_SVC_K_RUA_STAT_TAG'");
+#endif
+
+       ret = app_control_add_extra_data(app_control, "__CALLER_PANEL__", "attach-panel");
+       if (APP_CONTROL_ERROR_NONE != ret)
+               _E("Fail to add '__CALLER_PANEL__'");
+
+       ret = app_control_set_launch_mode(app_control, APP_CONTROL_LAUNCH_MODE_GROUP);
+       if (APP_CONTROL_ERROR_NONE != ret)
+               _E("Fail to set launch mode");
+
+       ret = app_control_send_launch_request(app_control, __reply_cb, content_info);
+       if (APP_CONTROL_ERROR_NONE != ret)
+               _E("Fail to send launch request");
 
-       app_control_send_launch_request(app_control, __reply_cb, content_info);
        app_control_destroy(app_control);
 }
 
@@ -299,10 +358,6 @@ Eina_Bool __animator_cb(void *data)
 
        int index = 0;
        int count = 0;
-       int sum = 0;
-       int i = 0;
-       static int column = 0;
-       static int row = 0;
 
        retv_if(!grid, ECORE_CALLBACK_CANCEL);
 
@@ -316,26 +371,14 @@ Eina_Bool __animator_cb(void *data)
 
        count = eina_list_count(list);
        if (index == count) goto OUT;
-
-       if (!index) {
-               int grid_w;
-               int grid_h;
-               evas_object_geometry_get(grid, NULL, NULL, &grid_w, &grid_h);
-               int w = (int) evas_object_data_get(grid, PRIVATE_DATA_KEY_ITEM_WIDTH);
-               int h = (int) evas_object_data_get(grid, PRIVATE_DATA_KEY_ITEM_HEIGHT);
-               if (w) {
-                       column = grid_w / w;
-                       row = (int) ceil((double) ((double) grid_h / (double) h));
+       info = eina_list_nth(list, index);
+       if (info && info->innate_content_info) {
+               if (!info->innate_content_info->is_ug) {
+                       elm_gengrid_item_append(grid, gic, info, __item_selected, info);
                }
        }
-
-       sum = column * row;
-       for (; i < sum; ++i) {
-               info = eina_list_nth(list, index);
-               elm_gengrid_item_append(grid, gic, info, __item_selected, info);
-               index++;
-               if (index == count) goto OUT;
-       }
+       index++;
+       if (index == count) goto OUT;
        evas_object_data_set(grid, PRIVATE_DATA_KEY_LIST_INDEX, (void *) index);
 
        return ECORE_CALLBACK_RENEW;
@@ -355,6 +398,26 @@ OUT:
 
 
 
+void _grid_refresh(Evas_Object *grid)
+{
+       Ecore_Animator *anim = NULL;
+
+       ret_if(!grid);
+
+       elm_gengrid_clear(grid);
+
+       anim = evas_object_data_del(grid, PRIVATE_DATA_KEY_ANIMATOR);
+       if (anim) {
+               ecore_animator_del(anim);
+       }
+       anim = ecore_animator_add(__animator_cb, grid);
+       ret_if(!anim);
+
+       evas_object_data_set(grid, PRIVATE_DATA_KEY_ANIMATOR, anim);
+}
+
+
+
 static void __edge_top_cb(void *data, Evas_Object *grid, void *event_info)
 {
        ret_if(!grid);
@@ -416,6 +479,7 @@ Evas_Object *_grid_create(Evas_Object *page, attach_panel_h attach_panel)
        elm_gengrid_align_set(grid, 0.0, 0.0);
        elm_gengrid_horizontal_set(grid, EINA_FALSE);
        elm_gengrid_multi_select_set(grid, EINA_FALSE);
+       elm_object_style_set(grid, "popup");
 
        gic = elm_gengrid_item_class_new();
        goto_if(!gic, ERROR);
@@ -423,7 +487,7 @@ Evas_Object *_grid_create(Evas_Object *page, attach_panel_h attach_panel)
        gic->func.content_get = __content_get;
        gic->func.state_get = NULL;
        gic->func.del = __del;
-       gic->item_style = "type2";
+       gic->item_style = "default";
 
        evas_object_data_set(grid, PRIVATE_DATA_KEY_GRID_LIST, attach_panel->content_list);
        evas_object_data_set(grid, PRIVATE_DATA_KEY_GIC, gic);
diff --git a/src/list.c b/src/list.c
new file mode 100644 (file)
index 0000000..4ff779f
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+
+#include <aul.h>
+#include <Elementary.h>
+#include <tizen.h>
+#include <rua.h>
+#if 0 /* privilege_checker is not included in the 3.0 */
+#include <rua_stat.h>
+#endif
+
+#include "attach_panel.h"
+#include "attach_panel_internal.h"
+#include "conf.h"
+#include "log.h"
+
+
+
+static struct {
+       int ordering;
+} list_info = {
+       .ordering = 1,
+};
+
+static int __rua_stat_tag_iter_cb(const char *rua_stat_tag, void *data)
+{
+       Eina_List *content_list = data;
+       Eina_List *l = NULL;
+       Eina_List *ln = NULL;
+       content_s *content_info = NULL;
+
+       retv_if(!content_list, -1);
+       retv_if(!rua_stat_tag, -1);
+
+       _D("[Rua] %d : %s", list_info.ordering, rua_stat_tag);
+       EINA_LIST_FOREACH_SAFE(content_list, l, ln, content_info) {
+               continue_if(!content_info);
+               continue_if(!content_info->innate_content_info);
+               if (!strcmp(rua_stat_tag, content_info->innate_content_info->appid)) {
+                       content_info->order = list_info.ordering;
+                       list_info.ordering ++;
+               }
+       }
+
+       return 0;
+}
+
+
+
+static int __sort_cb(const void *d1, const void *d2)
+{
+       content_s *content_info1 = (content_s *) d1;
+       content_s *content_info2 = (content_s *) d2;
+
+       if (!content_info1 || !content_info1->innate_content_info) {
+               return 1;
+       }
+       if (!content_info2 || !content_info2->innate_content_info) {
+               return -1;
+       }
+       if (content_info1->innate_content_info->is_ug || content_info2->innate_content_info->is_ug) {
+               return -1;
+       }
+       if (content_info1->order < content_info2->order) {
+               return -1;
+       } else if (content_info1->order > content_info2->order) {
+               return 1;
+       } else {
+               return (strcmp(content_info1->innate_content_info->appid, content_info2->innate_content_info->appid));
+       }
+}
+
+
+
+Eina_List * _list_sort_by_rua(Eina_List *content_list)
+{
+       int ret = 0;
+
+       retv_if(!content_list, NULL);
+
+       list_info.ordering = 1;
+#if 0 /* privilege_checker is not included in the 3.0 */
+       ret = rua_stat_get_stat_tags("attach-panel", __rua_stat_tag_iter_cb, content_list);
+       retv_if(0 != ret, NULL);
+#endif
+
+       content_list = eina_list_sort(content_list, eina_list_count(content_list), __sort_cb);
+
+       return content_list;
+}
index e96fd951e771890d86182c0eda5ac50459c558da..1af8cf187423aedfd4c2b6b6bd4bd92d18138421 100644 (file)
@@ -82,10 +82,10 @@ static void __anim_stop_cb(void *data, Evas_Object *scroller, void *event_info)
                return;
        }
 
-       if (attach_panel->show_page != index) {
-               _content_list_send_message_to_content(attach_panel->content_list, "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__", "false", attach_panel->show_page);
+       if (attach_panel->cur_page_no != index) {
+               _content_list_send_message_to_content(attach_panel->content_list, "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__", "false", attach_panel->cur_page_no);
                _content_list_send_message_to_content(attach_panel->content_list, "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__", "true", index);
-               attach_panel->show_page = index;
+               attach_panel->cur_page_no = index;
                _D("change the show page : %d", index);
        }
 }
@@ -143,7 +143,7 @@ static void __scroll_cb(void *data, Evas_Object *scroller, void *event_info)
        EINA_LIST_FOREACH(attach_panel->content_list, l, info) {
                if (index == i) {
                        tabbar_item = info->tabbar_item;
-                       attach_panel->current_page = i;
+                       attach_panel->cur_page_no = i;
                        break;
                }
                i++;
@@ -179,7 +179,7 @@ static void __resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 
        if (w == screen_w || w == screen_h) {
                _D("screen size(%d, %d)", screen_w, screen_h);
-               elm_scroller_page_show(scroller, attach_panel->current_page, 0);
+               elm_scroller_page_show(scroller, attach_panel->cur_page_no, 0);
        }
 }
 
@@ -224,10 +224,9 @@ Evas_Object *_scroller_create(Evas_Object *ui_manager, attach_panel_h attach_pan
        elm_box_align_set(box, 0.5, 0.0);
        evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(box);
-       evas_object_event_callback_add(box, EVAS_CALLBACK_RESIZE, __resize_cb, "box");
 
        elm_object_content_set(scroller, box);
-       attach_panel->current_page = 0;
+       attach_panel->cur_page_no = 0;
 
        return scroller;
 
@@ -250,7 +249,6 @@ void _scroller_destroy(Evas_Object *scroller)
        if (box) {
                evas_object_del(box);
        }
-       evas_object_event_callback_del(box, EVAS_CALLBACK_RESIZE, __resize_cb);
 
        evas_object_del(scroller);
 }
@@ -298,7 +296,7 @@ void _scroller_remove_page(Evas_Object *scroller, Evas_Object *page)
 
 
 
-void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *current_page)
+void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *cur_page_no)
 {
        Evas_Object *box = NULL;
        Evas_Object *tmp = NULL;
@@ -327,7 +325,7 @@ void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *curr
                index = 0;
        }
 
-       *current_page = index;
+       *cur_page_no = index;
 
        elm_scroller_page_bring_in(scroller, index, 0);
 }
index 6ea100d47488ed0eb90fcc6c903d34c6b212bdf0..ddebc99f842bc1e0ea8264ba525715c98d04d7bf 100644 (file)
--- a/src/ug.c
+++ b/src/ug.c
@@ -22,6 +22,7 @@
 #include "attach_panel.h"
 #include "attach_panel_internal.h"
 #include "attach_bundle.h"
+#include "content_list.h"
 #include "gesture.h"
 #include "log.h"
 
@@ -31,6 +32,10 @@ static void __result_cb(ui_gadget_h ui_gadget, app_control_h result, void *priv)
 {
        content_s *content_info = priv;
        char *enable = NULL;
+       char **select = NULL;
+
+       int i = 0;
+       int length = 0;
        int ret = 0;
 
        ret_if(!content_info);
@@ -55,7 +60,6 @@ static void __result_cb(ui_gadget_h ui_gadget, app_control_h result, void *priv)
        }
 
        ret = app_control_get_extra_data(result, "__ATTACH_PANEL_FULL_MODE__", &enable);
-
        if (APP_CONTROL_ERROR_NONE == ret) {
                ret_if(!enable);
 
@@ -68,20 +72,73 @@ static void __result_cb(ui_gadget_h ui_gadget, app_control_h result, void *priv)
                return;
        }
 
-       _D("This is not result cb for attach-panel");
+       /* This can be called by clicking the 'Cancel' button on the UGs */
+       ret = app_control_get_extra_data(result, "__ATTACH_PANEL_SHOW_PANEL__", &enable);
+       if (APP_CONTROL_ERROR_NONE == ret) {
+               ret_if(!enable);
+
+               _D("attach panel show panel %s", enable);
+               if (!strcmp(enable, MODE_TRUE)) {
+                       if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+                               /* This is same with attach_panel_show() */
+                               _content_list_set_resume(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                               _content_list_send_message(content_info->attach_panel->content_list, "__ATTACH_PANEL_INITIALIZE__", MODE_ENABLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                               _gesture_show(content_info->attach_panel);
+                       }
+               } else {
+                       if (ATTACH_PANEL_STATE_HIDE != _gesture_get_state()) {
+                               /* This is same with attach_panel_hide() */
+                               _content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                               _gesture_hide(content_info->attach_panel);
+                       }
+               }
+               return;
+       }
+
+       /* This can be called on the state of recording video. */
+       ret = app_control_get_extra_data(result, "__ATTACH_PANEL_SHOW_TOOLBAR__", &enable);
+       if (APP_CONTROL_ERROR_NONE == ret) {
+               ret_if(!enable);
+
+               _D("attach panel show toolbar %s", enable);
+               if (!strcmp(enable, MODE_TRUE)) {
+                       elm_object_signal_emit(content_info->attach_panel->ui_manager, "toolbar,show", "toolbar");
+               } else {
+                       elm_object_signal_emit(content_info->attach_panel->ui_manager, "toolbar,hide", "toolbar");
+               }
+               return;
+       }
+
+       _D("The core of the panel sends the results to the caller");
+
+       /* This is just for protocol log */
+       _D("relay callback is called");
+       ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
+       if (APP_CONTROL_ERROR_NONE == ret && select) {
+               for (i = 0; i < length; i++) {
+                       _D("selected is %s[%d]", select[i], i);
+               }
+       }
+
+       ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/path", &select, &length);
+       if (APP_CONTROL_ERROR_NONE == ret && select) {
+               for (i = 0; i < length; i++) {
+                       _D("path is %s[%d]", select[i], i);
+               }
+       }
 
        if (content_info->attach_panel->result_cb) {
                content_info->attach_panel->result_cb(content_info->attach_panel
                                , content_info->innate_content_info->content_category
                                , result
+                               , APP_CONTROL_RESULT_SUCCEEDED
                                , content_info->attach_panel->result_data);
 
                if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
-                       /* This is same with attach_panel_hide */
-                       //_content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+                       /* This is same with attach_panel_hide() */
+                       _content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
                        _gesture_hide(content_info->attach_panel);
                }
-
        } else {
                _D("content_info->attach_panel->result_cb is NULL");
        }
@@ -172,6 +229,7 @@ void _ug_destroy(Evas_Object *ug)
 
        ret_if(!ug);
 
+       evas_object_event_callback_del(ug, EVAS_CALLBACK_RESIZE, __resize_cb);
        ui_gadget = evas_object_data_del(ug, DATA_KEY_UG);
        ret_if(!ui_gadget);
 
index 6303f45d22617042f70f540032ca8a5d90e4b7f1..1a24276f094315b77fed7a75a88a336f87eb55bb 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <Elementary.h>
 #include <bundle.h>
+#include <efl_extension.h>
 #include <ui-gadget.h>
 #include <ui-gadget-module.h>
 
@@ -24,6 +25,7 @@
 #include "conf.h"
 #include "content_list.h"
 #include "gesture.h"
+#include "list.h"
 #include "log.h"
 #include "page.h"
 #include "scroller.h"
@@ -38,7 +40,7 @@ static const char *const GROUP_LAYOUT = "layout";
 
 
 
-static Evas_Object *__create_content(Evas_Object *page, content_s *content_info, attach_panel_h attach_panel)
+Evas_Object *_ui_manager_create_content(Evas_Object *page, content_s *content_info, attach_panel_h attach_panel)
 {
        Evas_Object *content = NULL;
        Elm_Object_Item *item = NULL;
@@ -76,6 +78,7 @@ static Evas_Object *__create_content(Evas_Object *page, content_s *content_info,
        }
 
        evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_part_content_set(page, "content", content);
 
        evas_object_data_set(content, DATA_KEY_PAGE, page);
 
@@ -84,7 +87,7 @@ static Evas_Object *__create_content(Evas_Object *page, content_s *content_info,
 
 
 
-static void __destroy_content(content_s *content_info, attach_panel_h attach_panel)
+void _ui_manager_destroy_content(content_s *content_info, attach_panel_h attach_panel)
 {
        ret_if(!content_info->content);
        ret_if(!attach_panel);
@@ -128,6 +131,7 @@ int _ui_manager_append_content_category(Evas_Object *ui_manager, innate_content_
        content_info->attach_panel = attach_panel;
        content_info->innate_content_info = innate_content_info;
        content_info->extra_data = extra_data;
+       content_info->order = ORDER_MAX;
 
        if (innate_content_info->is_ug) {
                /* UG side */
@@ -138,6 +142,8 @@ int _ui_manager_append_content_category(Evas_Object *ui_manager, innate_content_
                content_info->tabbar_item =
                        _toolbar_append_item(attach_panel->toolbar, innate_content_info->name, page);
                goto_if(!content_info->tabbar_item, ERROR);
+               content_info->content = NULL;
+               content_info->order = 0;
        } else {
                /* App side */
                if (attach_panel->grid) {
@@ -160,11 +166,12 @@ int _ui_manager_append_content_category(Evas_Object *ui_manager, innate_content_
                        attach_panel->grid_tabbar_item = content_info->tabbar_item;
                        goto_if(!content_info->tabbar_item, ERROR);
                }
+               content_info->content = _ui_manager_create_content(page, content_info, attach_panel);
+               goto_if(!content_info->content, ERROR);
+               elm_object_part_content_set(page, "content", content_info->content);
        }
 
-       content_info->content = __create_content(page, content_info, attach_panel);
-       goto_if(!content_info->content, ERROR);
-       elm_object_part_content_set(page, "content", content_info->content);
+       content_info->page = page;
 
        if (1 == _toolbar_count_item(attach_panel->toolbar)) {
                _toolbar_bring_in(attach_panel->toolbar, content_info->tabbar_item);
@@ -177,7 +184,7 @@ int _ui_manager_append_content_category(Evas_Object *ui_manager, innate_content_
 
 ERROR:
        if (content_info->tabbar_item) _toolbar_remove_item(attach_panel->toolbar, content_info->tabbar_item);
-       if (content_info->content) __destroy_content(content_info, attach_panel);
+       if (content_info->content) _ui_manager_destroy_content(content_info, attach_panel);
        if (page) _page_destroy(page);
        free(content_info);
 
@@ -192,12 +199,11 @@ void _ui_manager_remove_content_category(Evas_Object *ui_manager, content_s *con
 
        ret_if(!ui_manager);
        ret_if(!content_info);
-       ret_if(!content_info->content);
 
        attach_panel = evas_object_data_get(ui_manager, DATA_KEY_ATTACH_PANEL_INFO);
        ret_if(!attach_panel);
 
-       __destroy_content(content_info, attach_panel);
+       _ui_manager_destroy_content(content_info, attach_panel);
 
        if (content_info->innate_content_info->is_ug
                || !attach_panel->grid) {
@@ -227,7 +233,7 @@ static void __remove_content_categories(Evas_Object *ui_manager)
        EINA_LIST_FREE(attach_panel->content_list, content_info) {
                Evas_Object *page = NULL;
 
-               __destroy_content(content_info, attach_panel);
+               _ui_manager_destroy_content(content_info, attach_panel);
                page= evas_object_data_get(content_info->content, DATA_KEY_PAGE);
                if (page) {
                        elm_object_part_content_unset(page, "content");
@@ -260,13 +266,61 @@ static void _change_tab_cb(Evas_Object *toolbar, int event_type, void *event_inf
 {
        attach_panel_h attach_panel = data;
        Evas_Object *page = event_info;
+       content_s *content_info = NULL;
 
        ret_if(!attach_panel);
        ret_if(!attach_panel->toolbar);
        ret_if(!attach_panel->scroller);
        ret_if(!page);
 
-       _scroller_bring_in_page(attach_panel->scroller, page, &attach_panel->current_page);
+       content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
+       ret_if(!content_info);
+       ret_if(!content_info->innate_content_info);
+
+       if (EINA_TRUE == attach_panel->is_delete) {
+               _D("This is attach_panel_destroy");
+               return;
+       }
+
+       if (page == content_info->page) {
+               _D("Tab the same page");
+               return;
+       }
+
+       if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+               _D("state of attach_panel is hide state");
+               return;
+       }
+
+       /* TODO : destroy the ug when page is not shown
+
+       if (content_info->innate_content_info->is_ug) {
+               _ui_manager_destroy_content(content_info, attach_panel);
+               content_info->content = NULL;
+       } */
+
+       _scroller_bring_in_page(attach_panel->scroller, page, &attach_panel->cur_page_no);
+       content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
+       ret_if(!content_info);
+       ret_if(!content_info->innate_content_info);
+
+       if (!content_info->innate_content_info->is_ug) {
+               return;
+       }
+
+       if (content_info->content) {
+               return;
+       }
+
+       _D("change tab for create ug (%s)", content_info->innate_content_info->appid);
+
+       content_info->content = _ui_manager_create_content(content_info->page, content_info, attach_panel);
+       ret_if(!content_info->content);
+       if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
+               _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       } else {
+               _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       }
 }
 
 
@@ -296,7 +350,10 @@ static void __window_resume_cb(void *data, Evas_Object *scroller, void *event_in
        }
 
        _D("caller window is resumed");
-       //_content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       _content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+
+       attach_panel->content_list = _list_sort_by_rua(attach_panel->content_list);
+       _grid_refresh(attach_panel->grid);
 }
 
 
@@ -312,7 +369,7 @@ static void __window_pause_cb(void *data, Evas_Object *scroller, void *event_inf
        }
 
        _D("caller window is paused");
-       //_content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
 }
 
 
@@ -332,8 +389,28 @@ static void __keypad_on_cb(void *data, Evas_Object *obj, void *event_info)
 
        _D("keypad state on");
 
+       if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+               _D("attach panel is already hide");
+               return;
+       }
        /* This is same with attach_panel_hide */
-       //_content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+       _gesture_hide(attach_panel);
+}
+
+
+
+static void __key_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       attach_panel_h attach_panel = data;
+       ret_if(!attach_panel);
+
+       if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+               _D("attach panel is already hide");
+               return;
+       }
+       /* This is same with attach_panel_hide() */
+       _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
        _gesture_hide(attach_panel);
 }
 
@@ -392,6 +469,7 @@ Evas_Object *_ui_manager_create(attach_panel_h attach_panel)
        evas_object_smart_callback_add(parent, "iconified", __window_pause_cb, attach_panel);
        evas_object_smart_callback_add(attach_panel->conformant, "language,changed", __lang_changed_cb, NULL);
        evas_object_smart_callback_add(attach_panel->conformant, "virtualkeypad,state,on", __keypad_on_cb, attach_panel);
+       eext_object_event_callback_add(ui_manager, EEXT_CALLBACK_BACK, __key_back_cb, attach_panel);
 
        return ui_manager;
 
@@ -420,6 +498,7 @@ void _ui_manager_destroy(Evas_Object *ui_manager)
        attach_panel = evas_object_data_del(ui_manager, DATA_KEY_ATTACH_PANEL_INFO);
        ret_if(!attach_panel);
 
+       eext_object_event_callback_del(ui_manager, EEXT_CALLBACK_BACK, __key_back_cb);
        evas_object_smart_callback_del(attach_panel->conformant, "virtualkeypad,state,on", __keypad_on_cb);
        evas_object_smart_callback_del(attach_panel->conformant, "language,changed", __lang_changed_cb);
        evas_object_event_callback_del(ui_manager, EVAS_CALLBACK_RESIZE, __resize_cb);