Enlightenment CVS committal

Author  : moom16
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/bin


Modified Files:
        etk_test.c etk_tree_test.c 


Log Message:
* [Etk_Image] Add etk_image_size_get(), etk_image_set_from_stock() and clean 
the internal code
* [Etk_Slider] Fix the behavior of the drag part
* [Etk_Scrollbar] Fix the behavior of the drag part
* [Etk_Entry] Modify the theme of the foxused entry
* [Etk_Tree] The tree now uses "col models" to make it more generic. You can 
also now load images or icons from an edje file. This breaks the API a bit!
* [Default theme] Use "smooth: 0" more often which improves a lot the resize 
perfs
* [Etk_Filechooser] Enable it since it's now useable. Still needs some work 
though


===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- etk_test.c  2 Dec 2005 21:57:55 -0000       1.7
+++ etk_test.c  4 Dec 2005 14:54:56 -0000       1.8
@@ -48,11 +48,11 @@
    {
       "Menu",
       etk_test_menu_window_create
-   }/*,
+   },
    {
       "File Chooser",
       etk_test_filechooser_window_create
-   }*/
+   }
 };
 static int num_tests = sizeof(tests) / sizeof (tests[0]);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_tree_test.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- etk_tree_test.c     20 Nov 2005 10:33:28 -0000      1.16
+++ etk_tree_test.c     4 Dec 2005 14:54:56 -0000       1.17
@@ -2,6 +2,9 @@
 #include <string.h>
 #include "config.h"
 
+/* TODO: Etk_Theme */
+#define ETK_DEFAULT_ICON_SET_FILE PACKAGE_DATA_DIR "/stock_icons/default.edj"
+
 static void _etk_test_tree_add_items(Etk_Tree *tree, int n);
 static void _etk_test_tree_row_selected(Etk_Object *object, Etk_Tree_Row *row, 
void *data);
 static void _etk_test_tree_row_unselected(Etk_Object *object, Etk_Tree_Row 
*row, void *data);
@@ -47,26 +50,23 @@
    etk_table_attach_defaults(ETK_TABLE(table), tree, 0, 0, 1, 1);
 
    etk_tree_mode_set(ETK_TREE(tree), ETK_TREE_MODE_TREE);
-   col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), 
ETK_TREE_COL_ICON_TEXT, 90);
-   col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), ETK_TREE_COL_INT, 
90);
-   col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE, 
90);
+   col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), 
etk_tree_model_icon_text_new(ETK_TREE(tree), ETK_TREE_FROM_EDJE), 90);
+   col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), 
etk_tree_model_double_new(ETK_TREE(tree)), 90);
+   col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), 
etk_tree_model_image_new(ETK_TREE(tree), ETK_TREE_FROM_FILE), 90);
    etk_tree_build(ETK_TREE(tree));
 
    etk_tree_freeze(ETK_TREE(tree));
    for (i = 0; i < 1000; i++)
    {
-      row = etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/open.png", _("Row1"),
-         col2, 1, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL);
-      row = etk_tree_append_to_row(row, col1, PACKAGE_DATA_DIR 
"/images/open.png", _("Row2"),
-         col2, 2, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL);
-      etk_tree_append_to_row(row, col1, PACKAGE_DATA_DIR "/images/open.png", 
_("Row3"),
-         col2, 3, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL);
+      row = etk_tree_append(ETK_TREE(tree), col1, ETK_DEFAULT_ICON_SET_FILE, 
"mimetypes/x-directory-normal-home", _("Row1"),
+         col2, 10.0, col3, PACKAGE_DATA_DIR "/images/1star.png", NULL);
+      row = etk_tree_append_to_row(row, col1, ETK_DEFAULT_ICON_SET_FILE, 
"mimetypes/x-directory-normal", _("Row2"),
+         col2, 20.0, col3, PACKAGE_DATA_DIR "/images/2stars.png", NULL);
+      etk_tree_append_to_row(row, col1, ETK_DEFAULT_ICON_SET_FILE, 
"mimetypes/text-x-generic", _("Row3"),
+         col2, 30.0, col3, PACKAGE_DATA_DIR "/images/3stars.png", NULL);
    }
    etk_tree_thaw(ETK_TREE(tree));
 
-   etk_signal_connect("row_selected", ETK_OBJECT(tree), 
ETK_CALLBACK(_etk_test_tree_row_selected), NULL);
-   etk_signal_connect("row_unselected", ETK_OBJECT(tree), 
ETK_CALLBACK(_etk_test_tree_row_unselected), NULL);
-
    /* The list: */
    label = etk_label_new(_("<h1>List:</h1>"));
    etk_table_attach(ETK_TABLE(table), label, 1, 1, 0, 0, 0, 0, 
ETK_FILL_POLICY_HFILL | ETK_FILL_POLICY_VFILL);
@@ -76,9 +76,9 @@
    etk_table_attach_defaults(ETK_TABLE(table), tree, 1, 1, 1, 1);
 
    etk_tree_multiple_select_set(ETK_TREE(tree), TRUE);
-   col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), 
ETK_TREE_COL_ICON_TEXT, 90);
-   col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), ETK_TREE_COL_INT, 
90);
-   col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE, 
90);
+   col1 = etk_tree_col_new(ETK_TREE(tree), _("Column 1"), 
etk_tree_model_icon_text_new(ETK_TREE(tree), ETK_TREE_FROM_FILE), 90);
+   col2 = etk_tree_col_new(ETK_TREE(tree), _("Column 2"), 
etk_tree_model_int_new(ETK_TREE(tree)), 90);
+   col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), 
etk_tree_model_image_new(ETK_TREE(tree), ETK_TREE_FROM_FILE), 90);
    etk_tree_build(ETK_TREE(tree));
 
    _etk_test_tree_add_items(ETK_TREE(tree), 5000);
@@ -139,7 +139,6 @@
          strncpy(star_path, PACKAGE_DATA_DIR "/images/2stars.png", 256);
       else
          strncpy(star_path, PACKAGE_DATA_DIR "/images/3stars.png", 256);
-
       etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", row_name, col2, i, col3, star_path, NULL);
    }
    etk_tree_thaw(tree);




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

Reply via email to