Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin


Modified Files:
        ewl_colordialog_test.c ewl_filedialog_multi_test.c 
        ewl_filedialog_test.c ewl_image_test.c ewl_media_test.c 


Log Message:
- make ewl_filedialog actually a dialog
- get rid of Ewl_Colordialog_Event and make a single Ewl_Dialog_Event that
  both colourdialog and filedialog return

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_colordialog_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_colordialog_test.c      2 Nov 2005 17:51:44 -0000       1.3
+++ ewl_colordialog_test.c      4 Dec 2005 16:56:29 -0000       1.4
@@ -5,12 +5,11 @@
 static void
 __colordialog_cb_value_changed(Ewl_Widget *w, void *ev, void *data __UNUSED__)
 {
-       Ewl_Colordialog_Event *cd_ev;
+       Ewl_Dialog_Event *cd_ev;
        unsigned int response;
   
        cd_ev = ev;
-       response = ewl_colordialog_event_response_get(cd_ev);
-       if (response == EWL_STOCK_OK)
+       if (cd_ev->response == EWL_STOCK_OK)
        {
                Ewl_Widget *o;
                unsigned int r, g, b, a;
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_filedialog_multi_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_filedialog_multi_test.c 21 Oct 2005 04:13:03 -0000      1.4
+++ ewl_filedialog_multi_test.c 4 Dec 2005 16:56:29 -0000       1.5
@@ -15,25 +15,19 @@
                void *ev_data __UNUSED__,
                void *user_data __UNUSED__)
 {
-       Ewl_Widget *fd = NULL, *win = NULL;
+       Ewl_Widget *fd = NULL;
 
-       win = ewl_window_new();
-       ewl_window_title_set(EWL_WINDOW (win), "File Dialog Multiselect Foo");
-       ewl_window_name_set(EWL_WINDOW (win), "EWL Test Application");
-       ewl_window_class_set(EWL_WINDOW (win), "EFL Test Application");
+       fd = ewl_filedialog_multiselect_new();
 
        if (w)
-               ewl_callback_append (win, EWL_CALLBACK_DELETE_WINDOW,
+               ewl_callback_append(fd, EWL_CALLBACK_DELETE_WINDOW,
                                __destroy_filedialog_multi_test_window, NULL);
        else
-               ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW,
+               ewl_callback_append(fd, EWL_CALLBACK_DELETE_WINDOW,
                                __close_main_window, NULL);
-       ewl_widget_show(win);
 
-       fd = ewl_filedialog_multiselect_new();
        ewl_callback_append (fd, EWL_CALLBACK_VALUE_CHANGED, 
-                       __create_fdm_window_response, NULL);
-       ewl_container_child_append(EWL_CONTAINER(win), fd);
+                               __create_fdm_window_response, NULL);
        ewl_widget_show(fd);
 }
 
@@ -41,9 +35,9 @@
 __create_fdm_window_response (Ewl_Widget *w __UNUSED__, void *ev, 
                                        void *data __UNUSED__)
 {
-       Ewl_Filedialog_Event *e;
+       Ewl_Dialog_Event *e;
 
-       e = EWL_FILEDIALOG_EVENT(ev);
+       e = ev;
        if (e->response == EWL_STOCK_OPEN)
        {
                Ecore_List *list;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_filedialog_test.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_filedialog_test.c       21 Oct 2005 04:13:03 -0000      1.6
+++ ewl_filedialog_test.c       4 Dec 2005 16:56:29 -0000       1.7
@@ -13,38 +13,32 @@
 __create_filedialog_test_window(Ewl_Widget *w, void *ev_data __UNUSED__,
                void *user_data __UNUSED__)
 {
-       Ewl_Widget *fd = NULL, *win = NULL;
-
-       win = ewl_window_new();
-       ewl_window_title_set (EWL_WINDOW (win), "File Dialog Foo");
-       ewl_window_name_set (EWL_WINDOW (win), "EWL Test Application");
-       ewl_window_class_set (EWL_WINDOW (win), "EFL Test Application");
+       Ewl_Widget *fd = NULL;
 
+       fd = ewl_filedialog_new();
        if (w)
-               ewl_callback_append (win, EWL_CALLBACK_DELETE_WINDOW,
+               ewl_callback_append(fd, EWL_CALLBACK_DELETE_WINDOW,
                                __destroy_filedialog_test_window, NULL);
        else
-               ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW,
+               ewl_callback_append(fd, EWL_CALLBACK_DELETE_WINDOW,
                                __close_main_window, NULL);
-       ewl_widget_show(win);
 
-       fd = ewl_filedialog_new();
        ewl_filedialog_type_set(EWL_FILEDIALOG(fd), EWL_FILEDIALOG_TYPE_OPEN);
-       ewl_callback_append (fd, EWL_CALLBACK_VALUE_CHANGED, 
-                       __create_fd_window_response, NULL);
-       ewl_container_child_append(EWL_CONTAINER(win), fd);
+       ewl_callback_append(fd, EWL_CALLBACK_VALUE_CHANGED, 
+                               __create_fd_window_response, NULL);
        ewl_widget_show(fd);
 }
 
 static void
 __create_fd_window_response (Ewl_Widget *w, void *ev, void *data __UNUSED__)
 {
-       Ewl_Filedialog_Event *e;
+       Ewl_Dialog_Event *e;
 
-       e = EWL_FILEDIALOG_EVENT(ev);
+       e = ev;
        if (e->response == EWL_STOCK_OPEN)
                printf("file open from test program: %s\n", 
-                               ewl_filedialog_file_get (EWL_FILEDIALOG (w)));
+                               ewl_filedialog_file_get(EWL_FILEDIALOG (w)));
+
        else if (e->response == EWL_STOCK_CANCEL)
                printf("Test program says bugger off.\n");
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_image_test.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_image_test.c    17 Nov 2005 23:32:15 -0000      1.8
+++ ewl_image_test.c    4 Dec 2005 16:56:29 -0000       1.9
@@ -276,10 +276,10 @@
 static void
 __create_image_fd_window_response (Ewl_Widget *w, void *ev, void *data)
 {
-       Ewl_Filedialog_Event *e;
+       Ewl_Dialog_Event *e;
        Ewl_Widget *entry = data;
   
-       e = EWL_FILEDIALOG_EVENT(ev);
+       e = ev;
 
        if (e->response == EWL_STOCK_OPEN) {
                char *path;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_media_test.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_media_test.c    2 Nov 2005 18:23:21 -0000       1.12
+++ ewl_media_test.c    4 Dec 2005 16:56:29 -0000       1.13
@@ -113,12 +113,12 @@
 static void
 open_file_cb(Ewl_Widget *w, void *event, void *data __UNUSED__)
 {
-       Ewl_Filedialog_Event *e;
+       Ewl_Dialog_Event *e;
        char *file = NULL;
 
        ewl_widget_hide(fd_win);
 
-       e = EWL_FILEDIALOG_EVENT(event);
+       e = event;
        if (e->response == EWL_STOCK_OPEN)
                file = ewl_filedialog_file_get(EWL_FILEDIALOG(w));
 




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