Enlightenment CVS committal

Author  : moom16
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/bin


Modified Files:
        Makefile.am etk_canvas_test.c etk_test.c etk_test.h 
        etk_tree_test.c 
Added Files:
        etk_menu_test.c 


Log Message:
* [Etk_Object] Add the ability to disconnect a callback from a signal
* [Etk_Object] Remove the copy constructor thing since it's not used
* [Etk_Widget] Fix the show/hide smart object methods
* [Etk_Widget] Remove the padding setting since it's not used
* [Etk_Widget] Rewrite the resize system, it should be more optimized now :)
* [Etk_Window] Add a lot of functions to the etk_window API (and fix 
etk_window_wmclass_set())
* [Etk_Separator] Improve the theme of the h/vseparator
* [Etk_Menu] Some code for the menu. It still needs a lot of work
* [Etk_Scrolled_View] The scrollbar drag size is automatically updated
* [Etk_Canvas] Clip the objects of the canvas
* A LOT of various fixes
* Fix some doxygen errors



===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Makefile.am 31 Oct 2005 21:36:40 -0000      1.4
+++ Makefile.am 11 Nov 2005 22:48:48 -0000      1.5
@@ -16,7 +16,8 @@
 bin_PROGRAMS = etk_test
 
 etk_test_DEPENDENCIES = $(top_builddir)/src/lib/libetk.la
-etk_test_SOURCES      = \
+
+etk_test_SOURCES = \
 etk_test.h \
 etk_test.c \
 etk_button_test.c \
@@ -28,7 +29,8 @@
 etk_colorpicker_test.c \
 etk_tree_test.c \
 etk_paned_test.c \
-etk_scrolled_view_test.c
+etk_scrolled_view_test.c \
+etk_menu_test.c
 
 etk_test_LDADD = $(top_builddir)/src/lib/libetk.la \
                 @ecore_libs@ @evas_libs@ @edje_libs@
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_canvas_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etk_canvas_test.c   29 Oct 2005 19:57:20 -0000      1.4
+++ etk_canvas_test.c   11 Nov 2005 22:48:48 -0000      1.5
@@ -19,17 +19,17 @@
    Etk_Widget *vbox;
    Etk_Widget *button;
 
-       if (win)
-       {
-               etk_widget_show_all(ETK_WIDGET(win));
-               return;
-       }
-       
+   if (win)
+   {
+      etk_widget_show_all(ETK_WIDGET(win));
+      return;
+   }
+
    win = etk_window_new();
    etk_window_title_set(ETK_WINDOW(win), _("Etk Canvas Test"));
 
    etk_signal_connect("delete_event", ETK_OBJECT(win), 
ETK_CALLBACK(_etk_test_canvas_window_deleted_cb), win); 
-       
+
    vbox = etk_vbox_new(FALSE, 5);
    etk_container_add(ETK_CONTAINER(win), vbox);
 
@@ -51,6 +51,7 @@
    Evas_Object *object;
    int x, y, w, h;
    int r, g, b, a;
+   int cw, ch;
 
    if (!(canvas = ETK_CANVAS(data)) || !(evas = 
etk_widget_toplevel_evas_get(ETK_WIDGET(canvas))))
       return;
@@ -59,12 +60,15 @@
    evas_object_show(object);
    etk_canvas_object_add(canvas, object);
 
-   x = rand() % 300;
-   y = rand() % 200;
+   /* TODO: make a function to get the geometry of a widget */
+   cw = ETK_WIDGET(canvas)->geometry.w;
+   ch = ETK_WIDGET(canvas)->geometry.h;
+   x = rand() % cw;
+   y = rand() % ch;
    evas_object_move(object, x, y);
 
-   w = ETK_MAX(abs(rand() % (300 - x)), 10);
-   h = ETK_MAX(abs(rand() % (200 - y)), 10);
+   w = ETK_MAX(abs(rand() % (cw - x)), 10);
+   h = ETK_MAX(abs(rand() % (ch - y)), 10);
    evas_object_resize(object, w, h);
 
    r = rand() % 255;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etk_test.c  31 Oct 2005 21:36:40 -0000      1.4
+++ etk_test.c  11 Nov 2005 22:48:48 -0000      1.5
@@ -43,6 +43,10 @@
    {
       "Scrolled View",
       etk_test_scrolled_view_window_create
+   },
+   {
+      "Menu",
+      etk_test_menu_window_create
    }
 };
 static int num_tests = sizeof(tests) / sizeof (tests[0]);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_test.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- etk_test.h  31 Oct 2005 21:36:40 -0000      1.5
+++ etk_test.h  11 Nov 2005 22:48:48 -0000      1.6
@@ -6,8 +6,8 @@
 typedef struct _Etk_Test_Set Etk_Test_Set;
 struct _Etk_Test_Set
 {
-       char *name;
-       void (*func)(void *data);
+   char *name;
+   void (*func)(void *data);
 };
 
 void etk_test_button_window_create(void *data);
@@ -20,5 +20,6 @@
 void etk_test_tree_window_create(void *data);
 void etk_test_paned_window_create(void *data);
 void etk_test_scrolled_view_window_create(void *data);
+void etk_test_menu_window_create(void *data);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_tree_test.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- etk_tree_test.c     2 Nov 2005 13:53:39 -0000       1.14
+++ etk_tree_test.c     11 Nov 2005 22:48:48 -0000      1.15
@@ -17,6 +17,7 @@
    col2 = etk_tree_nth_col_get(tree, 1);
    col3 = etk_tree_nth_col_get(tree, 2);
 
+   etk_tree_freeze(tree);
    for (i = 0; i < n; i++)
    {
       snprintf(row_name, 256, "Row%d", i);
@@ -29,6 +30,7 @@
 
       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);
 }
 
 /* Called when the user wants to close the window: we just hide it */
@@ -161,24 +163,7 @@
    col3 = etk_tree_col_new(ETK_TREE(tree), _("Column 3"), ETK_TREE_COL_IMAGE, 
100);
    etk_tree_build(ETK_TREE(tree));
 
-   etk_tree_freeze(ETK_TREE(tree));
-   for (i = 0; i < 300; i++)
-   {
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row1"), col2, 1, col3, PACKAGE_DATA_DIR 
"/images/1star.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row2"), col2, 2, col3, PACKAGE_DATA_DIR 
"/images/2stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row3"), col2, 3, col3, PACKAGE_DATA_DIR 
"/images/3stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row4"), col2, 1, col3, PACKAGE_DATA_DIR 
"/images/3stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row5"), col2, 2, col3, PACKAGE_DATA_DIR 
"/images/2stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row6"), col2, 3, col3, PACKAGE_DATA_DIR 
"/images/1star.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row7"), col2, 1, col3, PACKAGE_DATA_DIR 
"/images/1star.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row8"), col2, 2, col3, PACKAGE_DATA_DIR 
"/images/2stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row9"), col2, 3, col3, PACKAGE_DATA_DIR 
"/images/3stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row10"), col2, 1, col3, PACKAGE_DATA_DIR 
"/images/3stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row11"), col2, 2, col3, PACKAGE_DATA_DIR 
"/images/2stars.png", NULL);
-      etk_tree_append(ETK_TREE(tree), col1, PACKAGE_DATA_DIR 
"/images/1star.png", _("Row12"), col2, 3, col3, PACKAGE_DATA_DIR 
"/images/1star.png", NULL);
-   }
-   etk_tree_thaw(ETK_TREE(tree));
-
+   _etk_test_tree_add_items(ETK_TREE(tree), 5000);
    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);
 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to