aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/launcher-menu-item.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index 60880ad..22ab88f 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -44,6 +44,7 @@ typedef struct _LauncherMenuItemPrivate LauncherMenuItemPrivate;
struct _LauncherMenuItemPrivate
{
GAppInfo * appinfo;
+ GKeyFile * keyfile;
gchar * desktop;
IndicatorDesktopShortcuts * ids;
GList * shortcuts;
@@ -93,6 +94,7 @@ launcher_menu_item_init (LauncherMenuItem *self)
priv->appinfo = NULL;
priv->desktop = NULL;
+ priv->keyfile = NULL;
priv->ids = NULL;
priv->shortcuts = NULL;
@@ -120,6 +122,11 @@ launcher_menu_item_dispose (GObject *object)
priv->appinfo = NULL;
}
+ if (priv->keyfile != NULL) {
+ g_object_unref(priv->keyfile);
+ priv->keyfile = NULL;
+ }
+
if (priv->ids != NULL) {
g_object_unref(priv->ids);
priv->ids = NULL;
@@ -160,6 +167,8 @@ launcher_menu_item_new (const gchar * desktop_file)
/* Parse the desktop file we've been given. */
priv->appinfo = G_APP_INFO(g_desktop_app_info_new_from_filename(desktop_file));
+ priv->keyfile = g_key_file_new();
+ g_key_file_load_from_file(priv->keyfile, desktop_file, G_KEY_FILE_NONE, NULL);
priv->desktop = g_strdup(desktop_file);
/* Set the appropriate values on this menu item based on the