/soc/2013/ankitkv/gobjectification: 9dd39a792240: Merged soc.201...

Ankit Vani a at nevitus.org
Sun Sep 29 07:25:40 EDT 2013


Changeset: 9dd39a7922409af5b1242cda593da7d9d2fb80d7
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-29 16:53 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/9dd39a792240

Description:

Merged soc.2013.gobjectification branch

diffstat:

 libpurple/Makefile.mingw                     |  28 ++++++++++++++++++++++------
 libpurple/plugins/keyrings/Makefile.mingw    |   1 +
 libpurple/plugins/perl/common/Makefile.mingw |   3 ++-
 libpurple/plugins/ssl/Makefile.mingw         |   1 +
 libpurple/plugins/tcl/Makefile.mingw         |   1 +
 libpurple/plugins/tcl/tcl_signals.c          |   4 ++--
 libpurple/protocols/bonjour/Makefile.mingw   |   1 +
 libpurple/protocols/bonjour/mdns_win32.c     |   3 ++-
 libpurple/protocols/irc/Makefile.mingw       |   1 +
 libpurple/protocols/irc/msgs.c               |   2 +-
 libpurple/protocols/jabber/auth.c            |   3 ++-
 libpurple/protocols/jabber/auth_cyrus.c      |   3 ++-
 libpurple/protocols/msn/Makefile.mingw       |   1 +
 libpurple/protocols/mxit/Makefile.mingw      |   1 +
 libpurple/protocols/myspace/Makefile.mingw   |   1 +
 libpurple/protocols/novell/Makefile.mingw    |   1 +
 libpurple/protocols/null/Makefile.mingw      |   1 +
 libpurple/protocols/null/nullprotocol.c      |  18 ++++++++++++------
 libpurple/protocols/oscar/Makefile.mingw     |   1 +
 libpurple/protocols/sametime/Makefile.mingw  |   1 +
 libpurple/protocols/silc/Makefile.mingw      |   1 +
 libpurple/protocols/simple/Makefile.mingw    |   1 +
 libpurple/protocols/yahoo/Makefile.mingw     |   1 +
 libpurple/protocols/zephyr/Makefile.mingw    |   1 +
 libpurple/win32/global.mak                   |   1 +
 pidgin/gtkdialogs.c                          |   5 +++--
 pidgin/gtkutils.c                            |   5 +++--
 pidgin/gtkxfer.c                             |   5 +++--
 28 files changed, 71 insertions(+), 25 deletions(-)

diffs (truncated from 452 to 300 lines):

diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -53,13 +53,15 @@ ifeq "$(USE_VV)" "1"
 VV_SRC = \
 	media/backend-fs2.c \
 	media/backend-iface.c \
-	media/codec.c \
-	marshallers.c
+	media/codec.c
 else
 VV_SRC =
 endif
 
+BUILT_SRC = marshallers.c enums.c
+
 C_SRC =	\
+			$(BUILT_SRC) \
 			account.c \
 			accounts.c \
 			accountopt.c \
@@ -143,6 +145,16 @@ C_SRC =	\
 
 RC_SRC = win32/libpurplerc.rc
 
+ENUM_HEADERS = \
+	account.h \
+	cipher.h \
+	connection.h \
+	conversation.h \
+	conversationtypes.h \
+	roomlist.h \
+	status.h \
+	xfer.h
+
 OBJECTS = $(C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o)
 
 ##
@@ -203,9 +215,13 @@ marshallers.c: marshallers.list marshall
 	@echo "#include \"marshallers.h\"" > marshallers.c
 	@$(GLIB_GENMARSHAL) --prefix=purple_smarshal $< --body >> marshallers.c
 
-ifeq "$(USE_VV)" "1"
-mediamanager.c media/backend-iface.c: marshallers.h
-endif
+enums.h: enums.h.template $(ENUM_HEADERS)
+	@echo -e "  GEN\t$@"
+	@$(GLIB_MKENUMS) --template enums.h.template $(ENUM_HEADERS) > enums.h
+
+enums.c: enums.c.template enums.h $(ENUM_HEADERS)
+	@echo -e "  GEN\t$@"
+	@$(GLIB_MKENUMS) --template enums.c.template $(ENUM_HEADERS) > enums.c
 
 $(TARGET).dll $(TARGET).dll.a: $(OBJECTS)
 	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--output-def,$(TARGET).def,--out-implib,$(TARGET).dll.a -o $(TARGET).dll
@@ -214,7 +230,7 @@ endif
 ## CLEAN RULES
 ##
 clean:
-	rm -f $(OBJECTS) $(RC_SRC) $(PURPLE_VERSION_H) $(PURPLE_PURPLE_H) marshallers.h marshallers.c
+	rm -f $(OBJECTS) $(RC_SRC) $(PURPLE_VERSION_H) $(PURPLE_PURPLE_H) marshallers.h marshallers.c enums.h enums.c
 	rm -f $(TARGET).dll $(TARGET).dll.a $(TARGET).def
 	$(MAKE_at) $(MAKE) -C $(PURPLE_PROTOS_TOP) -f $(MINGW_MAKEFILE) clean
 	$(MAKE_at) $(MAKE) -C $(PURPLE_PLUGINS_TOP) -f $(MINGW_MAKEFILE) clean
diff --git a/libpurple/plugins/keyrings/Makefile.mingw b/libpurple/plugins/keyrings/Makefile.mingw
--- a/libpurple/plugins/keyrings/Makefile.mingw
+++ b/libpurple/plugins/keyrings/Makefile.mingw
@@ -43,6 +43,7 @@ OBJECTS_WINCRED = $(C_SRC_WINCRED:%.c=%.
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lpurple
diff --git a/libpurple/plugins/perl/common/Makefile.mingw b/libpurple/plugins/perl/common/Makefile.mingw
--- a/libpurple/plugins/perl/common/Makefile.mingw
+++ b/libpurple/plugins/perl/common/Makefile.mingw
@@ -86,7 +86,8 @@ OBJECTS = $(C_FILES:%.c=%.o)
 LIBS =			-lperl510 \
 			-lperl \
 			-lpurple \
-			-lglib-2.0
+			-lglib-2.0 \
+			-lgobject-2.0
 
 include $(PIDGIN_COMMON_RULES)
 
diff --git a/libpurple/plugins/ssl/Makefile.mingw b/libpurple/plugins/ssl/Makefile.mingw
--- a/libpurple/plugins/ssl/Makefile.mingw
+++ b/libpurple/plugins/ssl/Makefile.mingw
@@ -49,6 +49,7 @@ OBJECTS_GNUTLS = $(C_SRC_GNUTLS:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lpurple \
diff --git a/libpurple/plugins/tcl/Makefile.mingw b/libpurple/plugins/tcl/Makefile.mingw
--- a/libpurple/plugins/tcl/Makefile.mingw
+++ b/libpurple/plugins/tcl/Makefile.mingw
@@ -44,6 +44,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lpurple \
diff --git a/libpurple/plugins/tcl/tcl_signals.c b/libpurple/plugins/tcl/tcl_signals.c
--- a/libpurple/plugins/tcl/tcl_signals.c
+++ b/libpurple/plugins/tcl/tcl_signals.c
@@ -332,8 +332,8 @@ static void *tcl_signal_callback(va_list
 			{
 				/* What?  I guess just pass the word ... */
 				/* treat this as a pointer, but complain first */
-				purple_debug(PURPLE_DEBUG_ERROR, "tcl", "unknown GType %lu\n",
-					   handler->argtypes[i]);
+				purple_debug(PURPLE_DEBUG_ERROR, "tcl", "unknown type %s\n",
+					   g_type_name(handler->argtypes[i]));
 			}
 		}
 		Tcl_ListObjAppendElement(handler->interp, cmd, arg);
diff --git a/libpurple/protocols/bonjour/Makefile.mingw b/libpurple/protocols/bonjour/Makefile.mingw
--- a/libpurple/protocols/bonjour/Makefile.mingw
+++ b/libpurple/protocols/bonjour/Makefile.mingw
@@ -58,6 +58,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lnetapi32 \
diff --git a/libpurple/protocols/bonjour/mdns_win32.c b/libpurple/protocols/bonjour/mdns_win32.c
--- a/libpurple/protocols/bonjour/mdns_win32.c
+++ b/libpurple/protocols/bonjour/mdns_win32.c
@@ -105,7 +105,8 @@ static void
 		purple_debug_error("bonjour", "Error (%d) handling mDNS response.\n", errorCode);
 		/* This happens when the mDNSResponder goes down, I haven't seen it happen any other time (in my limited testing) */
 		if (errorCode == kDNSServiceErr_Unknown) {
-			purple_connection_error(srh->account->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
+			purple_connection_error(purple_account_get_connection(srh->account),
+				PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 				_("Error communicating with local mDNSResponder."));
 		}
 	}
diff --git a/libpurple/protocols/irc/Makefile.mingw b/libpurple/protocols/irc/Makefile.mingw
--- a/libpurple/protocols/irc/Makefile.mingw
+++ b/libpurple/protocols/irc/Makefile.mingw
@@ -50,6 +50,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lpurple
diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c
--- a/libpurple/protocols/irc/msgs.c
+++ b/libpurple/protocols/irc/msgs.c
@@ -1558,7 +1558,7 @@ irc_auth_start_cyrus(struct irc_conn *ir
 			return;
 		}
 
-		sasl_setprop(irc->sasl_conn, SASL_AUTH_EXTERNAL, irc->account->username);
+		sasl_setprop(irc->sasl_conn, SASL_AUTH_EXTERNAL, purple_account_get_username(irc->account));
 		sasl_setprop(irc->sasl_conn, SASL_SEC_PROPS, &secprops);
 
 		ret = sasl_client_start(irc->sasl_conn, irc->sasl_mechs->str, NULL, NULL, NULL, &irc->current_mech);
diff --git a/libpurple/protocols/jabber/auth.c b/libpurple/protocols/jabber/auth.c
--- a/libpurple/protocols/jabber/auth.c
+++ b/libpurple/protocols/jabber/auth.c
@@ -105,7 +105,8 @@ auth_old_pass_cb(PurpleConnection *gc, P
 
 	if (!entry || !*entry)
 	{
-		purple_notify_error(account, NULL, _("Password is required to sign on."), NULL);
+		purple_notify_error(account, NULL, _("Password is required to sign on."), NULL,
+				purple_request_cpar_from_account(account));
 		return;
 	}
 
diff --git a/libpurple/protocols/jabber/auth_cyrus.c b/libpurple/protocols/jabber/auth_cyrus.c
--- a/libpurple/protocols/jabber/auth_cyrus.c
+++ b/libpurple/protocols/jabber/auth_cyrus.c
@@ -145,7 +145,8 @@ static void auth_pass_cb(PurpleConnectio
 
 	if (!entry || !*entry)
 	{
-		purple_notify_error(account, NULL, _("Password is required to sign on."), NULL);
+		purple_notify_error(account, NULL, _("Password is required to sign on."), NULL,
+				purple_request_cpar_from_account(account));
 		return;
 	}
 
diff --git a/libpurple/protocols/msn/Makefile.mingw b/libpurple/protocols/msn/Makefile.mingw
--- a/libpurple/protocols/msn/Makefile.mingw
+++ b/libpurple/protocols/msn/Makefile.mingw
@@ -79,6 +79,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lintl \
 			-lws2_32 \
 			-lpurple
diff --git a/libpurple/protocols/mxit/Makefile.mingw b/libpurple/protocols/mxit/Makefile.mingw
--- a/libpurple/protocols/mxit/Makefile.mingw
+++ b/libpurple/protocols/mxit/Makefile.mingw
@@ -60,6 +60,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lintl \
 			-lws2_32 \
 			-lpurple
diff --git a/libpurple/protocols/myspace/Makefile.mingw b/libpurple/protocols/myspace/Makefile.mingw
--- a/libpurple/protocols/myspace/Makefile.mingw
+++ b/libpurple/protocols/myspace/Makefile.mingw
@@ -46,6 +46,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lpurple
diff --git a/libpurple/protocols/novell/Makefile.mingw b/libpurple/protocols/novell/Makefile.mingw
--- a/libpurple/protocols/novell/Makefile.mingw
+++ b/libpurple/protocols/novell/Makefile.mingw
@@ -57,6 +57,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lws2_32 \
 			-lintl \
 			-lpurple
diff --git a/libpurple/protocols/null/Makefile.mingw b/libpurple/protocols/null/Makefile.mingw
--- a/libpurple/protocols/null/Makefile.mingw
+++ b/libpurple/protocols/null/Makefile.mingw
@@ -46,6 +46,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgobject-2.0 \
 			-lintl \
 			-lws2_32 \
 			-lpurple
diff --git a/libpurple/protocols/null/nullprotocol.c b/libpurple/protocols/null/nullprotocol.c
--- a/libpurple/protocols/null/nullprotocol.c
+++ b/libpurple/protocols/null/nullprotocol.c
@@ -325,7 +325,8 @@ static void blist_example_menu_item(Purp
   purple_notify_info(NULL,  /* plugin handle or PurpleConnection */
                      _("Primary title"),
                      _("Secondary title"),
-                     _("This is the callback for the nullprotocol menu item."));
+                     _("This is the callback for the nullprotocol menu item."),
+                     NULL);
 }
 
 static GList *null_blist_node_menu(PurpleBlistNode *node) {
@@ -511,13 +512,15 @@ static void null_get_info(PurpleConnecti
   purple_debug_info("nullprotocol", "Fetching %s's user info for %s\n", username,
                     purple_account_get_username(purple_connection_get_account(gc)));
 
+  acct = purple_accounts_find(username, NULLPRPL_ID);
+
   if (!get_null_gc(username)) {
     char *msg = g_strdup_printf(_("%s is not logged in."), username);
-    purple_notify_error(gc, _("User Info"), _("User info not available. "), msg);
+    purple_notify_error(gc, _("User Info"), _("User info not available. "), msg,
+	                    purple_request_cpar_from_account(acct));
     g_free(msg);
   }
 
-  acct = purple_accounts_find(username, "null");
   if (acct)
     body = purple_account_get_user_info(acct);
   else
@@ -693,7 +696,8 @@ static void null_join_chat(PurpleConnect
                                 room);
     purple_debug_info("nullprotocol", "%s is already in chat room %s\n", username,
                       room);
-    purple_notify_info(gc, _("Join chat"), _("Join chat"), tmp);
+    purple_notify_info(gc, _("Join chat"), _("Join chat"), tmp,
+	                   purple_request_cpar_from_connection(gc));
     g_free(tmp);
   }
 }
@@ -716,7 +720,8 @@ static void null_reject_chat(PurpleConne
   purple_notify_info(invited_by_gc,
                      _("Chat invitation rejected"),
                      _("Chat invitation rejected"),
-                     message);
+                     message,
+					 purple_request_cpar_from_connection(gc));



More information about the Commits mailing list