aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-26 13:32:34 -0500
committerTed Gould <ted@canonical.com>2009-08-26 13:32:34 -0500
commit21caab3ed3cbb70ec0f2929dd69d9f348162e975 (patch)
tree9a4983cf1695a673af265c933541d1eb7b05e8d9
parentdfc4d6f1ac1e6c73fb7334a4192f176579fde0b8 (diff)
downloadayatana-indicator-messages-21caab3ed3cbb70ec0f2929dd69d9f348162e975.tar.gz
ayatana-indicator-messages-21caab3ed3cbb70ec0f2929dd69d9f348162e975.tar.bz2
ayatana-indicator-messages-21caab3ed3cbb70ec0f2929dd69d9f348162e975.zip
Adding a get_description function
-rw-r--r--src/launcher-menu-item.c10
-rw-r--r--src/launcher-menu-item.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index 6c79adb..6f005e9 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -185,6 +185,16 @@ launcher_menu_item_get_desktop (LauncherMenuItem * launchitem)
return priv->desktop;
}
+/* Gets the decription for the item that should
+ go in the messaging menu */
+const gchar *
+launcher_menu_item_get_description (LauncherMenuItem * li)
+{
+ g_return_val_if_fail(IS_LAUNCHER_MENU_ITEM(li), NULL);
+ LauncherMenuItemPrivate * priv = LAUNCHER_MENU_ITEM_GET_PRIVATE(li);
+ return g_app_info_get_description(priv->appinfo);
+}
+
/* Hides the menu item based on whether it is eclipsed
or not. */
void
diff --git a/src/launcher-menu-item.h b/src/launcher-menu-item.h
index 2b39073..9a46824 100644
--- a/src/launcher-menu-item.h
+++ b/src/launcher-menu-item.h
@@ -56,6 +56,7 @@ GType launcher_menu_item_get_type (void);
LauncherMenuItem * launcher_menu_item_new (const gchar * desktop_file);
const gchar * launcher_menu_item_get_name (LauncherMenuItem * appitem);
const gchar * launcher_menu_item_get_desktop (LauncherMenuItem * launchitem);
+const gchar * launcher_menu_item_get_description (LauncherMenuItem * li);
void launcher_menu_item_set_eclipsed (LauncherMenuItem * li, gboolean eclipsed);
G_END_DECLS