Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/test
Modified Files:
ewl_filedialog_test.c
Log Message:
API change on the file dialog. Attach a VALUE_CHANGED callback to the
filedialog to receive notification for the Open/Save and Cancel buttons. The
currently selected file is passed as the event data to the callback.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_filedialog_test.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_filedialog_test.c 2 Feb 2004 05:48:31 -0000 1.18
+++ ewl_filedialog_test.c 11 Feb 2004 18:17:32 -0000 1.19
@@ -76,8 +76,9 @@
if (!fd) {
Ewl_Widget *home_button;
- fd = ewl_filedialog_new(EWL_FILEDIALOG_TYPE_OPEN, __open_file,
- NULL);
+ fd = ewl_filedialog_new(EWL_FILEDIALOG_TYPE_OPEN);
+ ewl_callback_append(fd, EWL_CALLBACK_VALUE_CHANGED, __open_file,
+ NULL);
ewl_container_append_child(EWL_CONTAINER(vbox), fd);
@@ -89,19 +90,22 @@
}
ewl_widget_show(fd);
+ return;
+ w = NULL;
ev_data = NULL;
user_data = NULL;
}
-void __open_file (Ewl_Widget *row, void *ev_data, void *user_data)
+void __open_file (Ewl_Widget *fd, void *ev_data, void *user_data)
{
- Ewl_Fileselector *fs = user_data;
-
- printf("file open from test program: %s\n",
- ewl_fileselector_get_filename (EWL_FILESELECTOR (fs)));
+ char *file = ev_data;
- row = NULL;
- ev_data = NULL;
+ if (file) {
+ printf("file open from test program: %s\n", file);
+ }
+ ewl_widget_hide(fd);
+
+ return;
user_data = NULL;
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs