]> git.armaanb.net Git - chorizo.git/commitdiff
Move reading _FIFO_SUFFIX to the right place
authorPeter Hofmann <scm@uninformativ.de>
Thu, 19 Jun 2014 08:38:32 +0000 (10:38 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Thu, 19 Jun 2014 08:38:32 +0000 (10:38 +0200)
browser.c

index 4bd69ee53db743cb1bcced28268196bf04eccfe2..b003f339bdf6c69840feb6512122c3542aec0a90 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -77,6 +77,7 @@ static int cooperative_pipe_fp = 0;
 static gchar *download_dir = "/tmp";
 static gint downloads_indicated = 0;
 static Window embed = 0;
+static gchar *fifo_suffix = "main";
 static gchar *first_uri = NULL;
 static gdouble global_zoom = 1.0;
 static GHashTable *keywords = NULL;
@@ -329,14 +330,9 @@ void
 cooperation_setup(void)
 {
        GIOChannel *towatch;
-       const gchar *e;
        gchar *fifofilename, *fifopath;
 
-       e = g_getenv(__NAME_UPPERCASE__"_FIFO_SUFFIX");
-       if (e != NULL)
-               fifofilename = g_strdup_printf("%s-%s", __NAME__".fifo", e);
-       else
-               fifofilename = g_strdup(__NAME__".fifo");
+       fifofilename = g_strdup_printf("%s-%s", __NAME__".fifo", fifo_suffix);
        fifopath = g_build_filename(g_get_user_runtime_dir(), fifofilename, NULL);
        g_free(fifofilename);
 
@@ -581,6 +577,10 @@ grab_environment_configuration(void)
        if (e != NULL)
                download_dir = g_strdup(e);
 
+       e = g_getenv(__NAME_UPPERCASE__"_FIFO_SUFFIX");
+       if (e != NULL)
+               fifo_suffix = g_strdup(e);
+
        e = g_getenv(__NAME_UPPERCASE__"_ZOOM");
        if (e != NULL)
                global_zoom = atof(e);