summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-07-07 05:34:43 -0300
committerdequis <dx@dxzone.com.ar>2017-07-07 05:34:43 -0300
commit5352f5822f0d12655b1120f76ec712713aa02079 (patch)
tree139489c14597a9878f7bd9f71f458c7de2e74691
parent3394edce3f757e329310e0161a9972f36d9f4bff (diff)
downloadbitlbee-facebook-5352f5822f0d12655b1120f76ec712713aa02079.tar.gz
Add "tweak" hidden setting, does nothing for now.
-rw-r--r--facebook/facebook-api.c18
-rw-r--r--facebook/facebook-data.c9
-rw-r--r--facebook/facebook.c3
3 files changed, 30 insertions, 0 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c
index b318c62..0ff315f 100644
--- a/facebook/facebook-api.c
+++ b/facebook/facebook-api.c
@@ -38,6 +38,7 @@ enum
PROP_STOKEN,
PROP_TOKEN,
PROP_UID,
+ PROP_TWEAK,
PROP_N
};
@@ -62,6 +63,7 @@ struct _FbApiPrivate
guint unread;
FbId lastmid;
gchar *contacts_delta;
+ int tweak;
};
struct _FbApiData
@@ -116,6 +118,9 @@ fb_api_set_property(GObject *obj, guint prop, const GValue *val,
case PROP_UID:
priv->uid = g_value_get_int64(val);
break;
+ case PROP_TWEAK:
+ priv->tweak = g_value_get_int(val);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop, pspec);
@@ -147,6 +152,9 @@ fb_api_get_property(GObject *obj, guint prop, GValue *val, GParamSpec *pspec)
case PROP_UID:
g_value_set_int64(val, priv->uid);
break;
+ case PROP_TWEAK:
+ g_value_set_int(val, priv->tweak);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop, pspec);
@@ -268,6 +276,16 @@ fb_api_class_init(FbApiClass *klass)
"User identifier",
0, G_MAXINT64, 0,
G_PARAM_READWRITE);
+
+ /**
+ * FbApi:tweak:
+ */
+ props[PROP_TWEAK] = g_param_spec_int(
+ "tweak",
+ "Tweak",
+ "",
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE);
g_object_class_install_properties(gklass, PROP_N, props);
/**
diff --git a/facebook/facebook-data.c b/facebook/facebook-data.c
index f7f7000..99cd5e5 100644
--- a/facebook/facebook-data.c
+++ b/facebook/facebook-data.c
@@ -117,6 +117,7 @@ fb_data_load(FbData *fata)
guint i;
guint64 uint;
GValue val = G_VALUE_INIT;
+ int num;
g_return_val_if_fail(FB_IS_DATA(fata), FALSE);
priv = fata->priv;
@@ -160,6 +161,14 @@ fb_data_load(FbData *fata)
ret = FALSE;
}
+ num = set_getint(&acct->set, "tweak");
+ if (num != 0) {
+ g_value_init(&val, G_TYPE_INT);
+ g_value_set_int(&val, num);
+ g_object_set_property(G_OBJECT(priv->api), "tweak", &val);
+ g_value_unset(&val);
+ }
+
fb_api_rehash(priv->api);
return ret;
}
diff --git a/facebook/facebook.c b/facebook/facebook.c
index 995ad59..526ccfe 100644
--- a/facebook/facebook.c
+++ b/facebook/facebook.c
@@ -735,6 +735,9 @@ fb_init(account_t *acct)
s = set_add(&acct->set, "uid", NULL, NULL, acct);
s->flags = SET_NULL_OK | SET_HIDDEN;
+ s = set_add(&acct->set, "tweak", NULL, NULL, acct);
+ s->flags = SET_NULL_OK | SET_HIDDEN;
+
set_add(&acct->set, "group_chat_open", "false", fb_eval_open, acct);
set_add(&acct->set, "mark_read", "false", fb_eval_mark_read, acct);
set_add(&acct->set, "mark_read_reply", "false", set_eval_bool, acct);