/soc/2013/ankitkv/gobjectification: de491fc3f726: Merged soc.201...
Ankit Vani
a at nevitus.org
Sun Nov 17 09:54:22 EST 2013
Changeset: de491fc3f7261441f4ba1f7e52ed7888dcba320a
Author: Ankit Vani <a at nevitus.org>
Date: 2013-11-17 20:23 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/de491fc3f726
Description:
Merged soc.2013.gobjectification branch
diffstat:
libpurple/account.c | 26 +++++--
libpurple/blistnode.c | 11 ++-
libpurple/blistnodetypes.c | 47 +++++++++----
libpurple/circularbuffer.c | 32 ++++++++-
libpurple/connection.c | 15 ++-
libpurple/conversation.c | 22 ++++-
libpurple/conversationtypes.c | 45 ++++++++++---
libpurple/presence.c | 23 ++++--
libpurple/protocols/jabber/jingle/content.c | 9 ++-
libpurple/request-datasheet.c | 2 +-
libpurple/roomlist.c | 9 +-
libpurple/status.c | 14 ++-
libpurple/whiteboard.c | 10 +-
libpurple/xfer.c | 94 +++++++++++++++++-----------
pidgin/gtkrequest.c | 5 +-
15 files changed, 243 insertions(+), 121 deletions(-)
diffs (truncated from 1353 to 300 lines):
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -797,6 +797,7 @@ purple_account_set_private_alias(PurpleA
char *old = priv->alias;
priv->alias = g_strdup(alias);
+ g_object_notify(G_OBJECT(account), "private-alias");
purple_signal_emit(purple_accounts_get_handle(), "account-alias-changed",
account, old);
g_free(old);
@@ -851,6 +852,8 @@ purple_account_set_protocol_id(PurpleAcc
g_free(priv->protocol_id);
priv->protocol_id = g_strdup(protocol_id);
+ g_object_notify(G_OBJECT(account), "protocol-id");
+
purple_accounts_schedule_save();
}
@@ -863,6 +866,8 @@ purple_account_set_connection(PurpleAcco
priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
priv->gc = gc;
+
+ g_object_notify(G_OBJECT(account), "connection");
}
void
@@ -911,6 +916,8 @@ purple_account_set_enabled(PurpleAccount
else if(!was_enabled && value)
purple_signal_emit(purple_accounts_get_handle(), "account-enabled", account);
+ g_object_notify(G_OBJECT(account), "enabled");
+
if ((gc != NULL) && (_purple_connection_wants_to_die(gc)))
wants_to_die = TRUE;
@@ -3024,55 +3031,56 @@ purple_account_class_init(PurpleAccountC
g_object_class_install_property(obj_class, PROP_USERNAME,
g_param_spec_string("username", "Username",
"The username for the account.", NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_PRIVATE_ALIAS,
g_param_spec_string("private-alias", "Private Alias",
"The private alias for the account.", NULL,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_USER_INFO,
g_param_spec_string("user-info", "User information",
"Detailed user information for the account.", NULL,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_BUDDY_ICON_PATH,
g_param_spec_string("buddy-icon-path", "Buddy icon path",
"Path to the buddyicon for the account.", NULL,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_ENABLED,
g_param_spec_boolean("enabled", "Enabled",
"Whether the account is enabled or not.", FALSE,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_REMEMBER_PASSWORD,
g_param_spec_boolean("remember-password", "Remember password",
"Whether to remember and store the password for this account.", FALSE,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_CHECK_MAIL,
g_param_spec_boolean("check-mail", "Check mail",
"Whether to check mails for this account.", FALSE,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_CONNECTION,
g_param_spec_object("connection", "Connection",
"The connection for the account.", PURPLE_TYPE_CONNECTION,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, PROP_PROTOCOL_ID,
g_param_spec_string("protocol-id", "Protocol ID",
"ID of the protocol that is responsible for the account.", NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS)
);
g_type_class_add_private(klass, sizeof(PurpleAccountPrivate));
diff --git a/libpurple/blistnode.c b/libpurple/blistnode.c
--- a/libpurple/blistnode.c
+++ b/libpurple/blistnode.c
@@ -410,7 +410,7 @@ purple_blist_node_class_init(PurpleBlist
g_object_class_install_property(obj_class, BLNODE_PROP_TRANSIENT,
g_param_spec_boolean("transient", "Transient",
"Whether node should not be saved with the buddy list.",
- FALSE, G_PARAM_READWRITE)
+ FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_type_class_add_private(klass, sizeof(PurpleBlistNodePrivate));
@@ -605,19 +605,22 @@ purple_counting_node_class_init(PurpleCo
g_object_class_install_property(obj_class, CNODE_PROP_TOTAL_SIZE,
g_param_spec_int("total-size", "Total size",
"The number of children under this node.",
- G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
+ G_MININT, G_MAXINT, 0, G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, CNODE_PROP_CURRENT_SIZE,
g_param_spec_int("current-size", "Current size",
"The number of children with online accounts.",
- G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
+ G_MININT, G_MAXINT, 0, G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, CNODE_PROP_ONLINE_COUNT,
g_param_spec_int("online-count", "Online count",
"The number of children that are online.",
- G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
+ G_MININT, G_MAXINT, 0, G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS)
);
g_type_class_add_private(klass, sizeof(PurpleCountingNodePrivate));
diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -154,6 +154,8 @@ purple_buddy_set_icon(PurpleBuddy *buddy
{
purple_buddy_icon_unref(priv->icon);
priv->icon = (icon != NULL ? purple_buddy_icon_ref(icon) : NULL);
+
+ g_object_notify(G_OBJECT(buddy), "icon");
}
purple_signal_emit(purple_blist_get_handle(), "buddy-icon-changed", buddy);
@@ -195,14 +197,14 @@ purple_buddy_set_name(PurpleBuddy *buddy
g_free(priv->name);
priv->name = purple_utf8_strip_unprintables(name);
+ g_object_notify(G_OBJECT(buddy), "name");
+
if (ops) {
if (ops->save_node)
ops->save_node(PURPLE_BLIST_NODE(buddy));
if (ops->update)
ops->update(purple_blist_get_buddy_list(), PURPLE_BLIST_NODE(buddy));
}
-
- g_object_notify(G_OBJECT(buddy), "name");
}
const char *
@@ -324,6 +326,8 @@ purple_buddy_set_local_alias(PurpleBuddy
g_free(new_alias); /* could be "\0" */
}
+ g_object_notify(G_OBJECT(buddy), "local-alias");
+
if (ops && ops->save_node)
ops->save_node(PURPLE_BLIST_NODE(buddy));
@@ -377,6 +381,8 @@ purple_buddy_set_server_alias(PurpleBudd
g_free(new_alias); /* could be "\0"; */
}
+ g_object_notify(G_OBJECT(buddy), "server-alias");
+
if (ops) {
if (ops->save_node)
ops->save_node(PURPLE_BLIST_NODE(buddy));
@@ -678,44 +684,45 @@ static void purple_buddy_class_init(Purp
g_object_class_install_property(obj_class, BUDDY_PROP_NAME,
g_param_spec_string("name", "Name",
"The name of the buddy.", NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, BUDDY_PROP_LOCAL_ALIAS,
g_param_spec_string("local-alias", "Local alias",
"Local alias of thee buddy.", NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, BUDDY_PROP_SERVER_ALIAS,
g_param_spec_string("server-alias", "Server alias",
"Server-side alias of the buddy.", NULL,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, BUDDY_PROP_ICON,
g_param_spec_pointer("icon", "Buddy icon",
"The icon for the buddy.",
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, BUDDY_PROP_ACCOUNT,
g_param_spec_object("account", "Account",
"The account for the buddy.", PURPLE_TYPE_ACCOUNT,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, BUDDY_PROP_PRESENCE,
g_param_spec_object("presence", "Presence",
"The status information for the buddy.", PURPLE_TYPE_PRESENCE,
- G_PARAM_READABLE)
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, BUDDY_PROP_MEDIA_CAPS,
g_param_spec_enum("media-caps", "Media capabilities",
"The media capabilities of the buddy.",
PURPLE_MEDIA_TYPE_CAPS, PURPLE_MEDIA_CAPS_NONE,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_type_class_add_private(klass, sizeof(PurpleBuddyPrivate));
@@ -809,6 +816,8 @@ purple_contact_compute_priority_buddy(Pu
priv->priority_buddy = new_priority;
priv->priority_valid = TRUE;
+
+ g_object_notify(G_OBJECT(contact), "priority-buddy");
}
PurpleGroup *
@@ -848,6 +857,8 @@ purple_contact_set_alias(PurpleContact *
g_free(new_alias); /* could be "\0" */
}
+ g_object_notify(G_OBJECT(contact), "alias");
+
if (ops) {
if (ops->save_node)
ops->save_node(PURPLE_BLIST_NODE(contact));
@@ -1039,13 +1050,13 @@ static void purple_contact_class_init(Pu
g_object_class_install_property(obj_class, CONTACT_PROP_ALIAS,
g_param_spec_string("alias", "Alias",
"The alias for the contact.", NULL,
- G_PARAM_READWRITE)
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, CONTACT_PROP_PRIORITY_BUDDY,
g_param_spec_object("priority-buddy",
"Priority buddy", "The priority buddy of the contact.",
- PURPLE_TYPE_BUDDY, G_PARAM_READABLE)
+ PURPLE_TYPE_BUDDY, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
);
g_type_class_add_private(klass, sizeof(PurpleContactPrivate));
@@ -1149,6 +1160,8 @@ purple_chat_set_alias(PurpleChat *chat,
g_free(new_alias); /* could be "\0" */
}
+ g_object_notify(G_OBJECT(chat), "alias");
+
if (ops) {
if (ops->save_node)
ops->save_node(PURPLE_BLIST_NODE(chat));
@@ -1293,19 +1306,21 @@ static void purple_chat_class_init(Purpl
g_object_class_install_property(obj_class, CHAT_PROP_ALIAS,
g_param_spec_string("alias", "Alias",
"The alias for the chat.", NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)
);
g_object_class_install_property(obj_class, CHAT_PROP_ACCOUNT,
g_param_spec_object("account", "Account",
"The account that the chat belongs to.", PURPLE_TYPE_ACCOUNT,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS)
);
More information about the Commits
mailing list