[gnome-session] gsm-autostart-app: get app id from g_app_info_get_id



commit 9f400f13c7563d5abca4f591d063fd436e4095af
Author: Ray Strode <rstrode redhat com>
Date:   Thu Mar 3 15:55:11 2016 -0500

    gsm-autostart-app: get app id from g_app_info_get_id
    
    Right now we're trying to munge the filename, which is
    silly since there's api to get the id.

 gnome-session/gsm-autostart-app.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c
index 9e086d7..4283cdc 100644
--- a/gnome-session/gsm-autostart-app.c
+++ b/gnome-session/gsm-autostart-app.c
@@ -1380,21 +1380,11 @@ gsm_autostart_app_get_autorestart (GsmApp *app)
 static const char *
 gsm_autostart_app_get_app_id (GsmApp *app)
 {
-        const char *location;
-        const char *slash;
-
         if (GSM_AUTOSTART_APP (app)->priv->app_info == NULL) {
                 return NULL;
         }
 
-        location = g_desktop_app_info_get_filename (GSM_AUTOSTART_APP (app)->priv->app_info);
-
-        slash = strrchr (location, '/');
-        if (slash != NULL) {
-                return slash + 1;
-        } else {
-                return location;
-        }
+        return g_app_info_get_id (G_APP_INFO (GSM_AUTOSTART_APP (app)->priv->app_info));
 }
 
 static gboolean


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