[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] Patch for filedialog and filedialog test



Here are two patches to clean up a warning on cancel and make the test program run properly.

-- 
Nick Hughart
Code poet, Linux user, and web developer all in one.
Index: ewl_filedialog.c
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/filedialog/ewl_filedialog.c,v
retrieving revision 1.1
diff -u -r1.1 ewl_filedialog.c
--- ewl_filedialog.c	17 Oct 2006 04:59:55 -0000	1.1
+++ ewl_filedialog.c	17 Nov 2006 06:43:27 -0000
@@ -107,7 +107,10 @@
 
 	/* nothing to do on a cancel */
 	if (e->response == EWL_STOCK_CANCEL)
+	{
+		ewl_widget_destroy(w);
 		return;
+	}
 
 	fd = EWL_FILEDIALOG(w);
 	if (ewl_filedialog_multiselect_get(fd))
Index: ewl_filelist.c
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist.c,v
retrieving revision 1.21
diff -u -r1.21 ewl_filelist.c
--- ewl_filelist.c	17 Nov 2006 06:13:35 -0000	1.21
+++ ewl_filelist.c	17 Nov 2006 06:40:29 -0000
@@ -199,7 +199,7 @@
 	/* clean out the old set of selected files */
 	if (fl->selected_unselect) fl->selected_unselect(fl);
 	ecore_list_clear(fl->selected);
-	if (fl->selected_file_add) fl->selected_file_add(fl, file);
+	if (fl->selected_file_add && file) fl->selected_file_add(fl, file);
 
 	ewl_filelist_selected_files_change_notify(fl);