Enlightenment CVS committal Author : werkt Project : misc Module : ewler
Dir : misc/ewler/src Modified Files: callback_editor.c ewler.c form.c main.c project.c Log Message: Updates to filedialog code for saving/opening forms. =================================================================== RCS file: /cvsroot/enlightenment/misc/ewler/src/callback_editor.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- callback_editor.c 30 Aug 2004 18:37:32 -0000 1.4 +++ callback_editor.c 2 Sep 2004 02:10:25 -0000 1.5 @@ -291,10 +291,10 @@ if( w ) ewl_widget_enable( EWL_WIDGET(ce) ); - if( ce->target != w ) + if( ce->target != w ) { + ce->target = w; ewler_callback_editor_update( ce ); - - ce->target = w; + } } static void =================================================================== RCS file: /cvsroot/enlightenment/misc/ewler/src/ewler.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewler.c 25 Aug 2004 01:41:38 -0000 1.9 +++ ewler.c 2 Sep 2004 02:10:25 -0000 1.10 @@ -64,6 +64,10 @@ Ewl_Widget *window, *dialog; window = ewl_window_new(); + ewl_window_title_set( EWL_WINDOW(window), "Open Form" ); + ewl_window_name_set( EWL_WINDOW(window), "Open Form" ); + ewl_window_class_set( EWL_WINDOW(window), "Open Form" ); + ewl_object_size_request( EWL_OBJECT(window), 500, 450 ); ewl_widget_show( window ); dialog = ewl_filedialog_new( EWL_FILEDIALOG_TYPE_OPEN ); =================================================================== RCS file: /cvsroot/enlightenment/misc/ewler/src/form.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- form.c 30 Aug 2004 18:23:33 -0000 1.17 +++ form.c 2 Sep 2004 02:10:25 -0000 1.18 @@ -320,11 +320,11 @@ ewl_container_child_append(EWL_CONTAINER(form->popup), menu_item); ewl_widget_show(menu_item); +#if 0 menu_item = ewl_menu_item_new(NULL, "Edit Callbacks"); ewl_container_child_append(EWL_CONTAINER(form->popup), menu_item); ewl_callback_append( menu_item, EWL_CALLBACK_SELECT, __destroy_popup, form ); -#if 0 ewl_callback_append( menu_item, EWL_CALLBACK_SELECT, callbacks_show, NULL ); #endif @@ -472,10 +472,14 @@ __save_form_cb( Ewl_Widget *w, void *ev_data, void *user_data ) { FILE *fptr; - char *filename = ev_data; + char *filename; Ewler_Form *form = user_data; char *title; + filename = ewl_filedialog_file_get( EWL_FILEDIALOG(w) ); + + printf( "%s\n", filename ); + if( filename ) { if( (fptr = fopen( filename, "w" )) ) { fclose( fptr ); @@ -510,14 +514,18 @@ Ewl_Widget *window, *dialog; window = ewl_window_new(); + ewl_window_title_set( EWL_WINDOW(window), "Save Form" ); + ewl_window_name_set( EWL_WINDOW(window), "Save Form" ); + ewl_window_class_set( EWL_WINDOW(window), "Save Form" ); + ewl_object_size_request( EWL_OBJECT(window), 500, 450 ); ewl_widget_show( window ); dialog = ewl_filedialog_new( EWL_FILEDIALOG_TYPE_SAVE ); - + ewl_container_child_append( EWL_CONTAINER(window), dialog ); if( (path = project_get_path()) ) ewl_filedialog_path_set( EWL_FILEDIALOG(dialog), path ); - ewl_container_child_append( EWL_CONTAINER(window), dialog ); + ewl_object_size_request (EWL_OBJECT (dialog), 500, 450); ewl_callback_append( dialog, EWL_CALLBACK_VALUE_CHANGED, __save_form_cb, form ); ewl_callback_append( window, EWL_CALLBACK_DELETE_WINDOW, =================================================================== RCS file: /cvsroot/enlightenment/misc/ewler/src/main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- main.c 25 Aug 2004 01:41:38 -0000 1.6 +++ main.c 2 Sep 2004 02:10:25 -0000 1.7 @@ -4,6 +4,7 @@ #include "form.h" #include "widgets.h" #include "inspector.h" +#include "callback.h" #include "project.h" static Ewl_Widget *main_win; @@ -43,6 +44,7 @@ ewler_tools_init( main_layout ); ewler_forms_init(); ewler_inspector_init(); + ewler_callbacks_init(); ewler_projects_init(); =================================================================== RCS file: /cvsroot/enlightenment/misc/ewler/src/project.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- project.c 30 Aug 2004 18:23:33 -0000 1.7 +++ project.c 2 Sep 2004 02:10:25 -0000 1.8 @@ -572,7 +572,7 @@ return; } - __destroy_dialog( w, NULL, w->parent ); + __destroy_dialog( w, NULL, user_data ); project_setup( filename ); project_parse( fptr ); @@ -585,20 +585,22 @@ static void __project_setup_open_cb( Ewl_Widget *w, void *ev_data, void *user_data ) { - Ewl_Widget *dialog, *window; + Ewl_Widget *window, *dialog; if( !project_close() ) { window = ewl_window_new(); - ewl_window_title_set( EWL_WINDOW(window), "Open New Project" ); - ewl_object_minimum_size_set( EWL_OBJECT(window), 400, 600 ); + ewl_window_title_set( EWL_WINDOW(window), "Open Project" ); + ewl_window_name_set( EWL_WINDOW(window), "Open Project" ); + ewl_window_class_set( EWL_WINDOW(window), "Open Project" ); + ewl_object_size_request( EWL_OBJECT(window), 500, 450 ); ewl_widget_show( window ); dialog = ewl_filedialog_new( EWL_FILEDIALOG_TYPE_OPEN ); - ewl_container_child_append( EWL_CONTAINER(window), dialog ); + ewl_callback_append( dialog, EWL_CALLBACK_VALUE_CHANGED, - __project_open_cb, NULL ); - ewl_callback_append( dialog, EWL_CALLBACK_DELETE_WINDOW, + __project_open_cb, window ); + ewl_callback_append( window, EWL_CALLBACK_DELETE_WINDOW, __destroy_dialog, window ); ewl_widget_show( dialog ); } else { ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs