Imported Upstream version 1.1.2
[psensor-pkg-debian.git] / src / pxdg.c
index aa61e03..14c3021 100644 (file)
@@ -46,7 +46,7 @@ static char *get_user_desktop_file()
        char *dir, *path;
 
        dir = get_user_autostart_dir();
-       path = path_append(dir, "psensor.desktop");
+       path = path_append(dir, PSENSOR_DESKTOP_FILE);
 
        free(dir);
 
@@ -55,7 +55,7 @@ static char *get_user_desktop_file()
 
 static const char *get_desktop_file()
 {
-       return DATADIR"/applications/psensor.desktop";
+       return DATADIR"/applications/"PSENSOR_DESKTOP_FILE;
 }
 
 static int is_file_exists(const char *path)
@@ -77,14 +77,13 @@ static GKeyFile *get_key_file(const char *path)
                                        | G_KEY_FILE_KEEP_TRANSLATIONS,
                                        NULL);
 
-       if (ret) {
+       if (ret)
                return kfile;
-       } else {
-               log_err("Failed to parse: %s", path);
 
-               g_key_file_free(kfile);
-               return NULL;
-       }
+       log_err("Failed to parse: %s", path);
+
+       g_key_file_free(kfile);
+       return NULL;
 }
 
 static int is_user_desktop_autostarted(GKeyFile *f)