summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-08-27 17:15:31 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-08-27 17:15:31 +0000
commitbd758ee4fc423b9ca152a01f897609daa656c938 (patch)
tree0378306b5b007f38f0c4f6c0d868215f70fd70d6 /src/util.c
parentb8a1599a2ab9eafd496ba23179dda97d6e83e917 (diff)
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.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c41
1 files changed, 0 insertions, 41 deletions
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 <math.h>
#include <string.h>
-#include <gconf/gconf-client.h>
#include <glib/gi18n.h>
#include <glib-object.h>
#include <curl/curl.h>
@@ -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) {