Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/test


Modified Files:
        ewl_border_test.c ewl_box_test.c ewl_button_test.c 
        ewl_colorpicker_test.c ewl_combo_test.c ewl_dialog_test.c 
        ewl_entry_test.c ewl_filedialog_test.c ewl_fileselector_test.c 
        ewl_floater_test.c ewl_image_test.c ewl_imenu_test.c 
        ewl_menu_bar_test.c ewl_menu_test.c ewl_notebook_test.c 
        ewl_paned_test.c ewl_password_test.c ewl_progressbar_test.c 
        ewl_scrollbar_test.c ewl_scrollpane_test.c ewl_seeker_test.c 
        ewl_selectionbar_test.c ewl_selectionbook_test.c 
        ewl_spinner_test.c ewl_statusbar_test.c ewl_table_test.c 
        ewl_test.c ewl_test.h ewl_textarea_test.c ewl_tooltip_test.c 
        ewl_tree_test.c 


Log Message:
- you can run tests individually.
  - just do `ewl_test <name>` and it should be all good

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_border_test.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_border_test.c   9 Dec 2004 02:09:55 -0000       1.2
+++ ewl_border_test.c   11 Jan 2005 02:29:29 -0000      1.3
@@ -76,8 +76,6 @@
        Ewl_Widget *border_box;
        Ewl_Widget *alabel, *avbox, *pvbox, *plabel;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_border_test_window);
-
        border_button = w;
 
        border_win = ewl_window_new();
@@ -85,8 +83,16 @@
        ewl_window_name_set(EWL_WINDOW(border_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(border_win), "EFL Test Application");
        ewl_object_size_request(EWL_OBJECT(border_win), 100, 100);
-       ewl_callback_append(border_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_border_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_border_test_window);
+               ewl_callback_append(border_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_border_test_window, NULL);
+       } else
+               ewl_callback_append(border_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
+
        ewl_widget_show(border_win);
 
        border_box = ewl_border_new("box title");
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_box_test.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_box_test.c      20 Aug 2004 16:56:00 -0000      1.32
+++ ewl_box_test.c      11 Jan 2005 02:29:29 -0000      1.33
@@ -124,8 +124,6 @@
        Ewl_Widget     *hbox[3];
        Ewl_Widget     *hbox_button[2][3];
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_box_test_window);
-
        box_button = w;
 
        box_win = ewl_window_new();
@@ -133,8 +131,15 @@
        ewl_window_name_set(EWL_WINDOW(box_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(box_win), "EFL Test Application");
        ewl_object_size_request(EWL_OBJECT(box_win), 256, 256);
-       ewl_callback_append(box_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_box_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_box_test_window);
+               ewl_callback_append(box_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_box_test_window, NULL);
+       } else
+               ewl_callback_append(box_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(box_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_button_test.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_button_test.c   19 Aug 2004 20:03:34 -0000      1.28
+++ ewl_button_test.c   11 Jan 2005 02:29:29 -0000      1.29
@@ -25,16 +25,21 @@
        Ewl_Widget     *check_button[2];
        Ewl_Widget     *radio_button[2];
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_button_test_window);
-
        button_button = w;
 
        button_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(button_win), "Button Type Test");
        ewl_window_name_set(EWL_WINDOW(button_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(button_win), "EFL Test Application");
-       ewl_callback_append(button_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __delete_button_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                                       __create_button_test_window);
+               ewl_callback_append(button_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __delete_button_test_window, NULL);
+       } else 
+               ewl_callback_append(button_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(button_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_colorpicker_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_colorpicker_test.c      18 Aug 2004 03:15:22 -0000      1.4
+++ ewl_colorpicker_test.c      11 Jan 2005 02:29:29 -0000      1.5
@@ -36,17 +36,21 @@
        Ewl_Widget     *colorpicker1;
 
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_colorpicker_test_window);
-
        colorpicker_button = w;
 
        colorpicker_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(colorpicker_win), "Color Picker Test");
        ewl_window_name_set(EWL_WINDOW(colorpicker_win), "EWL Test 
Application");
        ewl_window_class_set(EWL_WINDOW(colorpicker_win), "EFL Test 
Application");
-       ewl_callback_append(colorpicker_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_colorpicker_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                               __create_colorpicker_test_window);
+               ewl_callback_append(colorpicker_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_colorpicker_test_window, NULL);
+       } else
+               ewl_callback_append(colorpicker_win, EWL_CALLBACK_DELETE_WINDOW,
+                               __close_main_window, NULL);
        ewl_widget_show(colorpicker_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_combo_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_combo_test.c    18 Aug 2004 03:15:22 -0000      1.5
+++ ewl_combo_test.c    11 Jan 2005 02:29:29 -0000      1.6
@@ -48,17 +48,21 @@
        Ewl_Widget     *combo1;
        Ewl_Widget     *item;
 
-
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_combo_test_window);
-
        combo_button = w;
 
        combo_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(combo_win), "Combo Test");
        ewl_window_name_set(EWL_WINDOW(combo_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(combo_win), "EFL Test Application");
-       ewl_callback_append(combo_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_combo_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                               __create_combo_test_window);
+               ewl_callback_append(combo_win, EWL_CALLBACK_DELETE_WINDOW,
+                                           __destroy_combo_test_window, NULL);
+       } else
+               ewl_callback_append(combo_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(combo_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_dialog_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_dialog_test.c   24 Aug 2004 05:00:57 -0000      1.3
+++ ewl_dialog_test.c   11 Jan 2005 02:29:30 -0000      1.4
@@ -110,8 +110,13 @@
   ewl_window_name_set (EWL_WINDOW (dialog_win), "EWL Test Application");
   ewl_window_class_set (EWL_WINDOW (dialog_win), "EFL Test Application");
   ewl_object_insets_set (EWL_OBJECT (dialog_win), 5, 5, 5, 5);
-  ewl_callback_append (dialog_win, EWL_CALLBACK_DELETE_WINDOW,
-                      EWL_CALLBACK_FUNCTION (__destroy_dialog_test_window), 
NULL);
+
+  if (w) 
+         ewl_callback_append (dialog_win, EWL_CALLBACK_DELETE_WINDOW,
+              EWL_CALLBACK_FUNCTION (__destroy_dialog_test_window), NULL);
+  else
+       ewl_callback_append(dialog_win, EWL_CALLBACK_DELETE_WINDOW,
+                                               __close_main_window, NULL);
 
   hbox = ewl_hbox_new ();
   ewl_dialog_widget_add (EWL_DIALOG (dialog_win), hbox);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_entry_test.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_entry_test.c    5 Oct 2004 23:34:52 -0000       1.27
+++ ewl_entry_test.c    11 Jan 2005 02:29:30 -0000      1.28
@@ -60,16 +60,21 @@
        Ewl_Widget     *button_hbox;
        Ewl_Widget     *button[2];
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_entry_test_window);
-
        entry_button = w;
 
        entry_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(entry_win), "Entry Test");
        ewl_window_name_set(EWL_WINDOW(entry_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(entry_win), "EFL Test Application");
-       ewl_callback_append(entry_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_entry_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_entry_test_window);
+               ewl_callback_append(entry_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_entry_test_window, NULL);
+       } else
+               ewl_callback_append(entry_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(entry_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_filedialog_test.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_filedialog_test.c       31 Aug 2004 18:31:37 -0000      1.28
+++ ewl_filedialog_test.c       11 Jan 2005 02:29:30 -0000      1.29
@@ -26,8 +26,13 @@
        ewl_window_name_set (EWL_WINDOW (win), "EWL Test Application");
        ewl_window_class_set (EWL_WINDOW (win), "EFL Test Application");
        ewl_object_size_request (EWL_OBJECT (win), 500, 450);
-       ewl_callback_append (win, EWL_CALLBACK_DELETE_WINDOW,
-                            __destroy_filedialog_test_window, NULL);
+
+       if (w)
+               ewl_callback_append (win, EWL_CALLBACK_DELETE_WINDOW,
+                                    __destroy_filedialog_test_window, NULL);
+       else
+               ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW,
+                                               __close_main_window, NULL);
        ewl_widget_show(win);
 
        fd = ewl_filedialog_new(EWL_FILEDIALOG_TYPE_OPEN);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_fileselector_test.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_fileselector_test.c     28 Aug 2004 06:26:33 -0000      1.14
+++ ewl_fileselector_test.c     11 Jan 2005 02:29:30 -0000      1.15
@@ -25,17 +25,21 @@
        Ewl_Widget     *fs;
        Ewl_Widget     *fs_win;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_fileselector_test_window);
-
        fs_button = w;
 
        fs_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(fs_win), "File Selector Test");
        ewl_window_name_set(EWL_WINDOW(fs_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(fs_win), "EFL Test Application");
-       ewl_callback_append(fs_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_fileselector_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                               __create_fileselector_test_window);
+               ewl_callback_append(fs_win, EWL_CALLBACK_DELETE_WINDOW,
+                               __destroy_fileselector_test_window, NULL);
+       } else
+               ewl_callback_append(fs_win, EWL_CALLBACK_DELETE_WINDOW,
+                                               __close_main_window, NULL);
        ewl_widget_show(fs_win);
 
        fs = ewl_fileselector_new(__file_clicked);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_floater_test.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_floater_test.c  23 Aug 2004 01:17:30 -0000      1.14
+++ ewl_floater_test.c  11 Jan 2005 02:29:30 -0000      1.15
@@ -26,16 +26,21 @@
        Ewl_Widget     *check_button[2];
        Ewl_Widget     *radio_button[2];
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_floater_test_window);
-
        floater_button = w;
 
        floater_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(floater_win), "Floater Test");
        ewl_window_name_set(EWL_WINDOW(floater_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(floater_win), "EFL Test Application");
-       ewl_callback_append(floater_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_floater_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                               __create_floater_test_window);
+               ewl_callback_append(floater_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_floater_test_window, NULL);
+       } else
+               ewl_callback_append(floater_win, EWL_CALLBACK_DELETE_WINDOW,
+                                               __close_main_window, NULL);
        ewl_widget_show(floater_win);
 
        floater_box = ewl_vbox_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_image_test.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_image_test.c    29 Aug 2004 02:47:40 -0000      1.28
+++ ewl_image_test.c    11 Jan 2005 02:29:30 -0000      1.29
@@ -120,8 +120,6 @@
        Ewl_Widget     *button_prev, *button_load, *button_next;
        char           *image_file = NULL;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_image_test_window);
-
        image_button = w;
 
        images = ecore_dlist_new();
@@ -130,8 +128,15 @@
        ewl_window_title_set(EWL_WINDOW(image_win), "Image Test");
        ewl_window_name_set(EWL_WINDOW(image_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(image_win), "EFL Test Application");
-       ewl_callback_append(image_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_image_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                               __create_image_test_window);
+               ewl_callback_append(image_win, EWL_CALLBACK_DELETE_WINDOW,
+                                           __destroy_image_test_window, NULL);
+       } else
+               ewl_callback_append(image_win, EWL_CALLBACK_DELETE_WINDOW,
+                                               __close_main_window, NULL);
        ewl_widget_show(image_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_imenu_test.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_imenu_test.c    26 Oct 2004 14:00:01 -0000      1.18
+++ ewl_imenu_test.c    11 Jan 2005 02:29:30 -0000      1.19
@@ -51,17 +51,21 @@
        Ewl_Widget     *imenu1, *imenu2;
        Ewl_Widget     *item;
 
-
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_imenu_test_window);
-
        imenu_button = w;
 
        imenu_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(imenu_win), "Imenu Test");
        ewl_window_name_set(EWL_WINDOW(imenu_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(imenu_win), "EFL Test Application");
-       ewl_callback_append(imenu_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_imenu_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_imenu_test_window);
+               ewl_callback_append(imenu_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_imenu_test_window, NULL);
+       } else
+               ewl_callback_append(imenu_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(imenu_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_menu_bar_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_menu_bar_test.c 6 Sep 2004 22:24:41 -0000       1.4
+++ ewl_menu_bar_test.c 11 Jan 2005 02:29:30 -0000      1.5
@@ -5,97 +5,101 @@
 void
 __destroy_menubar_test_window(Ewl_Widget *w, void *ev_data, void *user_data)
 {
-    ewl_widget_destroy(w);
+       ewl_widget_destroy(w);
 
-    ewl_callback_append(menubar_button, EWL_CALLBACK_CLICKED,
-                            __create_menubar_test_window, NULL);
-    return;
-    ev_data = NULL;
-    user_data = NULL;
+       ewl_callback_append(menubar_button, EWL_CALLBACK_CLICKED,
+                                                       
__create_menubar_test_window, NULL);
+       return;
+       ev_data = NULL;
+       user_data = NULL;
 }
 
 void
 __create_menubar_test_window(Ewl_Widget *w, void *ev_data, void *user_data)
 {
-    Ewl_Widget *menubar_win = NULL, *box = NULL;
-    Ewl_Widget *h_menubar = NULL, *v_menubar = NULL;
+       Ewl_Widget *menubar_win = NULL, *box = NULL;
+       Ewl_Widget *h_menubar = NULL, *v_menubar = NULL;
 
-    ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
-                            __create_menubar_test_window);
+       menubar_button = w;
 
-    menubar_button = w;
-
-    menubar_win = ewl_window_new();
-    ewl_window_title_set(EWL_WINDOW(menubar_win), "Menubar Test");
-    ewl_window_name_set(EWL_WINDOW(menubar_win), "EWL Test Application");
-    ewl_window_class_set(EWL_WINDOW(menubar_win), "EFL Test Application");
-    ewl_object_minimum_size_set(EWL_OBJECT(menubar_win), 300, 300);
-    ewl_callback_append(menubar_win, EWL_CALLBACK_DELETE_WINDOW,
-                        __destroy_menubar_test_window, NULL);
-    ewl_widget_show(menubar_win);
-
-    box = ewl_vbox_new();
-    ewl_container_child_append(EWL_CONTAINER(menubar_win), box);
-    ewl_widget_show(box);
-
-    h_menubar = ewl_hmenubar_new();
-    {
-        int i;
-        Ewl_Widget *item;
-        char *m_items[] = {"File",
-                            "Test",
-                            "About",
-                            NULL};
-        for(i = 0; m_items[i] != NULL; i++) {
-            Ewl_Widget *foo;
-            item = ewl_menubar_menu_add(EWL_MENUBAR(h_menubar), NULL, 
m_items[i]);
-
-            foo = ewl_menu_item_new(NULL, "foo");
-            ewl_container_child_append(EWL_CONTAINER(item), foo);
-            ewl_widget_show(foo);
-
-            foo = ewl_menu_item_new(NULL, "foobar");
-            ewl_container_child_append(EWL_CONTAINER(item), foo);
-            ewl_widget_show(foo);
-
-            if (i != 0 && (i % 1) == 0) 
-                ewl_menubar_seperator_add(EWL_MENUBAR(h_menubar));
-        }
-    }
-    ewl_container_child_append(EWL_CONTAINER(box), h_menubar);
-    ewl_widget_show(h_menubar);
-
-    v_menubar = ewl_vmenubar_new();
-    {
-        int i;
-        Ewl_Widget *item;
-        char *m_items[] = {"About",
-                            "Left",
-                            "Right",
-                            "foo",
-                            NULL};
-        for(i = 0; m_items[i] != NULL; i++) {
-            Ewl_Widget *foo;
-            item = ewl_menubar_menu_add(EWL_MENUBAR(v_menubar), NULL, 
m_items[i]);
-
-            foo = ewl_menu_item_new(NULL, "foo");
-            ewl_container_child_append(EWL_CONTAINER(item), foo);
-            ewl_widget_show(foo);
-
-            foo = ewl_menu_item_new(NULL, "foobar");
-            ewl_container_child_append(EWL_CONTAINER(item), foo);
-            ewl_widget_show(foo);
-
-            if (i != 0 && (i % 2) == 0) 
-                ewl_menubar_seperator_add(EWL_MENUBAR(v_menubar));
-        }
-    }
-    ewl_container_child_append(EWL_CONTAINER(box), v_menubar);
-    ewl_widget_show(v_menubar);
-
-    return;
-    ev_data = NULL;
-    user_data = NULL;
+       menubar_win = ewl_window_new();
+       ewl_window_title_set(EWL_WINDOW(menubar_win), "Menubar Test");
+       ewl_window_name_set(EWL_WINDOW(menubar_win), "EWL Test Application");
+       ewl_window_class_set(EWL_WINDOW(menubar_win), "EFL Test Application");
+       ewl_object_minimum_size_set(EWL_OBJECT(menubar_win), 300, 300);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_menubar_test_window);
+               ewl_callback_append(menubar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_menubar_test_window, NULL);
+       } else
+               ewl_callback_append(menubar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
+       ewl_widget_show(menubar_win);
+
+       box = ewl_vbox_new();
+       ewl_container_child_append(EWL_CONTAINER(menubar_win), box);
+       ewl_widget_show(box);
+
+       h_menubar = ewl_hmenubar_new();
+       {
+               int i;
+               Ewl_Widget *item;
+               char *m_items[] = {"File",
+                                                       "Test",
+                                                       "About",
+                                                       NULL};
+               for(i = 0; m_items[i] != NULL; i++) {
+                       Ewl_Widget *foo;
+                       item = ewl_menubar_menu_add(EWL_MENUBAR(h_menubar), 
NULL, m_items[i]);
+
+                       foo = ewl_menu_item_new(NULL, "foo");
+                       ewl_container_child_append(EWL_CONTAINER(item), foo);
+                       ewl_widget_show(foo);
+
+                       foo = ewl_menu_item_new(NULL, "foobar");
+                       ewl_container_child_append(EWL_CONTAINER(item), foo);
+                       ewl_widget_show(foo);
+
+                       if (i != 0 && (i % 1) == 0) 
+                               
ewl_menubar_seperator_add(EWL_MENUBAR(h_menubar));
+               }
+       }
+       ewl_container_child_append(EWL_CONTAINER(box), h_menubar);
+       ewl_widget_show(h_menubar);
+
+       v_menubar = ewl_vmenubar_new();
+       {
+               int i;
+               Ewl_Widget *item;
+               char *m_items[] = {"About",
+                               "Left",
+                               "Right",
+                               "foo",
+                               NULL};
+               for(i = 0; m_items[i] != NULL; i++) {
+                       Ewl_Widget *foo;
+                       item = ewl_menubar_menu_add(EWL_MENUBAR(v_menubar), 
NULL, m_items[i]);
+
+                       foo = ewl_menu_item_new(NULL, "foo");
+                       ewl_container_child_append(EWL_CONTAINER(item), foo);
+                       ewl_widget_show(foo);
+
+                       foo = ewl_menu_item_new(NULL, "foobar");
+                       ewl_container_child_append(EWL_CONTAINER(item), foo);
+                       ewl_widget_show(foo);
+
+                       if (i != 0 && (i % 2) == 0) 
+                               
ewl_menubar_seperator_add(EWL_MENUBAR(v_menubar));
+               }
+       }
+       ewl_container_child_append(EWL_CONTAINER(box), v_menubar);
+       ewl_widget_show(v_menubar);
+
+       return;
+       ev_data = NULL;
+       user_data = NULL;
 }
 
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_menu_test.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_menu_test.c     18 Aug 2004 03:15:22 -0000      1.12
+++ ewl_menu_test.c     11 Jan 2005 02:29:30 -0000      1.13
@@ -40,17 +40,21 @@
        Ewl_Widget     *menu1, *menu2;
        Ewl_Widget     *item;
 
-
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_menu_test_window);
-
        menu_button = w;
 
        menu_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(menu_win), "Menu Test");
        ewl_window_name_set(EWL_WINDOW(menu_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(menu_win), "EFL Test Application");
-       ewl_callback_append(menu_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_menu_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_menu_test_window);
+               ewl_callback_append(menu_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_menu_test_window, NULL);
+       } else
+               ewl_callback_append(menu_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(menu_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_notebook_test.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_notebook_test.c 8 Dec 2004 21:35:25 -0000       1.28
+++ ewl_notebook_test.c 11 Jan 2005 02:29:30 -0000      1.29
@@ -284,17 +284,21 @@
        Ewl_Widget     *notebook_box;
        Ewl_Widget     *notebook;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_notebook_test_window);
-
        notebook_button = w;
 
        notebook_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(notebook_win), "Notebook Test");
        ewl_window_name_set(EWL_WINDOW(notebook_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(notebook_win), "EFL Test Application");
-       ewl_callback_append(notebook_win, EWL_CALLBACK_DELETE_WINDOW,
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                        __create_notebook_test_window);
+               ewl_callback_append(notebook_win, EWL_CALLBACK_DELETE_WINDOW,
                            __destroy_notebook_test_window, NULL);
+       } else 
+               ewl_callback_append(notebook_win, EWL_CALLBACK_DELETE_WINDOW,
+                               __close_main_window, NULL);
        ewl_widget_show(notebook_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_paned_test.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_paned_test.c    26 Sep 2004 00:34:50 -0000      1.2
+++ ewl_paned_test.c    11 Jan 2005 02:29:30 -0000      1.3
@@ -20,16 +20,21 @@
 {
        Ewl_Widget     *paned_win, *box, *pane, *o;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_paned_test_window);
-
        paned_button = w;
 
        paned_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(paned_win), "Paned Test");
        ewl_window_name_set(EWL_WINDOW(paned_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(paned_win), "EFL Test Application");
-       ewl_callback_append(paned_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_paned_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_paned_test_window);
+               ewl_callback_append(paned_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_paned_test_window, NULL);
+       } else
+               ewl_callback_append(paned_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(paned_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_password_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_password_test.c 23 Aug 2004 00:18:59 -0000      1.7
+++ ewl_password_test.c 11 Jan 2005 02:29:30 -0000      1.8
@@ -56,16 +56,21 @@
        Ewl_Widget     *button_hbox;
        Ewl_Widget     *button[2];
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
__create_password_test_window);
-
        password_button = w;
 
        password_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(password_win), "Password Entry Test");
        ewl_window_name_set(EWL_WINDOW(password_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(password_win), "EFL Test Application");
-       ewl_callback_append(password_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_password_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_password_test_window);
+               ewl_callback_append(password_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_password_test_window, NULL);
+       } else
+               ewl_callback_append(password_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(password_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_progressbar_test.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_progressbar_test.c      23 Aug 2004 00:10:14 -0000      1.14
+++ ewl_progressbar_test.c      11 Jan 2005 02:29:30 -0000      1.15
@@ -15,7 +15,7 @@
        double value, range;
        char c[30];
        int i;
-  Ewl_Progressbar *p = EWL_PROGRESSBAR(data);
+       Ewl_Progressbar *p = EWL_PROGRESSBAR(data);
 
        val = ewl_progressbar_value_get(p);
 
@@ -132,9 +132,6 @@
        Ewl_Widget     *button;
        int            i;
 
-
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
__create_progressbar_test_window);
-
        progressbar_button = w;
 
        progressbar_win = ewl_window_new();
@@ -142,8 +139,15 @@
        ewl_window_name_set(EWL_WINDOW(progressbar_win), "EWL Test 
Application");
        ewl_window_class_set(EWL_WINDOW(progressbar_win), "EFL Test 
Application");
        ewl_object_size_request(EWL_OBJECT(progressbar_win), 300, 20);
-       ewl_callback_append(progressbar_win, EWL_CALLBACK_DELETE_WINDOW,
-                       __destroy_progressbar_test_window, NULL);
+
+       if (w) { 
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                               __create_progressbar_test_window);
+               ewl_callback_append(progressbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                               __destroy_progressbar_test_window, NULL);
+       } else
+               ewl_callback_append(progressbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(progressbar_win);
        
        progressbar_vbox = ewl_vbox_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_scrollbar_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_scrollbar_test.c        18 Aug 2004 03:15:22 -0000      1.7
+++ ewl_scrollbar_test.c        11 Jan 2005 02:29:30 -0000      1.8
@@ -22,17 +22,21 @@
        Ewl_Widget *scrollbar_win;
        Ewl_Widget *hscrollbar, *vscrollbar;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_scrollbar_test_window);
-
        scrollbar_button = w;
 
        scrollbar_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(scrollbar_win), "Scrollbar Test");
        ewl_window_name_set(EWL_WINDOW(scrollbar_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(scrollbar_win), "EFL Test Application");
-       ewl_callback_append(scrollbar_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_scrollbar_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                                __create_scrollbar_test_window);
+               ewl_callback_append(scrollbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_scrollbar_test_window, NULL);
+       } else
+               ewl_callback_append(scrollbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_win, NULL);
        ewl_widget_show(scrollbar_win);
 
        hscrollbar = ewl_hscrollbar_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_scrollpane_test.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_scrollpane_test.c       18 Aug 2004 03:15:22 -0000      1.8
+++ ewl_scrollpane_test.c       11 Jan 2005 02:29:30 -0000      1.9
@@ -24,17 +24,21 @@
        Ewl_Widget *scrollpane;
        Ewl_Widget *button;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_scrollpane_test_window);
-
        scrollpane_button = w;
 
        scrollpane_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(scrollpane_win), "Scrollpane Test");
        ewl_window_name_set(EWL_WINDOW(scrollpane_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(scrollpane_win), "EFL Test 
Application");
-       ewl_callback_append(scrollpane_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_scrollpane_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                        __create_scrollpane_test_window);
+               ewl_callback_append(scrollpane_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_scrollpane_test_window, NULL);
+       } else
+               ewl_callback_append(scrollpane_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_object_set_minimum_size(EWL_OBJECT(scrollpane_win), 200, 200);
        ewl_widget_show(scrollpane_win);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_seeker_test.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_seeker_test.c   23 Aug 2004 01:17:30 -0000      1.17
+++ ewl_seeker_test.c   11 Jan 2005 02:29:30 -0000      1.18
@@ -34,9 +34,6 @@
        Ewl_Widget *seeker_win;
        Ewl_Widget *hseeker, *vseeker;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_seeker_test_window);
-
        seeker_button = w;
 
        seeker_win = ewl_window_new();
@@ -44,8 +41,15 @@
        ewl_window_name_set(EWL_WINDOW(seeker_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(seeker_win), "EFL Test Application");
        ewl_object_minimum_size_set(EWL_OBJECT(seeker_win), 300, 300);
-       ewl_callback_append(seeker_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_seeker_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                                __create_seeker_test_window);
+               ewl_callback_append(seeker_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_seeker_test_window, NULL);
+       } else
+               ewl_callback_append(seeker_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(seeker_win);
 
        hseeker = ewl_hseeker_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_selectionbar_test.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_selectionbar_test.c     18 Aug 2004 03:15:22 -0000      1.11
+++ ewl_selectionbar_test.c     11 Jan 2005 02:29:30 -0000      1.12
@@ -26,19 +26,21 @@
        Ewl_Widget *box_button;
        Ewl_Widget *child[3];
 
-       
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_selectionbar_test_window);
-
        sbar_button = w;
 
-
        sbar_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(sbar_win), "Selectionbar Test");
        ewl_window_name_set(EWL_WINDOW(sbar_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(sbar_win), "EFL Test Application");
-       ewl_callback_append(sbar_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_selectionbar_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                        __create_selectionbar_test_window);
+               ewl_callback_append(sbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_selectionbar_test_window, NULL);
+       } else
+               ewl_callback_append(sbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(sbar_win);
 
        box = ewl_vbox_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_selectionbook_test.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_selectionbook_test.c    18 Aug 2004 03:52:38 -0000      1.12
+++ ewl_selectionbook_test.c    11 Jan 2005 02:29:30 -0000      1.13
@@ -27,18 +27,21 @@
        Ewl_Widget     *tab[2];
        Ewl_Widget     *panel[2];
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_selectionbook_test_window);
-
        sbook_button = w;
 
-
        sbook_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(sbook_win), "Selectionbook Test");
        ewl_window_name_set(EWL_WINDOW(sbook_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(sbook_win), "EFL Test Application");
-       ewl_callback_append(sbook_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_selectionbook_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                        __create_selectionbook_test_window);
+               ewl_callback_append(sbook_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_selectionbook_test_window, NULL);
+       } else
+               ewl_callback_append(sbook_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(sbook_win);
 
        sbook = ewl_selectionbook_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_spinner_test.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_spinner_test.c  19 Aug 2004 20:03:34 -0000      1.21
+++ ewl_spinner_test.c  11 Jan 2005 02:29:30 -0000      1.22
@@ -94,16 +94,21 @@
        Ewl_Widget     *separator[3];
        int             xx, yy, ww, hh, mw, mh;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_spinner_test_window);
-
        spinner_button = w;
 
        spinner_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(spinner_win), "STest");
        ewl_window_name_set(EWL_WINDOW(spinner_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(spinner_win), "EFL Test Application");
-       ewl_callback_append(spinner_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_spinner_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                               __create_spinner_test_window);
+               ewl_callback_append(spinner_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_spinner_test_window, NULL);
+       } else
+               ewl_callback_append(spinner_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(spinner_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_statusbar_test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_statusbar_test.c        11 Nov 2004 13:50:48 -0000      1.1
+++ ewl_statusbar_test.c        11 Jan 2005 02:29:30 -0000      1.2
@@ -35,43 +35,47 @@
 void
 __destroy_statusbar_test_window(Ewl_Widget *w, void *ev_data, void *user_data)
 {
-    ewl_widget_destroy(w);
+       ewl_widget_destroy(w);
 
-    ewl_callback_append(statusbar_button, EWL_CALLBACK_CLICKED,
-                            __create_statusbar_test_window, NULL);
-    return;
-    ev_data = NULL;
-    user_data = NULL;
+       ewl_callback_append(statusbar_button, EWL_CALLBACK_CLICKED,
+                                       __create_statusbar_test_window, NULL);
+       return;
+       ev_data = NULL;
+       user_data = NULL;
 }
 
 void
 __create_statusbar_test_window(Ewl_Widget *w, void *ev_data, void *user_data)
 {
-    Ewl_Widget *statusbar_win = NULL, *box = NULL;
-    Ewl_Widget *statusbar = NULL, *button = NULL;
+       Ewl_Widget *statusbar_win = NULL, *box = NULL;
+       Ewl_Widget *statusbar = NULL, *button = NULL;
 
-    ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
-                            __create_statusbar_test_window);
+       statusbar_button = w;
 
-    statusbar_button = w;
+       statusbar_win = ewl_window_new();
+       ewl_window_title_set(EWL_WINDOW(statusbar_win), "Statusbar Test");
+       ewl_window_name_set(EWL_WINDOW(statusbar_win), "EWL Test Application");
+       ewl_window_class_set(EWL_WINDOW(statusbar_win), "EFL Test Application");
+       ewl_object_minimum_size_set(EWL_OBJECT(statusbar_win), 100, 100);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                               __create_statusbar_test_window);
+               ewl_callback_append(statusbar_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __destroy_statusbar_test_window, NULL);
+       } else 
+               ewl_callback_append(statusbar_win, EWL_CALLBACK_DELETE_WINDOW,  
+                                       __close_main_window, NULL);
+       ewl_widget_show(statusbar_win);
+
+       box = ewl_vbox_new();
+       ewl_container_child_append(EWL_CONTAINER(statusbar_win), box);
+       ewl_widget_show(box);
 
-    statusbar_win = ewl_window_new();
-    ewl_window_title_set(EWL_WINDOW(statusbar_win), "Statusbar Test");
-    ewl_window_name_set(EWL_WINDOW(statusbar_win), "EWL Test Application");
-    ewl_window_class_set(EWL_WINDOW(statusbar_win), "EFL Test Application");
-    ewl_object_minimum_size_set(EWL_OBJECT(statusbar_win), 100, 100);
-    ewl_callback_append(statusbar_win, EWL_CALLBACK_DELETE_WINDOW,
-                        __destroy_statusbar_test_window, NULL);
-    ewl_widget_show(statusbar_win);
-
-    box = ewl_vbox_new();
-    ewl_container_child_append(EWL_CONTAINER(statusbar_win), box);
-    ewl_widget_show(box);
-
-    statusbar = ewl_statusbar_new();
+       statusbar = ewl_statusbar_new();
        ewl_container_child_append(EWL_CONTAINER(box), statusbar);
-       ewl_statusbar_left_hide(statusbar);
-    ewl_widget_show(statusbar);
+       ewl_statusbar_left_hide(EWL_STATUSBAR(statusbar));
+       ewl_widget_show(statusbar);
 
        button = ewl_button_new("push");
        ewl_callback_append(button, EWL_CALLBACK_CLICKED, __button_push_cb,
@@ -87,9 +91,9 @@
        ewl_container_child_append(EWL_CONTAINER(box), button);
        ewl_widget_show(button);
 
-    return;
-    ev_data = NULL;
-    user_data = NULL;
+       return;
+       ev_data = NULL;
+       user_data = NULL;
 }
 
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_table_test.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_table_test.c    18 Aug 2004 03:15:22 -0000      1.24
+++ ewl_table_test.c    11 Jan 2005 02:29:30 -0000      1.25
@@ -32,16 +32,21 @@
        char           *three = "three";
        char           *four = "four";
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_table_test_window);
-
        table_button = w;
 
        table_win = ewl_window_new();
        ewl_window_title_set(EWL_WINDOW(table_win), "Table Test");
        ewl_window_name_set(EWL_WINDOW(table_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(table_win), "EFL Test Application");
-       ewl_callback_append(table_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_table_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_table_test_window);
+               ewl_callback_append(table_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_table_test_window, NULL);
+       } else 
+               ewl_callback_append(table_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(table_win);
 
        /*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_test.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- ewl_test.c  24 Dec 2004 22:16:42 -0000      1.81
+++ ewl_test.c  11 Jan 2005 02:29:30 -0000      1.82
@@ -91,8 +91,6 @@
                { "Textarea",    __create_textarea_test_window,    
"ewl_textarea_test.c" },
                { "Tooltip",     __create_tooltip_test_window,     
"ewl_tooltip_test.c" },
                { "Tree",        __create_tree_test_window,        
"ewl_tree_test.c" },
-
-               
                { 0, 0, 0 }
        };
        static char* tooltips[] = {
@@ -159,6 +157,24 @@
                return 1;
        }
 
+       if (argc > 1) {
+               int j, found = 0;
+
+               for (j = 1; j < argc; j++) {
+                       for (i = 0; tests[i].func; i++) {
+                               if (!strcasecmp(argv[j], tests[i].name)) {
+                                       tests[i].func(NULL, NULL, NULL);
+                                       found++;
+                               }
+                       }
+               }
+
+               if (found) {
+                       ewl_main();
+                       exit(0);
+               }
+       }
+
        heap_end = sbrk(0);
        printf("HEAP SIZE:\t%u bytes\n", heap_end - heap_start);
 
@@ -206,8 +222,6 @@
 
        i = 0;
        while (tests[i].func) {
-               int         j;
-
                /*
                 * Add the row to the tree, and setup it's alignment and
                 * fill.
@@ -230,11 +244,6 @@
                                            tooltip);
                ewl_tooltip_text_set (EWL_TOOLTIP (tooltip), tooltips[i]);
 
-               for (j = 1; j < argc; j++) {
-                       if (!strcasecmp(argv[j], tests[i].name))
-                               tests[i].func(prow[i], NULL, NULL);
-               }
-
                i++;
        }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_test.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_test.h  9 Dec 2004 01:43:34 -0000       1.13
+++ ewl_test.h  11 Jan 2005 02:29:30 -0000      1.14
@@ -11,7 +11,7 @@
         char *filename;
 };
 
-void __close_main_widow                 (Ewl_Widget * w, void *ev_data, void 
*user_data);
+void __close_main_window                (Ewl_Widget * w, void *ev_data, void 
*user_data);
 void __create_border_test_window        (Ewl_Widget * w, void *ev_data, void 
*user_data);
 void __create_box_test_window           (Ewl_Widget * w, void *ev_data, void 
*user_data);
 void __create_button_test_window        (Ewl_Widget * w, void *ev_data, void 
*user_data);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_textarea_test.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_textarea_test.c 26 Oct 2004 22:02:26 -0000      1.24
+++ ewl_textarea_test.c 11 Jan 2005 02:29:30 -0000      1.25
@@ -82,9 +82,6 @@
        Ewl_Widget     *tmp;
        Ewl_Widget     *vbox;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_textarea_test_window);
-
        textarea_button = w;
 
        /*
@@ -97,8 +94,15 @@
        ewl_window_class_set(EWL_WINDOW(textarea_win), "EFL Test Application");
        ewl_object_fill_policy_set(EWL_OBJECT(textarea_win), EWL_FLAG_FILL_ALL);
        ewl_object_size_request(EWL_OBJECT(textarea_win), 200, 150);
-       ewl_callback_append(textarea_win, EWL_CALLBACK_DELETE_WINDOW,
-                           __destroy_textarea_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                                __create_textarea_test_window);
+               ewl_callback_append(textarea_win, EWL_CALLBACK_DELETE_WINDOW,
+                                   __destroy_textarea_test_window, NULL);
+       } else
+               ewl_callback_append(textarea_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(textarea_win);
 
        vbox = ewl_vbox_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_tooltip_test.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_tooltip_test.c  19 Aug 2004 20:03:34 -0000      1.11
+++ ewl_tooltip_test.c  11 Jan 2005 02:29:30 -0000      1.12
@@ -20,9 +20,6 @@
        Ewl_Widget     *button;
        Ewl_Widget     *tooltip;
 
-
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED, __create_tooltip_test_window);
-
        tooltip_button = w;
 
        tooltip_win = ewl_window_new();
@@ -30,8 +27,15 @@
        ewl_window_name_set(EWL_WINDOW(tooltip_win), "EWL Test Application");
        ewl_window_class_set(EWL_WINDOW(tooltip_win), "EFL Test Application");
        ewl_object_size_request(EWL_OBJECT(tooltip_win), 200, 100);
-       ewl_callback_append(tooltip_win, EWL_CALLBACK_DELETE_WINDOW,
-                       __destroy_tooltip_test_window, NULL);
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED, 
+                                       __create_tooltip_test_window);
+               ewl_callback_append(tooltip_win, EWL_CALLBACK_DELETE_WINDOW,
+                               __destroy_tooltip_test_window, NULL);
+       } else
+               ewl_callback_append(tooltip_win, EWL_CALLBACK_DELETE_WINDOW,
+                                       __close_main_window, NULL);
        ewl_widget_show(tooltip_win);
        
        tooltip_vbox = ewl_vbox_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_tree_test.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_tree_test.c     26 Oct 2004 14:00:01 -0000      1.17
+++ ewl_tree_test.c     11 Jan 2005 02:29:30 -0000      1.18
@@ -50,9 +50,6 @@
        Ewl_Widget *hbox;
        Ewl_Widget *button;
 
-       ewl_callback_del(w, EWL_CALLBACK_CLICKED,
-                        __create_tree_test_window);
-
        tree_button = w;
 
        tree_win = ewl_window_new();
@@ -62,8 +59,15 @@
        ewl_window_class_set(EWL_WINDOW(tree_win), "EFL Test Application");
        /* ewl_object_set_maximum_size(EWL_OBJECT(tree_win), 400, 400); */
        ewl_object_size_request(EWL_OBJECT(tree_win), 400, 200);
-       ewl_callback_append(tree_win, EWL_CALLBACK_DELETE_WINDOW,
+
+       if (w) {
+               ewl_callback_del(w, EWL_CALLBACK_CLICKED,
+                                        __create_tree_test_window);
+               ewl_callback_append(tree_win, EWL_CALLBACK_DELETE_WINDOW,
                            __destroy_tree_test_window, NULL);
+       } else
+               ewl_callback_append(tree_win, EWL_CALLBACK_DELETE_WINDOW,
+                                               __close_main_window, NULL);
        ewl_widget_show(tree_win);
 
        box = ewl_vbox_new();




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to