/soc/2013/ankitkv/gobjectification: 7b6f1efa00c8: Merged soc.201...
Ankit Vani
a at nevitus.org
Tue Oct 8 11:02:19 EDT 2013
Changeset: 7b6f1efa00c8f4c257d9454f891a8c29936d66a3
Author: Ankit Vani <a at nevitus.org>
Date: 2013-10-08 20:31 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/7b6f1efa00c8
Description:
Merged soc.2013.gobjectification branch
diffstat:
ChangeLog.API | 7 ++-
libpurple/blistnode.c | 8 +-
libpurple/protocols/bonjour/bonjour.c | 4 +-
libpurple/protocols/gg/status.c | 12 ++--
libpurple/protocols/irc/irc.c | 2 +-
libpurple/protocols/jabber/jabber.c | 82 ++++++++++++++++----------------
libpurple/protocols/msn/msn.c | 22 ++++----
libpurple/protocols/mxit/roster.c | 4 +-
libpurple/protocols/myspace/myspace.c | 6 +-
libpurple/protocols/novell/novell.c | 6 +-
libpurple/protocols/null/nullprotocol.c | 6 +-
libpurple/protocols/oscar/oscar.c | 30 ++++++------
libpurple/protocols/sametime/sametime.c | 6 +-
libpurple/protocols/simple/simple.c | 2 +-
libpurple/protocols/yahoo/ymsg.c | 6 +-
libpurple/protocols/zephyr/zephyr.c | 2 +-
libpurple/status.c | 8 +-
libpurple/util.c | 6 +-
libpurple/util.h | 6 +-
19 files changed, 114 insertions(+), 111 deletions(-)
diffs (truncated from 747 to 300 lines):
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -316,6 +316,11 @@ version 3.0.0 (??/??/????):
* purple_util_fetch_url_len now takes a length as the fifth parameter
* PurpleWhiteboard is now a GObject. Please see the documentation for
details.
+ * purple_value_destroy is now purple_value_free
+ * purple_value_new, purple_value_dup and purple_value_free now operate
+ on GValue instead of PurpleValue
+ * Signal registration now uses GTypes instead of PurpleValues. See
+ SIGNAL-HOWTO for more information.
* purple_whiteboard_create renamed to purple_whiteboard_new
* purple_xfer_get_bytes_remaining now returns a goffset
* purple_xfer_get_bytes_sent now returns a goffset
@@ -341,8 +346,6 @@ version 3.0.0 (??/??/????):
time_t to represent times
* purple_certificate_get_times now uses gint64 instead of
time_t to represent times
- * Signal registration now uses GTypes instead of PurpleValues. See
- SIGNAL-HOWTO for more information.
* xmlnode renamed to PurpleXmlNode
* XMLNodeType renamed to PurpleXmlNodeType
* xmlnode_* functions are now purple_xmlnode_*
diff --git a/libpurple/blistnode.c b/libpurple/blistnode.c
--- a/libpurple/blistnode.c
+++ b/libpurple/blistnode.c
@@ -208,7 +208,7 @@ purple_blist_node_set_bool(PurpleBlistNo
g_return_if_fail(priv->settings != NULL);
g_return_if_fail(key != NULL);
- value = purple_g_value_new(G_TYPE_BOOLEAN);
+ value = purple_value_new(G_TYPE_BOOLEAN);
g_value_set_boolean(value, data);
g_hash_table_replace(priv->settings, g_strdup(key), value);
@@ -249,7 +249,7 @@ purple_blist_node_set_int(PurpleBlistNod
g_return_if_fail(priv->settings != NULL);
g_return_if_fail(key != NULL);
- value = purple_g_value_new(G_TYPE_INT);
+ value = purple_value_new(G_TYPE_INT);
g_value_set_int(value, data);
g_hash_table_replace(priv->settings, g_strdup(key), value);
@@ -290,7 +290,7 @@ purple_blist_node_set_string(PurpleBlist
g_return_if_fail(priv->settings != NULL);
g_return_if_fail(key != NULL);
- value = purple_g_value_new(G_TYPE_STRING);
+ value = purple_value_new(G_TYPE_STRING);
g_value_set_string(value, data);
g_hash_table_replace(priv->settings, g_strdup(key), value);
@@ -380,7 +380,7 @@ purple_blist_node_init(GTypeInstance *in
PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(instance);
priv->settings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
- (GDestroyNotify)purple_g_value_free);
+ (GDestroyNotify)purple_value_free);
}
/* GObject finalize function */
diff --git a/libpurple/protocols/bonjour/bonjour.c b/libpurple/protocols/bonjour/bonjour.c
--- a/libpurple/protocols/bonjour/bonjour.c
+++ b/libpurple/protocols/bonjour/bonjour.c
@@ -292,14 +292,14 @@ bonjour_status_types(PurpleAccount *acco
BONJOUR_STATUS_ID_AVAILABLE,
NULL, TRUE, TRUE, FALSE,
"message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL);
+ purple_value_new(G_TYPE_STRING), NULL);
status_types = g_list_append(status_types, type);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_AWAY,
BONJOUR_STATUS_ID_AWAY,
NULL, TRUE, TRUE, FALSE,
"message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL);
+ purple_value_new(G_TYPE_STRING), NULL);
status_types = g_list_append(status_types, type);
type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE,
diff --git a/libpurple/protocols/gg/status.c b/libpurple/protocols/gg/status.c
--- a/libpurple/protocols/gg/status.c
+++ b/libpurple/protocols/gg/status.c
@@ -90,32 +90,32 @@ GList * ggp_status_types(PurpleAccount *
types = g_list_append(types, purple_status_type_new_with_attrs(
PURPLE_STATUS_AVAILABLE, NULL, NULL,
TRUE, TRUE, FALSE, "message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL));
+ purple_value_new(G_TYPE_STRING), NULL));
types = g_list_append(types, purple_status_type_new_with_attrs(
PURPLE_STATUS_AVAILABLE, "freeforchat", _("Chatty"),
TRUE, TRUE, FALSE, "message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL));
+ purple_value_new(G_TYPE_STRING), NULL));
types = g_list_append(types, purple_status_type_new_with_attrs(
PURPLE_STATUS_AWAY, NULL, NULL,
TRUE, TRUE, FALSE, "message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL));
+ purple_value_new(G_TYPE_STRING), NULL));
types = g_list_append(types, purple_status_type_new_with_attrs(
PURPLE_STATUS_UNAVAILABLE, NULL, NULL,
TRUE, TRUE, FALSE, "message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL));
+ purple_value_new(G_TYPE_STRING), NULL));
types = g_list_append(types, purple_status_type_new_with_attrs(
PURPLE_STATUS_INVISIBLE, NULL, NULL,
TRUE, TRUE, FALSE, "message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL));
+ purple_value_new(G_TYPE_STRING), NULL));
types = g_list_append(types, purple_status_type_new_with_attrs(
PURPLE_STATUS_OFFLINE, NULL, NULL,
TRUE, TRUE, FALSE, "message", _("Message"),
- purple_g_value_new(G_TYPE_STRING), NULL));
+ purple_value_new(G_TYPE_STRING), NULL));
return types;
}
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c
--- a/libpurple/protocols/irc/irc.c
+++ b/libpurple/protocols/irc/irc.c
@@ -276,7 +276,7 @@ static GList *irc_status_types(PurpleAcc
type = purple_status_type_new_with_attrs(
PURPLE_STATUS_AWAY, NULL, NULL, TRUE, TRUE, FALSE,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
NULL);
types = g_list_append(types, type);
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -2364,18 +2364,18 @@ GList *jabber_status_types(PurpleAccount
GValue *priority_value;
GValue *buzz_enabled;
- priority_value = purple_g_value_new(G_TYPE_INT);
+ priority_value = purple_value_new(G_TYPE_INT);
g_value_set_int(priority_value, 1);
- buzz_enabled = purple_g_value_new(G_TYPE_BOOLEAN);
+ buzz_enabled = purple_value_new(G_TYPE_BOOLEAN);
g_value_set_boolean(buzz_enabled, TRUE);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_ONLINE),
NULL, TRUE, TRUE, FALSE,
"priority", _("Priority"), priority_value,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
- "mood", _("Mood"), purple_g_value_new(G_TYPE_STRING),
- "moodtext", _("Mood Text"), purple_g_value_new(G_TYPE_STRING),
- "nick", _("Nickname"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
+ "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
+ "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
+ "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
"buzz", _("Allow Buzz"), buzz_enabled,
NULL);
types = g_list_prepend(types, type);
@@ -2383,69 +2383,69 @@ GList *jabber_status_types(PurpleAccount
type = purple_status_type_new_with_attrs(PURPLE_STATUS_MOOD,
"mood", NULL, TRUE, TRUE, TRUE,
- PURPLE_MOOD_NAME, _("Mood Name"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_MOOD_COMMENT, _("Mood Comment"), purple_g_value_new(G_TYPE_STRING),
+ PURPLE_MOOD_NAME, _("Mood Name"), purple_value_new(G_TYPE_STRING),
+ PURPLE_MOOD_COMMENT, _("Mood Comment"), purple_value_new(G_TYPE_STRING),
NULL);
types = g_list_prepend(types, type);
- priority_value = purple_g_value_new(G_TYPE_INT);
+ priority_value = purple_value_new(G_TYPE_INT);
g_value_set_int(priority_value, 1);
- buzz_enabled = purple_g_value_new(G_TYPE_BOOLEAN);
+ buzz_enabled = purple_value_new(G_TYPE_BOOLEAN);
g_value_set_boolean(buzz_enabled, TRUE);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_CHAT),
_("Chatty"), TRUE, TRUE, FALSE,
"priority", _("Priority"), priority_value,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
- "mood", _("Mood"), purple_g_value_new(G_TYPE_STRING),
- "moodtext", _("Mood Text"), purple_g_value_new(G_TYPE_STRING),
- "nick", _("Nickname"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
+ "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
+ "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
+ "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
"buzz", _("Allow Buzz"), buzz_enabled,
NULL);
types = g_list_prepend(types, type);
- priority_value = purple_g_value_new(G_TYPE_INT);
+ priority_value = purple_value_new(G_TYPE_INT);
g_value_set_int(priority_value, 0);
- buzz_enabled = purple_g_value_new(G_TYPE_BOOLEAN);
+ buzz_enabled = purple_value_new(G_TYPE_BOOLEAN);
g_value_set_boolean(buzz_enabled, TRUE);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_AWAY,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_AWAY),
NULL, TRUE, TRUE, FALSE,
"priority", _("Priority"), priority_value,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
- "mood", _("Mood"), purple_g_value_new(G_TYPE_STRING),
- "moodtext", _("Mood Text"), purple_g_value_new(G_TYPE_STRING),
- "nick", _("Nickname"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
+ "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
+ "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
+ "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
"buzz", _("Allow Buzz"), buzz_enabled,
NULL);
types = g_list_prepend(types, type);
- priority_value = purple_g_value_new(G_TYPE_INT);
+ priority_value = purple_value_new(G_TYPE_INT);
g_value_set_int(priority_value, 0);
- buzz_enabled = purple_g_value_new(G_TYPE_BOOLEAN);
+ buzz_enabled = purple_value_new(G_TYPE_BOOLEAN);
g_value_set_boolean(buzz_enabled, TRUE);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_EXTENDED_AWAY,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_XA),
NULL, TRUE, TRUE, FALSE,
"priority", _("Priority"), priority_value,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
- "mood", _("Mood"), purple_g_value_new(G_TYPE_STRING),
- "moodtext", _("Mood Text"), purple_g_value_new(G_TYPE_STRING),
- "nick", _("Nickname"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
+ "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
+ "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
+ "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
"buzz", _("Allow Buzz"), buzz_enabled,
NULL);
types = g_list_prepend(types, type);
- priority_value = purple_g_value_new(G_TYPE_INT);
+ priority_value = purple_value_new(G_TYPE_INT);
g_value_set_int(priority_value, 0);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_UNAVAILABLE,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_DND),
_("Do Not Disturb"), TRUE, TRUE, FALSE,
"priority", _("Priority"), priority_value,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
- "mood", _("Mood"), purple_g_value_new(G_TYPE_STRING),
- "moodtext", _("Mood Text"), purple_g_value_new(G_TYPE_STRING),
- "nick", _("Nickname"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
+ "mood", _("Mood"), purple_value_new(G_TYPE_STRING),
+ "moodtext", _("Mood Text"), purple_value_new(G_TYPE_STRING),
+ "nick", _("Nickname"), purple_value_new(G_TYPE_STRING),
NULL);
types = g_list_prepend(types, type);
@@ -2457,21 +2457,21 @@ GList *jabber_status_types(PurpleAccount
type = purple_status_type_new_with_attrs(PURPLE_STATUS_OFFLINE,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_UNAVAILABLE),
NULL, TRUE, TRUE, FALSE,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
+ "message", _("Message"), purple_value_new(G_TYPE_STRING),
NULL);
types = g_list_prepend(types, type);
type = purple_status_type_new_with_attrs(PURPLE_STATUS_TUNE,
"tune", NULL, FALSE, TRUE, TRUE,
- PURPLE_TUNE_ARTIST, _("Tune Artist"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_TUNE_TITLE, _("Tune Title"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_TUNE_ALBUM, _("Tune Album"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_TUNE_GENRE, _("Tune Genre"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_TUNE_COMMENT, _("Tune Comment"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_TUNE_TRACK, _("Tune Track"), purple_g_value_new(G_TYPE_STRING),
- PURPLE_TUNE_TIME, _("Tune Time"), purple_g_value_new(G_TYPE_INT),
- PURPLE_TUNE_YEAR, _("Tune Year"), purple_g_value_new(G_TYPE_INT),
- PURPLE_TUNE_URL, _("Tune URL"), purple_g_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_ARTIST, _("Tune Artist"), purple_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_TITLE, _("Tune Title"), purple_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_ALBUM, _("Tune Album"), purple_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_GENRE, _("Tune Genre"), purple_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_COMMENT, _("Tune Comment"), purple_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_TRACK, _("Tune Track"), purple_value_new(G_TYPE_STRING),
+ PURPLE_TUNE_TIME, _("Tune Time"), purple_value_new(G_TYPE_INT),
+ PURPLE_TUNE_YEAR, _("Tune Year"), purple_value_new(G_TYPE_INT),
+ PURPLE_TUNE_URL, _("Tune URL"), purple_value_new(G_TYPE_STRING),
NULL);
types = g_list_prepend(types, type);
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -1157,35 +1157,35 @@ msn_status_types(PurpleAccount *account)
status = purple_status_type_new_with_attrs(
PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE, TRUE, FALSE,
- "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
More information about the Commits
mailing list