[empathy] Disable timer if EMPATHY_PERSIST is set



commit 4834af14fe305ac39331b1619e3cc4c3121a6c16
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Jun 29 11:08:54 2010 +0200

    Disable timer if EMPATHY_PERSIST is set

 src/empathy-av.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-av.c b/src/empathy-av.c
index cb0e82b..9ef0fbf 100644
--- a/src/empathy-av.c
+++ b/src/empathy-av.c
@@ -43,6 +43,7 @@
 
 static guint nb_windows = 0;
 static guint timeout_id = 0;
+static gboolean use_timer = TRUE;
 
 static gboolean
 timeout_cb (gpointer data)
@@ -56,6 +57,9 @@ timeout_cb (gpointer data)
 static void
 start_timer (void)
 {
+  if (!use_timer)
+    return;
+
   if (timeout_id != 0)
     return;
 
@@ -166,6 +170,13 @@ main (int argc,
       return EXIT_FAILURE;
     }
 
+  if (g_getenv ("EMPATHY_PERSIST") != NULL)
+    {
+      DEBUG ("Disable timer");
+
+      use_timer = FALSE;
+    }
+
   start_timer ();
 
   gtk_main ();



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