/soc/2013/ankitkv/gobjectification: e49025233301: Merged soc.201...

Ankit Vani a at nevitus.org
Fri Sep 6 08:51:23 EDT 2013


Changeset: e49025233301f3d55cb2862906b41a93ef8b7d9b
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-06 18:18 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/e49025233301

Description:

Merged soc.2013.gobjectification branch

diffstat:

 finch/Makefile.am                            |     8 +-
 finch/finch.c                                |     2 +-
 finch/gntblist.c                             |     2 +-
 finch/gntui.c                                |     2 +-
 finch/gntft.c                                |    18 +-
 finch/gntft.h                                |     4 +-
 libpurple/Makefile.am                        |    17 +-
 libpurple/blistnodetypes.c                   |     5 +-
 libpurple/connection.c                       |     1 +
 libpurple/conversation.c                     |     2 +
 libpurple/conversationtypes.c                |     3 +
 libpurple/core.c                             |     2 +-
 libpurple/media.c                            |     4 +-
 libpurple/plugins/autoaccept.c               |     2 +-
 libpurple/plugins/perl/common/MANIFEST       |     2 +-
 libpurple/plugins/perl/common/Makefile.mingw |     2 +-
 libpurple/plugins/perl/common/FT.xs          |    14 +-
 libpurple/plugins/perl/common/module.h       |     6 +-
 libpurple/plugins/perl/common/typemap        |     2 +-
 libpurple/plugins/signals-test.c             |     2 +-
 libpurple/protocol.h                         |     2 +-
 libpurple/protocols/bonjour/bonjour_ft.c     |    16 +-
 libpurple/protocols/irc/dcc_send.c           |    14 +-
 libpurple/protocols/irc/irc.h                |     2 +-
 libpurple/protocols/jabber/oob.c             |     4 +-
 libpurple/protocols/jabber/si.c              |    36 +-
 libpurple/protocols/jabber/si.h              |     2 +-
 libpurple/protocols/msn/Makefile.am          |     4 +-
 libpurple/protocols/msn/xfer.c               |    10 +-
 libpurple/protocols/msn/xfer.h               |     8 +-
 libpurple/protocols/msn/msn.c                |     2 +-
 libpurple/protocols/msn/slp.c                |    10 +-
 libpurple/protocols/msn/slp.h                |     2 +-
 libpurple/protocols/msn/slpcall.c            |    10 +-
 libpurple/protocols/msn/slplink.c            |     8 +-
 libpurple/protocols/mxit/filexfer.c          |    28 +-
 libpurple/protocols/oscar/oft.c              |     2 +-
 libpurple/protocols/oscar/oscar.c            |     3 +-
 libpurple/protocols/oscar/peer.c             |    11 +-
 libpurple/protocols/oscar/peer.h             |     2 +-
 libpurple/protocols/sametime/sametime.c      |    47 +-
 libpurple/protocols/silc/ft.c                |    11 +-
 libpurple/protocols/silc/silcpurple.h        |     2 +-
 libpurple/protocols/yahoo/yahoo_filexfer.c   |    16 +-
 libpurple/protocols/yahoo/yahoo_filexfer.h   |     2 +-
 libpurple/purple.h.in                        |     2 +-
 libpurple/ft.c                               |  1468 +++++++++++++++++--------
 libpurple/ft.h                               |   160 +-
 pidgin/Makefile.am                           |     4 +-
 pidgin/gtkblist.c                            |     2 +-
 pidgin/gtkdialogs.c                          |     2 +
 pidgin/gtkmain.c                             |     4 +-
 pidgin/gtkft.c                               |    24 +-
 pidgin/gtkft.h                               |     4 +-
 pidgin/plugins/perl/common/gtkmodule.h       |     4 +-
 55 files changed, 1230 insertions(+), 798 deletions(-)

diffs (truncated from 4478 to 300 lines):

diff --git a/finch/Makefile.am b/finch/Makefile.am
--- a/finch/Makefile.am
+++ b/finch/Makefile.am
@@ -22,7 +22,6 @@ finch_SOURCES = \
 	gntconn.c \
 	gntconv.c \
 	gntdebug.c \
-	gntft.c \
 	finch.c \
 	gntidle.c \
 	gntlog.c \
@@ -36,7 +35,8 @@ finch_SOURCES = \
 	gntroomlist.c \
 	gntsound.c \
 	gntstatus.c \
-	gntui.c
+	gntui.c \
+	gntxfer.c
 
 finch_headers = \
 	gntaccount.h \
@@ -45,7 +45,6 @@ finch_headers = \
 	gntconn.h \
 	gntconv.h \
 	gntdebug.h \
-	gntft.h \
 	finch.h \
 	gntidle.h \
 	gntlog.h \
@@ -59,7 +58,8 @@ finch_headers = \
 	gntroomlist.h \
 	gntsound.h \
 	gntstatus.h \
-	gntui.h
+	gntui.h \
+	gntxfer.h
 
 finchincludedir=$(includedir)/finch
 finchinclude_HEADERS = \
diff --git a/finch/finch.c b/finch/finch.c
--- a/finch/finch.c
+++ b/finch/finch.c
@@ -27,7 +27,7 @@
 #include "core.h"
 #include "debug.h"
 #include "eventloop.h"
-#include "ft.h"
+#include "xfer.h"
 #include "log.h"
 #include "notify.h"
 #include "plugins.h"
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -43,7 +43,7 @@
 #include "gntcolors.h"
 #include "gntcombobox.h"
 #include "gntentry.h"
-#include "gntft.h"
+#include "gntxfer.h"
 #include "gntlabel.h"
 #include "gntline.h"
 #include "gntlog.h"
diff --git a/finch/gntui.c b/finch/gntui.c
--- a/finch/gntui.c
+++ b/finch/gntui.c
@@ -30,7 +30,7 @@
 #include "gntconn.h"
 #include "gntconv.h"
 #include "gntdebug.h"
-#include "gntft.h"
+#include "gntxfer.h"
 #include "gntlog.h"
 #include "gntmedia.h"
 #include "gntnotify.h"
diff --git a/finch/gntft.c b/finch/gntxfer.c
rename from finch/gntft.c
rename to finch/gntxfer.c
--- a/finch/gntft.c
+++ b/finch/gntxfer.c
@@ -1,5 +1,5 @@
 /**
- * @file gntft.c GNT File Transfer UI
+ * @file gntxfer.c GNT File Transfer UI
  * @ingroup finch
  */
 
@@ -35,11 +35,11 @@
 
 #include "debug.h"
 #include "notify.h"
-#include "ft.h"
+#include "xfer.h"
 #include "protocol.h"
 #include "util.h"
 
-#include "gntft.h"
+#include "gntxfer.h"
 #include "prefs.h"
 
 typedef struct
@@ -169,7 +169,7 @@ static void
 stop_button_cb(GntButton *button)
 {
 	PurpleXfer *selected_xfer = gnt_tree_get_selection_data(GNT_TREE(xfer_dialog->tree));
-	PurpleXferStatusType status;
+	PurpleXferStatus status;
 
 	if (!selected_xfer)
 		return;
@@ -297,7 +297,7 @@ finch_xfer_dialog_add_xfer(PurpleXfer *x
 	g_return_if_fail(xfer_dialog != NULL);
 	g_return_if_fail(xfer != NULL);
 
-	purple_xfer_ref(xfer);
+	g_object_ref(xfer);
 
 	data = purple_xfer_get_ui_data(xfer);
 	data->in_list = TRUE;
@@ -306,7 +306,7 @@ finch_xfer_dialog_add_xfer(PurpleXfer *x
 
 	data->last_updated_time = 0;
 
-	type = purple_xfer_get_type(xfer);
+	type = purple_xfer_get_xfer_type(xfer);
 
 	size_str      = purple_str_size_to_units(purple_xfer_get_size(xfer));
 	remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer));
@@ -317,7 +317,7 @@ finch_xfer_dialog_add_xfer(PurpleXfer *x
 	lfilename = utf8;
 	gnt_tree_add_row_last(GNT_TREE(xfer_dialog->tree), xfer,
 		gnt_tree_create_row(GNT_TREE(xfer_dialog->tree),
-			"0.0", (type == PURPLE_XFER_RECEIVE) ? purple_xfer_get_filename(xfer) : lfilename,
+			"0.0", (type == PURPLE_XFER_TYPE_RECEIVE) ? purple_xfer_get_filename(xfer) : lfilename,
 			size_str, "0.0", "",_("Waiting for transfer to begin")), NULL);
 	g_free(lfilename);
 
@@ -355,7 +355,7 @@ finch_xfer_dialog_remove_xfer(PurpleXfer
 		finch_xfer_dialog_destroy();
 	else
 		update_title_progress();
-	purple_xfer_unref(xfer);
+	g_object_unref(xfer);
 }
 
 void
@@ -427,7 +427,7 @@ finch_xfer_dialog_update_xfer(PurpleXfer
 	}
 	data->last_updated_time = current_time;
 
-	send = (purple_xfer_get_type(xfer) == PURPLE_XFER_SEND);
+	send = (purple_xfer_get_xfer_type(xfer) == PURPLE_XFER_TYPE_SEND);
 	size_str      = purple_str_size_to_units(purple_xfer_get_size(xfer));
 	remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer));
 	kbsec = g_strdup_printf(_("%.2f KiB/s"), kbps);
diff --git a/finch/gntft.h b/finch/gntxfer.h
rename from finch/gntft.h
rename to finch/gntxfer.h
--- a/finch/gntft.h
+++ b/finch/gntxfer.h
@@ -1,5 +1,5 @@
 /**
- * @file gntft.h GNT File Transfer UI
+ * @file gntxfer.h GNT File Transfer UI
  * @ingroup finch
  */
 
@@ -26,7 +26,7 @@
 #ifndef _FINCHFT_H_
 #define _FINCHFT_H_
 
-#include "ft.h"
+#include "xfer.h"
 
 
 /**************************************************************************/
diff --git a/libpurple/Makefile.am b/libpurple/Makefile.am
--- a/libpurple/Makefile.am
+++ b/libpurple/Makefile.am
@@ -56,7 +56,6 @@ purple_coresources = \
 	debug.c \
 	desktopitem.c \
 	eventloop.c \
-	ft.c \
 	hash.c \
 	http.c \
 	idle.c \
@@ -105,8 +104,9 @@ purple_coresources = \
 	upnp.c \
 	util.c \
 	version.c \
-	xmlnode.c \
-	whiteboard.c
+	whiteboard.c \
+	xfer.c \
+	xmlnode.c
 
 purple_builtsources = \
 	enums.c \
@@ -133,7 +133,6 @@ purple_coreheaders = \
 	debug.h \
 	desktopitem.h \
 	eventloop.h \
-	ft.h \
 	hash.h \
 	http.h \
 	idle.h \
@@ -177,8 +176,9 @@ purple_coreheaders = \
 	theme-manager.h \
 	upnp.h \
 	util.h \
-	xmlnode.h \
-	whiteboard.h
+	whiteboard.h \
+	xfer.h \
+	xmlnode.h
 
 purple_mediaheaders = \
 	backend-iface.h \
@@ -197,7 +197,8 @@ purple_enumheaders = \
 	plugins.h \
 	protocol.h \
 	protocols.h \
-	status.h
+	status.h \
+	xfer.h
 
 marshallers.h: marshallers.list
 	$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=purple_smarshal $(srcdir)/marshallers.list --header > marshallers.h
@@ -236,7 +237,7 @@ dbus_headers  = dbus-bindings.h dbus-pur
 
 dbus_exported = dbus-useful.h dbus-define-api.h account.h accounts.h blistnode.h \
                 blistnodetypes.h buddylist.h buddyicon.h connection.h conversation.h \
-                conversationtypes.h conversations.h core.h ft.h log.h notify.h \
+                conversationtypes.h conversations.h core.h xfer.h log.h notify.h \
                 prefs.h presence.h roomlist.h savedstatuses.h smiley.h status.h \
                 server.h util.h xmlnode.h protocol.h protocols.h
 
diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -58,10 +58,7 @@ struct _PurpleBuddyPrivate {
 	char *server_alias;          /**< The server-specified alias of the buddy.
 	                                  (i.e. MSN "Friendly Names")             */
 	void *proto_data;            /**< This allows the protocol to associate
-	                                  whatever data it wants with a buddy
-	                                  TODO Remove this field. Protocols should
-	                                       subclass PurpleBuddy and store
-	                                       their data as they see fit.        */
+	                                  whatever data it wants with a buddy.    */
 	PurpleBuddyIcon *icon;       /**< The buddy icon.                         */
 	PurpleAccount *account;      /**< the account this buddy belongs to       */
 	PurplePresence *presence;    /**< Presense information of the buddy       */
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -695,6 +695,7 @@ purple_connection_constructed(GObject *o
 
 	g_object_get(gc, PROP_ACCOUNT_S, &account, NULL);
 	purple_account_set_connection(account, gc);
+	g_object_unref(account);
 
 	purple_signal_emit(purple_connections_get_handle(), "signing-on", gc);
 }
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -1018,6 +1018,8 @@ purple_conversation_constructed(GObject 
 
 	purple_signal_emit(purple_conversations_get_handle(),
 					 "conversation-created", conv);
+
+	g_object_unref(account);
 }
 
 /* GObject dispose function */
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -445,6 +445,7 @@ purple_im_conversation_constructed(GObje
 	if (purple_prefs_get_bool("/purple/logging/log_ims"))
 		purple_conversation_set_logging(PURPLE_CONVERSATION(im), TRUE);
 
+	g_object_unref(account);
 	g_free(name);
 }
 
@@ -1423,6 +1424,8 @@ purple_chat_conversation_constructed(GOb
 
 	if (purple_prefs_get_bool("/purple/logging/log_chats"))
 		purple_conversation_set_logging(PURPLE_CONVERSATION(chat), TRUE);
+
+	g_object_unref(account);
 }
 
 /* GObject dispose function */
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -32,7 +32,7 @@



More information about the Commits mailing list