[gnome-initial-setup] Change the key file for welcome tour



commit 29f3e2b4578f8dafd5752e5c3570907b385a1324
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 3 08:37:05 2012 -0400

    Change the key file for welcome tour
    
    It turns out gnome-session only looks in XDG_CONFIG_HOME for
    such files. So put it there.

 data/gnome-welcome-tour                            |    4 ++--
 data/gnome-welcome-tour.desktop.in.in              |    2 +-
 .../pages/summary/gis-summary-page.c               |    9 +++++++--
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/data/gnome-welcome-tour b/data/gnome-welcome-tour
index aaaf2e7..59151f9 100755
--- a/data/gnome-welcome-tour
+++ b/data/gnome-welcome-tour
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 
-rm -f /tmp/run-welcome-tour
+rm -f ${XDG_CONFIG_DIR:-$HOME/.config}/run-welcome-tour
 epiphany --private-instance http://www.gnome3.org
diff --git a/data/gnome-welcome-tour.desktop.in.in b/data/gnome-welcome-tour.desktop.in.in
index 436c919..b6972de 100644
--- a/data/gnome-welcome-tour.desktop.in.in
+++ b/data/gnome-welcome-tour.desktop.in.in
@@ -2,5 +2,5 @@
 Type=Application
 Name=Welcome
 Exec= LIBEXECDIR@/gnome-welcome-tour
-AutostartCondition=if-exists /tmp/run-welcome-tour
+AutostartCondition=if-exists run-welcome-tour
 OnlyShowIn=GNOME;
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index 1d06e2d..8b1191a 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -113,6 +113,7 @@ copy_files_to_tmpfs (SummaryData *data)
 #define FILE(d, x)                                                      \
   copy_file_to_tmpfs (dest, g_get_user_##d##_dir (), x, user);          \
 
+  FILE (config, "run-welcome-tour");
   FILE (config, "dconf/user");
   FILE (config, "goa-1.0/accounts.conf");
   FILE (data, "keyrings/Default.keyring");
@@ -247,8 +248,12 @@ byebye_cb (GtkButton *button, SummaryData *data)
 static void
 tour_cb (GtkButton *button, SummaryData *data)
 {
-  /* the tour is triggered by /tmp/run-welcome-tour */
-  g_file_set_contents ("/tmp/run-welcome-tour", "yes", -1, NULL);
+  gchar *file;
+
+  /* the tour is triggered by $XDG_CONFIG_HOME/run-welcome-tour */
+  file = g_build_filename (g_get_user_config_dir (), "run-welcome-tour", NULL);
+  g_file_set_contents (file, "yes", -1, NULL);
+  g_free (file);
   byebye (data);
 }
 



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