merge with master
authorJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:05:07 +0000 (01:05 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:05:07 +0000 (01:05 +0900)
17 files changed:
packaging/ug-myfile-efl.spec
src/common/file-system/mf-ug-file-attr.c
src/common/mf-ug-cb.c
src/common/mf-ug-fm-svc-wapper.c
src/common/mf-ug-list-play.c
src/common/mf-ug-util.c
src/include/mf-ug-conf.h
src/include/mf-ug-list-play.h
src/include/mf-ug-main.h
src/include/mf-ug-resource.h
src/include/mf-ug-util.h
src/include/mf-ug-winset.h
src/mf-ug-main.c
src/widget/mf-ug-genlist.c
src/widget/mf-ug-navi-bar.c
src/widget/mf-ug-popup.c
src/widget/mf-ug-search-view.c

index 39c6d3c..ce8270a 100644 (file)
@@ -1,7 +1,7 @@
 #sbs-git:slp/pkgs/u/ug-myfile-efl ug-myfile-efl 0.0.1 1b44640a2e59d1af1ab0792e39a73bf3680b25c9
 Name:       ug-myfile-efl
 Summary:    Myfile UI Gadget (EFL)
-Version:    0.0.44
+Version:    0.0.45
 Release:    1
 Group:      misc
 License:    Flora
index f2b2cbd..b5e41af 100644 (file)
@@ -265,6 +265,20 @@ static mf_ug_fs_file_type __mf_ug_file_attr_get_category_by_file_ext(const char
                if (strcasecmp("IPK", &file_ext[i]) == 0) {
                        return UG_FILE_TYPE_APP;
                }
+               if (strcasecmp("isma", &file_ext[i]) == 0) {
+                       if (mf_ug_file_attr_is_drm_file(fullpath) == 0) {
+                               return UG_FILE_TYPE_DRM;
+                       } else {
+                               return UG_FILE_TYPE_SOUND;
+                       }
+               }
+               if (strcasecmp("ismv", &file_ext[i]) == 0) {
+                       if (mf_ug_file_attr_is_drm_file(fullpath) == 0) {
+                               return UG_FILE_TYPE_DRM;
+                       } else {
+                               return UG_FILE_TYPE_SOUND;
+                       }
+               }
                break;
        case 'j':
        case 'J':
index 39440c7..fb0661f 100644 (file)
@@ -191,7 +191,7 @@ void mf_ug_cb_add_button_cb(void *data, Evas_Object *obj, void *event_info)
                return;\r
        }\r
 \r
-       if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE) {\r
+       if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE || ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE) {\r
                result = g_strdup(ugd->ug_Status.ug_pPath->str);\r
        } else {\r
                result = mf_ug_util_get_send_result(ugd);\r
@@ -463,7 +463,7 @@ void mf_ug_cb_upper_click_cb(void *data, Evas_Object * obj, void *event_info)
                return;\r
        }\r
 \r
-       if (mf_ug_fm_svc_wapper_is_root_path(ugd)) {\r
+       if (mf_ug_fm_svc_wapper_is_root_path(ugd->ug_Status.ug_pPath)) {\r
                ugd->ug_Status.ug_iViewType = mf_ug_view_root;\r
        }\r
 \r
@@ -864,7 +864,7 @@ static void __mf_ug_cb_mmc_remove_view_operation(void *data)
 \r
        Evas_Object *parent = NULL;\r
        const char *labelStorage = NULL;\r
-       parent = ugd->ug_MainWindow.ug_pContent;\r
+       parent = ugd->ug_MainWindow.ug_pNaviGenlist;\r
        labelStorage = MEMORY_FOLDER;\r
 \r
        mf_ug_genlist_item_remove(parent, labelStorage);\r
@@ -1001,6 +1001,24 @@ void mf_ug_cb_dir_update_cb(mf_ug_inotify_event event, char *name, void *data)
 **    Modification : Created function\r
 **\r
 ******************************/\r
+static GString *__mf_ug_cb_dir_pipe_get_parent(GString *path)\r
+{\r
+\r
+       ug_mf_retvm_if(path == NULL, NULL, "path is NULL");\r
+       ug_mf_retvm_if(path->str == NULL, NULL, "path->str is NULL");\r
+\r
+       if (ecore_file_exists(path->str)) {\r
+               return path;\r
+       } else if (mf_ug_fm_svc_wapper_is_root_path(path)) {\r
+               return path;\r
+       } else {\r
+               GString *parent = mf_ug_fm_svc_wrapper_get_file_parent_path(path);\r
+               UG_SAFE_FREE_GSTRING(path);\r
+               __mf_ug_cb_dir_pipe_get_parent(parent);\r
+       }\r
+       return path;\r
+}\r
+\r
 void mf_ug_cb_dir_pipe_cb(void *data, void *buffer, unsigned int nbyte)\r
 {\r
        UG_TRACE_BEGIN;\r
@@ -1008,39 +1026,144 @@ void mf_ug_cb_dir_pipe_cb(void *data, void *buffer, unsigned int nbyte)
        ug_mf_retm_if(ugd == NULL, "ugd is NULL");\r
 \r
 \r
-       ugNaviBar *pNavi_s = mf_ug_navi_bar_get_in_use_navi(ugd);\r
-       ug_mf_retm_if(pNavi_s == NULL, "get navigation bar in use failed");\r
-\r
        if (ugd->ug_ListPlay.ug_iPlayState != PLAY_STATE_INIT) {\r
                return;\r
        }\r
+       if (ugd->ug_Status.ug_iViewType == mf_ug_view_root) {\r
+               return;\r
+       }\r
+\r
+       if (g_strcmp0(ugd->ug_Status.monitor_path, ugd->ug_Status.ug_pPath->str)) {\r
+               return;\r
+       }\r
        if (buffer) {\r
                ug_dir_event_t *msg = (ug_dir_event_t *) buffer;\r
                ug_debug("event : %d, name : %s", msg->event, msg->name);\r
 \r
                Evas_Object *newContent = NULL;\r
+               ugListItemData *itemData = NULL;\r
+               Elm_Object_Item *it = NULL;\r
+               GString *parent = NULL;\r
+               char *path = NULL;\r
+               int count = 0;\r
+\r
                switch (msg->event) {\r
                case UG_MF_INOTI_CREATE:\r
                case UG_MF_INOTI_MOVE_IN:\r
                        /*/1 TODO:  add new item to list */\r
+                       if(msg->name) {\r
+                               path = g_strconcat(ugd->ug_Status.ug_pPath->str, "/", msg->name, NULL);\r
+                               int file_type = 0;\r
+                               if (mf_ug_file_attr_is_dir(path)) {\r
+                                       file_type = UG_FILE_TYPE_DIR;\r
+                               } else {\r
+                                       file_type = UG_FILE_TYPE_FILE;\r
+                               }\r
+                               ugFsNodeInfo *pNode = mf_ug_util_generate_pnode(path, file_type);\r
+                               if (ugd->ug_MainWindow.ug_pNaviGenlist == NULL) {\r
+\r
+                                       Evas_Object *genlist = NULL;\r
+                                       genlist = elm_genlist_add(ugd->ug_MainWindow.ug_pNaviBar);\r
+                                       evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+                                       evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);\r
+\r
+                                       ugd->ug_MainWindow.ug_pNaviGenlist = genlist;\r
+                                       evas_object_smart_callback_add(genlist, "selected", mf_ug_genlist_selected_gl, ugd);\r
+\r
+                                       evas_object_del(elm_object_part_content_unset(ugd->ug_MainWindow.ug_pNaviLayout, "part1"));\r
+\r
+                                       elm_object_part_content_set(ugd->ug_MainWindow.ug_pNaviLayout, "part1", newContent);\r
+                                       elm_object_part_content_set(ugd->ug_MainWindow.ug_pNaviLayout, "part1", genlist);\r
+                               }\r
+                               if (file_type == UG_FILE_TYPE_DIR) {\r
+                                       if (ugd->ug_UiGadget.ug_iSelectMode == MULTI_FILE_MODE ||\r
+                                           ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE ||\r
+                                           ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE ||\r
+                                           ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE ||\r
+                                           ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE ||\r
+                                           ugd->ug_UiGadget.ug_iSelectMode == IMPORT_SINGLE) {\r
+\r
+                                               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, pNode, ugd, 0, &ugd->ug_Status.ug_normalitc);\r
+                                       } else {\r
+                                               int groupValue = elm_genlist_items_count(ugd->ug_MainWindow.ug_pNaviGenlist);\r
+                                               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, pNode, ugd, groupValue, &ugd->ug_Status.ug_itc);\r
+                                       }\r
+                               } else {\r
+                                       if (ugd->ug_UiGadget.ug_iSelectMode == SINGLE_ALL_MODE || ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE) {\r
+                                               int groupValue = elm_genlist_items_count(ugd->ug_MainWindow.ug_pNaviGenlist);\r
+                                               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, pNode, ugd, groupValue, &ugd->ug_Status.ug_itc);\r
+                                       } else if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE || ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE) {\r
+                                               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, pNode, ugd, 0, &ugd->ug_Status.ug_normalitc);\r
+                                       } else {\r
+                                               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, pNode, ugd, 0, &ugd->ug_Status.ug_itc);\r
+                                       }\r
+\r
+                               }\r
+\r
+                               if (pNode != NULL) {\r
+                                       UG_SAFE_FREE_CHAR(pNode->ext);\r
+                                       free(pNode);\r
+                                       pNode = NULL;\r
+                               }\r
+                       }\r
                        break;\r
                case UG_MF_INOTI_DELETE:\r
                case UG_MF_INOTI_MOVE_OUT:\r
                        /*/1 TODO:  remove item from list */\r
+                       path = g_strconcat(ugd->ug_Status.ug_pPath->str, "/", msg->name, NULL);\r
+                       it = elm_genlist_first_item_get(ugd->ug_MainWindow.ug_pNaviGenlist);\r
+                       while (it) {\r
+                               itemData = elm_object_item_data_get(it);\r
+                               if (itemData->ug_pItemName == NULL || itemData->ug_pItemName->str == NULL) {\r
+                                       ug_debug();\r
+                                       continue;\r
+                               }\r
+                               if (g_strcmp0(path, itemData->ug_pItemName->str) == 0) {\r
+                                       elm_object_item_del(it);\r
+                                       break;\r
+                               }\r
+\r
+                               it = elm_genlist_item_next_get(it);\r
+                       }\r
+                       count = elm_genlist_items_count(ugd->ug_MainWindow.ug_pNaviGenlist);\r
+                       ugd->ug_Status.ug_bNoContentFlag = !count;\r
+\r
                        break;\r
                case UG_MF_INOTI_MODIFY:\r
                        /*/1 TODO:  update item in list */\r
+                       ugd->ug_MainWindow.ug_pNaviGenlist = newContent = mf_ug_genlist_create_content_list_view(ugd);\r
+                       mf_ug_navi_bar_set_new_content(ugd->ug_MainWindow.ug_pNaviLayout, newContent);\r
                        break;\r
                case UG_MF_INOTI_DELETE_SELF:\r
                case UG_MF_INOTI_MOVE_SELF:\r
                        /*/1 TODO:  watching directory is removed, change current directory. */\r
+               {\r
+                       GString *current = NULL;\r
+                       current = g_string_new(ugd->ug_Status.ug_pPath->str);\r
+                       parent = __mf_ug_cb_dir_pipe_get_parent(current);\r
+\r
+                       ugNaviBar *pNavi_s = mf_ug_navi_bar_get_in_use_navi(ugd);\r
+\r
+\r
+                       g_string_free(ugd->ug_Status.ug_pPath, TRUE);\r
+                       ugd->ug_Status.ug_pPath = NULL;\r
+                       ugd->ug_Status.ug_pPath = parent;\r
+\r
+                       if (pNavi_s->ug_pCurrentPath != NULL) {\r
+                               free(pNavi_s->ug_pCurrentPath);\r
+                               pNavi_s->ug_pCurrentPath = NULL;\r
+                       }\r
+                       pNavi_s->ug_pCurrentPath = g_strdup(parent->str);\r
+\r
+\r
+\r
+                       mf_ug_navi_bar_create_default_view(ugd);\r
+               }\r
                        break;\r
                default:\r
                        ug_mf_error("Unknown event");\r
                        break;\r
                }\r
-               ugd->ug_MainWindow.ug_pContent = newContent = mf_ug_genlist_create_content_list_view(ugd);\r
-               mf_ug_navi_bar_set_new_content(ugd->ug_MainWindow.ug_pNaviLayout, newContent);\r
                mf_ug_ctrl_bar_set_item_disable(ugd);\r
                if (msg->name) {\r
                        free(msg->name);\r
index d6ca417..e7f7509 100644 (file)
@@ -282,12 +282,12 @@ int mf_ug_fm_svc_wapper_get_file_list_by_filter(ugData *data, GString *fullpath,
 ******************************/\r
 bool mf_ug_fm_svc_wapper_is_root_path(void *data)\r
 {\r
-       ugData *ugd = (ugData *)data;\r
-       ug_mf_retvm_if(ugd == NULL, false, "ugd is NULL");\r
+       GString *g_path = (GString *)data;\r
+       ug_mf_retvm_if(g_path == NULL, false, "g_path is NULL");\r
 \r
-       if (!strcmp(ugd->ug_Status.ug_pPath->str, PHONE_FOLDER)) {\r
+       if (!strcmp(g_path->str, PHONE_FOLDER)) {\r
                return true;\r
-       } else if (!strcmp(ugd->ug_Status.ug_pPath->str, MEMORY_FOLDER)) {\r
+       } else if (!strcmp(g_path->str, MEMORY_FOLDER)) {\r
                return true;\r
        } else {\r
                return false;\r
index cd63d50..c052f45 100644 (file)
@@ -352,7 +352,7 @@ void mf_ug_list_disable_play_itc(void *data, bool disable)
                UG_TRACE_END;
                return;
        }
-       pGenlist = ugd->ug_MainWindow.ug_pContent;
+       pGenlist = ugd->ug_MainWindow.ug_pNaviGenlist;
 
        gl_item = elm_genlist_first_item_get(pGenlist);
        while (gl_item) {
@@ -394,7 +394,7 @@ void mf_ug_list_paly_hide_play_icon(void *data)
                UG_TRACE_END;
                return;
        }
-       pGenlist = ugd->ug_MainWindow.ug_pContent;
+       pGenlist = ugd->ug_MainWindow.ug_pNaviGenlist;
 
        gl_item = elm_genlist_first_item_get(pGenlist);
        while (gl_item) {
@@ -460,7 +460,7 @@ void mf_ug_list_play_update_item_icon(void *data)
                UG_TRACE_END;
                return;
        }
-       pGenlist = ugd->ug_MainWindow.ug_pContent;
+       pGenlist = ugd->ug_MainWindow.ug_pNaviGenlist;
 
        gl_item = elm_genlist_first_item_get(pGenlist);
        while (gl_item) {
@@ -1486,6 +1486,20 @@ static bool __mf_ug_list_play_pause(void *data)
 **    Modification : Created function
 **
 ******************************/
+void mf_ug_list_play_pause(void *data)
+{
+       UG_TRACE_BEGIN;
+       ugData *ugd = (ugData *)data;
+       ug_mf_retm_if(ugd == NULL, "ugd is NULL");
+       int state = ugd->ug_ListPlay.ug_iPlayState;
+
+       if (state == PLAY_STATE_PLAYING) {
+               if(__mf_ug_list_play_pause(ugd)) {
+                       __mf_ug_list_play_pauset(ugd);
+                       mf_ug_list_disable_play_itc(ugd, false);
+               }
+       }
+}
 static void __mf_ug_list_play_control_cb(void *data)
 {
        UG_TRACE_BEGIN;
index 3e9b312..76ed9fc 100644 (file)
@@ -61,8 +61,8 @@ bool mf_ug_util_is_genlist_selected(void *data)
        ugNaviBar *pNavi_s = mf_ug_navi_bar_get_in_use_navi(ugd);\r
        ug_mf_retvm_if(pNavi_s == NULL, false, "get navigation bar in use failed");\r
 \r
-       if (ugd->ug_MainWindow.ug_pContent) {\r
-               genlist = ugd->ug_MainWindow.ug_pContent;\r
+       if (ugd->ug_MainWindow.ug_pNaviGenlist) {\r
+               genlist = ugd->ug_MainWindow.ug_pNaviGenlist;\r
                gli = elm_genlist_first_item_get(genlist);\r
 \r
                while (gli) {\r
@@ -218,10 +218,10 @@ static void __mf_ug_util_get_marked_off_selected_items(void *data, Eina_List **s
        ugData *ugd = (ugData *)data;\r
        ug_mf_retm_if(ugd == NULL, "ugData is NULL");\r
        ug_mf_retm_if(select_list == NULL, "selected_list is NULL");\r
-       ug_mf_retm_if(ugd->ug_MainWindow.ug_pContent == NULL, "ugd->ug_MainWindow.ug_pContent is NULL");\r
+       ug_mf_retm_if(ugd->ug_MainWindow.ug_pNaviGenlist == NULL, "ugd->ug_MainWindow.ug_pNaviGenlist is NULL");\r
 \r
 \r
-       Evas_Object *content = ugd->ug_MainWindow.ug_pContent;\r
+       Evas_Object *content = ugd->ug_MainWindow.ug_pNaviGenlist;\r
        Elm_Object_Item *gli = elm_genlist_first_item_get(content);\r
        int radio_id = 1;\r
        Elm_Object_Item *nli = NULL;\r
@@ -422,6 +422,11 @@ int mf_ug_util_create_dir_monitor(void *data)
 ******************************/\r
 int mf_ug_util_add_dir_watch(const char *path, void *data)\r
 {\r
+       UG_TRACE_BEGIN;\r
+       ugData *ugd = (ugData *)data;\r
+       ug_mf_retvm_if(ugd == NULL, UG_ERROR_RETURN, "ugd is NULL");\r
+       UG_SAFE_FREE_CHAR(ugd->ug_Status.monitor_path);\r
+       ugd->ug_Status.monitor_path = g_strdup(path);\r
        return mf_ug_inotify_handle_add_inotify_watch(path, mf_ug_cb_dir_update_cb, data);\r
 }\r
 \r
@@ -552,7 +557,7 @@ void mf_ug_util_storage_insert_action(void *data, char *pItemLabel)
                snprintf(pNode->name, sizeof(pNode->name), "%s", MMC_NAME);\r
                pNode->type = UG_FILE_TYPE_DIR;\r
                ugd->ug_UiGadget.ug_pDirList = eina_list_append(ugd->ug_UiGadget.ug_pDirList, pNode);\r
-               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pContent, pNode, ugd, 0, &ugd->ug_Status.ug_normalitc);\r
+               mf_ug_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, pNode, ugd, 0, &ugd->ug_Status.ug_normalitc);\r
        }\r
 \r
        UG_TRACE_END;\r
index 13de93d..0698312 100644 (file)
@@ -49,6 +49,7 @@
 #define UG_SELECT_MODE_IMPORT_SINGLE                   "IMPORT_SINGLE"
 #define UG_SELECT_MODE_EXPORT                  "EXPORT"
 #define UG_SELECT_MODE_SHORTCUT                        "SHORTCUT"
+#define UG_SELECT_MODE_SAVE                    "SAVE"
 
 #define UG_FILE_FILTER_IMAGE                   "IMAGE"
 #define UG_FILE_FILTER_SOUND                   "SOUND"
index 703daeb..b24f39b 100644 (file)
@@ -69,5 +69,6 @@ typedef struct {
 } mf_player_cb_extra_data;
 
 void mf_ug_player_vol_set(const char *path);
+void mf_ug_list_play_pause(void *data);
 
 #endif
index 5d4d0bf..43b07c7 100644 (file)
@@ -73,7 +73,7 @@ struct _ugMainWindow {
 
        Evas_Object *ug_pNaviBar;
        Evas_Object *ug_pNaviLayout;
-       Evas_Object *ug_pContent;
+       Evas_Object *ug_pNaviGenlist;
        Evas_Object *ug_pNaviCtrlBar;
        Evas_Object *ug_pNaviBox;
 
@@ -116,6 +116,7 @@ struct _ugStatus {
        int  ug_iThemeType;
        char *ug_pUpper_folder;
        char *ug_pEntryPath;
+       char *monitor_path;
        bool ug_bUpperFlag;
        Elm_Genlist_Item_Class ug_itc;
        Elm_Genlist_Item_Class ug_topitc;
index 6b1a9e0..d05ff9a 100644 (file)
@@ -50,6 +50,7 @@
 #define MF_UG_LABEL_NO_RESULT          dgettext("sys_string", "IDS_COM_BODY_NO_SEARCH_RESULTS")
 #define MF_UG_LABEL_IMPORT             dgettext("sys_string", "IDS_COM_OPT_IMPORT")
 #define MF_UG_LABEL_EXPORT             "Export here"
+#define MF_UG_LABEL_SAVE_HERE          "Set here"
 #define MF_UG_LABEL_CREATE             dgettext("sys_string", "IDS_COM_BODY_CREATE_FOLDER")
 #define MF_UG_LABEL_NOT_ENOUGH_SPACE   dgettext("sys_string", "IDS_COM_POP_NOT_ENOUGH_MEMORY")
 #define MF_UG_LABEL_FOLDER             dgettext("sys_string", "IDS_COM_POP_FOLDER")
@@ -72,6 +73,6 @@
 #define MF_UG_LABEL_GO_TO_MYFILES      dgettext(UGPACKAGE, "IDS_MF_BUTTON_GO_TO_MY_FILES")
 #define MF_UG_LABEL_RINGTONES          dgettext(UGPACKAGE, "IDS_MF_BODY_RINGTONES")
 #define MF_UG_LABEL_MAX_CHARACTER_REACHED      dgettext("sys_string", "IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED")
-
+#define MF_UG_LABEL_ALARM              dgettext("sys_string", "IDS_COM_BODY_ALARM")
 #endif
 
index 0562873..2056488 100644 (file)
@@ -116,6 +116,7 @@ enum _mf_ug_select_mode {
        EXPORT_MODE,
        IMPORT_MODE,
        IMPORT_SINGLE,
+       SAVE_MODE,
        SELECT_MODE_MAX
 };
 
index 63badfb..36530e2 100644 (file)
@@ -160,5 +160,6 @@ Elm_Object_Item *mf_ug_genlist_item_append(Evas_Object *parent,
                                      void *data,\r
                                      int groudValue,\r
                                      Elm_Genlist_Item_Class *itc);\r
+void mf_ug_genlist_selected_gl(void *data, Evas_Object *obj, void *event_info);\r
 \r
 #endif\r
index 73b6d9f..b8bd008 100644 (file)
@@ -342,6 +342,7 @@ static int __mf_ug_main_set_path_option(void *data, const char *path)
 
                        if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE ||
                            ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE ||
+                           ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE ||
                            ugd->ug_UiGadget.ug_iSelectMode == IMPORT_SINGLE) {
                                error_code = mf_ug_fm_svc_wrapper_create_p(entry_path);
                                if (error_code != MYFILE_ERR_NONE) {
@@ -419,6 +420,9 @@ static void __mf_ug_main_set_select_mode(void *data, const char *select_mode)
                        ugd->ug_UiGadget.ug_iSelectMode = IMPORT_SINGLE;
                        ugd->ug_Status.ug_iViewType = mf_ug_view_normal;
                }
+               else if (!strncmp(select_mode, UG_SELECT_MODE_SAVE, strlen(select_mode))) {
+                       ugd->ug_UiGadget.ug_iSelectMode = SAVE_MODE;
+               }
                else {
                        ugd->ug_UiGadget.ug_iSelectMode = SINGLE_FILE_MODE;
                }
@@ -832,6 +836,7 @@ static void on_pause(ui_gadget_h ug, service_h service, void *priv)
        ugData *ugd = (ugData *)priv;
 
        if (0 != ugd->ug_ListPlay.ug_Player) {
+               mf_ug_list_play_pause(ugd);
                //mf_ug_list_play_destory_playing_file(ugd);
        }
 }
index 909ca06..e57f78a 100644 (file)
@@ -164,7 +164,7 @@ static void __mf_ug_genlist_show_select_info(void *data)
        int iDirCount = 0, iFileCount = 0;
        Elm_Object_Item *it = NULL;
 
-       Evas_Object *pGenlist = ugd->ug_MainWindow.ug_pContent;
+       Evas_Object *pGenlist = ugd->ug_MainWindow.ug_pNaviGenlist;
 
        it = elm_genlist_first_item_get(pGenlist);
        while (it) {
@@ -854,7 +854,7 @@ static void __mf_ug_genlist_del_gl(void *data, Evas_Object *obj)
 
 
 /******************************
-** Prototype    : __mf_ug_genlist_selected_gl
+** Prototype    : mf_ug_genlist_selected_gl
 ** Description  : Samsung
 ** Input        : void *data
 **                Evas_Object *obj
@@ -870,7 +870,7 @@ static void __mf_ug_genlist_del_gl(void *data, Evas_Object *obj)
 **    Modification : Created function
 **
 ******************************/
-static void __mf_ug_genlist_selected_gl(void *data, Evas_Object *obj, void *event_info)
+void mf_ug_genlist_selected_gl(void *data, Evas_Object *obj, void *event_info)
 {
        UG_TRACE_BEGIN;
        ugData *ugd = (ugData *)data;
@@ -890,7 +890,7 @@ static void __mf_ug_genlist_selected_gl(void *data, Evas_Object *obj, void *even
                        return;
                if (!ecore_file_is_dir(selected->ug_pItemName->str)) {
 
-                       if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE) {
+                       if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE || ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE) {
                                return;
                        }
 
@@ -1111,7 +1111,7 @@ Evas_Object *__mf_ug_genlist_create_gl(void *data)
        evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-       evas_object_smart_callback_add(genlist, "selected", __mf_ug_genlist_selected_gl, ugd);
+       evas_object_smart_callback_add(genlist, "selected", mf_ug_genlist_selected_gl, ugd);
 
 #ifdef UG_THUMB_REAL_TIME_UPDATE
        if (ugd->ug_Status.ug_pThumbUpdateTimer != NULL) {
@@ -1130,6 +1130,7 @@ Evas_Object *__mf_ug_genlist_create_gl(void *data)
            ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE ||
            ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE ||
            ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE ||
+           ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE ||
            ugd->ug_UiGadget.ug_iSelectMode == IMPORT_SINGLE) {
                ugd->ug_Status.ug_normalitc.item_style = "1text.1icon.2";
                ugd->ug_Status.ug_normalitc.func.text_get = __mf_ug_genlist_get_gl_label;
@@ -1404,7 +1405,7 @@ Evas_Object *mf_ug_genlist_create_content_list_view(void *data)
 
        genlist = __mf_ug_genlist_create_gl(ugd);
 
-       ugd->ug_MainWindow.ug_pContent = genlist;
+       ugd->ug_MainWindow.ug_pNaviGenlist = genlist;
 
        GString *fullpath = g_string_new(ugd->ug_Status.ug_pPath->str);
 
@@ -1477,6 +1478,7 @@ if (ugd->ug_UiGadget.ug_iSelectMode == MULTI_FILE_MODE ||
                    ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE ||
                    ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE ||
                    ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE ||
+                   ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE ||
                    ugd->ug_UiGadget.ug_iSelectMode == IMPORT_SINGLE) {
 
                        mf_ug_genlist_item_append(genlist, pNode, ugd, 0, &ugd->ug_Status.ug_normalitc);
@@ -1491,7 +1493,7 @@ if (ugd->ug_UiGadget.ug_iSelectMode == MULTI_FILE_MODE ||
                if (ugd->ug_UiGadget.ug_iSelectMode == SINGLE_ALL_MODE || ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE) {
                        mf_ug_genlist_item_append(genlist, pNode, ugd, groupValue, &ugd->ug_Status.ug_itc);
                        groupValue++;
-               } else if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE) {
+               } else if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE || ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE) {
                        mf_ug_genlist_item_append(genlist, pNode, ugd, 0, &ugd->ug_Status.ug_normalitc);
                } else {
                        mf_ug_genlist_item_append(genlist, pNode, ugd, 0, &ugd->ug_Status.ug_itc);
index 6d88b88..e8e4615 100644 (file)
@@ -99,6 +99,13 @@ static void __mf_ug_navi_bar_push_content(void *data, Evas_Object *NaviContent)
                                pNavi_s->ug_pNaviTitle = NULL;
                        }
                        pNavi_s->ug_pNaviTitle = g_strdup(MF_UG_LABEL_RINGTONES);
+               } else if(!g_strcmp0(pNavi_s->ug_pNaviTitle, "Alarms")) {
+                       if (pNavi_s->ug_pNaviTitle) {
+                               g_free(pNavi_s->ug_pNaviTitle);
+                               pNavi_s->ug_pNaviTitle = NULL;
+                       }
+                       pNavi_s->ug_pNaviTitle = g_strdup(MF_UG_LABEL_ALARM);
+               } else if (!g_strcmp0(pNavi_s->ug_pNaviTitle, "Alerts")) {
                }
                title = pNavi_s->ug_pNaviTitle;
        }
@@ -423,6 +430,9 @@ void mf_ug_navi_bar_set_ctrl_button(void *data)
                if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE) {
                        bt_1 = mf_ug_navi_bar_create_button(pNavi, NAVI_BUTTON_STYLE, MF_UG_LABEL_EXPORT, NULL, mf_ug_cb_add_button_cb, ugd);
                        bt_2 = mf_ug_navi_bar_create_button(pNavi, NAVI_BUTTON_EDIT, MF_UG_LABEL_CREATE, NULL, mf_ug_cb_more_cb, ugd);
+               } else if (ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE) {
+                       bt_1 = mf_ug_navi_bar_create_button(pNavi, NAVI_BUTTON_STYLE, MF_UG_LABEL_SAVE_HERE, NULL, mf_ug_cb_add_button_cb, ugd);
+                       bt_2 = mf_ug_navi_bar_create_button(pNavi, NAVI_BUTTON_EDIT, MF_UG_LABEL_CREATE, NULL, mf_ug_cb_more_cb, ugd);
                } else if (ugd->ug_UiGadget.ug_iSelectMode == SINGLE_ALL_MODE || ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE) {
                        bt_1 = mf_ug_navi_bar_create_button(pNavi, NAVI_BUTTON_STYLE, MF_UG_LABEL_SET, NULL, mf_ug_cb_add_button_cb, ugd);
                }
@@ -468,7 +478,7 @@ void mf_ug_navi_bar_create_default_view(void *data)
 
        if (ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE || ugd->ug_UiGadget.ug_iSelectMode == IMPORT_SINGLE) {
                newContent = __mf_ug_genlist_create_gl(ugd);
-               ugd->ug_MainWindow.ug_pContent = newContent;
+               ugd->ug_MainWindow.ug_pNaviGenlist = newContent;
 
        } else {
                if (ugd->ug_Status.ug_bSettingEntry == true && ugd->ug_Status.ug_bInSettingView == true) {
@@ -512,9 +522,9 @@ void mf_ug_navi_bar_create_default_view(void *data)
                        __mf_ug_navi_bar_create_group_radio_box(ugd);
                }
                newContent = mf_ug_genlist_create_content_list_view(ugd);
-               ugd->ug_MainWindow.ug_pContent = newContent;
+               ugd->ug_MainWindow.ug_pNaviGenlist = newContent;
                /*set title segment or title */
-               if (mf_ug_fm_svc_wapper_is_root_path(ugd) || ugd->ug_Status.ug_iViewType == mf_ug_view_root) {
+               if (mf_ug_fm_svc_wapper_is_root_path(ugd->ug_Status.ug_pPath) || ugd->ug_Status.ug_iViewType == mf_ug_view_root) {
                        title = g_string_new(MF_UG_LABEL_MYFILES);
                } else {
                        title = mf_ug_fm_svc_wapper_get_file_name(ugd->ug_Status.ug_pPath);
index ef238e6..5de8202 100644 (file)
@@ -412,7 +412,7 @@ void mf_ug_context_popup_create_more(void *data, Evas_Object *parent)
        ugd->ug_MainWindow.ug_pContextPopup = ctxpopup;\r
        Elm_Object_Item *it = NULL;\r
 \r
-       if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE) {\r
+       if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE || ugd->ug_UiGadget.ug_iSelectMode == SAVE_MODE) {\r
                /*Search*/\r
                it = elm_ctxpopup_item_append(ctxpopup, MF_UG_LABEL_CREATE, NULL, mf_ug_cb_create_new_folder, ugd);\r
        }\r
index 16861a5..698237e 100644 (file)
@@ -97,7 +97,7 @@ void mf_ug_search_view_item_append(void *data, void *user_data)
 #endif
        Elm_Object_Item *it = NULL;
 
-       it = elm_genlist_item_append(ugd->ug_MainWindow.ug_pContent, &ugd->ug_Status.ug_itc, m_TempItem, NULL, ELM_GENLIST_ITEM_NONE, NULL, ugd);
+       it = elm_genlist_item_append(ugd->ug_MainWindow.ug_pNaviGenlist, &ugd->ug_Status.ug_itc, m_TempItem, NULL, ELM_GENLIST_ITEM_NONE, NULL, ugd);
        m_TempItem->ug_pItem = it;
        UG_TRACE_END;
 
@@ -149,7 +149,7 @@ static void __mf_ug_search_select_all_check_changed_cb(void *data, Evas_Object *
        UG_TRACE_BEGIN;
        ugData *ugd = (ugData *)data;
        ug_mf_retm_if(ugd == NULL, "ugd is NULL");
-       Evas_Object *genlist = ugd->ug_MainWindow.ug_pContent;
+       Evas_Object *genlist = ugd->ug_MainWindow.ug_pNaviGenlist;
        ug_debug("ugd->ug_Status.ug_iTotalCount is [%d]", ugd->ug_Status.ug_iTotalCount);
        if (ugd->ug_Status.ug_bSelectAllChecked) {
                ug_debug();
@@ -227,7 +227,7 @@ static void __mf_ug_search_view_result_cb(mf_search_result_t *result, void *user
 
                //newContent = mf_ug_genlist_create_content_list_view(ugd);
                newContent = __mf_ug_genlist_create_gl(ugd);
-               ugd->ug_MainWindow.ug_pContent = newContent;
+               ugd->ug_MainWindow.ug_pNaviGenlist = newContent;
 
                elm_object_part_content_set(playout, "part1", newContent);