Enlightenment CVS committal

Author  : titan
Project : e17
Module  : proto

Dir     : e17/proto/ephoto/src


Modified Files:
        ephoto.c ephoto.h ephoto_misc.c ephoto_browsing.c 


Log Message:

Lets get rid of that combo for the time being. Audio is now selected from the 
directory tree.

===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ephoto.c    5 Apr 2006 23:46:36 -0000       1.32
+++ ephoto.c    6 Apr 2006 00:23:24 -0000       1.33
@@ -585,14 +585,8 @@
                ewl_text_font_size_set(EWL_TEXT(m->hsize), 10);
                ewl_widget_show(m->hsize);
                
-               m->hboxv = ewl_hbox_new();
-               ewl_object_fill_policy_set(EWL_OBJECT(m->hboxv), 
EWL_FLAG_FILL_SHRINK);
-               ewl_container_child_append(EWL_CONTAINER(m->settings), 
m->hboxv);
-               ewl_object_alignment_set(EWL_OBJECT(m->settings), 
EWL_FLAG_ALIGN_CENTER);
-               ewl_widget_show(m->hboxv);
-               
                m->text = ewl_text_new();
-               ewl_container_child_append(EWL_CONTAINER(m->hboxv), m->text);
+               ewl_container_child_append(EWL_CONTAINER(m->settings), m->text);
                ewl_object_alignment_set(EWL_OBJECT(m->text), 
EWL_FLAG_ALIGN_CENTER);
                ewl_text_font_size_set(EWL_TEXT(m->text), 12);
                ewl_text_styles_set(EWL_TEXT(m->text), 
EWL_TEXT_STYLE_UNDERLINE);
@@ -600,8 +594,8 @@
                ewl_text_text_set(EWL_TEXT(m->text), "Audio");
                ewl_widget_show(m->text);
 
-               m->atext = ewl_combo_new();
-               ewl_container_child_append(EWL_CONTAINER(m->hboxv), m->atext);
+               m->atext = ewl_text_new();
+               ewl_container_child_append(EWL_CONTAINER(m->settings), 
m->atext);
                ewl_object_alignment_set(EWL_OBJECT(m->atext), 
EWL_FLAG_ALIGN_CENTER);
                ewl_widget_show(m->atext);
                        
@@ -670,21 +664,6 @@
                 /************LETS POPULATE THEM TREES******************/
                 ewl_callback_call(m->directory, EWL_CALLBACK_VALUE_CHANGED);
                 /******************************************************/
-                m->data = _data_setup();
-
-                m->model = ewl_model_new();
-                ewl_model_fetch_set(m->model, _data_fetch);
-                ewl_model_count_set(m->model, _data_count_get);
-
-                m->view = ewl_view_new();
-                ewl_view_constructor_set(m->view, ewl_label_new);
-                ewl_view_assign_set(m->view, 
EWL_VIEW_ASSIGN(ewl_label_text_set));
-                ewl_view_header_fetch_set(m->view, _data_header_fetch);
-
-               ewl_combo_model_set(EWL_COMBO(m->atext), m->model);
-               ewl_combo_view_set(EWL_COMBO(m->atext), m->view);
-               ewl_combo_data_set(EWL_COMBO(m->atext), m->data);
-
                ewl_main();
        return 0;
        }
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ephoto.h    5 Apr 2006 14:58:40 -0000       1.13
+++ ephoto.h    6 Apr 2006 00:23:24 -0000       1.14
@@ -37,10 +37,6 @@
 void play_cb(Ewl_Widget *w, void *event, void *data);
 void ephoto_men_cb(Ewl_Widget *w, void *event, void *data);
 void destroywin_cb(Ewl_Widget *w, void *event, void *data);
-void *_data_setup();
-Ewl_Widget *_data_header_fetch();
-void *_data_fetch();
-int _data_count_get();
 
 typedef struct _Main Main;
 typedef struct _Slide Slide;
@@ -92,8 +88,6 @@
        Ewl_Widget      *viewscroll;
        Ewl_Widget      *dirtree;
        Ewl_Widget      *spacer;
-       Ewl_Model       *model;
-       Ewl_View        *view;
        Ewl_Widget      *menubar;
        Ewl_Widget      *menu;
        Ewl_Widget      *menu_item;
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_misc.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ephoto_misc.c       5 Apr 2006 18:11:00 -0000       1.7
+++ ephoto_misc.c       6 Apr 2006 00:23:24 -0000       1.8
@@ -125,45 +125,3 @@
         ewl_widget_show(cancel);
 }
 
-void *
-_data_setup()
-{
-       m->data = audiofiles;
-       return m->data;
-}
-
-Ewl_Widget *
-_data_header_fetch(void *data, int col)
-{
-       Ewl_Widget *header;
-
-       header = ewl_label_new();
-       ewl_label_text_set(EWL_LABEL(header), "Select Audio");
-       ewl_widget_show(header);
-       
-       return header;
-}
-
-void *
-_data_fetch(void *data, unsigned int row, unsigned int col)
-{
-       char *path;
-       Ecore_List *audiofiles = data;
-       path = ecore_list_goto_index(audiofiles, row);
-       if ( path != NULL ) {
-               return path;
-       }
-       else {
-               return NULL;
-       }
-}
-
-int
-_data_count_get(void *data)
-{
-       int items;
-       Ecore_List *audiofiles = data;
-
-       items = ecore_list_nodes(audiofiles);
-       return items;
-}
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_browsing.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ephoto_browsing.c   5 Apr 2006 23:46:36 -0000       1.21
+++ ephoto_browsing.c   6 Apr 2006 00:23:24 -0000       1.22
@@ -227,8 +227,42 @@
                        ewl_callback_append(m->hbox, EWL_CALLBACK_CLICKED, 
images_cb, NULL);
                        free(itemp);
                }
-               m->data = NULL;
-               ewl_combo_dirty_set(EWL_COMBO(m->atext), 1);    
+               while (!ecore_list_is_empty(audiofiles)) {
+                       itemp = ecore_list_remove_first(audiofiles);
+
+                        bname2 = basename(itemp);
+
+                        m->hbox = ewl_hbox_new();
+                        ewl_box_spacing_set(EWL_BOX(m->hbox), 5);
+                        ewl_object_alignment_set(EWL_OBJECT(m->hbox), 
EWL_FLAG_ALIGN_CENTER);
+                        ewl_object_fill_policy_set(EWL_OBJECT(m->hbox), 
EWL_FLAG_FILL_ALL);
+                        ewl_widget_name_set(m->hbox, itemp);
+                        ewl_widget_show(m->hbox);
+
+                        m->image = ewl_image_new();
+                        ewl_image_file_set(EWL_IMAGE(m->image), 
PACKAGE_DATA_DIR "images/audio.png", NULL);
+                        ewl_container_child_append(EWL_CONTAINER(m->hbox), 
m->image);
+                        ewl_widget_show(m->image);
+
+                        m->text = ewl_text_new();
+                        ewl_widget_name_set(m->text, itemp);
+                        ewl_text_text_set(EWL_TEXT(m->text), bname2);
+                        ewl_object_minimum_size_set(EWL_OBJECT(m->text), 10, 
16);
+                        ewl_object_fill_policy_set(EWL_OBJECT(m->text), 
EWL_FLAG_FILL_SHRINK);
+                        ewl_object_alignment_set(EWL_OBJECT(m->text), 
EWL_FLAG_ALIGN_CENTER);
+                        ewl_container_child_append(EWL_CONTAINER(m->hbox), 
m->text);
+                        ewl_widget_show(m->text);
+
+                        m->children[0] = m->hbox;
+                        m->children[1] = NULL;
+               
+                        m->children[0] = m->hbox;
+                        m->children[1] = NULL;
+                        m->row = ewl_tree_row_add(EWL_TREE(m->dirtree), NULL, 
m->children);
+                        ewl_callback_append(m->hbox, EWL_CALLBACK_CLICKED, 
audio_cb, NULL);
+                        free(itemp);
+
+               }       
                
/***********************************************************************/
                ecore_list_destroy(files);
                ecore_list_destroy(imagefiles);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to