Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fun.git;a=commitdiff;h=44d4f7a045932c0db73d9bcf6af14f756f27c77c

commit 44d4f7a045932c0db73d9bcf6af14f756f27c77c
Author: Priyank <[EMAIL PROTECTED]>
Date:   Sat Nov 3 12:21:36 2007 +0530

fun now reads update_interval value from .funrc
* connection retry timeout is now hardcoded to 30 seconds
* update_interval field in .funrc specifies the update check interval in minutes
* default is 60 minutes

diff --git a/src/fun-ui.c b/src/fun-ui.c
index 1125ba0..94fca42 100644
--- a/src/fun-ui.c
+++ b/src/fun-ui.c
@@ -21,6 +21,7 @@
*/

#include <gtk/gtk.h>
+#include "fun-config.h"
#include "fun-tooltip.h"
#include "fun-dbus.h"
#include "sexy-tooltip.h"
@@ -230,7 +231,7 @@ void
fun_ui_init (void)
{
GError          *error = NULL;
-       guint           seconds = 15;
+       gulong          seconds = 0;

fun_systray_create ();
if (fun_dbus_perform_service (TEST_SERVICE, NULL) == FALSE)
@@ -238,9 +239,11 @@ fun_ui_init (void)
g_print ("Failed to connect to the fun daemon\n");
connected = FALSE;
/* start the connection retry timeout */
-               g_timeout_add_seconds (seconds, (GSourceFunc)fun_timeout_conn, 
NULL);
+               g_timeout_add_seconds (30, (GSourceFunc)fun_timeout_conn, NULL);
return;
}
+       seconds = fun_config_get_value_int ("update_interval") * 60;
+       g_print ("%d\n", seconds);

connected = TRUE;

diff --git a/src/fun.c b/src/fun.c
index b996a36..7078500 100644
--- a/src/fun.c
+++ b/src/fun.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <glib.h>
#include <gtk/gtk.h>
+#include "fun-config.h"

int
main (int argc, char **argv)
@@ -29,6 +30,7 @@ main (int argc, char **argv)

if (fun_dbus_init() == FALSE)
return 1;
+       fun_config_init ();
fun_ui_init ();

gtk_main ();
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to