diff options
author | Ted Gould <ted@canonical.com> | 2009-08-19 20:34:26 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-19 20:34:26 -0500 |
commit | 29ce275bdc22d99ab995e260dfcee9fe49e951e1 (patch) | |
tree | f5efcffc945e2e9569d654c9ba9100ebf7bd5ce7 /src/messages-service.c | |
parent | a32eba9041f5fb90083f5212bc58bb6d6a094912 (diff) | |
download | ayatana-indicator-messages-29ce275bdc22d99ab995e260dfcee9fe49e951e1.tar.gz ayatana-indicator-messages-29ce275bdc22d99ab995e260dfcee9fe49e951e1.tar.bz2 ayatana-indicator-messages-29ce275bdc22d99ab995e260dfcee9fe49e951e1.zip |
Lots of debug, but also cleaning up the desktop file name path so it gets properly into the constructor.
Diffstat (limited to 'src/messages-service.c')
-rw-r--r-- | src/messages-service.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index 6f62b1f..61e0ca9 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -21,6 +21,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> +#include <pango/pango-utils.h> #include <dbus/dbus-glib-bindings.h> #include <libindicate/listener.h> @@ -492,6 +493,7 @@ gboolean build_launcher (gpointer data) { gchar * path = (gchar *)data; + g_debug("\tpath: %s", path); gchar * desktop = NULL; g_file_get_contents(path, &desktop, NULL, NULL); @@ -501,11 +503,17 @@ build_launcher (gpointer data) return FALSE; } - launcherList_t * ll = g_new0(launcherList_t, 1); - ll->menuitem = launcher_menu_item_new(path); + gchar * trimdesktop = pango_trim_string(desktop); + g_debug("\tcontents: %s", trimdesktop); + launcherList_t * ll = g_new0(launcherList_t, 1); + ll->menuitem = launcher_menu_item_new(trimdesktop); launcherList = g_list_insert_sorted(launcherList, ll, launcherList_sort); + + g_free(trimdesktop); + g_free(desktop); + return FALSE; } @@ -526,6 +534,7 @@ build_launchers (gpointer data) const gchar * filename = NULL; while ((filename = g_dir_read_name(dir)) != NULL) { + g_debug("Found file: %s", filename); gchar * path = g_build_filename(SYSTEM_APPS_DIR, filename, NULL); g_idle_add(build_launcher, path); } |