/soc/2013/ankitkv/gobjectification: 4806ff428ecd: Merged soc.201...

Ankit Vani a at nevitus.org
Sat Nov 23 16:15:02 EST 2013


Changeset: 4806ff428ecd5e490be062c86c126df50838dc04
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-11-24 02:44 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/4806ff428ecd

Description:

Merged soc.2013.gobjectification branch

diffstat:

 ChangeLog                                      |    6 +-
 libpurple/Makefile.mingw                       |    2 +
 libpurple/account.c                            |  109 +++++++-------
 libpurple/blistnode.c                          |   56 ++++---
 libpurple/blistnodetypes.c                     |  136 +++++++++---------
 libpurple/ciphers/aescipher.c                  |    8 +-
 libpurple/ciphers/des3cipher.c                 |    8 +-
 libpurple/ciphers/descipher.c                  |    5 +-
 libpurple/ciphers/hmaccipher.c                 |    4 +-
 libpurple/ciphers/pbkdf2cipher.c               |   10 +-
 libpurple/ciphers/rc4cipher.c                  |    7 +-
 libpurple/circularbuffer.c                     |   43 +++--
 libpurple/connection.c                         |   50 +++---
 libpurple/conversation.c                       |   49 +++---
 libpurple/conversationtypes.c                  |  112 +++++++--------
 libpurple/glibcompat.h                         |    8 +
 libpurple/media/codec.c                        |   44 +++--
 libpurple/presence.c                           |   78 +++++-----
 libpurple/protocols/gg/lib/handlers.c          |    2 +-
 libpurple/protocols/jabber/google/google_p2p.c |    8 +-
 libpurple/protocols/jabber/jingle/content.c    |   18 +--
 libpurple/protocols/jabber/jingle/iceudp.c     |    8 +-
 libpurple/protocols/jabber/jingle/rawudp.c     |    8 +-
 libpurple/protocols/jabber/jingle/rtp.c        |    8 +-
 libpurple/protocols/jabber/jingle/session.c    |   20 +--
 libpurple/roomlist.c                           |   31 ++--
 libpurple/smiley.c                             |   16 +-
 libpurple/status.c                             |   34 ++--
 libpurple/theme-loader.c                       |   23 +-
 libpurple/theme.c                              |   51 +++---
 libpurple/whiteboard.c                         |   34 ++--
 libpurple/xfer.c                               |  176 ++++++++++--------------
 pidgin/gtkblist-theme.c                        |   35 +----
 pidgin/gtkconv-theme.c                         |    4 +-
 pidgin/gtkdialogs.c                            |    8 +-
 pidgin/gtkthemes.c                             |   17 ++-
 pidgin/minidialog.c                            |   18 +-
 37 files changed, 594 insertions(+), 660 deletions(-)

diffs (truncated from 3104 to 300 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,9 +80,13 @@ version 3.0.0 (??/??/????):
 	  non-native plugin support.
 	* Doxygen has been replaced by gtk-doc for generating documentation.
 
+	Gadu-Gadu:
+	* Disabled buddy list import/export from/to server (it didn't worked
+	  anymore). Buddy list synchronization will be implemented in 3.0.0.
+
 	Windows-Specific Changes:
 	* Updates to dependencies:
-		* NSS 3.14.3 and NSPR 4.9.5
+		* NSS 3.15.2 and NSPR 4.10.1
 
 version 2.10.7 (02/13/2013):
 	Alien hatchery:
diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -91,6 +91,7 @@ C_SRC =	\
 			debug.c \
 			dnsquery.c \
 			dnssrv.c \
+			e2ee.c \
 			eventloop.c \
 			http.c \
 			idle.c \
@@ -116,6 +117,7 @@ C_SRC =	\
 			protocols.c \
 			purple-socket.c \
 			request.c \
+			request-datasheet.c \
 			roomlist.c \
 			savedstatuses.c \
 			server.c \
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -24,6 +24,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 #include "internal.h"
+#include "glibcompat.h"
+
 #include "accounts.h"
 #include "core.h"
 #include "dbus-maybe.h"
@@ -133,6 +135,7 @@ enum
 };
 
 static GObjectClass  *parent_class = NULL;
+static GParamSpec    *properties[PROP_LAST];
 static GList         *handles = NULL;
 
 void _purple_account_set_current_error(PurpleAccount *account,
@@ -737,7 +740,7 @@ purple_account_set_username(PurpleAccoun
 	g_free(priv->username);
 	priv->username = g_strdup(username);
 
-	g_object_notify(G_OBJECT(account), "username");
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_USERNAME]);
 
 	purple_accounts_schedule_save();
 
@@ -797,7 +800,8 @@ purple_account_set_private_alias(PurpleA
 		char *old = priv->alias;
 
 		priv->alias = g_strdup(alias);
-		g_object_notify(G_OBJECT(account), "private-alias");
+		g_object_notify_by_pspec(G_OBJECT(account),
+						 properties[PROP_PRIVATE_ALIAS]);
 		purple_signal_emit(purple_accounts_get_handle(), "account-alias-changed",
 						 account, old);
 		g_free(old);
@@ -818,7 +822,7 @@ purple_account_set_user_info(PurpleAccou
 	g_free(priv->user_info);
 	priv->user_info = g_strdup(user_info);
 
-	g_object_notify(G_OBJECT(account), "user-info");
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_USER_INFO]);
 
 	purple_accounts_schedule_save();
 }
@@ -834,7 +838,8 @@ void purple_account_set_buddy_icon_path(
 	g_free(priv->buddy_icon_path);
 	priv->buddy_icon_path = g_strdup(path);
 
-	g_object_notify(G_OBJECT(account), "buddy-icon-path");
+	g_object_notify_by_pspec(G_OBJECT(account),
+			properties[PROP_BUDDY_ICON_PATH]);
 
 	purple_accounts_schedule_save();
 }
@@ -852,7 +857,7 @@ 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");
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_PROTOCOL_ID]);
 
 	purple_accounts_schedule_save();
 }
@@ -867,7 +872,7 @@ purple_account_set_connection(PurpleAcco
 	priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
 	priv->gc = gc;
 
-	g_object_notify(G_OBJECT(account), "connection");
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_CONNECTION]);
 }
 
 void
@@ -880,7 +885,8 @@ purple_account_set_remember_password(Pur
 	priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
 	priv->remember_pass = value;
 
-	g_object_notify(G_OBJECT(account), "remember-password");
+	g_object_notify_by_pspec(G_OBJECT(account),
+			properties[PROP_REMEMBER_PASSWORD]);
 
 	purple_accounts_schedule_save();
 }
@@ -892,7 +898,7 @@ purple_account_set_check_mail(PurpleAcco
 
 	purple_account_set_bool(account, "check-mail", value);
 
-	g_object_notify(G_OBJECT(account), "check-mail");
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_CHECK_MAIL]);
 }
 
 void
@@ -916,7 +922,7 @@ 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");
+	g_object_notify_by_pspec(G_OBJECT(account), properties[PROP_ENABLED]);
 
 	if ((gc != NULL) && (_purple_connection_wants_to_die(gc)))
 		wants_to_die = TRUE;
@@ -3028,62 +3034,53 @@ purple_account_class_init(PurpleAccountC
 	obj_class->get_property = purple_account_get_property;
 	obj_class->set_property = purple_account_set_property;
 
-	g_object_class_install_property(obj_class, PROP_USERNAME,
-			g_param_spec_string("username", "Username",
+	g_type_class_add_private(klass, sizeof(PurpleAccountPrivate));
+
+	properties[PROP_USERNAME] = g_param_spec_string("username", "Username",
 				"The username for the account.", NULL,
-				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",
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
+
+	properties[PROP_PRIVATE_ALIAS] = g_param_spec_string("private-alias",
+				"Private Alias",
 				"The private alias for the account.", NULL,
-				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",
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+	properties[PROP_USER_INFO] = g_param_spec_string("user-info",
+				"User information",
 				"Detailed user information for the account.", NULL,
-				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",
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+	properties[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_STATIC_STRINGS)
-			);
-
-	g_object_class_install_property(obj_class, PROP_ENABLED,
-			g_param_spec_boolean("enabled", "Enabled",
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+	properties[PROP_ENABLED] = g_param_spec_boolean("enabled", "Enabled",
 				"Whether the account is enabled or not.", FALSE,
-				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_STATIC_STRINGS)
-			);
-
-	g_object_class_install_property(obj_class, PROP_CHECK_MAIL,
-			g_param_spec_boolean("check-mail", "Check mail",
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+	properties[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_STATIC_STRINGS);
+
+	properties[PROP_CHECK_MAIL] = g_param_spec_boolean("check-mail",
+				"Check mail",
 				"Whether to check mails for this account.", FALSE,
-				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
-			);
-
-	g_object_class_install_property(obj_class, PROP_CONNECTION,
-			g_param_spec_object("connection", "Connection",
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+	properties[PROP_CONNECTION] = g_param_spec_object("connection",
+				"Connection",
 				"The connection for the account.", PURPLE_TYPE_CONNECTION,
-				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",
+				G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+	properties[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_STATIC_STRINGS)
-			);
-
-	g_type_class_add_private(klass, sizeof(PurpleAccountPrivate));
+				G_PARAM_STATIC_STRINGS);
+
+	g_object_class_install_properties(obj_class, PROP_LAST, properties);
 }
 
 GType
diff --git a/libpurple/blistnode.c b/libpurple/blistnode.c
--- a/libpurple/blistnode.c
+++ b/libpurple/blistnode.c
@@ -20,8 +20,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
+#include "internal.h"
+#include "glibcompat.h"
 #include "blistnodetypes.h"
-#include "internal.h"
 
 #define PURPLE_BLIST_NODE_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_BLIST_NODE, PurpleBlistNodePrivate))
@@ -70,6 +71,9 @@ enum
 
 static GObjectClass *parent_class;
 
+static GParamSpec *bn_properties[BLNODE_PROP_LAST];
+static GParamSpec *cn_properties[CNODE_PROP_LAST];
+
 /**************************************************************************/
 /* Buddy list node API                                                    */
 /**************************************************************************/
@@ -163,7 +167,8 @@ purple_blist_node_set_transient(PurpleBl
 
 	priv->transient = transient;
 
-	g_object_notify(G_OBJECT(node), "transient");
+	g_object_notify_by_pspec(G_OBJECT(node),
+			bn_properties[BLNODE_PROP_TRANSIENT]);
 }
 
 gboolean
@@ -407,13 +412,15 @@ purple_blist_node_class_init(PurpleBlist
 	obj_class->get_property = purple_blist_node_get_property;
 	obj_class->set_property = purple_blist_node_set_property;
 
-	g_object_class_install_property(obj_class, BLNODE_PROP_TRANSIENT,
-			g_param_spec_boolean("transient", "Transient",
+	g_type_class_add_private(klass, sizeof(PurpleBlistNodePrivate));
+
+	bn_properties[BLNODE_PROP_TRANSIENT] = g_param_spec_boolean("transient",
+				"Transient",
 				"Whether node should not be saved with the buddy list.",
-				FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
-			);
+				FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
-	g_type_class_add_private(klass, sizeof(PurpleBlistNodePrivate));
+	g_object_class_install_properties(obj_class, BLNODE_PROP_LAST,
+				bn_properties);
 }
 
 GType
@@ -515,7 +522,8 @@ purple_counting_node_set_total_size(Purp
 
 	priv->totalsize = totalsize;



More information about the Commits mailing list