Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto
Dir : e17/proto/exhibit/src/bin Modified Files: exhibit.h exhibit_file.c exhibit_main.c Log Message: - change dir in entry when tabs are changed - smaller tab names =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exhibit/src/bin/exhibit.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- exhibit.h 26 Dec 2005 13:55:35 -0000 1.7 +++ exhibit.h 26 Dec 2005 14:28:55 -0000 1.8 @@ -4,6 +4,7 @@ #include <Evas.h> #include <Ecore.h> #include <Ecore_X.h> +#include <Ecore_File.h> #include <Ecore_X_Cursor.h> #include <Epsilon.h> #include <etk/Etk.h> =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exhibit/src/bin/exhibit_file.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- exhibit_file.c 19 Dec 2005 14:01:30 -0000 1.3 +++ exhibit_file.c 26 Dec 2005 14:28:55 -0000 1.4 @@ -52,3 +52,24 @@ file[i] = '\0'; return file; } + +char * +_ex_file_get(char *path) +{ + if(!path[0]) return NULL; + + if(path[strlen(path) - 1] == '/' && strlen(path) >= 2) + { + char *ret; + + ret = &path[strlen(path) - 2]; + while(ret != path) + { + if(*ret == '/') + return ++ret; + --ret; + } + return path; + } + else return ecore_file_get_file(path); +} =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exhibit/src/bin/exhibit_main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- exhibit_main.c 26 Dec 2005 13:55:35 -0000 1.23 +++ exhibit_main.c 26 Dec 2005 14:28:55 -0000 1.24 @@ -590,7 +590,7 @@ { Ex_Tab *tab; - tab = _ex_tab_new(e, "/tmp"); + tab = _ex_tab_new(e, e->cur_tab->cur_path); _ex_main_window_tab_append(e, tab); _ex_main_populate_files(e); } @@ -606,7 +606,8 @@ tab = evas_list_nth(e->tabs, etk_notebook_current_page_get(ETK_WIDGET(object))); e->cur_tab = tab; - _ex_tab_select(tab); + _ex_tab_select(tab); + etk_entry_text_set(ETK_ENTRY(e->entry[0]), e->cur_tab->cur_path); } void @@ -617,15 +618,15 @@ /* adding first "real" tab, copy existing tab, and create new one */ e->notebook = etk_notebook_new(); etk_paned_add2(ETK_PANED(e->hpaned), e->notebook, TRUE); - etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), e->cur_tab->dir, e->cur_tab->scrolled_view); + etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), _ex_file_get(e->cur_tab->dir), e->cur_tab->scrolled_view); etk_signal_connect("current_page_changed", ETK_OBJECT(e->notebook), ETK_CALLBACK(_ex_main_window_tab_toggled_cb), e); etk_widget_show(ETK_WIDGET(e->notebook)); } e->tabs = evas_list_append(e->tabs, tab); e->cur_tab = tab; - etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), e->cur_tab->dir, e->cur_tab->scrolled_view); - etk_notebook_current_page_set(e->notebook, evas_list_count(e->tabs) - 1); + etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), _ex_file_get(e->cur_tab->dir), e->cur_tab->scrolled_view); + etk_notebook_current_page_set(e->notebook, evas_list_count(e->tabs) - 1); } void ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs