From: Enlightenment C. <no...@cv...> - 2006-08-28 01:46:53
|
Enlightenment CVS committal Author : titan Project : e17 Module : apps/e Dir : e17/apps/e/src/bin Modified Files: e_widget_fsel.c Log Message: Ok. This is a much better way to display the directory :) =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_fsel.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- e_widget_fsel.c 27 Aug 2006 16:16:57 -0000 1.29 +++ e_widget_fsel.c 28 Aug 2006 01:46:38 -0000 1.30 @@ -28,10 +28,8 @@ Evas_Object *o_favorites_add; Evas_Object *o_files_frame; Evas_Object *o_files_fm; - Evas_Object *o_directory_entry; Evas_Object *o_entry; Evas_Coord preview_w, preview_h; - char *directory_entry_text; char *entry_text; char *preview_size_text; char *preview_owner_text; @@ -64,7 +62,7 @@ e_fm2_parent_go(wd->o_files_fm); if (wd->o_files_frame) e_widget_scrollframe_child_pos_set(wd->o_files_frame, 0, 0); - e_widget_entry_text_set(wd->o_directory_entry, + e_widget_entry_text_set(wd->o_entry, e_fm2_real_path_get(wd->o_files_fm)); } @@ -132,7 +130,7 @@ } } done: - e_widget_entry_text_set(wd->o_directory_entry, realpath); + e_widget_entry_text_set(wd->o_entry, realpath); E_FREE(p1); evas_list_free(icons); } @@ -156,7 +154,7 @@ e_fm2_path_set(wd->o_files_fm, NULL, ici->link); evas_list_free(selected); e_widget_scrollframe_child_pos_set(wd->o_files_frame, 0, 0); - e_widget_entry_text_set(wd->o_directory_entry, + e_widget_entry_text_set(wd->o_entry, e_fm2_real_path_get(wd->o_files_fm)); } @@ -181,8 +179,7 @@ if (wd->o_files_frame) e_widget_scrollframe_child_pos_set(wd->o_files_frame, 0, 0); if (stat(wd->path, &st) == 0) - e_widget_entry_text_set(wd->o_directory_entry, wd->path); - e_widget_entry_text_set(wd->o_entry, " "); + e_widget_entry_text_set(wd->o_entry, wd->path); E_FREE(wd->path); if (wd->chg_func) wd->chg_func(wd->chg_data, wd->obj); } @@ -195,6 +192,7 @@ E_Fm2_Icon_Info *ici; const char *realpath; char buf[4096]; + struct stat st; wd = data; if (!wd->o_files_fm) return; @@ -214,8 +212,10 @@ } wd->path = strdup(buf); if (wd->preview) - _e_wid_fsel_preview_file(wd); - e_widget_entry_text_set(wd->o_entry, ici->file); + _e_wid_fsel_preview_file(wd); + stat(wd->path, &st); + if (!S_ISDIR(st.st_mode)) + e_widget_entry_text_set(wd->o_entry, ici->file); evas_list_free(selected); if (wd->chg_func) wd->chg_func(wd->chg_data, wd->obj); } @@ -440,10 +440,6 @@ e_widget_min_size_set(o, 128, 128); e_widget_table_object_append(wd->o_table2, o, 1, 1, 1, 1, 1, 1, 1, 1); - o = e_widget_entry_add(evas, &(wd->directory_entry_text)); - wd->o_directory_entry = o; - e_widget_sub_object_add(obj, o); - o = e_widget_entry_add(evas, &(wd->entry_text)); wd->o_entry = o; e_widget_sub_object_add(obj, o); @@ -461,12 +457,10 @@ 2, 1, 1, 1, 0, 1, 0, 1); } - e_widget_table_object_append(wd->o_table, wd->o_directory_entry, - 0, 0, 1, 1, 1, 0, 1, 0); e_widget_table_object_append(wd->o_table, wd->o_table2, - 0, 1, 1, 1, 1, 1, 1, 1); + 0, 0, 1, 1, 1, 1, 1, 1); e_widget_table_object_append(wd->o_table, wd->o_entry, - 0, 2, 1, 1, 1, 0, 1, 0); + 0, 1, 1, 1, 1, 0, 1, 0); e_widget_min_size_get(wd->o_table, &mw, &mh); e_widget_min_size_set(obj, mw, mh); @@ -477,7 +471,6 @@ evas_object_show(wd->o_favorites_fm); evas_object_show(wd->o_files_frame); evas_object_show(wd->o_files_fm); - evas_object_show(wd->o_directory_entry); evas_object_show(wd->o_entry); if (preview) { |