Enlightenment CVS committal

Author  : jethomas
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin/tests/combo


Modified Files:
        ewl_combo.c 


Log Message:

Temporary fix for bug 12.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/combo/ewl_combo.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_combo.c 23 Aug 2007 05:26:43 -0000      1.17
+++ ewl_combo.c 31 Oct 2007 19:24:45 -0000      1.18
@@ -320,15 +320,34 @@
 combo_test_editable_cb_header_fetch(void *data, unsigned int col __UNUSED__)
 {
        Combo_Test_Data *d;
-       Ewl_Widget *w, *o;
+       Ewl_Widget *w, *o, *o2;
+       Ewl_Selection_Idx *idx;
        char *val;
 
        d = data;
+       w = ewl_widget_name_find("combo_custom");
+       idx = ewl_mvc_selected_get(EWL_MVC(w));
+
        w = ewl_hbox_new();
+       ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT);
        val = "Please select an option.";
-
        o = ewl_entry_new();
-       ewl_text_text_set(EWL_TEXT(o), val);
+       
+       if (idx)
+       {
+               val = strrchr(d->data[idx->row], '/');
+               ewl_text_text_set(EWL_TEXT(o),
+                               (val ? val + 1 : d->data[idx->row]));
+               
+               o2 = ewl_image_new();
+               ewl_image_file_path_set(EWL_IMAGE(o2), d->data[idx->row]);
+               ewl_container_child_append(EWL_CONTAINER(w), o2);
+               ewl_widget_show(o2);
+       }
+
+       else
+               ewl_text_text_set(EWL_TEXT(o), val);
+
        ewl_container_child_append(EWL_CONTAINER(w), o);
        ewl_callback_append(o, EWL_CALLBACK_VALUE_CHANGED,
                                combo_cb_entry_changed, NULL);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to