[epiphany] ephy-web-app-utils: add the desktop file name to EphyWebApplication



commit f3a7c0fe44514d52f5a475e93470afea80390895
Author: Xan Lopez <xan igalia com>
Date:   Wed May 9 12:23:16 2012 +0200

    ephy-web-app-utils: add the desktop file name to EphyWebApplication
    
    It's quite cumbersome to re-construct from its name and URL, so just
    add it here. We'll use it to migrate the profile data.

 lib/ephy-web-app-utils.c |    3 +++
 lib/ephy-web-app-utils.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index 53bf687..8c5d653 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -399,6 +399,8 @@ ephy_web_application_get_application_list ()
 
       desktop_file = g_strconcat (name + prefix_length, ".desktop", NULL);
       desktop_file_path = g_build_filename (profile_dir, desktop_file, NULL);
+      app->desktop_file = g_strdup (desktop_file);
+
       if (g_file_get_contents (desktop_file_path, &contents, NULL, NULL)) {
         char *exec;
         char **strings;
@@ -458,6 +460,7 @@ ephy_web_application_free (EphyWebApplication *app)
   g_free (app->name);
   g_free (app->icon_url);
   g_free (app->url);
+  g_free (app->desktop_file);
   g_slice_free (EphyWebApplication, app);
 }
 
diff --git a/lib/ephy-web-app-utils.h b/lib/ephy-web-app-utils.h
index 80dde2b..54968df 100644
--- a/lib/ephy-web-app-utils.h
+++ b/lib/ephy-web-app-utils.h
@@ -33,6 +33,7 @@ typedef struct {
     char *name;
     char *icon_url;
     char *url;
+    char *desktop_file;
     char install_date[128];
 } EphyWebApplication;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]