aboutsummaryrefslogtreecommitdiff
path: root/src/trayfreq.c
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2014-02-13 19:32:49 +1300
committerDavid <dbphillipsnz@gmail.com>2014-02-13 19:32:49 +1300
commitf01a21b103f655652aa58dcbd2ffbae1413e01df (patch)
treeae2db9898000576b922333395907afcc8c9dc495 /src/trayfreq.c
parent68f5774cb6a8a8a31f6f530b99fdcb7f1c5695fa (diff)
downloadparamano-f01a21b103f655652aa58dcbd2ffbae1413e01df.tar.xz
Updated readme
Diffstat (limited to 'src/trayfreq.c')
-rw-r--r--src/trayfreq.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/trayfreq.c b/src/trayfreq.c
index 4db2444..2b65af5 100644
--- a/src/trayfreq.c
+++ b/src/trayfreq.c
@@ -34,27 +34,25 @@ static gboolean SHOW_BATTERY = TRUE;
void config_init()
{
- struct config_file config;
- gboolean home_config_exists = TRUE;
- config.key_file = NULL;
-
- gchar* home = getenv("HOME");
- config.file_name = g_strconcat(home, "/.trayfreq.config", NULL);
- FILE* fd = fopen(config.file_name, "r");
- if(!fd)
- {
- g_free(config.file_name);
- home_config_exists = FALSE;
- }
- else
- {
- fclose(fd);
+ struct config_file config;
+ gboolean home_config_exists = TRUE;
+ config.key_file = NULL;
+
+ gchar* home = getenv("HOME");
+ config.file_name = g_strconcat(home, "/.trayfreq.config", NULL);
+ FILE* fd = fopen(config.file_name, "r");
+ if(!fd)
+ {
+ g_free(config.file_name);
+ home_config_exists = FALSE;
+ } else {
+ fclose(fd);
}
- if(!home_config_exists)
- config.file_name = g_strconcat(util_get_prefix(), "/share/trayfreq/trayfreq.config", NULL);
+ if(!home_config_exists)
+ config.file_name = g_strconcat(util_get_prefix(), "/share/trayfreq/trayfreq.config", NULL);
- gboolean success = config_open(&config);
+ gboolean success = config_open(&config);
if(!success)
{