Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/enhance/src/lib


Modified Files:
        enhance.c enhance_widget.c 


Log Message:
- add combo box

===================================================================
RCS file: /cvs/e/e17/proto/enhance/src/lib/enhance.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- enhance.c   24 Feb 2006 23:47:04 -0000      1.2
+++ enhance.c   3 Apr 2006 22:16:49 -0000       1.3
@@ -235,7 +235,25 @@
      {
        IF_PARENT_CLASS("GtkButton")
          etk_button_label_set(ETK_BUTTON(wid->wid), node->value);        
-     }   
+     }
+   else if(!strcmp(name, "items"))
+     {
+       IF_PARENT_CLASS("GtkComboBox")
+         {
+            char *tok;
+            char *value;
+            
+            etk_combobox_column_add(ETK_COMBOBOX(wid->wid), 
ETK_COMBOBOX_LABEL, 75, ETK_TRUE, ETK_FALSE, ETK_FALSE, 0.0, 0.5);
+            etk_combobox_build(ETK_COMBOBOX(wid->wid));
+            value = strdup(node->value);
+            tok = strtok(value, "\n");
+            do
+              {
+                 etk_combobox_item_append(ETK_COMBOBOX(wid->wid), tok);
+              }
+            while ((tok = strtok(NULL, "\n")) != NULL);             
+         }
+     }   
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/proto/enhance/src/lib/enhance_widget.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- enhance_widget.c    7 Feb 2006 00:34:32 -0000       1.1
+++ enhance_widget.c    3 Apr 2006 22:16:49 -0000       1.2
@@ -455,6 +455,20 @@
 }
 
 static E_Widget *
+_e_widget_combo_box_handle(Enhance *en, EXML_Node *node)
+{
+   E_Widget   *combo;
+   char       *id;
+   
+   id = ecore_hash_get(node->attributes, "id");
+   if(!id) return NULL;
+      
+   combo = _e_widget_new(en, node, etk_combobox_new(), id);
+   
+   return combo;
+}
+
+static E_Widget *
 _e_widget_hseparator_handle(Enhance *en, EXML_Node *node)
 {
    E_Widget   *sep;
@@ -655,7 +669,9 @@
    else if(!strcmp(class, "GtkImageMenuItem"))
      return _e_widget_menu_image_item_handle(en, node);
    else if(!strcmp(class, "GtkMenu"))
-     return _e_widget_menu_handle(en, node);
+     return _e_widget_menu_handle(en, node);   
+   else if(!strcmp(class, "GtkComboBox"))
+     return _e_widget_combo_box_handle(en, node);   
    else if(!strcmp(class, "GtkHSeparator"))
      return _e_widget_hseparator_handle(en, node);
    else if(!strcmp(class, "GtkVSeparator"))




-------------------------------------------------------
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