gnome-session r5017 - in trunk: . gnome-session



Author: mccann
Date: Fri Aug 29 21:39:34 2008
New Revision: 5017
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5017&view=rev

Log:
2008-08-29  William Jon McCann  <jmccann redhat com>

	* gnome-session/main.c (find_desktop_file_for_app_name):
	Add some debugging.



Modified:
   trunk/ChangeLog
   trunk/gnome-session/main.c

Modified: trunk/gnome-session/main.c
==============================================================================
--- trunk/gnome-session/main.c	(original)
+++ trunk/gnome-session/main.c	Fri Aug 29 21:39:34 2008
@@ -169,6 +169,7 @@
         char    **app_dirs;
         GKeyFile *key_file;
         char     *desktop_file;
+        int       i;
 
         app_path = NULL;
 
@@ -177,6 +178,13 @@
         key_file = g_key_file_new ();
 
         desktop_file = g_strdup_printf ("%s.desktop", name);
+
+        g_debug ("main: Looking for file '%s'", desktop_file);
+
+        for (i = 0; app_dirs[i] != NULL; i++) {
+                g_debug ("main: Looking in '%s'", app_dirs[i]);
+        }
+
         g_key_file_load_from_dirs (key_file,
                                    desktop_file,
                                    (const char **) app_dirs,
@@ -184,6 +192,10 @@
                                    G_KEY_FILE_NONE,
                                    NULL);
 
+        if (app_path != NULL) {
+                g_debug ("main: found in XDG app dirs: '%s'", app_path);
+        }
+
         if (app_path == NULL && autostart_dirs != NULL) {
                 g_key_file_load_from_dirs (key_file,
                                            desktop_file,
@@ -191,6 +203,10 @@
                                            &app_path,
                                            G_KEY_FILE_NONE,
                                            NULL);
+                if (app_path != NULL) {
+                        g_debug ("main: found in autostart dirs: '%s'", app_path);
+                }
+
         }
 
         /* look for gnome vender prefix */
@@ -204,6 +220,9 @@
                                            &app_path,
                                            G_KEY_FILE_NONE,
                                            NULL);
+                if (app_path != NULL) {
+                        g_debug ("main: found in XDG app dirs: '%s'", app_path);
+                }
         }
 
         if (app_path == NULL && autostart_dirs != NULL) {
@@ -213,6 +232,9 @@
                                            &app_path,
                                            G_KEY_FILE_NONE,
                                            NULL);
+                if (app_path != NULL) {
+                        g_debug ("main: found in autostart dirs: '%s'", app_path);
+                }
         }
 
         g_free (desktop_file);



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