summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByeongin Oh <quddls.oh@samsung.com>2012-08-24 01:51:26 (GMT)
committerByeongin Oh <quddls.oh@samsung.com>2012-08-24 01:51:26 (GMT)
commit0d999810a6c86a8ae486fc5f8273d175708c8fb1 (patch)
tree9528c5594112ec7a623c0a79429ac346f3c84baa
parent500e1d3c6ff1f159af461e63132c178f9afcbab2 (diff)
downloadug-myfile-efl-0d999810a6c86a8ae486fc5f8273d175708c8fb1.zip
ug-myfile-efl-0d999810a6c86a8ae486fc5f8273d175708c8fb1.tar.gz
ug-myfile-efl-0d999810a6c86a8ae486fc5f8273d175708c8fb1.tar.bz2
fix bugs
Change-Id: I374bc1ba88b06028d6183596b3c9f30e2b95934a
-rw-r--r--packaging/ug-myfile-efl.spec2
-rw-r--r--src/common/mf-ug-cb.c10
-rw-r--r--src/include/mf-ug-cb.h2
-rw-r--r--src/include/mf-ug-dlog.h1
-rw-r--r--src/include/mf-ug-fs-util.h2
-rw-r--r--src/include/mf-ug-main.h7
-rw-r--r--src/include/mf-ug-resource.h1
-rw-r--r--src/include/mf-ug-util.h2
-rw-r--r--src/include/mf-ug-winset.h1
-rw-r--r--src/widget/mf-ug-ctrl-bar.c6
-rw-r--r--src/widget/mf-ug-genlist.c28
-rw-r--r--src/widget/mf-ug-navi-bar.c187
-rw-r--r--src/widget/mf-ug-search-view.c96
-rw-r--r--ug_navibar_layout.edc89
14 files changed, 327 insertions, 107 deletions
diff --git a/packaging/ug-myfile-efl.spec b/packaging/ug-myfile-efl.spec
index d2f4cef..4e75f99 100644
--- a/packaging/ug-myfile-efl.spec
+++ b/packaging/ug-myfile-efl.spec
@@ -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.22
+Version: 0.0.23
Release: 1
Group: misc
License: flora
diff --git a/src/common/mf-ug-cb.c b/src/common/mf-ug-cb.c
index b98efed..0f218b4 100644
--- a/src/common/mf-ug-cb.c
+++ b/src/common/mf-ug-cb.c
@@ -902,15 +902,7 @@ void mf_ug_cb_mmc_changed_cb(keynode_t *key, void *data)
}
- if ((ugd->ug_Status.ug_bSettingEntry == true && ugd->ug_Status.ug_bInSettingView == true)) {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
- } else if (!mf_ug_fm_svc_wapper_is_root_path(ugd)) {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_FALSE);
- } else if (ugd->ug_Status.ug_iMmcFlag == MMC_OFF && mf_ug_fm_svc_wapper_is_root_path(ugd)) {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
- } else {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_FALSE);
- }
+ mf_ug_navi_bar_title_set(ugd);
UG_TRACE_END;
return;
}
diff --git a/src/include/mf-ug-cb.h b/src/include/mf-ug-cb.h
index bef243d..c3c2da4 100644
--- a/src/include/mf-ug-cb.h
+++ b/src/include/mf-ug-cb.h
@@ -25,6 +25,7 @@
#include <Elementary.h>
#include <vconf.h>
+#include <power.h>
#include "mf-ug-main.h"
#include "mf-ug-util.h"
#include "mf-ug-inotify-handle.h"
@@ -55,5 +56,6 @@ void mf_ug_cb_eraser_clicked_cb(void *data, Evas_Object *obj, const char *emissi
void mf_ug_cb_save_cb(void *data, Evas_Object *obj, void *event_info);
void mf_ug_cb_cancel_new_folder_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_create_new_folder(void *data, Evas_Object * obj, void *event_info);
+void mf_ug_cb_lcd_state_changed_cb(power_state_e state, void *user_data);
#endif
diff --git a/src/include/mf-ug-dlog.h b/src/include/mf-ug-dlog.h
index 5459f1f..127db45 100644
--- a/src/include/mf-ug-dlog.h
+++ b/src/include/mf-ug-dlog.h
@@ -82,5 +82,6 @@
} \
} while (0)
+#define MF_CHECK(expr) ug_mf_retm_if(!(expr),"INVALID PARAM RETURN")
#endif
diff --git a/src/include/mf-ug-fs-util.h b/src/include/mf-ug-fs-util.h
index b754d65..6b67fb4 100644
--- a/src/include/mf-ug-fs-util.h
+++ b/src/include/mf-ug-fs-util.h
@@ -45,7 +45,7 @@
/* File system related value definition */
#define FILE_EXT_LEN_MAX 8
#define MYFILE_DIR_PATH_LEN_MAX 4096
-#define MYFILE_FILE_NAME_LEN_MAX 256
+#define MYFILE_FILE_NAME_LEN_MAX 255
#define MYFILE_FILE_PATH_LEN_MAX MYFILE_DIR_PATH_LEN_MAX + MYFILE_FILE_NAME_LEN_MAX
diff --git a/src/include/mf-ug-main.h b/src/include/mf-ug-main.h
index 1bd1237..8a3b172 100644
--- a/src/include/mf-ug-main.h
+++ b/src/include/mf-ug-main.h
@@ -78,9 +78,12 @@ struct _ugMainWindow {
Evas_Object *ug_pNaviLayout;
Evas_Object *ug_pContent;
Evas_Object *ug_pNaviCtrlBar;
+ Evas_Object *ug_pNaviBox;
Evas_Object *ug_pEditField;
Evas_Object *ug_pEntry;
+ Evas_Object *ug_pSelectAllLayout;
+ Evas_Object *ug_pSelectAllCheckBox;
Elm_Object_Item *ug_pPreNaviItem;
Elm_Object_Item *ug_pNaviItem;
@@ -100,6 +103,10 @@ struct _ugStatus {
int ug_iSelectedSortType;
int ug_iMore;
int ug_haptic_handle;
+ int ug_iCheckedCount;
+ int ug_iTotalCount;
+
+ bool ug_bSelectAllChecked;
bool ug_bAudioPlayFlag;
bool ug_bInstallFlag;
bool ug_bSettingEntry;
diff --git a/src/include/mf-ug-resource.h b/src/include/mf-ug-resource.h
index c888e62..35cebe1 100644
--- a/src/include/mf-ug-resource.h
+++ b/src/include/mf-ug-resource.h
@@ -67,6 +67,7 @@
#define MF_UG_LABEL_OPER_READ_ONLY "Operation failed: Read Only Area"
#define MF_UG_LABEL_CREATE_DIR_FAILED "Create Directory failed"
#define MF_UG_LABEL_EMPTY_FOLDER_NAME "Folder name can't be empty, Retry!"
+#define MF_UG_LABEL_SELECT_ALL dgettext("sys_string", "IDS_COM_BODY_SELECT_ALL")
#endif
diff --git a/src/include/mf-ug-util.h b/src/include/mf-ug-util.h
index 4a1cbd3..e8e9bc3 100644
--- a/src/include/mf-ug-util.h
+++ b/src/include/mf-ug-util.h
@@ -239,6 +239,8 @@ bool mf_ug_util_is_genlist_selected(void *data);
void mf_ug_list_play_play_music_item(ugListItemData *data);
void mf_ug_list_play_destory_playing_file(void *data);
+void mf_ug_list_play_update_item_icon(void *data);
+
void mf_ug_util_storage_insert_action(void *data, char *pItemLabel);
void mf_ug_util_destory_mmc_state_cb();
void mf_ug_util_destory_dir_monitor(void *data);
diff --git a/src/include/mf-ug-winset.h b/src/include/mf-ug-winset.h
index 0cbf33c..cd1d715 100644
--- a/src/include/mf-ug-winset.h
+++ b/src/include/mf-ug-winset.h
@@ -55,6 +55,7 @@ ugNaviBar *ug_mf_navi_bar_get_navi_from_navilist(Eina_List *navilist, const char
ugNaviBar *mf_ug_navi_bar_get_navi_struct_by_label(void *data, const char *pNaviLabel);
void mf_ug_navi_bar_reset_tab_to_main(void *data);
void mf_ug_navi_bar_set_navi_to_main(void *data);
+void mf_ug_navi_bar_title_set(void *data);
/********** Control Bar Definition ********/
diff --git a/src/widget/mf-ug-ctrl-bar.c b/src/widget/mf-ug-ctrl-bar.c
index 495c350..2cb98d5 100644
--- a/src/widget/mf-ug-ctrl-bar.c
+++ b/src/widget/mf-ug-ctrl-bar.c
@@ -89,9 +89,9 @@ static void __mf_ug_ctrl_bar_append_item(void *data, Evas_Object *ctrl_bar, int
ug_mf_retm_if(ugd == NULL, "ugd is NULL");
Evas_Object *pCtrlBar = ctrl_bar;
ug_mf_retm_if(pCtrlBar == NULL, "pCtrlBar is NULL");
+ Elm_Object_Item *item = NULL;
if (ugd->ug_UiGadget.ug_iSelectMode == SINGLE_ALL_MODE || ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE) {
- Elm_Object_Item *item = NULL;
item = elm_toolbar_item_append(pCtrlBar, NULL, NULL, NULL, NULL);
elm_object_item_disabled_set(item, EINA_TRUE);
item = elm_toolbar_item_append(pCtrlBar, NULL, NULL, NULL, NULL);
@@ -102,7 +102,9 @@ static void __mf_ug_ctrl_bar_append_item(void *data, Evas_Object *ctrl_bar, int
} else {
if (ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE) {
elm_toolbar_item_append(pCtrlBar, NULL, MF_UG_LABEL_IMPORT, (Evas_Smart_Cb) mf_ug_cb_add_button_cb, ugd);
- elm_toolbar_item_append(pCtrlBar, NULL, MF_UG_LABEL_SEARCH, (Evas_Smart_Cb) mf_ug_search_view_enter_search_routine, ugd);
+ item = elm_toolbar_item_append(pCtrlBar, NULL, NULL, NULL, NULL);
+ elm_object_item_disabled_set(item, EINA_TRUE);
+ //elm_toolbar_item_append(pCtrlBar, NULL, MF_UG_LABEL_SEARCH, (Evas_Smart_Cb) mf_ug_search_view_enter_search_routine, ugd);
} else if (ugd->ug_UiGadget.ug_iSelectMode == EXPORT_MODE) {
elm_toolbar_item_append(pCtrlBar, NULL, MF_UG_LABEL_EXPORT, (Evas_Smart_Cb) mf_ug_cb_add_button_cb, ugd);
elm_toolbar_item_append(pCtrlBar, NULL, MF_UG_LABEL_CREATE, (Evas_Smart_Cb) mf_ug_cb_create_new_folder, ugd);
diff --git a/src/widget/mf-ug-genlist.c b/src/widget/mf-ug-genlist.c
index ec3ee46..36d9c91 100644
--- a/src/widget/mf-ug-genlist.c
+++ b/src/widget/mf-ug-genlist.c
@@ -209,6 +209,7 @@ static void __mf_ug_genlist_checkbox_cb(void *data, Evas_Object *obj, void *even
UG_TRACE_BEGIN;
ugListItemData *itemData = (ugListItemData *)data;
ug_mf_retm_if(itemData == NULL, "itemData is NULL");
+ ugData *ugd = (ugData *)itemData->ug_pData;
if (itemData->ug_bChecked == false) {
itemData->ug_bChecked = true;
@@ -219,6 +220,19 @@ static void __mf_ug_genlist_checkbox_cb(void *data, Evas_Object *obj, void *even
if (itemData->ug_pData->ug_UiGadget.ug_iMarkedMode == MARKED_ON) {
__mf_ug_genlist_set_marked_path(&itemData->ug_pData->ug_UiGadget.ug_pMultiSelectFileList, itemData->ug_pItemName);
}
+ if (itemData->ug_bChecked) {
+ ugd->ug_Status.ug_iCheckedCount++;
+ } else {
+ ugd->ug_Status.ug_iCheckedCount--;
+ }
+ if (ugd->ug_MainWindow.ug_pSelectAllCheckBox) {
+ if (ugd->ug_Status.ug_iTotalCount == ugd->ug_Status.ug_iCheckedCount) {
+ ugd->ug_Status.ug_bSelectAllChecked = EINA_TRUE;
+ } else {
+ ugd->ug_Status.ug_bSelectAllChecked = EINA_FALSE;
+ }
+ elm_check_state_pointer_set(ugd->ug_MainWindow.ug_pSelectAllCheckBox, &ugd->ug_Status.ug_bSelectAllChecked);
+ }
__mf_ug_genlist_show_select_info(itemData);
mf_ug_ctrl_bar_set_item_disable(itemData->ug_pData);
@@ -919,6 +933,20 @@ static void __mf_ug_genlist_selected_gl(void *data, Evas_Object *obj, void *even
selected->ug_bChecked = 0;
}
elm_check_state_set(selected->ug_pCheckBox, selected->ug_bChecked);
+
+ if (selected->ug_bChecked) {
+ ugd->ug_Status.ug_iCheckedCount++;
+ } else {
+ ugd->ug_Status.ug_iCheckedCount--;
+ }
+ if (ugd->ug_MainWindow.ug_pSelectAllCheckBox) {
+ if (ugd->ug_Status.ug_iTotalCount == ugd->ug_Status.ug_iCheckedCount) {
+ ugd->ug_Status.ug_bSelectAllChecked = EINA_TRUE;
+ } else {
+ ugd->ug_Status.ug_bSelectAllChecked = EINA_FALSE;
+ }
+ elm_check_state_pointer_set(ugd->ug_MainWindow.ug_pSelectAllCheckBox, &ugd->ug_Status.ug_bSelectAllChecked);
+ }
__mf_ug_genlist_show_select_info(selected);
}
} else if (ecore_file_is_dir(selected->ug_pItemName->str) && strcmp(selected->ug_pItemName->str, "Upper Level")) {
diff --git a/src/widget/mf-ug-navi-bar.c b/src/widget/mf-ug-navi-bar.c
index da69082..d6272cf 100644
--- a/src/widget/mf-ug-navi-bar.c
+++ b/src/widget/mf-ug-navi-bar.c
@@ -300,7 +300,7 @@ Evas_Object *mf_ug_navi_bar_create_layout(Evas_Object *parent, const char *edj,
** Modification : Created function
**
******************************/
-Evas_Object *__mf_ug_navi_bar_pathinfo_create(Evas_Object *parent, Evas_Object *content)
+Evas_Object *__mf_ug_navi_bar_pathinfo_create(Evas_Object *parent, const char *content)
{
UG_TRACE_BEGIN;
ug_mf_retvm_if(parent == NULL, NULL, "parent is NULL");
@@ -314,12 +314,52 @@ Evas_Object *__mf_ug_navi_bar_pathinfo_create(Evas_Object *parent, Evas_Object *
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_part_content_set(layout, "info", content);
+ elm_object_part_text_set(layout, "info", content);
evas_object_show(layout);
UG_TRACE_END;
return layout;
}
+void mf_ug_navi_bar_title_set(void *data)
+{
+ UG_TRACE_BEGIN;
+ ugData *ugd = (ugData *)data;
+ ug_mf_retm_if(ugd == NULL, "ugd is NULL");
+
+ if (ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE) {
+ ug_debug();
+ elm_object_part_text_set(ugd->ug_MainWindow.ug_pNaviBar, "elm.text.title", MF_UG_LABEL_IMPORT);
+ elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
+ mf_ug_search_view_enter_search_routine(ugd, NULL, NULL);
+ } else if ((ugd->ug_Status.ug_bSettingEntry == true && ugd->ug_Status.ug_bInSettingView == true)) {
+ ug_debug();
+ elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
+ } else if (!mf_ug_fm_svc_wapper_is_root_path(ugd)) {
+ ug_debug();
+ Evas_Object *home_btn = elm_button_add(ugd->ug_MainWindow.ug_pNaviBar);
+ elm_object_style_set(home_btn, "naviframe/title/default");
+ elm_object_text_set(home_btn, MF_UG_LABEL_HOME);
+ evas_object_smart_callback_add(home_btn, "clicked", mf_ug_cb_home_button_cb, ugd);
+ evas_object_show(home_btn);
+ elm_object_item_part_content_set(ugd->ug_MainWindow.ug_pNaviItem, "title_left_btn", home_btn);
+
+ Evas_Object *up_btn = elm_button_add(ugd->ug_MainWindow.ug_pNaviBar);
+ elm_object_style_set(up_btn, "naviframe/title/default");
+ elm_object_text_set(up_btn, MF_UG_LABEL_UPPER);
+ evas_object_smart_callback_add(up_btn, "clicked", mf_ug_cb_upper_click_cb, ugd);
+ evas_object_show(up_btn);
+ elm_object_item_part_content_set(ugd->ug_MainWindow.ug_pNaviItem, "title_right_btn", up_btn);
+ elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
+ } else if (ugd->ug_Status.ug_iMmcFlag == MMC_OFF && mf_ug_fm_svc_wapper_is_root_path(ugd)) {
+ ug_debug();
+ elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
+ } else {
+ ug_debug();
+ elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_FALSE);
+ }
+}
+
+
void mf_ug_navi_bar_create_default_view(void *data)
{
UG_TRACE_BEGIN;
@@ -342,104 +382,81 @@ void mf_ug_navi_bar_create_default_view(void *data)
}
box = mf_ug_navi_bar_create_box(ugd->ug_MainWindow.ug_pNaviBar);
+ pNaviLayout = mf_ug_navi_bar_create_layout(box, UG_EDJ_NAVIGATIONBAR, UG_GRP_NAVI_VIEW);
+ ugd->ug_MainWindow.ug_pNaviLayout = pNaviLayout;
- if (ugd->ug_Status.ug_bSettingEntry == true && ugd->ug_Status.ug_bInSettingView == true) {
- top_layout = mf_ug_navi_bar_create_box(box);
- evas_object_size_hint_min_set(top_layout, MF_UG_UPPER_WIDTH, MF_UG_UPPER_HEIGHT);
- upper_genlist = mf_navi_bar_upper_create(top_layout);
- mf_ug_genlist_goto_myfile_style_set(ugd);
- mf_ug_genlist_goto_myfile_item_append(upper_genlist, ugd);
- ugd->ug_Status.ug_bUpperFlag = true;
- elm_box_pack_end(top_layout, upper_genlist);
- } else if (!mf_ug_fm_svc_wapper_is_root_path(ugd)){
- Evas_Object *pathinfo_layout = NULL;
- Evas_Object *upper_layout = NULL;
- char *pathinfo = NULL;
- char *info = NULL;
-
- top_layout = mf_ug_navi_bar_create_box(box);
- evas_object_size_hint_weight_set(top_layout, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
- evas_object_size_hint_align_set(top_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_clear(top_layout);
- //evas_object_size_hint_min_set(top_layout, MF_UG_UPPER_WIDTH, MF_UG_UPPER_HEIGHT);
-
- pathinfo = mf_ug_fm_svc_wapper_path_info_get(ugd->ug_Status.ug_pPath->str);
- info = mf_ug_fm_svc_path_info_translate(pathinfo, MF_UG_PATH_INFO_MAX_LENGTH_PORTRAIT);
-
- Evas_Object *genlist = mf_ug_genlist_create_path_info(top_layout, &ugd->ug_Status.ug_pathinfoitec, info);
-
- pathinfo_layout = __mf_ug_navi_bar_pathinfo_create(top_layout, genlist);
-
-
- upper_layout = elm_layout_add(top_layout);
- elm_object_focus_set(upper_layout, EINA_FALSE);
- elm_layout_file_set(upper_layout, UG_EDJ_NAVIGATIONBAR, UG_GRP_UPPER_LAYOUT);
- evas_object_size_hint_weight_set(upper_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);//(upper_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(upper_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(upper_layout);
-
- Evas_Object *home_btn = elm_button_add(upper_layout);
- elm_object_text_set(home_btn, MF_UG_LABEL_HOME);
- evas_object_smart_callback_add(home_btn, "clicked", mf_ug_cb_home_button_cb, ugd);
- evas_object_show(home_btn);
-
- Evas_Object *up_btn = elm_button_add(upper_layout);
- elm_object_text_set(up_btn, MF_UG_LABEL_UPPER);
- evas_object_smart_callback_add(up_btn, "clicked", mf_ug_cb_upper_click_cb, ugd);
- evas_object_show(up_btn);
-
- elm_object_part_content_set(upper_layout, "home", home_btn);
- elm_object_part_content_set(upper_layout, "upper", up_btn);
-
- elm_box_pack_end(top_layout, upper_layout);
- elm_box_pack_end(top_layout, pathinfo_layout);
- ugd->ug_Status.ug_bUpperFlag = true;
- }
+ if (ugd->ug_UiGadget.ug_iSelectMode == IMPORT_MODE) {
+ newContent = __mf_ug_genlist_create_gl(ugd);
+ ugd->ug_MainWindow.ug_pContent = newContent;
- if (top_layout) {
- elm_box_pack_start(box, top_layout);
} else {
- ugd->ug_Status.ug_bUpperFlag = true;
- }
+ if (ugd->ug_Status.ug_bSettingEntry == true && ugd->ug_Status.ug_bInSettingView == true) {
+ top_layout = mf_ug_navi_bar_create_box(box);
+ evas_object_size_hint_min_set(top_layout, MF_UG_UPPER_WIDTH, MF_UG_UPPER_HEIGHT);
+ upper_genlist = mf_navi_bar_upper_create(top_layout);
+ mf_ug_genlist_goto_myfile_style_set(ugd);
+ mf_ug_genlist_goto_myfile_item_append(upper_genlist, ugd);
+ ugd->ug_Status.ug_bUpperFlag = true;
+ elm_box_pack_end(top_layout, upper_genlist);
+ } else if (!mf_ug_fm_svc_wapper_is_root_path(ugd)){
+ Evas_Object *pathinfo_layout = NULL;
+ Evas_Object *upper_layout = NULL;
+ char *pathinfo = NULL;
+ char *info = NULL;
+
+ top_layout = mf_ug_navi_bar_create_box(box);
+ evas_object_size_hint_weight_set(top_layout, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
+ evas_object_size_hint_align_set(top_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_clear(top_layout);
+ //evas_object_size_hint_min_set(top_layout, MF_UG_UPPER_WIDTH, MF_UG_UPPER_HEIGHT);
+
+ pathinfo = mf_ug_fm_svc_wapper_path_info_get(ugd->ug_Status.ug_pPath->str);
+ info = mf_ug_fm_svc_path_info_translate(pathinfo, MF_UG_PATH_INFO_MAX_LENGTH_PORTRAIT);
+
+ //Evas_Object *genlist = mf_ug_genlist_create_path_info(top_layout, &ugd->ug_Status.ug_pathinfoitec, info);
+
+ pathinfo_layout = __mf_ug_navi_bar_pathinfo_create(top_layout, info);
+
+ elm_box_pack_end(top_layout, pathinfo_layout);
+ ugd->ug_Status.ug_bUpperFlag = true;
+ }
- pNaviLayout = mf_ug_navi_bar_create_layout(box, UG_EDJ_NAVIGATIONBAR, UG_GRP_NAVI_VIEW);
- ugd->ug_MainWindow.ug_pNaviLayout = pNaviLayout;
- /*set content */
- if (ugd->ug_UiGadget.ug_iSelectMode == SINGLE_ALL_MODE || ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE) {
- __mf_ug_navi_bar_create_group_radio_box(ugd);
- }
- newContent = mf_ug_genlist_create_content_list_view(ugd);
- ugd->ug_MainWindow.ug_pContent = newContent;
- /*set title segment or title */
- if (mf_ug_fm_svc_wapper_is_root_path(ugd)) {
- title = g_string_new(MF_UG_LABEL_MYFILES);
- } else {
- title = mf_ug_fm_svc_wapper_get_file_name(ugd->ug_Status.ug_pPath);
- }
+ if (top_layout) {
+ elm_box_pack_start(box, top_layout);
+ } else {
+ ugd->ug_Status.ug_bUpperFlag = true;
+ }
+ /*set content */
+ if (ugd->ug_UiGadget.ug_iSelectMode == SINGLE_ALL_MODE || ugd->ug_UiGadget.ug_iSelectMode == SINGLE_FILE_MODE) {
+ __mf_ug_navi_bar_create_group_radio_box(ugd);
+ }
+ newContent = mf_ug_genlist_create_content_list_view(ugd);
+ ugd->ug_MainWindow.ug_pContent = newContent;
+ /*set title segment or title */
+ if (mf_ug_fm_svc_wapper_is_root_path(ugd)) {
+ title = g_string_new(MF_UG_LABEL_MYFILES);
+ } else {
+ title = mf_ug_fm_svc_wapper_get_file_name(ugd->ug_Status.ug_pPath);
+ }
- if (title != NULL) {
- pNavi_s->ug_pNaviTitle = g_strdup(title->str);
- g_string_free(title, TRUE);
- title = NULL;
+ if (title != NULL) {
+ pNavi_s->ug_pNaviTitle = g_strdup(title->str);
+ g_string_free(title, TRUE);
+ title = NULL;
+ }
}
+
/*navigation view integration */
evas_object_show(newContent);
elm_object_part_content_set(pNaviLayout, "part1", newContent);
elm_box_pack_end(box, pNaviLayout);
+ ugd->ug_MainWindow.ug_pNaviBox = box;
__mf_ug_navi_bar_push_content(ugd, box);
/*add control bar for navigation bar */
mf_ug_ctrl_bar_set(ugd, pNavi_s);
- if ((ugd->ug_Status.ug_bSettingEntry == true && ugd->ug_Status.ug_bInSettingView == true)) {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
- } else if (!mf_ug_fm_svc_wapper_is_root_path(ugd)) {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_FALSE);
- } else if (ugd->ug_Status.ug_iMmcFlag == MMC_OFF && mf_ug_fm_svc_wapper_is_root_path(ugd)) {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_TRUE);
- } else {
- elm_naviframe_item_title_visible_set(ugd->ug_MainWindow.ug_pNaviItem, EINA_FALSE);
- }
+ mf_ug_navi_bar_title_set(ugd);
mf_ug_navi_bar_remove_previous_contents(ugd);
UG_TRACE_END;
}
diff --git a/src/widget/mf-ug-search-view.c b/src/widget/mf-ug-search-view.c
index 3497e36..8e94018 100644
--- a/src/widget/mf-ug-search-view.c
+++ b/src/widget/mf-ug-search-view.c
@@ -139,12 +139,80 @@ 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, __mf_ug_search_view_item_sel, ugd);
+ it = elm_genlist_item_append(ugd->ug_MainWindow.ug_pContent, &ugd->ug_Status.ug_itc, m_TempItem, NULL, ELM_GENLIST_ITEM_NONE, NULL, ugd);
m_TempItem->ug_pItem = it;
UG_TRACE_END;
}
+Evas_Object *mf_ug_search_create_select_all_layout(Evas_Object *parent)
+{
+
+ ug_mf_retvm_if(parent == NULL, NULL, "parent is NULL");
+
+ Evas_Object *pSelectedAllLayout = NULL;
+ pSelectedAllLayout = elm_layout_add(parent);
+ elm_object_focus_set(pSelectedAllLayout, EINA_FALSE);
+ elm_layout_theme_set(pSelectedAllLayout, "genlist", "item", "select_all/default");
+ evas_object_size_hint_weight_set(pSelectedAllLayout, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
+ evas_object_size_hint_align_set(pSelectedAllLayout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_part_text_set(pSelectedAllLayout, "elm.text", MF_UG_LABEL_SELECT_ALL);
+ evas_object_show(pSelectedAllLayout);
+ return pSelectedAllLayout;
+}
+
+Evas_Object *mf_ug_search_create_check_box(Evas_Object *parent)
+{
+ ug_mf_retvm_if(parent == NULL, NULL, "parent is NULL");
+
+ Evas_Object *checkbox = NULL;
+ checkbox = elm_check_add(parent);
+ elm_object_focus_set(checkbox, EINA_FALSE);
+ evas_object_propagate_events_set(checkbox, EINA_FALSE);
+ evas_object_show(checkbox);
+ return checkbox;
+}
+
+void __mf_ug_search_select_all_layout_mouse_down_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+ UG_TRACE_BEGIN;
+ ugData *ugd = (ugData *)data;
+ ug_mf_retm_if(ugd == NULL, "ugd is NULL");
+
+ ugd->ug_Status.ug_bSelectAllChecked = !ugd->ug_Status.ug_bSelectAllChecked;
+ elm_check_state_pointer_set(ugd->ug_MainWindow.ug_pSelectAllCheckBox, &ugd->ug_Status.ug_bSelectAllChecked);
+
+ __mf_ug_search_select_all_check_changed_cb(ugd, NULL, NULL);
+ UG_TRACE_END;
+}
+
+void __mf_ug_search_select_all_check_changed_cb(void *data, Evas_Object * obj, void *event_info)
+{
+ UG_TRACE_BEGIN;
+ ugData *ugd = (ugData *)data;
+ ug_mf_retm_if(ugd == NULL, "ugd is NULL");
+ Evas_Object *genlist = ugd->ug_MainWindow.ug_pContent;
+ if (ugd->ug_Status.ug_bSelectAllChecked) {
+ ugd->ug_Status.ug_iCheckedCount = ugd->ug_Status.ug_iTotalCount;
+ } else {
+ ugd->ug_Status.ug_iCheckedCount = 0;
+ }
+
+ ugListItemData *it_data;
+ Elm_Object_Item *it;
+
+ it = elm_genlist_first_item_get(genlist);
+ while (it) {
+ it_data = elm_object_item_data_get(it);
+ if (it_data)
+ it_data->ug_bChecked = ugd->ug_Status.ug_bSelectAllChecked;
+ it = elm_genlist_item_next_get(it);
+ }
+ elm_genlist_realized_items_update(genlist);
+
+ UG_TRACE_END;
+}
+
static void __mf_ug_search_view_result_cb(mf_search_result_t *result, void *user_data)
{
ug_mf_retm_if(result == NULL, "result is NULL");
@@ -174,6 +242,25 @@ static void __mf_ug_search_view_result_cb(mf_search_result_t *result, void *user
elm_object_part_content_set(playout, "part1", newContent);
+ if (result->file_list != NULL) {
+ Evas_Object *pSelectAllLayout = NULL;
+ Evas_Object *pSelectAllCheckBox = NULL;
+ ugd->ug_Status.ug_bSelectAllChecked = false;
+ ugd->ug_Status.ug_iTotalCount = g_list_length(result->file_list);
+ ugd->ug_Status.ug_iCheckedCount = 0;
+
+ pSelectAllLayout = mf_ug_search_create_select_all_layout(ugd->ug_MainWindow.ug_pNaviBox);
+ ug_mf_retm_if(pSelectAllLayout == NULL, "pSelectAllLayout is NULL");
+ ugd->ug_MainWindow.ug_pSelectAllLayout = pSelectAllLayout;
+ evas_object_event_callback_add(pSelectAllLayout, EVAS_CALLBACK_MOUSE_DOWN, __mf_ug_search_select_all_layout_mouse_down_cb, ugd);
+ pSelectAllCheckBox = mf_ug_search_create_check_box(pSelectAllLayout);
+ ugd->ug_MainWindow.ug_pSelectAllCheckBox = pSelectAllCheckBox;
+ elm_check_state_pointer_set(pSelectAllCheckBox, &ugd->ug_Status.ug_bSelectAllChecked);
+ evas_object_smart_callback_add(pSelectAllCheckBox, "changed", __mf_ug_search_select_all_check_changed_cb, ugd);
+
+ elm_object_part_content_set(pSelectAllLayout, "elm.icon", pSelectAllCheckBox);
+ elm_box_pack_start(ugd->ug_MainWindow.ug_pNaviBox, pSelectAllLayout);
+ }
if (result->dir_list != NULL) {
g_list_foreach(result->dir_list, mf_ug_search_view_item_append, ugd);
}
@@ -323,18 +410,13 @@ void mf_ug_search_view_enter_search_routine(void *data, Evas_Object * obj, void
ugData *ugd = (ugData *)data;
ug_mf_retm_if(ugd == NULL, "ugd is NULL");
- if (ugd->ug_Status.ug_b_NaviPushFlag) {
- UG_TRACE_END;
- return;
- }
-
#ifdef UG_THUMB_REAL_TIME_UPDATE
if (ugd->ug_Status.ug_pThumbUpdateTimer != NULL) {
ecore_timer_del(ugd->ug_Status.ug_pThumbUpdateTimer);
ugd->ug_Status.ug_pThumbUpdateTimer = NULL;
}
#endif
- ugd->ug_Status.ug_iMore = UG_MORE_SEARCH;
+ //ugd->ug_Status.ug_iMore = UG_MORE_SEARCH;
if (ugd->ug_Status.search_handler > 0)
mf_ug_search_finalize(&ugd->ug_Status.search_handler);
diff --git a/ug_navibar_layout.edc b/ug_navibar_layout.edc
index 227bc81..982807e 100644
--- a/ug_navibar_layout.edc
+++ b/ug_navibar_layout.edc
@@ -19,7 +19,7 @@
#define GENLIST_ITEM_H 71*UG_MF_SCALE_H
#define PATH_INFO_H 30*UG_MF_SCALE_H
#define PATH_INFO_LABEL_H 25
-#define PATH_INFO_BG_COLOR 200 200 200 127
+#define PATH_INFO_BG_COLOR 215 225 232 255
#define BOTTOM_LINE_COLOR 199 199 199 255
@@ -346,6 +346,7 @@ collections
{
name: "pathinfo";
parts {
+ #if 0
part
{
name: "info";
@@ -357,10 +358,94 @@ collections
min: 0 PATH_INFO_H;
}
}
+ #endif
- }
+ part
+ {
+ name: "base";
+ type: RECT;
+ repeat_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: MAIN_W PATH_INFO_H;
+ color: PATH_INFO_BG_COLOR;
+ }
+ }
+ part
+ {
+ name: "bg";
+ type: RECT;
+ clip_to: "disclip";
+ repeat_events: 0;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: PATH_INFO_BG_COLOR;
+ }
+ }
+ MF_UG_PART_PADDING_TOP(0)
+ MF_UG_PART_PADDING_BOTTOM( 0 )
+ MF_UG_PART_PADDING_LEFT( 10 )
+ part
+ {
+ name: "bottom_line";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: 0 1;
+ fixed: 0 1;
+ visible: 1;
+ color: BOTTOM_LINE_COLOR;
+ rel1
+ {
+ relative: 0.0 1.0;
+ offset: 0 -1;
+ }
+ }
+ }
+ part { name: "info";
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.0 0.5;
+ rel1
+ {
+ relative: 1.0 1.0;
+ offset: 0 0;
+ to_x: "elm.padding.left";
+ to_y: "elm.padding.top";
+ }
+ rel2
+ {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ to_x: "elm.padding.left";
+ to_y: "elm.padding.bottom";
+ }
+ color: 164 164 164 255;
+ text {
+ font: "SLP:style=Medium";
+ size: 32;
+ min: 1 1;
+ align: 0.0 0.5;
+ }
+ }
+ }
+ part
+ {
+ name: "disclip";
+ type: RECT;
+ description
+ {
+ state: "default" 0.0;
+ }
+ }
+ }
}
+
}