summaryrefslogtreecommitdiff
path: root/src/trg-client.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-11 00:17:23 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-11 00:17:23 +0000
commit279d52a0c841cc101210aef8affc6b061c2ef6db (patch)
tree89352997a45cd142af77fbcecc1a69b93248f780 /src/trg-client.c
parentdba8e3c7dd7322dab486063c85487f1f79ee5db6 (diff)
for gconf integers, fallback to our own defaults
Diffstat (limited to 'src/trg-client.c')
-rw-r--r--src/trg-client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/trg-client.c b/src/trg-client.c
index 2353669..2ed8ffa 100644
--- a/src/trg-client.c
+++ b/src/trg-client.c
@@ -31,6 +31,7 @@
#include "trg-client.h"
#include "trg-preferences.h"
+#include "util.h"
gboolean trg_client_supports_tracker_edit(trg_client * tc)
{
@@ -78,7 +79,7 @@ int trg_client_populate_with_settings(trg_client * tc, GConfClient * gconf)
g_free(tc->password);
tc->password = NULL;
- port = gconf_client_get_int(gconf, TRG_GCONF_KEY_PORT, &error);
+ port = gconf_client_get_int_or_default(gconf, TRG_GCONF_KEY_PORT, TRG_PORT_DEFAULT, &error);
check_for_error(error);
host = gconf_client_get_string(gconf, TRG_GCONF_KEY_HOSTNAME, &error);
@@ -95,10 +96,10 @@ int trg_client_populate_with_settings(trg_client * tc, GConfClient * gconf)
g_free(host);
tc->interval =
- gconf_client_get_int(gconf, TRG_GCONF_KEY_UPDATE_INTERVAL, &error);
+ gconf_client_get_int_or_default(gconf, TRG_GCONF_KEY_UPDATE_INTERVAL, TRG_INTERVAL_DEFAULT, &error);
check_for_error(error);
if (tc->interval < 1)
- tc->interval = 3;
+ tc->interval = TRG_INTERVAL_DEFAULT;
tc->username =
gconf_client_get_string(gconf, TRG_GCONF_KEY_USERNAME, &error);