[monkey-bubble: 123/753] Return NULL if `ret_locations' is given.



commit 6cb2d336b2db3be87b30eefd3d6c4df3d1b8f88b
Author: Martin Baulig <baulig suse de>
Date:   Wed Apr 11 18:02:56 2001 +0000

    Return NULL if `ret_locations' is given.
    
    2001-04-11  Martin Baulig  <baulig suse de>
    
    	* gnome-program.c (gnome_program_locate_file): Return NULL if
    	`ret_locations' is given.

 libgnome/ChangeLog       |    3 +++
 libgnome/gnome-program.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgnome/ChangeLog b/libgnome/ChangeLog
index b2dd6de..fca5626 100644
--- a/libgnome/ChangeLog
+++ b/libgnome/ChangeLog
@@ -1,5 +1,8 @@
 2001-04-11  Martin Baulig  <baulig suse de>
 
+	* gnome-program.c (gnome_program_locate_file): Return NULL if
+	`ret_locations' is given.
+
 	* gnome-program.c (gnome_program_initv): Call libgnome_type_init ()
 	instead of g_type_init (), moved g_type_init () call into
 	libgnome_type_init ().
diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c
index ce4047f..559363e 100644
--- a/libgnome/gnome-program.c
+++ b/libgnome/gnome-program.c
@@ -782,7 +782,7 @@ gnome_program_locate_file (GnomeProgram *program, GnomeFileDomain domain,
 #define ADD_FILENAME(x) { \
 lastval = (x); \
 if(lastval) { if(ret_locations) *ret_locations = g_slist_append(*ret_locations, lastval); \
-if(!retval) retval = lastval; } \
+if(!retval && !ret_locations) retval = lastval; } \
 }
 
     switch (domain) {



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