From bd758ee4fc423b9ca152a01f897609daa656c938 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Sat, 27 Aug 2011 17:15:31 +0000 Subject: Profile support! Please test and report bugs, as the config system is totally rewritten and may not be perfect. No more GConf (trying to implement profiles with this was UGLY), settings now (for most) live in JSON at $HOME/.config/transmission-remote-gtk/config.json. Hopefully windows support will be easier without GConf. --- src/util.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 1a98730..4bcfc1b 100644 --- a/src/util.c +++ b/src/util.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -86,46 +85,6 @@ void trg_error_dialog(GtkWindow * parent, int status, g_free((gpointer) msg); } -gint gconf_client_get_int_or_default(GConfClient * gconf, - const gchar * key, int deflt, - GError ** error) -{ - GConfValue *value = - gconf_client_get_without_default(gconf, key, error); - gint ret; - if (value) { - ret = gconf_value_get_int(value); - gconf_value_free(value); - } else { - ret = deflt; - } - return ret; -} - -gboolean g_slist_str_set_add(GSList ** list, const gchar * string) -{ - GSList *li; - for (li = *list; li; li = g_slist_next(li)) - if (!g_strcmp0((gchar *) li->data, string)) - return FALSE; - - *list = g_slist_insert_sorted(*list, g_strdup(string), (GCompareFunc)g_strcmp0); - return TRUE; -} - -gboolean gconf_client_get_bool_or_true(GConfClient * gconf, gchar * key) -{ - GConfValue *value = gconf_client_get_without_default(gconf, key, NULL); - gboolean ret = TRUE; - - if (value) { - ret = gconf_value_get_bool(value); - gconf_value_free(value); - } - - return ret; -} - const gchar *make_error_message(JsonObject * response, int status) { if (status == FAIL_JSON_DECODE) { -- cgit v1.2.3