aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-19 20:34:26 -0500
committerTed Gould <ted@canonical.com>2009-08-19 20:34:26 -0500
commit29ce275bdc22d99ab995e260dfcee9fe49e951e1 (patch)
treef5efcffc945e2e9569d654c9ba9100ebf7bd5ce7 /src
parenta32eba9041f5fb90083f5212bc58bb6d6a094912 (diff)
downloadayatana-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')
-rw-r--r--src/launcher-menu-item.c3
-rw-r--r--src/messages-service.c13
2 files changed, 14 insertions, 2 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index ce8fd5f..915c81c 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -112,11 +112,14 @@ LauncherMenuItem *
launcher_menu_item_new (const gchar * desktop_file)
{
LauncherMenuItem * self = g_object_new(LAUNCHER_MENU_ITEM_TYPE, NULL);
+ g_debug("\tDesktop file: %s", desktop_file);
LauncherMenuItemPrivate * priv = LAUNCHER_MENU_ITEM_GET_PRIVATE(self);
priv->appinfo = G_APP_INFO(g_desktop_app_info_new_from_filename(desktop_file));
+ g_debug("\tName: %s", launcher_menu_item_get_name(self));
+
return self;
}
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);
}