aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-06 10:43:55 -0500
committerTed Gould <ted@gould.cx>2011-04-06 10:43:55 -0500
commit7d26151bcb7009e853168af2e601b62522228976 (patch)
tree3f57559c22f5d363d24c26c797a9e6b258af731a
parent34ffc06debd8561c60fa43b9a12f08fe598745a5 (diff)
downloadayatana-indicator-messages-7d26151bcb7009e853168af2e601b62522228976.tar.gz
ayatana-indicator-messages-7d26151bcb7009e853168af2e601b62522228976.tar.bz2
ayatana-indicator-messages-7d26151bcb7009e853168af2e601b62522228976.zip
Making it so that we store the keyfile as well. Sad we need to do this.
-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