Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

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


Modified Files:
        ewl_callback_test.c 


Log Message:
- tabs are a tricky beast. looks like I missed some.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/callback/ewl_callback_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_callback_test.c 6 May 2008 20:09:02 -0000       1.5
+++ ewl_callback_test.c 7 May 2008 13:38:14 -0000       1.6
@@ -53,39 +53,39 @@
 static void delete_callback(Ewl_Widget *w, void *event, void *data);
 
 static Ewl_Unit_Test callback_unit_tests[] = {
-               {"append/get id", append_test_id, NULL, -1, 0},
-               {"prepend/get id", prepend_test_id, NULL, -1, 0},
-               {"insert after/get id", insert_after_test_id, NULL, -1, 0},
-               {"shared id", shared_test_id, NULL, -1, 0},
-               {"unique id", unique_test_id, NULL, -1, 0},
-               {"del/call", del_test_call, NULL, -1, 0},
-               {"del_id/call", del_id_test_call, NULL, -1, 0},
-               {"del_data/call", del_data_test_call, NULL, -1, 0},
-               {"del_type/call", del_type_test_call, NULL, -1, 0},
-               {"del from empty", del_empty_test_call, NULL, -1, 0},
-               {"clear/call", clear_test_call, NULL, -1, 0},
-               {"append/call", append_test_call, NULL, -1, 0},
-               {"prepend/call", prepend_test_call, NULL, -1, 0},
-               {"parent notify", notify_test_call, NULL, -1, 0},
-               {"parent intercept", intercept_test_call, NULL, -1, 0},
-               {"append during call", append_in_chain_test_call, NULL, -1, 0},
-               {"prepend during call", prepend_in_chain_test_call, NULL, -1, 
0},
-               {"insert after during call", insert_after_in_chain_test_call, 
NULL, -1, 0},
-               {"insert before during call", insert_before_in_chain_test_call, 
NULL, -1, 0},
-               {"delete after during call", delete_after_in_chain_test_call, 
NULL, -1, 0},
-               {"delete before during call", delete_before_in_chain_test_call, 
NULL, -1, 0},
-               {"delete nothing during call", 
delete_nothing_in_chain_test_call, NULL, -1, 0},
-               {"create custom callback", custom_callback_test_add, NULL, -1, 
0},
-               {"unique custom callback", custom_callback_test_unique, NULL, 
-1, 0},
-               {"append custom callback", custom_callback_test_append, NULL, 
-1, 0},
-               {"prepend custom callback", custom_callback_test_prepend, NULL, 
-1, 0},
-               {"insert after custom callback", 
custom_callback_test_insert_after, NULL, -1, 0},
-               {"delete single custom callback", 
custom_callback_test_del_single, NULL, -1, 0},
-               {"delete custom callback of multiple", 
custom_callback_test_del_multiple, NULL, -1, 0},
-               {"delete custom callback type", 
custom_callback_test_del_type_single, NULL, -1, 0},
-               {"delete custom callback type of multiple", 
custom_callback_test_del_type_multiple, NULL, -1, 0},
-               {"clear with custom callback", custom_callback_test_clear, 
NULL, -1, 0},
-               {NULL, NULL, NULL, -1, 0}
+                {"append/get id", append_test_id, NULL, -1, 0},
+                {"prepend/get id", prepend_test_id, NULL, -1, 0},
+                {"insert after/get id", insert_after_test_id, NULL, -1, 0},
+                {"shared id", shared_test_id, NULL, -1, 0},
+                {"unique id", unique_test_id, NULL, -1, 0},
+                {"del/call", del_test_call, NULL, -1, 0},
+                {"del_id/call", del_id_test_call, NULL, -1, 0},
+                {"del_data/call", del_data_test_call, NULL, -1, 0},
+                {"del_type/call", del_type_test_call, NULL, -1, 0},
+                {"del from empty", del_empty_test_call, NULL, -1, 0},
+                {"clear/call", clear_test_call, NULL, -1, 0},
+                {"append/call", append_test_call, NULL, -1, 0},
+                {"prepend/call", prepend_test_call, NULL, -1, 0},
+                {"parent notify", notify_test_call, NULL, -1, 0},
+                {"parent intercept", intercept_test_call, NULL, -1, 0},
+                {"append during call", append_in_chain_test_call, NULL, -1, 0},
+                {"prepend during call", prepend_in_chain_test_call, NULL, -1, 
0},
+                {"insert after during call", insert_after_in_chain_test_call, 
NULL, -1, 0},
+                {"insert before during call", 
insert_before_in_chain_test_call, NULL, -1, 0},
+                {"delete after during call", delete_after_in_chain_test_call, 
NULL, -1, 0},
+                {"delete before during call", 
delete_before_in_chain_test_call, NULL, -1, 0},
+                {"delete nothing during call", 
delete_nothing_in_chain_test_call, NULL, -1, 0},
+                {"create custom callback", custom_callback_test_add, NULL, -1, 
0},
+                {"unique custom callback", custom_callback_test_unique, NULL, 
-1, 0},
+                {"append custom callback", custom_callback_test_append, NULL, 
-1, 0},
+                {"prepend custom callback", custom_callback_test_prepend, 
NULL, -1, 0},
+                {"insert after custom callback", 
custom_callback_test_insert_after, NULL, -1, 0},
+                {"delete single custom callback", 
custom_callback_test_del_single, NULL, -1, 0},
+                {"delete custom callback of multiple", 
custom_callback_test_del_multiple, NULL, -1, 0},
+                {"delete custom callback type", 
custom_callback_test_del_type_single, NULL, -1, 0},
+                {"delete custom callback type of multiple", 
custom_callback_test_del_type_multiple, NULL, -1, 0},
+                {"clear with custom callback", custom_callback_test_clear, 
NULL, -1, 0},
+                {NULL, NULL, NULL, -1, 0}
         };
 
 static unsigned int CALLBACK_CUSTOM_TYPE = 0;
@@ -113,12 +113,12 @@
 
         w = ewl_widget_new();
         id = ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
 
         if (id)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "invalid callback id returned");
+                LOG_FAILURE(buf, len, "invalid callback id returned");
 
         ewl_widget_destroy(w);
 
@@ -137,12 +137,12 @@
 
         w = ewl_widget_new();
         id = ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
 
         if (id)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "invalid callback id returned");
+                LOG_FAILURE(buf, len, "invalid callback id returned");
 
         ewl_widget_destroy(w);
 
@@ -161,14 +161,14 @@
 
         w = ewl_widget_new();
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
         id = ewl_callback_insert_after(w, EWL_CALLBACK_CONFIGURE, 
base_callback,
-                       w, base_callback, NULL);
+                        w, base_callback, NULL);
 
         if (id)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "invalid callback id returned");
+                LOG_FAILURE(buf, len, "invalid callback id returned");
 
         ewl_widget_destroy(w);
 
@@ -187,14 +187,14 @@
 
         w = ewl_widget_new();
         id = ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
         id2 = ewl_callback_append(w, EWL_CALLBACK_REALIZE, base_callback,
-                       NULL);
+                        NULL);
 
         if (id == id2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback id's don't match");
+                LOG_FAILURE(buf, len, "callback id's don't match");
 
         ewl_widget_destroy(w);
 
@@ -214,21 +214,21 @@
 
         w = ewl_widget_new();
         id = ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
         id2 = ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       w);
+                        w);
 
         if (id != id2) {
-               id = ewl_callback_append(w, EWL_CALLBACK_CONFIGURE,
-                               differing_callback, w);
-               if (id != id2)
-                       ret = 1;
-               else
-                       LOG_FAILURE(buf, len, "callback with different 
functions"
-                                      " id's match");
+                id = ewl_callback_append(w, EWL_CALLBACK_CONFIGURE,
+                                differing_callback, w);
+                if (id != id2)
+                        ret = 1;
+                else
+                        LOG_FAILURE(buf, len, "callback with different 
functions"
+                                       " id's match");
         }
         else
-               LOG_FAILURE(buf, len, "callback with different data id's 
match");
+                LOG_FAILURE(buf, len, "callback with different data id's 
match");
 
         ewl_widget_destroy(w);
 
@@ -250,9 +250,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) != 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "del failed to remove callback");
+                LOG_FAILURE(buf, len, "del failed to remove callback");
 
         ewl_widget_destroy(w);
 
@@ -271,14 +271,14 @@
 
         w = ewl_widget_new();
         id = ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
         ewl_callback_del_cb_id(w, EWL_CALLBACK_CONFIGURE, id);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) != 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "del failed to remove callback");
+                LOG_FAILURE(buf, len, "del failed to remove callback");
 
         ewl_widget_destroy(w);
 
@@ -301,22 +301,22 @@
 
         if ((long)ewl_widget_data_get(w, w) != 1) {
 
-               /*
-                * Check that the data actually matches.
-                */
-               ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                               w);
-               ewl_callback_del_with_data(w, EWL_CALLBACK_CONFIGURE,
-                               base_callback, NULL);
-               ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
-
-               if ((long)ewl_widget_data_get(w, w) == 1)
-                       ret = 1;
-               else
-                       LOG_FAILURE(buf, len, "del_data removed callback");
+                /*
+                 * Check that the data actually matches.
+                 */
+                ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
+                                w);
+                ewl_callback_del_with_data(w, EWL_CALLBACK_CONFIGURE,
+                                base_callback, NULL);
+                ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
+
+                if ((long)ewl_widget_data_get(w, w) == 1)
+                        ret = 1;
+                else
+                        LOG_FAILURE(buf, len, "del_data removed callback");
         }
         else
-               LOG_FAILURE(buf, len, "del_data failed to remove callback");
+                LOG_FAILURE(buf, len, "del_data failed to remove callback");
 
         ewl_widget_destroy(w);
 
@@ -339,9 +339,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) != 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "del_type failed to remove callback");
+                LOG_FAILURE(buf, len, "del_type failed to remove callback");
 
         ewl_widget_destroy(w);
 
@@ -388,9 +388,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) != 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "clear failed to remove callback");
+                LOG_FAILURE(buf, len, "clear failed to remove callback");
 
         ewl_widget_destroy(w);
 
@@ -412,9 +412,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -436,9 +436,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -458,7 +458,7 @@
         parent = ewl_cell_new();
         ewl_callback_del_type(parent, EWL_CALLBACK_CONFIGURE);
         ewl_container_callback_notify(EWL_CONTAINER(parent),
-                       EWL_CALLBACK_CONFIGURE);
+                        EWL_CALLBACK_CONFIGURE);
 
         w = ewl_widget_new();
         ewl_container_child_append(EWL_CONTAINER(parent), w);
@@ -467,23 +467,23 @@
          * Add parent callback
          */
         ewl_callback_prepend(parent, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
 
         /*
          * Add child callbacks.
          */
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(parent, parent) == 1)
-               if ((long)ewl_widget_data_get(w, w) == 2)
-                       ret = 1;
-               else
-                       LOG_FAILURE(buf, len, "callback function not called");
+                if ((long)ewl_widget_data_get(w, w) == 2)
+                        ret = 1;
+                else
+                        LOG_FAILURE(buf, len, "callback function not called");
         else
-               LOG_FAILURE(buf, len, "notify function not called");
+                LOG_FAILURE(buf, len, "notify function not called");
 
         ewl_widget_destroy(w);
         ewl_widget_destroy(parent);
@@ -504,7 +504,7 @@
         parent = ewl_cell_new();
         ewl_callback_del_type(parent, EWL_CALLBACK_CONFIGURE);
         ewl_container_callback_intercept(EWL_CONTAINER(parent),
-                       EWL_CALLBACK_CONFIGURE);
+                        EWL_CALLBACK_CONFIGURE);
 
         w = ewl_widget_new();
         ewl_container_child_append(EWL_CONTAINER(parent), w);
@@ -513,24 +513,24 @@
          * Add parent callback
          */
         ewl_callback_prepend(parent, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
 
         /*
          * Add child callbacks.
          */
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(parent, parent) == 1) {
-               if ((long)ewl_widget_data_get(w, w) == 2)
-                       LOG_FAILURE(buf, len, "callback function called");
-               else
-                       ret = 1;
+                if ((long)ewl_widget_data_get(w, w) == 2)
+                        LOG_FAILURE(buf, len, "callback function called");
+                else
+                        ret = 1;
         }
         else
-               LOG_FAILURE(buf, len, "intercept function not called");
+                LOG_FAILURE(buf, len, "intercept function not called");
 
         ewl_widget_destroy(w);
         ewl_widget_destroy(parent);
@@ -554,9 +554,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -579,9 +579,9 @@
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) != 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function called");
+                LOG_FAILURE(buf, len, "callback function called");
 
         ewl_widget_destroy(w);
 
@@ -601,15 +601,15 @@
         w = ewl_widget_new();
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, insert_after_callback,
-                       NULL);
+                        NULL);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -629,15 +629,15 @@
         w = ewl_widget_new();
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, insert_before_callback,
-                       NULL);
+                        NULL);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function called");
+                LOG_FAILURE(buf, len, "callback function called");
 
         ewl_widget_destroy(w);
 
@@ -657,17 +657,17 @@
         w = ewl_widget_new();
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, delete_callback,
-                       NULL);
+                        NULL);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -687,17 +687,17 @@
         w = ewl_widget_new();
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL);
+                        NULL);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, delete_callback,
-                       NULL);
+                        NULL);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function called");
+                LOG_FAILURE(buf, len, "callback function called");
 
         ewl_widget_destroy(w);
 
@@ -717,15 +717,15 @@
         w = ewl_widget_new();
         ewl_callback_del_type(w, EWL_CALLBACK_CONFIGURE);
         ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, delete_callback,
-                       NULL);
+                        NULL);
         ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, differing_callback,
-                       NULL);
+                        NULL);
         ewl_callback_call(w, EWL_CALLBACK_CONFIGURE);
 
         if ((long)ewl_widget_data_get(w, w) == 2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -742,9 +742,9 @@
 
         CALLBACK_CUSTOM_TYPE = ewl_callback_type_add();
         if (CALLBACK_CUSTOM_TYPE > EWL_CALLBACK_MAX)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback type registration failed");
+                LOG_FAILURE(buf, len, "callback type registration failed");
 
         return ret;
 }
@@ -759,9 +759,9 @@
 
         CALLBACK_CUSTOM_TYPE2 = ewl_callback_type_add();
         if (CALLBACK_CUSTOM_TYPE != CALLBACK_CUSTOM_TYPE2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback type not unique");
+                LOG_FAILURE(buf, len, "callback type not unique");
 
         return ret;
 }
@@ -780,9 +780,9 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -803,9 +803,9 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 1)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -824,13 +824,13 @@
         w = ewl_widget_new();
         ewl_callback_prepend(w, CALLBACK_CUSTOM_TYPE, base_callback, NULL);
         ewl_callback_insert_after(w, CALLBACK_CUSTOM_TYPE, differing_callback,
-                       NULL, base_callback, NULL);
+                        NULL, base_callback, NULL);
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 2)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -852,9 +852,9 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 0)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function called");
+                LOG_FAILURE(buf, len, "callback function called");
 
         ewl_widget_destroy(w);
 
@@ -878,18 +878,18 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 2) {
-               ewl_callback_append(w, CALLBACK_CUSTOM_TYPE, base_callback,
-                               NULL);
-               ewl_callback_del(w, CALLBACK_CUSTOM_TYPE, differing_callback);
-               ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
-
-               if ((long)ewl_widget_data_get(w, w) == 1)
-                       ret = 1;
-               else
-                       LOG_FAILURE(buf, len, "first callback function called");
+                ewl_callback_append(w, CALLBACK_CUSTOM_TYPE, base_callback,
+                                NULL);
+                ewl_callback_del(w, CALLBACK_CUSTOM_TYPE, differing_callback);
+                ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
+
+                if ((long)ewl_widget_data_get(w, w) == 1)
+                        ret = 1;
+                else
+                        LOG_FAILURE(buf, len, "first callback function 
called");
         }
         else
-               LOG_FAILURE(buf, len, "second callback function called");
+                LOG_FAILURE(buf, len, "second callback function called");
 
         ewl_widget_destroy(w);
 
@@ -911,9 +911,9 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 0)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function called");
+                LOG_FAILURE(buf, len, "callback function called");
 
         ewl_widget_destroy(w);
 
@@ -937,14 +937,14 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE2);
 
         if ((long)ewl_widget_data_get(w, w) == 2) {
-               ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
-               if ((long)ewl_widget_data_get(w, w) == 2)
-                       ret = 1;
-               else
-                       LOG_FAILURE(buf, len, "callback function called");
+                ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
+                if ((long)ewl_widget_data_get(w, w) == 2)
+                        ret = 1;
+                else
+                        LOG_FAILURE(buf, len, "callback function called");
         }
         else
-               LOG_FAILURE(buf, len, "callback function not called");
+                LOG_FAILURE(buf, len, "callback function not called");
 
         ewl_widget_destroy(w);
 
@@ -966,9 +966,9 @@
         ewl_callback_call(w, CALLBACK_CUSTOM_TYPE);
 
         if ((long)ewl_widget_data_get(w, w) == 0)
-               ret = 1;
+                ret = 1;
         else
-               LOG_FAILURE(buf, len, "callback function called");
+                LOG_FAILURE(buf, len, "callback function called");
 
         ewl_widget_destroy(w);
 
@@ -1013,7 +1013,7 @@
 insert_after_callback(Ewl_Widget *w, void *event, void *data)
 {
         ewl_callback_insert_after(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL, insert_after_callback, NULL);
+                        NULL, insert_after_callback, NULL);
 
         event = data = NULL;
         return;
@@ -1023,7 +1023,7 @@
 insert_before_callback(Ewl_Widget *w, void *event, void *data)
 {
         ewl_callback_insert_after(w, EWL_CALLBACK_CONFIGURE, base_callback,
-                       NULL, differing_callback, NULL);
+                        NULL, differing_callback, NULL);
 
         event = data = NULL;
         return;



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to